* Re: [PATCH v3 0/8] yet more unnecessary NULL checks
@ 2022-06-24 12:41 0% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-06-24 12:41 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Sun, Feb 20, 2022 at 7:22 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Thomas suggested there are some other functions that could
> use the nullfree cleanup; this covers the rest of the story.
>
> Note: this does not change existing API/ABI, there are still
> some outliers that don't use the convention but fixing these
> will have to wait until next LTS.
>
> v3 - fix another typo and add more functions
>
> v2 - fix spelling typo and add functions
>
> Stephen Hemminger (8):
> cocci/nullfree: add more functions
> acl: remove unnecessary null checks
> lpm: remove unnecessary NULL checks
> lib: document existing free functions
> test: remove unnecessary NULL checks before free
> fips_validation: remove unnecessary NULL check
> event/sw: remove unnecessary NULL check
> pipeline: remove unnecessary checks for NULL pointer before free
Series applied.
I reran the script and fixed two more instances.
Thanks for the cleanup Stephen.
--
David Marchand
^ permalink raw reply [relevance 0%]
* [Bug 1042] [dpdk-22.07](ABI) unit_tests_eal/link_bonding_rssconf: link_bonding_rssconf_autotest test failed
@ 2022-06-27 9:32 4% bugzilla
2022-08-19 8:45 4% ` bugzilla
0 siblings, 1 reply; 200+ results
From: bugzilla @ 2022-06-27 9:32 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=1042
Bug ID: 1042
Summary: [dpdk-22.07](ABI) unit_tests_eal/link_bonding_rssconf:
link_bonding_rssconf_autotest test failed
Product: DPDK
Version: 22.03
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: examples
Assignee: dev@dpdk.org
Reporter: weix.ling@intel.com
Target Milestone: ---
[Environment]
DPDK version: Use make showversion or for a non-released version: git remote -v
&& git show-ref --heads
commit 7cac53f205ebd04d8ebd3ee6a9dd84f698d4ada3 (HEAD -> main, tag: v22.07-rc2,
origin/main, origin/HEAD)
Author: Thomas Monjalon <thomas@monjalon.net>
Date: Mon Jun 27 04:03:44 2022 +0200 version: 22.07-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Other software versions: N/A
OS: Red Hat Enterprise Linux 8.4 (Ootpa)/Linux 4.18.0-305.el8.x86_64
Compiler: gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)
Hardware platform: Intel(R) Xeon(R) Platinum 8180 CPU @ 2.50GHz
NIC hardware: Intel Ethernet Controller XL710 for 40GbE QSFP+ 1583
NIC firmware: i40e-4.18.0-305.el8.x86_64/8.70 0x8000c40f 1.3179.0
[Test Setup]
Steps to reproduce
List the steps to reproduce the issue.
1. Build the DPDK-22.07-rc2 lib with the following steps:
Note: /tmp/dpdk.tar.gz is the DPDK-22.07-rc2 packet.
tar zxfm /tmp/dpdk.tar.gz -C ~
cd ~/dpdk
cd .. && rm -rf dpdk_lib && mv dpdk dpdk_lib && cd dpdk_lib
rm -rf x86_64-native-linuxapp-gcc
CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=shared
x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc
rm -rf /root/tmp/dpdk_share_lib
DESTDIR=/root/tmp/dpdk_share_lib ninja -C x86_64-native-linuxapp-gcc -j 110
install
rm -rf /root/shared_lib_dpdk
mv /root/tmp/dpdk_share_lib/usr/local/lib /root/shared_lib_dpdk
2. Build the DPDK-21.11 APP with the following steps:
Note: /tmp/dpdk_abi.tar.gz is the DPDK-21.11 packet.
cd ..
tar zxf /tmp/dpdk_abi.tar.gz -C ~
cd ~/dpdk/
rm -rf x86_64-native-linuxapp-gcc
CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=shared
x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc
# delete the DPDK-21.11 target/lib and drivers directory
rm -rf x86_64-native-linuxapp-gcc/lib
rm -rf x86_64-native-linuxapp-gcc/drivers
3. Bind 2 NIC port to vfio-pci driver:
dpdk-devbind.py --force --bind=vfio-pci 0000:18:00.0 0000:18:00.1
4. Start dpdk-test APP:
x86_64-native-linuxapp-gcc/app/test/dpdk-test -l 1-4 -n 4 -a 0000:18:00.0 -a
0000:18:00.1 --file-prefix=dpdk_63552_20220624173253 -d
/root/shared_lib_dpdk
5. Execute `link_bonding_rssconf_autotest` command to test:
RTE>>link_bonding_rssconf_autotest
Show the output from the previous commands.
[root@abi80 dpdk]# x86_64-native-linuxapp-gcc/app/test/dpdk-test -l 1-4 -n 4 -a
0000:18:00.0 -a 0000:18:00.1 --file-prefix=dpdk_63552_20220624173253 -d
/root/shared_lib_dpdk
EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/dpdk_63552_20220624173253/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found
for that size
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(4)
EAL: Probe PCI driver: net_i40e (8086:1583) device: 0000:18:00.0 (socket 0)
i40e_GLQF_reg_init(): i40e device 0000:18:00.0 changed global register
[0x002689a0]. original: 0x00000000, new: 0x00000029
i40e_GLQF_reg_init(): i40e device 0000:18:00.0 changed global register
[0x00268ca4]. original: 0x00001840, new: 0x00009420
i40e_aq_debug_write_global_register(): i40e device 0000:18:00.0 changed global
register [0x0026c7a0]. original: 0xa8, after: 0x28
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(4)
EAL: Probe PCI driver: net_i40e (8086:1583) device: 0000:18:00.1 (socket 0)
TELEMETRY: No legacy callbacks, legacy socket not created
APP: HPET is not enabled, using TSC as default timer
RTE>>link_bonding_rssconf_autotest
+ ------------------------------------------------------- +
+ Test Suite : RSS Dynamic Configuration for Bonding Unit Test Suite
+ ------------------------------------------------------- +
+ TestCase [ 0] : test_setup succeeded
Device with port_id=2 already stopped
Device with port_id=3 already stopped
Device with port_id=4 already stopped
Device with port_id=5 already stopped
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 2: Operation not supported
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 3: Operation not supported
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 4: Operation not supported
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 5: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 2: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 3: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 4: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 5: Operation not supported
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
bond_ethdev_rss_hash_update(3139) - rss_key will be truncated
Port 2 must be stopped to allow reset
Port 2 must be stopped to allow reset
Port 3 must be stopped to allow reset
Port 4 must be stopped to allow reset
Port 5 must be stopped to allow reset
+ TestCase [ 1] : test_rss succeeded
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 2: Operation not supported
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 3: Operation not supported
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 4: Operation not supported
bond_ethdev_promiscuous_disable(2684) - Failed to disable promiscuous mode for
port 5: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 2: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 3: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 4: Operation not supported
bond_ethdev_allmulticast_disable(2830) - Failed to disable allmulti mode for
port 5: Operation not supported
Multi-queue RSS mode isn't enabled.
EAL: Test assert test_propagate line 350 failed: Cannot set slaves hash
function
EAL: Test assert test_rss_lazy line 496 failed: Propagation test failed
Port 2 must be stopped to allow reset
Port 3 must be stopped to allow reset
Port 4 must be stopped to allow reset
Port 5 must be stopped to allow reset
+ TestCase [ 2] : test_rss_lazy failed
Device with port_id=6 already stopped
+ ------------------------------------------------------- +
+ Test Suite Summary : RSS Dynamic Configuration for Bonding Unit Test Suite
+ ------------------------------------------------------- +
+ Tests Total : 3
+ Tests Skipped : 0
+ Tests Executed : 3
+ Tests Unsupported: 0
+ Tests Passed : 2
+ Tests Failed : 1
+ ------------------------------------------------------- +
Test Failed
RTE>>
[Expected Result]
Explain what is the expected result in text or as an example output:
[root@abi80 dpdk]# x86_64-native-linuxapp-gcc/app/test/dpdk-test -l 1-4 -n 4 -a
0000:18:00.0 -a 0000:18:00.1 --file-prefix=dpdk_63552_20220624173253 -d
/root/shared_lib_dpdk EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/dpdk_63552_202206241732/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found
for that size
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(4)
EAL: Probe PCI driver: net_i40e (8086:1583) device: 0000:18:00.0 (socket 0)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(4)
EAL: Probe PCI driver: net_i40e (8086:1583) device: 0000:18:00.1 (socket 0)
TELEMETRY: No legacy callbacks, legacy socket not created
APP: HPET is not enabled, using TSC as default timer
RTE>>link_bonding_rssconf_autotest
+ ------------------------------------------------------- +
+ Test Suite : RSS Dynamic Configuration for Bonding Unit Test Suite
+ ------------------------------------------------------- +
+ TestCase [ 0] : test_setup succeeded
Device with port_id=2 already stopped
Device with port_id=3 already stopped
Device with port_id=4 already stopped
Device with port_id=5 already stopped
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 2: Operation not supported
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 3: Operation not supported
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 4: Operation not supported
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 5: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 2: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 3: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 4: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 5: Operation not supported
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
bond_ethdev_rss_hash_update(3145) - rss_key will be truncated
Port 2 must be stopped to allow reset
Port 2 must be stopped to allow reset
Port 3 must be stopped to allow reset
Port 4 must be stopped to allow reset
Port 5 must be stopped to allow reset
+ TestCase [ 1] : test_rss succeeded
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 2: Operation not supported
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 3: Operation not supported
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 4: Operation not supported
bond_ethdev_promiscuous_disable(2690) - Failed to disable promiscuous mode for
port 5: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 2: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 3: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 4: Operation not supported
bond_ethdev_allmulticast_disable(2836) - Failed to disable allmulti mode for
port 5: Operation not supported
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Multi-queue RSS mode isn't enabled.
Port 2 must be stopped to allow reset
Port 3 must be stopped to allow reset
Port 4 must be stopped to allow reset
Port 5 must be stopped to allow reset
+ TestCase [ 2] : test_rss_lazy succeeded
Device with port_id=6 already stopped
+ ------------------------------------------------------- +
+ Test Suite Summary : RSS Dynamic Configuration for Bonding Unit Test Suite
+ ------------------------------------------------------- +
+ Tests Total : 3
+ Tests Skipped : 0
+ Tests Executed : 3
+ Tests Unsupported: 0
+ Tests Passed : 3
+ Tests Failed : 0
+ ------------------------------------------------------- +
Test OK
RTE>>quit
[Regression]
Is this issue a regression: (Y/N)Y
Version the regression was introduced: Specify git id if known.
[Bad Commit]:
commit 93e1ea6dfa99dea359b8d66123576a395c2c0acd (HEAD, refs/bisect/bad)
Author: Huisong Li <lihuisong@huawei.com>
Date: Wed Apr 6 14:57:00 2022 +0800
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag
is not set in dev_configure, RSS will be not configured and enabled.
However, RSS hash and reta can still be configured by ethdev ops to
enable RSS if the flag isn't set. The behavior is inconsistent.
Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [relevance 4%]
* RE: [PATCH v4] doc: announce changes in bbdev related to enum extension
@ 2022-06-27 20:47 0% ` Chautru, Nicolas
2022-06-30 14:52 0% ` Chautru, Nicolas
0 siblings, 1 reply; 200+ results
From: Chautru, Nicolas @ 2022-06-27 20:47 UTC (permalink / raw)
To: dev, thomas
Cc: trix, Kinsella, Ray, Richardson, Bruce, hemant.agrawal,
david.marchand, stephen, Maxime Coquelin, gakhil
Hi Thomas,
Kind reminder on this one.
Thanks
Nic
> -----Original Message-----
> From: Chautru, Nicolas
> Sent: Friday, June 17, 2022 9:13 AM
> To: dev@dpdk.org; thomas@monjalon.net
> Cc: trix@redhat.com; Kinsella, Ray <ray.kinsella@intel.com>; Richardson,
> Bruce <bruce.richardson@intel.com>; hemant.agrawal@nxp.com;
> david.marchand@redhat.com; stephen@networkplumber.org; Maxime
> Coquelin <maxime.coquelin@redhat.com>; gakhil@marvell.com
> Subject: RE: [PATCH v4] doc: announce changes in bbdev related to enum
> extension
>
> Hi Thomas,
> Can this one be applied based on your review?
> Thanks
> Nic
>
> > -----Original Message-----
> > From: Maxime Coquelin <maxime.coquelin@redhat.com>
> > Sent: Thursday, June 9, 2022 12:54 AM
> > To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> > gakhil@marvell.com; thomas@monjalon.net
> > Cc: trix@redhat.com; Kinsella, Ray <ray.kinsella@intel.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>;
> > hemant.agrawal@nxp.com; david.marchand@redhat.com;
> > stephen@networkplumber.org
> > Subject: Re: [PATCH v4] doc: announce changes in bbdev related to enum
> > extension
> >
> > Hi Nicolas,
> >
> > On 6/9/22 02:34, Nicolas Chautru wrote:
> > > Intent to resolve in DPDK 22.11 historical usage which prevents
> > > graceful extension of enum and API without troublesome ABI breakage
> > > as well as extending API RTE_BBDEV_OP_FFT for new operation type in
> > > bbdev as well as other new members in existing structures.
> > >
> > > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > > ---
> > > doc/guides/rel_notes/deprecation.rst | 11 +++++++++++
> > > 1 file changed, 11 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index 4e5b23c..c8ab1ec 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -112,6 +112,17 @@ Deprecation Notices
> > > session and the private data of session. An opaque pointer can be
> exposed
> > > directly to application which can be attached to the ``rte_crypto_op``.
> > >
> > > +* bbdev: ``RTE_BBDEV_OP_TYPE_COUNT`` terminating the
> > > +``rte_bbdev_op_type``
> > > + enum will be deprecated and instead use fixed array size when
> > > +required to allow for
> > > + future enum extension.
> > > + Will extend API to support new operation type
> > > +``RTE_BBDEV_OP_FFT`` as per this
> > > + RFC https://patchwork.dpdk.org/project/dpdk/list/?series=22111
> > > + New members will be added in ``rte_bbdev_driver_info`` to expose
> > > +PMD queue topology inspired
> > > + by this RFC
> > > +https://patches.dpdk.org/project/dpdk/list/?series=22076
> > > + New member will be added in ``rte_bbdev_driver_info`` to expose
> > > +the device status as per
> > > + this RFC https://patches.dpdk.org/project/dpdk/list/?series=23367
> > > + This should be updated in DPDK 22.11.
> > > +
> > > * security: Hide structure ``rte_security_session`` and expose an opaque
> > > pointer for the private data to the application which can be attached
> > > to the packet while enqueuing.
> >
> > Thanks for rewording the notice.
> >
> > Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> >
> > Maxime
^ permalink raw reply [relevance 0%]
* [PATCH v3 0/7] bbdev changes for 22.11
@ 2022-06-28 1:35 4% ` Nicolas Chautru
2022-06-28 1:35 3% ` [PATCH v3 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
2022-07-06 0:23 4% ` [PATCH v4 0/7] bbdev changes for 22.11 Nicolas Chautru
` (3 subsequent siblings)
4 siblings, 1 reply; 200+ results
From: Nicolas Chautru @ 2022-06-28 1:35 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
v3: update to device status info to also use padded size for the related array.
Adding also 2 additionals commits to allow the API struc to expose more information related to queues
corner cases/warning as well as an optional rw lock.
Hemant, Maxime, this is planned for DPDK 21.11 but would like review/ack early is possible
to get this applied earlier and due to time off this summer.
Thanks
Nic
--
Hi,
Agregating together in a single serie a number of bbdev api changes previously submitted over the last few months and all targeted for 22.11 (4 different series detailed below). Related deprecation notice being pushed in 22.07 in parallel.
* bbdev: add device status info
* bbdev: add new operation for FFT processing
* bbdev: add device info on queue topology
* bbdev: allow operation type enum for growth
v2: Update to the RTE_BBDEV_COUNT removal based on feedback from Thomas/Stephen : rejecting out of range op type and adjusting the new name for the padded maximum value used for fixed size arrays.
---
Previous cover letters agregated below:
* bbdev: add device status info
https://patches.dpdk.org/project/dpdk/list/?series=23367
The updated structure will allow PMDs to expose through info_get what be may the status of the underlying accelerator, notably in case an HW error event having happened.
* bbdev: add new operation for FFT processing
https://patches.dpdk.org/project/dpdk/list/?series=22111
This contribution adds a new operation type to the existing ones already supported by the bbdev PMDs.
This set of operation is FFT-based processing for 5GNR baseband processing acceleration. This operates in the same lookaside fashion as other existing bbdev operation with a dedicated set of capabilities and parameters (marked as experimental).
I plan to also include a new PMD supporting this operation (and most of the related capabilities) in the next couple of months (either in 22.06 or 22.09) as well as extending the related bbdev-test.
* bbdev: add device info on queue topology
https://patches.dpdk.org/project/dpdk/list/?series=22076
Addressing an historical concern that the device info struct only
imperfectly captured what queues are available on the device
(number of operation and priority). This ended up being an iterative
process for application to find each queue could be configured.
ie. the gap was captured as technical debt previously in comments
/* This isn't ideal because it reports the maximum number of queues but
* does not provide info on how many can be uplink/downlink or different
* priorities
*/
This is now being exposed explictly based on the what the device actually
supports using the existing info_get api
* bbdev: allow operation type enum for growth
https://patches.dpdk.org/project/dpdk/list/?series=23509
This is related to the general intent to remove using MAX value for enums. There is consensus that we should avoid this for a while notably for future-proofed ABI concerns https://patches.dpdk.org/project/dpdk/patch/20200130142003.2645765-1-ferruh.yigit@intel.com/.
But still there is arguably not yet an explicit best recommendation to handle this especially when we actualy need to expose array whose index is such an enum.
As a specific example here I am refering to RTE_BBDEV_OP_TYPE_COUNT in enum rte_bbdev_op_type which is being extended for new operation type being support in bbdev (such as https://patches.dpdk.org/project/dpdk/patch/1646956157-245769-2-git-send-email-nicolas.chautru@intel.com/ adding new FFT operation)
There is also the intent to be able to expose information for each operation type through the bbdev api such as dynamically configured queues information per such operation type https://patches.dpdk.org/project/dpdk/patch/1646785355-168133-2-git-send-email-nicolas.chautru@intel.com/
Basically we are considering best way to accomodate for this, notably based on discussions with Ray Kinsella and Bruce Richardson, to handle such a case moving forward: specifically for the example with RTE_BBDEV_OP_TYPE_COUNT and also more generally.
One possible option is captured in that patchset and is basically based on the simple principle to allow for growth and prevent ABI breakage. Ie. the last value of the enum is set with a higher value than required so that to allow insertion of new enum outside of the major ABI versions.
In that case the RTE_BBDEV_OP_TYPE_COUNT is still present and can be exposed and used while still allowing for addition thanks to the implicit padding-like room. As an alternate variant, instead of using that last enum value, that extended size could be exposed as an #define outside of the enum but would be fundamentally the same (public).
Another option would be to avoid array alltogether and use each time this a new dedicated API function (operation type enum being an input argument instead of an index to an array in an existing structure so that to get access to structure related to a given operation type enum) but that is arguably not well scalable within DPDK to use such a scheme for each enums and keep an uncluttered and clean API. In that very example that would be very odd indeed not to get this simply from info_get().
Some pros and cons, arguably the simple option in that patchset is a valid compromise option and a step in the right direction but we would like to know your view wrt best recommendation, or any other thought.
Nicolas Chautru (7):
bbdev: allow operation type enum for growth
bbdev: add device status info
bbdev: add device info on queue topology
drivers/baseband: update PMDs to expose queue per operation
bbdev: add new operation for FFT processing
bbdev: add queue related warning and status information
bbdev: add a lock option for enqueue/dequeue operation
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 6 +-
doc/guides/prog_guide/bbdev.rst | 130 ++++++++++++++++++
drivers/baseband/acc100/rte_acc100_pmd.c | 30 ++--
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 9 ++
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 9 ++
drivers/baseband/la12xx/bbdev_la12xx.c | 10 +-
drivers/baseband/null/bbdev_null.c | 1 +
drivers/baseband/turbo_sw/bbdev_turbo_software.c | 12 ++
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 42 +++++-
lib/bbdev/rte_bbdev.h | 136 ++++++++++++++++++-
lib/bbdev/rte_bbdev_op.h | 151 ++++++++++++++++++++-
lib/bbdev/version.map | 10 ++
14 files changed, 527 insertions(+), 23 deletions(-)
--
1.8.3.1
^ permalink raw reply [relevance 4%]
* [PATCH v3 1/7] bbdev: allow operation type enum for growth
2022-06-28 1:35 4% ` [PATCH v3 0/7] bbdev changes for 22.11 Nicolas Chautru
@ 2022-06-28 1:35 3% ` Nicolas Chautru
0 siblings, 0 replies; 200+ results
From: Nicolas Chautru @ 2022-06-28 1:35 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
Updating the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_PADDED_MAX.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 4 ++--
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 9 +++++----
lib/bbdev/rte_bbdev_op.h | 2 +-
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index ac06d73..1063f6e 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
rte_mempool_free(mp);
TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
- RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) == NULL,
+ RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size, 0)) == NULL,
"Failed test for rte_bbdev_op_pool_create: "
"returned value is not NULL for invalid type");
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index fad3b1e..1abda2d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct active_device *ad,
/* Find capabilities */
const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
- for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
+ do {
if (cap->type == test_vector.op_type) {
capabilities = cap;
break;
}
cap++;
- }
+ } while (cap->type != RTE_BBDEV_OP_NONE);
TEST_ASSERT_NOT_NULL(capabilities,
"Couldn't find capabilities");
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8..ef0ba76 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
void *sigret;
struct app_config_params app_params = def_app_config;
struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool;
- struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
+ struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
struct stats_lcore_params stats_lcore;
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index aaee7b7..22bd894 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -23,6 +23,8 @@
#define DEV_NAME "BBDEV"
+/* Number of supported operation types */
+#define BBDEV_OP_TYPE_COUNT 5
/* BBDev library logging ID */
RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
@@ -890,10 +892,10 @@ struct rte_mempool *
return NULL;
}
- if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
+ if (type >= BBDEV_OP_TYPE_COUNT) {
rte_bbdev_log(ERR,
"Invalid op type (%u), should be less than %u",
- type, RTE_BBDEV_OP_TYPE_COUNT);
+ type, BBDEV_OP_TYPE_COUNT);
return NULL;
}
@@ -1122,10 +1124,9 @@ struct rte_mempool *
"RTE_BBDEV_OP_TURBO_DEC",
"RTE_BBDEV_OP_TURBO_ENC",
"RTE_BBDEV_OP_LDPC_DEC",
- "RTE_BBDEV_OP_LDPC_ENC",
};
- if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
+ if (op_type < BBDEV_OP_TYPE_COUNT)
return op_types[op_type];
rte_bbdev_log(ERR, "Invalid operation type");
diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h
index 6d56133..cd82418 100644
--- a/lib/bbdev/rte_bbdev_op.h
+++ b/lib/bbdev/rte_bbdev_op.h
@@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
- RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
+ RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type number including padding */
};
/** Bit indexes of possible errors reported through status field */
--
1.8.3.1
^ permalink raw reply [relevance 3%]
* [RFC PATCH 00/11] Bus cleanup for 22.11
@ 2022-06-28 14:46 2% David Marchand
2022-06-28 14:46 1% ` [RFC PATCH 11/11] bus: hide bus object David Marchand
` (5 more replies)
0 siblings, 6 replies; 200+ results
From: David Marchand @ 2022-06-28 14:46 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, kevin.laatz
This is a PoC for hiding the rte_bus object and mark associated API
as internal.
A good amount of the patches are preparation work on rte_bus.h,
rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
between them. This is something I had in store for some time, maybe I
should have dropped it from the PoC, but I think those cleanups are
worth it in any case.
The last two patches do the actual job: add accessors and make the
rte_bus object opaque to non internal users.
Disclaimer: this series is a bit rushed (I brute forced compilation
tests in GHA so that it passes between patches, but there still may be
something broken...).
Not surprisingly, the ABI check in the CI is expected to fail.
Comments welcome.
I also hope we can do the same work on other generic objects
(rte_driver, rte_device), but this is another story.
--
David Marchand
David Marchand (11):
common/mlx5: rework check on driver registration
raw/ifpga: remove PCI bus accessor
dev: hide debug messages in device iterator
dev: move unrelated macros from header
devargs: remove dependency on bus header
bus: remove unneded inclusion of bus header
bus: move IOVA definition from header
drivers/bus: remove back reference to bus objects
drivers/bus: hide specific structures
bus: introduce accessors
bus: hide bus object
app/test-compress-perf/comp_perf_options.h | 2 +
app/test-pmd/config.c | 10 +-
app/test-pmd/testpmd.c | 4 +-
app/test-pmd/testpmd.h | 5 +-
app/test/test_devargs.c | 6 +-
app/test/test_kni.c | 7 +-
app/test/test_vdev.c | 1 +
drivers/bus/auxiliary/auxiliary_common.c | 2 -
drivers/bus/auxiliary/linux/auxiliary.c | 1 -
drivers/bus/auxiliary/private.h | 30 +-
drivers/bus/auxiliary/rte_bus_auxiliary.h | 5 -
drivers/bus/dpaa/dpaa_bus.c | 20 +-
drivers/bus/dpaa/rte_dpaa_bus.h | 14 -
drivers/bus/fslmc/fslmc_bus.c | 11 +-
drivers/bus/fslmc/fslmc_vfio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 1 +
drivers/bus/fslmc/private.h | 27 ++
drivers/bus/fslmc/rte_fslmc.h | 21 --
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/ifpga/ifpga_common.c | 1 -
drivers/bus/ifpga/rte_bus_ifpga.h | 1 -
drivers/bus/pci/bsd/pci.c | 2 -
drivers/bus/pci/linux/pci.c | 3 -
drivers/bus/pci/pci_common.c | 2 -
drivers/bus/pci/private.h | 18 +-
drivers/bus/pci/rte_bus_pci.h | 23 --
drivers/bus/pci/windows/pci.c | 1 +
drivers/bus/pci/windows/pci_netuio.c | 1 +
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vdev/vdev_params.c | 1 -
drivers/bus/vmbus/linux/vmbus_uio.c | 1 -
drivers/bus/vmbus/private.h | 18 ++
drivers/bus/vmbus/rte_bus_vmbus.h | 21 --
drivers/bus/vmbus/vmbus_bufring.c | 1 -
drivers/bus/vmbus/vmbus_channel.c | 1 -
drivers/bus/vmbus/vmbus_common.c | 3 -
drivers/bus/vmbus/vmbus_common_uio.c | 1 -
.../common/mlx5/linux/mlx5_common_auxiliary.c | 10 +-
drivers/common/mlx5/mlx5_common_pci.c | 3 +-
drivers/common/qat/qat_device.c | 1 +
drivers/compress/qat/qat_comp_pmd.c | 1 +
drivers/compress/zlib/zlib_pmd_ops.c | 1 +
.../scheduler/rte_cryptodev_scheduler.c | 1 +
drivers/crypto/virtio/virtio_pci.c | 1 -
drivers/dma/cnxk/cnxk_dmadev.c | 1 -
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 1 +
drivers/net/failsafe/failsafe.c | 3 +-
drivers/net/failsafe/failsafe_eal.c | 3 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 1 +
drivers/net/liquidio/lio_ethdev.c | 1 +
drivers/net/mlx5/linux/mlx5_os.c | 3 +-
drivers/net/netvsc/hn_ethdev.c | 5 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/raw/ifpga/ifpga_rawdev.c | 7 +-
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 6 -
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 -
drivers/raw/ifpga/version.map | 1 -
examples/ethtool/lib/rte_ethtool.c | 4 +-
examples/ip_pipeline/kni.c | 3 +-
examples/multi_process/hotplug_mp/commands.c | 6 +-
lib/compressdev/rte_compressdev.c | 2 +
lib/compressdev/rte_compressdev_pmd.c | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +
lib/dmadev/rte_dmadev.c | 1 +
lib/eal/common/eal_common_bus.c | 28 +-
lib/eal/common/eal_common_dev.c | 15 +-
lib/eal/common/eal_common_devargs.c | 14 +-
lib/eal/common/eal_thread.h | 1 +
lib/eal/common/hotplug_mp.c | 9 +-
lib/eal/include/bus_driver.h | 295 ++++++++++++++++++
lib/eal/include/meson.build | 4 +
lib/eal/include/rte_bus.h | 290 +----------------
lib/eal/include/rte_common.h | 11 +
lib/eal/include/rte_dev.h | 11 -
lib/eal/include/rte_devargs.h | 4 +-
lib/eal/include/rte_eal.h | 15 +-
lib/eal/include/rte_lcore.h | 2 +
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 7 +-
lib/eal/windows/eal.c | 1 +
lib/ethdev/ethdev_driver.c | 1 +
lib/ethdev/ethdev_pci.h | 1 +
lib/ethdev/rte_ethdev.c | 11 +-
lib/mempool/rte_mempool_ops.c | 1 +
lib/pcapng/rte_pcapng.c | 3 +-
lib/regexdev/rte_regexdev.c | 1 +
lib/security/rte_security.c | 1 +
lib/vhost/vdpa.c | 1 +
90 files changed, 554 insertions(+), 531 deletions(-)
create mode 100644 drivers/bus/fslmc/private.h
create mode 100644 lib/eal/include/bus_driver.h
--
2.36.1
^ permalink raw reply [relevance 2%]
* [RFC PATCH 11/11] bus: hide bus object
2022-06-28 14:46 2% [RFC PATCH 00/11] Bus cleanup for 22.11 David Marchand
@ 2022-06-28 14:46 1% ` David Marchand
2022-06-28 16:22 3% ` Tyler Retzlaff
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
` (4 subsequent siblings)
5 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-06-28 14:46 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, kevin.laatz, Parav Pandit, Xueming Li,
Hemant Agrawal, Sachin Saxena, Rosen Xu, Stephen Hemminger,
Long Li, Chas Williams, Min Hu (Connor),
Matan Azrad, Ray Kinsella, Ferruh Yigit, Andrew Rybchenko
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_devargs.c | 2 +-
app/test/test_vdev.c | 2 +-
drivers/bus/auxiliary/private.h | 2 +-
drivers/bus/dpaa/dpaa_bus.c | 2 +-
drivers/bus/fslmc/private.h | 2 +-
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/pci/private.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vmbus/private.h | 2 +-
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
lib/eal/common/eal_common_bus.c | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/hotplug_mp.c | 2 +-
lib/eal/include/bus_driver.h | 295 ++++++++++++++++++++++++
lib/eal/include/meson.build | 4 +
lib/eal/include/rte_bus.h | 275 +---------------------
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 4 +-
lib/ethdev/rte_ethdev.c | 2 +-
22 files changed, 322 insertions(+), 292 deletions(-)
create mode 100644 lib/eal/include/bus_driver.h
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index ac5bc34c18..0a4c34a1ad 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -9,7 +9,7 @@
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include "test.h"
diff --git a/app/test/test_vdev.c b/app/test/test_vdev.c
index 5eeff3106d..1904e76e44 100644
--- a/app/test/test_vdev.c
+++ b/app/test/test_vdev.c
@@ -8,7 +8,7 @@
#include <rte_common.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_vdev.h>
#include "test.h"
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index 06a920114c..7e8ae8c2f9 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "rte_bus_auxiliary.h"
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index ad4ea156a6..4f12944470 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -29,7 +29,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_ring.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_mbuf_pool_ops.h>
#include <rte_mbuf_dyn.h>
diff --git a/drivers/bus/fslmc/private.h b/drivers/bus/fslmc/private.h
index 80d4673ca8..f08dc7716b 100644
--- a/drivers/bus/fslmc/private.h
+++ b/drivers/bus/fslmc/private.h
@@ -5,7 +5,7 @@
#ifndef __PRIVATE_H__
#define __PRIVATE_H__
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_fslmc.h>
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index e005f2cb70..a2c2f13cf7 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <rte_errno.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_memzone.h>
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 6ccec15655..0cefed5edf 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -8,7 +8,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_os_shim.h>
#include <rte_pci.h>
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index a8d8b2327e..dd4e931687 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -12,7 +12,7 @@
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_memory.h>
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index 732cb6d583..5205e17a3f 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <sys/uio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_eal_paging.h>
#include <rte_vmbus_reg.h>
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 13cb967f6d..e30dcfc281 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -8,7 +8,7 @@
#include <sys/mman.h>
#include <libgen.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index b90757756a..f461bf9207 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -4,7 +4,7 @@
#include <rte_devargs.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 2587195168..24edf9f3c4 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_dev.h>
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index cbf382f967..be64d31b0f 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_debug.h>
#include <rte_string_fns.h>
#include <rte_errno.h>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index bbaf518570..a366bb3689 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c
index fa95c52708..adccfa713f 100644
--- a/lib/eal/common/eal_common_devargs.c
+++ b/lib/eal/common/eal_common_devargs.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <stdarg.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index 252f147b6f..9e6eddec92 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -3,7 +3,7 @@
*/
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_eal.h>
#include <rte_errno.h>
#include <rte_alarm.h>
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
new file mode 100644
index 0000000000..ac404c3d5e
--- /dev/null
+++ b/lib/eal/include/bus_driver.h
@@ -0,0 +1,295 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef BUS_DRIVER_H
+#define BUS_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bus.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
+#include <rte_eal.h>
+#include <rte_tailq.h>
+
+struct rte_device;
+
+/** Double linked list of buses */
+RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
+
+/**
+ * Bus specific scan for devices attached on the bus.
+ * For each bus object, the scan would be responsible for finding devices and
+ * adding them to its private device list.
+ *
+ * A bus should mandatorily implement this method.
+ *
+ * @return
+ * 0 for successful scan
+ * <0 for unsuccessful scan with error value
+ */
+typedef int (*rte_bus_scan_t)(void);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * This is called while iterating over each registered bus.
+ *
+ * @return
+ * 0 for successful probe
+ * !0 for any error while probing
+ */
+typedef int (*rte_bus_probe_t)(void);
+
+/**
+ * Device iterator to find a device on a bus.
+ *
+ * This function returns an rte_device if one of those held by the bus
+ * matches the data passed as parameter.
+ *
+ * If the comparison function returns zero this function should stop iterating
+ * over any more devices. To continue a search the device of a previous search
+ * can be passed via the start parameter.
+ *
+ * @param cmp
+ * Comparison function.
+ *
+ * @param data
+ * Data to compare each device against.
+ *
+ * @param start
+ * starting point for the iteration
+ *
+ * @return
+ * The first device matching the data, NULL if none exists.
+ */
+typedef struct rte_device *
+(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
+ const void *data);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_plug_t)(struct rte_device *dev);
+
+/**
+ * Implementation specific remove function which is responsible for unlinking
+ * devices on that bus from assigned driver.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
+
+/**
+ * Bus specific parsing function.
+ * Validates the syntax used in the textual representation of a device,
+ * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
+ * device representation to ``addr``.
+ *
+ * @param[in] name
+ * device textual description
+ *
+ * @param[out] addr
+ * device information location address, into which parsed info
+ * should be written. If NULL, nothing should be written, which
+ * is not an error.
+ *
+ * @return
+ * 0 if parsing was successful.
+ * !0 for any error.
+ */
+typedef int (*rte_bus_parse_t)(const char *name, void *addr);
+
+/**
+ * Parse bus part of the device arguments.
+ *
+ * The field name of the struct rte_devargs will be set.
+ *
+ * @param da
+ * Pointer to the devargs to parse.
+ *
+ * @return
+ * 0 on successful parsing, otherwise rte_errno is set.
+ * -EINVAL: on parsing error.
+ * -ENODEV: if no key matching a device argument is specified.
+ * -E2BIG: device name is too long.
+ */
+typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
+
+/**
+ * Device level DMA map function.
+ * After a successful call, the memory segment will be mapped to the
+ * given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to map.
+ * @param iova
+ * IOVA address to map.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Device level DMA unmap function.
+ * After a successful call, the memory segment will no longer be
+ * accessible by the given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to unmap.
+ * @param iova
+ * IOVA address to unmap.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if un-mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Implement a specific hot-unplug handler, which is responsible for
+ * handle the failure when device be hot-unplugged. When the event of
+ * hot-unplug be detected, it could call this function to handle
+ * the hot-unplug failure and avoid app crash.
+ * @param dev
+ * Pointer of the device structure.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
+
+/**
+ * Implement a specific sigbus handler, which is responsible for handling
+ * the sigbus error which is either original memory error, or specific memory
+ * error that caused of device be hot-unplugged. When sigbus error be captured,
+ * it could call this function to handle sigbus error.
+ * @param failure_addr
+ * Pointer of the fault address of the sigbus error.
+ *
+ * @return
+ * 0 for success handle the sigbus for hot-unplug.
+ * 1 for not process it, because it is a generic sigbus error.
+ * -1 for failed to handle the sigbus for hot-unplug.
+ */
+typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
+
+/**
+ * Bus scan policies
+ */
+enum rte_bus_scan_mode {
+ RTE_BUS_SCAN_UNDEFINED,
+ RTE_BUS_SCAN_ALLOWLIST,
+ RTE_BUS_SCAN_BLOCKLIST,
+};
+
+/**
+ * A structure used to configure bus operations.
+ */
+struct rte_bus_conf {
+ enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
+};
+
+
+/**
+ * Get common iommu class of the all the devices on the bus. The bus may
+ * check that those devices are attached to iommu driver.
+ * If no devices are attached to the bus. The bus may return with don't care
+ * (_DC) value.
+ * Otherwise, The bus will return appropriate _pa or _va iova mode.
+ *
+ * @return
+ * enum rte_iova_mode value.
+ */
+typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
+
+/**
+ * A structure describing a generic bus.
+ */
+struct rte_bus {
+ RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
+ const char *name; /**< Name of the bus */
+ rte_bus_scan_t scan; /**< Scan for devices attached to bus */
+ rte_bus_probe_t probe; /**< Probe devices on bus */
+ rte_bus_find_device_t find_device; /**< Find a device on the bus */
+ rte_bus_plug_t plug; /**< Probe single device for drivers */
+ rte_bus_unplug_t unplug; /**< Remove single device from driver */
+ rte_bus_parse_t parse; /**< Parse a device name */
+ rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
+ rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
+ rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
+ struct rte_bus_conf conf; /**< Bus configuration */
+ rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
+ rte_dev_iterate_t dev_iterate; /**< Device iterator. */
+ rte_bus_hot_unplug_handler_t hot_unplug_handler;
+ /**< handle hot-unplug failure on the bus */
+ rte_bus_sigbus_handler_t sigbus_handler;
+ /**< handle sigbus error on the bus */
+};
+
+/**
+ * Register a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be registered.
+ */
+__rte_internal
+void rte_bus_register(struct rte_bus *bus);
+
+/**
+ * Helper for Bus registration.
+ * The constructor has higher priority than PMD constructors.
+ */
+#define RTE_REGISTER_BUS(nm, bus) \
+RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
+{\
+ (bus).name = RTE_STR(nm);\
+ rte_bus_register(&bus); \
+}
+
+/**
+ * Unregister a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be unregistered.
+ */
+__rte_internal
+void rte_bus_unregister(struct rte_bus *bus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BUS_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index fd6e844224..77d8621a51 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -55,6 +55,10 @@ headers += files(
'rte_vfio.h',
)
+driver_sdk_headers = files(
+ 'bus_driver.h',
+)
+
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'generic/rte_atomic.h',
diff --git a/lib/eal/include/rte_bus.h b/lib/eal/include/rte_bus.h
index 9b70f2f7b2..1b08407e53 100644
--- a/lib/eal/include/rte_bus.h
+++ b/lib/eal/include/rte_bus.h
@@ -20,251 +20,11 @@ extern "C" {
#include <stdio.h>
-#include <rte_dev.h>
+#include <rte_compat.h>
#include <rte_eal.h>
-#include <rte_log.h>
-/** Double linked list of buses */
-RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
-
-/**
- * Bus specific scan for devices attached on the bus.
- * For each bus object, the scan would be responsible for finding devices and
- * adding them to its private device list.
- *
- * A bus should mandatorily implement this method.
- *
- * @return
- * 0 for successful scan
- * <0 for unsuccessful scan with error value
- */
-typedef int (*rte_bus_scan_t)(void);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * This is called while iterating over each registered bus.
- *
- * @return
- * 0 for successful probe
- * !0 for any error while probing
- */
-typedef int (*rte_bus_probe_t)(void);
-
-/**
- * Device iterator to find a device on a bus.
- *
- * This function returns an rte_device if one of those held by the bus
- * matches the data passed as parameter.
- *
- * If the comparison function returns zero this function should stop iterating
- * over any more devices. To continue a search the device of a previous search
- * can be passed via the start parameter.
- *
- * @param cmp
- * Comparison function.
- *
- * @param data
- * Data to compare each device against.
- *
- * @param start
- * starting point for the iteration
- *
- * @return
- * The first device matching the data, NULL if none exists.
- */
-typedef struct rte_device *
-(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
- const void *data);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_plug_t)(struct rte_device *dev);
-
-/**
- * Implementation specific remove function which is responsible for unlinking
- * devices on that bus from assigned driver.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
-
-/**
- * Bus specific parsing function.
- * Validates the syntax used in the textual representation of a device,
- * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
- * device representation to ``addr``.
- *
- * @param[in] name
- * device textual description
- *
- * @param[out] addr
- * device information location address, into which parsed info
- * should be written. If NULL, nothing should be written, which
- * is not an error.
- *
- * @return
- * 0 if parsing was successful.
- * !0 for any error.
- */
-typedef int (*rte_bus_parse_t)(const char *name, void *addr);
-
-/**
- * Parse bus part of the device arguments.
- *
- * The field name of the struct rte_devargs will be set.
- *
- * @param da
- * Pointer to the devargs to parse.
- *
- * @return
- * 0 on successful parsing, otherwise rte_errno is set.
- * -EINVAL: on parsing error.
- * -ENODEV: if no key matching a device argument is specified.
- * -E2BIG: device name is too long.
- */
-typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
-
-/**
- * Device level DMA map function.
- * After a successful call, the memory segment will be mapped to the
- * given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to map.
- * @param iova
- * IOVA address to map.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Device level DMA unmap function.
- * After a successful call, the memory segment will no longer be
- * accessible by the given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to unmap.
- * @param iova
- * IOVA address to unmap.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if un-mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Implement a specific hot-unplug handler, which is responsible for
- * handle the failure when device be hot-unplugged. When the event of
- * hot-unplug be detected, it could call this function to handle
- * the hot-unplug failure and avoid app crash.
- * @param dev
- * Pointer of the device structure.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
-
-/**
- * Implement a specific sigbus handler, which is responsible for handling
- * the sigbus error which is either original memory error, or specific memory
- * error that caused of device be hot-unplugged. When sigbus error be captured,
- * it could call this function to handle sigbus error.
- * @param failure_addr
- * Pointer of the fault address of the sigbus error.
- *
- * @return
- * 0 for success handle the sigbus for hot-unplug.
- * 1 for not process it, because it is a generic sigbus error.
- * -1 for failed to handle the sigbus for hot-unplug.
- */
-typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
-
-/**
- * Bus scan policies
- */
-enum rte_bus_scan_mode {
- RTE_BUS_SCAN_UNDEFINED,
- RTE_BUS_SCAN_ALLOWLIST,
- RTE_BUS_SCAN_BLOCKLIST,
-};
-
-/**
- * A structure used to configure bus operations.
- */
-struct rte_bus_conf {
- enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
-};
-
-
-/**
- * Get common iommu class of the all the devices on the bus. The bus may
- * check that those devices are attached to iommu driver.
- * If no devices are attached to the bus. The bus may return with don't care
- * (_DC) value.
- * Otherwise, The bus will return appropriate _pa or _va iova mode.
- *
- * @return
- * enum rte_iova_mode value.
- */
-typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
-
-
-/**
- * A structure describing a generic bus.
- */
-struct rte_bus {
- RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
- const char *name; /**< Name of the bus */
- rte_bus_scan_t scan; /**< Scan for devices attached to bus */
- rte_bus_probe_t probe; /**< Probe devices on bus */
- rte_bus_find_device_t find_device; /**< Find a device on the bus */
- rte_bus_plug_t plug; /**< Probe single device for drivers */
- rte_bus_unplug_t unplug; /**< Remove single device from driver */
- rte_bus_parse_t parse; /**< Parse a device name */
- rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
- rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
- rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
- struct rte_bus_conf conf; /**< Bus configuration */
- rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
- rte_dev_iterate_t dev_iterate; /**< Device iterator. */
- rte_bus_hot_unplug_handler_t hot_unplug_handler;
- /**< handle hot-unplug failure on the bus */
- rte_bus_sigbus_handler_t sigbus_handler;
- /**< handle sigbus error on the bus */
-
-};
+struct rte_bus;
+struct rte_device;
/**
* @warning
@@ -279,24 +39,6 @@ struct rte_bus {
__rte_experimental
const char *rte_bus_name(const struct rte_bus *bus);
-/**
- * Register a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be registered.
- */
-void rte_bus_register(struct rte_bus *bus);
-
-/**
- * Unregister a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be unregistered.
- */
-void rte_bus_unregister(struct rte_bus *bus);
-
/**
* Scan all the buses.
*
@@ -386,17 +128,6 @@ struct rte_bus *rte_bus_find_by_name(const char *busname);
*/
enum rte_iova_mode rte_bus_get_iommu_class(void);
-/**
- * Helper for Bus registration.
- * The constructor has higher priority than PMD constructors.
- */
-#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
-{\
- (bus).name = RTE_STR(nm);\
- rte_bus_register(&bus); \
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 02ae1cde29..098a2c3076 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -13,7 +13,7 @@
#include <rte_dev.h>
#include <rte_interrupts.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_errno.h>
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 6f713c987d..48c8a2f511 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -13,9 +13,7 @@ DPDK_22 {
rte_bus_find_by_name;
rte_bus_get_iommu_class;
rte_bus_probe;
- rte_bus_register;
rte_bus_scan;
- rte_bus_unregister;
rte_calloc;
rte_calloc_socket;
rte_cpu_get_flag_enabled;
@@ -432,6 +430,8 @@ EXPERIMENTAL {
INTERNAL {
global:
+ rte_bus_register;
+ rte_bus_unregister;
rte_eal_get_baseaddr;
rte_firmware_read;
rte_intr_allow_others;
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index c94d6573d5..6679bd8276 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_interrupts.h>
#include <rte_memcpy.h>
--
2.36.1
^ permalink raw reply [relevance 1%]
* Re: [RFC PATCH 11/11] bus: hide bus object
2022-06-28 14:46 1% ` [RFC PATCH 11/11] bus: hide bus object David Marchand
@ 2022-06-28 16:22 3% ` Tyler Retzlaff
2022-06-28 16:29 0% ` Stephen Hemminger
0 siblings, 1 reply; 200+ results
From: Tyler Retzlaff @ 2022-06-28 16:22 UTC (permalink / raw)
To: David Marchand
Cc: dev, thomas, bruce.richardson, kevin.laatz, Parav Pandit,
Xueming Li, Hemant Agrawal, Sachin Saxena, Rosen Xu,
Stephen Hemminger, Long Li, Chas Williams, Min Hu (Connor),
Matan Azrad, Ray Kinsella, Ferruh Yigit, Andrew Rybchenko
On Tue, Jun 28, 2022 at 04:46:43PM +0200, David Marchand wrote:
> Make rte_bus opaque for non internal users.
> This will make extending this object possible without breaking the ABI.
>
> Introduce a new driver header and move rte_bus definition and helpers.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
... snip ...
> -struct rte_bus {
> - RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> - const char *name; /**< Name of the bus */
> - rte_bus_scan_t scan; /**< Scan for devices attached to bus */
> - rte_bus_probe_t probe; /**< Probe devices on bus */
> - rte_bus_find_device_t find_device; /**< Find a device on the bus */
> - rte_bus_plug_t plug; /**< Probe single device for drivers */
> - rte_bus_unplug_t unplug; /**< Remove single device from driver */
> - rte_bus_parse_t parse; /**< Parse a device name */
> - rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
> - rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
> - rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
> - struct rte_bus_conf conf; /**< Bus configuration */
> - rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
> - rte_dev_iterate_t dev_iterate; /**< Device iterator. */
> - rte_bus_hot_unplug_handler_t hot_unplug_handler;
> - /**< handle hot-unplug failure on the bus */
> - rte_bus_sigbus_handler_t sigbus_handler;
> - /**< handle sigbus error on the bus */
> -
> -};
since we're overhauling anyway we could follow suit with a number of the
lessons from posix apis e.g. pthread and eliminate typed pointers for a
little extra value.
> +struct rte_bus;
> +struct rte_device;
to avoid people tripping over mishandling pointers in/out of the api
surface taking the opaque object you could declare opaque handle for the
api to operate on instead. it would force the use of a cast in the
implementation but would avoid accidental void * of the wrong thing that
got cached being passed in. if the cast was really undesirable just
whack it under an inline / internal function.
e.g. make the opaque object an explicit type.
struct {
uintptr_t opaque;
} rte_bus_handle_t;
// implementation
rte_bus_handle_t
rte_bus_find(rte_bus_handle_t start,
rte_bus_cmp_t cmp, const void *data)
{
struct rte_bus *bus = (struct rte_bus *)start.opaque;
// do bus things on bus
return {.opaque = whatever};
}
then you will get hard compile time failure if someone messes up
argument passing.
e.g.
void *somerandomp = ...;
...
rte_bus_find(somerandomp, ...); // compile fail
i would actually suggest this wrapping in a struct / handle approach for
any opaque object that is passed over the api surface. the change is
bigger of course...
it has various other advantages when/if we decide to make the bus/driver
surface stable in abi which i understand is not a promise dpdk makes
right now but still we might one day.
anyway, just a suggestion. i like the series either way.
^ permalink raw reply [relevance 3%]
* Re: [RFC PATCH 11/11] bus: hide bus object
2022-06-28 16:22 3% ` Tyler Retzlaff
@ 2022-06-28 16:29 0% ` Stephen Hemminger
2022-06-28 17:07 0% ` Tyler Retzlaff
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-06-28 16:29 UTC (permalink / raw)
To: Tyler Retzlaff
Cc: David Marchand, dev, thomas, bruce.richardson, kevin.laatz,
Parav Pandit, Xueming Li, Hemant Agrawal, Sachin Saxena,
Rosen Xu, Stephen Hemminger, Long Li, Chas Williams,
Min Hu (Connor),
Matan Azrad, Ray Kinsella, Ferruh Yigit, Andrew Rybchenko
On Tue, 28 Jun 2022 09:22:13 -0700
Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:
> On Tue, Jun 28, 2022 at 04:46:43PM +0200, David Marchand wrote:
> > Make rte_bus opaque for non internal users.
> > This will make extending this object possible without breaking the ABI.
> >
> > Introduce a new driver header and move rte_bus definition and helpers.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
>
> ... snip ...
>
> > -struct rte_bus {
> > - RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> > - const char *name; /**< Name of the bus */
> > - rte_bus_scan_t scan; /**< Scan for devices attached to bus */
> > - rte_bus_probe_t probe; /**< Probe devices on bus */
> > - rte_bus_find_device_t find_device; /**< Find a device on the bus */
> > - rte_bus_plug_t plug; /**< Probe single device for drivers */
> > - rte_bus_unplug_t unplug; /**< Remove single device from driver */
> > - rte_bus_parse_t parse; /**< Parse a device name */
> > - rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
> > - rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
> > - rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
> > - struct rte_bus_conf conf; /**< Bus configuration */
> > - rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
> > - rte_dev_iterate_t dev_iterate; /**< Device iterator. */
> > - rte_bus_hot_unplug_handler_t hot_unplug_handler;
> > - /**< handle hot-unplug failure on the bus */
> > - rte_bus_sigbus_handler_t sigbus_handler;
> > - /**< handle sigbus error on the bus */
> > -
> > -};
>
> since we're overhauling anyway we could follow suit with a number of the
> lessons from posix apis e.g. pthread and eliminate typed pointers for a
> little extra value.
>
> > +struct rte_bus;
> > +struct rte_device;
>
> to avoid people tripping over mishandling pointers in/out of the api
> surface taking the opaque object you could declare opaque handle for the
> api to operate on instead. it would force the use of a cast in the
> implementation but would avoid accidental void * of the wrong thing that
> got cached being passed in. if the cast was really undesirable just
> whack it under an inline / internal function.
I don't like that because it least to dangerous casts in the internal code.
Better to keep the the type of the object. As long as the API only passes
around an pointer to a struct, without exposing the contents of the struct;
it is safer and easier to debug.
^ permalink raw reply [relevance 0%]
* Re: [RFC PATCH 11/11] bus: hide bus object
2022-06-28 16:29 0% ` Stephen Hemminger
@ 2022-06-28 17:07 0% ` Tyler Retzlaff
0 siblings, 0 replies; 200+ results
From: Tyler Retzlaff @ 2022-06-28 17:07 UTC (permalink / raw)
To: Stephen Hemminger
Cc: David Marchand, dev, thomas, bruce.richardson, kevin.laatz,
Parav Pandit, Xueming Li, Hemant Agrawal, Sachin Saxena,
Rosen Xu, Stephen Hemminger, Long Li, Chas Williams,
Min Hu (Connor),
Matan Azrad, Ray Kinsella, Ferruh Yigit, Andrew Rybchenko
On Tue, Jun 28, 2022 at 09:29:05AM -0700, Stephen Hemminger wrote:
> On Tue, 28 Jun 2022 09:22:13 -0700
> Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:
>
> > On Tue, Jun 28, 2022 at 04:46:43PM +0200, David Marchand wrote:
> > > Make rte_bus opaque for non internal users.
> > > This will make extending this object possible without breaking the ABI.
> > >
> > > Introduce a new driver header and move rte_bus definition and helpers.
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> >
> > ... snip ...
> >
> > > -struct rte_bus {
> > > - RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> > > - const char *name; /**< Name of the bus */
> > > - rte_bus_scan_t scan; /**< Scan for devices attached to bus */
> > > - rte_bus_probe_t probe; /**< Probe devices on bus */
> > > - rte_bus_find_device_t find_device; /**< Find a device on the bus */
> > > - rte_bus_plug_t plug; /**< Probe single device for drivers */
> > > - rte_bus_unplug_t unplug; /**< Remove single device from driver */
> > > - rte_bus_parse_t parse; /**< Parse a device name */
> > > - rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
> > > - rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
> > > - rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
> > > - struct rte_bus_conf conf; /**< Bus configuration */
> > > - rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
> > > - rte_dev_iterate_t dev_iterate; /**< Device iterator. */
> > > - rte_bus_hot_unplug_handler_t hot_unplug_handler;
> > > - /**< handle hot-unplug failure on the bus */
> > > - rte_bus_sigbus_handler_t sigbus_handler;
> > > - /**< handle sigbus error on the bus */
> > > -
> > > -};
> >
> > since we're overhauling anyway we could follow suit with a number of the
> > lessons from posix apis e.g. pthread and eliminate typed pointers for a
> > little extra value.
> >
> > > +struct rte_bus;
> > > +struct rte_device;
> >
> > to avoid people tripping over mishandling pointers in/out of the api
> > surface taking the opaque object you could declare opaque handle for the
> > api to operate on instead. it would force the use of a cast in the
> > implementation but would avoid accidental void * of the wrong thing that
> > got cached being passed in. if the cast was really undesirable just
> > whack it under an inline / internal function.
>
> I don't like that because it least to dangerous casts in the internal code.
> Better to keep the the type of the object. As long as the API only passes
> around an pointer to a struct, without exposing the contents of the struct;
> it is safer and easier to debug.
as i mentioned you can use an inline/internal function or even a macro
to hide the cast, you could provide some additional integrity checks
here if desired as a value add.
the fact that you expose that it is a struct is an internal
implementation detail, if truly opaque tomorrow you could convert it
to a simple integer that indexes or enumerates something and prevents
any meaningful interpretation in the application.
when you say it is safer to debug i think you mean for dpdk devs not the
application developer because unless the app developer does something
really gross/dangerous casting they really can't "mishandle" the opaque
object except to use one that isn't initialized at all which we
can detect and handle internally in a general way.
i will however concede there would be slightly more finger work when
debugging dpdk itself since gdb / debugger doesn't automatically infer
type so you end up having to tell gdb what is in the uintptr_t.
anyway just drawing from experience in the driver frameworks we maintain
in windows, i think one of our regrets is that we didn't do this from
day 1 and subsequentl that we initially only used one opaque type
instead of defining separate (not implicitly convertable) types to each
opaque type.
^ permalink raw reply [relevance 0%]
* [PATCH] doc: announce support for MACsec in rte_security
@ 2022-06-28 19:08 3% Akhil Goyal
2022-06-29 3:37 0% ` Hemant Agrawal
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Akhil Goyal @ 2022-06-28 19:08 UTC (permalink / raw)
To: dev
Cc: thomas, david.marchand, hemant.agrawal, anoobj,
konstantin.v.ananyev, ferruh.yigit, andrew.rybchenko,
ndabilpuram, vattunuru, matan, roy.fan.zhang, jerinj, jiawenwu,
qiming.yang, Akhil Goyal
MACsec support is planned for DPDK 22.11, which would
result in ABI breakage in some of the rte_security structures.
This patch is to give deprecation notice for the affected structures.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
doc/guides/rel_notes/deprecation.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 4e5b23c53d..1c3bf54d72 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -116,6 +116,11 @@ Deprecation Notices
pointer for the private data to the application which can be attached
to the packet while enqueuing.
+* security: MACsec support is planned to be added in DPDK 22.11 which would
+ result in updates to structures ``rte_security_macsec_xform``,
+ ``rte_security_macsec_stats`` and security capability structure
+ ``rte_security_capability`` to accomodate MACsec capabilities.
+
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
--
2.25.1
^ permalink raw reply [relevance 3%]
* Re: [PATCH] doc: announce support for MACsec in rte_security
2022-06-28 19:08 3% [PATCH] doc: announce support for MACsec in rte_security Akhil Goyal
@ 2022-06-29 3:37 0% ` Hemant Agrawal
2022-06-29 7:40 0% ` Zhang, Roy Fan
2022-07-17 9:56 0% ` Thomas Monjalon
2 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2022-06-29 3:37 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: thomas, david.marchand, hemant.agrawal, anoobj,
konstantin.v.ananyev, ferruh.yigit, andrew.rybchenko,
ndabilpuram, vattunuru, matan, roy.fan.zhang, jerinj, jiawenwu,
qiming.yang
On 6/29/2022 12:38 AM, Akhil Goyal wrote:
> MACsec support is planned for DPDK 22.11, which would
> result in ABI breakage in some of the rte_security structures.
> This patch is to give deprecation notice for the affected structures.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..1c3bf54d72 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -116,6 +116,11 @@ Deprecation Notices
> pointer for the private data to the application which can be attached
> to the packet while enqueuing.
>
> +* security: MACsec support is planned to be added in DPDK 22.11 which would
> + result in updates to structures ``rte_security_macsec_xform``,
> + ``rte_security_macsec_stats`` and security capability structure
> + ``rte_security_capability`` to accomodate MACsec capabilities.
> +
> * metrics: The function ``rte_metrics_init`` will have a non-void return
> in order to notify errors instead of calling ``rte_exit``.
>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [relevance 0%]
* RE: [PATCH] doc: announce support for MACsec in rte_security
2022-06-28 19:08 3% [PATCH] doc: announce support for MACsec in rte_security Akhil Goyal
2022-06-29 3:37 0% ` Hemant Agrawal
@ 2022-06-29 7:40 0% ` Zhang, Roy Fan
2022-07-11 15:00 0% ` Jerin Jacob
2022-07-17 9:56 0% ` Thomas Monjalon
2 siblings, 1 reply; 200+ results
From: Zhang, Roy Fan @ 2022-06-29 7:40 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: thomas, david.marchand, hemant.agrawal, anoobj,
konstantin.v.ananyev, ferruh.yigit, andrew.rybchenko,
ndabilpuram, vattunuru, matan, jerinj, jiawenwu, Yang, Qiming
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday, June 28, 2022 8:08 PM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> hemant.agrawal@nxp.com; anoobj@marvell.com;
> konstantin.v.ananyev@yandex.ru; ferruh.yigit@xilinx.com;
> andrew.rybchenko@oktetlabs.ru; ndabilpuram@marvell.com;
> vattunuru@marvell.com; matan@nvidia.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; jerinj@marvell.com; jiawenwu@trustnetic.com;
> Yang, Qiming <qiming.yang@intel.com>; Akhil Goyal <gakhil@marvell.com>
> Subject: [PATCH] doc: announce support for MACsec in rte_security
>
> MACsec support is planned for DPDK 22.11, which would
> result in ABI breakage in some of the rte_security structures.
> This patch is to give deprecation notice for the affected structures.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..1c3bf54d72 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -116,6 +116,11 @@ Deprecation Notices
> pointer for the private data to the application which can be attached
> to the packet while enqueuing.
>
> +* security: MACsec support is planned to be added in DPDK 22.11 which
> would
> + result in updates to structures ``rte_security_macsec_xform``,
> + ``rte_security_macsec_stats`` and security capability structure
> + ``rte_security_capability`` to accomodate MACsec capabilities.
> +
> * metrics: The function ``rte_metrics_init`` will have a non-void return
> in order to notify errors instead of calling ``rte_exit``.
>
> --
> 2.25.1
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
^ permalink raw reply [relevance 0%]
* RE: Optimizations are not features
@ 2022-06-29 20:44 0% ` Honnappa Nagarahalli
2022-06-30 15:39 0% ` Morten Brørup
2022-07-03 19:38 0% ` Konstantin Ananyev
0 siblings, 2 replies; 200+ results
From: Honnappa Nagarahalli @ 2022-06-29 20:44 UTC (permalink / raw)
To: Konstantin Ananyev, Andrew Rybchenko, Morten Brørup, Jerin Jacob
Cc: dpdk-dev, techboard, nd, nd
<snip>
>
> 04/06/2022 13:51, Andrew Rybchenko пишет:
> > On 6/4/22 15:19, Morten Brørup wrote:
> >>> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> >>> Sent: Saturday, 4 June 2022 13.10
> >>>
> >>> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
> >>> <andrew.rybchenko@oktetlabs.ru> wrote:
> >>>>
> >>>> On 6/4/22 12:33, Jerin Jacob wrote:
> >>>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
> >>> <mb@smartsharesystems.com> wrote:
> >>>>>>
> >>>>>> I would like the DPDK community to change its view on compile
> >>>>>> time
> >>> options. Here is why:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Application specific performance micro-optimizations like “fast
> >>> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
> >>> presented as features.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> They are not features, but optimizations, and I don’t understand
> >>> the need for them to be available at run-time!
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Instead of adding a bunch of exotic exceptions to the fast path
> >>>>>> of
> >>> the PMDs, they should be compile time options. This will improve
> >>> performance by avoiding branches in the fast path, both for the
> >>> applications using them, and for generic applications (where the
> >>> exotic code is omitted).
> >>>>>
> >>>>> Agree. I think, keeping the best of both worlds would be
> >>>>>
> >>>>> -Enable the feature/optimization as runtime -Have a compile-time
> >>>>> option to disable the feature/optimization as
> >>> an override.
> >>>>
> >>>> It is hard to find the right balance, but in general compile time
> >>>> options are a nightmare for maintenance. Number of required builds
> >>>> will grow as an exponent.
> >>
> >> Test combinations are exponential for N features, regardless if N are
> >> runtime or compile time options.
> >
> > But since I'm talking about build checks I don't care about
> > exponential grows in run time. Yes, testing should care, but it is a separate
> story.
> >
> >>
> >>>> Of course, we can
> >>>> limit number of checked combinations, but it will result in flow of
> >>>> patches to fix build in other cases.
> >>>
> >>> The build breakage can be fixed if we use (2) vs (1)
> >>>
> >>> 1)
> >>> #ifdef ...
> >>> My feature
> >>> #endif
> >>>
> >>> 2)
> >>> static __rte_always_inline int
> >>> rte_has_xyz_feature(void)
> >>> {
> >>> #ifdef RTE_LIBRTE_XYZ_FEATURE
> >>> return RTE_LIBRTE_XYZ_FEATURE; #else
> >>> return 0;
> >>> #endif
> >>> }
> >>>
> >>> if(rte_has_xyz_feature())) {
> >>> My feature code
> >>>
> >>> }
> >>>
> >
> > Jerin, thanks, very good example.
> >
> >> I'm not sure all the features can be covered by that, e.g. added
> >> fields in structures.
> >
> > +1
> >
> >>
> >> Also, I would consider such features "opt in" at compile time only.
> >> As such, they could be allowed to break the ABI/API.
> >>
> >>>
> >>>
> >>>> Also compile time options tend to make code less readable which
> >>>> makes all aspects of the development harder.
> >>>>
> >>>> Yes, compile time is nice for micro optimizations, but I have great
> >>>> concerns that it is a right way to go.
> >>>>
> >>>>>> Please note that I am only talking about the performance
> >>> optimizations that are limited to application specific use cases. I
> >>> think it makes sense to require that performance optimizing an
> >>> application also requires recompiling the performance critical
> >>> libraries used by it.
> >>>>>>abandon some of existing functionality to create a 'short-cut'
> >>>>>>
> >>>>>>
> >>>>>> Allowing compile time options for application specific
> >>>>>> performance
> >>> optimizations in DPDK would also open a path for other
> >>> optimizations, which can only be achieved at compile time, such as
> >>> “no fragmented packets”, “no attached mbufs” and “single mbuf pool”.
> >>> And even more exotic optimizations, such as the “indexed mempool
> >>> cache”, which was rejected due to ABI violations – they could be
> >>> marked as “risky and untested” or similar, but still be part of the DPDK main
> repository.
> >>>>>>
>
>
> Thanks Morten for bringing it up, it is an interesting topic.
> Though I look at it from different angle.
> All optimizations you mentioned above introduce new limitations:
> MBUF_FAST_FREE - no indirect mbufs and multiple mempools, mempool object
> indexes - mempool size is limited to 4GB, direct rearm - drop ability to
> stop/reconfigure TX queue, while RX queue is still running, etc.
> Note that all these limitations are not forced by HW.
> All of them are pure SW limitations that developers forced in (or tried to) to get
> few extra performance.
> That's concerning tendency.
>
> As more and more such 'optimization via limitation' will come in:
> - DPDK feature list will become more and more fragmented.
> - Would cause more and more confusion for the users.
> - Unmet expectations - difference in performance between 'default'
> and 'optimized' version of DPDK will become bigger and bigger.
> - As Andrew already mentioned, maintaining all these 'sub-flavours'
> of DPDK will become more and more difficult.
The point that we need to remember is, these features/optimizations are introduced after seeing performance issues in practical use cases.
DPDK is not being used in just one use case, it is being used in several use cases which have their own unique requirements. Is 4GB enough for packet buffers - yes it is enough in certain use cases. Are their NICs with single port - yes there are. HW is being created because use cases and business cases exist. It is obvious that as DPDK gets adopted on more platforms that differ largely, the features will increase and it will become complex. Complexity should not be used as a criteria to reject patches.
There is different perspective to what you are calling as 'limitations'. I can argue that multiple mempools, stop/reconfigure TX queue while RX queue is still running are exotic. Just because those are allowed currently (probably accidently) does not mean they are being used. Are there use cases that make use of these features?
The base/existing design for DPDK was done with one particular HW architecture in mind where there was an abundance of resources. Unfortunately, that HW architecture is fast evolving and DPDK is adopted in use cases where that kind of resources are not available. For ex: efficiency cores are being introduced by every CPU vendor now. Soon enough, we will see big-little architecture in networking as well. The existing PMD design introduces 512B of stores (256B for copying to stack variable and 256B to store lcore cache) and 256B load/store on RX side every 32 packets back to back. It doesn't make sense to have that kind of memcopy for little/efficiency cores just for the driver code.
>
> So, probably instead of making such changes easier, we need somehow to
> persuade developers to think more about optimizations that would be generic
> and transparent to the user.
Or may be we need to think of creating alternate ways of programming.
> I do realize that it is not always possible due to various reasons (HW limitations,
> external dependencies, etc.) but that's another story.
>
> Let's take for example MBUF_FAST_FREE.
> In fact, I am not sure that we need it as tx offload flag at all.
> PMD TX-path has all necessary information to decide at run-time can it do
> fast_free() for not:
> At tx_burst() PMD can check are all mbufs satisfy these conditions (same
> mempool, refcnt==1) and update some fields and/or counters inside TXQ to
> reflect it.
> Then, at tx_free() we can use this info to decide between fast_free() and
> normal_free().
> As at tx_burst() we read mbuf fields anyway, impact for this extra step I guess
> would be minimal.
> Yes, most likely, it wouldn't be as fast as with current TX offload flag, or
> conditional compilation approach.
> But it might be still significantly faster then normal_free(), plus such approach
> will be generic and transparent to the user.
IMO, this depends on the philosophy that we want to adopt. I would prefer to make control plane complex for performance gains on the data plane. The performance on the data plane has a multiplying effect due to the ratio of number of cores assigned for data plane vs control plane.
I am not against evaluating alternatives, but the alternative approaches need to have similar (not the same) performance.
>
> Konstantin
^ permalink raw reply [relevance 0%]
* Call for Proposals - Userspace 2022
@ 2022-06-29 21:22 3% Nathan Southern
0 siblings, 0 replies; 200+ results
From: Nathan Southern @ 2022-06-29 21:22 UTC (permalink / raw)
To: announce
[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]
Dear DPDK Community,
We hope this message finds each of you well.
The Call for Proposals to speak at the upcoming in personal and virtual
Userspace event in Arcachon, France (Sep. 6-8, 2022) is now live and ends
at midnight eastern time on Friday, July 22nd: You can submit at the
following online registration form:
https://linuxfoundation.smapply.io/prog/dpdk_userspace_summit_2022/
We’re seeking speakers for 30-40 minutes each to address the following
topics as listed on this page:
- End user applications and usage of DPDK for real world deployed
solutions (such as cloud, edge, IoT, or networking applications)
- Developer stories, technical challenges when integrating or developing
with DPDK
- Enhancements and additions to the DPDK libraries, functional or
performance-wise
- New networking technologies and their applicability to DPDK
- Hardware NIC capabilities and offloads
- Hardware datapath accelerators (compression, crypto, baseband, GPU,
regex, etc.)
- Virtualization and container networking
- Debug tooling (logging, tracing, telemetry, monitoring)
- DPDK consumability (API/ABI compatibility, OS integration, packaging)
- Project infrastructure, security, testing
- Feedback from usage and deployment of DPDK applications (OSS or
proprietary)
- End user and DPDK adopter suggestions for improvements or feature
enhancement
All speaker applicants should also go through the Userspace registration
process beforehand, and will be granted Early Bird Admission fees ($100)
prior to August 8th. We are open to virtual presenters if absolutely
required, but prefer in-person participation.
Those who are approved by our Tech Board to speak at the event will have
this $100 refunded per Linux Foundation policy.
The main registration page for the event is located here:
https://events.linuxfoundation.org/dpdk-userspace-summit/
We appreciate your time, consideration and investment and look forward to
reviewing your proposals.
Many thanks
Nathan Southern
Project Coordinator, DPDK
The Linux Foundation
[-- Attachment #2: Type: text/html, Size: 8215 bytes --]
^ permalink raw reply [relevance 3%]
* [PATCH] doc: announce marking bus object as internal
@ 2022-06-30 9:41 8% David Marchand
2022-06-30 9:54 0% ` Bruce Richardson
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: David Marchand @ 2022-06-30 9:41 UTC (permalink / raw)
To: dev, techboard; +Cc: Ray Kinsella
rte_bus is unnecessarily exposed in the public API/ABI.
Besides, we had cases where extending rte_bus was necessary.
Announce that rte_bus will be made opaque in the public API and mark
associated API as internal.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
A RFC series of the intended changes is available at:
https://patches.dpdk.org/project/dpdk/list/?series=23811&state=%2A&archive=both
---
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 64d649777a..a9fd6676be 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -32,6 +32,12 @@ Deprecation Notices
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
+* bus: The ``rte_bus`` object will be made opaque in DPDK 22.11.
+ The goal is to remove it from the public ABI and make this object extendable.
+ As a side effect, registering a bus will be marked as an internal API:
+ external users may still register their bus using a new driver header (see
+ ``enable_driver_sdk`` meson option).
+
* mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
be removed in DPDK 22.11. The replacement macro
``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
--
2.36.1
^ permalink raw reply [relevance 8%]
* Re: [PATCH] doc: announce marking bus object as internal
2022-06-30 9:41 8% [PATCH] doc: announce marking bus object as internal David Marchand
@ 2022-06-30 9:54 0% ` Bruce Richardson
2022-06-30 14:36 0% ` Thomas Monjalon
2022-07-04 14:29 0% ` Kevin Laatz
2022-07-15 16:16 0% ` Thomas Monjalon
2 siblings, 1 reply; 200+ results
From: Bruce Richardson @ 2022-06-30 9:54 UTC (permalink / raw)
To: David Marchand; +Cc: dev, techboard, Ray Kinsella
On Thu, Jun 30, 2022 at 11:41:53AM +0200, David Marchand wrote:
> rte_bus is unnecessarily exposed in the public API/ABI.
> Besides, we had cases where extending rte_bus was necessary.
> Announce that rte_bus will be made opaque in the public API and mark
> associated API as internal.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> A RFC series of the intended changes is available at:
> https://patches.dpdk.org/project/dpdk/list/?series=23811&state=%2A&archive=both
>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [relevance 0%]
* Re: DPDK Release Status Meeting 2022-06-30
@ 2022-06-30 11:43 3% ` Ferruh Yigit
2022-06-30 11:57 0% ` David Marchand
0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2022-06-30 11:43 UTC (permalink / raw)
To: Mcnamara, John, dev; +Cc: thomas, david.marchand
On 6/30/2022 11:47 AM, Mcnamara, John wrote:
> Release status meeting minutes 2022-06-30
> =========================================
<...>
>
> Opens
> -----
Last minute opens were:
* I am getting ABI check crash, when again v21.11 with abigail 2.0.0,
for the file 'librte_common_qat'. Not sure if this is specific to my
environment, would be good if someone double checks.
* igb_uio build fails with latest kernel, a fix is required.
^ permalink raw reply [relevance 3%]
* Re: DPDK Release Status Meeting 2022-06-30
2022-06-30 11:43 3% ` Ferruh Yigit
@ 2022-06-30 11:57 0% ` David Marchand
2022-06-30 12:40 0% ` Ferruh Yigit
2022-06-30 12:43 0% ` Dodji Seketeli
0 siblings, 2 replies; 200+ results
From: David Marchand @ 2022-06-30 11:57 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Mcnamara, John, dev, thomas, Dodji Seketeli
On Thu, Jun 30, 2022 at 1:43 PM Ferruh Yigit <ferruh.yigit@xilinx.com> wrote:
> Last minute opens were:
>
> * I am getting ABI check crash, when again v21.11 with abigail 2.0.0,
> for the file 'librte_common_qat'. Not sure if this is specific to my
> environment, would be good if someone double checks.
I ran into a crash too with 2.0.0.
This seems fixed in (unreleased) latest libabigail.
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: DPDK Release Status Meeting 2022-06-30
2022-06-30 11:57 0% ` David Marchand
@ 2022-06-30 12:40 0% ` Ferruh Yigit
2022-06-30 12:43 0% ` Dodji Seketeli
1 sibling, 0 replies; 200+ results
From: Ferruh Yigit @ 2022-06-30 12:40 UTC (permalink / raw)
To: David Marchand; +Cc: Mcnamara, John, dev, thomas, Dodji Seketeli
On 6/30/2022 12:57 PM, David Marchand wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
>
>
> On Thu, Jun 30, 2022 at 1:43 PM Ferruh Yigit <ferruh.yigit@xilinx.com> wrote:
>> Last minute opens were:
>>
>> * I am getting ABI check crash, when again v21.11 with abigail 2.0.0,
>> for the file 'librte_common_qat'. Not sure if this is specific to my
>> environment, would be good if someone double checks.
>
> I ran into a crash too with 2.0.0.
> This seems fixed in (unreleased) latest libabigail.
>
Thanks David, I will try latest code.
^ permalink raw reply [relevance 0%]
* Re: DPDK Release Status Meeting 2022-06-30
2022-06-30 11:57 0% ` David Marchand
2022-06-30 12:40 0% ` Ferruh Yigit
@ 2022-06-30 12:43 0% ` Dodji Seketeli
2022-06-30 17:52 0% ` Ferruh Yigit
1 sibling, 1 reply; 200+ results
From: Dodji Seketeli @ 2022-06-30 12:43 UTC (permalink / raw)
To: David Marchand; +Cc: Ferruh Yigit, Mcnamara, John, dev, thomas
David Marchand <david.marchand@redhat.com> writes:
> On Thu, Jun 30, 2022 at 1:43 PM Ferruh Yigit <ferruh.yigit@xilinx.com> wrote:
>> Last minute opens were:
>>
>> * I am getting ABI check crash, when again v21.11 with abigail 2.0.0,
>> for the file 'librte_common_qat'. Not sure if this is specific to my
>> environment, would be good if someone double checks.
>
> I ran into a crash too with 2.0.0.
> This seems fixed in (unreleased) latest libabigail.
Sorry about that. We are working towards releasing 2.1 soon, which
should hopefully fix that.
Cheers,
--
Dodji
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking bus object as internal
2022-06-30 9:54 0% ` Bruce Richardson
@ 2022-06-30 14:36 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-06-30 14:36 UTC (permalink / raw)
To: David Marchand; +Cc: techboard, dev, Ray Kinsella, Bruce Richardson
30/06/2022 11:54, Bruce Richardson:
> On Thu, Jun 30, 2022 at 11:41:53AM +0200, David Marchand wrote:
> > rte_bus is unnecessarily exposed in the public API/ABI.
> > Besides, we had cases where extending rte_bus was necessary.
> > Announce that rte_bus will be made opaque in the public API and mark
> > associated API as internal.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > A RFC series of the intended changes is available at:
> > https://patches.dpdk.org/project/dpdk/list/?series=23811&state=%2A&archive=both
> >
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [relevance 0%]
* RE: [PATCH v4] doc: announce changes in bbdev related to enum extension
2022-06-27 20:47 0% ` Chautru, Nicolas
@ 2022-06-30 14:52 0% ` Chautru, Nicolas
0 siblings, 0 replies; 200+ results
From: Chautru, Nicolas @ 2022-06-30 14:52 UTC (permalink / raw)
To: dev, thomas
Cc: trix, Kinsella, Ray, Richardson, Bruce, hemant.agrawal,
david.marchand, stephen, Maxime Coquelin, gakhil, Mcnamara, John
Hi Thomas,
Any concern with that deprecation notice please?
Thanks
Nic
> -----Original Message-----
> From: Chautru, Nicolas <nicolas.chautru@intel.com>
> Sent: Monday, June 27, 2022 1:48 PM
> To: dev@dpdk.org; thomas@monjalon.net
> Cc: trix@redhat.com; Kinsella, Ray <ray.kinsella@intel.com>; Richardson,
> Bruce <bruce.richardson@intel.com>; hemant.agrawal@nxp.com;
> david.marchand@redhat.com; stephen@networkplumber.org; Maxime
> Coquelin <maxime.coquelin@redhat.com>; gakhil@marvell.com
> Subject: RE: [PATCH v4] doc: announce changes in bbdev related to enum
> extension
>
> Hi Thomas,
> Kind reminder on this one.
> Thanks
> Nic
>
> > -----Original Message-----
> > From: Chautru, Nicolas
> > Sent: Friday, June 17, 2022 9:13 AM
> > To: dev@dpdk.org; thomas@monjalon.net
> > Cc: trix@redhat.com; Kinsella, Ray <ray.kinsella@intel.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>;
> > hemant.agrawal@nxp.com; david.marchand@redhat.com;
> > stephen@networkplumber.org; Maxime Coquelin
> > <maxime.coquelin@redhat.com>; gakhil@marvell.com
> > Subject: RE: [PATCH v4] doc: announce changes in bbdev related to enum
> > extension
> >
> > Hi Thomas,
> > Can this one be applied based on your review?
> > Thanks
> > Nic
> >
> > > -----Original Message-----
> > > From: Maxime Coquelin <maxime.coquelin@redhat.com>
> > > Sent: Thursday, June 9, 2022 12:54 AM
> > > To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> > > gakhil@marvell.com; thomas@monjalon.net
> > > Cc: trix@redhat.com; Kinsella, Ray <ray.kinsella@intel.com>;
> > > Richardson, Bruce <bruce.richardson@intel.com>;
> > > hemant.agrawal@nxp.com; david.marchand@redhat.com;
> > > stephen@networkplumber.org
> > > Subject: Re: [PATCH v4] doc: announce changes in bbdev related to
> > > enum extension
> > >
> > > Hi Nicolas,
> > >
> > > On 6/9/22 02:34, Nicolas Chautru wrote:
> > > > Intent to resolve in DPDK 22.11 historical usage which prevents
> > > > graceful extension of enum and API without troublesome ABI
> > > > breakage as well as extending API RTE_BBDEV_OP_FFT for new
> > > > operation type in bbdev as well as other new members in existing
> structures.
> > > >
> > > > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > > > ---
> > > > doc/guides/rel_notes/deprecation.rst | 11 +++++++++++
> > > > 1 file changed, 11 insertions(+)
> > > >
> > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > b/doc/guides/rel_notes/deprecation.rst
> > > > index 4e5b23c..c8ab1ec 100644
> > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > @@ -112,6 +112,17 @@ Deprecation Notices
> > > > session and the private data of session. An opaque pointer can
> > > > be
> > exposed
> > > > directly to application which can be attached to the
> ``rte_crypto_op``.
> > > >
> > > > +* bbdev: ``RTE_BBDEV_OP_TYPE_COUNT`` terminating the
> > > > +``rte_bbdev_op_type``
> > > > + enum will be deprecated and instead use fixed array size when
> > > > +required to allow for
> > > > + future enum extension.
> > > > + Will extend API to support new operation type
> > > > +``RTE_BBDEV_OP_FFT`` as per this
> > > > + RFC https://patchwork.dpdk.org/project/dpdk/list/?series=22111
> > > > + New members will be added in ``rte_bbdev_driver_info`` to
> > > > +expose PMD queue topology inspired
> > > > + by this RFC
> > > > +https://patches.dpdk.org/project/dpdk/list/?series=22076
> > > > + New member will be added in ``rte_bbdev_driver_info`` to expose
> > > > +the device status as per
> > > > + this RFC
> > > > +https://patches.dpdk.org/project/dpdk/list/?series=23367
> > > > + This should be updated in DPDK 22.11.
> > > > +
> > > > * security: Hide structure ``rte_security_session`` and expose an
> opaque
> > > > pointer for the private data to the application which can be attached
> > > > to the packet while enqueuing.
> > >
> > > Thanks for rewording the notice.
> > >
> > > Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > >
> > > Maxime
^ permalink raw reply [relevance 0%]
* RE: Optimizations are not features
2022-06-29 20:44 0% ` Honnappa Nagarahalli
@ 2022-06-30 15:39 0% ` Morten Brørup
2022-07-03 19:38 0% ` Konstantin Ananyev
1 sibling, 0 replies; 200+ results
From: Morten Brørup @ 2022-06-30 15:39 UTC (permalink / raw)
To: Honnappa Nagarahalli, Konstantin Ananyev, Andrew Rybchenko, Jerin Jacob
Cc: dpdk-dev, techboard, nd, nd
> From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com]
> Sent: Wednesday, 29 June 2022 22.44
>
> <snip>
>
> >
> > 04/06/2022 13:51, Andrew Rybchenko пишет:
> > > On 6/4/22 15:19, Morten Brørup wrote:
> > >>> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> > >>> Sent: Saturday, 4 June 2022 13.10
> > >>>
> > >>> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
> > >>> <andrew.rybchenko@oktetlabs.ru> wrote:
> > >>>>
> > >>>> On 6/4/22 12:33, Jerin Jacob wrote:
> > >>>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
> > >>> <mb@smartsharesystems.com> wrote:
> > >>>>>>
> > >>>>>> I would like the DPDK community to change its view on compile
> > >>>>>> time
> > >>> options. Here is why:
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> Application specific performance micro-optimizations like
> “fast
> > >>> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
> > >>> presented as features.
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> They are not features, but optimizations, and I don’t
> understand
> > >>> the need for them to be available at run-time!
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> Instead of adding a bunch of exotic exceptions to the fast
> path
> > >>>>>> of
> > >>> the PMDs, they should be compile time options. This will improve
> > >>> performance by avoiding branches in the fast path, both for the
> > >>> applications using them, and for generic applications (where the
> > >>> exotic code is omitted).
> > >>>>>
> > >>>>> Agree. I think, keeping the best of both worlds would be
> > >>>>>
> > >>>>> -Enable the feature/optimization as runtime -Have a compile-
> time
> > >>>>> option to disable the feature/optimization as
> > >>> an override.
> > >>>>
> > >>>> It is hard to find the right balance, but in general compile
> time
> > >>>> options are a nightmare for maintenance. Number of required
> builds
> > >>>> will grow as an exponent.
> > >>
> > >> Test combinations are exponential for N features, regardless if N
> are
> > >> runtime or compile time options.
> > >
> > > But since I'm talking about build checks I don't care about
> > > exponential grows in run time. Yes, testing should care, but it is
> a separate
> > story.
> > >
> > >>
> > >>>> Of course, we can
> > >>>> limit number of checked combinations, but it will result in flow
> of
> > >>>> patches to fix build in other cases.
> > >>>
> > >>> The build breakage can be fixed if we use (2) vs (1)
> > >>>
> > >>> 1)
> > >>> #ifdef ...
> > >>> My feature
> > >>> #endif
> > >>>
> > >>> 2)
> > >>> static __rte_always_inline int
> > >>> rte_has_xyz_feature(void)
> > >>> {
> > >>> #ifdef RTE_LIBRTE_XYZ_FEATURE
> > >>> return RTE_LIBRTE_XYZ_FEATURE; #else
> > >>> return 0;
> > >>> #endif
> > >>> }
> > >>>
> > >>> if(rte_has_xyz_feature())) {
> > >>> My feature code
> > >>>
> > >>> }
> > >>>
> > >
> > > Jerin, thanks, very good example.
> > >
> > >> I'm not sure all the features can be covered by that, e.g. added
> > >> fields in structures.
> > >
> > > +1
> > >
> > >>
> > >> Also, I would consider such features "opt in" at compile time
> only.
> > >> As such, they could be allowed to break the ABI/API.
> > >>
> > >>>
> > >>>
> > >>>> Also compile time options tend to make code less readable which
> > >>>> makes all aspects of the development harder.
> > >>>>
> > >>>> Yes, compile time is nice for micro optimizations, but I have
> great
> > >>>> concerns that it is a right way to go.
> > >>>>
> > >>>>>> Please note that I am only talking about the performance
> > >>> optimizations that are limited to application specific use cases.
> I
> > >>> think it makes sense to require that performance optimizing an
> > >>> application also requires recompiling the performance critical
> > >>> libraries used by it.
> > >>>>>>abandon some of existing functionality to create a 'short-cut'
> > >>>>>>
> > >>>>>>
> > >>>>>> Allowing compile time options for application specific
> > >>>>>> performance
> > >>> optimizations in DPDK would also open a path for other
> > >>> optimizations, which can only be achieved at compile time, such
> as
> > >>> “no fragmented packets”, “no attached mbufs” and “single mbuf
> pool”.
> > >>> And even more exotic optimizations, such as the “indexed mempool
> > >>> cache”, which was rejected due to ABI violations – they could be
> > >>> marked as “risky and untested” or similar, but still be part of
> the DPDK main
> > repository.
> > >>>>>>
> >
> >
> > Thanks Morten for bringing it up, it is an interesting topic.
> > Though I look at it from different angle.
> > All optimizations you mentioned above introduce new limitations:
> > MBUF_FAST_FREE - no indirect mbufs and multiple mempools, mempool
> object
> > indexes - mempool size is limited to 4GB, direct rearm - drop ability
> to
> > stop/reconfigure TX queue, while RX queue is still running, etc.
> > Note that all these limitations are not forced by HW.
> > All of them are pure SW limitations that developers forced in (or
> tried to) to get
> > few extra performance.
> > That's concerning tendency.
> >
> > As more and more such 'optimization via limitation' will come in:
> > - DPDK feature list will become more and more fragmented.
> > - Would cause more and more confusion for the users.
> > - Unmet expectations - difference in performance between 'default'
> > and 'optimized' version of DPDK will become bigger and bigger.
I strongly disagree with this bullet!
We should not limit the performance to only what is possible with all features enabled.
An application developer should have the ability to disable performance-costly features not being used.
> > - As Andrew already mentioned, maintaining all these 'sub-flavours'
> > of DPDK will become more and more difficult.
> The point that we need to remember is, these features/optimizations are
> introduced after seeing performance issues in practical use cases.
> DPDK is not being used in just one use case, it is being used in
> several use cases which have their own unique requirements. Is 4GB
> enough for packet buffers - yes it is enough in certain use cases. Are
> their NICs with single port - yes there are. HW is being created
> because use cases and business cases exist. It is obvious that as DPDK
> gets adopted on more platforms that differ largely, the features will
> increase and it will become complex. Complexity should not be used as a
> criteria to reject patches.
>
> There is different perspective to what you are calling as
> 'limitations'. I can argue that multiple mempools, stop/reconfigure TX
> queue while RX queue is still running are exotic. Just because those
> are allowed currently (probably accidently) does not mean they are
> being used. Are there use cases that make use of these features?
>
> The base/existing design for DPDK was done with one particular HW
> architecture in mind where there was an abundance of resources.
> Unfortunately, that HW architecture is fast evolving and DPDK is
> adopted in use cases where that kind of resources are not available.
> For ex: efficiency cores are being introduced by every CPU vendor now.
> Soon enough, we will see big-little architecture in networking as well.
> The existing PMD design introduces 512B of stores (256B for copying to
> stack variable and 256B to store lcore cache) and 256B load/store on RX
> side every 32 packets back to back. It doesn't make sense to have that
> kind of memcopy for little/efficiency cores just for the driver code.
>
> >
> > So, probably instead of making such changes easier, we need somehow
> to
> > persuade developers to think more about optimizations that would be
> generic
> > and transparent to the user.
> Or may be we need to think of creating alternate ways of programming.
Exactly what I was hoping to achieve with this discussion.
>
> > I do realize that it is not always possible due to various reasons
> (HW limitations,
> > external dependencies, etc.) but that's another story.
> >
> > Let's take for example MBUF_FAST_FREE.
> > In fact, I am not sure that we need it as tx offload flag at all.
> > PMD TX-path has all necessary information to decide at run-time can
> it do
> > fast_free() for not:
> > At tx_burst() PMD can check are all mbufs satisfy these conditions
> (same
> > mempool, refcnt==1) and update some fields and/or counters inside TXQ
> to
> > reflect it.
> > Then, at tx_free() we can use this info to decide between fast_free()
> and
> > normal_free().
> > As at tx_burst() we read mbuf fields anyway, impact for this extra
> step I guess
> > would be minimal.
> > Yes, most likely, it wouldn't be as fast as with current TX offload
> flag, or
> > conditional compilation approach.
> > But it might be still significantly faster then normal_free(), plus
> such approach
> > will be generic and transparent to the user.
> IMO, this depends on the philosophy that we want to adopt. I would
> prefer to make control plane complex for performance gains on the data
> plane. The performance on the data plane has a multiplying effect due
> to the ratio of number of cores assigned for data plane vs control
> plane.
Yes. And if some performance-costing feature is not possible to move out from the data plane to the control plane, it should be compile time optional.
And please note that I don't buy the argument that "it will be caught by branch prediction". You are not allowed to fill up my branch predictor table with cruft!
>
> I am not against evaluating alternatives, but the alternative
> approaches need to have similar (not the same) performance.
>
> >
> > Konstantin
^ permalink raw reply [relevance 0%]
* Re: DPDK Release Status Meeting 2022-06-30
2022-06-30 12:43 0% ` Dodji Seketeli
@ 2022-06-30 17:52 0% ` Ferruh Yigit
0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2022-06-30 17:52 UTC (permalink / raw)
To: Dodji Seketeli, David Marchand; +Cc: Mcnamara, John, dev, thomas
On 6/30/2022 1:43 PM, Dodji Seketeli wrote:
> David Marchand <david.marchand@redhat.com> writes:
>
>> On Thu, Jun 30, 2022 at 1:43 PM Ferruh Yigit <ferruh.yigit@xilinx.com> wrote:
>>> Last minute opens were:
>>>
>>> * I am getting ABI check crash, when again v21.11 with abigail 2.0.0,
>>> for the file 'librte_common_qat'. Not sure if this is specific to my
>>> environment, would be good if someone double checks.
>>
>> I ran into a crash too with 2.0.0.
>> This seems fixed in (unreleased) latest libabigail.
>
> Sorry about that. We are working towards releasing 2.1 soon, which
> should hopefully fix that.
>
I confirm issue is solved with latest head
(libabigail-2.0-140-gd21dbadddd84).
Thanks,
ferruh
^ permalink raw reply [relevance 0%]
* Re: Optimizations are not features
2022-06-29 20:44 0% ` Honnappa Nagarahalli
2022-06-30 15:39 0% ` Morten Brørup
@ 2022-07-03 19:38 0% ` Konstantin Ananyev
1 sibling, 0 replies; 200+ results
From: Konstantin Ananyev @ 2022-07-03 19:38 UTC (permalink / raw)
To: Honnappa Nagarahalli, Andrew Rybchenko, Morten Brørup, Jerin Jacob
Cc: dpdk-dev, techboard, nd
29/06/2022 21:44, Honnappa Nagarahalli пишет:
> <snip>
>
>>
>> 04/06/2022 13:51, Andrew Rybchenko пишет:
>>> On 6/4/22 15:19, Morten Brørup wrote:
>>>>> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
>>>>> Sent: Saturday, 4 June 2022 13.10
>>>>>
>>>>> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
>>>>> <andrew.rybchenko@oktetlabs.ru> wrote:
>>>>>>
>>>>>> On 6/4/22 12:33, Jerin Jacob wrote:
>>>>>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
>>>>> <mb@smartsharesystems.com> wrote:
>>>>>>>>
>>>>>>>> I would like the DPDK community to change its view on compile
>>>>>>>> time
>>>>> options. Here is why:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Application specific performance micro-optimizations like “fast
>>>>> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
>>>>> presented as features.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> They are not features, but optimizations, and I don’t understand
>>>>> the need for them to be available at run-time!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Instead of adding a bunch of exotic exceptions to the fast path
>>>>>>>> of
>>>>> the PMDs, they should be compile time options. This will improve
>>>>> performance by avoiding branches in the fast path, both for the
>>>>> applications using them, and for generic applications (where the
>>>>> exotic code is omitted).
>>>>>>>
>>>>>>> Agree. I think, keeping the best of both worlds would be
>>>>>>>
>>>>>>> -Enable the feature/optimization as runtime -Have a compile-time
>>>>>>> option to disable the feature/optimization as
>>>>> an override.
>>>>>>
>>>>>> It is hard to find the right balance, but in general compile time
>>>>>> options are a nightmare for maintenance. Number of required builds
>>>>>> will grow as an exponent.
>>>>
>>>> Test combinations are exponential for N features, regardless if N are
>>>> runtime or compile time options.
>>>
>>> But since I'm talking about build checks I don't care about
>>> exponential grows in run time. Yes, testing should care, but it is a separate
>> story.
>>>
>>>>
>>>>>> Of course, we can
>>>>>> limit number of checked combinations, but it will result in flow of
>>>>>> patches to fix build in other cases.
>>>>>
>>>>> The build breakage can be fixed if we use (2) vs (1)
>>>>>
>>>>> 1)
>>>>> #ifdef ...
>>>>> My feature
>>>>> #endif
>>>>>
>>>>> 2)
>>>>> static __rte_always_inline int
>>>>> rte_has_xyz_feature(void)
>>>>> {
>>>>> #ifdef RTE_LIBRTE_XYZ_FEATURE
>>>>> return RTE_LIBRTE_XYZ_FEATURE; #else
>>>>> return 0;
>>>>> #endif
>>>>> }
>>>>>
>>>>> if(rte_has_xyz_feature())) {
>>>>> My feature code
>>>>>
>>>>> }
>>>>>
>>>
>>> Jerin, thanks, very good example.
>>>
>>>> I'm not sure all the features can be covered by that, e.g. added
>>>> fields in structures.
>>>
>>> +1
>>>
>>>>
>>>> Also, I would consider such features "opt in" at compile time only.
>>>> As such, they could be allowed to break the ABI/API.
>>>>
>>>>>
>>>>>
>>>>>> Also compile time options tend to make code less readable which
>>>>>> makes all aspects of the development harder.
>>>>>>
>>>>>> Yes, compile time is nice for micro optimizations, but I have great
>>>>>> concerns that it is a right way to go.
>>>>>>
>>>>>>>> Please note that I am only talking about the performance
>>>>> optimizations that are limited to application specific use cases. I
>>>>> think it makes sense to require that performance optimizing an
>>>>> application also requires recompiling the performance critical
>>>>> libraries used by it.
>>>>>>>> abandon some of existing functionality to create a 'short-cut'
>>>>>>>>
>>>>>>>>
>>>>>>>> Allowing compile time options for application specific
>>>>>>>> performance
>>>>> optimizations in DPDK would also open a path for other
>>>>> optimizations, which can only be achieved at compile time, such as
>>>>> “no fragmented packets”, “no attached mbufs” and “single mbuf pool”.
>>>>> And even more exotic optimizations, such as the “indexed mempool
>>>>> cache”, which was rejected due to ABI violations – they could be
>>>>> marked as “risky and untested” or similar, but still be part of the DPDK main
>> repository.
>>>>>>>>
>>
>>
>> Thanks Morten for bringing it up, it is an interesting topic.
>> Though I look at it from different angle.
>> All optimizations you mentioned above introduce new limitations:
>> MBUF_FAST_FREE - no indirect mbufs and multiple mempools, mempool object
>> indexes - mempool size is limited to 4GB, direct rearm - drop ability to
>> stop/reconfigure TX queue, while RX queue is still running, etc.
>> Note that all these limitations are not forced by HW.
>> All of them are pure SW limitations that developers forced in (or tried to) to get
>> few extra performance.
>> That's concerning tendency.
>>
>> As more and more such 'optimization via limitation' will come in:
>> - DPDK feature list will become more and more fragmented.
>> - Would cause more and more confusion for the users.
>> - Unmet expectations - difference in performance between 'default'
>> and 'optimized' version of DPDK will become bigger and bigger.
>> - As Andrew already mentioned, maintaining all these 'sub-flavours'
>> of DPDK will become more and more difficult.
> The point that we need to remember is, these features/optimizations are introduced after seeing performance issues in practical use cases.
Sorry I didn't get it: what performance issues you are talking about?
If let say our mempool code is sub-optimal in some place for some
architecture due to bad design or bad implementation - please point to
it and let's try to fix it, instead of avoiding using mempool API
If you just saying that avoiding using mempool in some cases
could buy us few extra performance (a short-cut),
then yes it surely could.
Another question - is it really worth it?
Having all mbufs management covered by one SW abstraction
helps a lot in terms of project maintainability, further extensions,
introducing new common optimizations, etc.
> DPDK is not being used in just one use case, it is being used in several use cases which have their own unique requirements. Is 4GB enough for packet buffers - yes it is enough in certain use
cases. Are their NICs with single port - yes there are.
Sure there are NICs with one port.
But also there are NICs with 2 ports, 4 ports, etc.
Should we maintain specific DPDK sub-versions for all these cases?
From my perspective - no.
It would be overwhelming effort for DPDK community, plus
many customers use DPDK to build their own products that supposed
to work seamlessly across multiple use-cases/platforms.
HW is being created because use cases and business cases exist. It is
obvious that as DPDK gets adopted on more platforms that differ largely,
the features will increase and it will become complex. Complexity should
not be used as a criteria to reject patches.
Well, we do have plenty of HW specific optimizations inside DPDK
and we put a lot of effort that all this HW specific staff be
transparent to the user as much as possible.
I don't see why for SW specific optimizations it should be different.
>
> There is different perspective to what you are calling as 'limitations'.
By 'limitations' I mean situation when user has to cut off
existing functionality to enable these 'optimizations'.
I can argue that multiple mempools, stop/reconfigure TX queue while RX
queue is still running are exotic. Just because those are allowed
currently (probably accidently) does not mean they are being used. Are
there use cases that make use of these features?
If DPDK examples/l3fwd doesn't use these features,
it doesn't mean they are useless :)
I believe both multiple mempools (indirect-mbufs) and ability to
start/stop queues separately are major DPDK features that are used
across many real-world deployments.
>
> The base/existing design for DPDK was done with one particular HW architecture in mind where there was an abundance of resources. Unfortunately, that HW architecture is fast evolving and DPDK is adopted in use cases where that kind of resources are not available. For ex: efficiency cores are being introduced by every CPU vendor now. Soon enough, we will see big-little architecture in networking as well. The existing PMD design introduces 512B of stores (256B for copying to stack variable and 256B to store lcore cache) and 256B load/store on RX side every 32 packets back to back. It doesn't make sense to have that kind of memcopy for little/efficiency cores just for the driver code.
I don't object about specific use-case optimizations.
Specially if the use-case is a common one.
But I think such changes has to be transparent to the user as
much as possible and shouldn't cause further DPDK code fragmentation
(new CONFIG options, etc.).
I understand that it is not always possible, but for pure SW based
optimizations, I think it is a reasonable expectation.
>>
>> So, probably instead of making such changes easier, we need somehow to
>> persuade developers to think more about optimizations that would be generic
>> and transparent to the user.
> Or may be we need to think of creating alternate ways of programming.
>
>> I do realize that it is not always possible due to various reasons (HW limitations,
>> external dependencies, etc.) but that's another story.
>>
>> Let's take for example MBUF_FAST_FREE.
>> In fact, I am not sure that we need it as tx offload flag at all.
>> PMD TX-path has all necessary information to decide at run-time can it do
>> fast_free() for not:
>> At tx_burst() PMD can check are all mbufs satisfy these conditions (same
>> mempool, refcnt==1) and update some fields and/or counters inside TXQ to
>> reflect it.
>> Then, at tx_free() we can use this info to decide between fast_free() and
>> normal_free().
>> As at tx_burst() we read mbuf fields anyway, impact for this extra step I guess
>> would be minimal.
>> Yes, most likely, it wouldn't be as fast as with current TX offload flag, or
>> conditional compilation approach.
>> But it might be still significantly faster then normal_free(), plus such approach
>> will be generic and transparent to the user.
> IMO, this depends on the philosophy that we want to adopt. I would prefer to make control plane complex for performance gains on the data plane. The performance on the data plane has a multiplying effect due to the ratio of number of cores assigned for data plane vs control plane.
>
> I am not against evaluating alternatives, but the alternative approaches need to have similar (not the same) performance.
>
>>
>> Konstantin
^ permalink raw reply [relevance 0%]
* [PATCH v7] sched: enable CMAN at runtime
@ 2022-07-04 9:19 1% ` Marcin Danilewicz
2022-07-05 17:05 1% ` [PATCH v8] " Marcin Danilewicz
0 siblings, 1 reply; 200+ results
From: Marcin Danilewicz @ 2022-07-04 9:19 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
Log: v2 change in rte_sched.h to avoid ABI breakage.
v3 changes from comments
v4 rebase to 22.07-rc1
v5 rebase to main latest
v6 commit message fixed
v7 changes from comments
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 4 -
examples/qos_sched/cfg_file.c | 11 +-
examples/qos_sched/cfg_file.h | 2 -
examples/qos_sched/init.c | 4 -
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 135 +--------------------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 47 +-------
11 files changed, 295 insertions(+), 210 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 46549cb062..ae56a86394 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-// RTE_SCHED_CMAN is not set
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3e4bed81e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-#define WRED_SUPPORTED 1
-#else
#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..e68e9961be 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,7 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
static struct rte_sched_cman_params cman_params = {
.red_params = {
/* Traffic Class 0 Colors Green / Yellow / Red */
@@ -86,7 +85,6 @@ static struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
static uint32_t n_pipe_profiles;
@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..3284b4d252 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -229,11 +229,14 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
struct rte_sched_cman_params cman_p)
{
int j, k;
+
+ if (subport_p->cman_params != NULL)
+ return;
+
subport_p->cman_params->cman_mode = cman_p.cman_mode;
for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
@@ -261,7 +264,6 @@ void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
}
}
}
-#endif
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
@@ -276,9 +278,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
.red_params = { },
};
@@ -387,7 +387,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +464,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
set_subport_cman_params(subport_params+i, cman_params);
-#endif
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..19df91e7ba 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,10 +12,8 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
struct rte_sched_cman_params cman_p);
-#endif
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..0afd553283 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,7 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
struct rte_sched_cman_params cman_params = {
.cman_mode = RTE_SCHED_CMAN_RED,
.red_params = {
@@ -271,7 +270,6 @@ struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
@@ -281,9 +279,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..c9ec187c93 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -73,137 +73,4 @@ tc period = 40 ; Milliseconds
tc 12 oversubscription weight = 1
-tc 12 wrr weights = 1 1 1 1
-
-; RED params per traffic class and color (Green / Yellow / Red)
-;[red]
-;tc 0 wred min = 48 40 32
-;tc 0 wred max = 64 64 64
-;tc 0 wred inv prob = 10 10 10
-;tc 0 wred weight = 9 9 9
-
-;tc 1 wred min = 48 40 32
-;tc 1 wred max = 64 64 64
-;tc 1 wred inv prob = 10 10 10
-;tc 1 wred weight = 9 9 9
-
-;tc 2 wred min = 48 40 32
-;tc 2 wred max = 64 64 64
-;tc 2 wred inv prob = 10 10 10
-;tc 2 wred weight = 9 9 9
-
-;tc 3 wred min = 48 40 32
-;tc 3 wred max = 64 64 64
-;tc 3 wred inv prob = 10 10 10
-;tc 3 wred weight = 9 9 9
-
-;tc 4 wred min = 48 40 32
-;tc 4 wred max = 64 64 64
-;tc 4 wred inv prob = 10 10 10
-;tc 4 wred weight = 9 9 9
-
-;tc 5 wred min = 48 40 32
-;tc 5 wred max = 64 64 64
-;tc 5 wred inv prob = 10 10 10
-;tc 5 wred weight = 9 9 9
-
-;tc 6 wred min = 48 40 32
-;tc 6 wred max = 64 64 64
-;tc 6 wred inv prob = 10 10 10
-;tc 6 wred weight = 9 9 9
-
-;tc 7 wred min = 48 40 32
-;tc 7 wred max = 64 64 64
-;tc 7 wred inv prob = 10 10 10
-;tc 7 wred weight = 9 9 9
-
-;tc 8 wred min = 48 40 32
-;tc 8 wred max = 64 64 64
-;tc 8 wred inv prob = 10 10 10
-;tc 8 wred weight = 9 9 9
-
-;tc 9 wred min = 48 40 32
-;tc 9 wred max = 64 64 64
-;tc 9 wred inv prob = 10 10 10
-;tc 9 wred weight = 9 9 9
-
-;tc 10 wred min = 48 40 32
-;tc 10 wred max = 64 64 64
-;tc 10 wred inv prob = 10 10 10
-;tc 10 wred weight = 9 9 9
-
-;tc 11 wred min = 48 40 32
-;tc 11 wred max = 64 64 64
-;tc 11 wred inv prob = 10 10 10
-;tc 11 wred weight = 9 9 9
-
-;tc 12 wred min = 48 40 32
-;tc 12 wred max = 64 64 64
-;tc 12 wred inv prob = 10 10 10
-;tc 12 wred weight = 9 9 9
-
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+tc 12 wrr weights = 1 1 1 1
\ No newline at end of file
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 599c7e9536..c5fa9e4582 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1084,7 +1080,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1166,7 +1161,6 @@ rte_sched_cman_config(struct rte_sched_port *port,
return -EINVAL;
}
-#endif
int
rte_sched_subport_tc_ov_config(struct rte_sched_port *port,
@@ -1285,7 +1279,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
/* TC oversubscription is enabled by default */
s->tc_ov_enabled = 1;
-#ifdef RTE_SCHED_CMAN
if (params->cman_params != NULL) {
s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
@@ -1297,7 +1290,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
} else {
s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1823,7 +1815,7 @@ rte_sched_port_update_subport_stats_on_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
uint32_t tc_index = rte_sched_port_pipe_tc(port, qindex);
uint32_t pkt_len = pkt->pkt_len;
@@ -1849,21 +1841,17 @@ static inline void
rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
uint32_t pkt_len = pkt->pkt_len;
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1908,13 +1896,11 @@ static inline void
rte_sched_port_red_set_queue_empty_timestamp(struct rte_sched_port *port,
struct rte_sched_subport *subport, uint32_t qindex)
{
- if (subport->cman_enabled) {
+ if (subport->cman_enabled && subport->cman == RTE_SCHED_CMAN_RED) {
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
- if (subport->cman == RTE_SCHED_CMAN_RED) {
- struct rte_red *red = &qe->red;
+ struct rte_red *red = &qe->red;
- rte_red_mark_queue_empty(red, port->time);
- }
+ rte_red_mark_queue_empty(red, port->time);
}
}
@@ -1933,29 +1919,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
--
2.25.1
^ permalink raw reply [relevance 1%]
* Re: [PATCH] doc: announce marking bus object as internal
2022-06-30 9:41 8% [PATCH] doc: announce marking bus object as internal David Marchand
2022-06-30 9:54 0% ` Bruce Richardson
@ 2022-07-04 14:29 0% ` Kevin Laatz
2022-07-05 4:43 0% ` Hemant Agrawal
2022-07-15 16:16 0% ` Thomas Monjalon
2 siblings, 1 reply; 200+ results
From: Kevin Laatz @ 2022-07-04 14:29 UTC (permalink / raw)
To: David Marchand, dev, techboard; +Cc: Ray Kinsella
On 30/06/2022 10:41, David Marchand wrote:
> rte_bus is unnecessarily exposed in the public API/ABI.
> Besides, we had cases where extending rte_bus was necessary.
> Announce that rte_bus will be made opaque in the public API and mark
> associated API as internal.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> A RFC series of the intended changes is available at:
> https://patches.dpdk.org/project/dpdk/list/?series=23811&state=%2A&archive=both
>
> ---
> doc/guides/rel_notes/deprecation.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking bus object as internal
2022-07-04 14:29 0% ` Kevin Laatz
@ 2022-07-05 4:43 0% ` Hemant Agrawal
2022-07-05 6:59 0% ` Andrew Rybchenko
0 siblings, 1 reply; 200+ results
From: Hemant Agrawal @ 2022-07-05 4:43 UTC (permalink / raw)
To: Kevin Laatz, David Marchand, dev, techboard; +Cc: Ray Kinsella
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
On 7/4/2022 7:59 PM, Kevin Laatz wrote:
> On 30/06/2022 10:41, David Marchand wrote:
>> rte_bus is unnecessarily exposed in the public API/ABI.
>> Besides, we had cases where extending rte_bus was necessary.
>> Announce that rte_bus will be made opaque in the public API and mark
>> associated API as internal.
>>
>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>> ---
>> A RFC series of the intended changes is available at:
>> https://patches.dpdk.org/project/dpdk/list/?series=23811&state=%2A&archive=both
>>
>>
>> ---
>> doc/guides/rel_notes/deprecation.rst | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
> Acked-by: Kevin Laatz <kevin.laatz@intel.com>
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking bus object as internal
2022-07-05 4:43 0% ` Hemant Agrawal
@ 2022-07-05 6:59 0% ` Andrew Rybchenko
0 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-07-05 6:59 UTC (permalink / raw)
To: hemant.agrawal, Kevin Laatz, David Marchand, dev, techboard; +Cc: Ray Kinsella
On 7/5/22 07:43, Hemant Agrawal wrote:
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>
> On 7/4/2022 7:59 PM, Kevin Laatz wrote:
>> On 30/06/2022 10:41, David Marchand wrote:
>>> rte_bus is unnecessarily exposed in the public API/ABI.
>>> Besides, we had cases where extending rte_bus was necessary.
>>> Announce that rte_bus will be made opaque in the public API and mark
>>> associated API as internal.
>>>
>>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>>> ---
>>> A RFC series of the intended changes is available at:
>>> https://patches.dpdk.org/project/dpdk/list/?series=23811&state=%2A&archive=both
>>>
>>>
>>> ---
>>> doc/guides/rel_notes/deprecation.rst | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>> Acked-by: Kevin Laatz <kevin.laatz@intel.com>
>>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4] doc: announce changes in bbdev related to enum extension
@ 2022-07-05 15:45 0% ` Bruce Richardson
2022-07-17 9:48 0% ` Thomas Monjalon
2 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2022-07-05 15:45 UTC (permalink / raw)
To: Nicolas Chautru
Cc: dev, gakhil, thomas, maxime.coquelin, trix, ray.kinsella,
hemant.agrawal, david.marchand, stephen
On Wed, Jun 08, 2022 at 05:34:30PM -0700, Nicolas Chautru wrote:
> Intent to resolve in DPDK 22.11 historical usage which prevents
> graceful extension of enum and API without troublesome ABI breakage
> as well as extending API RTE_BBDEV_OP_FFT for new operation type
> in bbdev as well as other new members in existing structures.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [relevance 0%]
* [PATCH v8] sched: enable CMAN at runtime
2022-07-04 9:19 1% ` [PATCH v7] " Marcin Danilewicz
@ 2022-07-05 17:05 1% ` Marcin Danilewicz
2022-07-05 18:00 0% ` Ajmera, Megha
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Marcin Danilewicz @ 2022-07-05 17:05 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
Log: v2 change in rte_sched.h to avoid ABI breakage.
v3 changes from comments
v4 rebase to 22.07-rc1
v5 rebase to main latest
v6 commit message fixed
v7 changes from comments
v8 with changes from comments
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 4 -
examples/qos_sched/cfg_file.c | 47 +-------
examples/qos_sched/cfg_file.h | 5 -
examples/qos_sched/init.c | 76 +-----------
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 135 +--------------------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 47 +-------
11 files changed, 296 insertions(+), 320 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 46549cb062..ae56a86394 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-// RTE_SCHED_CMAN is not set
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3e4bed81e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-#define WRED_SUPPORTED 1
-#else
#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..e68e9961be 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,7 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
static struct rte_sched_cman_params cman_params = {
.red_params = {
/* Traffic Class 0 Colors Green / Yellow / Red */
@@ -86,7 +85,6 @@ static struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
static uint32_t n_pipe_profiles;
@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..7f4114bd56 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -23,6 +23,8 @@
uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
uint32_t n_active_queues;
+struct rte_sched_cman_params cman_params;
+
int
cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params)
{
@@ -229,40 +231,6 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p)
-{
- int j, k;
- subport_p->cman_params->cman_mode = cman_p.cman_mode;
-
- for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
- if (subport_p->cman_params->cman_mode ==
- RTE_SCHED_CMAN_RED) {
- for (k = 0; k < RTE_COLORS; k++) {
- subport_p->cman_params->red_params[j][k].min_th =
- cman_p.red_params[j][k].min_th;
- subport_p->cman_params->red_params[j][k].max_th =
- cman_p.red_params[j][k].max_th;
- subport_p->cman_params->red_params[j][k].maxp_inv =
- cman_p.red_params[j][k].maxp_inv;
- subport_p->cman_params->red_params[j][k].wq_log2 =
- cman_p.red_params[j][k].wq_log2;
- }
- } else {
- subport_p->cman_params->pie_params[j].qdelay_ref =
- cman_p.pie_params[j].qdelay_ref;
- subport_p->cman_params->pie_params[j].dp_update_interval =
- cman_p.pie_params[j].dp_update_interval;
- subport_p->cman_params->pie_params[j].max_burst =
- cman_p.pie_params[j].max_burst;
- subport_p->cman_params->pie_params[j].tailq_th =
- cman_p.pie_params[j].tailq_th;
- }
- }
-}
-#endif
-
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
{
@@ -276,11 +244,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
- struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = { },
- };
+ subport_params->cman_params = NULL;
if (rte_cfgfile_has_section(cfg, "red")) {
cman_params.cman_mode = RTE_SCHED_CMAN_RED;
@@ -387,7 +351,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +428,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
- set_subport_cman_params(subport_params+i, cman_params);
-#endif
+ subport_params[i].cman_params = &cman_params;
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..0dc458aa71 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,11 +12,6 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p);
-#endif
-
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
int cfg_load_subport_profile(struct rte_cfgfile *cfg,
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..e8b819ffb9 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,78 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
-struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = {
- /* Traffic Class 0 Colors Green / Yellow / Red */
- [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 1 - Colors Green / Yellow / Red */
- [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 2 - Colors Green / Yellow / Red */
- [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 3 - Colors Green / Yellow / Red */
- [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 4 - Colors Green / Yellow / Red */
- [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 5 - Colors Green / Yellow / Red */
- [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 6 - Colors Green / Yellow / Red */
- [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 7 - Colors Green / Yellow / Red */
- [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 8 - Colors Green / Yellow / Red */
- [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 9 - Colors Green / Yellow / Red */
- [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 10 - Colors Green / Yellow / Red */
- [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 11 - Colors Green / Yellow / Red */
- [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 12 - Colors Green / Yellow / Red */
- [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- },
-};
-#endif /* RTE_SCHED_CMAN */
-
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
.n_pipes_per_subport_enabled = 4096,
@@ -281,9 +209,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..c9ec187c93 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -73,137 +73,4 @@ tc period = 40 ; Milliseconds
tc 12 oversubscription weight = 1
-tc 12 wrr weights = 1 1 1 1
-
-; RED params per traffic class and color (Green / Yellow / Red)
-;[red]
-;tc 0 wred min = 48 40 32
-;tc 0 wred max = 64 64 64
-;tc 0 wred inv prob = 10 10 10
-;tc 0 wred weight = 9 9 9
-
-;tc 1 wred min = 48 40 32
-;tc 1 wred max = 64 64 64
-;tc 1 wred inv prob = 10 10 10
-;tc 1 wred weight = 9 9 9
-
-;tc 2 wred min = 48 40 32
-;tc 2 wred max = 64 64 64
-;tc 2 wred inv prob = 10 10 10
-;tc 2 wred weight = 9 9 9
-
-;tc 3 wred min = 48 40 32
-;tc 3 wred max = 64 64 64
-;tc 3 wred inv prob = 10 10 10
-;tc 3 wred weight = 9 9 9
-
-;tc 4 wred min = 48 40 32
-;tc 4 wred max = 64 64 64
-;tc 4 wred inv prob = 10 10 10
-;tc 4 wred weight = 9 9 9
-
-;tc 5 wred min = 48 40 32
-;tc 5 wred max = 64 64 64
-;tc 5 wred inv prob = 10 10 10
-;tc 5 wred weight = 9 9 9
-
-;tc 6 wred min = 48 40 32
-;tc 6 wred max = 64 64 64
-;tc 6 wred inv prob = 10 10 10
-;tc 6 wred weight = 9 9 9
-
-;tc 7 wred min = 48 40 32
-;tc 7 wred max = 64 64 64
-;tc 7 wred inv prob = 10 10 10
-;tc 7 wred weight = 9 9 9
-
-;tc 8 wred min = 48 40 32
-;tc 8 wred max = 64 64 64
-;tc 8 wred inv prob = 10 10 10
-;tc 8 wred weight = 9 9 9
-
-;tc 9 wred min = 48 40 32
-;tc 9 wred max = 64 64 64
-;tc 9 wred inv prob = 10 10 10
-;tc 9 wred weight = 9 9 9
-
-;tc 10 wred min = 48 40 32
-;tc 10 wred max = 64 64 64
-;tc 10 wred inv prob = 10 10 10
-;tc 10 wred weight = 9 9 9
-
-;tc 11 wred min = 48 40 32
-;tc 11 wred max = 64 64 64
-;tc 11 wred inv prob = 10 10 10
-;tc 11 wred weight = 9 9 9
-
-;tc 12 wred min = 48 40 32
-;tc 12 wred max = 64 64 64
-;tc 12 wred inv prob = 10 10 10
-;tc 12 wred weight = 9 9 9
-
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+tc 12 wrr weights = 1 1 1 1
\ No newline at end of file
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 599c7e9536..c5fa9e4582 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1084,7 +1080,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1166,7 +1161,6 @@ rte_sched_cman_config(struct rte_sched_port *port,
return -EINVAL;
}
-#endif
int
rte_sched_subport_tc_ov_config(struct rte_sched_port *port,
@@ -1285,7 +1279,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
/* TC oversubscription is enabled by default */
s->tc_ov_enabled = 1;
-#ifdef RTE_SCHED_CMAN
if (params->cman_params != NULL) {
s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
@@ -1297,7 +1290,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
} else {
s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1823,7 +1815,7 @@ rte_sched_port_update_subport_stats_on_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
uint32_t tc_index = rte_sched_port_pipe_tc(port, qindex);
uint32_t pkt_len = pkt->pkt_len;
@@ -1849,21 +1841,17 @@ static inline void
rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
uint32_t pkt_len = pkt->pkt_len;
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1908,13 +1896,11 @@ static inline void
rte_sched_port_red_set_queue_empty_timestamp(struct rte_sched_port *port,
struct rte_sched_subport *subport, uint32_t qindex)
{
- if (subport->cman_enabled) {
+ if (subport->cman_enabled && subport->cman == RTE_SCHED_CMAN_RED) {
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
- if (subport->cman == RTE_SCHED_CMAN_RED) {
- struct rte_red *red = &qe->red;
+ struct rte_red *red = &qe->red;
- rte_red_mark_queue_empty(red, port->time);
- }
+ rte_red_mark_queue_empty(red, port->time);
}
}
@@ -1933,29 +1919,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
--
2.25.1
^ permalink raw reply [relevance 1%]
* RE: [PATCH v8] sched: enable CMAN at runtime
2022-07-05 17:05 1% ` [PATCH v8] " Marcin Danilewicz
@ 2022-07-05 18:00 0% ` Ajmera, Megha
2022-07-06 8:53 0% ` Singh, Jasvinder
2022-07-08 13:14 1% ` [PATCH v9] " Marcin Danilewicz
2 siblings, 0 replies; 200+ results
From: Ajmera, Megha @ 2022-07-05 18:00 UTC (permalink / raw)
To: Danilewicz, MarcinX, dev, Singh, Jasvinder, Dumitrescu, Cristian
>
> Added changes to enable CMAN (RED or PIE) at init from profile configuration
> file.
>
> By default CMAN code is enable but not in use, when there is no RED or PIE
> profile configured.
>
> Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> ---
> Log: v2 change in rte_sched.h to avoid ABI breakage.
> v3 changes from comments
> v4 rebase to 22.07-rc1
> v5 rebase to main latest
> v6 commit message fixed
> v7 changes from comments
> v8 with changes from comments
> ---
> config/rte_config.h | 3 -
> drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
> examples/ip_pipeline/tmgr.c | 4 -
> examples/qos_sched/cfg_file.c | 47 +-------
> examples/qos_sched/cfg_file.h | 5 -
> examples/qos_sched/init.c | 76 +-----------
> examples/qos_sched/main.h | 2 -
> examples/qos_sched/profile.cfg | 135 +--------------------
> examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
> examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
> lib/sched/rte_sched.c | 47 +-------
> 11 files changed, 296 insertions(+), 320 deletions(-) create mode 100644
> examples/qos_sched/profile_pie.cfg
> create mode 100644 examples/qos_sched/profile_red.cfg
>
> diff --git a/config/rte_config.h b/config/rte_config.h index
> 46549cb062..ae56a86394 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -88,9 +88,6 @@
> /* rte_power defines */
> #define RTE_MAX_LCORE_FREQS 64
>
> -/* rte_sched defines */
> -// RTE_SCHED_CMAN is not set
> -
> /* rte_graph defines */
> #define RTE_GRAPH_BURST_SIZE 256
> #define RTE_LIBRTE_GRAPH_STATS 1
> diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c
> b/drivers/net/softnic/rte_eth_softnic_tm.c
> index 6a7766ba1c..3e4bed81e9 100644
> --- a/drivers/net/softnic/rte_eth_softnic_tm.c
> +++ b/drivers/net/softnic/rte_eth_softnic_tm.c
> @@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
> return 0;
> }
>
> -#ifdef RTE_SCHED_CMAN
> -#define WRED_SUPPORTED 1
> -#else
> #define WRED_SUPPORTED 0
> -#endif
>
> #define STATS_MASK_DEFAULT \
> (RTE_TM_STATS_N_PKTS | \
> @@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev,
> uint32_t tc_id)
> return NULL;
> }
>
> -#ifdef RTE_SCHED_CMAN
> -
> static void
> wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id) { @@ -
> 2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t
> subport_id)
> }
> }
>
> -#else
> -
> -#define wred_profiles_set(dev, subport_id)
> -
> -#endif
> -
> static struct tm_shared_shaper *
> tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node) {
> diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c index
> b138e885cf..e68e9961be 100644
> --- a/examples/ip_pipeline/tmgr.c
> +++ b/examples/ip_pipeline/tmgr.c
> @@ -17,7 +17,6 @@ static uint32_t n_subport_profiles; static struct
> rte_sched_pipe_params
> pipe_profile[TMGR_PIPE_PROFILE_MAX];
>
> -#ifdef RTE_SCHED_CMAN
> static struct rte_sched_cman_params cman_params = {
> .red_params = {
> /* Traffic Class 0 Colors Green / Yellow / Red */ @@ -86,7
> +85,6 @@ static struct rte_sched_cman_params cman_params = {
> [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2
> = 9},
> },
> };
> -#endif /* RTE_SCHED_CMAN */
>
> static uint32_t n_pipe_profiles;
>
> @@ -96,9 +94,7 @@ static const struct rte_sched_subport_params
> subport_params_default = {
> .pipe_profiles = pipe_profile,
> .n_pipe_profiles = 0, /* filled at run time */
> .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef
> RTE_SCHED_CMAN
> .cman_params = &cman_params,
> -#endif /* RTE_SCHED_CMAN */
> };
>
> static struct tmgr_port_list tmgr_port_list; diff --git
> a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index
> 450482f07d..7f4114bd56 100644
> --- a/examples/qos_sched/cfg_file.c
> +++ b/examples/qos_sched/cfg_file.c
> @@ -23,6 +23,8 @@
> uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
> uint32_t n_active_queues;
>
> +struct rte_sched_cman_params cman_params;
> +
> int
> cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params
> *port_params) { @@ -229,40 +231,6 @@ cfg_load_subport_profile(struct
> rte_cfgfile *cfg,
> return 0;
> }
>
> -#ifdef RTE_SCHED_CMAN
> -void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
> - struct rte_sched_cman_params
> cman_p)
> -{
> - int j, k;
> - subport_p->cman_params->cman_mode = cman_p.cman_mode;
> -
> - for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
> - if (subport_p->cman_params->cman_mode ==
> - RTE_SCHED_CMAN_RED) {
> - for (k = 0; k < RTE_COLORS; k++) {
> - subport_p->cman_params-
> >red_params[j][k].min_th =
> - cman_p.red_params[j][k].min_th;
> - subport_p->cman_params-
> >red_params[j][k].max_th =
> - cman_p.red_params[j][k].max_th;
> - subport_p->cman_params-
> >red_params[j][k].maxp_inv =
> - cman_p.red_params[j][k].maxp_inv;
> - subport_p->cman_params-
> >red_params[j][k].wq_log2 =
> - cman_p.red_params[j][k].wq_log2;
> - }
> - } else {
> - subport_p->cman_params->pie_params[j].qdelay_ref =
> - cman_p.pie_params[j].qdelay_ref;
> - subport_p->cman_params-
> >pie_params[j].dp_update_interval =
> - cman_p.pie_params[j].dp_update_interval;
> - subport_p->cman_params->pie_params[j].max_burst =
> - cman_p.pie_params[j].max_burst;
> - subport_p->cman_params->pie_params[j].tailq_th =
> - cman_p.pie_params[j].tailq_th;
> - }
> - }
> -}
> -#endif
> -
> int
> cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params
> *subport_params) { @@ -276,11 +244,7 @@ cfg_load_subport(struct
> rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
> memset(active_queues, 0, sizeof(active_queues));
> n_active_queues = 0;
>
> -#ifdef RTE_SCHED_CMAN
> - struct rte_sched_cman_params cman_params = {
> - .cman_mode = RTE_SCHED_CMAN_RED,
> - .red_params = { },
> - };
> + subport_params->cman_params = NULL;
>
> if (rte_cfgfile_has_section(cfg, "red")) {
> cman_params.cman_mode = RTE_SCHED_CMAN_RED; @@ -
> 387,7 +351,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct
> rte_sched_subport_params *subpo
>
> }
> }
Here only mode is set to RTE_SCHED_CMAN_RED. But I could not find the place where cman_params are set from cfg_file (for e.g. red_params). Can you clarify?
^ permalink raw reply [relevance 0%]
* [PATCH v4 0/7] bbdev changes for 22.11
2022-06-28 1:35 4% ` [PATCH v3 0/7] bbdev changes for 22.11 Nicolas Chautru
@ 2022-07-06 0:23 4% ` Nicolas Chautru
2022-07-06 0:23 3% ` [PATCH v4 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
` (2 more replies)
2022-07-06 23:28 4% ` [PATCH v5 0/7] bbdev changes for 22.11 Nicolas Chautru
` (2 subsequent siblings)
4 siblings, 3 replies; 200+ results
From: Nicolas Chautru @ 2022-07-06 0:23 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
v4: update to the last 2 commits to include function to print the queue status and a fix to the rte_lock within the wrong structure
v3: update to device status info to also use padded size for the related array.
Adding also 2 additionals commits to allow the API struc to expose more information related to queues corner cases/warning as well as an optional rw lock.
Hemant, Maxime, this is planned for DPDK 21.11 but would like review/ack early is possible to get this applied earlier and due to time off this summer.
Thanks
Nic
--
Hi,
Agregating together in a single serie a number of bbdev api changes previously submitted over the last few months and all targeted for 22.11 (4 different series detailed below). Related deprecation notice being pushed in 22.07 in parallel.
* bbdev: add device status info
* bbdev: add new operation for FFT processing
* bbdev: add device info on queue topology
* bbdev: allow operation type enum for growth
v2: Update to the RTE_BBDEV_COUNT removal based on feedback from Thomas/Stephen : rejecting out of range op type and adjusting the new name for the padded maximum value used for fixed size arrays.
---
Previous cover letters agregated below:
* bbdev: add device status info
https://patches.dpdk.org/project/dpdk/list/?series=23367
The updated structure will allow PMDs to expose through info_get what be may the status of the underlying accelerator, notably in case an HW error event having happened.
* bbdev: add new operation for FFT processing
https://patches.dpdk.org/project/dpdk/list/?series=22111
This contribution adds a new operation type to the existing ones already supported by the bbdev PMDs.
This set of operation is FFT-based processing for 5GNR baseband processing acceleration. This operates in the same lookaside fashion as other existing bbdev operation with a dedicated set of capabilities and parameters (marked as experimental).
I plan to also include a new PMD supporting this operation (and most of the related capabilities) in the next couple of months (either in 22.06 or 22.09) as well as extending the related bbdev-test.
* bbdev: add device info on queue topology
https://patches.dpdk.org/project/dpdk/list/?series=22076
Addressing an historical concern that the device info struct only imperfectly captured what queues are available on the device (number of operation and priority). This ended up being an iterative process for application to find each queue could be configured.
ie. the gap was captured as technical debt previously in comments
/* This isn't ideal because it reports the maximum number of queues but
* does not provide info on how many can be uplink/downlink or different
* priorities
*/
This is now being exposed explictly based on the what the device actually supports using the existing info_get api
* bbdev: allow operation type enum for growth
https://patches.dpdk.org/project/dpdk/list/?series=23509
This is related to the general intent to remove using MAX value for enums. There is consensus that we should avoid this for a while notably for future-proofed ABI concerns https://patches.dpdk.org/project/dpdk/patch/20200130142003.2645765-1-ferruh.yigit@intel.com/.
But still there is arguably not yet an explicit best recommendation to handle this especially when we actualy need to expose array whose index is such an enum.
As a specific example here I am refering to RTE_BBDEV_OP_TYPE_COUNT in enum rte_bbdev_op_type which is being extended for new operation type being support in bbdev (such as https://patches.dpdk.org/project/dpdk/patch/1646956157-245769-2-git-send-email-nicolas.chautru@intel.com/ adding new FFT operation)
There is also the intent to be able to expose information for each operation type through the bbdev api such as dynamically configured queues information per such operation type https://patches.dpdk.org/project/dpdk/patch/1646785355-168133-2-git-send-email-nicolas.chautru@intel.com/
Basically we are considering best way to accomodate for this, notably based on discussions with Ray Kinsella and Bruce Richardson, to handle such a case moving forward: specifically for the example with RTE_BBDEV_OP_TYPE_COUNT and also more generally.
One possible option is captured in that patchset and is basically based on the simple principle to allow for growth and prevent ABI breakage. Ie. the last value of the enum is set with a higher value than required so that to allow insertion of new enum outside of the major ABI versions.
In that case the RTE_BBDEV_OP_TYPE_COUNT is still present and can be exposed and used while still allowing for addition thanks to the implicit padding-like room. As an alternate variant, instead of using that last enum value, that extended size could be exposed as an #define outside of the enum but would be fundamentally the same (public).
Another option would be to avoid array alltogether and use each time this a new dedicated API function (operation type enum being an input argument instead of an index to an array in an existing structure so that to get access to structure related to a given operation type enum) but that is arguably not well scalable within DPDK to use such a scheme for each enums and keep an uncluttered and clean API. In that very example that would be very odd indeed not to get this simply from info_get().
Some pros and cons, arguably the simple option in that patchset is a valid compromise option and a step in the right direction but we would like to know your view wrt best recommendation, or any other thought.
Nicolas Chautru (7):
bbdev: allow operation type enum for growth
bbdev: add device status info
bbdev: add device info on queue topology
drivers/baseband: update PMDs to expose queue per operation
bbdev: add new operation for FFT processing
bbdev: add queue related warning and status information
bbdev: add a lock option for enqueue/dequeue operation
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 6 +-
doc/guides/prog_guide/bbdev.rst | 130 ++++++++++++++++++
drivers/baseband/acc100/rte_acc100_pmd.c | 30 ++--
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 9 ++
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 9 ++
drivers/baseband/la12xx/bbdev_la12xx.c | 10 +-
drivers/baseband/null/bbdev_null.c | 1 +
drivers/baseband/turbo_sw/bbdev_turbo_software.c | 12 ++
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 61 ++++++++-
lib/bbdev/rte_bbdev.h | 151 ++++++++++++++++++++-
lib/bbdev/rte_bbdev_op.h | 151 ++++++++++++++++++++-
lib/bbdev/version.map | 11 ++
14 files changed, 562 insertions(+), 23 deletions(-)
--
1.8.3.1
^ permalink raw reply [relevance 4%]
* [PATCH v4 1/7] bbdev: allow operation type enum for growth
2022-07-06 0:23 4% ` [PATCH v4 0/7] bbdev changes for 22.11 Nicolas Chautru
@ 2022-07-06 0:23 3% ` Nicolas Chautru
2022-07-06 12:50 0% ` Tom Rix
2 siblings, 1 reply; 200+ results
From: Nicolas Chautru @ 2022-07-06 0:23 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
Updating the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_PADDED_MAX.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 4 ++--
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 9 +++++----
lib/bbdev/rte_bbdev_op.h | 2 +-
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index ac06d73..1063f6e 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
rte_mempool_free(mp);
TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
- RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) == NULL,
+ RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size, 0)) == NULL,
"Failed test for rte_bbdev_op_pool_create: "
"returned value is not NULL for invalid type");
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index fad3b1e..1abda2d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct active_device *ad,
/* Find capabilities */
const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
- for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
+ do {
if (cap->type == test_vector.op_type) {
capabilities = cap;
break;
}
cap++;
- }
+ } while (cap->type != RTE_BBDEV_OP_NONE);
TEST_ASSERT_NOT_NULL(capabilities,
"Couldn't find capabilities");
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8..ef0ba76 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
void *sigret;
struct app_config_params app_params = def_app_config;
struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool;
- struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
+ struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
struct stats_lcore_params stats_lcore;
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index aaee7b7..22bd894 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -23,6 +23,8 @@
#define DEV_NAME "BBDEV"
+/* Number of supported operation types */
+#define BBDEV_OP_TYPE_COUNT 5
/* BBDev library logging ID */
RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
@@ -890,10 +892,10 @@ struct rte_mempool *
return NULL;
}
- if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
+ if (type >= BBDEV_OP_TYPE_COUNT) {
rte_bbdev_log(ERR,
"Invalid op type (%u), should be less than %u",
- type, RTE_BBDEV_OP_TYPE_COUNT);
+ type, BBDEV_OP_TYPE_COUNT);
return NULL;
}
@@ -1122,10 +1124,9 @@ struct rte_mempool *
"RTE_BBDEV_OP_TURBO_DEC",
"RTE_BBDEV_OP_TURBO_ENC",
"RTE_BBDEV_OP_LDPC_DEC",
- "RTE_BBDEV_OP_LDPC_ENC",
};
- if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
+ if (op_type < BBDEV_OP_TYPE_COUNT)
return op_types[op_type];
rte_bbdev_log(ERR, "Invalid operation type");
diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h
index 6d56133..cd82418 100644
--- a/lib/bbdev/rte_bbdev_op.h
+++ b/lib/bbdev/rte_bbdev_op.h
@@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
- RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
+ RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type number including padding */
};
/** Bit indexes of possible errors reported through status field */
--
1.8.3.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH v8] sched: enable CMAN at runtime
2022-07-05 17:05 1% ` [PATCH v8] " Marcin Danilewicz
2022-07-05 18:00 0% ` Ajmera, Megha
@ 2022-07-06 8:53 0% ` Singh, Jasvinder
2022-07-07 13:07 0% ` Danilewicz, MarcinX
2022-07-08 13:14 1% ` [PATCH v9] " Marcin Danilewicz
2 siblings, 1 reply; 200+ results
From: Singh, Jasvinder @ 2022-07-06 8:53 UTC (permalink / raw)
To: Danilewicz, MarcinX, dev, Dumitrescu, Cristian; +Cc: Ajmera, Megha
> -----Original Message-----
> From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> Sent: Tuesday, July 5, 2022 6:06 PM
> To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>
> Subject: [PATCH v8] sched: enable CMAN at runtime
>
> Added changes to enable CMAN (RED or PIE) at init from profile configuration
> file.
>
> By default CMAN code is enable but not in use, when there is no RED or PIE
> profile configured.
>
> Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> ---
> Log: v2 change in rte_sched.h to avoid ABI breakage.
> v3 changes from comments
> v4 rebase to 22.07-rc1
> v5 rebase to main latest
> v6 commit message fixed
> v7 changes from comments
> v8 with changes from comments
You need to explicitly mention the changes done in each version to help reviewer easily locate the changes.
> config/rte_config.h | 3 -
> drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
> examples/ip_pipeline/tmgr.c | 4 -
> examples/qos_sched/cfg_file.c | 47 +-------
> examples/qos_sched/cfg_file.h | 5 -
> examples/qos_sched/init.c | 76 +-----------
> examples/qos_sched/main.h | 2 -
> examples/qos_sched/profile.cfg | 135 +--------------------
> examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
> examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
> lib/sched/rte_sched.c | 47 +-------
> 11 files changed, 296 insertions(+), 320 deletions(-) create mode 100644
> examples/qos_sched/profile_pie.cfg
> create mode 100644 examples/qos_sched/profile_red.cfg
>
> diff --git a/config/rte_config.h b/config/rte_config.h index
> 46549cb062..ae56a86394 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -88,9 +88,6 @@
> /* rte_power defines */
> #define RTE_MAX_LCORE_FREQS 64
>
> -/* rte_sched defines */
> -// RTE_SCHED_CMAN is not set
> -
> /* rte_graph defines */
> #define RTE_GRAPH_BURST_SIZE 256
> #define RTE_LIBRTE_GRAPH_STATS 1
> diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c
> b/drivers/net/softnic/rte_eth_softnic_tm.c
> index 6a7766ba1c..3e4bed81e9 100644
> --- a/drivers/net/softnic/rte_eth_softnic_tm.c
> +++ b/drivers/net/softnic/rte_eth_softnic_tm.c
> @@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
> return 0;
> }
>
> -#ifdef RTE_SCHED_CMAN
> -#define WRED_SUPPORTED 1
> -#else
> #define WRED_SUPPORTED 0
> -#endif
>
> #define STATS_MASK_DEFAULT \
> (RTE_TM_STATS_N_PKTS | \
> @@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev,
> uint32_t tc_id)
> return NULL;
> }
>
> -#ifdef RTE_SCHED_CMAN
> -
> static void
> wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id) { @@ -
> 2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t
> subport_id)
> }
> }
>
> -#else
> -
> -#define wred_profiles_set(dev, subport_id)
> -
> -#endif
> -
> static struct tm_shared_shaper *
> tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node
> *tc_node) { diff --git a/examples/ip_pipeline/tmgr.c
> b/examples/ip_pipeline/tmgr.c index b138e885cf..e68e9961be 100644
> --- a/examples/ip_pipeline/tmgr.c
> +++ b/examples/ip_pipeline/tmgr.c
> @@ -17,7 +17,6 @@ static uint32_t n_subport_profiles; static struct
> rte_sched_pipe_params
> pipe_profile[TMGR_PIPE_PROFILE_MAX];
>
> -#ifdef RTE_SCHED_CMAN
> static struct rte_sched_cman_params cman_params = {
> .red_params = {
> /* Traffic Class 0 Colors Green / Yellow / Red */ @@ -86,7
> +85,6 @@ static struct rte_sched_cman_params cman_params = {
> [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10,
> .wq_log2 = 9},
> },
> };
> -#endif /* RTE_SCHED_CMAN */
>
> static uint32_t n_pipe_profiles;
>
> @@ -96,9 +94,7 @@ static const struct rte_sched_subport_params
> subport_params_default = {
> .pipe_profiles = pipe_profile,
> .n_pipe_profiles = 0, /* filled at run time */
> .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef
> RTE_SCHED_CMAN
> .cman_params = &cman_params,
> -#endif /* RTE_SCHED_CMAN */
> };
Similar to what is discussed for qos_sched sample app, set cman_params to NULL and remove default parameters for "static struct rte_sched_cman_params cman_params" above.
> static struct tmgr_port_list tmgr_port_list; diff --git
> a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index
> 450482f07d..7f4114bd56 100644
> --- a/examples/qos_sched/cfg_file.c
> +++ b/examples/qos_sched/cfg_file.c
> @@ -23,6 +23,8 @@
> uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
> uint32_t n_active_queues;
>
> +struct rte_sched_cman_params cman_params;
> +
> int
> cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params
> *port_params) { @@ -229,40 +231,6 @@ cfg_load_subport_profile(struct
> rte_cfgfile *cfg,
> return 0;
> }
>
> -#ifdef RTE_SCHED_CMAN
> -void set_subport_cman_params(struct rte_sched_subport_params
> *subport_p,
> - struct rte_sched_cman_params
> cman_p)
> -{
> - int j, k;
> - subport_p->cman_params->cman_mode = cman_p.cman_mode;
> -
> - for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
> - if (subport_p->cman_params->cman_mode ==
> - RTE_SCHED_CMAN_RED) {
> - for (k = 0; k < RTE_COLORS; k++) {
> - subport_p->cman_params-
> >red_params[j][k].min_th =
> - cman_p.red_params[j][k].min_th;
> - subport_p->cman_params-
> >red_params[j][k].max_th =
> - cman_p.red_params[j][k].max_th;
> - subport_p->cman_params-
> >red_params[j][k].maxp_inv =
> - cman_p.red_params[j][k].maxp_inv;
> - subport_p->cman_params-
> >red_params[j][k].wq_log2 =
> - cman_p.red_params[j][k].wq_log2;
> - }
> - } else {
> - subport_p->cman_params-
> >pie_params[j].qdelay_ref =
> - cman_p.pie_params[j].qdelay_ref;
> - subport_p->cman_params-
> >pie_params[j].dp_update_interval =
> - cman_p.pie_params[j].dp_update_interval;
> - subport_p->cman_params-
> >pie_params[j].max_burst =
> - cman_p.pie_params[j].max_burst;
> - subport_p->cman_params->pie_params[j].tailq_th =
> - cman_p.pie_params[j].tailq_th;
> - }
> - }
> -}
> -#endif
> -
> int
> cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params
> *subport_params) { @@ -276,11 +244,7 @@ cfg_load_subport(struct
> rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
> memset(active_queues, 0, sizeof(active_queues));
> n_active_queues = 0;
>
> -#ifdef RTE_SCHED_CMAN
> - struct rte_sched_cman_params cman_params = {
> - .cman_mode = RTE_SCHED_CMAN_RED,
> - .red_params = { },
> - };
> + subport_params->cman_params = NULL;
No need to set subport_params->cman_params again to null as it is already set to NULL in init.c.
> if (rte_cfgfile_has_section(cfg, "red")) {
> cman_params.cman_mode = RTE_SCHED_CMAN_RED; @@ -
> 387,7 +351,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct
> rte_sched_subport_params *subpo
>
> }
> }
> -#endif /* RTE_SCHED_CMAN */
>
> for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
> char sec_name[CFG_NAME_LEN];
> @@ -465,9 +428,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct
> rte_sched_subport_params *subpo
> }
> }
> }
> -#ifdef RTE_SCHED_CMAN
> - set_subport_cman_params(subport_params+i,
> cman_params);
> -#endif
> + subport_params[i].cman_params = &cman_params;
Since cman_params_is global variable, memory is allocated regardless of whether cman mechanism is enabled or disabled. So subport_params->cman_params will never point to NULL even when red/pie is disabled. Define local flag "cman_enabled" and set his flag if red or pie is enabled and check this flag to set subport_params[i].cman_params to cman_params.
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4 1/7] bbdev: allow operation type enum for growth
2022-07-06 0:23 3% ` [PATCH v4 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
@ 2022-07-06 12:50 0% ` Tom Rix
2022-07-06 21:20 0% ` Chautru, Nicolas
0 siblings, 1 reply; 200+ results
From: Tom Rix @ 2022-07-06 12:50 UTC (permalink / raw)
To: Nicolas Chautru, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, bruce.richardson, david.marchand, stephen
On 7/5/22 5:23 PM, Nicolas Chautru wrote:
> Updating the enum for rte_bbdev_op_type
> to allow to keep ABI compatible for enum insertion
> while adding padded maximum value for array need.
> Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
> RTE_BBDEV_OP_TYPE_PADDED_MAX.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
> app/test-bbdev/test_bbdev.c | 2 +-
> app/test-bbdev/test_bbdev_perf.c | 4 ++--
> examples/bbdev_app/main.c | 2 +-
> lib/bbdev/rte_bbdev.c | 9 +++++----
> lib/bbdev/rte_bbdev_op.h | 2 +-
> 5 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
> index ac06d73..1063f6e 100644
> --- a/app/test-bbdev/test_bbdev.c
> +++ b/app/test-bbdev/test_bbdev.c
> @@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
> rte_mempool_free(mp);
>
> TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
> - RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) == NULL,
> + RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size, 0)) == NULL,
> "Failed test for rte_bbdev_op_pool_create: "
> "returned value is not NULL for invalid type");
>
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index fad3b1e..1abda2d 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct active_device *ad,
>
> /* Find capabilities */
> const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
> - for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
> + do {
> if (cap->type == test_vector.op_type) {
> capabilities = cap;
> break;
> }
> cap++;
> - }
> + } while (cap->type != RTE_BBDEV_OP_NONE);
> TEST_ASSERT_NOT_NULL(capabilities,
> "Couldn't find capabilities");
>
> diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
> index fc7e8b8..ef0ba76 100644
> --- a/examples/bbdev_app/main.c
> +++ b/examples/bbdev_app/main.c
> @@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
> void *sigret;
> struct app_config_params app_params = def_app_config;
> struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool;
> - struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
> + struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
> struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
> struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
> struct stats_lcore_params stats_lcore;
> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
> index aaee7b7..22bd894 100644
> --- a/lib/bbdev/rte_bbdev.c
> +++ b/lib/bbdev/rte_bbdev.c
> @@ -23,6 +23,8 @@
>
> #define DEV_NAME "BBDEV"
>
> +/* Number of supported operation types */
> +#define BBDEV_OP_TYPE_COUNT 5
>
> /* BBDev library logging ID */
> RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
> @@ -890,10 +892,10 @@ struct rte_mempool *
> return NULL;
> }
>
> - if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
> + if (type >= BBDEV_OP_TYPE_COUNT) {
> rte_bbdev_log(ERR,
> "Invalid op type (%u), should be less than %u",
> - type, RTE_BBDEV_OP_TYPE_COUNT);
> + type, BBDEV_OP_TYPE_COUNT);
> return NULL;
> }
>
> @@ -1122,10 +1124,9 @@ struct rte_mempool *
> "RTE_BBDEV_OP_TURBO_DEC",
> "RTE_BBDEV_OP_TURBO_ENC",
> "RTE_BBDEV_OP_LDPC_DEC",
> - "RTE_BBDEV_OP_LDPC_ENC",
> };
>
> - if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
> + if (op_type < BBDEV_OP_TYPE_COUNT)
> return op_types[op_type];
>
> rte_bbdev_log(ERR, "Invalid operation type");
> diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h
> index 6d56133..cd82418 100644
> --- a/lib/bbdev/rte_bbdev_op.h
> +++ b/lib/bbdev/rte_bbdev_op.h
> @@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
> RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
> RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
> RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
> - RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
Why not keep this enum so you don't have to make the BBDEV_OP_TYPE_COUNT
#define ?
Tom
> + RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type number including padding */
> };
>
> /** Bit indexes of possible errors reported through status field */
^ permalink raw reply [relevance 0%]
* RE: [PATCH v4 3/7] bbdev: add device info on queue topology
@ 2022-07-06 21:12 3% ` Chautru, Nicolas
2022-07-07 13:34 0% ` Tom Rix
0 siblings, 1 reply; 200+ results
From: Chautru, Nicolas @ 2022-07-06 21:12 UTC (permalink / raw)
To: Tom Rix, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
Hi Tom,
> -----Original Message-----
> From: Tom Rix <trix@redhat.com>
> Subject: Re: [PATCH v4 3/7] bbdev: add device info on queue topology
>
>
> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
> > Adding more options in the API to expose the number of queues exposed
> > and related priority.
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > ---
> > lib/bbdev/rte_bbdev.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
> > 9b1ffa4..ac941d6 100644
> > --- a/lib/bbdev/rte_bbdev.h
> > +++ b/lib/bbdev/rte_bbdev.h
> > @@ -289,6 +289,10 @@ struct rte_bbdev_driver_info {
> >
> > /** Maximum number of queues supported by the device */
> > unsigned int max_num_queues;
> > + /** Maximum number of queues supported per operation type */
> > + unsigned int num_queues[RTE_BBDEV_OP_TYPE_PADDED_MAX];
> > + /** Priority level supported per operation type */
> > + unsigned int queue_priority[RTE_BBDEV_OP_TYPE_PADDED_MAX];
>
> It is better to add new elements to the end of a structure for better backward
> compatibility
All that serie is not ABI compatible (sizes change etc...). I don’t believe there is such a recommendation, is there?
>
> Tom
>
> > /** Queue size limit (queue size must also be power of 2) */
> > uint32_t queue_size_lim;
> > /** Set if device off-loads operation to hardware */
^ permalink raw reply [relevance 3%]
* RE: [PATCH v4 2/7] bbdev: add device status info
@ 2022-07-06 21:16 3% ` Chautru, Nicolas
2022-07-07 13:37 0% ` Tom Rix
2022-08-25 14:08 3% ` Maxime Coquelin
0 siblings, 2 replies; 200+ results
From: Chautru, Nicolas @ 2022-07-06 21:16 UTC (permalink / raw)
To: Tom Rix, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
> -----Original Message-----
> From: Tom Rix <trix@redhat.com>
> Subject: Re: [PATCH v4 2/7] bbdev: add device status info
>
>
> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
> > Added device status information, so that the PMD can expose
> > information related to the underlying accelerator device status.
> > Minor order change in structure to fit into padding hole.
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > ---
> > drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
> > drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 1 +
> > drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 1 +
> > drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
> > drivers/baseband/null/bbdev_null.c | 1 +
> > drivers/baseband/turbo_sw/bbdev_turbo_software.c | 1 +
> > lib/bbdev/rte_bbdev.c | 24 +++++++++++++++
> > lib/bbdev/rte_bbdev.h | 35 ++++++++++++++++++++--
> > lib/bbdev/version.map | 6 ++++
> > 9 files changed, 69 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c
> > b/drivers/baseband/acc100/rte_acc100_pmd.c
> > index de7e4bc..17ba798 100644
> > --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> > +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> > @@ -1060,6 +1060,7 @@
> >
> > /* Read and save the populated config from ACC100 registers */
> > fetch_acc100_config(dev);
> > + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >
> > /* This isn't ideal because it reports the maximum number of queues
> but
> > * does not provide info on how many can be uplink/downlink or
> > different diff --git
> > a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> > b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> > index 82ae6ba..57b12af 100644
> > --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> > +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> > @@ -369,6 +369,7 @@
> > dev_info->capabilities = bbdev_capabilities;
> > dev_info->cpu_flag_reqs = NULL;
> > dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> > + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >
> > /* Calculates number of queues assigned to device */
> > dev_info->max_num_queues = 0;
> > diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> > b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> > index 21d3529..2a330c4 100644
> > --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> > +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> > @@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {
> > dev_info->capabilities = bbdev_capabilities;
> > dev_info->cpu_flag_reqs = NULL;
> > dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> > + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >
> > /* Calculates number of queues assigned to device */
> > dev_info->max_num_queues = 0;
> > diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c
> > b/drivers/baseband/la12xx/bbdev_la12xx.c
> > index 4d1bd16..c1f88c6 100644
> > --- a/drivers/baseband/la12xx/bbdev_la12xx.c
> > +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
> > @@ -100,6 +100,7 @@ struct bbdev_la12xx_params {
> > dev_info->capabilities = bbdev_capabilities;
> > dev_info->cpu_flag_reqs = NULL;
> > dev_info->min_alignment = 64;
> > + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >
> > rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
> > }
> > diff --git a/drivers/baseband/null/bbdev_null.c
> > b/drivers/baseband/null/bbdev_null.c
> > index 248e129..94a1976 100644
> > --- a/drivers/baseband/null/bbdev_null.c
> > +++ b/drivers/baseband/null/bbdev_null.c
> > @@ -82,6 +82,7 @@ struct bbdev_queue {
> > * here for code completeness.
> > */
> > dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> > + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >
> > rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
> > }
> > diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> > b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> > index af7bc41..dbc5524 100644
> > --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> > +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> > @@ -254,6 +254,7 @@ struct turbo_sw_queue {
> > dev_info->min_alignment = 64;
> > dev_info->harq_buffer_size = 0;
> > dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> > + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >
> > rte_bbdev_log_debug("got device info from %u\n", dev->data-
> >dev_id);
> > }
> > diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
> > 22bd894..555bda9 100644
> > --- a/lib/bbdev/rte_bbdev.c
> > +++ b/lib/bbdev/rte_bbdev.c
> > @@ -25,6 +25,8 @@
> >
> > /* Number of supported operation types */
> > #define BBDEV_OP_TYPE_COUNT 5
> > +/* Number of supported device status */ #define
> > +BBDEV_DEV_STATUS_COUNT 9
> >
> > /* BBDev library logging ID */
> > RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE); @@ -1132,3
> +1134,25
> > @@ struct rte_mempool *
> > rte_bbdev_log(ERR, "Invalid operation type");
> > return NULL;
> > }
> > +
> > +const char *
> > +rte_bbdev_device_status_str(enum rte_bbdev_device_status status) {
> > + static const char * const dev_sta_string[] = {
> > + "RTE_BBDEV_DEV_NOSTATUS",
> > + "RTE_BBDEV_DEV_NOT_SUPPORTED",
> > + "RTE_BBDEV_DEV_RESET",
> > + "RTE_BBDEV_DEV_CONFIGURED",
> > + "RTE_BBDEV_DEV_ACTIVE",
> > + "RTE_BBDEV_DEV_FATAL_ERR",
> > + "RTE_BBDEV_DEV_RESTART_REQ",
> > + "RTE_BBDEV_DEV_RECONFIG_REQ",
> > + "RTE_BBDEV_DEV_CORRECT_ERR",
> > + };
> > +
> > + if (status < BBDEV_DEV_STATUS_COUNT)
> > + return dev_sta_string[status];
> > +
> > + rte_bbdev_log(ERR, "Invalid device status");
> > + return NULL;
> > +}
> > diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
> > b88c881..9b1ffa4 100644
> > --- a/lib/bbdev/rte_bbdev.h
> > +++ b/lib/bbdev/rte_bbdev.h
> > @@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {
> > int
> > rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
> >
> > +/**
> > + * Flags indicate the status of the device */ enum
> > +rte_bbdev_device_status {
> > + RTE_BBDEV_DEV_NOSTATUS, /**< Nothing being reported */
> > + RTE_BBDEV_DEV_NOT_SUPPORTED, /**< Device status is not
> supported on the PMD */
> If this was 0, you may not need to explicitly set.
This helps to have the lack of status being equivalent to a cleared register.
> > + RTE_BBDEV_DEV_RESET, /**< Device in reset and un-configured
> state */
> > + RTE_BBDEV_DEV_CONFIGURED, /**< Device is configured and
> ready to use */
> > + RTE_BBDEV_DEV_ACTIVE, /**< Device is configured and VF is
> being used */
> > + RTE_BBDEV_DEV_FATAL_ERR, /**< Device has hit a fatal
> uncorrectable error */
> > + RTE_BBDEV_DEV_RESTART_REQ, /**< Device requires application to
> restart */
> > + RTE_BBDEV_DEV_RECONFIG_REQ, /**< Device requires application
> to reconfigure queues */
> > + RTE_BBDEV_DEV_CORRECT_ERR, /**< Warning of a correctable
> error event happened */
> Last patch was padded, do something consistent here.
We only pad if we have to. Here there is no array whose size would be dimensioned by the size of that enum.
> > +};
> > +
> > /** Device statistics. */
> > struct rte_bbdev_stats {
> > uint64_t enqueued_count; /**< Count of all operations enqueued */
> > @@ -285,12 +300,14 @@ struct rte_bbdev_driver_info {
> > /** Set if device supports per-queue interrupts */
> > bool queue_intr_supported;
> > /** Minimum alignment of buffers, in bytes */
> > - uint16_t min_alignment;
> > - /** HARQ memory available in kB */
> > + /** Device Status */
> > + enum rte_bbdev_device_status device_status;
>
> New elements should be added to the end to improve backward compatibility.
Same comment in different patch. I would like to know if there is a real recommendation from DPDK on this. I have heard opposite view as well.
In that very case we are breaking the ABI in that new serie for 22.11 (sizes and offsets are changing).
>
> Tom
>
> > uint32_t harq_buffer_size;
> > /** Byte endianness (RTE_BIG_ENDIAN/RTE_LITTLE_ENDIAN)
> supported
> > * for input/output data
> > */
> > + uint16_t min_alignment;
> > + /** HARQ memory available in kB */
> > uint8_t data_endianness;
> > /** Default queue configuration used if none is supplied */
> > struct rte_bbdev_queue_conf default_queue_conf; @@ -827,6
> +844,20
> > @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
> > rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int
> op,
> > void *data);
> >
> > +/**
> > + * Converts device status from enum to string
> > + *
> > + * @param status
> > + * Device status as enum
> > + *
> > + * @returns
> > + * Operation type as string or NULL if op_type is invalid
> > + *
> > + */
> > +__rte_experimental
> > +const char*
> > +rte_bbdev_device_status_str(enum rte_bbdev_device_status status);
> > +
> > #ifdef __cplusplus
> > }
> > #endif
> > diff --git a/lib/bbdev/version.map b/lib/bbdev/version.map index
> > cce3f3c..9ac3643 100644
> > --- a/lib/bbdev/version.map
> > +++ b/lib/bbdev/version.map
> > @@ -39,3 +39,9 @@ DPDK_22 {
> >
> > local: *;
> > };
> > +
> > +EXPERIMENTAL {
> > + global:
> > +
> > + rte_bbdev_device_status_str;
> > +};
^ permalink raw reply [relevance 3%]
* RE: [PATCH v4 1/7] bbdev: allow operation type enum for growth
2022-07-06 12:50 0% ` Tom Rix
@ 2022-07-06 21:20 0% ` Chautru, Nicolas
0 siblings, 0 replies; 200+ results
From: Chautru, Nicolas @ 2022-07-06 21:20 UTC (permalink / raw)
To: Tom Rix, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
Hi Tom,
> -----Original Message-----
> From: Tom Rix <trix@redhat.com>
> Subject: Re: [PATCH v4 1/7] bbdev: allow operation type enum for growth
>
>
> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
> > Updating the enum for rte_bbdev_op_type to allow to keep ABI
> > compatible for enum insertion while adding padded maximum value for
> > array need.
> > Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
> > RTE_BBDEV_OP_TYPE_PADDED_MAX.
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > ---
> > app/test-bbdev/test_bbdev.c | 2 +-
> > app/test-bbdev/test_bbdev_perf.c | 4 ++--
> > examples/bbdev_app/main.c | 2 +-
> > lib/bbdev/rte_bbdev.c | 9 +++++----
> > lib/bbdev/rte_bbdev_op.h | 2 +-
> > 5 files changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
> > index ac06d73..1063f6e 100644
> > --- a/app/test-bbdev/test_bbdev.c
> > +++ b/app/test-bbdev/test_bbdev.c
> > @@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
> > rte_mempool_free(mp);
> >
> > TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
> > - RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) ==
> NULL,
> > + RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size,
> 0)) == NULL,
> > "Failed test for rte_bbdev_op_pool_create: "
> > "returned value is not NULL for invalid type");
> >
> > diff --git a/app/test-bbdev/test_bbdev_perf.c
> > b/app/test-bbdev/test_bbdev_perf.c
> > index fad3b1e..1abda2d 100644
> > --- a/app/test-bbdev/test_bbdev_perf.c
> > +++ b/app/test-bbdev/test_bbdev_perf.c
> > @@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct
> > active_device *ad,
> >
> > /* Find capabilities */
> > const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
> > - for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
> > + do {
> > if (cap->type == test_vector.op_type) {
> > capabilities = cap;
> > break;
> > }
> > cap++;
> > - }
> > + } while (cap->type != RTE_BBDEV_OP_NONE);
> > TEST_ASSERT_NOT_NULL(capabilities,
> > "Couldn't find capabilities");
> >
> > diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
> > index fc7e8b8..ef0ba76 100644
> > --- a/examples/bbdev_app/main.c
> > +++ b/examples/bbdev_app/main.c
> > @@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
> > void *sigret;
> > struct app_config_params app_params = def_app_config;
> > struct rte_mempool *ethdev_mbuf_mempool,
> *bbdev_mbuf_mempool;
> > - struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
> > + struct rte_mempool
> *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
> > struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
> > struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
> > struct stats_lcore_params stats_lcore; diff --git
> > a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index aaee7b7..22bd894
> > 100644
> > --- a/lib/bbdev/rte_bbdev.c
> > +++ b/lib/bbdev/rte_bbdev.c
> > @@ -23,6 +23,8 @@
> >
> > #define DEV_NAME "BBDEV"
> >
> > +/* Number of supported operation types */ #define
> BBDEV_OP_TYPE_COUNT
> > +5
> >
> > /* BBDev library logging ID */
> > RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE); @@ -890,10
> +892,10
> > @@ struct rte_mempool *
> > return NULL;
> > }
> >
> > - if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
> > + if (type >= BBDEV_OP_TYPE_COUNT) {
> > rte_bbdev_log(ERR,
> > "Invalid op type (%u), should be less than %u",
> > - type, RTE_BBDEV_OP_TYPE_COUNT);
> > + type, BBDEV_OP_TYPE_COUNT);
> > return NULL;
> > }
> >
> > @@ -1122,10 +1124,9 @@ struct rte_mempool *
> > "RTE_BBDEV_OP_TURBO_DEC",
> > "RTE_BBDEV_OP_TURBO_ENC",
> > "RTE_BBDEV_OP_LDPC_DEC",
> > - "RTE_BBDEV_OP_LDPC_ENC",
> > };
> >
> > - if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
> > + if (op_type < BBDEV_OP_TYPE_COUNT)
> > return op_types[op_type];
> >
> > rte_bbdev_log(ERR, "Invalid operation type"); diff --git
> > a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h index
> > 6d56133..cd82418 100644
> > --- a/lib/bbdev/rte_bbdev_op.h
> > +++ b/lib/bbdev/rte_bbdev_op.h
> > @@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
> > RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
> > RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
> > RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
> > - RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
>
> Why not keep this enum so you don't have to make the
> BBDEV_OP_TYPE_COUNT #define ?
We are announcing that we are deprecating that enum. We want to make sure this is not being used by application, only the PADDED one should be used moving forward
But I think I will use your suggestion in other commit not to use #define for this and instead just check for array size.
Thanks
Nic
>
> Tom
>
> > + RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type
> number
> > +including padding */
> > };
> >
> > /** Bit indexes of possible errors reported through status field */
^ permalink raw reply [relevance 0%]
* [PATCH v5 0/7] bbdev changes for 22.11
2022-06-28 1:35 4% ` [PATCH v3 0/7] bbdev changes for 22.11 Nicolas Chautru
2022-07-06 0:23 4% ` [PATCH v4 0/7] bbdev changes for 22.11 Nicolas Chautru
@ 2022-07-06 23:28 4% ` Nicolas Chautru
2022-07-06 23:28 3% ` [PATCH v5 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
` (2 more replies)
4 siblings, 3 replies; 200+ results
From: Nicolas Chautru @ 2022-07-06 23:28 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
v5: update base on review from Tom Rix. Number of typos reported and resolved,
removed the commit related to rw_lock for now, added a commit for
code clean up from review, resolved one rebase issue between 2 commits, used size of array for some bound check implementation. Thanks.
v4: update to the last 2 commits to include function to print the queue status and a fix to the rte_lock within the wrong structure
v3: update to device status info to also use padded size for the related array.
Adding also 2 additionals commits to allow the API struc to expose more information related to queues corner cases/warning as well as an optional rw lock.
Hemant, Maxime, this is planned for DPDK 21.11 but would like review/ack early is possible to get this applied earlier and due to time off this summer.
Thanks
Nic
--
Hi,
Agregating together in a single serie a number of bbdev api changes previously submitted over the last few months and all targeted for 22.11 (4 different series detailed below). Related deprecation notice being pushed in 22.07 in parallel.
* bbdev: add device status info
* bbdev: add new operation for FFT processing
* bbdev: add device info on queue topology
* bbdev: allow operation type enum for growth
v2: Update to the RTE_BBDEV_COUNT removal based on feedback from Thomas/Stephen : rejecting out of range op type and adjusting the new name for the padded maximum value used for fixed size arrays.
---
Previous cover letters agregated below:
* bbdev: add device status info
https://patches.dpdk.org/project/dpdk/list/?series=23367
The updated structure will allow PMDs to expose through info_get what be may the status of the underlying accelerator, notably in case an HW error event having happened.
* bbdev: add new operation for FFT processing
https://patches.dpdk.org/project/dpdk/list/?series=22111
This contribution adds a new operation type to the existing ones already supported by the bbdev PMDs.
This set of operation is FFT-based processing for 5GNR baseband processing acceleration. This operates in the same lookaside fashion as other existing bbdev operation with a dedicated set of capabilities and parameters (marked as experimental).
I plan to also include a new PMD supporting this operation (and most of the related capabilities) in the next couple of months (either in 22.06 or 22.09) as well as extending the related bbdev-test.
* bbdev: add device info on queue topology
https://patches.dpdk.org/project/dpdk/list/?series=22076
Addressing an historical concern that the device info struct only imperfectly captured what queues are available on the device (number of operation and priority). This ended up being an iterative process for application to find each queue could be configured.
ie. the gap was captured as technical debt previously in comments
/* This isn't ideal because it reports the maximum number of queues but
* does not provide info on how many can be uplink/downlink or different
* priorities
*/
This is now being exposed explictly based on the what the device actually supports using the existing info_get api
* bbdev: allow operation type enum for growth
https://patches.dpdk.org/project/dpdk/list/?series=23509
This is related to the general intent to remove using MAX value for enums. There is consensus that we should avoid this for a while notably for future-proofed ABI concerns https://patches.dpdk.org/project/dpdk/patch/20200130142003.2645765-1-ferruh.yigit@intel.com/.
But still there is arguably not yet an explicit best recommendation to handle this especially when we actualy need to expose array whose index is such an enum.
As a specific example here I am refering to RTE_BBDEV_OP_TYPE_COUNT in enum rte_bbdev_op_type which is being extended for new operation type being support in bbdev (such as https://patches.dpdk.org/project/dpdk/patch/1646956157-245769-2-git-send-email-nicolas.chautru@intel.com/ adding new FFT operation)
There is also the intent to be able to expose information for each operation type through the bbdev api such as dynamically configured queues information per such operation type https://patches.dpdk.org/project/dpdk/patch/1646785355-168133-2-git-send-email-nicolas.chautru@intel.com/
Basically we are considering best way to accomodate for this, notably based on discussions with Ray Kinsella and Bruce Richardson, to handle such a case moving forward: specifically for the example with RTE_BBDEV_OP_TYPE_COUNT and also more generally.
One possible option is captured in that patchset and is basically based on the simple principle to allow for growth and prevent ABI breakage. Ie. the last value of the enum is set with a higher value than required so that to allow insertion of new enum outside of the major ABI versions.
In that case the RTE_BBDEV_OP_TYPE_COUNT is still present and can be exposed and used while still allowing for addition thanks to the implicit padding-like room. As an alternate variant, instead of using that last enum value, that extended size could be exposed as an #define outside of the enum but would be fundamentally the same (public).
Another option would be to avoid array alltogether and use each time this a new dedicated API function (operation type enum being an input argument instead of an index to an array in an existing structure so that to get access to structure related to a given operation type enum) but that is arguably not well scalable within DPDK to use such a scheme for each enums and keep an uncluttered and clean API. In that very example that would be very odd indeed not to get this simply from info_get().
Some pros and cons, arguably the simple option in that patchset is a valid compromise option and a step in the right direction but we would like to know your view wrt best recommendation, or any other thought.
Nicolas Chautru (7):
bbdev: allow operation type enum for growth
bbdev: add device status info
bbdev: add device info on queue topology
drivers/baseband: update PMDs to expose queue per operation
bbdev: add new operation for FFT processing
bbdev: add queue related warning and status information
bbdev: remove unnecessary if-check
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 6 +-
doc/guides/prog_guide/bbdev.rst | 130 +++++++++++++++++
drivers/baseband/acc100/rte_acc100_pmd.c | 30 ++--
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 9 ++
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 9 ++
drivers/baseband/la12xx/bbdev_la12xx.c | 10 +-
drivers/baseband/null/bbdev_null.c | 1 +
drivers/baseband/turbo_sw/bbdev_turbo_software.c | 12 ++
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 57 +++++++-
lib/bbdev/rte_bbdev.h | 149 +++++++++++++++++++-
lib/bbdev/rte_bbdev_op.h | 156 ++++++++++++++++++++-
lib/bbdev/version.map | 11 ++
14 files changed, 555 insertions(+), 29 deletions(-)
--
1.8.3.1
^ permalink raw reply [relevance 4%]
* [PATCH v5 1/7] bbdev: allow operation type enum for growth
2022-07-06 23:28 4% ` [PATCH v5 0/7] bbdev changes for 22.11 Nicolas Chautru
@ 2022-07-06 23:28 3% ` Nicolas Chautru
2022-08-25 13:54 0% ` Maxime Coquelin
2022-08-15 17:54 0% ` [PATCH v5 0/7] bbdev changes for 22.11 Chautru, Nicolas
2 siblings, 1 reply; 200+ results
From: Nicolas Chautru @ 2022-07-06 23:28 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
Updating the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_PADDED_MAX.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 4 ++--
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 8 +++++---
lib/bbdev/rte_bbdev_op.h | 2 +-
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index ac06d73..1063f6e 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
rte_mempool_free(mp);
TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
- RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) == NULL,
+ RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size, 0)) == NULL,
"Failed test for rte_bbdev_op_pool_create: "
"returned value is not NULL for invalid type");
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index fad3b1e..1abda2d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct active_device *ad,
/* Find capabilities */
const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
- for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
+ do {
if (cap->type == test_vector.op_type) {
capabilities = cap;
break;
}
cap++;
- }
+ } while (cap->type != RTE_BBDEV_OP_NONE);
TEST_ASSERT_NOT_NULL(capabilities,
"Couldn't find capabilities");
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8..ef0ba76 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
void *sigret;
struct app_config_params app_params = def_app_config;
struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool;
- struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
+ struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
struct stats_lcore_params stats_lcore;
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index aaee7b7..4da8047 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -23,6 +23,8 @@
#define DEV_NAME "BBDEV"
+/* Number of supported operation types */
+#define BBDEV_OP_TYPE_COUNT 5
/* BBDev library logging ID */
RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
@@ -890,10 +892,10 @@ struct rte_mempool *
return NULL;
}
- if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
+ if (type >= BBDEV_OP_TYPE_COUNT) {
rte_bbdev_log(ERR,
"Invalid op type (%u), should be less than %u",
- type, RTE_BBDEV_OP_TYPE_COUNT);
+ type, BBDEV_OP_TYPE_COUNT);
return NULL;
}
@@ -1125,7 +1127,7 @@ struct rte_mempool *
"RTE_BBDEV_OP_LDPC_ENC",
};
- if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
+ if (op_type < BBDEV_OP_TYPE_COUNT)
return op_types[op_type];
rte_bbdev_log(ERR, "Invalid operation type");
diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h
index 6d56133..cd82418 100644
--- a/lib/bbdev/rte_bbdev_op.h
+++ b/lib/bbdev/rte_bbdev_op.h
@@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
- RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
+ RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type number including padding */
};
/** Bit indexes of possible errors reported through status field */
--
1.8.3.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH v8] sched: enable CMAN at runtime
2022-07-06 8:53 0% ` Singh, Jasvinder
@ 2022-07-07 13:07 0% ` Danilewicz, MarcinX
0 siblings, 0 replies; 200+ results
From: Danilewicz, MarcinX @ 2022-07-07 13:07 UTC (permalink / raw)
To: Singh, Jasvinder, dev, Dumitrescu, Cristian; +Cc: Ajmera, Megha
<snip>
> > Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> > ---
> > Log: v2 change in rte_sched.h to avoid ABI breakage.
> > v3 changes from comments
> > v4 rebase to 22.07-rc1
> > v5 rebase to main latest
> > v6 commit message fixed
> > v7 changes from comments
> > v8 with changes from comments
>
>
> You need to explicitly mention the changes done in each version to help
> reviewer easily locate the changes.
Yes, yes. I am going to provide more detailed changes and explaining history on what changes was made. This split development over time is the best example to show that need.
<snip>
>>@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params
> > subport_params_default = {
> > .pipe_profiles = pipe_profile,
> > .n_pipe_profiles = 0, /* filled at run time */
> > .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef
> RTE_SCHED_CMAN
> > .cman_params = &cman_params,
> > -#endif /* RTE_SCHED_CMAN */
> > };
>
>
> Similar to what is discussed for qos_sched sample app, set cman_params to
> NULL and remove default parameters for "static struct
> rte_sched_cman_params cman_params" above.
Sure, that will be done.
> > -#ifdef RTE_SCHED_CMAN
> > - struct rte_sched_cman_params cman_params = {
> > - .cman_mode = RTE_SCHED_CMAN_RED,
> > - .red_params = { },
> > - };
> > + subport_params->cman_params = NULL;
>
> No need to set subport_params->cman_params again to null as it is already
> set to NULL in init.c.
Sure, app_load_cfg_profile -> cfg_load_subport is also not called several times, just once
<snip>
> > }
> > -#ifdef RTE_SCHED_CMAN
> > - set_subport_cman_params(subport_params+i,
> > cman_params);
> > -#endif
> > + subport_params[i].cman_params = &cman_params;
>
> Since cman_params_is global variable, memory is allocated regardless of
> whether cman mechanism is enabled or disabled. So subport_params-
> >cman_params will never point to NULL even when red/pie is disabled.
> Define local flag "cman_enabled" and set his flag if red or pie is enabled and
> check this flag to set subport_params[i].cman_params to cman_params.
Ah .. nice spot. But, cant we do that with additional check, using what we have?
For an instance:
If (cman_params.cman_mode == RTE_SCHED_CMAN_PIE || cman_params.cman_mode == RTE_SCHED_CMAN_RED) {
Then set subport_params[i].cman_params to cman_params.
}
BR,
/Marcin
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4 3/7] bbdev: add device info on queue topology
2022-07-06 21:12 3% ` Chautru, Nicolas
@ 2022-07-07 13:34 0% ` Tom Rix
2022-07-07 17:13 3% ` Chautru, Nicolas
0 siblings, 1 reply; 200+ results
From: Tom Rix @ 2022-07-07 13:34 UTC (permalink / raw)
To: Chautru, Nicolas, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
On 7/6/22 2:12 PM, Chautru, Nicolas wrote:
> Hi Tom,
>
>> -----Original Message-----
>> From: Tom Rix <trix@redhat.com>
>> Subject: Re: [PATCH v4 3/7] bbdev: add device info on queue topology
>>
>>
>> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
>>> Adding more options in the API to expose the number of queues exposed
>>> and related priority.
>>>
>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
>>> ---
>>> lib/bbdev/rte_bbdev.h | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
>>> 9b1ffa4..ac941d6 100644
>>> --- a/lib/bbdev/rte_bbdev.h
>>> +++ b/lib/bbdev/rte_bbdev.h
>>> @@ -289,6 +289,10 @@ struct rte_bbdev_driver_info {
>>>
>>> /** Maximum number of queues supported by the device */
>>> unsigned int max_num_queues;
>>> + /** Maximum number of queues supported per operation type */
>>> + unsigned int num_queues[RTE_BBDEV_OP_TYPE_PADDED_MAX];
>>> + /** Priority level supported per operation type */
>>> + unsigned int queue_priority[RTE_BBDEV_OP_TYPE_PADDED_MAX];
>> It is better to add new elements to the end of a structure for better backward
>> compatibility
> All that serie is not ABI compatible (sizes change etc...). I don’t believe there is such a recommendation, is there?
Depends on what users expect, a dynamically linked old application would
at best core here. If the elements were added to the end, yes the size
would change but the old dynamically linked application would not use
them. Dynamically linking is nice because problems in the library can
be fixed and shipped without forcing the user recompile. Though the
user may not realize it, this change forces them to recompile.
Tom
>
>> Tom
>>
>>> /** Queue size limit (queue size must also be power of 2) */
>>> uint32_t queue_size_lim;
>>> /** Set if device off-loads operation to hardware */
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4 2/7] bbdev: add device status info
2022-07-06 21:16 3% ` Chautru, Nicolas
@ 2022-07-07 13:37 0% ` Tom Rix
2022-07-07 17:15 0% ` Chautru, Nicolas
2022-08-25 14:08 3% ` Maxime Coquelin
1 sibling, 1 reply; 200+ results
From: Tom Rix @ 2022-07-07 13:37 UTC (permalink / raw)
To: Chautru, Nicolas, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
On 7/6/22 2:16 PM, Chautru, Nicolas wrote:
>> -----Original Message-----
>> From: Tom Rix <trix@redhat.com>
>> Subject: Re: [PATCH v4 2/7] bbdev: add device status info
>>
>>
>> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
>>> Added device status information, so that the PMD can expose
>>> information related to the underlying accelerator device status.
>>> Minor order change in structure to fit into padding hole.
>>>
>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
>>> ---
>>> drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
>>> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 1 +
>>> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 1 +
>>> drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
>>> drivers/baseband/null/bbdev_null.c | 1 +
>>> drivers/baseband/turbo_sw/bbdev_turbo_software.c | 1 +
>>> lib/bbdev/rte_bbdev.c | 24 +++++++++++++++
>>> lib/bbdev/rte_bbdev.h | 35 ++++++++++++++++++++--
>>> lib/bbdev/version.map | 6 ++++
>>> 9 files changed, 69 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c
>>> b/drivers/baseband/acc100/rte_acc100_pmd.c
>>> index de7e4bc..17ba798 100644
>>> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
>>> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
>>> @@ -1060,6 +1060,7 @@
>>>
>>> /* Read and save the populated config from ACC100 registers */
>>> fetch_acc100_config(dev);
>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>
>>> /* This isn't ideal because it reports the maximum number of queues
>> but
>>> * does not provide info on how many can be uplink/downlink or
>>> different diff --git
>>> a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>> b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>> index 82ae6ba..57b12af 100644
>>> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>> @@ -369,6 +369,7 @@
>>> dev_info->capabilities = bbdev_capabilities;
>>> dev_info->cpu_flag_reqs = NULL;
>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>
>>> /* Calculates number of queues assigned to device */
>>> dev_info->max_num_queues = 0;
>>> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>> b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>> index 21d3529..2a330c4 100644
>>> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>> @@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {
>>> dev_info->capabilities = bbdev_capabilities;
>>> dev_info->cpu_flag_reqs = NULL;
>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>
>>> /* Calculates number of queues assigned to device */
>>> dev_info->max_num_queues = 0;
>>> diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c
>>> b/drivers/baseband/la12xx/bbdev_la12xx.c
>>> index 4d1bd16..c1f88c6 100644
>>> --- a/drivers/baseband/la12xx/bbdev_la12xx.c
>>> +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
>>> @@ -100,6 +100,7 @@ struct bbdev_la12xx_params {
>>> dev_info->capabilities = bbdev_capabilities;
>>> dev_info->cpu_flag_reqs = NULL;
>>> dev_info->min_alignment = 64;
>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>
>>> rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
>>> }
>>> diff --git a/drivers/baseband/null/bbdev_null.c
>>> b/drivers/baseband/null/bbdev_null.c
>>> index 248e129..94a1976 100644
>>> --- a/drivers/baseband/null/bbdev_null.c
>>> +++ b/drivers/baseband/null/bbdev_null.c
>>> @@ -82,6 +82,7 @@ struct bbdev_queue {
>>> * here for code completeness.
>>> */
>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>
>>> rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
>>> }
>>> diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>> b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>> index af7bc41..dbc5524 100644
>>> --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>> +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>> @@ -254,6 +254,7 @@ struct turbo_sw_queue {
>>> dev_info->min_alignment = 64;
>>> dev_info->harq_buffer_size = 0;
>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>
>>> rte_bbdev_log_debug("got device info from %u\n", dev->data-
>>> dev_id);
>>> }
>>> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
>>> 22bd894..555bda9 100644
>>> --- a/lib/bbdev/rte_bbdev.c
>>> +++ b/lib/bbdev/rte_bbdev.c
>>> @@ -25,6 +25,8 @@
>>>
>>> /* Number of supported operation types */
>>> #define BBDEV_OP_TYPE_COUNT 5
>>> +/* Number of supported device status */ #define
>>> +BBDEV_DEV_STATUS_COUNT 9
>>>
>>> /* BBDev library logging ID */
>>> RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE); @@ -1132,3
>> +1134,25
>>> @@ struct rte_mempool *
>>> rte_bbdev_log(ERR, "Invalid operation type");
>>> return NULL;
>>> }
>>> +
>>> +const char *
>>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status) {
>>> + static const char * const dev_sta_string[] = {
>>> + "RTE_BBDEV_DEV_NOSTATUS",
>>> + "RTE_BBDEV_DEV_NOT_SUPPORTED",
>>> + "RTE_BBDEV_DEV_RESET",
>>> + "RTE_BBDEV_DEV_CONFIGURED",
>>> + "RTE_BBDEV_DEV_ACTIVE",
>>> + "RTE_BBDEV_DEV_FATAL_ERR",
>>> + "RTE_BBDEV_DEV_RESTART_REQ",
>>> + "RTE_BBDEV_DEV_RECONFIG_REQ",
>>> + "RTE_BBDEV_DEV_CORRECT_ERR",
>>> + };
>>> +
>>> + if (status < BBDEV_DEV_STATUS_COUNT)
>>> + return dev_sta_string[status];
>>> +
>>> + rte_bbdev_log(ERR, "Invalid device status");
>>> + return NULL;
>>> +}
>>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
>>> b88c881..9b1ffa4 100644
>>> --- a/lib/bbdev/rte_bbdev.h
>>> +++ b/lib/bbdev/rte_bbdev.h
>>> @@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {
>>> int
>>> rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
>>>
>>> +/**
>>> + * Flags indicate the status of the device */ enum
>>> +rte_bbdev_device_status {
>>> + RTE_BBDEV_DEV_NOSTATUS, /**< Nothing being reported */
>>> + RTE_BBDEV_DEV_NOT_SUPPORTED, /**< Device status is not
>> supported on the PMD */
>> If this was 0, you may not need to explicitly set.
> This helps to have the lack of status being equivalent to a cleared register.
NOSTATUS is fine, just change
NOT_SUPPORTED = 0,
Tom
>
>>> + RTE_BBDEV_DEV_RESET, /**< Device in reset and un-configured
>> state */
>>> + RTE_BBDEV_DEV_CONFIGURED, /**< Device is configured and
>> ready to use */
>>> + RTE_BBDEV_DEV_ACTIVE, /**< Device is configured and VF is
>> being used */
>>> + RTE_BBDEV_DEV_FATAL_ERR, /**< Device has hit a fatal
>> uncorrectable error */
>>> + RTE_BBDEV_DEV_RESTART_REQ, /**< Device requires application to
>> restart */
>>> + RTE_BBDEV_DEV_RECONFIG_REQ, /**< Device requires application
>> to reconfigure queues */
>>> + RTE_BBDEV_DEV_CORRECT_ERR, /**< Warning of a correctable
>> error event happened */
>> Last patch was padded, do something consistent here.
> We only pad if we have to. Here there is no array whose size would be dimensioned by the size of that enum.
>
>>> +};
>>> +
>>> /** Device statistics. */
>>> struct rte_bbdev_stats {
>>> uint64_t enqueued_count; /**< Count of all operations enqueued */
>>> @@ -285,12 +300,14 @@ struct rte_bbdev_driver_info {
>>> /** Set if device supports per-queue interrupts */
>>> bool queue_intr_supported;
>>> /** Minimum alignment of buffers, in bytes */
>>> - uint16_t min_alignment;
>>> - /** HARQ memory available in kB */
>>> + /** Device Status */
>>> + enum rte_bbdev_device_status device_status;
>> New elements should be added to the end to improve backward compatibility.
> Same comment in different patch. I would like to know if there is a real recommendation from DPDK on this. I have heard opposite view as well.
> In that very case we are breaking the ABI in that new serie for 22.11 (sizes and offsets are changing).
>
>> Tom
>>
>>> uint32_t harq_buffer_size;
>>> /** Byte endianness (RTE_BIG_ENDIAN/RTE_LITTLE_ENDIAN)
>> supported
>>> * for input/output data
>>> */
>>> + uint16_t min_alignment;
>>> + /** HARQ memory available in kB */
>>> uint8_t data_endianness;
>>> /** Default queue configuration used if none is supplied */
>>> struct rte_bbdev_queue_conf default_queue_conf; @@ -827,6
>> +844,20
>>> @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
>>> rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int
>> op,
>>> void *data);
>>>
>>> +/**
>>> + * Converts device status from enum to string
>>> + *
>>> + * @param status
>>> + * Device status as enum
>>> + *
>>> + * @returns
>>> + * Operation type as string or NULL if op_type is invalid
>>> + *
>>> + */
>>> +__rte_experimental
>>> +const char*
>>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status);
>>> +
>>> #ifdef __cplusplus
>>> }
>>> #endif
>>> diff --git a/lib/bbdev/version.map b/lib/bbdev/version.map index
>>> cce3f3c..9ac3643 100644
>>> --- a/lib/bbdev/version.map
>>> +++ b/lib/bbdev/version.map
>>> @@ -39,3 +39,9 @@ DPDK_22 {
>>>
>>> local: *;
>>> };
>>> +
>>> +EXPERIMENTAL {
>>> + global:
>>> +
>>> + rte_bbdev_device_status_str;
>>> +};
^ permalink raw reply [relevance 0%]
* RE: [PATCH v4 3/7] bbdev: add device info on queue topology
2022-07-07 13:34 0% ` Tom Rix
@ 2022-07-07 17:13 3% ` Chautru, Nicolas
2022-07-18 13:04 3% ` Tom Rix
0 siblings, 1 reply; 200+ results
From: Chautru, Nicolas @ 2022-07-07 17:13 UTC (permalink / raw)
To: Tom Rix, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
Hi Tom,
> -----Original Message-----
> From: Tom Rix <trix@redhat.com>
> Sent: Thursday, July 7, 2022 6:34 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
> Cc: maxime.coquelin@redhat.com; mdr@ashroe.eu; Richardson, Bruce
> <bruce.richardson@intel.com>; david.marchand@redhat.com;
> stephen@networkplumber.org
> Subject: Re: [PATCH v4 3/7] bbdev: add device info on queue topology
>
>
> On 7/6/22 2:12 PM, Chautru, Nicolas wrote:
> > Hi Tom,
> >
> >> -----Original Message-----
> >> From: Tom Rix <trix@redhat.com>
> >> Subject: Re: [PATCH v4 3/7] bbdev: add device info on queue topology
> >>
> >>
> >> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
> >>> Adding more options in the API to expose the number of queues
> >>> exposed and related priority.
> >>>
> >>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> >>> ---
> >>> lib/bbdev/rte_bbdev.h | 4 ++++
> >>> 1 file changed, 4 insertions(+)
> >>>
> >>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
> >>> 9b1ffa4..ac941d6 100644
> >>> --- a/lib/bbdev/rte_bbdev.h
> >>> +++ b/lib/bbdev/rte_bbdev.h
> >>> @@ -289,6 +289,10 @@ struct rte_bbdev_driver_info {
> >>>
> >>> /** Maximum number of queues supported by the device */
> >>> unsigned int max_num_queues;
> >>> + /** Maximum number of queues supported per operation type */
> >>> + unsigned int num_queues[RTE_BBDEV_OP_TYPE_PADDED_MAX];
> >>> + /** Priority level supported per operation type */
> >>> + unsigned int queue_priority[RTE_BBDEV_OP_TYPE_PADDED_MAX];
> >> It is better to add new elements to the end of a structure for better
> >> backward compatibility
> > All that serie is not ABI compatible (sizes change etc...). I don’t believe there
> is such a recommendation, is there?
>
> Depends on what users expect, a dynamically linked old application would at
> best core here. If the elements were added to the end, yes the size would
> change but the old dynamically linked application would not use
> them. Dynamically linking is nice because problems in the library can be fixed
> and shipped without forcing the user recompile. Though the user may not
> realize it, this change forces them to recompile.
>
> Tom
Thanks Tom. In that very context, the change are big enough not to have any form of compatibility. This a new ABI version, and user knows they will have to recompile.
Still it would be great to capture a recommendation in DPDK coding guideline in case there is such a BKM, I have heard multiple arguments for different preference, if we want to harmonize such things let's capture in coding guide lines, it would not hurt. Maybe one for Thomas?
>
> >
> >> Tom
> >>
> >>> /** Queue size limit (queue size must also be power of 2) */
> >>> uint32_t queue_size_lim;
> >>> /** Set if device off-loads operation to hardware */
^ permalink raw reply [relevance 3%]
* RE: [PATCH v4 2/7] bbdev: add device status info
2022-07-07 13:37 0% ` Tom Rix
@ 2022-07-07 17:15 0% ` Chautru, Nicolas
2022-07-18 13:09 0% ` Tom Rix
0 siblings, 1 reply; 200+ results
From: Chautru, Nicolas @ 2022-07-07 17:15 UTC (permalink / raw)
To: Tom Rix, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
Hi Tom,
> -----Original Message-----
> From: Tom Rix <trix@redhat.com>
> Sent: Thursday, July 7, 2022 6:37 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
> Cc: maxime.coquelin@redhat.com; mdr@ashroe.eu; Richardson, Bruce
> <bruce.richardson@intel.com>; david.marchand@redhat.com;
> stephen@networkplumber.org
> Subject: Re: [PATCH v4 2/7] bbdev: add device status info
>
>
> On 7/6/22 2:16 PM, Chautru, Nicolas wrote:
> >> -----Original Message-----
> >> From: Tom Rix <trix@redhat.com>
> >> Subject: Re: [PATCH v4 2/7] bbdev: add device status info
> >>
> >>
> >> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
> >>> Added device status information, so that the PMD can expose
> >>> information related to the underlying accelerator device status.
> >>> Minor order change in structure to fit into padding hole.
> >>>
> >>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> >>> ---
> >>> drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
> >>> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 1 +
> >>> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 1 +
> >>> drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
> >>> drivers/baseband/null/bbdev_null.c | 1 +
> >>> drivers/baseband/turbo_sw/bbdev_turbo_software.c | 1 +
> >>> lib/bbdev/rte_bbdev.c | 24 +++++++++++++++
> >>> lib/bbdev/rte_bbdev.h | 35 ++++++++++++++++++++--
> >>> lib/bbdev/version.map | 6 ++++
> >>> 9 files changed, 69 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c
> >>> b/drivers/baseband/acc100/rte_acc100_pmd.c
> >>> index de7e4bc..17ba798 100644
> >>> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> >>> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> >>> @@ -1060,6 +1060,7 @@
> >>>
> >>> /* Read and save the populated config from ACC100 registers */
> >>> fetch_acc100_config(dev);
> >>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>
> >>> /* This isn't ideal because it reports the maximum number of
> >>> queues
> >> but
> >>> * does not provide info on how many can be uplink/downlink or
> >>> different diff --git
> >>> a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>> b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>> index 82ae6ba..57b12af 100644
> >>> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>> @@ -369,6 +369,7 @@
> >>> dev_info->capabilities = bbdev_capabilities;
> >>> dev_info->cpu_flag_reqs = NULL;
> >>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>
> >>> /* Calculates number of queues assigned to device */
> >>> dev_info->max_num_queues = 0;
> >>> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>> b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>> index 21d3529..2a330c4 100644
> >>> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>> @@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {
> >>> dev_info->capabilities = bbdev_capabilities;
> >>> dev_info->cpu_flag_reqs = NULL;
> >>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>
> >>> /* Calculates number of queues assigned to device */
> >>> dev_info->max_num_queues = 0;
> >>> diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c
> >>> b/drivers/baseband/la12xx/bbdev_la12xx.c
> >>> index 4d1bd16..c1f88c6 100644
> >>> --- a/drivers/baseband/la12xx/bbdev_la12xx.c
> >>> +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
> >>> @@ -100,6 +100,7 @@ struct bbdev_la12xx_params {
> >>> dev_info->capabilities = bbdev_capabilities;
> >>> dev_info->cpu_flag_reqs = NULL;
> >>> dev_info->min_alignment = 64;
> >>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>
> >>> rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
> >>> }
> >>> diff --git a/drivers/baseband/null/bbdev_null.c
> >>> b/drivers/baseband/null/bbdev_null.c
> >>> index 248e129..94a1976 100644
> >>> --- a/drivers/baseband/null/bbdev_null.c
> >>> +++ b/drivers/baseband/null/bbdev_null.c
> >>> @@ -82,6 +82,7 @@ struct bbdev_queue {
> >>> * here for code completeness.
> >>> */
> >>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>
> >>> rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
> >>> }
> >>> diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>> b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>> index af7bc41..dbc5524 100644
> >>> --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>> +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>> @@ -254,6 +254,7 @@ struct turbo_sw_queue {
> >>> dev_info->min_alignment = 64;
> >>> dev_info->harq_buffer_size = 0;
> >>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>
> >>> rte_bbdev_log_debug("got device info from %u\n", dev->data-
> >>> dev_id);
> >>> }
> >>> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
> >>> 22bd894..555bda9 100644
> >>> --- a/lib/bbdev/rte_bbdev.c
> >>> +++ b/lib/bbdev/rte_bbdev.c
> >>> @@ -25,6 +25,8 @@
> >>>
> >>> /* Number of supported operation types */
> >>> #define BBDEV_OP_TYPE_COUNT 5
> >>> +/* Number of supported device status */ #define
> >>> +BBDEV_DEV_STATUS_COUNT 9
> >>>
> >>> /* BBDev library logging ID */
> >>> RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE); @@ -1132,3
> >> +1134,25
> >>> @@ struct rte_mempool *
> >>> rte_bbdev_log(ERR, "Invalid operation type");
> >>> return NULL;
> >>> }
> >>> +
> >>> +const char *
> >>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status) {
> >>> + static const char * const dev_sta_string[] = {
> >>> + "RTE_BBDEV_DEV_NOSTATUS",
> >>> + "RTE_BBDEV_DEV_NOT_SUPPORTED",
> >>> + "RTE_BBDEV_DEV_RESET",
> >>> + "RTE_BBDEV_DEV_CONFIGURED",
> >>> + "RTE_BBDEV_DEV_ACTIVE",
> >>> + "RTE_BBDEV_DEV_FATAL_ERR",
> >>> + "RTE_BBDEV_DEV_RESTART_REQ",
> >>> + "RTE_BBDEV_DEV_RECONFIG_REQ",
> >>> + "RTE_BBDEV_DEV_CORRECT_ERR",
> >>> + };
> >>> +
> >>> + if (status < BBDEV_DEV_STATUS_COUNT)
> >>> + return dev_sta_string[status];
> >>> +
> >>> + rte_bbdev_log(ERR, "Invalid device status");
> >>> + return NULL;
> >>> +}
> >>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
> >>> b88c881..9b1ffa4 100644
> >>> --- a/lib/bbdev/rte_bbdev.h
> >>> +++ b/lib/bbdev/rte_bbdev.h
> >>> @@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {
> >>> int
> >>> rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
> >>>
> >>> +/**
> >>> + * Flags indicate the status of the device */ enum
> >>> +rte_bbdev_device_status {
> >>> + RTE_BBDEV_DEV_NOSTATUS, /**< Nothing being reported */
> >>> + RTE_BBDEV_DEV_NOT_SUPPORTED, /**< Device status is not
> >> supported on the PMD */
> >> If this was 0, you may not need to explicitly set.
> > This helps to have the lack of status being equivalent to a cleared register.
>
> NOSTATUS is fine, just change
>
> NOT_SUPPORTED = 0,
Let me rephrase. Currently RTE_BBDEV_DEV_NOSTATUS is zero explicitly which can be valuable to match a clear register.
RTE_BBDEV_DEV_NOT_SUPPORTED would not be zero.
Are you suggesting I should put explictly a RTE_BBDEV_DEV_NOSTATUS = 0? Isn't it implicit for any compiler that the first enum starts from zero?
>
> Tom
>
> >
> >>> + RTE_BBDEV_DEV_RESET, /**< Device in reset and un-configured
> >> state */
> >>> + RTE_BBDEV_DEV_CONFIGURED, /**< Device is configured and
> >> ready to use */
> >>> + RTE_BBDEV_DEV_ACTIVE, /**< Device is configured and VF is
> >> being used */
> >>> + RTE_BBDEV_DEV_FATAL_ERR, /**< Device has hit a fatal
> >> uncorrectable error */
> >>> + RTE_BBDEV_DEV_RESTART_REQ, /**< Device requires application to
> >> restart */
> >>> + RTE_BBDEV_DEV_RECONFIG_REQ, /**< Device requires application
> >> to reconfigure queues */
> >>> + RTE_BBDEV_DEV_CORRECT_ERR, /**< Warning of a correctable
> >> error event happened */
> >> Last patch was padded, do something consistent here.
> > We only pad if we have to. Here there is no array whose size would be
> dimensioned by the size of that enum.
> >
> >>> +};
> >>> +
> >>> /** Device statistics. */
> >>> struct rte_bbdev_stats {
> >>> uint64_t enqueued_count; /**< Count of all operations enqueued
> >>> */ @@ -285,12 +300,14 @@ struct rte_bbdev_driver_info {
> >>> /** Set if device supports per-queue interrupts */
> >>> bool queue_intr_supported;
> >>> /** Minimum alignment of buffers, in bytes */
> >>> - uint16_t min_alignment;
> >>> - /** HARQ memory available in kB */
> >>> + /** Device Status */
> >>> + enum rte_bbdev_device_status device_status;
> >> New elements should be added to the end to improve backward
> compatibility.
> > Same comment in different patch. I would like to know if there is a real
> recommendation from DPDK on this. I have heard opposite view as well.
> > In that very case we are breaking the ABI in that new serie for 22.11 (sizes
> and offsets are changing).
> >
> >> Tom
> >>
> >>> uint32_t harq_buffer_size;
> >>> /** Byte endianness (RTE_BIG_ENDIAN/RTE_LITTLE_ENDIAN)
> >> supported
> >>> * for input/output data
> >>> */
> >>> + uint16_t min_alignment;
> >>> + /** HARQ memory available in kB */
> >>> uint8_t data_endianness;
> >>> /** Default queue configuration used if none is supplied */
> >>> struct rte_bbdev_queue_conf default_queue_conf; @@ -827,6
> >> +844,20
> >>> @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
> >>> rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int
> >>> epfd, int
> >> op,
> >>> void *data);
> >>>
> >>> +/**
> >>> + * Converts device status from enum to string
> >>> + *
> >>> + * @param status
> >>> + * Device status as enum
> >>> + *
> >>> + * @returns
> >>> + * Operation type as string or NULL if op_type is invalid
> >>> + *
> >>> + */
> >>> +__rte_experimental
> >>> +const char*
> >>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status);
> >>> +
> >>> #ifdef __cplusplus
> >>> }
> >>> #endif
> >>> diff --git a/lib/bbdev/version.map b/lib/bbdev/version.map index
> >>> cce3f3c..9ac3643 100644
> >>> --- a/lib/bbdev/version.map
> >>> +++ b/lib/bbdev/version.map
> >>> @@ -39,3 +39,9 @@ DPDK_22 {
> >>>
> >>> local: *;
> >>> };
> >>> +
> >>> +EXPERIMENTAL {
> >>> + global:
> >>> +
> >>> + rte_bbdev_device_status_str;
> >>> +};
^ permalink raw reply [relevance 0%]
* [PATCH v9] sched: enable CMAN at runtime
2022-07-05 17:05 1% ` [PATCH v8] " Marcin Danilewicz
2022-07-05 18:00 0% ` Ajmera, Megha
2022-07-06 8:53 0% ` Singh, Jasvinder
@ 2022-07-08 13:14 1% ` Marcin Danilewicz
2 siblings, 0 replies; 200+ results
From: Marcin Danilewicz @ 2022-07-08 13:14 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
Log: v2 change in rte_sched.h to avoid ABI breakage.
v3 changes from comments
v4 rebase to 22.07-rc1
v5 rebase to main latest
v6 commit message fixed
v7 changes from comments
v8 with changes from comments
v9 changes from comments
tmgr.c
cman_params set to null
qos_sched/cfg_file.c
removed redundant cman_params to NULL assignement
subport_params[].cman_params assigned
only when CMAN enabled
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 6 +-
examples/qos_sched/cfg_file.c | 49 +-------
examples/qos_sched/cfg_file.h | 5 -
examples/qos_sched/init.c | 76 +-----------
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 135 +--------------------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 47 +-------
11 files changed, 298 insertions(+), 322 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 46549cb062..ae56a86394 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-// RTE_SCHED_CMAN is not set
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3e4bed81e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-#define WRED_SUPPORTED 1
-#else
#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..18bee1e0fc 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,7 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
static struct rte_sched_cman_params cman_params = {
.red_params = {
/* Traffic Class 0 Colors Green / Yellow / Red */
@@ -86,7 +85,6 @@ static struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
static uint32_t n_pipe_profiles;
@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..deaa28d391 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -23,6 +23,8 @@
uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
uint32_t n_active_queues;
+struct rte_sched_cman_params cman_params;
+
int
cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params)
{
@@ -229,40 +231,6 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p)
-{
- int j, k;
- subport_p->cman_params->cman_mode = cman_p.cman_mode;
-
- for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
- if (subport_p->cman_params->cman_mode ==
- RTE_SCHED_CMAN_RED) {
- for (k = 0; k < RTE_COLORS; k++) {
- subport_p->cman_params->red_params[j][k].min_th =
- cman_p.red_params[j][k].min_th;
- subport_p->cman_params->red_params[j][k].max_th =
- cman_p.red_params[j][k].max_th;
- subport_p->cman_params->red_params[j][k].maxp_inv =
- cman_p.red_params[j][k].maxp_inv;
- subport_p->cman_params->red_params[j][k].wq_log2 =
- cman_p.red_params[j][k].wq_log2;
- }
- } else {
- subport_p->cman_params->pie_params[j].qdelay_ref =
- cman_p.pie_params[j].qdelay_ref;
- subport_p->cman_params->pie_params[j].dp_update_interval =
- cman_p.pie_params[j].dp_update_interval;
- subport_p->cman_params->pie_params[j].max_burst =
- cman_p.pie_params[j].max_burst;
- subport_p->cman_params->pie_params[j].tailq_th =
- cman_p.pie_params[j].tailq_th;
- }
- }
-}
-#endif
-
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
{
@@ -276,12 +244,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
- struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = { },
- };
-
if (rte_cfgfile_has_section(cfg, "red")) {
cman_params.cman_mode = RTE_SCHED_CMAN_RED;
@@ -387,7 +349,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +426,9 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
- set_subport_cman_params(subport_params+i, cman_params);
-#endif
+ if (cman_params.cman_mode == RTE_SCHED_CMAN_PIE ||
+ cman_params.cman_mode == RTE_SCHED_CMAN_RED)
+ subport_params[i].cman_params = &cman_params;
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..0dc458aa71 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,11 +12,6 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p);
-#endif
-
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
int cfg_load_subport_profile(struct rte_cfgfile *cfg,
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..e8b819ffb9 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,78 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
-struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = {
- /* Traffic Class 0 Colors Green / Yellow / Red */
- [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 1 - Colors Green / Yellow / Red */
- [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 2 - Colors Green / Yellow / Red */
- [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 3 - Colors Green / Yellow / Red */
- [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 4 - Colors Green / Yellow / Red */
- [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 5 - Colors Green / Yellow / Red */
- [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 6 - Colors Green / Yellow / Red */
- [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 7 - Colors Green / Yellow / Red */
- [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 8 - Colors Green / Yellow / Red */
- [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 9 - Colors Green / Yellow / Red */
- [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 10 - Colors Green / Yellow / Red */
- [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 11 - Colors Green / Yellow / Red */
- [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 12 - Colors Green / Yellow / Red */
- [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- },
-};
-#endif /* RTE_SCHED_CMAN */
-
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
.n_pipes_per_subport_enabled = 4096,
@@ -281,9 +209,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..c9ec187c93 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -73,137 +73,4 @@ tc period = 40 ; Milliseconds
tc 12 oversubscription weight = 1
-tc 12 wrr weights = 1 1 1 1
-
-; RED params per traffic class and color (Green / Yellow / Red)
-;[red]
-;tc 0 wred min = 48 40 32
-;tc 0 wred max = 64 64 64
-;tc 0 wred inv prob = 10 10 10
-;tc 0 wred weight = 9 9 9
-
-;tc 1 wred min = 48 40 32
-;tc 1 wred max = 64 64 64
-;tc 1 wred inv prob = 10 10 10
-;tc 1 wred weight = 9 9 9
-
-;tc 2 wred min = 48 40 32
-;tc 2 wred max = 64 64 64
-;tc 2 wred inv prob = 10 10 10
-;tc 2 wred weight = 9 9 9
-
-;tc 3 wred min = 48 40 32
-;tc 3 wred max = 64 64 64
-;tc 3 wred inv prob = 10 10 10
-;tc 3 wred weight = 9 9 9
-
-;tc 4 wred min = 48 40 32
-;tc 4 wred max = 64 64 64
-;tc 4 wred inv prob = 10 10 10
-;tc 4 wred weight = 9 9 9
-
-;tc 5 wred min = 48 40 32
-;tc 5 wred max = 64 64 64
-;tc 5 wred inv prob = 10 10 10
-;tc 5 wred weight = 9 9 9
-
-;tc 6 wred min = 48 40 32
-;tc 6 wred max = 64 64 64
-;tc 6 wred inv prob = 10 10 10
-;tc 6 wred weight = 9 9 9
-
-;tc 7 wred min = 48 40 32
-;tc 7 wred max = 64 64 64
-;tc 7 wred inv prob = 10 10 10
-;tc 7 wred weight = 9 9 9
-
-;tc 8 wred min = 48 40 32
-;tc 8 wred max = 64 64 64
-;tc 8 wred inv prob = 10 10 10
-;tc 8 wred weight = 9 9 9
-
-;tc 9 wred min = 48 40 32
-;tc 9 wred max = 64 64 64
-;tc 9 wred inv prob = 10 10 10
-;tc 9 wred weight = 9 9 9
-
-;tc 10 wred min = 48 40 32
-;tc 10 wred max = 64 64 64
-;tc 10 wred inv prob = 10 10 10
-;tc 10 wred weight = 9 9 9
-
-;tc 11 wred min = 48 40 32
-;tc 11 wred max = 64 64 64
-;tc 11 wred inv prob = 10 10 10
-;tc 11 wred weight = 9 9 9
-
-;tc 12 wred min = 48 40 32
-;tc 12 wred max = 64 64 64
-;tc 12 wred inv prob = 10 10 10
-;tc 12 wred weight = 9 9 9
-
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+tc 12 wrr weights = 1 1 1 1
\ No newline at end of file
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 599c7e9536..c5fa9e4582 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1084,7 +1080,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1166,7 +1161,6 @@ rte_sched_cman_config(struct rte_sched_port *port,
return -EINVAL;
}
-#endif
int
rte_sched_subport_tc_ov_config(struct rte_sched_port *port,
@@ -1285,7 +1279,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
/* TC oversubscription is enabled by default */
s->tc_ov_enabled = 1;
-#ifdef RTE_SCHED_CMAN
if (params->cman_params != NULL) {
s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
@@ -1297,7 +1290,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
} else {
s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1823,7 +1815,7 @@ rte_sched_port_update_subport_stats_on_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
uint32_t tc_index = rte_sched_port_pipe_tc(port, qindex);
uint32_t pkt_len = pkt->pkt_len;
@@ -1849,21 +1841,17 @@ static inline void
rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
uint32_t pkt_len = pkt->pkt_len;
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1908,13 +1896,11 @@ static inline void
rte_sched_port_red_set_queue_empty_timestamp(struct rte_sched_port *port,
struct rte_sched_subport *subport, uint32_t qindex)
{
- if (subport->cman_enabled) {
+ if (subport->cman_enabled && subport->cman == RTE_SCHED_CMAN_RED) {
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
- if (subport->cman == RTE_SCHED_CMAN_RED) {
- struct rte_red *red = &qe->red;
+ struct rte_red *red = &qe->red;
- rte_red_mark_queue_empty(red, port->time);
- }
+ rte_red_mark_queue_empty(red, port->time);
}
}
@@ -1933,29 +1919,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
--
2.25.1
^ permalink raw reply [relevance 1%]
* [PATCH v10] sched: enable CMAN at runtime
[not found] <20220708131431.148279-1-marcinx.danilewicz>
@ 2022-07-08 14:22 1% ` Marcin Danilewicz
2022-07-15 14:51 1% ` [PATCH v11] " Marcin Danilewicz
0 siblings, 1 reply; 200+ results
From: Marcin Danilewicz @ 2022-07-08 14:22 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
Log: v2 change in rte_sched.h to avoid ABI breakage.
v3 changes from comments
v4 rebase to 22.07-rc1
v5 rebase to main latest
v6 commit message fixed
v7 changes from comments
v8 with changes from comments
v9 changes from comments
tmgr.c
cman_params set to null
qos_sched/cfg_file.c
removed redundant cman_params to NULL assignement
subport_params[].cman_params assigned
only when CMAN enabled
v10 removed ip_pipelin app build error from change
in tmgr.c
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 75 +-----------
examples/qos_sched/cfg_file.c | 49 +-------
examples/qos_sched/cfg_file.h | 5 -
examples/qos_sched/init.c | 76 +-----------
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 135 +--------------------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 47 +-------
11 files changed, 298 insertions(+), 391 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 46549cb062..ae56a86394 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-// RTE_SCHED_CMAN is not set
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3e4bed81e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-#define WRED_SUPPORTED 1
-#else
#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..2432b56aee 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,77 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
-static struct rte_sched_cman_params cman_params = {
- .red_params = {
- /* Traffic Class 0 Colors Green / Yellow / Red */
- [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 1 - Colors Green / Yellow / Red */
- [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 2 - Colors Green / Yellow / Red */
- [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 3 - Colors Green / Yellow / Red */
- [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 4 - Colors Green / Yellow / Red */
- [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 5 - Colors Green / Yellow / Red */
- [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 6 - Colors Green / Yellow / Red */
- [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 7 - Colors Green / Yellow / Red */
- [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 8 - Colors Green / Yellow / Red */
- [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 9 - Colors Green / Yellow / Red */
- [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 10 - Colors Green / Yellow / Red */
- [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 11 - Colors Green / Yellow / Red */
- [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 12 - Colors Green / Yellow / Red */
- [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- },
-};
-#endif /* RTE_SCHED_CMAN */
-
static uint32_t n_pipe_profiles;
static const struct rte_sched_subport_params subport_params_default = {
@@ -96,9 +25,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..deaa28d391 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -23,6 +23,8 @@
uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
uint32_t n_active_queues;
+struct rte_sched_cman_params cman_params;
+
int
cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params)
{
@@ -229,40 +231,6 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p)
-{
- int j, k;
- subport_p->cman_params->cman_mode = cman_p.cman_mode;
-
- for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
- if (subport_p->cman_params->cman_mode ==
- RTE_SCHED_CMAN_RED) {
- for (k = 0; k < RTE_COLORS; k++) {
- subport_p->cman_params->red_params[j][k].min_th =
- cman_p.red_params[j][k].min_th;
- subport_p->cman_params->red_params[j][k].max_th =
- cman_p.red_params[j][k].max_th;
- subport_p->cman_params->red_params[j][k].maxp_inv =
- cman_p.red_params[j][k].maxp_inv;
- subport_p->cman_params->red_params[j][k].wq_log2 =
- cman_p.red_params[j][k].wq_log2;
- }
- } else {
- subport_p->cman_params->pie_params[j].qdelay_ref =
- cman_p.pie_params[j].qdelay_ref;
- subport_p->cman_params->pie_params[j].dp_update_interval =
- cman_p.pie_params[j].dp_update_interval;
- subport_p->cman_params->pie_params[j].max_burst =
- cman_p.pie_params[j].max_burst;
- subport_p->cman_params->pie_params[j].tailq_th =
- cman_p.pie_params[j].tailq_th;
- }
- }
-}
-#endif
-
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
{
@@ -276,12 +244,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
- struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = { },
- };
-
if (rte_cfgfile_has_section(cfg, "red")) {
cman_params.cman_mode = RTE_SCHED_CMAN_RED;
@@ -387,7 +349,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +426,9 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
- set_subport_cman_params(subport_params+i, cman_params);
-#endif
+ if (cman_params.cman_mode == RTE_SCHED_CMAN_PIE ||
+ cman_params.cman_mode == RTE_SCHED_CMAN_RED)
+ subport_params[i].cman_params = &cman_params;
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..0dc458aa71 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,11 +12,6 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p);
-#endif
-
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
int cfg_load_subport_profile(struct rte_cfgfile *cfg,
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..e8b819ffb9 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,78 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
-struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = {
- /* Traffic Class 0 Colors Green / Yellow / Red */
- [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 1 - Colors Green / Yellow / Red */
- [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 2 - Colors Green / Yellow / Red */
- [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 3 - Colors Green / Yellow / Red */
- [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 4 - Colors Green / Yellow / Red */
- [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 5 - Colors Green / Yellow / Red */
- [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 6 - Colors Green / Yellow / Red */
- [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 7 - Colors Green / Yellow / Red */
- [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 8 - Colors Green / Yellow / Red */
- [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 9 - Colors Green / Yellow / Red */
- [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 10 - Colors Green / Yellow / Red */
- [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 11 - Colors Green / Yellow / Red */
- [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 12 - Colors Green / Yellow / Red */
- [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- },
-};
-#endif /* RTE_SCHED_CMAN */
-
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
.n_pipes_per_subport_enabled = 4096,
@@ -281,9 +209,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..c9ec187c93 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -73,137 +73,4 @@ tc period = 40 ; Milliseconds
tc 12 oversubscription weight = 1
-tc 12 wrr weights = 1 1 1 1
-
-; RED params per traffic class and color (Green / Yellow / Red)
-;[red]
-;tc 0 wred min = 48 40 32
-;tc 0 wred max = 64 64 64
-;tc 0 wred inv prob = 10 10 10
-;tc 0 wred weight = 9 9 9
-
-;tc 1 wred min = 48 40 32
-;tc 1 wred max = 64 64 64
-;tc 1 wred inv prob = 10 10 10
-;tc 1 wred weight = 9 9 9
-
-;tc 2 wred min = 48 40 32
-;tc 2 wred max = 64 64 64
-;tc 2 wred inv prob = 10 10 10
-;tc 2 wred weight = 9 9 9
-
-;tc 3 wred min = 48 40 32
-;tc 3 wred max = 64 64 64
-;tc 3 wred inv prob = 10 10 10
-;tc 3 wred weight = 9 9 9
-
-;tc 4 wred min = 48 40 32
-;tc 4 wred max = 64 64 64
-;tc 4 wred inv prob = 10 10 10
-;tc 4 wred weight = 9 9 9
-
-;tc 5 wred min = 48 40 32
-;tc 5 wred max = 64 64 64
-;tc 5 wred inv prob = 10 10 10
-;tc 5 wred weight = 9 9 9
-
-;tc 6 wred min = 48 40 32
-;tc 6 wred max = 64 64 64
-;tc 6 wred inv prob = 10 10 10
-;tc 6 wred weight = 9 9 9
-
-;tc 7 wred min = 48 40 32
-;tc 7 wred max = 64 64 64
-;tc 7 wred inv prob = 10 10 10
-;tc 7 wred weight = 9 9 9
-
-;tc 8 wred min = 48 40 32
-;tc 8 wred max = 64 64 64
-;tc 8 wred inv prob = 10 10 10
-;tc 8 wred weight = 9 9 9
-
-;tc 9 wred min = 48 40 32
-;tc 9 wred max = 64 64 64
-;tc 9 wred inv prob = 10 10 10
-;tc 9 wred weight = 9 9 9
-
-;tc 10 wred min = 48 40 32
-;tc 10 wred max = 64 64 64
-;tc 10 wred inv prob = 10 10 10
-;tc 10 wred weight = 9 9 9
-
-;tc 11 wred min = 48 40 32
-;tc 11 wred max = 64 64 64
-;tc 11 wred inv prob = 10 10 10
-;tc 11 wred weight = 9 9 9
-
-;tc 12 wred min = 48 40 32
-;tc 12 wred max = 64 64 64
-;tc 12 wred inv prob = 10 10 10
-;tc 12 wred weight = 9 9 9
-
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+tc 12 wrr weights = 1 1 1 1
\ No newline at end of file
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 599c7e9536..c5fa9e4582 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1084,7 +1080,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1166,7 +1161,6 @@ rte_sched_cman_config(struct rte_sched_port *port,
return -EINVAL;
}
-#endif
int
rte_sched_subport_tc_ov_config(struct rte_sched_port *port,
@@ -1285,7 +1279,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
/* TC oversubscription is enabled by default */
s->tc_ov_enabled = 1;
-#ifdef RTE_SCHED_CMAN
if (params->cman_params != NULL) {
s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
@@ -1297,7 +1290,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
} else {
s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1823,7 +1815,7 @@ rte_sched_port_update_subport_stats_on_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
uint32_t tc_index = rte_sched_port_pipe_tc(port, qindex);
uint32_t pkt_len = pkt->pkt_len;
@@ -1849,21 +1841,17 @@ static inline void
rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
uint32_t pkt_len = pkt->pkt_len;
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1908,13 +1896,11 @@ static inline void
rte_sched_port_red_set_queue_empty_timestamp(struct rte_sched_port *port,
struct rte_sched_subport *subport, uint32_t qindex)
{
- if (subport->cman_enabled) {
+ if (subport->cman_enabled && subport->cman == RTE_SCHED_CMAN_RED) {
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
- if (subport->cman == RTE_SCHED_CMAN_RED) {
- struct rte_red *red = &qe->red;
+ struct rte_red *red = &qe->red;
- rte_red_mark_queue_empty(red, port->time);
- }
+ rte_red_mark_queue_empty(red, port->time);
}
}
@@ -1933,29 +1919,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
--
2.25.1
^ permalink raw reply [relevance 1%]
* [RFC v2 v2 00/29] Bus and device cleanup for 22.11
2022-06-28 14:46 2% [RFC PATCH 00/11] Bus cleanup for 22.11 David Marchand
2022-06-28 14:46 1% ` [RFC PATCH 11/11] bus: hide bus object David Marchand
@ 2022-07-09 8:26 1% ` David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 13/29] bus: hide bus object David Marchand
` (4 more replies)
` (3 subsequent siblings)
5 siblings, 5 replies; 200+ results
From: David Marchand @ 2022-07-09 8:26 UTC (permalink / raw)
To: dev
This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
And mark associated driver only API as internal.
A good amount of the patches are preparation work on rte_bus.h,
rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
between them. This is something I had in store for some time, maybe I
should have dropped it from the PoC, but I think those cleanups are
worth it in any case.
Then PCI bus specific handling are moved from unit tests and examples,
though there is still a special case left in testpmd that may require a
new API, to be discussed.
After this series, driver-only API headers for registering to buses are
not exported anymore, unless the enable_driver_sdk meson option is
selected.
New accessors for rte_bus, rte_driver and rte_device have been added,
marked with an experimental tag though we may declare them as stable
right away so that users can switch to them directly. That's also
something to agree on.
I simplified my series and switched to only update "external" users,
like app/ and examples/ files.
We need some checkpatch new checks to be sure we won't get some
driver-only headers included in these areas. That's something I'll work
on in the non RFC series.
"Internal" users are simply using the internal headers. That helps
greatly reducing the size of the changes.
Disclaimer: again, in this v2, this series is a bit rushed (I brute forced
compilation tests in GHA so that it passes between patches, but there still
may be something broken...).
Not surprisingly, the ABI check in the CI is expected to fail.
Comments welcome.
Changes since RFC v1:
- added two more cleanups (new patch 3 and 4) for unit test and examples
relying on PCI specific info,
- went on with masking rte_driver and rte_device too,
--
David Marchand
David Marchand (29):
common/mlx5: rework check on driver registration
raw/ifpga: remove PCI bus accessor
kni: stop populating PCI info in examples
examples/ethtool: prefer device name
dev: hide debug messages in device iterator
dev: move unrelated macros from header
devargs: remove dependency on bus header
bus: remove unneeded inclusion of bus header
bus: move IOVA definition from header
drivers/bus: remove back reference to bus objects
drivers/bus: hide specific structures
bus: introduce accessors
bus: hide bus object
bbdev: mark driver header
ethdev: mark some headers as driver only
rawdev: mark driver header
drivers: export drivers headers
bus/auxiliary: make driver-only headers private
bus/dpaa: make driver-only headers private
bus/fslmc: make driver-only headers private
bus/ifpga: cleanup exported symbols
bus/ifpga: make driver-only headers private
bus/pci: make driver-only headers private
bus/vdev: make driver-only headers private
bus/vmbus: make driver-only headers private
dev: introduce driver name
dev: hide driver object
dev: introduce device accessors
dev: hide device object
app/proc-info/main.c | 6 +-
app/test-compress-perf/comp_perf_options.h | 2 +
app/test-pmd/config.c | 12 +-
app/test-pmd/testpmd.c | 4 +-
app/test-pmd/testpmd.h | 7 +-
app/test/test_devargs.c | 6 +-
app/test/test_kni.c | 30 --
app/test/test_vdev.c | 3 +-
app/test/virtual_pmd.c | 2 +-
drivers/baseband/acc100/rte_acc100_pmd.c | 4 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 4 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 2 +-
drivers/baseband/null/bbdev_null.c | 2 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 5 +-
drivers/bus/auxiliary/auxiliary_params.c | 5 +-
...bus_auxiliary.h => bus_auxiliary_driver.h} | 20 +-
drivers/bus/auxiliary/linux/auxiliary.c | 2 -
drivers/bus/auxiliary/meson.build | 4 +-
drivers/bus/auxiliary/private.h | 30 +-
drivers/bus/auxiliary/version.map | 3 +-
drivers/bus/dpaa/base/qbman/qman.c | 2 +-
.../{rte_dpaa_bus.h => bus_dpaa_driver.h} | 25 +-
drivers/bus/dpaa/dpaa_bus.c | 24 +-
.../fslmc/{rte_fslmc.h => bus_fslmc_driver.h} | 30 +-
drivers/bus/fslmc/fslmc_bus.c | 14 +-
drivers/bus/fslmc/fslmc_vfio.c | 5 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 4 +-
drivers/bus/fslmc/private.h | 27 ++
.../{rte_bus_ifpga.h => bus_ifpga_driver.h} | 19 +-
drivers/bus/ifpga/ifpga_bus.c | 23 +-
drivers/bus/ifpga/ifpga_common.c | 88 ------
drivers/bus/ifpga/ifpga_common.h | 54 +++-
drivers/bus/ifpga/meson.build | 4 +-
drivers/bus/ifpga/version.map | 4 +-
drivers/bus/pci/bsd/pci.c | 3 -
drivers/bus/pci/bus_pci_driver.h | 200 ++++++++++++
drivers/bus/pci/linux/pci.c | 3 -
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/meson.build | 1 +
drivers/bus/pci/pci_common.c | 4 +-
drivers/bus/pci/pci_params.c | 4 +-
drivers/bus/pci/private.h | 19 +-
drivers/bus/pci/rte_bus_pci.h | 201 +-----------
drivers/bus/pci/version.map | 11 +-
drivers/bus/pci/windows/pci.c | 1 +
drivers/bus/pci/windows/pci_netuio.c | 1 +
drivers/bus/vdev/bus_vdev_driver.h | 151 +++++++++
drivers/bus/vdev/meson.build | 1 +
drivers/bus/vdev/rte_bus_vdev.h | 134 --------
drivers/bus/vdev/vdev.c | 12 +-
drivers/bus/vdev/vdev_params.c | 3 +-
drivers/bus/vdev/version.map | 9 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 106 +++++++
drivers/bus/vmbus/linux/vmbus_uio.c | 1 -
drivers/bus/vmbus/meson.build | 1 +
drivers/bus/vmbus/private.h | 20 +-
drivers/bus/vmbus/rte_bus_vmbus.h | 104 ------
drivers/bus/vmbus/version.map | 9 +-
drivers/bus/vmbus/vmbus_bufring.c | 1 -
drivers/bus/vmbus/vmbus_channel.c | 1 -
drivers/bus/vmbus/vmbus_common.c | 3 -
drivers/bus/vmbus/vmbus_common_uio.c | 1 -
drivers/common/cnxk/roc_platform.h | 2 +-
.../common/mlx5/linux/mlx5_common_auxiliary.c | 12 +-
drivers/common/mlx5/linux/mlx5_common_os.c | 4 +-
drivers/common/mlx5/linux/mlx5_common_os.h | 2 +-
drivers/common/mlx5/mlx5_common.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 3 +-
drivers/common/mlx5/mlx5_common_private.h | 2 +-
drivers/common/mlx5/windows/mlx5_common_os.c | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_device.c | 1 +
drivers/common/qat/qat_device.h | 2 +-
drivers/common/qat/qat_qp.c | 4 +-
drivers/common/sfc_efx/sfc_efx.h | 2 +-
drivers/compress/isal/isal_compress_pmd.c | 2 +-
drivers/compress/mlx5/mlx5_compress.c | 2 +-
drivers/compress/octeontx/otx_zip.h | 2 +-
drivers/compress/qat/qat_comp.c | 2 +-
drivers/compress/qat/qat_comp_pmd.c | 1 +
drivers/compress/zlib/zlib_pmd.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 1 +
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_device.h | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 2 +-
drivers/crypto/ccp/ccp_dev.h | 2 +-
drivers/crypto/ccp/ccp_pci.h | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 6 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 4 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
drivers/crypto/ipsec_mb/pmd_kasumi.c | 2 +-
drivers/crypto/mlx5/mlx5_crypto.c | 2 +-
drivers/crypto/mvsam/rte_mrvl_pmd.c | 2 +-
drivers/crypto/nitrox/nitrox_device.h | 2 +-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev_ops.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym.c | 2 +-
.../scheduler/rte_cryptodev_scheduler.c | 1 +
drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
drivers/crypto/virtio/virtio_pci.c | 1 -
drivers/crypto/virtio/virtio_pci.h | 2 +-
drivers/dma/cnxk/cnxk_dmadev.c | 3 +-
drivers/dma/dpaa/dpaa_qdma.c | 2 +-
drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
drivers/dma/hisilicon/hisi_dmadev.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 3 +-
drivers/dma/idxd/idxd_pci.c | 2 +-
drivers/dma/ioat/ioat_dmadev.c | 2 +-
drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_main.h | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 4 +-
drivers/event/dpaa/dpaa_eventdev.c | 4 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 6 +-
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 4 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 4 +-
drivers/event/octeontx/ssovf_evdev.c | 4 +-
drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-
drivers/event/octeontx/ssovf_probe.c | 2 +-
drivers/event/octeontx/timvf_probe.c | 2 +-
drivers/event/opdl/opdl_evdev.c | 2 +-
drivers/event/opdl/opdl_evdev_init.c | 2 +-
drivers/event/opdl/opdl_test.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 4 +-
drivers/event/sw/sw_evdev.c | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 2 +-
drivers/gpu/cuda/cuda.c | 4 +-
drivers/mempool/cnxk/cnxk_mempool.c | 2 +-
drivers/mempool/dpaa/dpaa_mempool.h | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 2 +-
drivers/meson.build | 4 +
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +-
drivers/net/ark/ark_ethdev.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 4 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 3 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
drivers/net/cxgbe/base/adapter.h | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 4 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
drivers/net/dpaa/dpaa_rxtx.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 4 +-
drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 4 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 4 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 4 +-
drivers/net/e1000/em_rxtx.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 4 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/e1000/igb_pf.c | 2 +-
drivers/net/ena/ena_ethdev.h | 4 +-
drivers/net/enic/base/vnic_dev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 4 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 4 +-
drivers/net/failsafe/failsafe.c | 3 +-
drivers/net/failsafe/failsafe_eal.c | 1 +
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwif.c | 2 +-
drivers/net/hinic/base/hinic_pmd_nicio.c | 2 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 2 +-
drivers/net/hns3/hns3_common.c | 2 +-
drivers/net/hns3/hns3_ethdev.c | 2 +-
drivers/net/hns3/hns3_rxtx.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 4 +-
drivers/net/i40e/i40e_vf_representor.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/igc/igc_ethdev.c | 2 +-
drivers/net/ionic/ionic.h | 2 +-
drivers/net/ionic/ionic_ethdev.c | 2 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 2 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 4 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 1 +
drivers/net/kni/rte_eth_kni.c | 2 +-
drivers/net/liquidio/lio_ethdev.c | 1 +
drivers/net/memif/memif_socket.c | 2 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/mlx4/mlx4_ethdev.c | 2 +-
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 5 +-
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
drivers/net/mvneta/mvneta_ethdev.c | 2 +-
drivers/net/mvpp2/mrvl_ethdev.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 5 +-
drivers/net/netvsc/hn_nvs.c | 4 +-
drivers/net/netvsc/hn_rndis.c | 4 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/netvsc/hn_vf.c | 4 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/ngbe/base/ngbe_osdep.h | 2 +-
drivers/net/ngbe/ngbe_pf.c | 2 +-
drivers/net/null/rte_eth_null.c | 2 +-
drivers/net/octeontx/base/octeontx_pkivf.c | 2 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 +-
drivers/net/pcap/pcap_ethdev.c | 2 +-
drivers/net/pfe/pfe_ethdev.c | 2 +-
drivers/net/qede/base/bcm_osal.h | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/ring/rte_eth_ring.c | 2 +-
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 4 +-
drivers/net/sfc/sfc_sriov.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/softnic/rte_eth_softnic.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ethdev.h | 2 +-
drivers/net/txgbe/txgbe_flow.c | 2 +-
drivers/net/txgbe/txgbe_pf.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 6 +-
drivers/net/vhost/rte_eth_vhost.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/net/virtio/virtio_pci.h | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 4 +-
drivers/net/virtio/virtio_user_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +-
drivers/raw/cnxk_gpio/cnxk_gpio.c | 2 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 2 +-
drivers/raw/ifpga/afu_pmd_core.h | 2 +-
drivers/raw/ifpga/afu_pmd_he_hssi.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_lpbk.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_mem.c | 4 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 4 +-
drivers/raw/ifpga/ifpga_rawdev.c | 15 +-
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 8 +-
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 -
drivers/raw/ifpga/version.map | 1 -
drivers/raw/ioat/idxd_bus.c | 2 +-
drivers/raw/ioat/idxd_pci.c | 2 +-
drivers/raw/ioat/ioat_rawdev.c | 2 +-
drivers/raw/ntb/ntb.c | 2 +-
drivers/raw/ntb/ntb_hw_intel.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 4 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 4 +-
drivers/regex/mlx5/mlx5_regex.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
drivers/regex/mlx5/mlx5_regex_fastpath.c | 2 +-
drivers/vdpa/ifc/base/ifcvf_osdep.h | 2 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
drivers/vdpa/sfc/sfc_vdpa.h | 2 +-
examples/ethtool/lib/rte_ethtool.c | 17 +-
examples/ip_pipeline/kni.c | 10 -
examples/l3fwd/l3fwd_em.c | 4 +-
examples/l3fwd/l3fwd_fib.c | 8 +-
examples/l3fwd/l3fwd_lpm.c | 4 +-
examples/multi_process/hotplug_mp/commands.c | 6 +-
examples/vdpa/main.c | 16 +-
lib/bbdev/meson.build | 5 +-
lib/compressdev/rte_compressdev.c | 2 +
lib/compressdev/rte_compressdev_pmd.c | 1 +
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 2 +-
lib/dmadev/rte_dmadev.c | 1 +
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_bus.c | 28 +-
lib/eal/common/eal_common_dev.c | 41 ++-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/eal_private.h | 2 +-
lib/eal/common/eal_thread.h | 1 +
lib/eal/common/hotplug_mp.c | 1 +
lib/eal/include/bus_driver.h | 296 ++++++++++++++++++
lib/eal/include/dev_driver.h | 42 +++
lib/eal/include/meson.build | 5 +
lib/eal/include/rte_bus.h | 293 +----------------
lib/eal/include/rte_common.h | 11 +
lib/eal/include/rte_dev.h | 89 ++++--
lib/eal/include/rte_devargs.h | 4 +-
lib/eal/include/rte_eal.h | 15 +-
lib/eal/include/rte_lcore.h | 2 +
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 12 +-
lib/eal/windows/eal.c | 1 +
lib/ethdev/ethdev_driver.c | 1 +
lib/ethdev/ethdev_driver.h | 1 +
lib/ethdev/ethdev_pci.h | 5 +-
lib/ethdev/ethdev_vdev.h | 2 +-
lib/ethdev/meson.build | 6 +-
lib/ethdev/rte_ethdev.c | 1 +
lib/ethdev/rte_ethdev.h | 2 +-
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/eventdev_pmd_pci.h | 2 +-
lib/eventdev/eventdev_pmd_vdev.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 2 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
lib/eventdev/rte_eventdev.c | 2 +-
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 3 +-
lib/pcapng/rte_pcapng.c | 3 +-
lib/rawdev/meson.build | 3 +-
lib/rawdev/rte_rawdev.c | 2 +-
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/regexdev/rte_regexdev.c | 1 +
lib/security/rte_security.c | 3 +-
lib/vhost/vdpa.c | 2 +
353 files changed, 1605 insertions(+), 1480 deletions(-)
rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (91%)
rename drivers/bus/dpaa/{rte_dpaa_bus.h => bus_dpaa_driver.h} (92%)
rename drivers/bus/fslmc/{rte_fslmc.h => bus_fslmc_driver.h} (88%)
create mode 100644 drivers/bus/fslmc/private.h
rename drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)
delete mode 100644 drivers/bus/ifpga/ifpga_common.c
create mode 100644 drivers/bus/pci/bus_pci_driver.h
create mode 100644 drivers/bus/vdev/bus_vdev_driver.h
create mode 100644 drivers/bus/vmbus/bus_vmbus_driver.h
create mode 100644 lib/eal/include/bus_driver.h
create mode 100644 lib/eal/include/dev_driver.h
--
2.36.1
^ permalink raw reply [relevance 1%]
* [RFC v2 v2 13/29] bus: hide bus object
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
@ 2022-07-09 8:26 1% ` David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 27/29] dev: hide driver object David Marchand
` (3 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-07-09 8:26 UTC (permalink / raw)
To: dev
Cc: Parav Pandit, Xueming Li, Hemant Agrawal, Sachin Saxena,
Rosen Xu, Anatoly Burakov, Stephen Hemminger, Long Li,
Matan Azrad, Viacheslav Ovsiienko, Bruce Richardson, Kevin Laatz,
Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Ray Kinsella,
Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, Reshma Pattan
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since RFC v1:
- update all existing users of the public header to use the internal one,
---
app/test/test_devargs.c | 2 +-
app/test/test_vdev.c | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/private.h | 2 +-
drivers/bus/dpaa/dpaa_bus.c | 4 +-
drivers/bus/fslmc/fslmc_bus.c | 2 +-
drivers/bus/fslmc/private.h | 2 +-
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/pci_common.c | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/pci/private.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vmbus/private.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 2 +-
drivers/net/failsafe/failsafe.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/raw/ioat/idxd_bus.c | 2 +-
lib/eal/common/eal_common_bus.c | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/hotplug_mp.c | 2 +-
lib/eal/include/bus_driver.h | 296 +++++++++++++++++++++++
lib/eal/include/meson.build | 4 +
lib/eal/include/rte_bus.h | 275 +--------------------
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 4 +-
lib/ethdev/rte_ethdev.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
36 files changed, 338 insertions(+), 307 deletions(-)
create mode 100644 lib/eal/include/bus_driver.h
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index ac5bc34c18..14a0b11fbe 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -6,10 +6,10 @@
#include <stdio.h>
#include <string.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
#include <rte_class.h>
#include "test.h"
diff --git a/app/test/test_vdev.c b/app/test/test_vdev.c
index 5eeff3106d..9e39993e90 100644
--- a/app/test/test_vdev.c
+++ b/app/test/test_vdev.c
@@ -6,9 +6,9 @@
#include <stdio.h>
#include <string.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
#include <rte_bus_vdev.h>
#include "test.h"
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 0b212f2d64..38d722e653 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -12,7 +12,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_eal.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index 9017118b36..542083dc89 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_dev.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index d97e8c694e..1e0e584039 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "rte_bus_auxiliary.h"
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index ad4ea156a6..ed3036a642 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -14,6 +14,8 @@
#include <sys/types.h>
#include <sys/eventfd.h>
+#include <bus_driver.h>
+#include <ethdev_driver.h>
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_interrupts.h>
@@ -26,10 +28,8 @@
#include <rte_eal.h>
#include <rte_alarm.h>
#include <rte_ether.h>
-#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_ring.h>
-#include <rte_bus.h>
#include <rte_mbuf_pool_ops.h>
#include <rte_mbuf_dyn.h>
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 8498f5321a..0b52c8e46c 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
diff --git a/drivers/bus/fslmc/private.h b/drivers/bus/fslmc/private.h
index 80d4673ca8..f08dc7716b 100644
--- a/drivers/bus/fslmc/private.h
+++ b/drivers/bus/fslmc/private.h
@@ -5,7 +5,7 @@
#ifndef __PRIVATE_H__
#define __PRIVATE_H__
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_fslmc.h>
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 5353dbdb01..d962fb8362 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -13,8 +13,8 @@
#include <unistd.h>
#include <fcntl.h>
+#include <bus_driver.h>
#include <rte_errno.h>
-#include <rte_bus.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_memzone.h>
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index cd0d0b1670..fab3483d9f 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -18,7 +18,7 @@
#include <rte_malloc.h>
#include <rte_vfio.h>
#include <rte_eal.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_tailq.h>
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 0d61d49287..c26aacd364 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -13,7 +13,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
#include <rte_lcore.h>
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 61a868707f..39d702a418 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include <rte_dev.h>
#include <rte_errno.h>
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 6ccec15655..0cefed5edf 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -8,7 +8,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_os_shim.h>
#include <rte_pci.h>
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 804486d3ba..ee569fcdf2 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -10,9 +10,9 @@
#include <stdbool.h>
#include <sys/queue.h>
+#include <bus_driver.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>
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index 597ba18df9..600530c4f6 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <sys/uio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_eal_paging.h>
#include <rte_vmbus_reg.h>
diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c
index e708e23a7f..838b62b81c 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -9,7 +9,7 @@
#include <rte_errno.h>
#include <rte_class.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include "mlx5_common_log.h"
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 13cb967f6d..e30dcfc281 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -8,7 +8,7 @@
#include <sys/mman.h>
#include <libgen.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index b90757756a..cc3805baba 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -2,9 +2,9 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include <bus_driver.h>
#include <rte_devargs.h>
#include <rte_pci.h>
-#include <rte_bus.h>
#include <rte_bus_pci.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 3eb7d32b76..7fe77cfe8e 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -11,7 +11,7 @@
#include <ethdev_vdev.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_vdev.h>
#include "failsafe_private.h"
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index 130344dce2..d71b512f81 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -3,7 +3,7 @@
* Copyright 2017 Mellanox Technologies, Ltd
*/
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 04b9614f5c..6899f430cb 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -19,7 +19,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include <rte_bus_auxiliary.h>
#include <rte_common.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 308936ad9f..0aedecd358 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -31,7 +31,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_vmbus.h>
#include <rte_alarm.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 2587195168..9d65f75048 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -23,8 +23,8 @@
#include <sys/socket.h>
#include <unistd.h>
+#include <bus_driver.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
#include <rte_bus_vdev.h>
#include <rte_common.h>
#include <rte_dev.h>
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 632451dcbe..9cf4d760b4 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -9,7 +9,7 @@
#endif
#include <rte_io.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "virtio_pci.h"
#include "virtio_logs.h"
diff --git a/drivers/raw/ioat/idxd_bus.c b/drivers/raw/ioat/idxd_bus.c
index 539f51b1b1..f32d811055 100644
--- a/drivers/raw/ioat/idxd_bus.c
+++ b/drivers/raw/ioat/idxd_bus.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/mman.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_string_fns.h>
#include "ioat_private.h"
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index cbf382f967..be64d31b0f 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_debug.h>
#include <rte_string_fns.h>
#include <rte_errno.h>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index b6f0392f30..62a598957c 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c
index d5833af373..03e6e59baf 100644
--- a/lib/eal/common/eal_common_devargs.c
+++ b/lib/eal/common/eal_common_devargs.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <stdarg.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index 1614a57752..5202bd5658 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -3,7 +3,7 @@
*/
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_eal.h>
#include <rte_errno.h>
#include <rte_alarm.h>
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
new file mode 100644
index 0000000000..d2e615a736
--- /dev/null
+++ b/lib/eal/include/bus_driver.h
@@ -0,0 +1,296 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef BUS_DRIVER_H
+#define BUS_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bus.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
+#include <rte_eal.h>
+#include <rte_tailq.h>
+
+struct rte_devargs;
+struct rte_device;
+
+/** Double linked list of buses */
+RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
+
+/**
+ * Bus specific scan for devices attached on the bus.
+ * For each bus object, the scan would be responsible for finding devices and
+ * adding them to its private device list.
+ *
+ * A bus should mandatorily implement this method.
+ *
+ * @return
+ * 0 for successful scan
+ * <0 for unsuccessful scan with error value
+ */
+typedef int (*rte_bus_scan_t)(void);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * This is called while iterating over each registered bus.
+ *
+ * @return
+ * 0 for successful probe
+ * !0 for any error while probing
+ */
+typedef int (*rte_bus_probe_t)(void);
+
+/**
+ * Device iterator to find a device on a bus.
+ *
+ * This function returns an rte_device if one of those held by the bus
+ * matches the data passed as parameter.
+ *
+ * If the comparison function returns zero this function should stop iterating
+ * over any more devices. To continue a search the device of a previous search
+ * can be passed via the start parameter.
+ *
+ * @param cmp
+ * Comparison function.
+ *
+ * @param data
+ * Data to compare each device against.
+ *
+ * @param start
+ * starting point for the iteration
+ *
+ * @return
+ * The first device matching the data, NULL if none exists.
+ */
+typedef struct rte_device *
+(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
+ const void *data);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_plug_t)(struct rte_device *dev);
+
+/**
+ * Implementation specific remove function which is responsible for unlinking
+ * devices on that bus from assigned driver.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
+
+/**
+ * Bus specific parsing function.
+ * Validates the syntax used in the textual representation of a device,
+ * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
+ * device representation to ``addr``.
+ *
+ * @param[in] name
+ * device textual description
+ *
+ * @param[out] addr
+ * device information location address, into which parsed info
+ * should be written. If NULL, nothing should be written, which
+ * is not an error.
+ *
+ * @return
+ * 0 if parsing was successful.
+ * !0 for any error.
+ */
+typedef int (*rte_bus_parse_t)(const char *name, void *addr);
+
+/**
+ * Parse bus part of the device arguments.
+ *
+ * The field name of the struct rte_devargs will be set.
+ *
+ * @param da
+ * Pointer to the devargs to parse.
+ *
+ * @return
+ * 0 on successful parsing, otherwise rte_errno is set.
+ * -EINVAL: on parsing error.
+ * -ENODEV: if no key matching a device argument is specified.
+ * -E2BIG: device name is too long.
+ */
+typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
+
+/**
+ * Device level DMA map function.
+ * After a successful call, the memory segment will be mapped to the
+ * given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to map.
+ * @param iova
+ * IOVA address to map.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Device level DMA unmap function.
+ * After a successful call, the memory segment will no longer be
+ * accessible by the given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to unmap.
+ * @param iova
+ * IOVA address to unmap.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if un-mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Implement a specific hot-unplug handler, which is responsible for
+ * handle the failure when device be hot-unplugged. When the event of
+ * hot-unplug be detected, it could call this function to handle
+ * the hot-unplug failure and avoid app crash.
+ * @param dev
+ * Pointer of the device structure.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
+
+/**
+ * Implement a specific sigbus handler, which is responsible for handling
+ * the sigbus error which is either original memory error, or specific memory
+ * error that caused of device be hot-unplugged. When sigbus error be captured,
+ * it could call this function to handle sigbus error.
+ * @param failure_addr
+ * Pointer of the fault address of the sigbus error.
+ *
+ * @return
+ * 0 for success handle the sigbus for hot-unplug.
+ * 1 for not process it, because it is a generic sigbus error.
+ * -1 for failed to handle the sigbus for hot-unplug.
+ */
+typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
+
+/**
+ * Bus scan policies
+ */
+enum rte_bus_scan_mode {
+ RTE_BUS_SCAN_UNDEFINED,
+ RTE_BUS_SCAN_ALLOWLIST,
+ RTE_BUS_SCAN_BLOCKLIST,
+};
+
+/**
+ * A structure used to configure bus operations.
+ */
+struct rte_bus_conf {
+ enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
+};
+
+
+/**
+ * Get common iommu class of the all the devices on the bus. The bus may
+ * check that those devices are attached to iommu driver.
+ * If no devices are attached to the bus. The bus may return with don't care
+ * (_DC) value.
+ * Otherwise, The bus will return appropriate _pa or _va iova mode.
+ *
+ * @return
+ * enum rte_iova_mode value.
+ */
+typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
+
+/**
+ * A structure describing a generic bus.
+ */
+struct rte_bus {
+ RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
+ const char *name; /**< Name of the bus */
+ rte_bus_scan_t scan; /**< Scan for devices attached to bus */
+ rte_bus_probe_t probe; /**< Probe devices on bus */
+ rte_bus_find_device_t find_device; /**< Find a device on the bus */
+ rte_bus_plug_t plug; /**< Probe single device for drivers */
+ rte_bus_unplug_t unplug; /**< Remove single device from driver */
+ rte_bus_parse_t parse; /**< Parse a device name */
+ rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
+ rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
+ rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
+ struct rte_bus_conf conf; /**< Bus configuration */
+ rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
+ rte_dev_iterate_t dev_iterate; /**< Device iterator. */
+ rte_bus_hot_unplug_handler_t hot_unplug_handler;
+ /**< handle hot-unplug failure on the bus */
+ rte_bus_sigbus_handler_t sigbus_handler;
+ /**< handle sigbus error on the bus */
+};
+
+/**
+ * Register a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be registered.
+ */
+__rte_internal
+void rte_bus_register(struct rte_bus *bus);
+
+/**
+ * Helper for Bus registration.
+ * The constructor has higher priority than PMD constructors.
+ */
+#define RTE_REGISTER_BUS(nm, bus) \
+RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
+{\
+ (bus).name = RTE_STR(nm);\
+ rte_bus_register(&bus); \
+}
+
+/**
+ * Unregister a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be unregistered.
+ */
+__rte_internal
+void rte_bus_unregister(struct rte_bus *bus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BUS_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index fd6e844224..77d8621a51 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -55,6 +55,10 @@ headers += files(
'rte_vfio.h',
)
+driver_sdk_headers = files(
+ 'bus_driver.h',
+)
+
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'generic/rte_atomic.h',
diff --git a/lib/eal/include/rte_bus.h b/lib/eal/include/rte_bus.h
index 2775e1ac66..902a6c7c59 100644
--- a/lib/eal/include/rte_bus.h
+++ b/lib/eal/include/rte_bus.h
@@ -20,251 +20,11 @@ extern "C" {
#include <stdio.h>
-#include <rte_dev.h>
+#include <rte_compat.h>
#include <rte_eal.h>
-#include <rte_log.h>
-/** Double linked list of buses */
-RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
-
-/**
- * Bus specific scan for devices attached on the bus.
- * For each bus object, the scan would be responsible for finding devices and
- * adding them to its private device list.
- *
- * A bus should mandatorily implement this method.
- *
- * @return
- * 0 for successful scan
- * <0 for unsuccessful scan with error value
- */
-typedef int (*rte_bus_scan_t)(void);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * This is called while iterating over each registered bus.
- *
- * @return
- * 0 for successful probe
- * !0 for any error while probing
- */
-typedef int (*rte_bus_probe_t)(void);
-
-/**
- * Device iterator to find a device on a bus.
- *
- * This function returns an rte_device if one of those held by the bus
- * matches the data passed as parameter.
- *
- * If the comparison function returns zero this function should stop iterating
- * over any more devices. To continue a search the device of a previous search
- * can be passed via the start parameter.
- *
- * @param cmp
- * Comparison function.
- *
- * @param data
- * Data to compare each device against.
- *
- * @param start
- * starting point for the iteration
- *
- * @return
- * The first device matching the data, NULL if none exists.
- */
-typedef struct rte_device *
-(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
- const void *data);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_plug_t)(struct rte_device *dev);
-
-/**
- * Implementation specific remove function which is responsible for unlinking
- * devices on that bus from assigned driver.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
-
-/**
- * Bus specific parsing function.
- * Validates the syntax used in the textual representation of a device,
- * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
- * device representation to ``addr``.
- *
- * @param[in] name
- * device textual description
- *
- * @param[out] addr
- * device information location address, into which parsed info
- * should be written. If NULL, nothing should be written, which
- * is not an error.
- *
- * @return
- * 0 if parsing was successful.
- * !0 for any error.
- */
-typedef int (*rte_bus_parse_t)(const char *name, void *addr);
-
-/**
- * Parse bus part of the device arguments.
- *
- * The field name of the struct rte_devargs will be set.
- *
- * @param da
- * Pointer to the devargs to parse.
- *
- * @return
- * 0 on successful parsing, otherwise rte_errno is set.
- * -EINVAL: on parsing error.
- * -ENODEV: if no key matching a device argument is specified.
- * -E2BIG: device name is too long.
- */
-typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
-
-/**
- * Device level DMA map function.
- * After a successful call, the memory segment will be mapped to the
- * given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to map.
- * @param iova
- * IOVA address to map.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Device level DMA unmap function.
- * After a successful call, the memory segment will no longer be
- * accessible by the given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to unmap.
- * @param iova
- * IOVA address to unmap.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if un-mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Implement a specific hot-unplug handler, which is responsible for
- * handle the failure when device be hot-unplugged. When the event of
- * hot-unplug be detected, it could call this function to handle
- * the hot-unplug failure and avoid app crash.
- * @param dev
- * Pointer of the device structure.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
-
-/**
- * Implement a specific sigbus handler, which is responsible for handling
- * the sigbus error which is either original memory error, or specific memory
- * error that caused of device be hot-unplugged. When sigbus error be captured,
- * it could call this function to handle sigbus error.
- * @param failure_addr
- * Pointer of the fault address of the sigbus error.
- *
- * @return
- * 0 for success handle the sigbus for hot-unplug.
- * 1 for not process it, because it is a generic sigbus error.
- * -1 for failed to handle the sigbus for hot-unplug.
- */
-typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
-
-/**
- * Bus scan policies
- */
-enum rte_bus_scan_mode {
- RTE_BUS_SCAN_UNDEFINED,
- RTE_BUS_SCAN_ALLOWLIST,
- RTE_BUS_SCAN_BLOCKLIST,
-};
-
-/**
- * A structure used to configure bus operations.
- */
-struct rte_bus_conf {
- enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
-};
-
-
-/**
- * Get common iommu class of the all the devices on the bus. The bus may
- * check that those devices are attached to iommu driver.
- * If no devices are attached to the bus. The bus may return with don't care
- * (_DC) value.
- * Otherwise, The bus will return appropriate _pa or _va iova mode.
- *
- * @return
- * enum rte_iova_mode value.
- */
-typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
-
-
-/**
- * A structure describing a generic bus.
- */
-struct rte_bus {
- RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
- const char *name; /**< Name of the bus */
- rte_bus_scan_t scan; /**< Scan for devices attached to bus */
- rte_bus_probe_t probe; /**< Probe devices on bus */
- rte_bus_find_device_t find_device; /**< Find a device on the bus */
- rte_bus_plug_t plug; /**< Probe single device for drivers */
- rte_bus_unplug_t unplug; /**< Remove single device from driver */
- rte_bus_parse_t parse; /**< Parse a device name */
- rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
- rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
- rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
- struct rte_bus_conf conf; /**< Bus configuration */
- rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
- rte_dev_iterate_t dev_iterate; /**< Device iterator. */
- rte_bus_hot_unplug_handler_t hot_unplug_handler;
- /**< handle hot-unplug failure on the bus */
- rte_bus_sigbus_handler_t sigbus_handler;
- /**< handle sigbus error on the bus */
-
-};
+struct rte_bus;
+struct rte_device;
/**
* @warning
@@ -278,24 +38,6 @@ struct rte_bus {
__rte_experimental
const char *rte_bus_name(const struct rte_bus *bus);
-/**
- * Register a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be registered.
- */
-void rte_bus_register(struct rte_bus *bus);
-
-/**
- * Unregister a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be unregistered.
- */
-void rte_bus_unregister(struct rte_bus *bus);
-
/**
* Scan all the buses.
*
@@ -385,17 +127,6 @@ struct rte_bus *rte_bus_find_by_name(const char *busname);
*/
enum rte_iova_mode rte_bus_get_iommu_class(void);
-/**
- * Helper for Bus registration.
- * The constructor has higher priority than PMD constructors.
- */
-#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
-{\
- (bus).name = RTE_STR(nm);\
- rte_bus_register(&bus); \
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 02ae1cde29..b5eab93fbf 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -8,12 +8,12 @@
#include <sys/socket.h>
#include <linux/netlink.h>
+#include <bus_driver.h>
#include <rte_string_fns.h>
#include <rte_log.h>
#include <rte_dev.h>
#include <rte_interrupts.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
#include <rte_spinlock.h>
#include <rte_errno.h>
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 6f713c987d..48c8a2f511 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -13,9 +13,7 @@ DPDK_22 {
rte_bus_find_by_name;
rte_bus_get_iommu_class;
rte_bus_probe;
- rte_bus_register;
rte_bus_scan;
- rte_bus_unregister;
rte_calloc;
rte_calloc_socket;
rte_cpu_get_flag_enabled;
@@ -432,6 +430,8 @@ EXPERIMENTAL {
INTERNAL {
global:
+ rte_bus_register;
+ rte_bus_unregister;
rte_eal_get_baseaddr;
rte_firmware_read;
rte_intr_allow_others;
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index ebbe8cca3d..9eba97f2d2 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_interrupts.h>
#include <rte_memcpy.h>
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 5b079cd14a..72aabd4dd0 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -11,7 +11,7 @@
#include <time.h>
#include <unistd.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_dev.h>
--
2.36.1
^ permalink raw reply [relevance 1%]
* [RFC v2 v2 27/29] dev: hide driver object
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 13/29] bus: hide bus object David Marchand
@ 2022-07-09 8:26 1% ` David Marchand
2022-07-09 8:26 3% ` [RFC v2 v2 29/29] dev: hide device object David Marchand
` (2 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-07-09 8:26 UTC (permalink / raw)
To: dev
Cc: Nicolas Chautru, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Rosen Xu, Stephen Hemminger, Long Li, Fan Zhang,
Sunila Sahu, Ashish Gupta, Ajit Khaparde, Raveendra Padasalagi,
Vikas Gupta, Chandubabu Namburu, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Gagandeep Singh, Bruce Richardson, Kevin Laatz,
Timothy McDaniel, Jerin Jacob, Elena Agostini, Ciara Loftus,
Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Steven Webster,
Matt Peters, Rasesh Mody, Shahed Shaikh, Somnath Kotur,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
John Daley, Hyong Youb Kim, Gaetan Rivet, Xiao Wang,
Yuying Zhang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
Viacheslav Ovsiienko, Chaoyong He, Niklas Soderlund,
Harman Kalra, Devendra Singh Rawat, Andrew Rybchenko,
Maciej Czekaj, Maxime Coquelin, Chenbo Xia, Jochen Behrens,
Jakub Palider, Tomasz Duszynski, Ori Kam, Akhil Goyal,
Chengwen Feng, Thomas Monjalon, Ferruh Yigit, Abhinandan Gujjar,
Jay Jayatheerthan, Olivier Matz, Reshma Pattan
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 2 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/bus_auxiliary_driver.h | 2 +-
drivers/bus/dpaa/bus_dpaa_driver.h | 2 ++
drivers/bus/fslmc/bus_fslmc_driver.h | 2 +-
drivers/bus/fslmc/fslmc_vfio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 2 +-
drivers/bus/ifpga/bus_ifpga_driver.h | 1 +
drivers/bus/pci/bus_pci_driver.h | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/vdev/bus_vdev_driver.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 2 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 1 +
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 2 +-
drivers/event/dpaa/dpaa_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +-
drivers/event/octeontx/ssovf_evdev.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 2 +-
drivers/gpu/cuda/cuda.c | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 2 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 2 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 2 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/ena/ena_ethdev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 2 +-
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/netvsc/hn_nvs.c | 2 +-
drivers/net/netvsc/hn_rndis.c | 2 +-
drivers/net/netvsc/hn_rxtx.c | 2 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
lib/compressdev/rte_compressdev.c | 2 +-
lib/compressdev/rte_compressdev_pmd.c | 2 +-
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +-
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 2 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/include/dev_driver.h | 28 +++++++++++++++++++
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_dev.h | 11 ++------
lib/ethdev/ethdev_driver.h | 1 +
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 2 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
lib/eventdev/rte_eventdev.c | 2 +-
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
lib/rawdev/rte_rawdev.c | 2 +-
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/security/rte_security.c | 2 +-
114 files changed, 143 insertions(+), 114 deletions(-)
create mode 100644 lib/eal/include/dev_driver.h
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 801e8920df..e2d9409185 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_byteorder.h>
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index c1d877c87f..51dd090c1b 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index f16814e241..036579e3ec 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index a889e392c6..e4c7ee0c3b 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <bus_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/bus_auxiliary_driver.h b/drivers/bus/auxiliary/bus_auxiliary_driver.h
index 44bacc3c0e..13c18418bd 100644
--- a/drivers/bus/auxiliary/bus_auxiliary_driver.h
+++ b/drivers/bus/auxiliary/bus_auxiliary_driver.h
@@ -22,10 +22,10 @@ extern "C" {
#include <stdint.h>
#include <inttypes.h>
+#include <dev_driver.h>
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
#include <rte_kvargs.h>
#define RTE_BUS_AUXILIARY_NAME "auxiliary"
diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
index 4360295335..937a742525 100644
--- a/drivers/bus/dpaa/bus_dpaa_driver.h
+++ b/drivers/bus/dpaa/bus_dpaa_driver.h
@@ -6,9 +6,11 @@
#ifndef BUS_DPAA_DRIVER_H
#define BUS_DPAA_DRIVER_H
+#include <dev_driver.h>
#include <rte_compat.h>
#include <rte_mbuf_dyn.h>
#include <rte_mempool.h>
+
#include <dpaax_iova_table.h>
#include <dpaa_of.h>
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 798ddebf3a..ac3d98dcc0 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -26,10 +26,10 @@ extern "C" {
#include <inttypes.h>
#include <linux/vfio.h>
+#include <dev_driver.h>
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
#include <rte_tailq.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 8604e43947..5966776a85 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -28,7 +28,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal_memconfig.h>
#include "private.h"
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index cfe4280f87..d7f6e45b7d 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -18,7 +18,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_mbuf_pool_ops.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
index b7d81b518c..07256ed7ec 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <fslmc_logs.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 071b0d297d..4aec7b2cd8 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -30,7 +30,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
index 223e34bcba..65e2d799c3 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
@@ -10,7 +10,7 @@
#include <errno.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "private.h"
#include <fslmc_logs.h>
diff --git a/drivers/bus/ifpga/bus_ifpga_driver.h b/drivers/bus/ifpga/bus_ifpga_driver.h
index 7b75c2ddbc..10bf2f92ce 100644
--- a/drivers/bus/ifpga/bus_ifpga_driver.h
+++ b/drivers/bus/ifpga/bus_ifpga_driver.h
@@ -15,6 +15,7 @@
extern "C" {
#endif /* __cplusplus */
+#include <dev_driver.h>
#include <rte_compat.h>
#include <rte_pci.h>
#include <rte_interrupts.h>
diff --git a/drivers/bus/pci/bus_pci_driver.h b/drivers/bus/pci/bus_pci_driver.h
index b5c7dee617..9c56307405 100644
--- a/drivers/bus/pci/bus_pci_driver.h
+++ b/drivers/bus/pci/bus_pci_driver.h
@@ -10,8 +10,8 @@
extern "C" {
#endif
+#include <dev_driver.h>
#include <rte_bus_pci.h>
-#include <rte_dev.h>
#include <rte_compat.h>
/** Pathname of PCI devices directory. */
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 39d702a418..d24cc201b8 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -6,7 +6,7 @@
#include <bus_driver.h>
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
index 36748cdfae..d05a7f7115 100644
--- a/drivers/bus/vdev/bus_vdev_driver.h
+++ b/drivers/bus/vdev/bus_vdev_driver.h
@@ -9,9 +9,9 @@
extern "C" {
#endif
+#include <dev_driver.h>
#include <rte_bus_vdev.h>
#include <rte_compat.h>
-#include <rte_dev.h>
#include <rte_devargs.h>
struct rte_vdev_device {
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 1b8410fe5b..7c8170e5a6 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -13,7 +13,7 @@
#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_memory.h>
diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
index 2c72614776..2d10a1e8ad 100644
--- a/drivers/bus/vdev/vdev_params.c
+++ b/drivers/bus/vdev/vdev_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include <rte_errno.h>
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index 3424e791c9..e60290c835 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -10,9 +10,9 @@
extern "C" {
#endif
+#include <dev_driver.h>
#include <rte_bus_vmbus.h>
#include <rte_compat.h>
-#include <rte_dev.h>
struct vmbus_channel;
struct vmbus_mon_page;
diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev/qat_dev_gen4.c
index 7ffde5f4c8..85d6ddfcf4 100644
--- a/drivers/common/qat/dev/qat_dev_gen4.c
+++ b/drivers/common/qat/dev/qat_dev_gen4.c
@@ -2,7 +2,7 @@
* Copyright(c) 2021 Intel Corporation
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "qat_device.h"
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 4a1be35b47..e58e4ceec0 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -4,7 +4,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_pci.h>
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 7d657d81bc..445a3baa67 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
index 61d457f4e0..d1ede5e990 100644
--- a/drivers/crypto/bcmfs/bcmfs_qp.c
+++ b/drivers/crypto/bcmfs/bcmfs_qp.c
@@ -8,7 +8,7 @@
#include <rte_atomic.h>
#include <rte_bitmap.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_prefetch.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index bc7fb67218..78272d616c 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -4,7 +4,7 @@
*/
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_malloc.h>
#include <cryptodev_pmd.h>
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 6c3e45e333..013f3be1e6 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -9,7 +9,7 @@
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include "ccp_crypto.h"
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index 3fd9f3c426..db11ac7444 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn10k_cryptodev.h"
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index bd425f95ff..4cfc1f2150 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn9k_cryptodev.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 0cce861899..3b13578de0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <cryptodev_pmd.h>
#include <rte_common.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 7e554cb2b1..c6bd785262 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -19,7 +19,7 @@
#include <rte_security_driver.h>
#endif
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_io.h>
#include <rte_ip.h>
#include <rte_kvargs.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f3a1bd626c..971f82897c 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -5,7 +5,7 @@
#include <rte_common.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_reorder.h>
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index e30dcfc281..9b7b16c6e3 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -9,6 +9,7 @@
#include <libgen.h>
#include <bus_driver.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 26af75beb8..d7ac58bfde 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -17,7 +17,7 @@
#include <rte_config.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_eventdev.h>
#include <eventdev_pmd.h>
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index 9f8c6cd8b8..71ac141b66 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -15,7 +15,7 @@
#include <rte_debug.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
#include <rte_ring.h>
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index aa403f9e06..8e470584ea 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_log.h>
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 08df6e223a..1001297cda 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <bus_fslmc_driver.h>
#include <rte_lcore.h>
diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
index 3882a9cf1d..a68d3ac154 100644
--- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c
+++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index fe157c59d5..99fa326ad5 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -7,7 +7,7 @@
#include <rte_common.h>
#include <cryptodev_pmd.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <ethdev_driver.h>
#include <rte_event_eth_rx_adapter.h>
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index 6bd8fec6d4..8513b9a013 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_log.h>
#include <rte_malloc.h>
diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index 2be7b8d2df..a552aabeb8 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -8,7 +8,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <gpudev_driver.h>
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 56c629c681..84371d5d1a 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -20,7 +20,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dpaa2_mempool.h"
#include "fslmc_vfio.h"
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index fd7be47311..9957de2314 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -24,7 +24,7 @@
#include <rte_string_fns.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <rte_lcore.h>
diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
index 748db590c1..71d0b53e03 100644
--- a/drivers/net/ark/ark_global.h
+++ b/drivers/net/ark/ark_global.h
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_version.h>
#include "ark_pktdir.h"
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 7c0cb666fb..b2a08f5635 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_cycles.h>
#include <rte_spinlock.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_io.h>
diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index b9ebf64fb8..a5d11c5832 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -33,7 +33,7 @@
#include <rte_memzone.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_pci.h>
#include <rte_common.h>
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index f36ad30e17..4448cf2de2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -9,7 +9,7 @@
#include "bnx2x_rxtx.h"
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_pci.h>
#include <rte_alarm.h>
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e275d3a53f..1460dce2ab 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6,7 +6,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_malloc.h>
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 77ecbef04c..fd1506ddd4 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -7,7 +7,7 @@
#include <stdbool.h>
#include <unistd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_cycles.h>
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 384080e6d3..bed755f5d9 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -18,7 +18,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_byteorder.h>
#include "common.h"
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index fd71a50a58..45bbeaef0c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -31,7 +31,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "cxgbe.h"
#include "cxgbe_pfvf.h"
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 3c02c98b3d..f8dd833032 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -31,7 +31,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "base/common.h"
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5d91355c9a..5b13cb5c94 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -30,7 +30,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/common.h"
#include "base/t4_regs.h"
diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index 9509f6e8a3..4d33b51fea 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <dpaa2_pmd_logs.h>
#include <dpaa2_hw_pvt.h>
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index f876f4790c..37a8b43114 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
#include "rte_dpaa2_mempool.h"
diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
index 932570c6e0..fbfdf360d1 100644
--- a/drivers/net/dpaa2/dpaa2_recycle.c
+++ b/drivers/net/dpaa2/dpaa2_recycle.c
@@ -14,7 +14,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 7b9c528d13..9436a95ac8 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -13,7 +13,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hexdump.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
index ba0d500f74..63463c4fbf 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.c
+++ b/drivers/net/dpaa2/dpaa2_sparser.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 409de50083..8ee9be12ad 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 43979992d3..d6bcc5bf58 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index e46697b6a1..b775310651 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -21,7 +21,7 @@
#include <rte_eal.h>
#include <rte_atomic.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index 4709675af8..4d27fba585 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -14,7 +14,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_timer.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include "ena_com.h"
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 998436e5e8..cdf0915591 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdint.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 7312c411bd..46f85964e9 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -7,7 +7,7 @@
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index a80f5e2caf..53a451c1b1 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -11,7 +11,7 @@
#include <pthread.h>
#include <rte_atomic.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_devargs.h>
#include <rte_flow.h>
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..7adb20bff9 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_spinlock.h>
#include <rte_kvargs.h>
#include <rte_vect.h>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 87c22b6b54..1775be63c6 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -23,7 +23,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_alarm.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_hash_crc.h>
#include <rte_bitmap.h>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 506fcff6e3..ef2ab06475 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -24,7 +24,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 21bd1e2193..15f695682d 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -19,7 +19,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 885d58c0f4..1c3d22ae0f 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -21,7 +21,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "ice_dcf.h"
#include "ice_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 0da267db1f..dee712af98 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -18,7 +18,7 @@
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <iavf_devids.h>
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 552e41692c..04c9ce78a2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#ifdef RTE_LIB_SECURITY
#include <rte_security_driver.h>
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 368342872a..67373a7b78 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -27,7 +27,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 910b76a92c..7e7e1824ef 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -31,7 +31,7 @@
#endif
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index ccc06bdda6..d0bbc0a4c0 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -30,7 +30,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 817fb06dfb..7db82af9f3 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -28,7 +28,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 20f75a17b0..e6f1f28768 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -26,7 +26,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 61cf374224..bc6f60c64a 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -25,7 +25,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include <bus_vmbus_driver.h>
#include <rte_spinlock.h>
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 0e55f0c792..eaafe11fb9 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -19,7 +19,7 @@
#include <rte_debug.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 5cdd34e588..47359501bc 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_common.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 9ada22e2ff..0eee191566 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -15,7 +15,7 @@
#include <bus_vdev_driver.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a38b701183..b781bcdcfd 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -13,7 +13,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ip.h>
/* ecore includes */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 506c62a726..2ec743ebce 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -7,7 +7,7 @@
* for Solarflare) and Solarflare Communications, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index 81f5aa3cc4..3ae5023b6f 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -2,7 +2,7 @@
*
* Copyright(c) 2021 Xilinx, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_bitmap.h>
#include "sfc.h"
diff --git a/drivers/net/sfc/sfc_sw_stats.h b/drivers/net/sfc/sfc_sw_stats.h
index 1abded8018..d9738e5214 100644
--- a/drivers/net/sfc/sfc_sw_stats.h
+++ b/drivers/net/sfc/sfc_sw_stats.h
@@ -5,7 +5,7 @@
#ifndef _SFC_SW_STATS_H
#define _SFC_SW_STATS_H
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "sfc.h"
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 28183ec740..9f57cb1a20 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 5c7430718b..32b7296877 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -27,7 +27,7 @@
#include <rte_alarm.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d180162abd..edf3becd32 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -24,7 +24,7 @@
#include <rte_memory.h>
#include <rte_eal_paging.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c
index 2b9e35cef5..abc63b0935 100644
--- a/drivers/net/virtio/virtio_pci_ethdev.c
+++ b/drivers/net/virtio/virtio_pci_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "virtio.h"
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 101b1cb500..fd946dec5c 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/vmxnet3_defs.h"
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index db029cbf34..909fb8faab 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -3,7 +3,7 @@
*/
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_pci.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 19b523a815..a06b724866 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -13,7 +13,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_kvargs.h>
#include <rte_log.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index fc257c5f44..8ef7a6b127 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -6,7 +6,7 @@
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_rawdev.h>
#include <bus_vdev_driver.h>
#include <rte_test.h>
diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
index 6ab62a12fc..92cf5f495e 100644
--- a/drivers/regex/mlx5/mlx5_regex_control.c
+++ b/drivers/regex/mlx5/mlx5_regex_control.c
@@ -11,7 +11,7 @@
#include <rte_regexdev.h>
#include <rte_regexdev_core.h>
#include <rte_regexdev_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <mlx5_common.h>
#include <mlx5_glue.h>
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index 7f6dedbc52..639a0d66ca 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -9,7 +9,7 @@
#include <rte_common.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_memzone.h>
diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 9bfae077db..41f1415bea 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -5,7 +5,7 @@
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include "rte_compressdev_internal.h"
diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
index 9fabc399c5..72e52f876f 100644
--- a/lib/compressdev/rte_compressdev_pmd.h
+++ b/lib/compressdev/rte_compressdev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include "rte_compressdev.h"
#include "rte_compressdev_internal.h"
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 75d0075b86..f07b92dfd7 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 3dcc3cb7ed..96d7e225b0 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 42f3221052..1dad092317 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -13,7 +13,7 @@
#include <rte_log.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
index 82ab7a8cc7..acd7f71cd1 100644
--- a/lib/dmadev/rte_dmadev_pmd.h
+++ b/lib/dmadev/rte_dmadev_pmd.h
@@ -14,7 +14,7 @@
* by any application.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dmadev.h"
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 16c5aef1d8..5b64b80cb9 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -8,8 +8,8 @@
#include <sys/queue.h>
#include <bus_driver.h>
+#include <dev_driver.h>
#include <rte_class.h>
-#include <rte_dev.h>
#include <rte_devargs.h>
#include <rte_errno.h>
#include <rte_log.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
new file mode 100644
index 0000000000..015188abd5
--- /dev/null
+++ b/lib/eal/include/dev_driver.h
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef DEV_DRIVER_H
+#define DEV_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include <rte_dev.h>
+
+/**
+ * A structure describing a device driver.
+ */
+struct rte_driver {
+ RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
+ const char *name; /**< Driver name. */
+ const char *alias; /**< Driver alias. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEV_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index 77d8621a51..cfcd40aaed 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -57,6 +57,7 @@ headers += files(
driver_sdk_headers = files(
'bus_driver.h',
+ 'dev_driver.h',
)
# special case install the generic headers, since they go in a subdir
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index 871a046ffe..875ecee371 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -23,6 +23,8 @@ extern "C" {
#include <rte_compat.h>
#include <rte_log.h>
+struct rte_driver;
+
/**
* The device event type.
*/
@@ -53,15 +55,6 @@ struct rte_mem_resource {
void *addr; /**< Virtual address, NULL when not mapped. */
};
-/**
- * A structure describing a device driver.
- */
-struct rte_driver {
- RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
- const char *name; /**< Driver name. */
- const char *alias; /**< Driver alias. */
-};
-
/**
* @warning
* @b EXPERIMENTAL: this API may change without prior notice
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 5101868ea7..47a55a419e 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -19,6 +19,7 @@ extern "C" {
*
*/
+#include <dev_driver.h>
#include <rte_ethdev.h>
/**
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 69402668d8..def6cd0876 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -22,7 +22,7 @@ extern "C" {
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_config.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 7c695176f4..5bc10312fc 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdbool.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index bf8741d2ea..4f4efdae9f 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -9,7 +9,7 @@
#include <rte_cycles.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <rte_log.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 1dc4f966be..54abee2b3f 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_common.h>
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index 0e55b00bfe..23972b3dbd 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_gpudev.h"
diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
index d60235a7e3..058ad147a5 100644
--- a/lib/mempool/rte_mempool_ops.c
+++ b/lib/mempool/rte_mempool_ops.c
@@ -10,7 +10,7 @@
#include <rte_string_fns.h>
#include <rte_mempool.h>
#include <rte_errno.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_mempool_trace.h"
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 72aabd4dd0..af2b814251 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -14,7 +14,7 @@
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index 2f0a4f132e..bc51258143 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
#include <rte_telemetry.h>
diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
index 3b7be57d3e..a51944c8ff 100644
--- a/lib/rawdev/rte_rawdev_pmd.h
+++ b/lib/rawdev/rte_rawdev_pmd.h
@@ -19,7 +19,7 @@ extern "C" {
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
index 046b6496d2..d036ed33f6 100644
--- a/lib/security/rte_security.c
+++ b/lib/security/rte_security.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_cryptodev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_telemetry.h>
#include "rte_security.h"
#include "rte_security_driver.h"
--
2.36.1
^ permalink raw reply [relevance 1%]
* [RFC v2 v2 29/29] dev: hide device object
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 13/29] bus: hide bus object David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 27/29] dev: hide driver object David Marchand
@ 2022-07-09 8:26 3% ` David Marchand
2022-07-09 16:30 0% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 Stephen Hemminger
2022-07-11 8:38 0% ` Bruce Richardson
4 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-07-09 8:26 UTC (permalink / raw)
To: dev; +Cc: Maxime Coquelin, Chenbo Xia
Make rte_device opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/eal/common/eal_private.h | 2 +-
lib/eal/include/dev_driver.h | 14 ++++++++++++++
lib/eal/include/rte_dev.h | 13 +------------
lib/vhost/vdpa.c | 1 +
4 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h
index 44d14241f0..3ca9ce2ffc 100644
--- a/lib/eal/common/eal_private.h
+++ b/lib/eal/common/eal_private.h
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_lcore.h>
#include <rte_memory.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
index 015188abd5..01c3e30994 100644
--- a/lib/eal/include/dev_driver.h
+++ b/lib/eal/include/dev_driver.h
@@ -12,6 +12,8 @@ extern "C" {
#include <rte_common.h>
#include <rte_dev.h>
+struct rte_devargs;
+
/**
* A structure describing a device driver.
*/
@@ -21,6 +23,18 @@ struct rte_driver {
const char *alias; /**< Driver alias. */
};
+/**
+ * A structure describing a generic device.
+ */
+struct rte_device {
+ RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
+ const char *name; /**< Device name */
+ const struct rte_driver *driver; /**< Driver assigned after probing */
+ const struct rte_bus *bus; /**< Bus handle assigned on scan */
+ int numa_node; /**< NUMA node connection */
+ struct rte_devargs *devargs; /**< Arguments for latest probing */
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index a80447a645..3077cf3f0f 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -25,6 +25,7 @@ extern "C" {
struct rte_bus;
struct rte_driver;
+struct rte_device;
/**
* The device event type.
@@ -127,18 +128,6 @@ __rte_experimental
int
rte_dev_numa_node(const struct rte_device *dev);
-/**
- * A structure describing a generic device.
- */
-struct rte_device {
- RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
- const char *name; /**< Device name */
- const struct rte_driver *driver; /**< Driver assigned after probing */
- const struct rte_bus *bus; /**< Bus handle assigned on scan */
- int numa_node; /**< NUMA node connection */
- struct rte_devargs *devargs; /**< Arguments for latest probing */
-};
-
/**
* Query status of a device.
*
diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index bdebcbe565..aaf3f267e9 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -10,6 +10,7 @@
#include <sys/queue.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_class.h>
#include <rte_malloc.h>
--
2.36.1
^ permalink raw reply [relevance 3%]
* Re: [RFC v2 v2 00/29] Bus and device cleanup for 22.11
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
` (2 preceding siblings ...)
2022-07-09 8:26 3% ` [RFC v2 v2 29/29] dev: hide device object David Marchand
@ 2022-07-09 16:30 0% ` Stephen Hemminger
2022-07-11 8:38 0% ` Bruce Richardson
4 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-07-09 16:30 UTC (permalink / raw)
To: David Marchand; +Cc: dev
On Sat, 9 Jul 2022 10:26:15 +0200
David Marchand <david.marchand@redhat.com> wrote:
> This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
> And mark associated driver only API as internal.
>
> A good amount of the patches are preparation work on rte_bus.h,
> rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
> between them. This is something I had in store for some time, maybe I
> should have dropped it from the PoC, but I think those cleanups are
> worth it in any case.
>
> Then PCI bus specific handling are moved from unit tests and examples,
> though there is still a special case left in testpmd that may require a
> new API, to be discussed.
>
> After this series, driver-only API headers for registering to buses are
> not exported anymore, unless the enable_driver_sdk meson option is
> selected.
>
> New accessors for rte_bus, rte_driver and rte_device have been added,
> marked with an experimental tag though we may declare them as stable
> right away so that users can switch to them directly. That's also
> something to agree on.
>
> I simplified my series and switched to only update "external" users,
> like app/ and examples/ files.
> We need some checkpatch new checks to be sure we won't get some
> driver-only headers included in these areas. That's something I'll work
> on in the non RFC series.
>
> "Internal" users are simply using the internal headers. That helps
> greatly reducing the size of the changes.
>
> Disclaimer: again, in this v2, this series is a bit rushed (I brute forced
> compilation tests in GHA so that it passes between patches, but there still
> may be something broken...).
> Not surprisingly, the ABI check in the CI is expected to fail.
>
>
> Comments welcome.
Looks good to me, lots of work but will the separation internal
and external API's will help in future.
^ permalink raw reply [relevance 0%]
* [PATCH] doc: announce marking device and driver objects as internal
@ 2022-07-10 6:17 13% David Marchand
2022-07-10 8:25 0% ` Andrew Rybchenko
` (5 more replies)
0 siblings, 6 replies; 200+ results
From: David Marchand @ 2022-07-10 6:17 UTC (permalink / raw)
To: dev, techboard; +Cc: Ray Kinsella
rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
Announce that they will be made opaque in the public API and mark
associated API as internal.
This impacts all bus, as their driver registration mechanism will be
made internal.
Note: the PCI bus had a similar deprecation notice that we can remove as
the new one is more generic.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/deprecation.rst | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a9fd6676be..b9cc267b30 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -38,6 +38,13 @@ Deprecation Notices
external users may still register their bus using a new driver header (see
``enable_driver_sdk`` meson option).
+* drivers: As a followup on the work on the ``rte_bus`` object, the
+ ``rte_driver`` and ``rte_device`` objects (and as a domino effect, their
+ bus-specific counterparts) will be made opaque in DPDK 22.11.
+ Registering a driver on a bus will be marked as an internal API:
+ external users may still register their drivers using the bus specific
+ driver header (see ``enable_driver_sdk`` meson option).
+
* mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
be removed in DPDK 22.11. The replacement macro
``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
@@ -49,11 +56,6 @@ Deprecation Notices
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
-* pci: To reduce unnecessary ABIs exposed by DPDK bus driver, "rte_bus_pci.h"
- will be made internal in 21.11 and macros/data structures/functions defined
- in the header will not be considered as ABI anymore. This change is inspired
- by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
-
* lib: will fix extending some enum/define breaking the ABI. There are multiple
samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
used by iterators, and arrays holding these values are sized with this
--
2.36.1
^ permalink raw reply [relevance 13%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
@ 2022-07-10 8:25 0% ` Andrew Rybchenko
2022-07-11 2:16 0% ` Xia, Chenbo
` (4 subsequent siblings)
5 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-07-10 8:25 UTC (permalink / raw)
To: David Marchand, dev, techboard; +Cc: Ray Kinsella
On 7/10/22 09:17, David Marchand wrote:
> rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> Announce that they will be made opaque in the public API and mark
> associated API as internal.
> This impacts all bus, as their driver registration mechanism will be
> made internal.
>
> Note: the PCI bus had a similar deprecation notice that we can remove as
> the new one is more generic.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [relevance 0%]
* RE: [PATCH] doc: announce marking device and driver objects as internal
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
2022-07-10 8:25 0% ` Andrew Rybchenko
@ 2022-07-11 2:16 0% ` Xia, Chenbo
2022-07-11 12:36 4% ` Thomas Monjalon
2022-07-11 15:01 0% ` Jerin Jacob
` (3 subsequent siblings)
5 siblings, 1 reply; 200+ results
From: Xia, Chenbo @ 2022-07-11 2:16 UTC (permalink / raw)
To: David Marchand, dev, techboard
Cc: Ray Kinsella, Liu, Changpeng, Harris, James R, Walker, Benjamin,
Thomas Monjalon
Hi David,
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Sunday, July 10, 2022 2:18 PM
> To: dev@dpdk.org; techboard@dpdk.org
> Cc: Ray Kinsella <mdr@ashroe.eu>
> Subject: [PATCH] doc: announce marking device and driver objects as
> internal
>
> rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> Announce that they will be made opaque in the public API and mark
> associated API as internal.
> This impacts all bus, as their driver registration mechanism will be
> made internal.
>
> Note: the PCI bus had a similar deprecation notice that we can remove as
> the new one is more generic.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index a9fd6676be..b9cc267b30 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -38,6 +38,13 @@ Deprecation Notices
> external users may still register their bus using a new driver header
> (see
> ``enable_driver_sdk`` meson option).
>
> +* drivers: As a followup on the work on the ``rte_bus`` object, the
> + ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
> their
> + bus-specific counterparts) will be made opaque in DPDK 22.11.
> + Registering a driver on a bus will be marked as an internal API:
> + external users may still register their drivers using the bus specific
> + driver header (see ``enable_driver_sdk`` meson option).
> +
Cc SPDK folks
Thanks for your work! My only concern is using enable_driver_sdk may not be
a good way for SPDK based on the discussion.
http://patchwork.dpdk.org/project/dpdk/cover/20210918022443.12719-1-chenbo.xia@intel.com/
But overall this idea makes sense, so:
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
> * mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
> be removed in DPDK 22.11. The replacement macro
> ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
> @@ -49,11 +56,6 @@ Deprecation Notices
> * mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
> will be removed in DPDK 22.11.
>
> -* pci: To reduce unnecessary ABIs exposed by DPDK bus driver,
> "rte_bus_pci.h"
> - will be made internal in 21.11 and macros/data structures/functions
> defined
> - in the header will not be considered as ABI anymore. This change is
> inspired
> - by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
> -
> * lib: will fix extending some enum/define breaking the ABI. There are
> multiple
> samples in DPDK that enum/define terminated with a ``.*MAX.*`` value
> which is
> used by iterators, and arrays holding these values are sized with this
> --
> 2.36.1
^ permalink raw reply [relevance 0%]
* Re: [RFC v2 v2 00/29] Bus and device cleanup for 22.11
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
` (3 preceding siblings ...)
2022-07-09 16:30 0% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 Stephen Hemminger
@ 2022-07-11 8:38 0% ` Bruce Richardson
4 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2022-07-11 8:38 UTC (permalink / raw)
To: David Marchand; +Cc: dev
On Sat, Jul 09, 2022 at 10:26:15AM +0200, David Marchand wrote:
> This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
> And mark associated driver only API as internal.
>
> A good amount of the patches are preparation work on rte_bus.h,
> rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
> between them. This is something I had in store for some time, maybe I
> should have dropped it from the PoC, but I think those cleanups are
> worth it in any case.
>
> Then PCI bus specific handling are moved from unit tests and examples,
> though there is still a special case left in testpmd that may require a
> new API, to be discussed.
>
> After this series, driver-only API headers for registering to buses are
> not exported anymore, unless the enable_driver_sdk meson option is
> selected.
>
> New accessors for rte_bus, rte_driver and rte_device have been added,
> marked with an experimental tag though we may declare them as stable
> right away so that users can switch to them directly. That's also
> something to agree on.
>
Yes, I think we need to make them stable.
> I simplified my series and switched to only update "external" users,
> like app/ and examples/ files.
> We need some checkpatch new checks to be sure we won't get some
> driver-only headers included in these areas. That's something I'll work
> on in the non RFC series.
>
> "Internal" users are simply using the internal headers. That helps
> greatly reducing the size of the changes.
>
> Disclaimer: again, in this v2, this series is a bit rushed (I brute forced
> compilation tests in GHA so that it passes between patches, but there still
> may be something broken...).
> Not surprisingly, the ABI check in the CI is expected to fail.
>
>
> Comments welcome.
>
This is great cleanup. Thanks for all the work on it.
/Bruce
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2 0/7] Removal of PCI bus ABIs
@ 2022-07-11 12:11 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-11 12:11 UTC (permalink / raw)
To: Harris, James R, Walker, Benjamin
Cc: dev, Liu, Changpeng, Xia, Chenbo, David Marchand, Aaron Conole,
Zawadzki, Tomasz
9 months have passed. Do you have any news from SPDK side?
14/10/2021 08:41, Thomas Monjalon:
> 14/10/2021 00:48, Walker, Benjamin:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> >
> > > Yes I think we need to agree on functions to keep as-is for compatibility.
> > > Waiting for your input please.
> >
> > We've added a task to our backlog to propose a stable ABI for out of tree drivers here. It's not as simple as just keeping a couple of the existing functions - we're currently manipulating structures directly. We'll need to work a bit to design the simplest possible set of functions that we need.
>
> OK thanks
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-11 2:16 0% ` Xia, Chenbo
@ 2022-07-11 12:36 4% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-11 12:36 UTC (permalink / raw)
To: David Marchand, Harris, James R, Walker, Benjamin, Xia, Chenbo
Cc: dev, techboard, Ray Kinsella, Liu, Changpeng
11/07/2022 04:16, Xia, Chenbo:
> From: David Marchand <david.marchand@redhat.com>
> > rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> > Announce that they will be made opaque in the public API and mark
> > associated API as internal.
> > This impacts all bus, as their driver registration mechanism will be
> > made internal.
> >
> > Note: the PCI bus had a similar deprecation notice that we can remove as
> > the new one is more generic.
[...]
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > +* drivers: As a followup on the work on the ``rte_bus`` object, the
> > + ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
> > their
> > + bus-specific counterparts) will be made opaque in DPDK 22.11.
> > + Registering a driver on a bus will be marked as an internal API:
> > + external users may still register their drivers using the bus specific
> > + driver header (see ``enable_driver_sdk`` meson option).
> > +
>
> Cc SPDK folks
>
> Thanks for your work! My only concern is using enable_driver_sdk may not be
> a good way for SPDK based on the discussion.
> http://patchwork.dpdk.org/project/dpdk/cover/20210918022443.12719-1-chenbo.xia@intel.com/
Quick summary:
- Symbols exported by DPDK by default are supposed to be for applications.
- Option enable_driver_sdk allow installing headers to build drivers.
- Driver interface is not part of the stable ABI, i.e. no compat guarantee.
- SPDK is building drivers on top of DPDK bus drivers (PCI for now).
- SPDK was asked to check whether anything else is required.
There is no decision about ABI guarantee because we lack feedbacks.
After this cleanup, the option enable_driver_sdk would be required
when working with buses, like SPDK.
Is there a real need to build against distro-provided package?
Is there a way to provide bus drivers SDK without messing with app SDK?
> But overall this idea makes sense, so:
>
> Acked-by: Chenbo Xia <chenbo.xia@intel.com>
I like the cleanup as well. It will allow more enhancements in future.
I hope and believe we can accomodate SDK needs when it will be clear.
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v2] doc: propose correction rte_{bsf, fls} inline functions type use
@ 2022-07-11 14:07 0% ` Jerin Jacob
0 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-07-11 14:07 UTC (permalink / raw)
To: Morten Brørup
Cc: Thomas Monjalon, Tyler Retzlaff, Stephen Hemminger, dpdk-dev,
Anatoly Burakov, Menon, Ranjit, Ray Kinsella, David Marchand,
Dmitry Kozlyuk, Richardson, Bruce
On Thu, Nov 11, 2021 at 6:11 PM Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Thursday, 11 November 2021 12.55
> >
> > 11/11/2021 05:15, Tyler Retzlaff:
> > > On Tue, Oct 26, 2021 at 09:45:20AM +0200, Morten Brørup wrote:
> > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas
> > Monjalon
> > > > > Sent: Monday, 25 October 2021 21.14
> > > > >
> > > > > 15/03/2021 20:34, Tyler Retzlaff:
> > > > > > The proposal has resulted from request to review [1] the
> > following
> > > > > > functions where there appeared to be inconsistency in return
> > type
> > > > > > or parameter type selections for the following inline
> > functions.
> > > > > >
> > > > > > rte_bsf32()
> > > > > > rte_bsf32_safe()
> > > > > > rte_bsf64()
> > > > > > rte_bsf64_safe()
> > > > > > rte_fls_u32()
> > > > > > rte_fls_u64()
> > > > > > rte_log2_u32()
> > > > > > rte_log2_u64()
> > > > > >
> > > > > > [1] http://mails.dpdk.org/archives/dev/2021-March/201590.html
> > > > > >
> > > > > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
> > > > > > ---
> > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > +* eal: Fix inline function return and parameter types for
> > > > > rte_{bsf,fls}
> > > > > > + inline functions to be consistent.
> > > > > > + Change ``rte_bsf32_safe`` parameter ``v`` from ``uint64_t``
> > to
> > > > > ``uint32_t``.
> > > > > > + Change ``rte_bsf64`` return type to ``uint32_t`` instead of
> > > > > ``int``.
> > > > > > + Change ``rte_fls_u32`` return type to ``uint32_t`` instead
> > of
> > > > > ``int``.
> > > > > > + Change ``rte_fls_u64`` return type to ``uint32_t`` instead
> > of
> > > > > ``int``.
> > > > >
> > > > > It seems we completely forgot this.
> > > > > How critical is it?
> > > >
> > >
> > > our organization as a matter of internal security policy requires
> > these
> > > sorts of things to be fixed. while i didn't see any bugs in the dpdk
> > > code there is an opportunity for users of these functions to
> > > accidentally write code that is prone to integer and buffer overflow
> > > class bugs.
> > >
> > > there is no urgency, but why leave things sloppy? though i do wish
> > this
> > > had been responded to in a more timely manner 7 months for something
> > > that should have almost been rubber stamped.
> >
> > It's difficult to be on all topics.
> > The best way to avoid such miss is to ping when you see no progress.
> >
> > So what's next?
> > They are only inline functions, right? so no ABI breakage.
> > Is it going to require any change on application-side? I guess no.
> > Is it acceptable in 21.11-rc3? maybe too late?
> > Is it acceptable in 22.02?
>
> If Microsoft (represented by Tyler in this case) considers this a bug, I would prefer getting it into 21.11 - especially because it is an LTS release.
>
> -Morten
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH v3 2/2] doc: announce KNI deprecation
@ 2022-07-11 14:47 0% ` Jerin Jacob
2022-07-13 16:10 5% ` [PATCH v4] " Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Jerin Jacob @ 2022-07-11 14:47 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Ray Kinsella, dpdk-dev, Olivier Matz Olivier Matz,
David Marchand David Marchand,
Stephen Hemminger Stephen Hemminger, Elad Nachman, Igor Ryzhov,
Dan Gora
On Wed, Nov 24, 2021 at 10:48 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> Announce the KNI kernel module move to out of dpdk repo and announce
> long term plan to deprecate the KNI.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
> Cc: Olivier Matz Olivier Matz <olivier.matz@6wind.com>
> Cc: David Marchand David Marchand <david.marchand@redhat.com>
> Cc: Stephen Hemminger Stephen Hemminger <stephen@networkplumber.org>
> Cc: Elad Nachman <eladv6@gmail.com>
> Cc: Igor Ryzhov <iryzhov@nfware.com>
> Cc: Dan Gora <dg@adax.com>
>
> Dates are not discussed before, the patch aims to trigger a discussion
> for the dates.
> ---
> doc/guides/prog_guide/kernel_nic_interface.rst | 2 ++
> doc/guides/rel_notes/deprecation.rst | 6 ++++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> index f5a8b7c0782c..d1c5ccd0851d 100644
> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> @@ -7,6 +7,8 @@ Kernel NIC Interface
> ====================
>
> .. Note::
> + KNI kernel module will be moved from main git repository to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_ repository.
> + There is a long term plan to deprecate the KNI. See :doc:`../rel_notes/deprecation`
>
> :ref:`virtio_user_as_exceptional_path` alternative is the preferred way for
> interfacing with the Linux network stack as it is an in-kernel solution and
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 2262b8de6093..f20852504319 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -48,6 +48,12 @@ Deprecation Notices
> in the header will not be considered as ABI anymore. This change is inspired
> by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
>
> +* kni: KNI kernel module will be moved to `dpdk-kmods <https://git.dpdk.org/dpdk-kmods/>`_
> + repository by the `DPDK technical board decision
> + <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_, on v22.11.
> +* kni: will be depreciated, will remove all kni lib, kernel module and example code
> + on v23.11.
> +
> * lib: will fix extending some enum/define breaking the ABI. There are multiple
> samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
> used by iterators, and arrays holding these values are sized with this
> --
> 2.31.1
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce support for MACsec in rte_security
2022-06-29 7:40 0% ` Zhang, Roy Fan
@ 2022-07-11 15:00 0% ` Jerin Jacob
0 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-07-11 15:00 UTC (permalink / raw)
To: Zhang, Roy Fan
Cc: Akhil Goyal, dev, thomas, david.marchand, hemant.agrawal, anoobj,
konstantin.v.ananyev, ferruh.yigit, andrew.rybchenko,
ndabilpuram, vattunuru, matan, jerinj, jiawenwu, Yang, Qiming
On Wed, Jun 29, 2022 at 1:10 PM Zhang, Roy Fan <roy.fan.zhang@intel.com> wrote:
>
> > -----Original Message-----
> > From: Akhil Goyal <gakhil@marvell.com>
> > Sent: Tuesday, June 28, 2022 8:08 PM
> > To: dev@dpdk.org
> > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > hemant.agrawal@nxp.com; anoobj@marvell.com;
> > konstantin.v.ananyev@yandex.ru; ferruh.yigit@xilinx.com;
> > andrew.rybchenko@oktetlabs.ru; ndabilpuram@marvell.com;
> > vattunuru@marvell.com; matan@nvidia.com; Zhang, Roy Fan
> > <roy.fan.zhang@intel.com>; jerinj@marvell.com; jiawenwu@trustnetic.com;
> > Yang, Qiming <qiming.yang@intel.com>; Akhil Goyal <gakhil@marvell.com>
> > Subject: [PATCH] doc: announce support for MACsec in rte_security
> >
> > MACsec support is planned for DPDK 22.11, which would
> > result in ABI breakage in some of the rte_security structures.
> > This patch is to give deprecation notice for the affected structures.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> > ---
> > doc/guides/rel_notes/deprecation.rst | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index 4e5b23c53d..1c3bf54d72 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -116,6 +116,11 @@ Deprecation Notices
> > pointer for the private data to the application which can be attached
> > to the packet while enqueuing.
> >
> > +* security: MACsec support is planned to be added in DPDK 22.11 which
> > would
> > + result in updates to structures ``rte_security_macsec_xform``,
> > + ``rte_security_macsec_stats`` and security capability structure
> > + ``rte_security_capability`` to accomodate MACsec capabilities.
> > +
> > * metrics: The function ``rte_metrics_init`` will have a non-void return
> > in order to notify errors instead of calling ``rte_exit``.
> >
> > --
> > 2.25.1
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
2022-07-10 8:25 0% ` Andrew Rybchenko
2022-07-11 2:16 0% ` Xia, Chenbo
@ 2022-07-11 15:01 0% ` Jerin Jacob
2022-07-12 4:25 0% ` Hemant Agrawal
` (2 subsequent siblings)
5 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-07-11 15:01 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk-dev, techboard, Ray Kinsella
On Sun, Jul 10, 2022 at 11:48 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> Announce that they will be made opaque in the public API and mark
> associated API as internal.
> This impacts all bus, as their driver registration mechanism will be
> made internal.
>
> Note: the PCI bus had a similar deprecation notice that we can remove as
> the new one is more generic.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index a9fd6676be..b9cc267b30 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -38,6 +38,13 @@ Deprecation Notices
> external users may still register their bus using a new driver header (see
> ``enable_driver_sdk`` meson option).
>
> +* drivers: As a followup on the work on the ``rte_bus`` object, the
> + ``rte_driver`` and ``rte_device`` objects (and as a domino effect, their
> + bus-specific counterparts) will be made opaque in DPDK 22.11.
> + Registering a driver on a bus will be marked as an internal API:
> + external users may still register their drivers using the bus specific
> + driver header (see ``enable_driver_sdk`` meson option).
> +
> * mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
> be removed in DPDK 22.11. The replacement macro
> ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
> @@ -49,11 +56,6 @@ Deprecation Notices
> * mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
> will be removed in DPDK 22.11.
>
> -* pci: To reduce unnecessary ABIs exposed by DPDK bus driver, "rte_bus_pci.h"
> - will be made internal in 21.11 and macros/data structures/functions defined
> - in the header will not be considered as ABI anymore. This change is inspired
> - by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
> -
> * lib: will fix extending some enum/define breaking the ABI. There are multiple
> samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
> used by iterators, and arrays holding these values are sized with this
> --
> 2.36.1
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
` (2 preceding siblings ...)
2022-07-11 15:01 0% ` Jerin Jacob
@ 2022-07-12 4:25 0% ` Hemant Agrawal
2022-07-12 8:24 0% ` Kevin Laatz
2022-07-15 16:22 0% ` Thomas Monjalon
5 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2022-07-12 4:25 UTC (permalink / raw)
To: David Marchand, dev, techboard; +Cc: Ray Kinsella
On 7/10/2022 11:47 AM, David Marchand wrote:
> rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> Announce that they will be made opaque in the public API and mark
> associated API as internal.
> This impacts all bus, as their driver registration mechanism will be
> made internal.
>
> Note: the PCI bus had a similar deprecation notice that we can remove as
> the new one is more generic.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
` (3 preceding siblings ...)
2022-07-12 4:25 0% ` Hemant Agrawal
@ 2022-07-12 8:24 0% ` Kevin Laatz
2022-07-12 11:38 0% ` Andrew Rybchenko
2022-07-15 16:22 0% ` Thomas Monjalon
5 siblings, 1 reply; 200+ results
From: Kevin Laatz @ 2022-07-12 8:24 UTC (permalink / raw)
To: David Marchand, dev, techboard; +Cc: Ray Kinsella
On 10/07/2022 07:17, David Marchand wrote:
> rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> Announce that they will be made opaque in the public API and mark
> associated API as internal.
> This impacts all bus, as their driver registration mechanism will be
> made internal.
>
> Note: the PCI bus had a similar deprecation notice that we can remove as
> the new one is more generic.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
Thanks for working on this cleanup, David!
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-12 8:24 0% ` Kevin Laatz
@ 2022-07-12 11:38 0% ` Andrew Rybchenko
0 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-07-12 11:38 UTC (permalink / raw)
To: Kevin Laatz, David Marchand, dev, techboard; +Cc: Ray Kinsella
On 7/12/22 11:24, Kevin Laatz wrote:
> On 10/07/2022 07:17, David Marchand wrote:
>> rte_driver and rte_device are unnecessarily exposed in the public
>> API/ABI.
>> Announce that they will be made opaque in the public API and mark
>> associated API as internal.
>> This impacts all bus, as their driver registration mechanism will be
>> made internal.
>>
>> Note: the PCI bus had a similar deprecation notice that we can remove as
>> the new one is more generic.
>>
>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>> ---
>> doc/guides/rel_notes/deprecation.rst | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>
> Thanks for working on this cleanup, David!
>
> Acked-by: Kevin Laatz <kevin.laatz@intel.com>
>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [relevance 0%]
* Re: [PATCH v2 1/1] doc: announce addition of new ipsec event subtypes
@ 2022-07-12 15:03 3% ` Thomas Monjalon
2022-07-12 15:30 0% ` [EXT] " Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-07-12 15:03 UTC (permalink / raw)
To: Vamsi Attunuru; +Cc: dev, jerinj, vattunuru, gakhil, ferruh.yigit, anoobj, mdr
27/06/2022 07:29, Vamsi Attunuru:
> New event subtypes need to be added for notifying expiry events
> upon reaching IPsec SA soft packet expiry and hard packet/byte
> expiry limits. This would be added in DPDK 22.11.
>
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>
> ---
> More details on new event subtype proposal discussion are in below email thread.
> https://patches.dpdk.org/project/dpdk/patch/20220416192530.173895-8-gakhil@marvell.com/
>
> v2: rephrase title and git log.
> ---
> +* ethdev: The enum ``rte_eth_event_ipsec_subtype`` would be extended to add
> + new subtype values ``RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY``,
> + ``RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY`` and
> + ``RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY`` in DPDK 22.11.
While at it, would you consider avoiding future ABI breakage
with RTE_ETH_EVENT_IPSEC_MAX?
^ permalink raw reply [relevance 3%]
* RE: [EXT] Re: [PATCH v2 1/1] doc: announce addition of new ipsec event subtypes
2022-07-12 15:03 3% ` Thomas Monjalon
@ 2022-07-12 15:30 0% ` Akhil Goyal
2022-07-12 20:44 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2022-07-12 15:30 UTC (permalink / raw)
To: Thomas Monjalon, Vamsi Krishna Attunuru
Cc: dev, Jerin Jacob Kollanukkaran, Vamsi Krishna Attunuru,
ferruh.yigit, Anoob Joseph, mdr
> 27/06/2022 07:29, Vamsi Attunuru:
> > New event subtypes need to be added for notifying expiry events
> > upon reaching IPsec SA soft packet expiry and hard packet/byte
> > expiry limits. This would be added in DPDK 22.11.
> >
> > Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> > Acked-by: Akhil Goyal <gakhil@marvell.com>
> > ---
> > More details on new event subtype proposal discussion are in below email
> thread.
> > https://patches.dpdk.org/project/dpdk/patch/20220416192530.173895-8-gakhil@marvell.com/> >
> > v2: rephrase title and git log.
> > ---
> > +* ethdev: The enum ``rte_eth_event_ipsec_subtype`` would be extended to
> add
> > + new subtype values ``RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY``,
> > + ``RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY`` and
> > + ``RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY`` in DPDK 22.11.
>
> While at it, would you consider avoiding future ABI breakage
> with RTE_ETH_EVENT_IPSEC_MAX?
For MAX values there is already a generic notice. Do you want to mention this here as well?
IMO, it is not required. We can work on it, but do not need explicit mention here.
Regards,
Akhil
^ permalink raw reply [relevance 0%]
* Re: [EXT] Re: [PATCH v2 1/1] doc: announce addition of new ipsec event subtypes
2022-07-12 15:30 0% ` [EXT] " Akhil Goyal
@ 2022-07-12 20:44 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-12 20:44 UTC (permalink / raw)
To: Vamsi Krishna Attunuru, Akhil Goyal
Cc: dev, Jerin Jacob Kollanukkaran, Vamsi Krishna Attunuru,
ferruh.yigit, Anoob Joseph, mdr
12/07/2022 17:30, Akhil Goyal:
> > 27/06/2022 07:29, Vamsi Attunuru:
> > > New event subtypes need to be added for notifying expiry events
> > > upon reaching IPsec SA soft packet expiry and hard packet/byte
> > > expiry limits. This would be added in DPDK 22.11.
> > >
> > > Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> > > Acked-by: Akhil Goyal <gakhil@marvell.com>
> > > ---
> > > More details on new event subtype proposal discussion are in below email
> > thread.
> > > https://patches.dpdk.org/project/dpdk/patch/20220416192530.173895-8-gakhil@marvell.com/> >
> > > v2: rephrase title and git log.
> > > ---
> > > +* ethdev: The enum ``rte_eth_event_ipsec_subtype`` would be extended to
> > add
> > > + new subtype values ``RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY``,
> > > + ``RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY`` and
> > > + ``RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY`` in DPDK 22.11.
> >
> > While at it, would you consider avoiding future ABI breakage
> > with RTE_ETH_EVENT_IPSEC_MAX?
>
> For MAX values there is already a generic notice. Do you want to mention this here as well?
> IMO, it is not required. We can work on it, but do not need explicit mention here.
OK I forgot we had already a generic notice.
^ permalink raw reply [relevance 0%]
* RE: [PATCH 1/2] doc: announce region based device mapping support
@ 2022-07-13 7:03 3% ` Sunil Kumar Kori
2022-07-13 7:27 3% ` Xia, Chenbo
0 siblings, 1 reply; 200+ results
From: Sunil Kumar Kori @ 2022-07-13 7:03 UTC (permalink / raw)
To: Xia, Chenbo, Ray Kinsella; +Cc: dev
Hi Chenbo,
There are pci devices which has huge BAR memory but might not be used completely.
Like PCIe device DDR memory is exposed over BAR with 32Gb or so.
So in that case user might have a requirement to mmap only areas of its interest.
Also avoid wasting of extra memory for each pages when kernel mmaps it.
Yes, it is similar to sparse mmap in vfio but I didn't find any support in DPDK for sparse mmap.
So I picked this approach but in either case, ABI change notification is needed, Right?
Regards
Sunil Kumar Kori
> -----Original Message-----
> From: Xia, Chenbo <chenbo.xia@intel.com>
> Sent: Thursday, July 7, 2022 6:09 PM
> To: Sunil Kumar Kori <skori@marvell.com>; Ray Kinsella <mdr@ashroe.eu>
> Cc: dev@dpdk.org
> Subject: [EXT] RE: [PATCH 1/2] doc: announce region based device mapping
> support
>
> External Email
>
> ----------------------------------------------------------------------
> Hi Sunil,
>
> > -----Original Message-----
> > From: skori@marvell.com <skori@marvell.com>
> > Sent: Tuesday, June 28, 2022 9:54 PM
> > To: Ray Kinsella <mdr@ashroe.eu>
> > Cc: dev@dpdk.org; Sunil Kumar Kori <skori@marvell.com>
> > Subject: [PATCH 1/2] doc: announce region based device mapping support
> >
> > From: Sunil Kumar Kori <skori@marvell.com>
> >
> > Adding region based device mapping support, which enables pci device
> > to map only required memory region instead of mapping full BAR.
>
> Why there will be such requirement to mmap only part of BAR when the BAR
> can be fully mmapped. I thought you want to enable something like sparse
> mmap feature in VFIO, but seems it's a feature that let driver ask for specific
> mmap option. Could you explain the use case here?
>
> Thanks,
> Chenbo
>
> >
> > Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> > ---
> > doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index 4e5b23c53d..8800a3eb41 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -125,3 +125,16 @@ Deprecation Notices
> > applications should be updated to use the ``dmadev`` library instead,
> > with the underlying HW-functionality being provided by the ``ioat`` or
> > ``idxd`` dma drivers
> > +
> > +* pci: Update ``rte_pci_device`` and ``rte_pci_driver`` to add region
> > based
> > + memory mapping support. There could be a requirement to mmap
> > + specific
> > memory
> > + region only. Using this mechanism, pci device can be mapped for a
> > + given BAR at a given offset of given size.
> > +
> > + ``rte_pci_device`` will be added with following field
> > + ``regions[PCI_MAX_RESOURCE][PCI_MAX_REGION_PER_RESOURCE];``.
> This
> > + field
> > will
> > + specify the regions which are mapped for a given BAR.
> > +
> > + ``rte_pci_driver`` will be added with ``rte_pci_region_map
> > + *regions``
> > and
> > + ``valid_bars[PCI_MAX_RESOURCE]``. Using these fields, driver can
> > propagate
> > + its region information which are required to be mmap.
> > --
> > 2.25.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH 1/2] doc: announce region based device mapping support
@ 2022-07-13 7:21 3% ` Xia, Chenbo
0 siblings, 0 replies; 200+ results
From: Xia, Chenbo @ 2022-07-13 7:21 UTC (permalink / raw)
To: David Marchand, Sunil Kumar Kori; +Cc: Ray Kinsella, dev, Thomas Monjalon
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Wednesday, July 13, 2022 3:18 PM
> To: Sunil Kumar Kori <skori@marvell.com>
> Cc: Ray Kinsella <mdr@ashroe.eu>; dev <dev@dpdk.org>; Xia, Chenbo
> <chenbo.xia@intel.com>; Thomas Monjalon <thomas@monjalon.net>
> Subject: Re: [PATCH 1/2] doc: announce region based device mapping support
>
> On Tue, Jun 28, 2022 at 3:56 PM <skori@marvell.com> wrote:
> >
> > From: Sunil Kumar Kori <skori@marvell.com>
> >
> > Adding region based device mapping support, which enables pci device
> > to map only required memory region instead of mapping full BAR.
> >
> > Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> > ---
> > doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> > index 4e5b23c53d..8800a3eb41 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -125,3 +125,16 @@ Deprecation Notices
> > applications should be updated to use the ``dmadev`` library instead,
> > with the underlying HW-functionality being provided by the ``ioat``
> or
> > ``idxd`` dma drivers
> > +
> > +* pci: Update ``rte_pci_device`` and ``rte_pci_driver`` to add region
> based
> > + memory mapping support. There could be a requirement to mmap specific
> memory
> > + region only. Using this mechanism, pci device can be mapped for
> > + a given BAR at a given offset of given size.
> > +
> > + ``rte_pci_device`` will be added with following field
> > + ``regions[PCI_MAX_RESOURCE][PCI_MAX_REGION_PER_RESOURCE];``. This
> field will
> > + specify the regions which are mapped for a given BAR.
> > +
> > + ``rte_pci_driver`` will be added with ``rte_pci_region_map *regions``
> and
> > + ``valid_bars[PCI_MAX_RESOURCE]``. Using these fields, driver can
> propagate
> > + its region information which are required to be mmap.
>
> I don't think we need a new deprecation notice for this.
> We still have Chenbo current notice:
> https://git.dpdk.org/dpdk/tree/doc/guides/rel_notes/deprecation.rst#n46
>
> Besides, my proposal hides every bus specific device representations,
> and I think it covers your needs too.
> See https://patches.dpdk.org/project/dpdk/patch/20220710061736.973563-1-
> david.marchand@redhat.com/
>
> Did I miss something?
Agree, I am about to say this :)
Sunil, with David's patchset, you can just send your patchset. David will help
clean-up the ABI for you.
Thanks,
Chenbo
>
>
> --
> David Marchand
^ permalink raw reply [relevance 3%]
* RE: [PATCH 1/2] doc: announce region based device mapping support
2022-07-13 7:03 3% ` Sunil Kumar Kori
@ 2022-07-13 7:27 3% ` Xia, Chenbo
2022-07-13 7:38 0% ` Sunil Kumar Kori
0 siblings, 1 reply; 200+ results
From: Xia, Chenbo @ 2022-07-13 7:27 UTC (permalink / raw)
To: Sunil Kumar Kori, Ray Kinsella; +Cc: dev, David Marchand
Hi Sunil,
> -----Original Message-----
> From: Sunil Kumar Kori <skori@marvell.com>
> Sent: Wednesday, July 13, 2022 3:04 PM
> To: Xia, Chenbo <chenbo.xia@intel.com>; Ray Kinsella <mdr@ashroe.eu>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH 1/2] doc: announce region based device mapping support
>
> Hi Chenbo,
>
> There are pci devices which has huge BAR memory but might not be used
> completely.
> Like PCIe device DDR memory is exposed over BAR with 32Gb or so.
> So in that case user might have a requirement to mmap only areas of its
> interest.
> Also avoid wasting of extra memory for each pages when kernel mmaps it.
This problem statement makes sense to me. About the solution, pls check below.
>
> Yes, it is similar to sparse mmap in vfio but I didn't find any support in
> DPDK for sparse mmap.
> So I picked this approach but in either case, ABI change notification is
> needed, Right?
For ABI, David & I already mentioned in another email that your notice is not
needed anymore.
What if you send the patchset to support sparse mmap in DPDK, to me, that seems
more generic. Could sparse mmap solve your problem?
Thanks,
Chenbo
>
> Regards
> Sunil Kumar Kori
>
> > -----Original Message-----
> > From: Xia, Chenbo <chenbo.xia@intel.com>
> > Sent: Thursday, July 7, 2022 6:09 PM
> > To: Sunil Kumar Kori <skori@marvell.com>; Ray Kinsella <mdr@ashroe.eu>
> > Cc: dev@dpdk.org
> > Subject: [EXT] RE: [PATCH 1/2] doc: announce region based device mapping
> > support
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Hi Sunil,
> >
> > > -----Original Message-----
> > > From: skori@marvell.com <skori@marvell.com>
> > > Sent: Tuesday, June 28, 2022 9:54 PM
> > > To: Ray Kinsella <mdr@ashroe.eu>
> > > Cc: dev@dpdk.org; Sunil Kumar Kori <skori@marvell.com>
> > > Subject: [PATCH 1/2] doc: announce region based device mapping support
> > >
> > > From: Sunil Kumar Kori <skori@marvell.com>
> > >
> > > Adding region based device mapping support, which enables pci device
> > > to map only required memory region instead of mapping full BAR.
> >
> > Why there will be such requirement to mmap only part of BAR when the BAR
> > can be fully mmapped. I thought you want to enable something like sparse
> > mmap feature in VFIO, but seems it's a feature that let driver ask for
> specific
> > mmap option. Could you explain the use case here?
> >
> > Thanks,
> > Chenbo
> >
> > >
> > > Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> > > ---
> > > doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
> > > 1 file changed, 13 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index 4e5b23c53d..8800a3eb41 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -125,3 +125,16 @@ Deprecation Notices
> > > applications should be updated to use the ``dmadev`` library
> instead,
> > > with the underlying HW-functionality being provided by the ``ioat``
> or
> > > ``idxd`` dma drivers
> > > +
> > > +* pci: Update ``rte_pci_device`` and ``rte_pci_driver`` to add region
> > > based
> > > + memory mapping support. There could be a requirement to mmap
> > > + specific
> > > memory
> > > + region only. Using this mechanism, pci device can be mapped for a
> > > + given BAR at a given offset of given size.
> > > +
> > > + ``rte_pci_device`` will be added with following field
> > > + ``regions[PCI_MAX_RESOURCE][PCI_MAX_REGION_PER_RESOURCE];``.
> > This
> > > + field
> > > will
> > > + specify the regions which are mapped for a given BAR.
> > > +
> > > + ``rte_pci_driver`` will be added with ``rte_pci_region_map
> > > + *regions``
> > > and
> > > + ``valid_bars[PCI_MAX_RESOURCE]``. Using these fields, driver can
> > > propagate
> > > + its region information which are required to be mmap.
> > > --
> > > 2.25.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH 1/2] doc: announce region based device mapping support
2022-07-13 7:27 3% ` Xia, Chenbo
@ 2022-07-13 7:38 0% ` Sunil Kumar Kori
0 siblings, 0 replies; 200+ results
From: Sunil Kumar Kori @ 2022-07-13 7:38 UTC (permalink / raw)
To: Xia, Chenbo, Ray Kinsella; +Cc: dev, David Marchand
Regards
Sunil Kumar Kori
> -----Original Message-----
> From: Xia, Chenbo <chenbo.xia@intel.com>
> Sent: Wednesday, July 13, 2022 12:58 PM
> To: Sunil Kumar Kori <skori@marvell.com>; Ray Kinsella <mdr@ashroe.eu>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>
> Subject: [EXT] RE: [PATCH 1/2] doc: announce region based device mapping
> support
>
> External Email
>
> ----------------------------------------------------------------------
> Hi Sunil,
>
> > -----Original Message-----
> > From: Sunil Kumar Kori <skori@marvell.com>
> > Sent: Wednesday, July 13, 2022 3:04 PM
> > To: Xia, Chenbo <chenbo.xia@intel.com>; Ray Kinsella <mdr@ashroe.eu>
> > Cc: dev@dpdk.org
> > Subject: RE: [PATCH 1/2] doc: announce region based device mapping
> > support
> >
> > Hi Chenbo,
> >
> > There are pci devices which has huge BAR memory but might not be used
> > completely.
> > Like PCIe device DDR memory is exposed over BAR with 32Gb or so.
> > So in that case user might have a requirement to mmap only areas of
> > its interest.
> > Also avoid wasting of extra memory for each pages when kernel mmaps it.
>
> This problem statement makes sense to me. About the solution, pls check
> below.
>
> >
> > Yes, it is similar to sparse mmap in vfio but I didn't find any
> > support in DPDK for sparse mmap.
> > So I picked this approach but in either case, ABI change notification
> > is needed, Right?
>
> For ABI, David & I already mentioned in another email that your notice is not
> needed anymore.
>
> What if you send the patchset to support sparse mmap in DPDK, to me, that
> seems more generic. Could sparse mmap solve your problem?
I will look into sparse mmap and analyze its feasibility to solve my problem.
Will update accordingly.
Thanks Chenbo and David.
>
> Thanks,
> Chenbo
>
> >
> > Regards
> > Sunil Kumar Kori
> >
> > > -----Original Message-----
> > > From: Xia, Chenbo <chenbo.xia@intel.com>
> > > Sent: Thursday, July 7, 2022 6:09 PM
> > > To: Sunil Kumar Kori <skori@marvell.com>; Ray Kinsella
> > > <mdr@ashroe.eu>
> > > Cc: dev@dpdk.org
> > > Subject: [EXT] RE: [PATCH 1/2] doc: announce region based device
> > > mapping support
> > >
> > > External Email
> > >
> > > --------------------------------------------------------------------
> > > --
> > > Hi Sunil,
> > >
> > > > -----Original Message-----
> > > > From: skori@marvell.com <skori@marvell.com>
> > > > Sent: Tuesday, June 28, 2022 9:54 PM
> > > > To: Ray Kinsella <mdr@ashroe.eu>
> > > > Cc: dev@dpdk.org; Sunil Kumar Kori <skori@marvell.com>
> > > > Subject: [PATCH 1/2] doc: announce region based device mapping
> > > > support
> > > >
> > > > From: Sunil Kumar Kori <skori@marvell.com>
> > > >
> > > > Adding region based device mapping support, which enables pci
> > > > device to map only required memory region instead of mapping full
> BAR.
> > >
> > > Why there will be such requirement to mmap only part of BAR when the
> > > BAR can be fully mmapped. I thought you want to enable something
> > > like sparse mmap feature in VFIO, but seems it's a feature that let
> > > driver ask for
> > specific
> > > mmap option. Could you explain the use case here?
> > >
> > > Thanks,
> > > Chenbo
> > >
> > > >
> > > > Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> > > > ---
> > > > doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
> > > > 1 file changed, 13 insertions(+)
> > > >
> > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > b/doc/guides/rel_notes/deprecation.rst
> > > > index 4e5b23c53d..8800a3eb41 100644
> > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > @@ -125,3 +125,16 @@ Deprecation Notices
> > > > applications should be updated to use the ``dmadev`` library
> > instead,
> > > > with the underlying HW-functionality being provided by the
> > > > ``ioat``
> > or
> > > > ``idxd`` dma drivers
> > > > +
> > > > +* pci: Update ``rte_pci_device`` and ``rte_pci_driver`` to add
> > > > +region
> > > > based
> > > > + memory mapping support. There could be a requirement to mmap
> > > > + specific
> > > > memory
> > > > + region only. Using this mechanism, pci device can be mapped for
> > > > + a given BAR at a given offset of given size.
> > > > +
> > > > + ``rte_pci_device`` will be added with following field
> > > > + ``regions[PCI_MAX_RESOURCE][PCI_MAX_REGION_PER_RESOURCE];``.
> > > This
> > > > + field
> > > > will
> > > > + specify the regions which are mapped for a given BAR.
> > > > +
> > > > + ``rte_pci_driver`` will be added with ``rte_pci_region_map
> > > > + *regions``
> > > > and
> > > > + ``valid_bars[PCI_MAX_RESOURCE]``. Using these fields, driver
> > > > + can
> > > > propagate
> > > > + its region information which are required to be mmap.
> > > > --
> > > > 2.25.1
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC PATCH] ethdev: support congestion management
@ 2022-07-13 12:11 0% ` Jerin Jacob
0 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-07-13 12:11 UTC (permalink / raw)
To: Ajit Khaparde
Cc: Jerin Jacob Kollanukkaran, dpdk-dev, Ferruh Yigit,
Thomas Monjalon, Andrew Rybchenko, Andrew Boyer, Beilei Xing,
Bruce Richardson, Chas Williams, Xia, Chenbo, Ciara Loftus,
Devendra Singh Rawat, Ed Czeck, Evgeny Schemeilin, Gaetan Rivet,
Gagandeep Singh, Guoyang Zhou, Haiyue Wang, Harman Kalra,
Heinrich Kuhn, Hemant Agrawal, Hyong Youb Kim, Igor Chauskin,
Igor Russkikh, Jakub Grajciar, Singh, Jasvinder, Jian Wang,
Jiawen Wu, Jingjing Wu, John Daley, John Miller,
John W. Linville, Wiles, Keith, Kiran Kumar K, oulijun,
Liron Himi, Long Li, Marcin Wojtas, Martin Spinler, Matan Azrad,
Matt Peters, Maxime Coquelin, Michal Krawczyk, Min Hu (Connor),
Nalla Pradeep, Nithin Dabilpuram, Qiming Yang, Qi Zhang,
Radha Mohan Chintakuntla, Rahul Lakkireddy, Rasesh Mody,
Rosen Xu, Sachin Saxena (OSS),
Satha Rao, Shahed Shaikh, Shai Brandes, Shepard Siegel,
Somalapuram Amaranath, Somnath Kotur, Stephen Hemminger,
Steven Webster, Sunil Kumar Kori, Tetsuya Mukawa,
Veerasenareddy Burru, Slava Ovsiienko, Xiao Wang, Xiaoyun Wang,
Yisen Zhuang, Yong Wang, Ziyang Xuan, Dumitrescu, Cristian
On Tue, May 31, 2022 at 1:13 AM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> On Mon, May 30, 2022 at 6:16 AM <jerinj@marvell.com> wrote:
> >
> > From: Jerin Jacob <jerinj@marvell.com>
> >
> > NIC HW controllers often come with congestion management support on
> > various HW objects such as Rx queue depth or mempool queue depth.
> >
> > Also, it can support various modes of operation such as RED
> > (Random early discard), WRED etc on those HW objects.
> >
> > This patch adds a framework to express such modes(enum rte_cman_mode)
> > and introduce (enum rte_eth_cman_obj) to enumerate the different
> > objects where the modes can operate on.
> >
> > This patch adds RTE_CMAN_RED mode of operation and
> > RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
> >
> > Introduced reserved fields in configuration structure
> > backed by rte_eth_cman_config_init() to add new configuration
> > parameters without ABI breakage.
> >
> > Added rte_eth_cman_info_get() API to get the information such as
> > supported modes and objects.
> >
> > Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
> > to configure congestion management on those object with associated mode.
> >
> > Finally, Added rte_eth_cman_config_get() API to retrieve the
> > applied configuration.
>
> Can you also add How all this helps an application? Thanks
Random early detection (RED), also known as random early discard or
random early drop is a queuing discipline for a network scheduler
suited for congestion avoidance.
In the conventional tail drop algorithm, a router or other network
component buffers as many packets as it can, and simply drops the ones
it cannot buffer. If buffers are constantly full, the network is
congested. Tail drop distributes buffer space unfairly among traffic
flows. Tail drop can also lead to TCP global synchronization as all
TCP connections "hold back" simultaneously, and then step forward
simultaneously. Networks become under-utilized and
flooded—alternately, in waves.
RED addresses these issues by pre-emptively dropping packets before
the buffer becomes completely full. It uses predictive models to
decide which packets to drop.
it is copied from https://en.wikipedia.org/wiki/Random_early_detection
page. I have kept this URL under enum rte_cman_mode:: RTE_CMAN_RED
too.
Also I will add original specification URL too,
http://www.aciri.org/floyd/papers/red/red.html.
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC PATCH] ethdev: support congestion management
@ 2022-07-13 12:25 0% ` Jerin Jacob
0 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-07-13 12:25 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Jerin Jacob, dpdk-dev, Ferruh Yigit, Thomas Monjalon,
Andrew Rybchenko, Ajit Khaparde, Andrew Boyer, Beilei Xing,
Richardson, Bruce, Chas Williams, Xia, Chenbo, Ciara Loftus,
Devendra Singh Rawat, Ed Czeck, Evgeny Schemeilin, Gaetan Rivet,
Gagandeep Singh, Guoyang Zhou, Haiyue Wang, Harman Kalra,
Heinrich Kuhn, Hemant Agrawal, Hyong Youb Kim, Igor Chauskin,
Igor Russkikh, Jakub Grajciar, Jasvinder Singh, Jian Wang,
Jiawen Wu, Jingjing Wu, John Daley, John Miller,
John W. Linville, Wiles, Keith, Kiran Kumar K, Lijun Ou,
Liron Himi, Long Li, Marcin Wojtas, Martin Spinler, Matan Azrad,
Matt Peters, Maxime Coquelin, Michal Krawczyk, Min Hu (Connor,
Pradeep Kumar Nalla, Nithin Dabilpuram, Qiming Yang, Qi Zhang,
Radha Mohan Chintakuntla, Rahul Lakkireddy, Rasesh Mody,
Rosen Xu, Sachin Saxena, Satha Koteswara Rao Kottidi,
Shahed Shaikh, Shai Brandes, Shepard Siegel,
Somalapuram Amaranath, Somnath Kotur, Stephen Hemminger,
Steven Webster, Sunil Kumar Kori, Tetsuya Mukawa,
Veerasenareddy Burru, Viacheslav Ovsiienko, Xiao Wang,
Xiaoyun Wang, Yisen Zhuang, Yong Wang, Ziyang Xuan,
Cristian Dumitrescu
On Tue, May 31, 2022 at 9:39 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Mon, 30 May 2022 18:45:26 +0530
> <jerinj@marvell.com> wrote:
>
> > From: Jerin Jacob <jerinj@marvell.com>
> >
> > NIC HW controllers often come with congestion management support on
> > various HW objects such as Rx queue depth or mempool queue depth.
> >
> > Also, it can support various modes of operation such as RED
> > (Random early discard), WRED etc on those HW objects.
> >
> > This patch adds a framework to express such modes(enum rte_cman_mode)
> > and introduce (enum rte_eth_cman_obj) to enumerate the different
> > objects where the modes can operate on.
> >
> > This patch adds RTE_CMAN_RED mode of operation and
> > RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
> >
> > Introduced reserved fields in configuration structure
> > backed by rte_eth_cman_config_init() to add new configuration
> > parameters without ABI breakage.
> >
> > Added rte_eth_cman_info_get() API to get the information such as
> > supported modes and objects.
> >
> > Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
> > to configure congestion management on those object with associated mode.
> >
> > Finally, Added rte_eth_cman_config_get() API to retrieve the
> > applied configuration.
> >
> > Signed-off-by: Jerin Jacob <jerinj@marvell.com>
>
> The concept of supporting hardware queue management is good, but would like
> to make some suggestions:
>
> The hardware support of QOS should ideally be part of the existing DPDK
> traffic management. For example, in Linux there are devices that can offload
> traffic control (TC) to hardware and this is done via flags to existing
> software infrastructure.
>
> Your implementation makes HW and SW QoS diverge. This will require each application
> to get even more dependent on a particular hardware device.
>
> Which brings up the bigger picture problem. Don't want to repeat the problems
> with rte_flow here. Any hardware support needs to have a matching set of software
> implementation, and test cases. The problem with rte_flow is the semantics are
> poorly defined and each vendor does it differently; and the SW flow classifier
> is incomplete and does not match what the HW does.
>
> In an ideal world, there would be:
> - an abstract API for defining ingress and egress queue management
It is already available as rte_tm and rte_mtr API. Only congestion
management is missing. That is added in the patch.
> - a software implementation of that API
It is already available. See lib/sched/rte_red.h
> - multiple hardware implementations
> - ability to transparently use both SW and HW queue management from application
> - complete test suite for that API.
>
> Yes, that is asking a lot. But as trailblazer in this area, you have to do the
> hard work.
None of the new features in rte_flow, rte_ethdev or rte_tm etc NOT
going in this path.
If we think, we need to enforce this path(SW driver is a must) for any
feature. Let's discuss here and TB meeting and decide and
we need to make that policy for any new contribution.
>
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v1] ethdev: support congestion management
@ 2022-07-13 13:03 2% ` jerinj
2 siblings, 0 replies; 200+ results
From: jerinj @ 2022-07-13 13:03 UTC (permalink / raw)
To: dev, Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko
Cc: ajit.khaparde, aboyer, beilei.xing, bruce.richardson, chas3,
chenbo.xia, ciara.loftus, dsinghrawat, ed.czeck, evgenys, grive,
g.singh, zhouguoyang, haiyue.wang, hkalra, heinrich.kuhn,
hemant.agrawal, hyonkim, igorch, irusskikh, jgrajcia,
jasvinder.singh, jianwang, jiawenwu, jingjing.wu, johndale,
john.miller, linville, keith.wiles, kirankumark, oulijun, lironh,
longli, mw, spinler, matan, matt.peters, maxime.coquelin, mk,
humin29, pnalla, ndabilpuram, qiming.yang, qi.z.zhang, radhac,
rahul.lakkireddy, rmody, rosen.xu, sachin.saxena, skoteshwar,
shshaikh, shaibran, shepard.siegel, asomalap, somnath.kotur,
sthemmin, steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2, cristian.dumitrescu, Jerin Jacob
From: Jerin Jacob <jerinj@marvell.com>
NIC HW controllers often come with congestion management support on
various HW objects such as Rx queue depth or mempool queue depth.
Also, it can support various modes of operation such as RED
(Random early discard), WRED etc on those HW objects.
This patch adds a framework to express such modes(enum rte_cman_mode)
and introduce (enum rte_eth_cman_obj) to enumerate the different
objects where the modes can operate on.
This patch adds RTE_CMAN_RED mode of operation and
RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
Introduced reserved fields in configuration structure
backed by rte_eth_cman_config_init() to add new configuration
parameters without ABI breakage.
Added rte_eth_cman_info_get() API to get the information such as
supported modes and objects.
Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
to configure congestion management on those object with associated mode.
Finally, Added rte_eth_cman_config_get() API to retrieve the
applied configuration.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
rfc..v1:
- Added RED specification (http://www.aciri.org/floyd/papers/red/red.html) link
- Fixed doxygen comment issue (Min Hu)
doc/guides/nics/features.rst | 12 +++
doc/guides/nics/features/default.ini | 1 +
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_cman.h | 52 ++++++++++
lib/ethdev/rte_ethdev.h | 145 +++++++++++++++++++++++++++
5 files changed, 211 insertions(+)
create mode 100644 lib/eal/include/rte_cman.h
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 7f6cb914a5..aa22d8bb22 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -727,6 +727,18 @@ Supports configuring per-queue stat counter mapping.
``rte_eth_dev_set_tx_queue_stats_mapping()``.
+.. _nic_features_congestion_management:
+
+Congestion management
+---------------------
+
+Supports congestion management.
+
+* **[implements] eth_dev_ops**: ``cman_info_get``, ``cman_config_set``, ``cman_config_get``.
+* **[related] API**: ``rte_eth_cman_info_get()``, ``rte_eth_cman_config_init()``,
+ ``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.
+
+
.. _nic_features_fw_version:
FW version
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index d1db0c256a..38a5767b06 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -60,6 +60,7 @@ Tx descriptor status =
Basic stats =
Extended stats =
Stats per queue =
+Congestion management =
FW version =
EEPROM dump =
Module EEPROM dump =
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index fd6e844224..e569ba7cf4 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -10,6 +10,7 @@ headers += files(
'rte_branch_prediction.h',
'rte_bus.h',
'rte_class.h',
+ 'rte_cman.h',
'rte_common.h',
'rte_compat.h',
'rte_debug.h',
diff --git a/lib/eal/include/rte_cman.h b/lib/eal/include/rte_cman.h
new file mode 100644
index 0000000000..e50dd28bc4
--- /dev/null
+++ b/lib/eal/include/rte_cman.h
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2022 Marvell International Ltd.
+ */
+
+#ifndef RTE_CMAN_H
+#define RTE_CMAN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bitops.h>
+
+/**
+ * @file
+ * Congestion management related parameters for DPDK.
+ */
+
+/** Congestion management modes */
+enum rte_cman_mode {
+ /** Congestion based on Random Early Detection.
+ *
+ * https://en.wikipedia.org/wiki/Random_early_detection
+ * http://www.aciri.org/floyd/papers/red/red.html
+ * @see struct rte_cman_red_params
+ */
+ RTE_CMAN_RED = RTE_BIT64(0),
+};
+
+/**
+ * RED based congestion management configuration parameters.
+ */
+struct rte_cman_red_params {
+ /** Minimum threshold (min_th) value
+ *
+ * Value expressed as percentage. Value must be in 0 to 100(inclusive).
+ */
+ uint8_t min_th;
+ /** Maximum threshold (max_th) value
+ *
+ * Value expressed as percentage. Value must be in 0 to 100(inclusive).
+ */
+ uint8_t max_th;
+ /** Inverse of packet marking probability maximum value (maxp = 1 / maxp_inv) */
+ uint16_t maxp_inv;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* RTE_CMAN_H */
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d..6a342df64a 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -160,6 +160,7 @@ extern "C" {
#define RTE_ETHDEV_DEBUG_TX
#endif
+#include <rte_cman.h>
#include <rte_compat.h>
#include <rte_log.h>
#include <rte_interrupts.h>
@@ -5506,6 +5507,150 @@ typedef struct {
__rte_experimental
int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
+/* Congestion management */
+
+/** Enumerate list of ethdev congestion management objects */
+enum rte_eth_cman_obj {
+ /** Congestion management based on Rx queue depth */
+ RTE_ETH_CMAN_OBJ_RX_QUEUE = RTE_BIT64(0),
+ /** Congestion management based on mempool depth associated with Rx queue
+ * @see rte_eth_rx_queue_setup()
+ */
+ RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL = RTE_BIT64(1),
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change, or be removed, without prior notice
+ *
+ * A structure used to retrieve information of ethdev congestion management.
+ */
+struct rte_eth_cman_info {
+ /** Set of supported congestion management modes
+ * @see enum rte_cman_mode
+ */
+ uint64_t modes_supported;
+ /** Set of supported congestion management objects
+ * @see enum rte_eth_cman_obj
+ */
+ uint64_t objs_supported;
+ /** Reserved for future fields */
+ uint8_t rsvd[64];
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change, or be removed, without prior notice
+ *
+ * A structure used to configure the ethdev congestion management.
+ */
+struct rte_eth_cman_config {
+ /** Congestion management object */
+ enum rte_eth_cman_obj obj;
+ /** Congestion management mode */
+ enum rte_cman_mode mode;
+ union {
+ /** Rx queue to configure congestion management.
+ *
+ * Valid when object is RTE_ETH_CMAN_OBJ_RX_QUEUE or
+ * RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL.
+ */
+ uint16_t rx_queue;
+ /** Reserved for future fields */
+ uint8_t rsvd_obj_params[16];
+ } obj_param;
+ union {
+ /** RED configuration parameters.
+ *
+ * Valid when mode is RTE_CMAN_RED.
+ */
+ struct rte_cman_red_params red;
+ /** Reserved for future fields */
+ uint8_t rsvd_mode_params[64];
+ } mode_param;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Retrieve the information for ethdev congestion management
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param info
+ * A pointer to a structure of type *rte_eth_cman_info* to be filled with
+ * the information about congestion management.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if support for cman_info_get does not exist.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Initialize the ethdev congestion management configuration structure with default values.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param config
+ * A pointer to a structure of type *rte_eth_cman_config* to be initialized
+ * with default value.
+ * @return
+ * - (0) if successful.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Configure ethdev congestion management
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param config
+ * A pointer to a structure of type *rte_eth_cman_config* to be configured.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if support for cman_config_set does not exist.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_config_set(uint16_t port_id, struct rte_eth_cman_config *config);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Retrieve the applied ethdev congestion management parameters for the given port.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param config
+ * A pointer to a structure of type *rte_eth_cman_config* to retrieve
+ * congestion management parameters for the given object.
+ * Application must fill all parameters except mode_param parameter in
+ * struct rte_eth_cman_config.
+ *
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if support for cman_config_get does not exist.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
+
#include <rte_ethdev_core.h>
/**
--
2.37.0
^ permalink raw reply [relevance 2%]
* [PATCH v4] doc: announce KNI deprecation
2022-07-11 14:47 0% ` Jerin Jacob
@ 2022-07-13 16:10 5% ` Thomas Monjalon
2022-07-13 19:51 0% ` Thomas Monjalon
2022-07-14 9:20 0% ` Bruce Richardson
1 sibling, 2 replies; 200+ results
From: Thomas Monjalon @ 2022-07-13 16:10 UTC (permalink / raw)
To: dev
Cc: david.marchand, andrew.rybchenko, maxime.coquelin, chenbo.xia,
mdr, ferruh.yigit, olivier.matz, jerinj, Ferruh Yigit
From: Ferruh Yigit <ferruh.yigit@intel.com>
Announce the deprecation plan for KNI kernel module, library and example.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
Squashed and updated 2 deprecations:
https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
---
doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
doc/guides/rel_notes/deprecation.rst | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index e021cc69b6..03b5bca958 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -8,6 +8,9 @@ Kernel NIC Interface
.. note::
+ KNI is deprecated and will be removed in future.
+ See :doc:`../rel_notes/deprecation`.
+
For an alternative to KNI, that does not require any out-of-tree Linux kernel modules,
or a custom library, see :ref:`virtio_user_as_exception_path`.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 4e5b23c53d..e54597c591 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -48,6 +48,15 @@ Deprecation Notices
in the header will not be considered as ABI anymore. This change is inspired
by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
+* kni: The KNI kernel module and library are not recommended for use by new
+ applications - other technologies such as virtio-user are recommended instead.
+ The KNI kernel module and library will be removed from DPDK 23.11,
+ following the DPDK technical board
+ `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
+ and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
+ The first steps are to add deprecation warnings
+ and to remove the example application from 22.11.
+
* lib: will fix extending some enum/define breaking the ABI. There are multiple
samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
used by iterators, and arrays holding these values are sized with this
--
2.36.1
^ permalink raw reply [relevance 5%]
* Re: [PATCH v4] doc: announce KNI deprecation
2022-07-13 16:10 5% ` [PATCH v4] " Thomas Monjalon
@ 2022-07-13 19:51 0% ` Thomas Monjalon
2022-07-14 9:20 0% ` Bruce Richardson
1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-13 19:51 UTC (permalink / raw)
To: dev
Cc: david.marchand, andrew.rybchenko, maxime.coquelin, chenbo.xia,
mdr, ferruh.yigit, olivier.matz, jerinj, Ferruh Yigit
13/07/2022 18:10, Thomas Monjalon:
> From: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Announce the deprecation plan for KNI kernel module, library and example.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> Squashed and updated 2 deprecations:
> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
This is a mistake. The second deprecation squashed here is
https://patches.dpdk.org/project/dpdk/patch/20220630165031.79183-1-bruce.richardson@intel.com/
> ---
> doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
> doc/guides/rel_notes/deprecation.rst | 9 +++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> index e021cc69b6..03b5bca958 100644
> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> @@ -8,6 +8,9 @@ Kernel NIC Interface
>
> .. note::
>
> + KNI is deprecated and will be removed in future.
> + See :doc:`../rel_notes/deprecation`.
> +
> For an alternative to KNI, that does not require any out-of-tree Linux kernel modules,
> or a custom library, see :ref:`virtio_user_as_exception_path`.
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..e54597c591 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -48,6 +48,15 @@ Deprecation Notices
> in the header will not be considered as ABI anymore. This change is inspired
> by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
>
> +* kni: The KNI kernel module and library are not recommended for use by new
> + applications - other technologies such as virtio-user are recommended instead.
> + The KNI kernel module and library will be removed from DPDK 23.11,
> + following the DPDK technical board
> + `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
> + The first steps are to add deprecation warnings
> + and to remove the example application from 22.11.
> +
> * lib: will fix extending some enum/define breaking the ABI. There are multiple
> samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
> used by iterators, and arrays holding these values are sized with this
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4] doc: announce KNI deprecation
2022-07-13 16:10 5% ` [PATCH v4] " Thomas Monjalon
2022-07-13 19:51 0% ` Thomas Monjalon
@ 2022-07-14 9:20 0% ` Bruce Richardson
2022-07-14 10:07 0% ` Thomas Monjalon
2022-07-14 14:50 0% ` Ferruh Yigit
1 sibling, 2 replies; 200+ results
From: Bruce Richardson @ 2022-07-14 9:20 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, david.marchand, andrew.rybchenko, maxime.coquelin,
chenbo.xia, mdr, ferruh.yigit, olivier.matz, jerinj,
Ferruh Yigit
On Wed, Jul 13, 2022 at 06:10:47PM +0200, Thomas Monjalon wrote:
> From: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Announce the deprecation plan for KNI kernel module, library and example.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> Squashed and updated 2 deprecations:
> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> ---
One suggestion below.
With corrected link and with/without suggested change:
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
> doc/guides/rel_notes/deprecation.rst | 9 +++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> index e021cc69b6..03b5bca958 100644
> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> @@ -8,6 +8,9 @@ Kernel NIC Interface
>
> .. note::
>
> + KNI is deprecated and will be removed in future.
> + See :doc:`../rel_notes/deprecation`.
> +
> For an alternative to KNI, that does not require any out-of-tree Linux kernel modules,
> or a custom library, see :ref:`virtio_user_as_exception_path`.
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..e54597c591 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -48,6 +48,15 @@ Deprecation Notices
> in the header will not be considered as ABI anymore. This change is inspired
> by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
>
> +* kni: The KNI kernel module and library are not recommended for use by new
> + applications - other technologies such as virtio-user are recommended instead.
> + The KNI kernel module and library will be removed from DPDK 23.11,
> + following the DPDK technical board
> + `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
> + The first steps are to add deprecation warnings
> + and to remove the example application from 22.11.
> +
I wonder whether having this done as bullet points in chronological order
might be clearer. Something like:
* kni: The KNI kernel module and library are not recommended for use by new
applications - other technologies such as virtio-user are recommended instead.
Following the DPDK technical board
`decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_:
* The KNI example application will be removed from DPDK 22.11 release
* The KNI kernel module and library will be removed from the DPDK 23.11
release
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4] doc: announce KNI deprecation
2022-07-14 9:20 0% ` Bruce Richardson
@ 2022-07-14 10:07 0% ` Thomas Monjalon
2022-07-14 14:50 0% ` Ferruh Yigit
1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-14 10:07 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, david.marchand, andrew.rybchenko, maxime.coquelin,
chenbo.xia, mdr, ferruh.yigit, olivier.matz, jerinj
14/07/2022 11:20, Bruce Richardson:
> On Wed, Jul 13, 2022 at 06:10:47PM +0200, Thomas Monjalon wrote:
> > From: Ferruh Yigit <ferruh.yigit@intel.com>
> >
> > Announce the deprecation plan for KNI kernel module, library and example.
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > Squashed and updated 2 deprecations:
> > https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> > https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> > ---
>
> One suggestion below.
> With corrected link and with/without suggested change:
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
> > doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
> > doc/guides/rel_notes/deprecation.rst | 9 +++++++++
> > 2 files changed, 12 insertions(+)
> >
> > diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
> > index e021cc69b6..03b5bca958 100644
> > --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> > +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> > @@ -8,6 +8,9 @@ Kernel NIC Interface
> >
> > .. note::
> >
> > + KNI is deprecated and will be removed in future.
> > + See :doc:`../rel_notes/deprecation`.
> > +
> > For an alternative to KNI, that does not require any out-of-tree Linux kernel modules,
> > or a custom library, see :ref:`virtio_user_as_exception_path`.
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > index 4e5b23c53d..e54597c591 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -48,6 +48,15 @@ Deprecation Notices
> > in the header will not be considered as ABI anymore. This change is inspired
> > by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
> >
> > +* kni: The KNI kernel module and library are not recommended for use by new
> > + applications - other technologies such as virtio-user are recommended instead.
> > + The KNI kernel module and library will be removed from DPDK 23.11,
> > + following the DPDK technical board
> > + `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> > + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
> > + The first steps are to add deprecation warnings
> > + and to remove the example application from 22.11.
> > +
>
> I wonder whether having this done as bullet points in chronological order
> might be clearer. Something like:
>
> * kni: The KNI kernel module and library are not recommended for use by new
> applications - other technologies such as virtio-user are recommended instead.
> Following the DPDK technical board
> `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_:
> * The KNI example application will be removed from DPDK 22.11 release
> * The KNI kernel module and library will be removed from the DPDK 23.11
> release
Yes I prefer your version. Bullets are always better :)
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4] doc: announce KNI deprecation
2022-07-14 9:20 0% ` Bruce Richardson
2022-07-14 10:07 0% ` Thomas Monjalon
@ 2022-07-14 14:50 0% ` Ferruh Yigit
2022-07-14 15:03 0% ` Ferruh Yigit
1 sibling, 1 reply; 200+ results
From: Ferruh Yigit @ 2022-07-14 14:50 UTC (permalink / raw)
To: Bruce Richardson, Thomas Monjalon, Mcnamara, John
Cc: dev, david.marchand, andrew.rybchenko, maxime.coquelin,
chenbo.xia, mdr, olivier.matz, jerinj
On 7/14/2022 10:20 AM, Bruce Richardson wrote:
> On Wed, Jul 13, 2022 at 06:10:47PM +0200, Thomas Monjalon wrote:
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>>
>> Announce the deprecation plan for KNI kernel module, library and example.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>> ---
>> Squashed and updated 2 deprecations:
>> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
>> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
>> ---
>
> One suggestion below.
> With corrected link and with/without suggested change:
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
>> doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
>> doc/guides/rel_notes/deprecation.rst | 9 +++++++++
>> 2 files changed, 12 insertions(+)
>>
>> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
>> index e021cc69b6..03b5bca958 100644
>> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
>> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
>> @@ -8,6 +8,9 @@ Kernel NIC Interface
>>
>> .. note::
>>
>> + KNI is deprecated and will be removed in future.
>> + See :doc:`../rel_notes/deprecation`.
>> +
>> For an alternative to KNI, that does not require any out-of-tree Linux kernel modules,
>> or a custom library, see :ref:`virtio_user_as_exception_path`.
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>> index 4e5b23c53d..e54597c591 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -48,6 +48,15 @@ Deprecation Notices
>> in the header will not be considered as ABI anymore. This change is inspired
>> by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
>>
>> +* kni: The KNI kernel module and library are not recommended for use by new
>> + applications - other technologies such as virtio-user are recommended instead.
>> + The KNI kernel module and library will be removed from DPDK 23.11,
>> + following the DPDK technical board
>> + `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
>> + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
>> + The first steps are to add deprecation warnings
>> + and to remove the example application from 22.11.
>> +
>
> I wonder whether having this done as bullet points in chronological order
> might be clearer. Something like:
>
> * kni: The KNI kernel module and library are not recommended for use by new
> applications - other technologies such as virtio-user are recommended instead.
> Following the DPDK technical board
> `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_:
> * The KNI example application will be removed from DPDK 22.11 release
> * The KNI kernel module and library will be removed from the DPDK 23.11
> release
+1 to list actions in chronological order
I have a concern with removing sample application without replacing one
with alternate methods: virtio-user and tun/tap.
It is easy to create a virtio-user PMD by testpmd or any sample
application, and as far as I understand Bruce already documented this.
But for many KNI users they are not using KNI PMD, so replacing KNI with
this new method may require some hand holding.
One option can be hotplug the virtio-user PMD and use the port_id for
packet forwarding, and I don't know if the PMD has APIs that
applications can use directly, as done in KNI, @Maxime & @Chenbo can
answer this better.
It can be good to have a sample application for above before deprecating
the KNI sample application.
And same sample can use tun/tap PMD with a runtime parameter, to show
how other example can be used, again tap can be used as tap PMD or Linux
tun/tap APIs.
Question is who can work on such a sample, but if we can find some
resource I am for having a replacement exception path sample app before
deprecating KNI.
Thanks,
ferruh
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4] doc: announce KNI deprecation
2022-07-14 14:50 0% ` Ferruh Yigit
@ 2022-07-14 15:03 0% ` Ferruh Yigit
2022-07-15 15:32 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2022-07-14 15:03 UTC (permalink / raw)
To: Bruce Richardson, Thomas Monjalon, Mcnamara, John
Cc: dev, david.marchand, andrew.rybchenko, maxime.coquelin,
chenbo.xia, mdr, olivier.matz, jerinj
On 7/14/2022 3:50 PM, Ferruh Yigit wrote:
> On 7/14/2022 10:20 AM, Bruce Richardson wrote:
>> On Wed, Jul 13, 2022 at 06:10:47PM +0200, Thomas Monjalon wrote:
>>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>>>
>>> Announce the deprecation plan for KNI kernel module, library and
>>> example.
>>>
>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>> ---
>>> Squashed and updated 2 deprecations:
>>> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
>>> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
>>> ---
>>
>> One suggestion below.
>> With corrected link and with/without suggested change:
>>
>> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>>
>>> doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
>>> doc/guides/rel_notes/deprecation.rst | 9 +++++++++
>>> 2 files changed, 12 insertions(+)
>>>
>>> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst
>>> b/doc/guides/prog_guide/kernel_nic_interface.rst
>>> index e021cc69b6..03b5bca958 100644
>>> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
>>> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
>>> @@ -8,6 +8,9 @@ Kernel NIC Interface
>>> .. note::
>>> + KNI is deprecated and will be removed in future.
>>> + See :doc:`../rel_notes/deprecation`.
>>> +
>>> For an alternative to KNI, that does not require any out-of-tree
>>> Linux kernel modules,
>>> or a custom library, see :ref:`virtio_user_as_exception_path`.
>>> diff --git a/doc/guides/rel_notes/deprecation.rst
>>> b/doc/guides/rel_notes/deprecation.rst
>>> index 4e5b23c53d..e54597c591 100644
>>> --- a/doc/guides/rel_notes/deprecation.rst
>>> +++ b/doc/guides/rel_notes/deprecation.rst
>>> @@ -48,6 +48,15 @@ Deprecation Notices
>>> in the header will not be considered as ABI anymore. This change
>>> is inspired
>>> by the RFC
>>> https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
>>> +* kni: The KNI kernel module and library are not recommended for use
>>> by new
>>> + applications - other technologies such as virtio-user are
>>> recommended instead.
>>> + The KNI kernel module and library will be removed from DPDK 23.11,
>>> + following the DPDK technical board
>>> + `decision
>>> <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
>>> + and `refinement
>>> <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
>>> + The first steps are to add deprecation warnings
>>> + and to remove the example application from 22.11.
>>> +
>>
>> I wonder whether having this done as bullet points in chronological order
>> might be clearer. Something like:
>>
>> * kni: The KNI kernel module and library are not recommended for use
>> by new
>> applications - other technologies such as virtio-user are
>> recommended instead.
>> Following the DPDK technical board
>> `decision
>> <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
>> and `refinement
>> <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_:
>> * The KNI example application will be removed from DPDK 22.11 release
>> * The KNI kernel module and library will be removed from the DPDK
>> 23.11
>> release
>
> +1 to list actions in chronological order
>
> I have a concern with removing sample application without replacing one
> with alternate methods: virtio-user and tun/tap.
>
> It is easy to create a virtio-user PMD by testpmd or any sample
> application, and as far as I understand Bruce already documented this.
> But for many KNI users they are not using KNI PMD, so replacing KNI with
> this new method may require some hand holding.
As mentioned KNI PMD, it also should be removed when library and module
are removed, may be good to list above to be explicit.
> One option can be hotplug the virtio-user PMD and use the port_id for
> packet forwarding, and I don't know if the PMD has APIs that
> applications can use directly, as done in KNI, @Maxime & @Chenbo can
> answer this better.
>
> It can be good to have a sample application for above before deprecating
> the KNI sample application.
> And same sample can use tun/tap PMD with a runtime parameter, to show
> how other example can be used, again tap can be used as tap PMD or Linux
> tun/tap APIs.
>
> Question is who can work on such a sample, but if we can find some
> resource I am for having a replacement exception path sample app before
> deprecating KNI.
>
> Thanks,
> ferruh
>
>
>
^ permalink raw reply [relevance 0%]
* RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
@ 2022-07-14 16:57 4% ` Van Haaren, Harry
2022-07-15 8:13 0% ` Mattias Rönnblom
2022-07-17 12:38 0% ` Thomas Monjalon
0 siblings, 2 replies; 200+ results
From: Van Haaren, Harry @ 2022-07-14 16:57 UTC (permalink / raw)
To: Pavan Nikhilesh Bhagavatula, mattias.ronnblom, Thomas Monjalon
Cc: Jerin Jacob Kollanukkaran, Ray Kinsella, dev, McDaniel, Timothy,
Hemant Agrawal, sachin.saxena, liangma, Mccarthy, Peter,
Carrillo, Erik G, Gujjar, Abhinandan S, Jayatheerthan, Jay,
Burakov, Anatoly
> -----Original Message-----
> From: Van Haaren, Harry
> Sent: Thursday, July 14, 2022 5:54 PM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; mattias.ronnblom
> <mattias.ronnblom@ericsson.com>; Thomas Monjalon <thomas@monjalon.net>
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ray Kinsella <mdr@ashroe.eu>;
> dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>; Hemant
> Agrawal <hemant.agrawal@nxp.com>; sachin.saxena@oss.nxp.com;
> liangma@liangbit.com; Mccarthy, Peter <Peter.Mccarthy@intel.com>; Carrillo, Erik
> G <Erik.G.Carrillo@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>;
> Burakov, Anatoly <anatoly.burakov@intel.com>
> Subject: RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
>
> > -----Original Message-----
> > From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> > Sent: Thursday, July 14, 2022 5:42 PM
> > To: mattias.ronnblom <mattias.ronnblom@ericsson.com>; Thomas Monjalon
> > <thomas@monjalon.net>
> > Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ray Kinsella
> <mdr@ashroe.eu>;
> > dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>; Hemant
> > Agrawal <hemant.agrawal@nxp.com>; sachin.saxena@oss.nxp.com;
> > liangma@liangbit.com; Mccarthy, Peter <peter.mccarthy@intel.com>; Van
> Haaren,
> > Harry <harry.van.haaren@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>;
> > Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> > <jay.jayatheerthan@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>
> > Subject: RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
>
> <snip old conversation>
>
> > > >> If the underlying hardware has some limitations,
> > > >> why not let the driver loop until back pressure occurs? Then you can
> > >
> > > You didn't answer this question. Why not let the driver loop, until you
> > > for some reason or the other can't accept more events?
> >
> > CNXK event driver cannot accept forwarding(enq) more than one event that has
> > been dequeued. Enqueueing more than one event for forwarding/releasing
> > is a violation from HW perspective, this is currently announced by BURST
> capability.
> > But It can enqueue a burst if new events.
>
> Can't the driver just backpressure NEW events? that's what the event/sw driver
> does in order to limit "new" inflight events. App attempts to enq FWD/REL, no
> problem. App enqueues burst of NEW (and there's only N spaces) then the
> first N events pass, and the rest are returned to the application.
>
> > If you see the current example implementation we pick the worker based on
> > BURST capability for optimizing the enqueue/dequeue by providing a hint
> > to the driver layer.
>
> Please provide a link to the code? Others are not familiar with the CNXK driver,
> or the sample code you're referring to...
>
>
> > Although, we could live with aggregating the events at driver layer based on
> > queue. We would still require announce burst capability for new events i.e.
> > changes to the info structure.
>
> As per above, I still don't see a reason why this HW optimization/limitation
> needs to be pushed to the application layer. Why can the driver not handle
> things by allowing/backpressure to the events it can/can't handle?
>
>
> In this email thread[1] you've suggested reworking the rx_burst API with a
> flag to indicate "same destination". This still pushes the problem to the application,
> and exposes more HW/PMD specific options. This impl is *slightly* better because it
> wont' require new APIs for each mode, but also *breaks all existing apps*!?
>
> I'm just not understanding why the application needs to change, and why it
> cannot be optimized/handled in the driver layer.
>
> [1] http://mails.dpdk.org/archives/dev/2022-July/246717.html
>
> <snip old conversation>
Let me be very clear, but also try to help here;
I'm not in favour of the changes as proposed here, and feel that pushing
the problem to Application API is NOT the right solution.
But *just in case* there is a *genuine* reason that we need an API/ABI
change, and that can be justified clearly in the upcoming weeks, then I'd
prefer not have problems with the deprecation notice not being included.
This Ack is *only* to allow possible API/ABI changes in 22.11, and not for
the proposal above.
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
^ permalink raw reply [relevance 4%]
* Re: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
2022-07-14 16:57 4% ` Van Haaren, Harry
@ 2022-07-15 8:13 0% ` Mattias Rönnblom
2022-07-17 12:38 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Mattias Rönnblom @ 2022-07-15 8:13 UTC (permalink / raw)
To: Van Haaren, Harry, Pavan Nikhilesh Bhagavatula, Thomas Monjalon
Cc: Jerin Jacob Kollanukkaran, Ray Kinsella, dev, McDaniel, Timothy,
Hemant Agrawal, sachin.saxena, liangma, Mccarthy, Peter,
Carrillo, Erik G, Gujjar, Abhinandan S, Jayatheerthan, Jay,
Burakov, Anatoly
On 2022-07-14 18:57, Van Haaren, Harry wrote:
>> -----Original Message-----
>> From: Van Haaren, Harry
>> Sent: Thursday, July 14, 2022 5:54 PM
>> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; mattias.ronnblom
>> <mattias.ronnblom@ericsson.com>; Thomas Monjalon <thomas@monjalon.net>
>> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ray Kinsella <mdr@ashroe.eu>;
>> dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>; Hemant
>> Agrawal <hemant.agrawal@nxp.com>; sachin.saxena@oss.nxp.com;
>> liangma@liangbit.com; Mccarthy, Peter <Peter.Mccarthy@intel.com>; Carrillo, Erik
>> G <Erik.G.Carrillo@intel.com>; Gujjar, Abhinandan S
>> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>;
>> Burakov, Anatoly <anatoly.burakov@intel.com>
>> Subject: RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
>>
>>> -----Original Message-----
>>> From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
>>> Sent: Thursday, July 14, 2022 5:42 PM
>>> To: mattias.ronnblom <mattias.ronnblom@ericsson.com>; Thomas Monjalon
>>> <thomas@monjalon.net>
>>> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ray Kinsella
>> <mdr@ashroe.eu>;
>>> dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>; Hemant
>>> Agrawal <hemant.agrawal@nxp.com>; sachin.saxena@oss.nxp.com;
>>> liangma@liangbit.com; Mccarthy, Peter <peter.mccarthy@intel.com>; Van
>> Haaren,
>>> Harry <harry.van.haaren@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>;
>>> Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
>>> <jay.jayatheerthan@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>
>>> Subject: RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
>>
>> <snip old conversation>
>>
>>>>>> If the underlying hardware has some limitations,
>>>>>> why not let the driver loop until back pressure occurs? Then you can
>>>>
>>>> You didn't answer this question. Why not let the driver loop, until you
>>>> for some reason or the other can't accept more events?
>>>
>>> CNXK event driver cannot accept forwarding(enq) more than one event that has
>>> been dequeued. Enqueueing more than one event for forwarding/releasing
>>> is a violation from HW perspective, this is currently announced by BURST
>> capability.
>>> But It can enqueue a burst if new events.
>>
>> Can't the driver just backpressure NEW events? that's what the event/sw driver
>> does in order to limit "new" inflight events. App attempts to enq FWD/REL, no
>> problem. App enqueues burst of NEW (and there's only N spaces) then the
>> first N events pass, and the rest are returned to the application.
>>
>>> If you see the current example implementation we pick the worker based on
>>> BURST capability for optimizing the enqueue/dequeue by providing a hint
>>> to the driver layer.
>>
>> Please provide a link to the code? Others are not familiar with the CNXK driver,
>> or the sample code you're referring to...
>>
>>
>>> Although, we could live with aggregating the events at driver layer based on
>>> queue. We would still require announce burst capability for new events i.e.
>>> changes to the info structure.
>>
>> As per above, I still don't see a reason why this HW optimization/limitation
>> needs to be pushed to the application layer. Why can the driver not handle
>> things by allowing/backpressure to the events it can/can't handle?
>>
>>
>> In this email thread[1] you've suggested reworking the rx_burst API with a
>> flag to indicate "same destination". This still pushes the problem to the application,
>> and exposes more HW/PMD specific options. This impl is *slightly* better because it
>> wont' require new APIs for each mode, but also *breaks all existing apps*!?
>>
>> I'm just not understanding why the application needs to change, and why it
>> cannot be optimized/handled in the driver layer.
>>
>> [1] https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-e92a9cef34b4dac6&q=1&e=fb252b76-35e7-4476-b756-c64849e9bf54&u=http%3A%2F%2Fmails.dpdk.org%2Farchives%2Fdev%2F2022-July%2F246717.html
>>
>> <snip old conversation>
>
>
> Let me be very clear, but also try to help here;
> I'm not in favour of the changes as proposed here, and feel that pushing
> the problem to Application API is NOT the right solution.
>
> But *just in case* there is a *genuine* reason that we need an API/ABI
> change, and that can be justified clearly in the upcoming weeks, then I'd
> prefer not have problems with the deprecation notice not being included.
Quantifying the performance benefits would be helpful, I think.
>
> This Ack is *only* to allow possible API/ABI changes in 22.11, and not for
> the proposal above.
>
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
>
^ permalink raw reply [relevance 0%]
* [PATCH v11] sched: enable CMAN at runtime
2022-07-08 14:22 1% ` [PATCH v10] sched: enable CMAN at runtime Marcin Danilewicz
@ 2022-07-15 14:51 1% ` Marcin Danilewicz
2022-07-26 13:49 0% ` Singh, Jasvinder
0 siblings, 1 reply; 200+ results
From: Marcin Danilewicz @ 2022-07-15 14:51 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
Log: v2 change in rte_sched.h to avoid ABI breakage.
v3 changes from comments
v4 rebase to 22.07-rc1
v5 rebase to main latest
v6 commit message fixed
v7 changes from comments
v8 with changes from comments
v9 changes from comments
tmgr.c
cman_params set to null
qos_sched/cfg_file.c
removed redundant cman_params to NULL assignement
subport_params[].cman_params assigned
only when CMAN enabled
v10 removed ip_pipeline app build error from change
in tmgr.c
v11 added cman_enabled flag instead
of testing cman_params.cman_mode variable
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 75 +-----------
examples/qos_sched/cfg_file.c | 51 ++------
examples/qos_sched/cfg_file.h | 5 -
examples/qos_sched/init.c | 76 +-----------
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 135 +--------------------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 47 +-------
11 files changed, 300 insertions(+), 391 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 46549cb062..ae56a86394 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-// RTE_SCHED_CMAN is not set
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3e4bed81e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-#define WRED_SUPPORTED 1
-#else
#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..2432b56aee 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,77 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
-static struct rte_sched_cman_params cman_params = {
- .red_params = {
- /* Traffic Class 0 Colors Green / Yellow / Red */
- [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 1 - Colors Green / Yellow / Red */
- [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 2 - Colors Green / Yellow / Red */
- [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 3 - Colors Green / Yellow / Red */
- [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 4 - Colors Green / Yellow / Red */
- [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 5 - Colors Green / Yellow / Red */
- [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 6 - Colors Green / Yellow / Red */
- [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 7 - Colors Green / Yellow / Red */
- [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 8 - Colors Green / Yellow / Red */
- [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 9 - Colors Green / Yellow / Red */
- [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 10 - Colors Green / Yellow / Red */
- [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 11 - Colors Green / Yellow / Red */
- [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 12 - Colors Green / Yellow / Red */
- [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- },
-};
-#endif /* RTE_SCHED_CMAN */
-
static uint32_t n_pipe_profiles;
static const struct rte_sched_subport_params subport_params_default = {
@@ -96,9 +25,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..3d5d75fcf0 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -23,6 +23,8 @@
uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
uint32_t n_active_queues;
+struct rte_sched_cman_params cman_params;
+
int
cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params)
{
@@ -229,43 +231,10 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p)
-{
- int j, k;
- subport_p->cman_params->cman_mode = cman_p.cman_mode;
-
- for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
- if (subport_p->cman_params->cman_mode ==
- RTE_SCHED_CMAN_RED) {
- for (k = 0; k < RTE_COLORS; k++) {
- subport_p->cman_params->red_params[j][k].min_th =
- cman_p.red_params[j][k].min_th;
- subport_p->cman_params->red_params[j][k].max_th =
- cman_p.red_params[j][k].max_th;
- subport_p->cman_params->red_params[j][k].maxp_inv =
- cman_p.red_params[j][k].maxp_inv;
- subport_p->cman_params->red_params[j][k].wq_log2 =
- cman_p.red_params[j][k].wq_log2;
- }
- } else {
- subport_p->cman_params->pie_params[j].qdelay_ref =
- cman_p.pie_params[j].qdelay_ref;
- subport_p->cman_params->pie_params[j].dp_update_interval =
- cman_p.pie_params[j].dp_update_interval;
- subport_p->cman_params->pie_params[j].max_burst =
- cman_p.pie_params[j].max_burst;
- subport_p->cman_params->pie_params[j].tailq_th =
- cman_p.pie_params[j].tailq_th;
- }
- }
-}
-#endif
-
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
{
+ bool cman_enabled = false;
const char *entry;
int i, j, k;
@@ -276,14 +245,9 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
- struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = { },
- };
-
if (rte_cfgfile_has_section(cfg, "red")) {
cman_params.cman_mode = RTE_SCHED_CMAN_RED;
+ cman_enabled = true;
for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) {
char str[32];
@@ -353,6 +317,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
if (rte_cfgfile_has_section(cfg, "pie")) {
cman_params.cman_mode = RTE_SCHED_CMAN_PIE;
+ cman_enabled = true;
for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) {
char str[32];
@@ -387,7 +352,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +429,8 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
- set_subport_cman_params(subport_params+i, cman_params);
-#endif
+ if (cman_enabled)
+ subport_params[i].cman_params = &cman_params;
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..0dc458aa71 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,11 +12,6 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
-void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
- struct rte_sched_cman_params cman_p);
-#endif
-
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
int cfg_load_subport_profile(struct rte_cfgfile *cfg,
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..e8b819ffb9 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,78 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
-struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
- .red_params = {
- /* Traffic Class 0 Colors Green / Yellow / Red */
- [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 1 - Colors Green / Yellow / Red */
- [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 2 - Colors Green / Yellow / Red */
- [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 3 - Colors Green / Yellow / Red */
- [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 4 - Colors Green / Yellow / Red */
- [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 5 - Colors Green / Yellow / Red */
- [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 6 - Colors Green / Yellow / Red */
- [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 7 - Colors Green / Yellow / Red */
- [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 8 - Colors Green / Yellow / Red */
- [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 9 - Colors Green / Yellow / Red */
- [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 10 - Colors Green / Yellow / Red */
- [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 11 - Colors Green / Yellow / Red */
- [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
-
- /* Traffic Class 12 - Colors Green / Yellow / Red */
- [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
- },
-};
-#endif /* RTE_SCHED_CMAN */
-
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
.n_pipes_per_subport_enabled = 4096,
@@ -281,9 +209,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
- .cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
+ .cman_params = NULL,
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..c9ec187c93 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -73,137 +73,4 @@ tc period = 40 ; Milliseconds
tc 12 oversubscription weight = 1
-tc 12 wrr weights = 1 1 1 1
-
-; RED params per traffic class and color (Green / Yellow / Red)
-;[red]
-;tc 0 wred min = 48 40 32
-;tc 0 wred max = 64 64 64
-;tc 0 wred inv prob = 10 10 10
-;tc 0 wred weight = 9 9 9
-
-;tc 1 wred min = 48 40 32
-;tc 1 wred max = 64 64 64
-;tc 1 wred inv prob = 10 10 10
-;tc 1 wred weight = 9 9 9
-
-;tc 2 wred min = 48 40 32
-;tc 2 wred max = 64 64 64
-;tc 2 wred inv prob = 10 10 10
-;tc 2 wred weight = 9 9 9
-
-;tc 3 wred min = 48 40 32
-;tc 3 wred max = 64 64 64
-;tc 3 wred inv prob = 10 10 10
-;tc 3 wred weight = 9 9 9
-
-;tc 4 wred min = 48 40 32
-;tc 4 wred max = 64 64 64
-;tc 4 wred inv prob = 10 10 10
-;tc 4 wred weight = 9 9 9
-
-;tc 5 wred min = 48 40 32
-;tc 5 wred max = 64 64 64
-;tc 5 wred inv prob = 10 10 10
-;tc 5 wred weight = 9 9 9
-
-;tc 6 wred min = 48 40 32
-;tc 6 wred max = 64 64 64
-;tc 6 wred inv prob = 10 10 10
-;tc 6 wred weight = 9 9 9
-
-;tc 7 wred min = 48 40 32
-;tc 7 wred max = 64 64 64
-;tc 7 wred inv prob = 10 10 10
-;tc 7 wred weight = 9 9 9
-
-;tc 8 wred min = 48 40 32
-;tc 8 wred max = 64 64 64
-;tc 8 wred inv prob = 10 10 10
-;tc 8 wred weight = 9 9 9
-
-;tc 9 wred min = 48 40 32
-;tc 9 wred max = 64 64 64
-;tc 9 wred inv prob = 10 10 10
-;tc 9 wred weight = 9 9 9
-
-;tc 10 wred min = 48 40 32
-;tc 10 wred max = 64 64 64
-;tc 10 wred inv prob = 10 10 10
-;tc 10 wred weight = 9 9 9
-
-;tc 11 wred min = 48 40 32
-;tc 11 wred max = 64 64 64
-;tc 11 wred inv prob = 10 10 10
-;tc 11 wred weight = 9 9 9
-
-;tc 12 wred min = 48 40 32
-;tc 12 wred max = 64 64 64
-;tc 12 wred inv prob = 10 10 10
-;tc 12 wred weight = 9 9 9
-
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+tc 12 wrr weights = 1 1 1 1
\ No newline at end of file
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 599c7e9536..c5fa9e4582 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1084,7 +1080,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1166,7 +1161,6 @@ rte_sched_cman_config(struct rte_sched_port *port,
return -EINVAL;
}
-#endif
int
rte_sched_subport_tc_ov_config(struct rte_sched_port *port,
@@ -1285,7 +1279,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
/* TC oversubscription is enabled by default */
s->tc_ov_enabled = 1;
-#ifdef RTE_SCHED_CMAN
if (params->cman_params != NULL) {
s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
@@ -1297,7 +1290,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
} else {
s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1823,7 +1815,7 @@ rte_sched_port_update_subport_stats_on_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
uint32_t tc_index = rte_sched_port_pipe_tc(port, qindex);
uint32_t pkt_len = pkt->pkt_len;
@@ -1849,21 +1841,17 @@ static inline void
rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
uint32_t pkt_len = pkt->pkt_len;
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1908,13 +1896,11 @@ static inline void
rte_sched_port_red_set_queue_empty_timestamp(struct rte_sched_port *port,
struct rte_sched_subport *subport, uint32_t qindex)
{
- if (subport->cman_enabled) {
+ if (subport->cman_enabled && subport->cman == RTE_SCHED_CMAN_RED) {
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
- if (subport->cman == RTE_SCHED_CMAN_RED) {
- struct rte_red *red = &qe->red;
+ struct rte_red *red = &qe->red;
- rte_red_mark_queue_empty(red, port->time);
- }
+ rte_red_mark_queue_empty(red, port->time);
}
}
@@ -1933,29 +1919,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
--
2.25.1
^ permalink raw reply [relevance 1%]
* Re: [PATCH v4] doc: announce KNI deprecation
2022-07-14 15:03 0% ` Ferruh Yigit
@ 2022-07-15 15:32 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-15 15:32 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Bruce Richardson, Mcnamara, John, dev, david.marchand,
andrew.rybchenko, maxime.coquelin, chenbo.xia, mdr, olivier.matz,
jerinj
14/07/2022 17:03, Ferruh Yigit:
> On 7/14/2022 3:50 PM, Ferruh Yigit wrote:
> > On 7/14/2022 10:20 AM, Bruce Richardson wrote:
> >> On Wed, Jul 13, 2022 at 06:10:47PM +0200, Thomas Monjalon wrote:
> >>> From: Ferruh Yigit <ferruh.yigit@intel.com>
> >>>
> >>> Announce the deprecation plan for KNI kernel module, library and
> >>> example.
> >>>
> >>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >>> ---
> >>> Squashed and updated 2 deprecations:
> >>> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> >>> https://patches.dpdk.org/project/dpdk/patch/20211124171609.3101896-2-ferruh.yigit@intel.com/
> >>> ---
> >>
> >> One suggestion below.
> >> With corrected link and with/without suggested change:
> >>
> >> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> >>
> >>> doc/guides/prog_guide/kernel_nic_interface.rst | 3 +++
> >>> doc/guides/rel_notes/deprecation.rst | 9 +++++++++
> >>> 2 files changed, 12 insertions(+)
> >>>
> >>> diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst
> >>> b/doc/guides/prog_guide/kernel_nic_interface.rst
> >>> index e021cc69b6..03b5bca958 100644
> >>> --- a/doc/guides/prog_guide/kernel_nic_interface.rst
> >>> +++ b/doc/guides/prog_guide/kernel_nic_interface.rst
> >>> @@ -8,6 +8,9 @@ Kernel NIC Interface
> >>> .. note::
> >>> + KNI is deprecated and will be removed in future.
> >>> + See :doc:`../rel_notes/deprecation`.
> >>> +
> >>> For an alternative to KNI, that does not require any out-of-tree
> >>> Linux kernel modules,
> >>> or a custom library, see :ref:`virtio_user_as_exception_path`.
> >>> diff --git a/doc/guides/rel_notes/deprecation.rst
> >>> b/doc/guides/rel_notes/deprecation.rst
> >>> index 4e5b23c53d..e54597c591 100644
> >>> --- a/doc/guides/rel_notes/deprecation.rst
> >>> +++ b/doc/guides/rel_notes/deprecation.rst
> >>> @@ -48,6 +48,15 @@ Deprecation Notices
> >>> in the header will not be considered as ABI anymore. This change
> >>> is inspired
> >>> by the RFC
> >>> https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
> >>> +* kni: The KNI kernel module and library are not recommended for use
> >>> by new
> >>> + applications - other technologies such as virtio-user are
> >>> recommended instead.
> >>> + The KNI kernel module and library will be removed from DPDK 23.11,
> >>> + following the DPDK technical board
> >>> + `decision
> >>> <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> >>> + and `refinement
> >>> <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_.
> >>> + The first steps are to add deprecation warnings
> >>> + and to remove the example application from 22.11.
> >>> +
> >>
> >> I wonder whether having this done as bullet points in chronological order
> >> might be clearer. Something like:
> >>
> >> * kni: The KNI kernel module and library are not recommended for use
> >> by new
> >> applications - other technologies such as virtio-user are
> >> recommended instead.
> >> Following the DPDK technical board
> >> `decision
> >> <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_
> >> and `refinement
> >> <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_:
> >> * The KNI example application will be removed from DPDK 22.11 release
> >> * The KNI kernel module and library will be removed from the DPDK
> >> 23.11
> >> release
> >
> > +1 to list actions in chronological order
> >
> > I have a concern with removing sample application without replacing one
> > with alternate methods: virtio-user and tun/tap.
> >
> > It is easy to create a virtio-user PMD by testpmd or any sample
> > application, and as far as I understand Bruce already documented this.
> > But for many KNI users they are not using KNI PMD, so replacing KNI with
> > this new method may require some hand holding.
>
> As mentioned KNI PMD, it also should be removed when library and module
> are removed, may be good to list above to be explicit.
Yes I'm adding the PMD in removal list.
> > One option can be hotplug the virtio-user PMD and use the port_id for
> > packet forwarding, and I don't know if the PMD has APIs that
> > applications can use directly, as done in KNI, @Maxime & @Chenbo can
> > answer this better.
> >
> > It can be good to have a sample application for above before deprecating
> > the KNI sample application.
> > And same sample can use tun/tap PMD with a runtime parameter, to show
> > how other example can be used, again tap can be used as tap PMD or Linux
> > tun/tap APIs.
> >
> > Question is who can work on such a sample, but if we can find some
> > resource I am for having a replacement exception path sample app before
> > deprecating KNI.
We are not sure we'll have time and resource,
and it has not been discussed earlier.
Thus I'll consider having a replacement example as a nice-to-have.
I have to be a bit conservative with techboard decisions.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking bus object as internal
2022-06-30 9:41 8% [PATCH] doc: announce marking bus object as internal David Marchand
2022-06-30 9:54 0% ` Bruce Richardson
2022-07-04 14:29 0% ` Kevin Laatz
@ 2022-07-15 16:16 0% ` Thomas Monjalon
2 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-15 16:16 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Ray Kinsella
30/06/2022 11:41, David Marchand:
> rte_bus is unnecessarily exposed in the public API/ABI.
> Besides, we had cases where extending rte_bus was necessary.
> Announce that rte_bus will be made opaque in the public API and mark
> associated API as internal.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Applied, thanks.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce marking device and driver objects as internal
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
` (4 preceding siblings ...)
2022-07-12 8:24 0% ` Kevin Laatz
@ 2022-07-15 16:22 0% ` Thomas Monjalon
5 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-15 16:22 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Ray Kinsella
10/07/2022 08:17, David Marchand:
> rte_driver and rte_device are unnecessarily exposed in the public API/ABI.
> Announce that they will be made opaque in the public API and mark
> associated API as internal.
> This impacts all bus, as their driver registration mechanism will be
> made internal.
>
> Note: the PCI bus had a similar deprecation notice that we can remove as
> the new one is more generic.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Applied, thanks.
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4] doc: announce changes in bbdev related to enum extension
2022-07-05 15:45 0% ` Bruce Richardson
@ 2022-07-17 9:48 0% ` Thomas Monjalon
2 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-17 9:48 UTC (permalink / raw)
To: Nicolas Chautru
Cc: dev, gakhil, maxime.coquelin, trix, ray.kinsella,
bruce.richardson, hemant.agrawal, david.marchand, stephen
09/06/2022 02:34, Nicolas Chautru:
> Intent to resolve in DPDK 22.11 historical usage which prevents
> graceful extension of enum and API without troublesome ABI breakage
> as well as extending API RTE_BBDEV_OP_FFT for new operation type
> in bbdev as well as other new members in existing structures.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Improved links and applied, thanks.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] doc: announce support for MACsec in rte_security
2022-06-28 19:08 3% [PATCH] doc: announce support for MACsec in rte_security Akhil Goyal
2022-06-29 3:37 0% ` Hemant Agrawal
2022-06-29 7:40 0% ` Zhang, Roy Fan
@ 2022-07-17 9:56 0% ` Thomas Monjalon
2 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-17 9:56 UTC (permalink / raw)
To: Akhil Goyal
Cc: dev, david.marchand, hemant.agrawal, anoobj,
konstantin.v.ananyev, ferruh.yigit, andrew.rybchenko,
ndabilpuram, vattunuru, matan, roy.fan.zhang, jerinj, jiawenwu,
qiming.yang
28/06/2022 21:08, Akhil Goyal:
> MACsec support is planned for DPDK 22.11, which would
> result in ABI breakage in some of the rte_security structures.
> This patch is to give deprecation notice for the affected structures.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied, thanks.
^ permalink raw reply [relevance 0%]
* Re: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
2022-07-14 16:57 4% ` Van Haaren, Harry
2022-07-15 8:13 0% ` Mattias Rönnblom
@ 2022-07-17 12:38 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-17 12:38 UTC (permalink / raw)
To: Pavan Nikhilesh Bhagavatula, Van Haaren, Harry
Cc: mattias. ronnblom, dev, Jerin Jacob Kollanukkaran, Ray Kinsella,
dev, McDaniel, Timothy, Hemant Agrawal, sachin.saxena, liangma,
Mccarthy, Peter, Carrillo, Erik G, Gujjar, Abhinandan S,
Jayatheerthan, Jay, Burakov, Anatoly
14/07/2022 18:57, Van Haaren, Harry:
> > -----Original Message-----
> > From: Van Haaren, Harry
> > Sent: Thursday, July 14, 2022 5:54 PM
> > To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; mattias.ronnblom
> > <mattias.ronnblom@ericsson.com>; Thomas Monjalon <thomas@monjalon.net>
> > Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ray Kinsella <mdr@ashroe.eu>;
> > dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>; Hemant
> > Agrawal <hemant.agrawal@nxp.com>; sachin.saxena@oss.nxp.com;
> > liangma@liangbit.com; Mccarthy, Peter <Peter.Mccarthy@intel.com>; Carrillo, Erik
> > G <Erik.G.Carrillo@intel.com>; Gujjar, Abhinandan S
> > <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>;
> > Burakov, Anatoly <anatoly.burakov@intel.com>
> > Subject: RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
> >
> > > -----Original Message-----
> > > From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> > > Sent: Thursday, July 14, 2022 5:42 PM
> > > To: mattias.ronnblom <mattias.ronnblom@ericsson.com>; Thomas Monjalon
> > > <thomas@monjalon.net>
> > > Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ray Kinsella
> > <mdr@ashroe.eu>;
> > > dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>; Hemant
> > > Agrawal <hemant.agrawal@nxp.com>; sachin.saxena@oss.nxp.com;
> > > liangma@liangbit.com; Mccarthy, Peter <peter.mccarthy@intel.com>; Van
> > Haaren,
> > > Harry <harry.van.haaren@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>;
> > > Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> > > <jay.jayatheerthan@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>
> > > Subject: RE: [EXT] Re: [PATCH 1/2] doc: add enqueue depth for new event type
> >
> > <snip old conversation>
> >
> > > > >> If the underlying hardware has some limitations,
> > > > >> why not let the driver loop until back pressure occurs? Then you can
> > > >
> > > > You didn't answer this question. Why not let the driver loop, until you
> > > > for some reason or the other can't accept more events?
> > >
> > > CNXK event driver cannot accept forwarding(enq) more than one event that has
> > > been dequeued. Enqueueing more than one event for forwarding/releasing
> > > is a violation from HW perspective, this is currently announced by BURST
> > capability.
> > > But It can enqueue a burst if new events.
> >
> > Can't the driver just backpressure NEW events? that's what the event/sw driver
> > does in order to limit "new" inflight events. App attempts to enq FWD/REL, no
> > problem. App enqueues burst of NEW (and there's only N spaces) then the
> > first N events pass, and the rest are returned to the application.
> >
> > > If you see the current example implementation we pick the worker based on
> > > BURST capability for optimizing the enqueue/dequeue by providing a hint
> > > to the driver layer.
> >
> > Please provide a link to the code? Others are not familiar with the CNXK driver,
> > or the sample code you're referring to...
> >
> >
> > > Although, we could live with aggregating the events at driver layer based on
> > > queue. We would still require announce burst capability for new events i.e.
> > > changes to the info structure.
> >
> > As per above, I still don't see a reason why this HW optimization/limitation
> > needs to be pushed to the application layer. Why can the driver not handle
> > things by allowing/backpressure to the events it can/can't handle?
> >
> >
> > In this email thread[1] you've suggested reworking the rx_burst API with a
> > flag to indicate "same destination". This still pushes the problem to the application,
> > and exposes more HW/PMD specific options. This impl is *slightly* better because it
> > wont' require new APIs for each mode, but also *breaks all existing apps*!?
> >
> > I'm just not understanding why the application needs to change, and why it
> > cannot be optimized/handled in the driver layer.
> >
> > [1] http://mails.dpdk.org/archives/dev/2022-July/246717.html
> >
> > <snip old conversation>
>
>
> Let me be very clear, but also try to help here;
> I'm not in favour of the changes as proposed here, and feel that pushing
> the problem to Application API is NOT the right solution.
>
> But *just in case* there is a *genuine* reason that we need an API/ABI
> change, and that can be justified clearly in the upcoming weeks, then I'd
> prefer not have problems with the deprecation notice not being included.
>
> This Ack is *only* to allow possible API/ABI changes in 22.11, and not for
> the proposal above.
>
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
It doesn't make sense to add a deprecation notice
if the direction is not agreed.
Let's discuss further and ask for techboard help if needed.
In general, I would not be surprised that it's time for a cleanup in this API.
^ permalink raw reply [relevance 0%]
* DPDK 22.07 released
@ 2022-07-17 23:00 3% Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-17 23:00 UTC (permalink / raw)
To: announce
A new release is available:
https://fast.dpdk.org/rel/dpdk-22.07.tar.xz
This Summer release is quite small:
1021 commits from 177 authors
1149 files changed, 77256 insertions(+), 26288 deletions(-)
It is not planned to start a maintenance branch for 22.07.
This version is ABI-compatible with 21.11 and 22.03.
Below are some new features:
- initial RISC-V support
- sequence lock
- protocol-based metering
- Rx threshold event
- SFP telemetry
- async vhost improvements
- vhost library statistics
- vmxnet3 versions 5 & 6
- ECDH crypto
- eventdev runtime attributes
- DMA device telemetry
- SWX pipeline improvements
- integration as Meson subproject
More details in the release notes:
https://doc.dpdk.org/guides/rel_notes/release_22_03.html
Note: GCC 12 may emit some warnings, some fixes are missing.
There are 44 new contributors (including authors, reviewers and testers).
Welcome to Abdullah Ömer Yamaç, Abhimanyu Saini, Bassam Zaid AlKilani,
Damodharam Ammepalli, Deepak Khandelwal, Diana Wang, Don Wallwork,
Duncan Bellamy, Ferdinand Thiessen, Fidaullah Noonari, Frank Zhao,
Hanumanth Pothula, Heinrich Schuchardt, Hernan Vargas, Jakub Wysocki,
Jin Liu, Jiri Slaby, Ke Zhang, Kent Wires, Marcin Danilewicz,
Michael Rossberg, Michal Mazurek, Mike Pattrick, Mingxia Liu,
Niklas Söderlund, Omar Awaysa, Peng Zhang, Quentin Armitage,
Richard Donkin, Romain Delhomel, Sam Grove, Spike Du, Subendu Santra,
Tianhao Chai, Veerasenareddy Burru, Walter Heymans, Weiyuan Li,
Wenjing Qiao, Xiangjun Meng, Xu Ting, Yinjun Zhang, Yong Xu,
Zhichao Zeng and Zhipeng Lu.
Below is the number of commits per employer (with authors count):
299 Intel (56)
224 Marvell (31)
114 NVIDIA (22)
82 Huawei (7)
65 Red Hat (3)
35 NXP (4)
29 Microsoft (3)
26 Broadcom (5)
23 Semihalf (4)
20 Corigine (5)
18 Trustnet (1)
...
A big thank to all courageous people who took on the non rewarding task
of reviewing other's job.
Based on Reviewed-by and Acked-by tags, the top non-PMD reviewers are:
54 Akhil Goyal <gakhil@marvell.com>
52 Fan Zhang <roy.fan.zhang@intel.com>
42 Jerin Jacob <jerinj@marvell.com>
35 Chenbo Xia <chenbo.xia@intel.com>
34 Maxime Coquelin <maxime.coquelin@redhat.com>
28 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
23 Matan Azrad <matan@nvidia.com>
21 Bruce Richardson <bruce.richardson@intel.com>
20 Qi Zhang <qi.z.zhang@intel.com>
20 Ferruh Yigit <ferruh.yigit@xilinx.com>
19 Morten Brørup <mb@smartsharesystems.com>
19 Anoob Joseph <anoobj@marvell.com>
Next version will be 22.11 in November.
The new features for 22.11 can be submitted during the next 4 weeks:
http://core.dpdk.org/roadmap#dates
Please share your roadmap.
Thanks everyone
^ permalink raw reply [relevance 3%]
* DPDK 22.07 released
@ 2022-07-17 23:03 3% Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-17 23:03 UTC (permalink / raw)
To: announce
A new release is available:
https://fast.dpdk.org/rel/dpdk-22.07.tar.xz
This Summer release is quite small:
1021 commits from 177 authors
1149 files changed, 77256 insertions(+), 26288 deletions(-)
It is not planned to start a maintenance branch for 22.07.
This version is ABI-compatible with 21.11 and 22.03.
Below are some new features:
- initial RISC-V support
- sequence lock
- protocol-based metering
- Rx threshold event
- SFP telemetry
- async vhost improvements
- vhost library statistics
- vmxnet3 versions 5 & 6
- ECDH crypto
- eventdev runtime attributes
- DMA device telemetry
- SWX pipeline improvements
- integration as Meson subproject
More details in the release notes:
https://doc.dpdk.org/guides/rel_notes/release_22_07.html
Note: GCC 12 may emit some warnings, some fixes are missing.
There are 44 new contributors (including authors, reviewers and testers).
Welcome to Abdullah Ömer Yamaç, Abhimanyu Saini, Bassam Zaid AlKilani,
Damodharam Ammepalli, Deepak Khandelwal, Diana Wang, Don Wallwork,
Duncan Bellamy, Ferdinand Thiessen, Fidaullah Noonari, Frank Zhao,
Hanumanth Pothula, Heinrich Schuchardt, Hernan Vargas, Jakub Wysocki,
Jin Liu, Jiri Slaby, Ke Zhang, Kent Wires, Marcin Danilewicz,
Michael Rossberg, Michal Mazurek, Mike Pattrick, Mingxia Liu,
Niklas Söderlund, Omar Awaysa, Peng Zhang, Quentin Armitage,
Richard Donkin, Romain Delhomel, Sam Grove, Spike Du, Subendu Santra,
Tianhao Chai, Veerasenareddy Burru, Walter Heymans, Weiyuan Li,
Wenjing Qiao, Xiangjun Meng, Xu Ting, Yinjun Zhang, Yong Xu,
Zhichao Zeng and Zhipeng Lu.
Below is the number of commits per employer (with authors count):
299 Intel (56)
224 Marvell (31)
114 NVIDIA (22)
82 Huawei (7)
65 Red Hat (3)
35 NXP (4)
29 Microsoft (3)
26 Broadcom (5)
23 Semihalf (4)
20 Corigine (5)
18 Trustnet (1)
...
A big thank to all courageous people who took on the non rewarding task
of reviewing other's job.
Based on Reviewed-by and Acked-by tags, the top non-PMD reviewers are:
54 Akhil Goyal <gakhil@marvell.com>
52 Fan Zhang <roy.fan.zhang@intel.com>
42 Jerin Jacob <jerinj@marvell.com>
35 Chenbo Xia <chenbo.xia@intel.com>
34 Maxime Coquelin <maxime.coquelin@redhat.com>
28 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
23 Matan Azrad <matan@nvidia.com>
21 Bruce Richardson <bruce.richardson@intel.com>
20 Qi Zhang <qi.z.zhang@intel.com>
20 Ferruh Yigit <ferruh.yigit@xilinx.com>
19 Morten Brørup <mb@smartsharesystems.com>
19 Anoob Joseph <anoobj@marvell.com>
Next version will be 22.11 in November.
The new features for 22.11 can be submitted during the next 4 weeks:
http://core.dpdk.org/roadmap#dates
Please share your roadmap.
Thanks everyone
^ permalink raw reply [relevance 3%]
* [PATCH] version: 22.11-rc0
@ 2022-07-18 10:09 14% David Marchand
2022-07-18 12:34 3% ` David Marchand
` (3 more replies)
0 siblings, 4 replies; 200+ results
From: David Marchand @ 2022-07-18 10:09 UTC (permalink / raw)
To: dev
Cc: Aaron Conole, Michael Santana, Ray Kinsella, Nicolas Chautru,
Gagandeep Singh, Hemant Agrawal, Sachin Saxena, Rosen Xu,
Stephen Hemminger, Long Li, Fan Zhang, Lee Daly, Ashish Gupta,
Matan Azrad, Sunila Sahu, Ruifeng Wang, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Chandubabu Namburu,
Pablo de Lara, Michael Shamis, Liron Himi, Nagadheeraj Rottela,
Srikanth Jampala, Anoob Joseph, Jay Zhou,
Radha Mohan Chintakuntla, Veerasenareddy Burru, Chengwen Feng,
Bruce Richardson, Kevin Laatz, Conor Walsh, Timothy McDaniel,
Mattias Rönnblom, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, Artem V. Andreev,
Andrew Rybchenko, Harman Kalra, Olivier Matz, John W. Linville,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Igor Russkikh, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Chas Williams, Min Hu (Connor),
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Dongdong Liu,
Yisen Zhuang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Junfeng Guo, Andrew Boyer, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar,
Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler, Chaoyong He,
Niklas Soderlund, Jiawen Wu, Tetsuya Mukawa, Sathesh Edara,
Devendra Singh Rawat, Jasvinder Singh, Cristian Dumitrescu,
Maciej Czekaj, Jian Wang, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Tianfei zhang,
Ori Kam, Vijay Kumar Srivastava, Konstantin Ananyev, Akhil Goyal,
David Hunt, Byron Marohn, Yipeng Wang, Thomas Monjalon,
Ferruh Yigit, Vladimir Medvedkin, Jiayu Hu, Sameh Gobriel,
Bernard Iremonger, Reshma Pattan, Honnappa Nagarahalli,
Ciara Power, Erik Gabriel Carrillo
Start a new release cycle with empty release notes.
The ABI version becomes 23.0.
The map files are updated to the new ABI major number (23).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Special handling of removed drivers is also dropped in check-abi.sh and
a note has been added in libabigail.abignore as a reminder.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
.github/workflows/build.yml | 4 +-
.travis.yml | 21 +---
ABI_VERSION | 2 +-
VERSION | 2 +-
devtools/check-abi.sh | 4 -
devtools/libabigail.abignore | 43 +------
doc/guides/rel_notes/index.rst | 1 +
doc/guides/rel_notes/release_22_11.rst | 136 +++++++++++++++++++++
drivers/baseband/acc100/version.map | 2 +-
drivers/baseband/fpga_5gnr_fec/version.map | 2 +-
drivers/baseband/fpga_lte_fec/version.map | 2 +-
drivers/baseband/la12xx/version.map | 2 +-
drivers/baseband/null/version.map | 2 +-
drivers/baseband/turbo_sw/version.map | 2 +-
drivers/bus/fslmc/version.map | 2 +-
drivers/bus/ifpga/version.map | 2 +-
drivers/bus/pci/version.map | 2 +-
drivers/bus/vdev/version.map | 2 +-
drivers/bus/vmbus/version.map | 2 +-
drivers/common/qat/version.map | 2 +-
drivers/compress/isal/version.map | 2 +-
drivers/compress/mlx5/version.map | 2 +-
drivers/compress/octeontx/version.map | 2 +-
drivers/compress/zlib/version.map | 2 +-
drivers/crypto/armv8/version.map | 2 +-
drivers/crypto/bcmfs/version.map | 2 +-
drivers/crypto/caam_jr/version.map | 2 +-
drivers/crypto/ccp/version.map | 2 +-
drivers/crypto/ipsec_mb/version.map | 2 +-
drivers/crypto/mlx5/version.map | 2 +-
drivers/crypto/mvsam/version.map | 2 +-
drivers/crypto/nitrox/version.map | 2 +-
drivers/crypto/null/version.map | 2 +-
drivers/crypto/octeontx/version.map | 2 +-
drivers/crypto/openssl/version.map | 2 +-
drivers/crypto/scheduler/version.map | 2 +-
drivers/crypto/virtio/version.map | 2 +-
drivers/dma/cnxk/version.map | 2 +-
drivers/dma/dpaa/version.map | 2 +-
drivers/dma/dpaa2/version.map | 2 +-
drivers/dma/hisilicon/version.map | 2 +-
drivers/dma/idxd/version.map | 2 +-
drivers/dma/ioat/version.map | 2 +-
drivers/dma/skeleton/version.map | 2 +-
drivers/event/dlb2/version.map | 2 +-
drivers/event/dpaa/version.map | 2 +-
drivers/event/dpaa2/version.map | 2 +-
drivers/event/dsw/version.map | 2 +-
drivers/event/octeontx/version.map | 2 +-
drivers/event/opdl/version.map | 2 +-
drivers/event/skeleton/version.map | 2 +-
drivers/event/sw/version.map | 2 +-
drivers/gpu/cuda/version.map | 2 +-
drivers/mempool/bucket/version.map | 2 +-
drivers/mempool/dpaa2/version.map | 2 +-
drivers/mempool/octeontx/version.map | 2 +-
drivers/mempool/ring/version.map | 2 +-
drivers/mempool/stack/version.map | 2 +-
drivers/net/af_packet/version.map | 2 +-
drivers/net/af_xdp/version.map | 2 +-
drivers/net/ark/version.map | 2 +-
drivers/net/atlantic/version.map | 2 +-
drivers/net/avp/version.map | 2 +-
drivers/net/axgbe/version.map | 2 +-
drivers/net/bnx2x/version.map | 2 +-
drivers/net/bnxt/version.map | 2 +-
drivers/net/bonding/version.map | 2 +-
drivers/net/cnxk/version.map | 12 +-
drivers/net/cxgbe/version.map | 2 +-
drivers/net/dpaa/version.map | 2 +-
drivers/net/dpaa2/version.map | 2 +-
drivers/net/e1000/version.map | 2 +-
drivers/net/ena/version.map | 2 +-
drivers/net/enetc/version.map | 2 +-
drivers/net/enetfec/version.map | 2 +-
drivers/net/enic/version.map | 2 +-
drivers/net/failsafe/version.map | 2 +-
drivers/net/fm10k/version.map | 2 +-
drivers/net/hinic/version.map | 2 +-
drivers/net/hns3/version.map | 2 +-
drivers/net/i40e/version.map | 2 +-
drivers/net/iavf/version.map | 2 +-
drivers/net/ice/version.map | 2 +-
drivers/net/igc/version.map | 2 +-
drivers/net/ionic/version.map | 2 +-
drivers/net/ipn3ke/version.map | 2 +-
drivers/net/ixgbe/version.map | 2 +-
drivers/net/kni/version.map | 2 +-
drivers/net/liquidio/version.map | 2 +-
drivers/net/memif/version.map | 2 +-
drivers/net/mlx4/version.map | 2 +-
drivers/net/mlx5/version.map | 2 +-
drivers/net/mvneta/version.map | 2 +-
drivers/net/mvpp2/version.map | 2 +-
drivers/net/netvsc/version.map | 2 +-
drivers/net/nfb/version.map | 2 +-
drivers/net/nfp/version.map | 2 +-
drivers/net/ngbe/version.map | 2 +-
drivers/net/null/version.map | 2 +-
drivers/net/octeontx/version.map | 2 +-
drivers/net/octeontx_ep/version.map | 2 +-
drivers/net/pcap/version.map | 2 +-
drivers/net/pfe/version.map | 2 +-
drivers/net/qede/version.map | 2 +-
drivers/net/ring/version.map | 2 +-
drivers/net/sfc/version.map | 2 +-
drivers/net/softnic/version.map | 2 +-
drivers/net/tap/version.map | 2 +-
drivers/net/thunderx/version.map | 2 +-
drivers/net/txgbe/version.map | 2 +-
drivers/net/vdev_netvsc/version.map | 2 +-
drivers/net/vhost/version.map | 2 +-
drivers/net/virtio/version.map | 2 +-
drivers/net/vmxnet3/version.map | 2 +-
drivers/raw/cnxk_bphy/version.map | 2 +-
drivers/raw/cnxk_gpio/version.map | 2 +-
drivers/raw/dpaa2_cmdif/version.map | 2 +-
drivers/raw/ifpga/version.map | 18 +--
drivers/raw/ioat/version.map | 2 +-
drivers/raw/ntb/version.map | 2 +-
drivers/raw/skeleton/version.map | 2 +-
drivers/regex/cn9k/version.map | 2 +-
drivers/regex/mlx5/version.map | 2 +-
drivers/vdpa/ifc/version.map | 2 +-
drivers/vdpa/mlx5/version.map | 2 +-
drivers/vdpa/sfc/version.map | 2 +-
lib/acl/version.map | 2 +-
lib/bbdev/version.map | 2 +-
lib/bitratestats/version.map | 2 +-
lib/bpf/version.map | 2 +-
lib/cfgfile/version.map | 2 +-
lib/cmdline/version.map | 2 +-
lib/cryptodev/version.map | 2 +-
lib/distributor/version.map | 2 +-
lib/eal/version.map | 2 +-
lib/efd/version.map | 2 +-
lib/ethdev/version.map | 2 +-
lib/eventdev/version.map | 2 +-
lib/fib/version.map | 2 +-
lib/gro/version.map | 2 +-
lib/gso/version.map | 2 +-
lib/hash/version.map | 2 +-
lib/ip_frag/version.map | 2 +-
lib/ipsec/version.map | 2 +-
lib/jobstats/version.map | 2 +-
lib/kni/version.map | 2 +-
lib/kvargs/version.map | 2 +-
lib/latencystats/version.map | 2 +-
lib/lpm/version.map | 2 +-
lib/mbuf/version.map | 2 +-
lib/member/version.map | 2 +-
lib/mempool/version.map | 2 +-
lib/meter/version.map | 2 +-
lib/metrics/version.map | 2 +-
lib/net/version.map | 2 +-
lib/pci/version.map | 2 +-
lib/pdump/version.map | 2 +-
lib/pipeline/version.map | 2 +-
lib/port/version.map | 2 +-
lib/power/version.map | 2 +-
lib/rawdev/version.map | 2 +-
lib/rcu/version.map | 2 +-
lib/reorder/version.map | 2 +-
lib/rib/version.map | 2 +-
lib/ring/version.map | 2 +-
lib/sched/version.map | 2 +-
lib/security/version.map | 2 +-
lib/stack/version.map | 2 +-
lib/table/version.map | 2 +-
lib/telemetry/version.map | 2 +-
lib/timer/version.map | 2 +-
lib/vhost/version.map | 2 +-
172 files changed, 323 insertions(+), 244 deletions(-)
create mode 100644 doc/guides/rel_notes/release_22_11.rst
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1106256539..6f04e7071c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,7 +25,7 @@ jobs:
MINGW: ${{ matrix.config.cross == 'mingw' }}
MINI: ${{ matrix.config.mini != '' }}
PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
- REF_GIT_TAG: v22.03
+ REF_GIT_TAG: none
RISCV64: ${{ matrix.config.cross == 'riscv64' }}
RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
@@ -43,7 +43,7 @@ jobs:
- os: ubuntu-20.04
compiler: gcc
library: shared
- checks: abi+doc+tests
+ checks: doc+tests
- os: ubuntu-20.04
compiler: clang
library: static
diff --git a/.travis.yml b/.travis.yml
index 5f46dccb54..4bb5bf629e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh
env:
global:
- LIBABIGAIL_VERSION=libabigail-1.8
- - REF_GIT_TAG=v22.03
+ - REF_GIT_TAG=none
jobs:
include:
@@ -61,14 +61,6 @@ jobs:
packages:
- *required_packages
- *doc_packages
- - env: DEF_LIB="shared" ABI_CHECKS=true
- arch: amd64
- compiler: gcc
- addons:
- apt:
- packages:
- - *required_packages
- - *libabigail_build_packages
# x86_64 clang jobs
- env: DEF_LIB="static"
arch: amd64
@@ -145,17 +137,6 @@ jobs:
packages:
- *required_packages
- *doc_packages
- - env: DEF_LIB="shared" ABI_CHECKS=true
- dist: focal
- arch: arm64-graviton2
- virt: vm
- group: edge
- compiler: gcc
- addons:
- apt:
- packages:
- - *required_packages
- - *libabigail_build_packages
# aarch64 clang jobs
- env: DEF_LIB="static"
dist: focal
diff --git a/ABI_VERSION b/ABI_VERSION
index 95af471221..919c868b57 100644
--- a/ABI_VERSION
+++ b/ABI_VERSION
@@ -1 +1 @@
-22.2
+23.0
diff --git a/VERSION b/VERSION
index 97371cc668..4bc005def2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-22.07.0
+22.11.0-rc0
diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index d465c8cee0..c583eae2fd 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -37,10 +37,6 @@ fi
error=
for dump in $(find $refdir -name "*.dump"); do
name=$(basename $dump)
- if grep -qE '\<librte_*(.*_octeontx2|raw_dpaa2_qdma)' $dump; then
- echo "Skipped removed driver $name."
- continue
- fi
dump2=$(find $newdir -name $name)
if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then
echo "Error: cannot find $name in $newdir" >&2
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 8c8c648895..ded20032d4 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -31,43 +31,8 @@
type_kind = enum
changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM, RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Temporary exceptions till next major ABI version ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Temporary exceptions till next major ABI version ;
+; NOTE: there may be some removed libaries or drivers in check-abi.sh ;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Ignore ethdev event enum update
-; because new event cannot be received if not registered
-[suppress_type]
- type_kind = enum
- changed_enumerators = RTE_ETH_EVENT_MAX
-
-; Ignore fields inserted in cacheline boundary of rte_eth_rxq_info
-; because the struct size is unchanged
-[suppress_type]
- name = rte_eth_rxq_info
- has_data_member_inserted_between = {offset_of(rx_buf_size), end}
-
-; Ignore fields inserted in place of reserved_opts of rte_security_ipsec_sa_options
-[suppress_type]
- name = rte_security_ipsec_sa_options
- has_data_member_inserted_between = {offset_of(reserved_opts), end}
-
-; Ignore section attribute fixes in experimental regexdev library
-[suppress_file]
- soname_regexp = ^librte_regexdev\.
-
-; Ignore changes in common mlx5 driver, should be all internal
-[suppress_file]
- soname_regexp = ^librte_common_mlx5\.
-
-; Ignore visibility fix of local functions in experimental auxiliary driver
-[suppress_file]
- soname_regexp = ^librte_bus_auxiliary\.
-
-; Ignore visibility fix of local functions in experimental gpudev library
-[suppress_file]
- soname_regexp = ^librte_gpudev\.
-
-; Ignore libabigail false-positive in clang builds, after moving code.
-[suppress_function]
- name = rte_eal_remote_launch
diff --git a/doc/guides/rel_notes/index.rst b/doc/guides/rel_notes/index.rst
index 93a3f7e5da..f6782b91db 100644
--- a/doc/guides/rel_notes/index.rst
+++ b/doc/guides/rel_notes/index.rst
@@ -8,6 +8,7 @@ Release Notes
:maxdepth: 1
:numbered:
+ release_22_11
release_22_07
release_22_03
release_21_11
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
new file mode 100644
index 0000000000..8c021cf050
--- /dev/null
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -0,0 +1,136 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2022 The DPDK contributors
+
+.. include:: <isonum.txt>
+
+DPDK Release 22.11
+==================
+
+.. **Read this first.**
+
+ The text in the sections below explains how to update the release notes.
+
+ Use proper spelling, capitalization and punctuation in all sections.
+
+ Variable and config names should be quoted as fixed width text:
+ ``LIKE_THIS``.
+
+ Build the docs and view the output file to ensure the changes are correct::
+
+ ninja -C build doc
+ xdg-open build/doc/guides/html/rel_notes/release_22_11.html
+
+
+New Features
+------------
+
+.. This section should contain new features added in this release.
+ Sample format:
+
+ * **Add a title in the past tense with a full stop.**
+
+ Add a short 1-2 sentence description in the past tense.
+ The description should be enough to allow someone scanning
+ the release notes to understand the new feature.
+
+ If the feature adds a lot of sub-features you can use a bullet list
+ like this:
+
+ * Added feature foo to do something.
+ * Enhanced feature bar to do something else.
+
+ Refer to the previous release notes for examples.
+
+ Suggested order in release notes items:
+ * Core libs (EAL, mempool, ring, mbuf, buses)
+ * Device abstraction libs and PMDs (ordered alphabetically by vendor name)
+ - ethdev (lib, PMDs)
+ - cryptodev (lib, PMDs)
+ - eventdev (lib, PMDs)
+ - etc
+ * Other libs
+ * Apps, Examples, Tools (if significant)
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =======================================================
+
+
+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.
+ =======================================================
+
+
+API Changes
+-----------
+
+.. This section should contain API changes. Sample format:
+
+ * sample: Add a short 1-2 sentence description of the API change
+ which was announced in the previous releases and made in this release.
+ Start with a scope label like "ethdev:".
+ Use fixed width quotes for ``function_names`` or ``struct_names``.
+ Use 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.
+ =======================================================
+
+
+ABI Changes
+-----------
+
+.. This section should contain ABI changes. Sample format:
+
+ * sample: Add a short 1-2 sentence description of the ABI change
+ which was announced in the previous releases and made in this release.
+ Start with a scope label like "ethdev:".
+ Use fixed width quotes for ``function_names`` or ``struct_names``.
+ Use 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.
+ =======================================================
+
+
+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.
+ =======================================================
+
+
+Tested Platforms
+----------------
+
+.. This section should contain a list of platforms that were tested
+ with this release.
+
+ The format is:
+
+ * <vendor> platform with <vendor> <type of devices> combinations
+
+ * List of CPU
+ * List of OS
+ * List of devices
+ * Other relevant details...
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =======================================================
diff --git a/drivers/baseband/acc100/version.map b/drivers/baseband/acc100/version.map
index 13f0398d71..b4ff13e38f 100644
--- a/drivers/baseband/acc100/version.map
+++ b/drivers/baseband/acc100/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/fpga_5gnr_fec/version.map b/drivers/baseband/fpga_5gnr_fec/version.map
index de4e5025bf..6b191cf330 100644
--- a/drivers/baseband/fpga_5gnr_fec/version.map
+++ b/drivers/baseband/fpga_5gnr_fec/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/fpga_lte_fec/version.map b/drivers/baseband/fpga_lte_fec/version.map
index e3bfa6edb0..aab28a9976 100644
--- a/drivers/baseband/fpga_lte_fec/version.map
+++ b/drivers/baseband/fpga_lte_fec/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/la12xx/version.map b/drivers/baseband/la12xx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/baseband/la12xx/version.map
+++ b/drivers/baseband/la12xx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/null/version.map b/drivers/baseband/null/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/baseband/null/version.map
+++ b/drivers/baseband/null/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/turbo_sw/version.map b/drivers/baseband/turbo_sw/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/baseband/turbo_sw/version.map
+++ b/drivers/baseband/turbo_sw/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/bus/fslmc/version.map b/drivers/bus/fslmc/version.map
index 79b29746b6..a25a9e8ca0 100644
--- a/drivers/bus/fslmc/version.map
+++ b/drivers/bus/fslmc/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_fslmc_vfio_mem_dmamap;
diff --git a/drivers/bus/ifpga/version.map b/drivers/bus/ifpga/version.map
index 8ac3a4d258..c0a1eecae8 100644
--- a/drivers/bus/ifpga/version.map
+++ b/drivers/bus/ifpga/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ifpga_driver_register;
diff --git a/drivers/bus/pci/version.map b/drivers/bus/pci/version.map
index aa56439c2b..3d5c2f3068 100644
--- a/drivers/bus/pci/version.map
+++ b/drivers/bus/pci/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pci_dump;
diff --git a/drivers/bus/vdev/version.map b/drivers/bus/vdev/version.map
index 0d60b7e2bc..7cc3098a50 100644
--- a/drivers/bus/vdev/version.map
+++ b/drivers/bus/vdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_vdev_add_custom_scan;
diff --git a/drivers/bus/vmbus/version.map b/drivers/bus/vmbus/version.map
index 3cadec7fae..84db31b6e9 100644
--- a/drivers/bus/vmbus/version.map
+++ b/drivers/bus/vmbus/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_vmbus_chan_close;
diff --git a/drivers/common/qat/version.map b/drivers/common/qat/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/common/qat/version.map
+++ b/drivers/common/qat/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/isal/version.map b/drivers/compress/isal/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/isal/version.map
+++ b/drivers/compress/isal/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/mlx5/version.map b/drivers/compress/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/mlx5/version.map
+++ b/drivers/compress/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/octeontx/version.map b/drivers/compress/octeontx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/octeontx/version.map
+++ b/drivers/compress/octeontx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/zlib/version.map b/drivers/compress/zlib/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/zlib/version.map
+++ b/drivers/compress/zlib/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/armv8/version.map b/drivers/crypto/armv8/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/armv8/version.map
+++ b/drivers/crypto/armv8/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/bcmfs/version.map b/drivers/crypto/bcmfs/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/bcmfs/version.map
+++ b/drivers/crypto/bcmfs/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/caam_jr/version.map b/drivers/crypto/caam_jr/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/caam_jr/version.map
+++ b/drivers/crypto/caam_jr/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/ccp/version.map b/drivers/crypto/ccp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/ccp/version.map
+++ b/drivers/crypto/ccp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/ipsec_mb/version.map b/drivers/crypto/ipsec_mb/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/ipsec_mb/version.map
+++ b/drivers/crypto/ipsec_mb/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/mlx5/version.map b/drivers/crypto/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/mlx5/version.map
+++ b/drivers/crypto/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/mvsam/version.map b/drivers/crypto/mvsam/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/mvsam/version.map
+++ b/drivers/crypto/mvsam/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/nitrox/version.map b/drivers/crypto/nitrox/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/nitrox/version.map
+++ b/drivers/crypto/nitrox/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/null/version.map b/drivers/crypto/null/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/null/version.map
+++ b/drivers/crypto/null/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/octeontx/version.map b/drivers/crypto/octeontx/version.map
index 997a95ea33..cc4b6b0970 100644
--- a/drivers/crypto/octeontx/version.map
+++ b/drivers/crypto/octeontx/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/openssl/version.map b/drivers/crypto/openssl/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/openssl/version.map
+++ b/drivers/crypto/openssl/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/scheduler/version.map b/drivers/crypto/scheduler/version.map
index 47e4487b75..74491beabb 100644
--- a/drivers/crypto/scheduler/version.map
+++ b/drivers/crypto/scheduler/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_cryptodev_scheduler_load_user_scheduler;
diff --git a/drivers/crypto/virtio/version.map b/drivers/crypto/virtio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/virtio/version.map
+++ b/drivers/crypto/virtio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/cnxk/version.map b/drivers/dma/cnxk/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/cnxk/version.map
+++ b/drivers/dma/cnxk/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/dpaa/version.map b/drivers/dma/dpaa/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/dpaa/version.map
+++ b/drivers/dma/dpaa/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/dpaa2/version.map b/drivers/dma/dpaa2/version.map
index 38d3d225db..0c020e5249 100644
--- a/drivers/dma/dpaa2/version.map
+++ b/drivers/dma/dpaa2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/hisilicon/version.map b/drivers/dma/hisilicon/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/hisilicon/version.map
+++ b/drivers/dma/hisilicon/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/idxd/version.map b/drivers/dma/idxd/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/idxd/version.map
+++ b/drivers/dma/idxd/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/ioat/version.map b/drivers/dma/ioat/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/ioat/version.map
+++ b/drivers/dma/ioat/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/skeleton/version.map b/drivers/dma/skeleton/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/skeleton/version.map
+++ b/drivers/dma/skeleton/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dlb2/version.map b/drivers/event/dlb2/version.map
index c727207d1a..1327e3e335 100644
--- a/drivers/event/dlb2/version.map
+++ b/drivers/event/dlb2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dpaa/version.map b/drivers/event/dpaa/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/dpaa/version.map
+++ b/drivers/event/dpaa/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dpaa2/version.map b/drivers/event/dpaa2/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/dpaa2/version.map
+++ b/drivers/event/dpaa2/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dsw/version.map b/drivers/event/dsw/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/dsw/version.map
+++ b/drivers/event/dsw/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/octeontx/version.map b/drivers/event/octeontx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/octeontx/version.map
+++ b/drivers/event/octeontx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/opdl/version.map b/drivers/event/opdl/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/opdl/version.map
+++ b/drivers/event/opdl/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/skeleton/version.map b/drivers/event/skeleton/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/skeleton/version.map
+++ b/drivers/event/skeleton/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/sw/version.map b/drivers/event/sw/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/sw/version.map
+++ b/drivers/event/sw/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/gpu/cuda/version.map b/drivers/gpu/cuda/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/gpu/cuda/version.map
+++ b/drivers/gpu/cuda/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/bucket/version.map b/drivers/mempool/bucket/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/bucket/version.map
+++ b/drivers/mempool/bucket/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/dpaa2/version.map b/drivers/mempool/dpaa2/version.map
index cfd4ae617a..0023765843 100644
--- a/drivers/mempool/dpaa2/version.map
+++ b/drivers/mempool/dpaa2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_dpaa2_mbuf_from_buf_addr;
diff --git a/drivers/mempool/octeontx/version.map b/drivers/mempool/octeontx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/octeontx/version.map
+++ b/drivers/mempool/octeontx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/ring/version.map b/drivers/mempool/ring/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/ring/version.map
+++ b/drivers/mempool/ring/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/stack/version.map b/drivers/mempool/stack/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/stack/version.map
+++ b/drivers/mempool/stack/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/af_packet/version.map b/drivers/net/af_packet/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/af_packet/version.map
+++ b/drivers/net/af_packet/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/af_xdp/version.map b/drivers/net/af_xdp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/af_xdp/version.map
+++ b/drivers/net/af_xdp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ark/version.map b/drivers/net/ark/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ark/version.map
+++ b/drivers/net/ark/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/atlantic/version.map b/drivers/net/atlantic/version.map
index d36fc61a84..e301b105fe 100644
--- a/drivers/net/atlantic/version.map
+++ b/drivers/net/atlantic/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/avp/version.map b/drivers/net/avp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/avp/version.map
+++ b/drivers/net/avp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/axgbe/version.map b/drivers/net/axgbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/axgbe/version.map
+++ b/drivers/net/axgbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/bnx2x/version.map b/drivers/net/bnx2x/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/bnx2x/version.map
+++ b/drivers/net/bnx2x/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/bnxt/version.map b/drivers/net/bnxt/version.map
index 2ba5ec5f6e..075bb37a36 100644
--- a/drivers/net/bnxt/version.map
+++ b/drivers/net/bnxt/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_bnxt_get_vf_rx_status;
diff --git a/drivers/net/bonding/version.map b/drivers/net/bonding/version.map
index d7142c4f94..9333923b4e 100644
--- a/drivers/net/bonding/version.map
+++ b/drivers/net/bonding/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_bond_8023ad_agg_selection_get;
diff --git a/drivers/net/cnxk/version.map b/drivers/net/cnxk/version.map
index 0bcc65fe6f..3ef3e76bb0 100644
--- a/drivers/net/cnxk/version.map
+++ b/drivers/net/cnxk/version.map
@@ -1,15 +1,15 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
-INTERNAL {
- global:
- cnxk_nix_inb_mode_set;
-};
-
EXPERIMENTAL {
# added in 22.07
global:
rte_pmd_cnxk_hw_sa_read;
rte_pmd_cnxk_hw_sa_write;
};
+
+INTERNAL {
+ global:
+ cnxk_nix_inb_mode_set;
+};
diff --git a/drivers/net/cxgbe/version.map b/drivers/net/cxgbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/cxgbe/version.map
+++ b/drivers/net/cxgbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/dpaa/version.map b/drivers/net/dpaa/version.map
index 338ea2d8b2..5268d39ef6 100644
--- a/drivers/net/dpaa/version.map
+++ b/drivers/net/dpaa/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_dpaa_set_tx_loopback;
diff --git a/drivers/net/dpaa2/version.map b/drivers/net/dpaa2/version.map
index cc82b8579d..d6535343b1 100644
--- a/drivers/net/dpaa2/version.map
+++ b/drivers/net/dpaa2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_dpaa2_mux_flow_create;
diff --git a/drivers/net/e1000/version.map b/drivers/net/e1000/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/e1000/version.map
+++ b/drivers/net/e1000/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ena/version.map b/drivers/net/ena/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ena/version.map
+++ b/drivers/net/ena/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/enetc/version.map b/drivers/net/enetc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/enetc/version.map
+++ b/drivers/net/enetc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/enetfec/version.map b/drivers/net/enetfec/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/enetfec/version.map
+++ b/drivers/net/enetfec/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/enic/version.map b/drivers/net/enic/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/enic/version.map
+++ b/drivers/net/enic/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/failsafe/version.map b/drivers/net/failsafe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/failsafe/version.map
+++ b/drivers/net/failsafe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/fm10k/version.map b/drivers/net/fm10k/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/fm10k/version.map
+++ b/drivers/net/fm10k/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/hinic/version.map b/drivers/net/hinic/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/hinic/version.map
+++ b/drivers/net/hinic/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/hns3/version.map b/drivers/net/hns3/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/hns3/version.map
+++ b/drivers/net/hns3/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/i40e/version.map b/drivers/net/i40e/version.map
index 5dd68158d3..561db50eac 100644
--- a/drivers/net/i40e/version.map
+++ b/drivers/net/i40e/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_i40e_add_vf_mac_addr;
diff --git a/drivers/net/iavf/version.map b/drivers/net/iavf/version.map
index 97f0f87311..4796c2884f 100644
--- a/drivers/net/iavf/version.map
+++ b/drivers/net/iavf/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ice/version.map b/drivers/net/ice/version.map
index 60a3f17393..e7e8e50557 100644
--- a/drivers/net/ice/version.map
+++ b/drivers/net/ice/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/igc/version.map b/drivers/net/igc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/igc/version.map
+++ b/drivers/net/igc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ionic/version.map b/drivers/net/ionic/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ionic/version.map
+++ b/drivers/net/ionic/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ipn3ke/version.map b/drivers/net/ipn3ke/version.map
index 4fd4e7c09b..4c48499993 100644
--- a/drivers/net/ipn3ke/version.map
+++ b/drivers/net/ipn3ke/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ixgbe/version.map b/drivers/net/ixgbe/version.map
index f0f29d8749..94693ccc1a 100644
--- a/drivers/net/ixgbe/version.map
+++ b/drivers/net/ixgbe/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_ixgbe_bypass_event_show;
diff --git a/drivers/net/kni/version.map b/drivers/net/kni/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/kni/version.map
+++ b/drivers/net/kni/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/liquidio/version.map b/drivers/net/liquidio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/liquidio/version.map
+++ b/drivers/net/liquidio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/memif/version.map b/drivers/net/memif/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/memif/version.map
+++ b/drivers/net/memif/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mlx4/version.map b/drivers/net/mlx4/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/mlx4/version.map
+++ b/drivers/net/mlx4/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mlx5/version.map b/drivers/net/mlx5/version.map
index c97dfe440a..9942de5079 100644
--- a/drivers/net/mlx5/version.map
+++ b/drivers/net/mlx5/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mvneta/version.map b/drivers/net/mvneta/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/mvneta/version.map
+++ b/drivers/net/mvneta/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mvpp2/version.map b/drivers/net/mvpp2/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/mvpp2/version.map
+++ b/drivers/net/mvpp2/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/netvsc/version.map b/drivers/net/netvsc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/netvsc/version.map
+++ b/drivers/net/netvsc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/nfb/version.map b/drivers/net/nfb/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/nfb/version.map
+++ b/drivers/net/nfb/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/nfp/version.map b/drivers/net/nfp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/nfp/version.map
+++ b/drivers/net/nfp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ngbe/version.map b/drivers/net/ngbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ngbe/version.map
+++ b/drivers/net/ngbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/null/version.map b/drivers/net/null/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/null/version.map
+++ b/drivers/net/null/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/octeontx/version.map b/drivers/net/octeontx/version.map
index d12156778e..ae37d32d04 100644
--- a/drivers/net/octeontx/version.map
+++ b/drivers/net/octeontx/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_octeontx_pchan_map;
diff --git a/drivers/net/octeontx_ep/version.map b/drivers/net/octeontx_ep/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/octeontx_ep/version.map
+++ b/drivers/net/octeontx_ep/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/pcap/version.map b/drivers/net/pcap/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/pcap/version.map
+++ b/drivers/net/pcap/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/pfe/version.map b/drivers/net/pfe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/pfe/version.map
+++ b/drivers/net/pfe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/qede/version.map b/drivers/net/qede/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/qede/version.map
+++ b/drivers/net/qede/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ring/version.map b/drivers/net/ring/version.map
index e43f5ea908..84e52064e0 100644
--- a/drivers/net/ring/version.map
+++ b/drivers/net/ring/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_from_ring;
diff --git a/drivers/net/sfc/version.map b/drivers/net/sfc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/sfc/version.map
+++ b/drivers/net/sfc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/softnic/version.map b/drivers/net/softnic/version.map
index 01e1514276..4dac46ecd5 100644
--- a/drivers/net/softnic/version.map
+++ b/drivers/net/softnic/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_softnic_manage;
diff --git a/drivers/net/tap/version.map b/drivers/net/tap/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/tap/version.map
+++ b/drivers/net/tap/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/thunderx/version.map b/drivers/net/thunderx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/thunderx/version.map
+++ b/drivers/net/thunderx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/txgbe/version.map b/drivers/net/txgbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/txgbe/version.map
+++ b/drivers/net/txgbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/vdev_netvsc/version.map b/drivers/net/vdev_netvsc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/vdev_netvsc/version.map
+++ b/drivers/net/vdev_netvsc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/vhost/version.map b/drivers/net/vhost/version.map
index 1aa8abef75..e42c89f1eb 100644
--- a/drivers/net/vhost/version.map
+++ b/drivers/net/vhost/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_vhost_get_queue_event;
diff --git a/drivers/net/virtio/version.map b/drivers/net/virtio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/virtio/version.map
+++ b/drivers/net/virtio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/vmxnet3/version.map b/drivers/net/vmxnet3/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/vmxnet3/version.map
+++ b/drivers/net/vmxnet3/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/cnxk_bphy/version.map b/drivers/raw/cnxk_bphy/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/cnxk_bphy/version.map
+++ b/drivers/raw/cnxk_bphy/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/cnxk_gpio/version.map b/drivers/raw/cnxk_gpio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/cnxk_gpio/version.map
+++ b/drivers/raw/cnxk_gpio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/dpaa2_cmdif/version.map b/drivers/raw/dpaa2_cmdif/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/dpaa2_cmdif/version.map
+++ b/drivers/raw/dpaa2_cmdif/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index ff71a453e2..f5c3959b7f 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -1,18 +1,18 @@
-DPDK_22 {
+DPDK_23 {
global:
+ rte_pmd_ifpga_cleanup;
rte_pmd_ifpga_get_dev_id;
- rte_pmd_ifpga_get_rsu_status;
- rte_pmd_ifpga_set_rsu_status;
- rte_pmd_ifpga_get_property;
+ rte_pmd_ifpga_get_pci_bus;
rte_pmd_ifpga_get_phy_info;
- rte_pmd_ifpga_update_flash;
- rte_pmd_ifpga_stop_update;
+ rte_pmd_ifpga_get_property;
+ rte_pmd_ifpga_get_rsu_status;
+ rte_pmd_ifpga_partial_reconfigure;
rte_pmd_ifpga_reboot_try;
rte_pmd_ifpga_reload;
- rte_pmd_ifpga_get_pci_bus;
- rte_pmd_ifpga_partial_reconfigure;
- rte_pmd_ifpga_cleanup;
+ rte_pmd_ifpga_set_rsu_status;
+ rte_pmd_ifpga_stop_update;
+ rte_pmd_ifpga_update_flash;
local: *;
};
diff --git a/drivers/raw/ioat/version.map b/drivers/raw/ioat/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/ioat/version.map
+++ b/drivers/raw/ioat/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/ntb/version.map b/drivers/raw/ntb/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/ntb/version.map
+++ b/drivers/raw/ntb/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/skeleton/version.map b/drivers/raw/skeleton/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/skeleton/version.map
+++ b/drivers/raw/skeleton/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/regex/cn9k/version.map b/drivers/regex/cn9k/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/regex/cn9k/version.map
+++ b/drivers/regex/cn9k/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/regex/mlx5/version.map b/drivers/regex/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/regex/mlx5/version.map
+++ b/drivers/regex/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/vdpa/ifc/version.map b/drivers/vdpa/ifc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/vdpa/ifc/version.map
+++ b/drivers/vdpa/ifc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/vdpa/mlx5/version.map b/drivers/vdpa/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/vdpa/mlx5/version.map
+++ b/drivers/vdpa/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/vdpa/sfc/version.map b/drivers/vdpa/sfc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/vdpa/sfc/version.map
+++ b/drivers/vdpa/sfc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/lib/acl/version.map b/lib/acl/version.map
index 2b18c21601..4c15dbbb36 100644
--- a/lib/acl/version.map
+++ b/lib/acl/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_acl_add_rules;
diff --git a/lib/bbdev/version.map b/lib/bbdev/version.map
index cce3f3c8f5..25a0a22bd4 100644
--- a/lib/bbdev/version.map
+++ b/lib/bbdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_bbdev_allocate;
diff --git a/lib/bitratestats/version.map b/lib/bitratestats/version.map
index 01c61670dd..dc110440e0 100644
--- a/lib/bitratestats/version.map
+++ b/lib/bitratestats/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_stats_bitrate_calc;
diff --git a/lib/bpf/version.map b/lib/bpf/version.map
index 3b953f2f45..04bd657a85 100644
--- a/lib/bpf/version.map
+++ b/lib/bpf/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_bpf_destroy;
diff --git a/lib/cfgfile/version.map b/lib/cfgfile/version.map
index 02cbccb8ab..fdb0f13040 100644
--- a/lib/cfgfile/version.map
+++ b/lib/cfgfile/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_cfgfile_add_entry;
diff --git a/lib/cmdline/version.map b/lib/cmdline/version.map
index fc7fdd6ea4..e3d59aaf8d 100644
--- a/lib/cmdline/version.map
+++ b/lib/cmdline/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
cirbuf_add_buf_head;
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index dbf1f62199..5aee87c6f7 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_crypto_aead_algorithm_strings;
diff --git a/lib/distributor/version.map b/lib/distributor/version.map
index 4d9ff07373..7a34dfa2f2 100644
--- a/lib/distributor/version.map
+++ b/lib/distributor/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_distributor_clear_returns;
diff --git a/lib/eal/version.map b/lib/eal/version.map
index c2a2cebf69..1f293e768b 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
__rte_panic;
diff --git a/lib/efd/version.map b/lib/efd/version.map
index 0226285245..67886414ab 100644
--- a/lib/efd/version.map
+++ b/lib/efd/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_efd_create;
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index d46f31b63f..03f52fee91 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_add_first_rx_callback;
diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
index 886e2ec875..d99f996245 100644
--- a/lib/eventdev/version.map
+++ b/lib/eventdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
__rte_eventdev_trace_crypto_adapter_enqueue;
diff --git a/lib/fib/version.map b/lib/fib/version.map
index b23fa42b9b..a867d2b7d8 100644
--- a/lib/fib/version.map
+++ b/lib/fib/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_fib6_add;
diff --git a/lib/gro/version.map b/lib/gro/version.map
index f8a32e221c..105aa64ca3 100644
--- a/lib/gro/version.map
+++ b/lib/gro/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_gro_ctx_create;
diff --git a/lib/gso/version.map b/lib/gso/version.map
index 73767623b9..f6b552de6d 100644
--- a/lib/gso/version.map
+++ b/lib/gso/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_gso_segment;
diff --git a/lib/hash/version.map b/lib/hash/version.map
index c2e261ed13..bdcebd19c2 100644
--- a/lib/hash/version.map
+++ b/lib/hash/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_fbk_hash_create;
diff --git a/lib/ip_frag/version.map b/lib/ip_frag/version.map
index e537224293..b9c1ccaa1b 100644
--- a/lib/ip_frag/version.map
+++ b/lib/ip_frag/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ip_frag_free_death_row;
diff --git a/lib/ipsec/version.map b/lib/ipsec/version.map
index 0af27ffd60..f17a49dd26 100644
--- a/lib/ipsec/version.map
+++ b/lib/ipsec/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ipsec_pkt_crypto_group;
diff --git a/lib/jobstats/version.map b/lib/jobstats/version.map
index 89faa02004..bca7480afb 100644
--- a/lib/jobstats/version.map
+++ b/lib/jobstats/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_jobstats_abort;
diff --git a/lib/kni/version.map b/lib/kni/version.map
index cc7790651a..83bbbe880f 100644
--- a/lib/kni/version.map
+++ b/lib/kni/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_kni_alloc;
diff --git a/lib/kvargs/version.map b/lib/kvargs/version.map
index 0d42cd58a8..781f71cf23 100644
--- a/lib/kvargs/version.map
+++ b/lib/kvargs/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_kvargs_count;
diff --git a/lib/latencystats/version.map b/lib/latencystats/version.map
index be5b014cd7..79b8395f12 100644
--- a/lib/latencystats/version.map
+++ b/lib/latencystats/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_latencystats_get;
diff --git a/lib/lpm/version.map b/lib/lpm/version.map
index 0cdd04822e..e1a7aaedbb 100644
--- a/lib/lpm/version.map
+++ b/lib/lpm/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_lpm6_add;
diff --git a/lib/mbuf/version.map b/lib/mbuf/version.map
index 2745c2b77c..ed486ed14e 100644
--- a/lib/mbuf/version.map
+++ b/lib/mbuf/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
__rte_pktmbuf_linearize;
diff --git a/lib/member/version.map b/lib/member/version.map
index f287aabc91..19469c6aba 100644
--- a/lib/member/version.map
+++ b/lib/member/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_member_add;
diff --git a/lib/mempool/version.map b/lib/mempool/version.map
index 1b7d7c5456..b67d7aace7 100644
--- a/lib/mempool/version.map
+++ b/lib/mempool/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_mempool_audit;
diff --git a/lib/meter/version.map b/lib/meter/version.map
index befa3b7e32..b10b544641 100644
--- a/lib/meter/version.map
+++ b/lib/meter/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_meter_srtcm_config;
diff --git a/lib/metrics/version.map b/lib/metrics/version.map
index b11a9647cd..89ffa9be80 100644
--- a/lib/metrics/version.map
+++ b/lib/metrics/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_metrics_deinit;
diff --git a/lib/net/version.map b/lib/net/version.map
index 4f4330d1c4..e8fe2b7635 100644
--- a/lib/net/version.map
+++ b/lib/net/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_random_addr;
diff --git a/lib/pci/version.map b/lib/pci/version.map
index 3f38303749..e9282ff49c 100644
--- a/lib/pci/version.map
+++ b/lib/pci/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pci_addr_cmp;
diff --git a/lib/pdump/version.map b/lib/pdump/version.map
index ce5502d9cd..25df5a82c2 100644
--- a/lib/pdump/version.map
+++ b/lib/pdump/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pdump_disable;
diff --git a/lib/pipeline/version.map b/lib/pipeline/version.map
index 8312307a7a..1baa74a77a 100644
--- a/lib/pipeline/version.map
+++ b/lib/pipeline/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pipeline_ah_packet_drop;
diff --git a/lib/port/version.map b/lib/port/version.map
index 73d0825d2e..af6cf696fd 100644
--- a/lib/port/version.map
+++ b/lib/port/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_port_ethdev_reader_ops;
diff --git a/lib/power/version.map b/lib/power/version.map
index a687754f4a..f9b2947adf 100644
--- a/lib/power/version.map
+++ b/lib/power/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_power_exit;
diff --git a/lib/rawdev/version.map b/lib/rawdev/version.map
index 4f56870761..8278aacdea 100644
--- a/lib/rawdev/version.map
+++ b/lib/rawdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_rawdev_close;
diff --git a/lib/rcu/version.map b/lib/rcu/version.map
index b63c74f856..cabed64fca 100644
--- a/lib/rcu/version.map
+++ b/lib/rcu/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_rcu_log_type;
diff --git a/lib/reorder/version.map b/lib/reorder/version.map
index 250e6664f5..e114d17730 100644
--- a/lib/reorder/version.map
+++ b/lib/reorder/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_reorder_create;
diff --git a/lib/rib/version.map b/lib/rib/version.map
index f356fe8849..ca2815e44b 100644
--- a/lib/rib/version.map
+++ b/lib/rib/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_rib6_create;
diff --git a/lib/ring/version.map b/lib/ring/version.map
index 3377293ee4..4d7c27a6d9 100644
--- a/lib/ring/version.map
+++ b/lib/ring/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ring_create;
diff --git a/lib/sched/version.map b/lib/sched/version.map
index 13d7510584..2f64834c8f 100644
--- a/lib/sched/version.map
+++ b/lib/sched/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_approx;
diff --git a/lib/security/version.map b/lib/security/version.map
index edf4887e12..c770b2e8f8 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_security_capabilities_get;
diff --git a/lib/stack/version.map b/lib/stack/version.map
index e145e32451..c0250f5cdf 100644
--- a/lib/stack/version.map
+++ b/lib/stack/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_stack_create;
diff --git a/lib/table/version.map b/lib/table/version.map
index 623709f886..e32e15a5fc 100644
--- a/lib/table/version.map
+++ b/lib/table/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_table_acl_ops;
diff --git a/lib/telemetry/version.map b/lib/telemetry/version.map
index 77528bb1fe..9794f9ea20 100644
--- a/lib/telemetry/version.map
+++ b/lib/telemetry/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_tel_data_add_array_container;
diff --git a/lib/timer/version.map b/lib/timer/version.map
index 4b782456da..101f5c18b5 100644
--- a/lib/timer/version.map
+++ b/lib/timer/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_timer_alt_dump_stats;
diff --git a/lib/vhost/version.map b/lib/vhost/version.map
index 9329f88e79..18574346d5 100644
--- a/lib/vhost/version.map
+++ b/lib/vhost/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_vdpa_find_device_by_name;
--
2.36.1
^ permalink raw reply [relevance 14%]
* Re: [PATCH] version: 22.11-rc0
2022-07-18 10:09 14% [PATCH] version: 22.11-rc0 David Marchand
@ 2022-07-18 12:34 3% ` David Marchand
2022-07-18 16:21 3% ` Lincoln Lavoie
2022-07-19 10:38 0% ` David Marchand
` (2 subsequent siblings)
3 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-07-18 12:34 UTC (permalink / raw)
To: dpdklab, Lincoln Lavoie, ci
Cc: dev, Aaron Conole, Michael Santana, Ray Kinsella, Thomas Monjalon
Hello CI guys,
On Mon, Jul 18, 2022 at 12:10 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Start a new release cycle with empty release notes.
>
> The ABI version becomes 23.0.
> The map files are updated to the new ABI major number (23).
> The ABI exceptions are dropped and CI ABI checks are disabled because
> compatibility is not preserved.
> Special handling of removed drivers is also dropped in check-abi.sh and
> a note has been added in libabigail.abignore as a reminder.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Just a heads-up that once this patch is merged, the ABI check will
have to be disabled in CI environments.
--
David Marchand
^ permalink raw reply [relevance 3%]
* Re: [PATCH v4 3/7] bbdev: add device info on queue topology
2022-07-07 17:13 3% ` Chautru, Nicolas
@ 2022-07-18 13:04 3% ` Tom Rix
0 siblings, 0 replies; 200+ results
From: Tom Rix @ 2022-07-18 13:04 UTC (permalink / raw)
To: Chautru, Nicolas, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
On 7/7/22 10:13 AM, Chautru, Nicolas wrote:
> Hi Tom,
>
>> -----Original Message-----
>> From: Tom Rix <trix@redhat.com>
>> Sent: Thursday, July 7, 2022 6:34 AM
>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
>> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
>> Cc: maxime.coquelin@redhat.com; mdr@ashroe.eu; Richardson, Bruce
>> <bruce.richardson@intel.com>; david.marchand@redhat.com;
>> stephen@networkplumber.org
>> Subject: Re: [PATCH v4 3/7] bbdev: add device info on queue topology
>>
>>
>> On 7/6/22 2:12 PM, Chautru, Nicolas wrote:
>>> Hi Tom,
>>>
>>>> -----Original Message-----
>>>> From: Tom Rix <trix@redhat.com>
>>>> Subject: Re: [PATCH v4 3/7] bbdev: add device info on queue topology
>>>>
>>>>
>>>> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
>>>>> Adding more options in the API to expose the number of queues
>>>>> exposed and related priority.
>>>>>
>>>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
>>>>> ---
>>>>> lib/bbdev/rte_bbdev.h | 4 ++++
>>>>> 1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
>>>>> 9b1ffa4..ac941d6 100644
>>>>> --- a/lib/bbdev/rte_bbdev.h
>>>>> +++ b/lib/bbdev/rte_bbdev.h
>>>>> @@ -289,6 +289,10 @@ struct rte_bbdev_driver_info {
>>>>>
>>>>> /** Maximum number of queues supported by the device */
>>>>> unsigned int max_num_queues;
>>>>> + /** Maximum number of queues supported per operation type */
>>>>> + unsigned int num_queues[RTE_BBDEV_OP_TYPE_PADDED_MAX];
>>>>> + /** Priority level supported per operation type */
>>>>> + unsigned int queue_priority[RTE_BBDEV_OP_TYPE_PADDED_MAX];
>>>> It is better to add new elements to the end of a structure for better
>>>> backward compatibility
>>> All that serie is not ABI compatible (sizes change etc...). I don’t believe there
>> is such a recommendation, is there?
>>
>> Depends on what users expect, a dynamically linked old application would at
>> best core here. If the elements were added to the end, yes the size would
>> change but the old dynamically linked application would not use
>> them. Dynamically linking is nice because problems in the library can be fixed
>> and shipped without forcing the user recompile. Though the user may not
>> realize it, this change forces them to recompile.
>>
>> Tom
> Thanks Tom. In that very context, the change are big enough not to have any form of compatibility. This a new ABI version, and user knows they will have to recompile.
> Still it would be great to capture a recommendation in DPDK coding guideline in case there is such a BKM, I have heard multiple arguments for different preference, if we want to harmonize such things let's capture in coding guide lines, it would not hurt. Maybe one for Thomas?
When sw is deployed, how would a user know ?
For that matter, how would a developer know without a deep reading of
header files ?
I am not asking for a compatibility testsuite here, just the placement
of new elements (the same code) at the end of structures. As a library
writer, please consider the users of the library. Your improvements are
amplified by all of the library's users. The user's code quality is
based on this library's code quality.
My expectation is a new ABI introduces new functionality without
breaking old binaries. Or if it does, it is for a good reason.
There is no good reason for putting new elements into the middle of an
existing structure.
Tom
>
>>>> Tom
>>>>
>>>>> /** Queue size limit (queue size must also be power of 2) */
>>>>> uint32_t queue_size_lim;
>>>>> /** Set if device off-loads operation to hardware */
^ permalink raw reply [relevance 3%]
* Re: [PATCH v4 2/7] bbdev: add device status info
2022-07-07 17:15 0% ` Chautru, Nicolas
@ 2022-07-18 13:09 0% ` Tom Rix
0 siblings, 0 replies; 200+ results
From: Tom Rix @ 2022-07-18 13:09 UTC (permalink / raw)
To: Chautru, Nicolas, dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, mdr, Richardson, Bruce, david.marchand, stephen
On 7/7/22 10:15 AM, Chautru, Nicolas wrote:
> Hi Tom,
>
>> -----Original Message-----
>> From: Tom Rix <trix@redhat.com>
>> Sent: Thursday, July 7, 2022 6:37 AM
>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
>> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
>> Cc: maxime.coquelin@redhat.com; mdr@ashroe.eu; Richardson, Bruce
>> <bruce.richardson@intel.com>; david.marchand@redhat.com;
>> stephen@networkplumber.org
>> Subject: Re: [PATCH v4 2/7] bbdev: add device status info
>>
>>
>> On 7/6/22 2:16 PM, Chautru, Nicolas wrote:
>>>> -----Original Message-----
>>>> From: Tom Rix <trix@redhat.com>
>>>> Subject: Re: [PATCH v4 2/7] bbdev: add device status info
>>>>
>>>>
>>>> On 7/5/22 5:23 PM, Nicolas Chautru wrote:
>>>>> Added device status information, so that the PMD can expose
>>>>> information related to the underlying accelerator device status.
>>>>> Minor order change in structure to fit into padding hole.
>>>>>
>>>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
>>>>> ---
>>>>> drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
>>>>> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 1 +
>>>>> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 1 +
>>>>> drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
>>>>> drivers/baseband/null/bbdev_null.c | 1 +
>>>>> drivers/baseband/turbo_sw/bbdev_turbo_software.c | 1 +
>>>>> lib/bbdev/rte_bbdev.c | 24 +++++++++++++++
>>>>> lib/bbdev/rte_bbdev.h | 35 ++++++++++++++++++++--
>>>>> lib/bbdev/version.map | 6 ++++
>>>>> 9 files changed, 69 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> b/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> index de7e4bc..17ba798 100644
>>>>> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> @@ -1060,6 +1060,7 @@
>>>>>
>>>>> /* Read and save the populated config from ACC100 registers */
>>>>> fetch_acc100_config(dev);
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> /* This isn't ideal because it reports the maximum number of
>>>>> queues
>>>> but
>>>>> * does not provide info on how many can be uplink/downlink or
>>>>> different diff --git
>>>>> a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> index 82ae6ba..57b12af 100644
>>>>> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> @@ -369,6 +369,7 @@
>>>>> dev_info->capabilities = bbdev_capabilities;
>>>>> dev_info->cpu_flag_reqs = NULL;
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> /* Calculates number of queues assigned to device */
>>>>> dev_info->max_num_queues = 0;
>>>>> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> index 21d3529..2a330c4 100644
>>>>> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> @@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {
>>>>> dev_info->capabilities = bbdev_capabilities;
>>>>> dev_info->cpu_flag_reqs = NULL;
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> /* Calculates number of queues assigned to device */
>>>>> dev_info->max_num_queues = 0;
>>>>> diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> b/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> index 4d1bd16..c1f88c6 100644
>>>>> --- a/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> @@ -100,6 +100,7 @@ struct bbdev_la12xx_params {
>>>>> dev_info->capabilities = bbdev_capabilities;
>>>>> dev_info->cpu_flag_reqs = NULL;
>>>>> dev_info->min_alignment = 64;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
>>>>> }
>>>>> diff --git a/drivers/baseband/null/bbdev_null.c
>>>>> b/drivers/baseband/null/bbdev_null.c
>>>>> index 248e129..94a1976 100644
>>>>> --- a/drivers/baseband/null/bbdev_null.c
>>>>> +++ b/drivers/baseband/null/bbdev_null.c
>>>>> @@ -82,6 +82,7 @@ struct bbdev_queue {
>>>>> * here for code completeness.
>>>>> */
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
>>>>> }
>>>>> diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> index af7bc41..dbc5524 100644
>>>>> --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> @@ -254,6 +254,7 @@ struct turbo_sw_queue {
>>>>> dev_info->min_alignment = 64;
>>>>> dev_info->harq_buffer_size = 0;
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> rte_bbdev_log_debug("got device info from %u\n", dev->data-
>>>>> dev_id);
>>>>> }
>>>>> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
>>>>> 22bd894..555bda9 100644
>>>>> --- a/lib/bbdev/rte_bbdev.c
>>>>> +++ b/lib/bbdev/rte_bbdev.c
>>>>> @@ -25,6 +25,8 @@
>>>>>
>>>>> /* Number of supported operation types */
>>>>> #define BBDEV_OP_TYPE_COUNT 5
>>>>> +/* Number of supported device status */ #define
>>>>> +BBDEV_DEV_STATUS_COUNT 9
>>>>>
>>>>> /* BBDev library logging ID */
>>>>> RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE); @@ -1132,3
>>>> +1134,25
>>>>> @@ struct rte_mempool *
>>>>> rte_bbdev_log(ERR, "Invalid operation type");
>>>>> return NULL;
>>>>> }
>>>>> +
>>>>> +const char *
>>>>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status) {
>>>>> + static const char * const dev_sta_string[] = {
>>>>> + "RTE_BBDEV_DEV_NOSTATUS",
>>>>> + "RTE_BBDEV_DEV_NOT_SUPPORTED",
>>>>> + "RTE_BBDEV_DEV_RESET",
>>>>> + "RTE_BBDEV_DEV_CONFIGURED",
>>>>> + "RTE_BBDEV_DEV_ACTIVE",
>>>>> + "RTE_BBDEV_DEV_FATAL_ERR",
>>>>> + "RTE_BBDEV_DEV_RESTART_REQ",
>>>>> + "RTE_BBDEV_DEV_RECONFIG_REQ",
>>>>> + "RTE_BBDEV_DEV_CORRECT_ERR",
>>>>> + };
>>>>> +
>>>>> + if (status < BBDEV_DEV_STATUS_COUNT)
>>>>> + return dev_sta_string[status];
>>>>> +
>>>>> + rte_bbdev_log(ERR, "Invalid device status");
>>>>> + return NULL;
>>>>> +}
>>>>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
>>>>> b88c881..9b1ffa4 100644
>>>>> --- a/lib/bbdev/rte_bbdev.h
>>>>> +++ b/lib/bbdev/rte_bbdev.h
>>>>> @@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {
>>>>> int
>>>>> rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
>>>>>
>>>>> +/**
>>>>> + * Flags indicate the status of the device */ enum
>>>>> +rte_bbdev_device_status {
>>>>> + RTE_BBDEV_DEV_NOSTATUS, /**< Nothing being reported */
>>>>> + RTE_BBDEV_DEV_NOT_SUPPORTED, /**< Device status is not
>>>> supported on the PMD */
>>>> If this was 0, you may not need to explicitly set.
>>> This helps to have the lack of status being equivalent to a cleared register.
>> NOSTATUS is fine, just change
>>
>> NOT_SUPPORTED = 0,
> Let me rephrase. Currently RTE_BBDEV_DEV_NOSTATUS is zero explicitly which can be valuable to match a clear register.
> RTE_BBDEV_DEV_NOT_SUPPORTED would not be zero.
> Are you suggesting I should put explictly a RTE_BBDEV_DEV_NOSTATUS = 0? Isn't it implicit for any compiler that the first enum starts from zero?
However you want to do it, try taking advantage of zero-ed memory. By
choosing for this enum to be non-zero, it has to be explicitly set. If
it was 0 it would be implicitly set, assuming dev is zero-ed.
Tom
>
>> Tom
>>
>>>>> + RTE_BBDEV_DEV_RESET, /**< Device in reset and un-configured
>>>> state */
>>>>> + RTE_BBDEV_DEV_CONFIGURED, /**< Device is configured and
>>>> ready to use */
>>>>> + RTE_BBDEV_DEV_ACTIVE, /**< Device is configured and VF is
>>>> being used */
>>>>> + RTE_BBDEV_DEV_FATAL_ERR, /**< Device has hit a fatal
>>>> uncorrectable error */
>>>>> + RTE_BBDEV_DEV_RESTART_REQ, /**< Device requires application to
>>>> restart */
>>>>> + RTE_BBDEV_DEV_RECONFIG_REQ, /**< Device requires application
>>>> to reconfigure queues */
>>>>> + RTE_BBDEV_DEV_CORRECT_ERR, /**< Warning of a correctable
>>>> error event happened */
>>>> Last patch was padded, do something consistent here.
>>> We only pad if we have to. Here there is no array whose size would be
>> dimensioned by the size of that enum.
>>>>> +};
>>>>> +
>>>>> /** Device statistics. */
>>>>> struct rte_bbdev_stats {
>>>>> uint64_t enqueued_count; /**< Count of all operations enqueued
>>>>> */ @@ -285,12 +300,14 @@ struct rte_bbdev_driver_info {
>>>>> /** Set if device supports per-queue interrupts */
>>>>> bool queue_intr_supported;
>>>>> /** Minimum alignment of buffers, in bytes */
>>>>> - uint16_t min_alignment;
>>>>> - /** HARQ memory available in kB */
>>>>> + /** Device Status */
>>>>> + enum rte_bbdev_device_status device_status;
>>>> New elements should be added to the end to improve backward
>> compatibility.
>>> Same comment in different patch. I would like to know if there is a real
>> recommendation from DPDK on this. I have heard opposite view as well.
>>> In that very case we are breaking the ABI in that new serie for 22.11 (sizes
>> and offsets are changing).
>>>> Tom
>>>>
>>>>> uint32_t harq_buffer_size;
>>>>> /** Byte endianness (RTE_BIG_ENDIAN/RTE_LITTLE_ENDIAN)
>>>> supported
>>>>> * for input/output data
>>>>> */
>>>>> + uint16_t min_alignment;
>>>>> + /** HARQ memory available in kB */
>>>>> uint8_t data_endianness;
>>>>> /** Default queue configuration used if none is supplied */
>>>>> struct rte_bbdev_queue_conf default_queue_conf; @@ -827,6
>>>> +844,20
>>>>> @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id,
>>>>> rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int
>>>>> epfd, int
>>>> op,
>>>>> void *data);
>>>>>
>>>>> +/**
>>>>> + * Converts device status from enum to string
>>>>> + *
>>>>> + * @param status
>>>>> + * Device status as enum
>>>>> + *
>>>>> + * @returns
>>>>> + * Operation type as string or NULL if op_type is invalid
>>>>> + *
>>>>> + */
>>>>> +__rte_experimental
>>>>> +const char*
>>>>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status);
>>>>> +
>>>>> #ifdef __cplusplus
>>>>> }
>>>>> #endif
>>>>> diff --git a/lib/bbdev/version.map b/lib/bbdev/version.map index
>>>>> cce3f3c..9ac3643 100644
>>>>> --- a/lib/bbdev/version.map
>>>>> +++ b/lib/bbdev/version.map
>>>>> @@ -39,3 +39,9 @@ DPDK_22 {
>>>>>
>>>>> local: *;
>>>>> };
>>>>> +
>>>>> +EXPERIMENTAL {
>>>>> + global:
>>>>> +
>>>>> + rte_bbdev_device_status_str;
>>>>> +};
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-18 12:34 3% ` David Marchand
@ 2022-07-18 16:21 3% ` Lincoln Lavoie
2022-07-19 10:35 0% ` David Marchand
0 siblings, 1 reply; 200+ results
From: Lincoln Lavoie @ 2022-07-18 16:21 UTC (permalink / raw)
To: David Marchand
Cc: dpdklab, ci, dev, Aaron Conole, Michael Santana, Ray Kinsella,
Thomas Monjalon
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
HI All,
With the 22.07 release, I think we can now disable the ABI for the dpdk
main, until the next LTS release, correct?
Cheers,
Lincoln
On Mon, Jul 18, 2022 at 8:34 AM David Marchand <david.marchand@redhat.com>
wrote:
> Hello CI guys,
>
> On Mon, Jul 18, 2022 at 12:10 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > Start a new release cycle with empty release notes.
> >
> > The ABI version becomes 23.0.
> > The map files are updated to the new ABI major number (23).
> > The ABI exceptions are dropped and CI ABI checks are disabled because
> > compatibility is not preserved.
> > Special handling of removed drivers is also dropped in check-abi.sh and
> > a note has been added in libabigail.abignore as a reminder.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Just a heads-up that once this patch is merged, the ABI check will
> have to be disabled in CI environments.
>
>
> --
> David Marchand
>
>
--
*Lincoln Lavoie*
Principal Engineer, Broadband Technologies
21 Madbury Rd., Ste. 100, Durham, NH 03824
lylavoie@iol.unh.edu
https://www.iol.unh.edu
+1-603-674-2755 (m)
<https://www.iol.unh.edu>
[-- Attachment #2: Type: text/html, Size: 2674 bytes --]
^ permalink raw reply [relevance 3%]
* Re: [PATCH] version: 22.11-rc0
2022-07-18 16:21 3% ` Lincoln Lavoie
@ 2022-07-19 10:35 0% ` David Marchand
2022-07-19 12:04 0% ` Lincoln Lavoie
0 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-07-19 10:35 UTC (permalink / raw)
To: Lincoln Lavoie
Cc: dpdklab, ci, dev, Aaron Conole, Michael Santana, Ray Kinsella,
Thomas Monjalon
On Mon, Jul 18, 2022 at 6:21 PM Lincoln Lavoie <lylavoie@iol.unh.edu> wrote:
> With the 22.07 release, I think we can now disable the ABI for the dpdk main, until the next LTS release, correct?
Indeed, you can do it now.
Thanks Lincoln.
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-18 10:09 14% [PATCH] version: 22.11-rc0 David Marchand
2022-07-18 12:34 3% ` David Marchand
@ 2022-07-19 10:38 0% ` David Marchand
2022-07-19 21:02 0% ` Thomas Monjalon
2022-07-21 10:27 0% ` David Marchand
3 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-07-19 10:38 UTC (permalink / raw)
To: dev, Thomas Monjalon; +Cc: Aaron Conole, Michael Santana, Ray Kinsella
On Mon, Jul 18, 2022 at 12:10 PM David Marchand
<david.marchand@redhat.com> wrote:
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index 8c8c648895..ded20032d4 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -31,43 +31,8 @@
> type_kind = enum
> changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM, RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
>
> -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> -; Temporary exceptions till next major ABI version ;
> -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> +; Temporary exceptions till next major ABI version ;
> +; NOTE: there may be some removed libaries or drivers in check-abi.sh ;
Typo for libraries*.
This can be fixed when applying.
> +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> -; Ignore ethdev event enum update
> -; because new event cannot be received if not registered
> -[suppress_type]
> - type_kind = enum
> - changed_enumerators = RTE_ETH_EVENT_MAX
> -
> -; Ignore fields inserted in cacheline boundary of rte_eth_rxq_info
[snip]
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-19 10:35 0% ` David Marchand
@ 2022-07-19 12:04 0% ` Lincoln Lavoie
0 siblings, 0 replies; 200+ results
From: Lincoln Lavoie @ 2022-07-19 12:04 UTC (permalink / raw)
To: David Marchand
Cc: dpdklab, ci, dev, Aaron Conole, Michael Santana, Ray Kinsella,
Thomas Monjalon
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Thanks David,
Owen is taking care of that this morning and will confirm back when it's
disabled on the DPDK main.
Cheers,
Lincoln
On Tue, Jul 19, 2022 at 6:36 AM David Marchand <david.marchand@redhat.com>
wrote:
> On Mon, Jul 18, 2022 at 6:21 PM Lincoln Lavoie <lylavoie@iol.unh.edu>
> wrote:
> > With the 22.07 release, I think we can now disable the ABI for the dpdk
> main, until the next LTS release, correct?
>
> Indeed, you can do it now.
> Thanks Lincoln.
>
>
> --
> David Marchand
>
>
--
*Lincoln Lavoie*
Principal Engineer, Broadband Technologies
21 Madbury Rd., Ste. 100, Durham, NH 03824
lylavoie@iol.unh.edu
https://www.iol.unh.edu
+1-603-674-2755 (m)
<https://www.iol.unh.edu>
[-- Attachment #2: Type: text/html, Size: 2075 bytes --]
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-18 10:09 14% [PATCH] version: 22.11-rc0 David Marchand
2022-07-18 12:34 3% ` David Marchand
2022-07-19 10:38 0% ` David Marchand
@ 2022-07-19 21:02 0% ` Thomas Monjalon
2022-07-20 6:21 0% ` David Marchand
2022-07-20 9:33 0% ` Thomas Monjalon
2022-07-21 10:27 0% ` David Marchand
3 siblings, 2 replies; 200+ results
From: Thomas Monjalon @ 2022-07-19 21:02 UTC (permalink / raw)
To: David Marchand
Cc: dev, Aaron Conole, Michael Santana, Ray Kinsella,
Nicolas Chautru, Gagandeep Singh, Hemant Agrawal, Sachin Saxena,
Rosen Xu, Stephen Hemminger, Long Li, Fan Zhang, Lee Daly,
Ashish Gupta, Matan Azrad, Sunila Sahu, Ruifeng Wang,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta,
Chandubabu Namburu, Pablo de Lara, Michael Shamis, Liron Himi,
Nagadheeraj Rottela, Srikanth Jampala, Anoob Joseph, Jay Zhou,
Radha Mohan Chintakuntla, Veerasenareddy Burru, Chengwen Feng,
Bruce Richardson, Kevin Laatz, Conor Walsh, Timothy McDaniel,
Mattias Rönnblom, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, Artem V. Andreev,
Andrew Rybchenko, Harman Kalra, Olivier Matz, John W. Linville,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Igor Russkikh, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Chas Williams, Min Hu (Connor),
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Dongdong Liu,
Yisen Zhuang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Junfeng Guo, Andrew Boyer, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar,
Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler, Chaoyong He,
Niklas Soderlund, Jiawen Wu, Tetsuya Mukawa, Sathesh Edara,
Devendra Singh Rawat, Jasvinder Singh, Cristian Dumitrescu,
Maciej Czekaj, Jian Wang, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Tianfei zhang,
Ori Kam, Vijay Kumar Srivastava, Konstantin Ananyev, Akhil Goyal,
David Hunt, Byron Marohn, Yipeng Wang, Ferruh Yigit,
Vladimir Medvedkin, Jiayu Hu, Sameh Gobriel, Bernard Iremonger,
Reshma Pattan, Honnappa Nagarahalli, Ciara Power,
Erik Gabriel Carrillo
18/07/2022 12:09, David Marchand:
> --- a/devtools/check-abi.sh
> +++ b/devtools/check-abi.sh
> @@ -37,10 +37,6 @@ fi
> error=
> for dump in $(find $refdir -name "*.dump"); do
> name=$(basename $dump)
> - if grep -qE '\<librte_*(.*_octeontx2|raw_dpaa2_qdma)' $dump; then
> - echo "Skipped removed driver $name."
> - continue
> - fi
Yes it needs to be removed.
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -31,43 +31,8 @@
> type_kind = enum
> changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM, RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
>
> -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> -; Temporary exceptions till next major ABI version ;
> -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> +; Temporary exceptions till next major ABI version ;
> +; NOTE: there may be some removed libaries or drivers in check-abi.sh ;
> +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
This note is not clear to me.
>
> -; Ignore ethdev event enum update
> -; because new event cannot be received if not registered
> -[suppress_type]
> - type_kind = enum
> - changed_enumerators = RTE_ETH_EVENT_MAX
> -
> -; Ignore fields inserted in cacheline boundary of rte_eth_rxq_info
> -; because the struct size is unchanged
> -[suppress_type]
> - name = rte_eth_rxq_info
> - has_data_member_inserted_between = {offset_of(rx_buf_size), end}
> -
> -; Ignore fields inserted in place of reserved_opts of rte_security_ipsec_sa_options
> -[suppress_type]
> - name = rte_security_ipsec_sa_options
> - has_data_member_inserted_between = {offset_of(reserved_opts), end}
> -
> -; Ignore section attribute fixes in experimental regexdev library
> -[suppress_file]
> - soname_regexp = ^librte_regexdev\.
> -
> -; Ignore changes in common mlx5 driver, should be all internal
> -[suppress_file]
> - soname_regexp = ^librte_common_mlx5\.
> -
> -; Ignore visibility fix of local functions in experimental auxiliary driver
> -[suppress_file]
> - soname_regexp = ^librte_bus_auxiliary\.
> -
> -; Ignore visibility fix of local functions in experimental gpudev library
> -[suppress_file]
> - soname_regexp = ^librte_gpudev\.
> -
> -; Ignore libabigail false-positive in clang builds, after moving code.
> -[suppress_function]
> - name = rte_eal_remote_launch
Yes they can all be removed.
New exceptions will be added cautiously per need.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-19 21:02 0% ` Thomas Monjalon
@ 2022-07-20 6:21 0% ` David Marchand
2022-07-20 9:33 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: David Marchand @ 2022-07-20 6:21 UTC (permalink / raw)
To: Thomas Monjalon, Ray Kinsella
Cc: dev, Aaron Conole, Michael Santana, Nicolas Chautru,
Gagandeep Singh, Hemant Agrawal, Sachin Saxena, Rosen Xu,
Stephen Hemminger, Long Li, Fan Zhang, Lee Daly, Ashish Gupta,
Matan Azrad, Sunila Sahu, Ruifeng Wang, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Chandubabu Namburu,
Pablo de Lara, Michael Shamis, Liron Himi, Nagadheeraj Rottela,
Srikanth Jampala, Anoob Joseph, Jay Zhou,
Radha Mohan Chintakuntla, Veerasenareddy Burru, Chengwen Feng,
Bruce Richardson, Kevin Laatz, Conor Walsh, Timothy McDaniel,
Mattias Rönnblom, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, Artem V. Andreev,
Andrew Rybchenko, Harman Kalra, Olivier Matz, John W. Linville,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Igor Russkikh, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Chas Williams, Min Hu (Connor),
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Dongdong Liu,
Yisen Zhuang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Junfeng Guo, Andrew Boyer, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar,
Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler, Chaoyong He,
Niklas Soderlund, Jiawen Wu, Tetsuya Mukawa, Sathesh Edara,
Devendra Singh Rawat, Jasvinder Singh, Cristian Dumitrescu,
Maciej Czekaj, Jian Wang, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Tianfei zhang,
Ori Kam, Vijay Kumar Srivastava, Konstantin Ananyev, Akhil Goyal,
David Hunt, Byron Marohn, Yipeng Wang, Ferruh Yigit,
Vladimir Medvedkin, Jiayu Hu, Sameh Gobriel, Bernard Iremonger,
Reshma Pattan, Honnappa Nagarahalli, Ciara Power,
Erik Gabriel Carrillo
On Tue, Jul 19, 2022 at 11:03 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
> > @@ -31,43 +31,8 @@
> > type_kind = enum
> > changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM, RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> >
> > -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > -; Temporary exceptions till next major ABI version ;
> > -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > +; Temporary exceptions till next major ABI version ;
> > +; NOTE: there may be some removed libaries or drivers in check-abi.sh ;
> > +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> This note is not clear to me.
I lacked inspiration.
And it is more a note for a few people (including myself) that touch
this script and configuration file...
We might as well drop this added line.
I will look again at one Ray idea of having the library/driver removal
handling in a single location.
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-19 21:02 0% ` Thomas Monjalon
2022-07-20 6:21 0% ` David Marchand
@ 2022-07-20 9:33 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-07-20 9:33 UTC (permalink / raw)
To: David Marchand
Cc: dev, Aaron Conole, Michael Santana, Ray Kinsella,
Nicolas Chautru, Gagandeep Singh, Hemant Agrawal, Sachin Saxena,
Rosen Xu, Stephen Hemminger, Long Li, Fan Zhang, Lee Daly,
Ashish Gupta, Matan Azrad, Sunila Sahu, Ruifeng Wang,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta,
Chandubabu Namburu, Pablo de Lara, Michael Shamis, Liron Himi,
Nagadheeraj Rottela, Srikanth Jampala, Anoob Joseph, Jay Zhou,
Radha Mohan Chintakuntla, Veerasenareddy Burru, Chengwen Feng,
Bruce Richardson, Kevin Laatz, Conor Walsh, Timothy McDaniel,
Mattias Rönnblom, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, Artem V. Andreev,
Andrew Rybchenko, Harman Kalra, Olivier Matz, John W. Linville,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Igor Russkikh, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Chas Williams, Min Hu (Connor),
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Dongdong Liu,
Yisen Zhuang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Junfeng Guo, Andrew Boyer, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar,
Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler, Chaoyong He,
Niklas Soderlund, Jiawen Wu, Tetsuya Mukawa, Sathesh Edara,
Devendra Singh Rawat, Jasvinder Singh, Cristian Dumitrescu,
Maciej Czekaj, Jian Wang, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Tianfei zhang,
Ori Kam, Vijay Kumar Srivastava, Konstantin Ananyev, Akhil Goyal,
David Hunt, Byron Marohn, Yipeng Wang, Ferruh Yigit,
Vladimir Medvedkin, Jiayu Hu, Sameh Gobriel, Bernard Iremonger,
Reshma Pattan, Honnappa Nagarahalli, Ciara Power,
Erik Gabriel Carrillo
19/07/2022 23:02, Thomas Monjalon:
> 18/07/2022 12:09, David Marchand:
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
> > -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > -; Temporary exceptions till next major ABI version ;
> > -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > +; Temporary exceptions till next major ABI version ;
> > +; NOTE: there may be some removed libaries or drivers in check-abi.sh ;
> > +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> This note is not clear to me.
I think it is better to not add this note which can be confusing.
For the rest,
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.11-rc0
2022-07-18 10:09 14% [PATCH] version: 22.11-rc0 David Marchand
` (2 preceding siblings ...)
2022-07-19 21:02 0% ` Thomas Monjalon
@ 2022-07-21 10:27 0% ` David Marchand
3 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-07-21 10:27 UTC (permalink / raw)
To: dev
Cc: Aaron Conole, Michael Santana, Ray Kinsella, Nicolas Chautru,
Gagandeep Singh, Hemant Agrawal, Sachin Saxena, Rosen Xu,
Stephen Hemminger, Long Li, Fan Zhang, Lee Daly, Ashish Gupta,
Matan Azrad, Sunila Sahu, Ruifeng Wang, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Chandubabu Namburu,
Pablo de Lara, Michael Shamis, Liron Himi, Nagadheeraj Rottela,
Srikanth Jampala, Anoob Joseph, Jay Zhou,
Radha Mohan Chintakuntla, Veerasenareddy Burru, Chengwen Feng,
Bruce Richardson, Kevin Laatz, Conor Walsh, Timothy McDaniel,
Mattias Rönnblom, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, Artem V. Andreev,
Andrew Rybchenko, Harman Kalra, Olivier Matz, John W. Linville,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Igor Russkikh, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Chas Williams, Min Hu (Connor),
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Dongdong Liu, Yisen Zhuang,
Yuying Zhang, Beilei Xing, Jingjing Wu, Qiming Yang, Junfeng Guo,
Andrew Boyer, Shijith Thotton, Srisivasubramanian Srinivasan,
Jakub Grajciar, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Chaoyong He, Niklas Soderlund, Jiawen Wu, Tetsuya Mukawa,
Sathesh Edara, Devendra Singh Rawat, Jasvinder Singh,
Cristian Dumitrescu, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider, Tomasz Duszynski,
Tianfei zhang, Ori Kam, Vijay Kumar Srivastava,
Konstantin Ananyev, Akhil Goyal, David Hunt, Byron Marohn,
Yipeng Wang, Thomas Monjalon, Ferruh Yigit, Vladimir Medvedkin,
Jiayu Hu, Sameh Gobriel, Bernard Iremonger, Reshma Pattan,
Honnappa Nagarahalli, Ciara Power, Erik Gabriel Carrillo
On Mon, Jul 18, 2022 at 12:10 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Start a new release cycle with empty release notes.
>
> The ABI version becomes 23.0.
Here we go!
> The map files are updated to the new ABI major number (23).
> The ABI exceptions are dropped and CI ABI checks are disabled because
> compatibility is not preserved.
> Special handling of removed drivers is also dropped in check-abi.sh and
> a note has been added in libabigail.abignore as a reminder.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Applied with agreed change.
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: [RFC] memarea: introduce memory area library
@ 2022-07-21 15:22 3% ` Stephen Hemminger
2022-08-30 12:41 3% ` Dmitry Kozlyuk
1 sibling, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-07-21 15:22 UTC (permalink / raw)
To: Chengwen Feng; +Cc: thomas, dev
On Thu, 21 Jul 2022 12:46:48 +0800
Chengwen Feng <fengchengwen@huawei.com> wrote:
> +struct rte_memarea {
> + void *private_data; /**< private management data pointer*/
> + struct rte_memarea_param init;
> +};
Why does this structure have to be exposed in user API?
Hiding it in implementation would reduce ABI breakage problems.
^ permalink raw reply [relevance 3%]
* REMINDER: DPDK Userspace submissions due July 22
@ 2022-07-21 17:15 3% Jill Lovato
0 siblings, 0 replies; 200+ results
From: Jill Lovato @ 2022-07-21 17:15 UTC (permalink / raw)
To: announce, users
[-- Attachment #1: Type: text/plain, Size: 2291 bytes --]
DPDK Community,
This is a reminder that the 2022 DPDK Userspace Call For Proposals closes
tomorrow, July 22, at 11:59 pm PT. Please get your submissions in now if
you have not already:
https://linuxfoundation.smapply.io/prog/dpdk_userspace_summit_2022/
*DPDK Userspace 2022 / September 6-8 / Arcachon, France*
Additional details about the event, including registration and suggested
presentation topics, are included below.
We’re seeking speakers for 30-40 minutes each to address the following
topics as listed on this page:
- End user applications and usage of DPDK for real world deployed
solutions (such as cloud, edge, IoT, or networking applications)
- Developer stories, technical challenges when integrating or developing
with DPDK
- Enhancements and additions to the DPDK libraries, functional or
performance-wise
- New networking technologies and their applicability to DPDK
- Hardware NIC capabilities and offloads
- Hardware datapath accelerators (compression, crypto, baseband, GPU,
regex, etc.)
- Virtualization and container networking
- Debug tooling (logging, tracing, telemetry, monitoring)
- DPDK consumability (API/ABI compatibility, OS integration, packaging)
- Project infrastructure, security, testing
- Feedback from usage and deployment of DPDK applications (OSS or
proprietary)
- End user and DPDK adopter suggestions for improvements or feature
enhancement
All speaker applicants should also go through the Userspace registration
process beforehand, and will be granted Early Bird Admission fees ($100)
prior to August 8th. We are open to virtual presenters if absolutely
required, but prefer in-person participation.
Those who are approved by our Tech Board to speak at the event will have
this $100 refunded per Linux Foundation policy.
The main registration page for the event is located here:
https://events.linuxfoundation.org/dpdk-userspace-summit/
We appreciate your time, consideration and investment and look forward to
reviewing your proposals.
Many thanks!
--
*Jill Lovato*
Marketing Communications Director
Networking & Edge
The Linux Foundation
jlovato@linuxfoundation.org
Phone: +1.503.703.8268
[-- Attachment #2: Type: text/html, Size: 8789 bytes --]
^ permalink raw reply [relevance 3%]
* RE: [PATCH v11] sched: enable CMAN at runtime
2022-07-15 14:51 1% ` [PATCH v11] " Marcin Danilewicz
@ 2022-07-26 13:49 0% ` Singh, Jasvinder
2022-07-27 11:58 0% ` Danilewicz, MarcinX
0 siblings, 1 reply; 200+ results
From: Singh, Jasvinder @ 2022-07-26 13:49 UTC (permalink / raw)
To: Danilewicz, MarcinX, dev, Dumitrescu, Cristian; +Cc: Ajmera, Megha
> -----Original Message-----
> From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> Sent: Friday, July 15, 2022 3:51 PM
> To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>
> Subject: [PATCH v11] sched: enable CMAN at runtime
>
> Added changes to enable CMAN (RED or PIE) at init from profile configuration
> file.
>
> By default CMAN code is enable but not in use, when there is no RED or PIE
> profile configured.
>
> Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> ---
> Log: v2 change in rte_sched.h to avoid ABI breakage.
> v3 changes from comments
> v4 rebase to 22.07-rc1
> v5 rebase to main latest
> v6 commit message fixed
> v7 changes from comments
> v8 with changes from comments
> v9 changes from comments
> tmgr.c
> cman_params set to null
> qos_sched/cfg_file.c
> removed redundant cman_params to NULL assignement
> subport_params[].cman_params assigned
> only when CMAN enabled
> v10 removed ip_pipeline app build error from change
> in tmgr.c
> v11 added cman_enabled flag instead
> of testing cman_params.cman_mode variable
> ---
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
^ permalink raw reply [relevance 0%]
* Re: [RFC] regexdev: add maximum number of mbuf segments field
@ 2022-07-26 15:16 3% ` Stephen Hemminger
0 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-07-26 15:16 UTC (permalink / raw)
To: Gerry Gribbon; +Cc: dev, Ori Kam
On Tue, 26 Jul 2022 10:47:07 +0000
Gerry Gribbon <ggribbon@nvidia.com> wrote:
> diff --git a/lib/regexdev/rte_regexdev.h b/lib/regexdev/rte_regexdev.h
> index 3bce8090f6..7d2e1ee1d0 100644
> --- a/lib/regexdev/rte_regexdev.h
> +++ b/lib/regexdev/rte_regexdev.h
> @@ -622,6 +622,8 @@ struct rte_regexdev_info {
> /**< Supported compiler rule flags.
> * @see RTE_REGEX_PCRE_RULE_*, struct rte_regexdev_rule::rule_flags
> */
> + uint16_t max_num_mbuf_segs;
> + /**< Maximum number of mbuf segments that can be chained together. */
> };
>
> /**
Did you notice that that struct is sparse and there is already
an existing hole that could be reused. This is going to be an API/ABI
breakage already so reusing the hole will be ok.
Also, please update the release notes for this.
^ permalink raw reply [relevance 3%]
* RE: [PATCH v11] sched: enable CMAN at runtime
2022-07-26 13:49 0% ` Singh, Jasvinder
@ 2022-07-27 11:58 0% ` Danilewicz, MarcinX
0 siblings, 0 replies; 200+ results
From: Danilewicz, MarcinX @ 2022-07-27 11:58 UTC (permalink / raw)
To: Thomas Monjalon, dev
Cc: Ajmera, Megha, Singh, Jasvinder, Dumitrescu, Cristian
Hi Thomas,
Could you merge this change with the latest DPDK?
Thanks!
Kind Regards,
/Marcin
> -----Original Message-----
> From: Singh, Jasvinder <jasvinder.singh@intel.com>
> Sent: Tuesday, July 26, 2022 3:49 PM
> To: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>; dev@dpdk.org;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>
> Subject: RE: [PATCH v11] sched: enable CMAN at runtime
>
>
>
> > -----Original Message-----
> > From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> > Sent: Friday, July 15, 2022 3:51 PM
> > To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> > Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> > Cc: Ajmera, Megha <megha.ajmera@intel.com>
> > Subject: [PATCH v11] sched: enable CMAN at runtime
> >
> > Added changes to enable CMAN (RED or PIE) at init from profile
> > configuration file.
> >
> > By default CMAN code is enable but not in use, when there is no RED or
> > PIE profile configured.
> >
> > Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> > ---
> > Log: v2 change in rte_sched.h to avoid ABI breakage.
> > v3 changes from comments
> > v4 rebase to 22.07-rc1
> > v5 rebase to main latest
> > v6 commit message fixed
> > v7 changes from comments
> > v8 with changes from comments
> > v9 changes from comments
> > tmgr.c
> > cman_params set to null
> > qos_sched/cfg_file.c
> > removed redundant cman_params to NULL assignement
> > subport_params[].cman_params assigned
> > only when CMAN enabled
> > v10 removed ip_pipeline app build error from change
> > in tmgr.c
> > v11 added cman_enabled flag instead
> > of testing cman_params.cman_mode variable
> > ---
>
> Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
^ permalink raw reply [relevance 0%]
* [PATCH 3/3] mempool: remove deprecated unused defines
2022-07-28 9:35 4% ` [PATCH 1/3] mempool: remove deprecated macro to calculate header size Andrew Rybchenko
2022-07-28 9:35 4% ` [PATCH 2/3] mempool: remove deprecated macro to register mempool driver Andrew Rybchenko
@ 2022-07-28 9:35 5% ` Andrew Rybchenko
2 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-07-28 9:35 UTC (permalink / raw)
To: Ray Kinsella, Olivier Matz; +Cc: dev
MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX defines are unused
since xmem API removal.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/deprecation.rst | 3 ---
doc/guides/rel_notes/release_22_11.rst | 4 ++++
lib/mempool/rte_mempool.h | 6 ------
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 03f9ac806c..351f3ce056 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -32,9 +32,6 @@ Deprecation Notices
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
-* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
- will be removed in DPDK 22.11.
-
* bus: The ``rte_bus`` object will be made opaque in DPDK 22.11.
The goal is to remove it from the public ABI and make this object extendable.
As a side effect, registering a bus will be marked as an internal API:
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 1a3a1549d9..25c49897eb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -91,6 +91,10 @@ API Changes
``MEMPOOL_REGISTER_OPS()`` is removed. Use replacement macro
``RTE_MEMPOOL_REGISTER_OPS()`` instead.
+* mempool: Deprecated macros ``MEMPOOL_PG_NUM_DEFAULT`` and
+ ``MEMPOOL_PG_SHIFT_MAX`` are removed. These macros are not used and
+ not required any more.
+
ABI Changes
-----------
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index b3d3c52e18..a3c4ee351d 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -112,12 +112,6 @@ struct rte_mempool_objsz {
/* "MP_<name>" */
#define RTE_MEMPOOL_MZ_FORMAT RTE_MEMPOOL_MZ_PREFIX "%s"
-#define MEMPOOL_PG_SHIFT_MAX \
- RTE_DEPRECATED(MEMPOOL_PG_SHIFT_MAX) (sizeof(uintptr_t) * CHAR_BIT - 1)
-
-/** Deprecated. Mempool over one chunk of physically continuous memory */
-#define MEMPOOL_PG_NUM_DEFAULT RTE_DEPRECATED(MEMPOOL_PG_NUM_DEFAULT) 1
-
#ifndef RTE_MEMPOOL_ALIGN
/**
* Alignment of elements inside mempool.
--
2.30.2
^ permalink raw reply [relevance 5%]
* [PATCH 2/3] mempool: remove deprecated macro to register mempool driver
2022-07-28 9:35 4% ` [PATCH 1/3] mempool: remove deprecated macro to calculate header size Andrew Rybchenko
@ 2022-07-28 9:35 4% ` Andrew Rybchenko
2022-07-28 9:35 5% ` [PATCH 3/3] mempool: remove deprecated unused defines Andrew Rybchenko
2 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-07-28 9:35 UTC (permalink / raw)
To: Ray Kinsella, Olivier Matz; +Cc: dev
Replacement RTE_MEMPOOL_REGISTER_OPS() should be used instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/deprecation.rst | 4 ----
doc/guides/rel_notes/release_22_11.rst | 4 ++++
lib/mempool/rte_mempool.h | 4 ----
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5036ae845e..03f9ac806c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -32,10 +32,6 @@ Deprecation Notices
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
-* mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
- deprecated and will be removed in DPDK 22.11. Use replacement macro
- ``RTE_MEMPOOL_REGISTER_OPS()``.
-
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index ae72610093..1a3a1549d9 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -87,6 +87,10 @@ API Changes
* mempool: Deprecated helper macro ``MEMPOOL_HEADER_SIZE()`` is removed.
The replacement macro ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
+* mempool: Deprecated macro to register mempool driver
+ ``MEMPOOL_REGISTER_OPS()`` is removed. Use replacement macro
+ ``RTE_MEMPOOL_REGISTER_OPS()`` instead.
+
ABI Changes
-----------
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index e129a5a59d..b3d3c52e18 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -930,10 +930,6 @@ int rte_mempool_register_ops(const struct rte_mempool_ops *ops);
rte_mempool_register_ops(&ops); \
}
-/** Deprecated. Use RTE_MEMPOOL_REGISTER_OPS() instead. */
-#define MEMPOOL_REGISTER_OPS(ops) \
- RTE_DEPRECATED(MEMPOOL_REGISTER_OPS) RTE_MEMPOOL_REGISTER_OPS(ops)
-
/**
* An object callback function for mempool.
*
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 1/3] mempool: remove deprecated macro to calculate header size
@ 2022-07-28 9:35 4% ` Andrew Rybchenko
2022-07-28 9:35 4% ` [PATCH 2/3] mempool: remove deprecated macro to register mempool driver Andrew Rybchenko
2022-07-28 9:35 5% ` [PATCH 3/3] mempool: remove deprecated unused defines Andrew Rybchenko
2 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-07-28 9:35 UTC (permalink / raw)
To: Ray Kinsella, Olivier Matz; +Cc: dev
MEMPOOL_HEADER_SIZE() is removed. The replacement with RTE_ prefix
is internal only since it is implementation details which are not
required in applications.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/deprecation.rst | 4 ----
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/mempool/rte_mempool.h | 4 ----
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..5036ae845e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -32,10 +32,6 @@ Deprecation Notices
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
-* mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
- be removed in DPDK 22.11. The replacement macro
- ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
-
* mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
deprecated and will be removed in DPDK 22.11. Use replacement macro
``RTE_MEMPOOL_REGISTER_OPS()``.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..ae72610093 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* mempool: Deprecated helper macro ``MEMPOOL_HEADER_SIZE()`` is removed.
+ The replacement macro ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
+
ABI Changes
-----------
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index 3ada37cb86..e129a5a59d 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -329,10 +329,6 @@ struct rte_mempool {
(sizeof(*(mp)) + (((cs) == 0) ? 0 : \
(sizeof(struct rte_mempool_cache) * RTE_MAX_LCORE)))
-/** Deprecated. Use RTE_MEMPOOL_HEADER_SIZE() for internal purposes only. */
-#define MEMPOOL_HEADER_SIZE(mp, cs) \
- RTE_DEPRECATED(MEMPOOL_HEADER_SIZE) RTE_MEMPOOL_HEADER_SIZE(mp, cs)
-
/* return the header of a mempool object (internal) */
static inline struct rte_mempool_objhdr *
rte_mempool_get_header(void *obj)
--
2.30.2
^ permalink raw reply [relevance 4%]
* [RFC v3 03/26] raw/ifpga: remove PCI bus accessor
@ 2022-07-28 15:26 4% ` David Marchand
2022-07-28 15:26 3% ` [RFC v3 21/26] bus: hide bus object David Marchand
` (3 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-07-28 15:26 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella, Rosen Xu, Tianfei zhang
There is no in-tree user for this accessor that returns the PCI bus
object.
On the other hand, a bus object can be retrieved by name using
rte_bus_find_by_name.
We can remove this driver specific API.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since RFC v2:
- updated release notes,
---
doc/guides/rel_notes/deprecation.rst | 3 ---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/raw/ifpga/ifpga_rawdev.c | 7 +------
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 6 ------
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 ----------
drivers/raw/ifpga/version.map | 1 -
7 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..dba252067c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -228,9 +228,6 @@ Deprecation Notices
* raw/dpaa2_cmdif: The ``dpaa2_cmdif`` rawdev driver will be deprecated
in DPDK 22.11, as it is no longer in use, no active user known.
-* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` will be removed
- in DPDK 22.11.
-
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..3cea3aa8eb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
+
ABI Changes
-----------
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 8c05302a65..78a7123528 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -10,8 +10,8 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/epoll.h>
+
#include <rte_log.h>
-#include <rte_bus.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
@@ -1888,11 +1888,6 @@ RTE_PMD_REGISTER_PARAM_STRING(ifpga_rawdev_cfg,
"port=<int> "
"afu_bts=<path>");
-struct rte_pci_bus *ifpga_get_pci_bus(void)
-{
- return rte_ifpga_rawdev_pmd.bus;
-}
-
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file)
{
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 4c191190ca..0fb66cbaae 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -91,7 +91,6 @@ int
ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
int vec_start, rte_intr_callback_fn handler, void *arg);
-struct rte_pci_bus *ifpga_get_pci_bus(void);
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file);
void ifpga_rawdev_cleanup(void);
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.c b/drivers/raw/ifpga/rte_pmd_ifpga.c
index 23146432c2..1ca248123b 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.c
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.c
@@ -402,12 +402,6 @@ rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page)
return opae_mgr_reload(adapter->mgr, type, page);
}
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void)
-{
- return ifpga_get_pci_bus();
-}
-
int
rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file)
{
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.h b/drivers/raw/ifpga/rte_pmd_ifpga.h
index 3fa5d3435a..791543f2cd 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.h
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.h
@@ -220,16 +220,6 @@ rte_pmd_ifpga_reboot_try(uint16_t dev_id);
int
rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
-/**
- * Get PCI bus the Intel FPGA driver register to
- *
- * @return
- * - (valid pointer) if successful.
- * - (NULL) if the Intel FPGA driver is not registered to any PCI bus.
- */
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void);
-
/**
* Perform PR (partial reconfiguration) on specified Intel FPGA device
*
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index f5c3959b7f..916da8a4f2 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -3,7 +3,6 @@ DPDK_23 {
rte_pmd_ifpga_cleanup;
rte_pmd_ifpga_get_dev_id;
- rte_pmd_ifpga_get_pci_bus;
rte_pmd_ifpga_get_phy_info;
rte_pmd_ifpga_get_property;
rte_pmd_ifpga_get_rsu_status;
--
2.36.1
^ permalink raw reply [relevance 4%]
* [RFC v3 21/26] bus: hide bus object
2022-07-28 15:26 4% ` [RFC v3 03/26] raw/ifpga: remove PCI bus accessor David Marchand
@ 2022-07-28 15:26 3% ` David Marchand
2022-07-28 16:56 0% ` Bruce Richardson
2022-07-28 15:26 1% ` [RFC v3 23/26] dev: hide driver object David Marchand
` (2 subsequent siblings)
4 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-07-28 15:26 UTC (permalink / raw)
To: dev
Cc: Ray Kinsella, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Rosen Xu, Anatoly Burakov, Stephen Hemminger,
Long Li, Matan Azrad, Viacheslav Ovsiienko, Bruce Richardson,
Kevin Laatz, Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Thomas Monjalon,
Ferruh Yigit, Andrew Rybchenko, Reshma Pattan
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_bus objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
Changes since RFC v1:
- update all existing users of the public header to use the internal one,
---
app/test/test_devargs.c | 2 +-
app/test/test_vdev.c | 2 +-
doc/guides/rel_notes/deprecation.rst | 6 -
doc/guides/rel_notes/release_22_11.rst | 6 +
drivers/bus/auxiliary/auxiliary_common.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/private.h | 2 +-
drivers/bus/dpaa/dpaa_bus.c | 2 +-
drivers/bus/fslmc/fslmc_bus.c | 2 +-
drivers/bus/fslmc/private.h | 2 +-
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/pci_common.c | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/pci/private.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vmbus/private.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 2 +-
drivers/net/failsafe/failsafe.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/raw/ioat/idxd_bus.c | 2 +-
lib/eal/common/eal_common_bus.c | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/hotplug_mp.c | 2 +-
lib/eal/include/bus_driver.h | 296 +++++++++++++++++++++++
lib/eal/include/meson.build | 4 +
lib/eal/include/rte_bus.h | 278 +--------------------
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 8 +-
lib/ethdev/rte_ethdev.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
38 files changed, 343 insertions(+), 319 deletions(-)
create mode 100644 lib/eal/include/bus_driver.h
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index ac5bc34c18..0a4c34a1ad 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -9,7 +9,7 @@
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include "test.h"
diff --git a/app/test/test_vdev.c b/app/test/test_vdev.c
index 3cc3abe70b..c3a8ad64bb 100644
--- a/app/test/test_vdev.c
+++ b/app/test/test_vdev.c
@@ -8,7 +8,7 @@
#include <rte_common.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include "test.h"
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dba252067c..3512f01539 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -43,12 +43,6 @@ Deprecation Notices
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
-* bus: The ``rte_bus`` object will be made opaque in DPDK 22.11.
- The goal is to remove it from the public ABI and make this object extendable.
- As a side effect, registering a bus will be marked as an internal API:
- external users may still register their bus using a new driver header
- (see ``enable_driver_sdk`` meson option).
-
* drivers: As a follow-up of the work on the ``rte_bus`` object,
the ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
their bus-specific counterparts) will be made opaque in DPDK 22.11.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index c55ee19bc2..46bb35ad09 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* bus: Registering a bus has been marked as an internal API.
+ External users may still register their bus using the ``bus_driver.h``
+ driver header (see ``enable_driver_sdk`` meson option).
+ The ``rte_bus`` object is now opaque and must be manipulated through added
+ accessors.
+
* drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``,
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 6cf6c170ec..259ff152c4 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -12,7 +12,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_eal.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index 0289777922..a889e392c6 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_dev.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index 3f49f62493..3dee13e1d1 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "bus_auxiliary_driver.h"
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 1ac6aa314f..682427ba2c 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -29,7 +29,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_ring.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_mbuf_pool_ops.h>
#include <rte_mbuf_dyn.h>
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index b9b0981329..8503004e3d 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
diff --git a/drivers/bus/fslmc/private.h b/drivers/bus/fslmc/private.h
index 60d68155e1..6f14085d98 100644
--- a/drivers/bus/fslmc/private.h
+++ b/drivers/bus/fslmc/private.h
@@ -5,7 +5,7 @@
#ifndef BUS_FSLMC_PRIVATE_H
#define BUS_FSLMC_PRIVATE_H
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 27e2de7072..bb943b58b5 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <rte_errno.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_memzone.h>
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index cd0d0b1670..fab3483d9f 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -18,7 +18,7 @@
#include <rte_malloc.h>
#include <rte_vfio.h>
#include <rte_eal.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_tailq.h>
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 0d61d49287..c26aacd364 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -13,7 +13,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
#include <rte_lcore.h>
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 61a868707f..39d702a418 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include <rte_dev.h>
#include <rte_errno.h>
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 4e40a2ed85..fddf49251d 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -8,7 +8,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <rte_os_shim.h>
#include <rte_pci.h>
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 7d78cf93bc..809a8bb08f 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -12,7 +12,7 @@
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_memory.h>
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index 3d233fa83c..e33424675c 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <sys/uio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_log.h>
#include <rte_eal_paging.h>
diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c
index e82cb881bf..73178ce0f3 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -9,7 +9,7 @@
#include <rte_errno.h>
#include <rte_class.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include "mlx5_common_log.h"
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 13cb967f6d..e30dcfc281 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -8,7 +8,7 @@
#include <sys/mman.h>
#include <libgen.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 1a86eb3c00..6553166f5c 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -4,7 +4,7 @@
#include <rte_devargs.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 5d4d52c341..32811403b4 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -11,7 +11,7 @@
#include <ethdev_vdev.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include "failsafe_private.h"
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index 130344dce2..d71b512f81 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -3,7 +3,7 @@
* Copyright 2017 Mellanox Technologies, Ltd
*/
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index efb262e368..4f0a6f4d55 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -19,7 +19,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <bus_auxiliary_driver.h>
#include <rte_common.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 188d92ffac..ccc06bdda6 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -31,7 +31,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 65043a04eb..dc90569df1 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
#include <rte_dev.h>
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 632451dcbe..9cf4d760b4 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -9,7 +9,7 @@
#endif
#include <rte_io.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "virtio_pci.h"
#include "virtio_logs.h"
diff --git a/drivers/raw/ioat/idxd_bus.c b/drivers/raw/ioat/idxd_bus.c
index 539f51b1b1..f32d811055 100644
--- a/drivers/raw/ioat/idxd_bus.c
+++ b/drivers/raw/ioat/idxd_bus.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/mman.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_string_fns.h>
#include "ioat_private.h"
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index cbf382f967..be64d31b0f 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_debug.h>
#include <rte_string_fns.h>
#include <rte_errno.h>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index b6f0392f30..62a598957c 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c
index d5833af373..03e6e59baf 100644
--- a/lib/eal/common/eal_common_devargs.c
+++ b/lib/eal/common/eal_common_devargs.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <stdarg.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index 1614a57752..5202bd5658 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -3,7 +3,7 @@
*/
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_eal.h>
#include <rte_errno.h>
#include <rte_alarm.h>
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
new file mode 100644
index 0000000000..d2e615a736
--- /dev/null
+++ b/lib/eal/include/bus_driver.h
@@ -0,0 +1,296 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef BUS_DRIVER_H
+#define BUS_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bus.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
+#include <rte_eal.h>
+#include <rte_tailq.h>
+
+struct rte_devargs;
+struct rte_device;
+
+/** Double linked list of buses */
+RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
+
+/**
+ * Bus specific scan for devices attached on the bus.
+ * For each bus object, the scan would be responsible for finding devices and
+ * adding them to its private device list.
+ *
+ * A bus should mandatorily implement this method.
+ *
+ * @return
+ * 0 for successful scan
+ * <0 for unsuccessful scan with error value
+ */
+typedef int (*rte_bus_scan_t)(void);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * This is called while iterating over each registered bus.
+ *
+ * @return
+ * 0 for successful probe
+ * !0 for any error while probing
+ */
+typedef int (*rte_bus_probe_t)(void);
+
+/**
+ * Device iterator to find a device on a bus.
+ *
+ * This function returns an rte_device if one of those held by the bus
+ * matches the data passed as parameter.
+ *
+ * If the comparison function returns zero this function should stop iterating
+ * over any more devices. To continue a search the device of a previous search
+ * can be passed via the start parameter.
+ *
+ * @param cmp
+ * Comparison function.
+ *
+ * @param data
+ * Data to compare each device against.
+ *
+ * @param start
+ * starting point for the iteration
+ *
+ * @return
+ * The first device matching the data, NULL if none exists.
+ */
+typedef struct rte_device *
+(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
+ const void *data);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_plug_t)(struct rte_device *dev);
+
+/**
+ * Implementation specific remove function which is responsible for unlinking
+ * devices on that bus from assigned driver.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
+
+/**
+ * Bus specific parsing function.
+ * Validates the syntax used in the textual representation of a device,
+ * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
+ * device representation to ``addr``.
+ *
+ * @param[in] name
+ * device textual description
+ *
+ * @param[out] addr
+ * device information location address, into which parsed info
+ * should be written. If NULL, nothing should be written, which
+ * is not an error.
+ *
+ * @return
+ * 0 if parsing was successful.
+ * !0 for any error.
+ */
+typedef int (*rte_bus_parse_t)(const char *name, void *addr);
+
+/**
+ * Parse bus part of the device arguments.
+ *
+ * The field name of the struct rte_devargs will be set.
+ *
+ * @param da
+ * Pointer to the devargs to parse.
+ *
+ * @return
+ * 0 on successful parsing, otherwise rte_errno is set.
+ * -EINVAL: on parsing error.
+ * -ENODEV: if no key matching a device argument is specified.
+ * -E2BIG: device name is too long.
+ */
+typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
+
+/**
+ * Device level DMA map function.
+ * After a successful call, the memory segment will be mapped to the
+ * given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to map.
+ * @param iova
+ * IOVA address to map.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Device level DMA unmap function.
+ * After a successful call, the memory segment will no longer be
+ * accessible by the given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to unmap.
+ * @param iova
+ * IOVA address to unmap.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if un-mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Implement a specific hot-unplug handler, which is responsible for
+ * handle the failure when device be hot-unplugged. When the event of
+ * hot-unplug be detected, it could call this function to handle
+ * the hot-unplug failure and avoid app crash.
+ * @param dev
+ * Pointer of the device structure.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
+
+/**
+ * Implement a specific sigbus handler, which is responsible for handling
+ * the sigbus error which is either original memory error, or specific memory
+ * error that caused of device be hot-unplugged. When sigbus error be captured,
+ * it could call this function to handle sigbus error.
+ * @param failure_addr
+ * Pointer of the fault address of the sigbus error.
+ *
+ * @return
+ * 0 for success handle the sigbus for hot-unplug.
+ * 1 for not process it, because it is a generic sigbus error.
+ * -1 for failed to handle the sigbus for hot-unplug.
+ */
+typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
+
+/**
+ * Bus scan policies
+ */
+enum rte_bus_scan_mode {
+ RTE_BUS_SCAN_UNDEFINED,
+ RTE_BUS_SCAN_ALLOWLIST,
+ RTE_BUS_SCAN_BLOCKLIST,
+};
+
+/**
+ * A structure used to configure bus operations.
+ */
+struct rte_bus_conf {
+ enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
+};
+
+
+/**
+ * Get common iommu class of the all the devices on the bus. The bus may
+ * check that those devices are attached to iommu driver.
+ * If no devices are attached to the bus. The bus may return with don't care
+ * (_DC) value.
+ * Otherwise, The bus will return appropriate _pa or _va iova mode.
+ *
+ * @return
+ * enum rte_iova_mode value.
+ */
+typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
+
+/**
+ * A structure describing a generic bus.
+ */
+struct rte_bus {
+ RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
+ const char *name; /**< Name of the bus */
+ rte_bus_scan_t scan; /**< Scan for devices attached to bus */
+ rte_bus_probe_t probe; /**< Probe devices on bus */
+ rte_bus_find_device_t find_device; /**< Find a device on the bus */
+ rte_bus_plug_t plug; /**< Probe single device for drivers */
+ rte_bus_unplug_t unplug; /**< Remove single device from driver */
+ rte_bus_parse_t parse; /**< Parse a device name */
+ rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
+ rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
+ rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
+ struct rte_bus_conf conf; /**< Bus configuration */
+ rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
+ rte_dev_iterate_t dev_iterate; /**< Device iterator. */
+ rte_bus_hot_unplug_handler_t hot_unplug_handler;
+ /**< handle hot-unplug failure on the bus */
+ rte_bus_sigbus_handler_t sigbus_handler;
+ /**< handle sigbus error on the bus */
+};
+
+/**
+ * Register a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be registered.
+ */
+__rte_internal
+void rte_bus_register(struct rte_bus *bus);
+
+/**
+ * Helper for Bus registration.
+ * The constructor has higher priority than PMD constructors.
+ */
+#define RTE_REGISTER_BUS(nm, bus) \
+RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
+{\
+ (bus).name = RTE_STR(nm);\
+ rte_bus_register(&bus); \
+}
+
+/**
+ * Unregister a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be unregistered.
+ */
+__rte_internal
+void rte_bus_unregister(struct rte_bus *bus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BUS_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index fd6e844224..77d8621a51 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -55,6 +55,10 @@ headers += files(
'rte_vfio.h',
)
+driver_sdk_headers = files(
+ 'bus_driver.h',
+)
+
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'generic/rte_atomic.h',
diff --git a/lib/eal/include/rte_bus.h b/lib/eal/include/rte_bus.h
index 3848b44db0..dfe756fb11 100644
--- a/lib/eal/include/rte_bus.h
+++ b/lib/eal/include/rte_bus.h
@@ -20,284 +20,21 @@ extern "C" {
#include <stdio.h>
-#include <rte_dev.h>
#include <rte_eal.h>
-#include <rte_log.h>
-/** Double linked list of buses */
-RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
-
-/**
- * Bus specific scan for devices attached on the bus.
- * For each bus object, the scan would be responsible for finding devices and
- * adding them to its private device list.
- *
- * A bus should mandatorily implement this method.
- *
- * @return
- * 0 for successful scan
- * <0 for unsuccessful scan with error value
- */
-typedef int (*rte_bus_scan_t)(void);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * This is called while iterating over each registered bus.
- *
- * @return
- * 0 for successful probe
- * !0 for any error while probing
- */
-typedef int (*rte_bus_probe_t)(void);
-
-/**
- * Device iterator to find a device on a bus.
- *
- * This function returns an rte_device if one of those held by the bus
- * matches the data passed as parameter.
- *
- * If the comparison function returns zero this function should stop iterating
- * over any more devices. To continue a search the device of a previous search
- * can be passed via the start parameter.
- *
- * @param cmp
- * Comparison function.
- *
- * @param data
- * Data to compare each device against.
- *
- * @param start
- * starting point for the iteration
- *
- * @return
- * The first device matching the data, NULL if none exists.
- */
-typedef struct rte_device *
-(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
- const void *data);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_plug_t)(struct rte_device *dev);
-
-/**
- * Implementation specific remove function which is responsible for unlinking
- * devices on that bus from assigned driver.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
-
-/**
- * Bus specific parsing function.
- * Validates the syntax used in the textual representation of a device,
- * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
- * device representation to ``addr``.
- *
- * @param[in] name
- * device textual description
- *
- * @param[out] addr
- * device information location address, into which parsed info
- * should be written. If NULL, nothing should be written, which
- * is not an error.
- *
- * @return
- * 0 if parsing was successful.
- * !0 for any error.
- */
-typedef int (*rte_bus_parse_t)(const char *name, void *addr);
-
-/**
- * Parse bus part of the device arguments.
- *
- * The field name of the struct rte_devargs will be set.
- *
- * @param da
- * Pointer to the devargs to parse.
- *
- * @return
- * 0 on successful parsing, otherwise rte_errno is set.
- * -EINVAL: on parsing error.
- * -ENODEV: if no key matching a device argument is specified.
- * -E2BIG: device name is too long.
- */
-typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
-
-/**
- * Device level DMA map function.
- * After a successful call, the memory segment will be mapped to the
- * given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to map.
- * @param iova
- * IOVA address to map.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Device level DMA unmap function.
- * After a successful call, the memory segment will no longer be
- * accessible by the given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to unmap.
- * @param iova
- * IOVA address to unmap.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if un-mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Implement a specific hot-unplug handler, which is responsible for
- * handle the failure when device be hot-unplugged. When the event of
- * hot-unplug be detected, it could call this function to handle
- * the hot-unplug failure and avoid app crash.
- * @param dev
- * Pointer of the device structure.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
-
-/**
- * Implement a specific sigbus handler, which is responsible for handling
- * the sigbus error which is either original memory error, or specific memory
- * error that caused of device be hot-unplugged. When sigbus error be captured,
- * it could call this function to handle sigbus error.
- * @param failure_addr
- * Pointer of the fault address of the sigbus error.
- *
- * @return
- * 0 for success handle the sigbus for hot-unplug.
- * 1 for not process it, because it is a generic sigbus error.
- * -1 for failed to handle the sigbus for hot-unplug.
- */
-typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
-
-/**
- * Bus scan policies
- */
-enum rte_bus_scan_mode {
- RTE_BUS_SCAN_UNDEFINED,
- RTE_BUS_SCAN_ALLOWLIST,
- RTE_BUS_SCAN_BLOCKLIST,
-};
-
-/**
- * A structure used to configure bus operations.
- */
-struct rte_bus_conf {
- enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
-};
-
-
-/**
- * Get common iommu class of the all the devices on the bus. The bus may
- * check that those devices are attached to iommu driver.
- * If no devices are attached to the bus. The bus may return with don't care
- * (_DC) value.
- * Otherwise, The bus will return appropriate _pa or _va iova mode.
- *
- * @return
- * enum rte_iova_mode value.
- */
-typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
-
-
-/**
- * A structure describing a generic bus.
- */
-struct rte_bus {
- RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
- const char *name; /**< Name of the bus */
- rte_bus_scan_t scan; /**< Scan for devices attached to bus */
- rte_bus_probe_t probe; /**< Probe devices on bus */
- rte_bus_find_device_t find_device; /**< Find a device on the bus */
- rte_bus_plug_t plug; /**< Probe single device for drivers */
- rte_bus_unplug_t unplug; /**< Remove single device from driver */
- rte_bus_parse_t parse; /**< Parse a device name */
- rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
- rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
- rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
- struct rte_bus_conf conf; /**< Bus configuration */
- rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
- rte_dev_iterate_t dev_iterate; /**< Device iterator. */
- rte_bus_hot_unplug_handler_t hot_unplug_handler;
- /**< handle hot-unplug failure on the bus */
- rte_bus_sigbus_handler_t sigbus_handler;
- /**< handle sigbus error on the bus */
-
-};
+struct rte_bus;
+struct rte_device;
/**
* Retrieve a bus name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param bus
* A pointer to a rte_bus structure.
* @return
* A pointer to the bus name string.
*/
-__rte_experimental
const char *rte_bus_name(const struct rte_bus *bus);
-/**
- * Register a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be registered.
- */
-void rte_bus_register(struct rte_bus *bus);
-
-/**
- * Unregister a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be unregistered.
- */
-void rte_bus_unregister(struct rte_bus *bus);
-
/**
* Scan all the buses.
*
@@ -387,17 +124,6 @@ struct rte_bus *rte_bus_find_by_name(const char *busname);
*/
enum rte_iova_mode rte_bus_get_iommu_class(void);
-/**
- * Helper for Bus registration.
- * The constructor has higher priority than PMD constructors.
- */
-#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
-{\
- (bus).name = RTE_STR(nm);\
- rte_bus_register(&bus); \
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 02ae1cde29..098a2c3076 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -13,7 +13,7 @@
#include <rte_dev.h>
#include <rte_interrupts.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_errno.h>
diff --git a/lib/eal/version.map b/lib/eal/version.map
index aa53064db1..6ec15f1147 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -12,10 +12,9 @@ DPDK_23 {
rte_bus_find_by_device;
rte_bus_find_by_name;
rte_bus_get_iommu_class;
+ rte_bus_name;
rte_bus_probe;
- rte_bus_register;
rte_bus_scan;
- rte_bus_unregister;
rte_calloc;
rte_calloc_socket;
rte_cpu_get_flag_enabled;
@@ -424,14 +423,13 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_bus_name;
};
INTERNAL {
global:
+ rte_bus_register;
+ rte_bus_unregister;
rte_eal_get_baseaddr;
rte_firmware_read;
rte_intr_allow_others;
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index ebbe8cca3d..9eba97f2d2 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_interrupts.h>
#include <rte_memcpy.h>
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 5b079cd14a..72aabd4dd0 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -11,7 +11,7 @@
#include <time.h>
#include <unistd.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_dev.h>
--
2.36.1
^ permalink raw reply [relevance 3%]
* [RFC v3 23/26] dev: hide driver object
2022-07-28 15:26 4% ` [RFC v3 03/26] raw/ifpga: remove PCI bus accessor David Marchand
2022-07-28 15:26 3% ` [RFC v3 21/26] bus: hide bus object David Marchand
@ 2022-07-28 15:26 1% ` David Marchand
2022-07-28 17:00 0% ` Bruce Richardson
2022-08-01 7:06 0% ` Jayatheerthan, Jay
2022-07-28 15:26 2% ` [RFC v3 26/26] dev: hide device object David Marchand
2022-08-04 23:19 3% ` [RFC v3 00/26] Bus and device cleanup for 22.11 Harris, James R
4 siblings, 2 replies; 200+ results
From: David Marchand @ 2022-07-28 15:26 UTC (permalink / raw)
To: dev
Cc: Nicolas Chautru, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Stephen Hemminger, Long Li, Fan Zhang,
Sunila Sahu, Ashish Gupta, Ajit Khaparde, Raveendra Padasalagi,
Vikas Gupta, Chandubabu Namburu, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Gagandeep Singh, Bruce Richardson, Kevin Laatz,
Timothy McDaniel, Jerin Jacob, Elena Agostini, Ciara Loftus,
Qi Zhang, Shepard Siegel, Ed Czeck, John Miller, Steven Webster,
Matt Peters, Rasesh Mody, Shahed Shaikh, Somnath Kotur,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
John Daley, Hyong Youb Kim, Gaetan Rivet, Xiao Wang,
Yuying Zhang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
Viacheslav Ovsiienko, Chaoyong He, Niklas Soderlund,
Harman Kalra, Devendra Singh Rawat, Andrew Rybchenko,
Maciej Czekaj, Maxime Coquelin, Chenbo Xia, Jochen Behrens,
Jakub Palider, Tomasz Duszynski, Ori Kam, Akhil Goyal,
Chengwen Feng, Ray Kinsella, Thomas Monjalon, Ferruh Yigit,
Abhinandan Gujjar, Jay Jayatheerthan, Olivier Matz,
Reshma Pattan
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 2 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/bus_auxiliary_driver.h | 2 +-
drivers/bus/dpaa/bus_dpaa_driver.h | 2 +-
drivers/bus/fslmc/bus_fslmc_driver.h | 2 +-
drivers/bus/fslmc/fslmc_vfio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 2 +-
drivers/bus/pci/bus_pci_driver.h | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/vdev/bus_vdev_driver.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 2 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 1 +
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 2 +-
drivers/event/dpaa/dpaa_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +-
drivers/event/octeontx/ssovf_evdev.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 2 +-
drivers/gpu/cuda/cuda.c | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 2 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 2 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 2 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/ena/ena_ethdev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 2 +-
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/netvsc/hn_nvs.c | 2 +-
drivers/net/netvsc/hn_rndis.c | 2 +-
drivers/net/netvsc/hn_rxtx.c | 2 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
lib/compressdev/rte_compressdev.c | 2 +-
lib/compressdev/rte_compressdev_pmd.c | 2 +-
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +-
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 2 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/include/dev_driver.h | 28 +++++++++++++++++++
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_dev.h | 15 ++--------
lib/eal/version.map | 4 +--
lib/ethdev/ethdev_driver.h | 1 +
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 2 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
lib/eventdev/rte_eventdev.c | 2 +-
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
lib/rawdev/rte_rawdev.c | 2 +-
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/security/rte_security.c | 2 +-
115 files changed, 144 insertions(+), 122 deletions(-)
create mode 100644 lib/eal/include/dev_driver.h
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 46bb35ad09..ff1a2d6543 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -94,6 +94,8 @@ API Changes
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
headers (see ``enable_driver_sdk`` meson option).
+ The ``rte_driver`` object is now opaque and must be manipulated through added
+ accessors.
* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 801e8920df..e2d9409185 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_byteorder.h>
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index c1d877c87f..51dd090c1b 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index f16814e241..036579e3ec 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index a889e392c6..e4c7ee0c3b 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <bus_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/bus_auxiliary_driver.h b/drivers/bus/auxiliary/bus_auxiliary_driver.h
index 1c2d2c04af..58fb7c7f69 100644
--- a/drivers/bus/auxiliary/bus_auxiliary_driver.h
+++ b/drivers/bus/auxiliary/bus_auxiliary_driver.h
@@ -25,7 +25,7 @@ extern "C" {
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#define RTE_BUS_AUXILIARY_NAME "auxiliary"
diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
index cf66fc0c53..26a83b2cdf 100644
--- a/drivers/bus/dpaa/bus_dpaa_driver.h
+++ b/drivers/bus/dpaa/bus_dpaa_driver.h
@@ -7,7 +7,7 @@
#define BUS_DPAA_DRIVER_H
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_mbuf_dyn.h>
#include <rte_mempool.h>
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 798ddebf3a..7ac5fe6ff1 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -29,7 +29,7 @@ extern "C" {
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 8604e43947..5966776a85 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -28,7 +28,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal_memconfig.h>
#include "private.h"
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index cfe4280f87..d7f6e45b7d 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -18,7 +18,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_mbuf_pool_ops.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
index b7d81b518c..07256ed7ec 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <fslmc_logs.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 071b0d297d..4aec7b2cd8 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -30,7 +30,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
index 223e34bcba..65e2d799c3 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
@@ -10,7 +10,7 @@
#include <errno.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "private.h"
#include <fslmc_logs.h>
diff --git a/drivers/bus/pci/bus_pci_driver.h b/drivers/bus/pci/bus_pci_driver.h
index b5c7dee617..0f2f9b5101 100644
--- a/drivers/bus/pci/bus_pci_driver.h
+++ b/drivers/bus/pci/bus_pci_driver.h
@@ -11,7 +11,7 @@ extern "C" {
#endif
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_compat.h>
/** Pathname of PCI devices directory. */
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 39d702a418..d24cc201b8 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -6,7 +6,7 @@
#include <bus_driver.h>
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
index 36748cdfae..bc7e30d7c6 100644
--- a/drivers/bus/vdev/bus_vdev_driver.h
+++ b/drivers/bus/vdev/bus_vdev_driver.h
@@ -11,7 +11,7 @@ extern "C" {
#include <rte_bus_vdev.h>
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
struct rte_vdev_device {
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 809a8bb08f..b176b658fc 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -11,7 +11,7 @@
#include <sys/queue.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
index 2c72614776..2d10a1e8ad 100644
--- a/drivers/bus/vdev/vdev_params.c
+++ b/drivers/bus/vdev/vdev_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include <rte_errno.h>
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index 3424e791c9..e2475a642d 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -12,7 +12,7 @@ extern "C" {
#include <rte_bus_vmbus.h>
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
struct vmbus_channel;
struct vmbus_mon_page;
diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev/qat_dev_gen4.c
index 7ffde5f4c8..85d6ddfcf4 100644
--- a/drivers/common/qat/dev/qat_dev_gen4.c
+++ b/drivers/common/qat/dev/qat_dev_gen4.c
@@ -2,7 +2,7 @@
* Copyright(c) 2021 Intel Corporation
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "qat_device.h"
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 4a1be35b47..e58e4ceec0 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -4,7 +4,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_pci.h>
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 7d657d81bc..445a3baa67 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
index 61d457f4e0..d1ede5e990 100644
--- a/drivers/crypto/bcmfs/bcmfs_qp.c
+++ b/drivers/crypto/bcmfs/bcmfs_qp.c
@@ -8,7 +8,7 @@
#include <rte_atomic.h>
#include <rte_bitmap.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_prefetch.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index bc7fb67218..78272d616c 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -4,7 +4,7 @@
*/
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_malloc.h>
#include <cryptodev_pmd.h>
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 6c3e45e333..013f3be1e6 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -9,7 +9,7 @@
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include "ccp_crypto.h"
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index 3fd9f3c426..db11ac7444 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn10k_cryptodev.h"
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index bd425f95ff..4cfc1f2150 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn9k_cryptodev.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 0cce861899..3b13578de0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <cryptodev_pmd.h>
#include <rte_common.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 7e554cb2b1..c6bd785262 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -19,7 +19,7 @@
#include <rte_security_driver.h>
#endif
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_io.h>
#include <rte_ip.h>
#include <rte_kvargs.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f3a1bd626c..971f82897c 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -5,7 +5,7 @@
#include <rte_common.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_reorder.h>
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index e30dcfc281..9b7b16c6e3 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -9,6 +9,7 @@
#include <libgen.h>
#include <bus_driver.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 5a443acff8..759578378f 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -17,7 +17,7 @@
#include <rte_config.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_eventdev.h>
#include <eventdev_pmd.h>
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index 9f8c6cd8b8..71ac141b66 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -15,7 +15,7 @@
#include <rte_debug.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
#include <rte_ring.h>
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index aa403f9e06..8e470584ea 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_log.h>
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 08df6e223a..1001297cda 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <bus_fslmc_driver.h>
#include <rte_lcore.h>
diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
index 3882a9cf1d..a68d3ac154 100644
--- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c
+++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index fe157c59d5..99fa326ad5 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -7,7 +7,7 @@
#include <rte_common.h>
#include <cryptodev_pmd.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <ethdev_driver.h>
#include <rte_event_eth_rx_adapter.h>
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index 6bd8fec6d4..8513b9a013 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_log.h>
#include <rte_malloc.h>
diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index 2be7b8d2df..a552aabeb8 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -8,7 +8,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <gpudev_driver.h>
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 56c629c681..84371d5d1a 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -20,7 +20,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dpaa2_mempool.h"
#include "fslmc_vfio.h"
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index fd7be47311..9957de2314 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -24,7 +24,7 @@
#include <rte_string_fns.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <rte_lcore.h>
diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
index 748db590c1..71d0b53e03 100644
--- a/drivers/net/ark/ark_global.h
+++ b/drivers/net/ark/ark_global.h
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_version.h>
#include "ark_pktdir.h"
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 7c0cb666fb..b2a08f5635 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_cycles.h>
#include <rte_spinlock.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_io.h>
diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index b9ebf64fb8..a5d11c5832 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -33,7 +33,7 @@
#include <rte_memzone.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_pci.h>
#include <rte_common.h>
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index f36ad30e17..4448cf2de2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -9,7 +9,7 @@
#include "bnx2x_rxtx.h"
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_pci.h>
#include <rte_alarm.h>
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e275d3a53f..1460dce2ab 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6,7 +6,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_malloc.h>
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 77ecbef04c..fd1506ddd4 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -7,7 +7,7 @@
#include <stdbool.h>
#include <unistd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_cycles.h>
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 384080e6d3..bed755f5d9 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -18,7 +18,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_byteorder.h>
#include "common.h"
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index fd71a50a58..45bbeaef0c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -31,7 +31,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "cxgbe.h"
#include "cxgbe_pfvf.h"
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 3c02c98b3d..f8dd833032 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -31,7 +31,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "base/common.h"
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5d91355c9a..5b13cb5c94 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -30,7 +30,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/common.h"
#include "base/t4_regs.h"
diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index 9509f6e8a3..4d33b51fea 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <dpaa2_pmd_logs.h>
#include <dpaa2_hw_pvt.h>
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index f876f4790c..37a8b43114 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
#include "rte_dpaa2_mempool.h"
diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
index 932570c6e0..fbfdf360d1 100644
--- a/drivers/net/dpaa2/dpaa2_recycle.c
+++ b/drivers/net/dpaa2/dpaa2_recycle.c
@@ -14,7 +14,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 7b9c528d13..9436a95ac8 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -13,7 +13,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hexdump.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
index ba0d500f74..63463c4fbf 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.c
+++ b/drivers/net/dpaa2/dpaa2_sparser.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 409de50083..8ee9be12ad 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 43979992d3..d6bcc5bf58 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index e46697b6a1..b775310651 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -21,7 +21,7 @@
#include <rte_eal.h>
#include <rte_atomic.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index 4709675af8..4d27fba585 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -14,7 +14,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_timer.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include "ena_com.h"
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 998436e5e8..cdf0915591 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdint.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 7312c411bd..46f85964e9 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -7,7 +7,7 @@
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index a80f5e2caf..53a451c1b1 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -11,7 +11,7 @@
#include <pthread.h>
#include <rte_atomic.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_devargs.h>
#include <rte_flow.h>
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..7adb20bff9 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_spinlock.h>
#include <rte_kvargs.h>
#include <rte_vect.h>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7bdc453ec1..67111ac251 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -23,7 +23,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_alarm.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_hash_crc.h>
#include <rte_bitmap.h>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 506fcff6e3..ef2ab06475 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -24,7 +24,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 21bd1e2193..15f695682d 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -19,7 +19,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 885d58c0f4..1c3d22ae0f 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -21,7 +21,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "ice_dcf.h"
#include "ice_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 0da267db1f..dee712af98 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -18,7 +18,7 @@
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <iavf_devids.h>
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 552e41692c..04c9ce78a2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#ifdef RTE_LIB_SECURITY
#include <rte_security_driver.h>
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 368342872a..67373a7b78 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -27,7 +27,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 910b76a92c..7e7e1824ef 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -31,7 +31,7 @@
#endif
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index ccc06bdda6..d0bbc0a4c0 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -30,7 +30,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 817fb06dfb..7db82af9f3 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -28,7 +28,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 20f75a17b0..e6f1f28768 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -26,7 +26,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 61cf374224..bc6f60c64a 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -25,7 +25,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include <bus_vmbus_driver.h>
#include <rte_spinlock.h>
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 0e55f0c792..eaafe11fb9 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -19,7 +19,7 @@
#include <rte_debug.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 5cdd34e588..47359501bc 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_common.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 9ada22e2ff..0eee191566 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -15,7 +15,7 @@
#include <bus_vdev_driver.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a38b701183..b781bcdcfd 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -13,7 +13,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ip.h>
/* ecore includes */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 506c62a726..2ec743ebce 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -7,7 +7,7 @@
* for Solarflare) and Solarflare Communications, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index 81f5aa3cc4..3ae5023b6f 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -2,7 +2,7 @@
*
* Copyright(c) 2021 Xilinx, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_bitmap.h>
#include "sfc.h"
diff --git a/drivers/net/sfc/sfc_sw_stats.h b/drivers/net/sfc/sfc_sw_stats.h
index 1abded8018..d9738e5214 100644
--- a/drivers/net/sfc/sfc_sw_stats.h
+++ b/drivers/net/sfc/sfc_sw_stats.h
@@ -5,7 +5,7 @@
#ifndef _SFC_SW_STATS_H
#define _SFC_SW_STATS_H
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "sfc.h"
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 28183ec740..9f57cb1a20 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index dc90569df1..c3e045d892 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -27,7 +27,7 @@
#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d180162abd..edf3becd32 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -24,7 +24,7 @@
#include <rte_memory.h>
#include <rte_eal_paging.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c
index 2b9e35cef5..abc63b0935 100644
--- a/drivers/net/virtio/virtio_pci_ethdev.c
+++ b/drivers/net/virtio/virtio_pci_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "virtio.h"
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 101b1cb500..fd946dec5c 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/vmxnet3_defs.h"
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index db029cbf34..909fb8faab 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -3,7 +3,7 @@
*/
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_pci.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 19b523a815..a06b724866 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -13,7 +13,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_kvargs.h>
#include <rte_log.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index fc257c5f44..8ef7a6b127 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -6,7 +6,7 @@
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_rawdev.h>
#include <bus_vdev_driver.h>
#include <rte_test.h>
diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
index 6ab62a12fc..92cf5f495e 100644
--- a/drivers/regex/mlx5/mlx5_regex_control.c
+++ b/drivers/regex/mlx5/mlx5_regex_control.c
@@ -11,7 +11,7 @@
#include <rte_regexdev.h>
#include <rte_regexdev_core.h>
#include <rte_regexdev_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <mlx5_common.h>
#include <mlx5_glue.h>
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index 7f6dedbc52..639a0d66ca 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -9,7 +9,7 @@
#include <rte_common.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_memzone.h>
diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 9bfae077db..41f1415bea 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -5,7 +5,7 @@
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include "rte_compressdev_internal.h"
diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
index 9fabc399c5..72e52f876f 100644
--- a/lib/compressdev/rte_compressdev_pmd.h
+++ b/lib/compressdev/rte_compressdev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include "rte_compressdev.h"
#include "rte_compressdev_internal.h"
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 75d0075b86..f07b92dfd7 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 3dcc3cb7ed..96d7e225b0 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 42f3221052..1dad092317 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -13,7 +13,7 @@
#include <rte_log.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
index 82ab7a8cc7..acd7f71cd1 100644
--- a/lib/dmadev/rte_dmadev_pmd.h
+++ b/lib/dmadev/rte_dmadev_pmd.h
@@ -14,7 +14,7 @@
* by any application.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dmadev.h"
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 16c5aef1d8..98f3c78795 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -9,7 +9,7 @@
#include <bus_driver.h>
#include <rte_class.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_errno.h>
#include <rte_log.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
new file mode 100644
index 0000000000..015188abd5
--- /dev/null
+++ b/lib/eal/include/dev_driver.h
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef DEV_DRIVER_H
+#define DEV_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include <rte_dev.h>
+
+/**
+ * A structure describing a device driver.
+ */
+struct rte_driver {
+ RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
+ const char *name; /**< Driver name. */
+ const char *alias; /**< Driver alias. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEV_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index 77d8621a51..cfcd40aaed 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -57,6 +57,7 @@ headers += files(
driver_sdk_headers = files(
'bus_driver.h',
+ 'dev_driver.h',
)
# special case install the generic headers, since they go in a subdir
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index fedf67fba1..38057cc0ef 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -23,6 +23,8 @@ extern "C" {
#include <rte_compat.h>
#include <rte_log.h>
+struct rte_driver;
+
/**
* The device event type.
*/
@@ -53,27 +55,14 @@ struct rte_mem_resource {
void *addr; /**< Virtual address, NULL when not mapped. */
};
-/**
- * A structure describing a device driver.
- */
-struct rte_driver {
- RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
- const char *name; /**< Driver name. */
- const char *alias; /**< Driver alias. */
-};
-
/**
* Retrieve a driver name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param driver
* A pointer to a driver structure.
* @return
* A pointer to the driver name string.
*/
-__rte_experimental
const char *
rte_driver_name(const struct rte_driver *driver);
diff --git a/lib/eal/version.map b/lib/eal/version.map
index d10fd89458..8b53a1d258 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -37,6 +37,7 @@ DPDK_23 {
rte_devargs_parsef;
rte_devargs_remove;
rte_devargs_type_count;
+ rte_driver_name;
rte_dump_physmem_layout;
rte_dump_stack;
rte_dump_tailq;
@@ -423,9 +424,6 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_driver_name;
};
INTERNAL {
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 5101868ea7..47a55a419e 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -19,6 +19,7 @@ extern "C" {
*
*/
+#include <dev_driver.h>
#include <rte_ethdev.h>
/**
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 69402668d8..def6cd0876 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -22,7 +22,7 @@ extern "C" {
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_config.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 7c695176f4..5bc10312fc 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdbool.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index bf8741d2ea..4f4efdae9f 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -9,7 +9,7 @@
#include <rte_cycles.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <rte_log.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 1dc4f966be..54abee2b3f 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_common.h>
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index 0e55b00bfe..23972b3dbd 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_gpudev.h"
diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
index d60235a7e3..058ad147a5 100644
--- a/lib/mempool/rte_mempool_ops.c
+++ b/lib/mempool/rte_mempool_ops.c
@@ -10,7 +10,7 @@
#include <rte_string_fns.h>
#include <rte_mempool.h>
#include <rte_errno.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_mempool_trace.h"
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 72aabd4dd0..af2b814251 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -14,7 +14,7 @@
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index 2f0a4f132e..bc51258143 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
#include <rte_telemetry.h>
diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
index 3b7be57d3e..a51944c8ff 100644
--- a/lib/rawdev/rte_rawdev_pmd.h
+++ b/lib/rawdev/rte_rawdev_pmd.h
@@ -19,7 +19,7 @@ extern "C" {
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
index 046b6496d2..d036ed33f6 100644
--- a/lib/security/rte_security.c
+++ b/lib/security/rte_security.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_cryptodev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_telemetry.h>
#include "rte_security.h"
#include "rte_security_driver.h"
--
2.36.1
^ permalink raw reply [relevance 1%]
* [RFC v3 26/26] dev: hide device object
` (2 preceding siblings ...)
2022-07-28 15:26 1% ` [RFC v3 23/26] dev: hide driver object David Marchand
@ 2022-07-28 15:26 2% ` David Marchand
2022-07-28 17:04 0% ` Bruce Richardson
2022-08-04 23:19 3% ` [RFC v3 00/26] Bus and device cleanup for 22.11 Harris, James R
4 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-07-28 15:26 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella, Maxime Coquelin, Chenbo Xia
Make rte_device opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Some applications may have been dereferencing rte_device objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
---
doc/guides/rel_notes/deprecation.rst | 7 -----
doc/guides/rel_notes/release_22_11.rst | 4 +--
lib/eal/common/eal_private.h | 2 +-
lib/eal/include/dev_driver.h | 13 +++++++++
lib/eal/include/rte_dev.h | 37 --------------------------
lib/eal/version.map | 14 +++++-----
lib/vhost/vdpa.c | 1 +
7 files changed, 23 insertions(+), 55 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3512f01539..429ef298c5 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -43,13 +43,6 @@ Deprecation Notices
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
-* drivers: As a follow-up of the work on the ``rte_bus`` object,
- the ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
- their bus-specific counterparts) will be made opaque in DPDK 22.11.
- Registering a driver on a bus will be marked as an internal API:
- external users may still register their drivers using the bus-specific
- driver header (see ``enable_driver_sdk`` meson option).
-
* bus: The ``dev->device.numa_node`` field is set by each bus driver for
every device it manages to indicate on which NUMA node this device lies.
When this information is unknown, the assigned value is not consistent
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index ff1a2d6543..cff2667f39 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -94,8 +94,8 @@ API Changes
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
headers (see ``enable_driver_sdk`` meson option).
- The ``rte_driver`` object is now opaque and must be manipulated through added
- accessors.
+ The ``rte_driver`` and ``rte_device`` objects are now opaque and must be
+ manipulated through added accessors.
* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
diff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h
index 44d14241f0..3ca9ce2ffc 100644
--- a/lib/eal/common/eal_private.h
+++ b/lib/eal/common/eal_private.h
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_lcore.h>
#include <rte_memory.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
index 015188abd5..5efa8c437e 100644
--- a/lib/eal/include/dev_driver.h
+++ b/lib/eal/include/dev_driver.h
@@ -21,6 +21,19 @@ struct rte_driver {
const char *alias; /**< Driver alias. */
};
+/**
+ * A structure describing a generic device.
+ */
+struct rte_device {
+ RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
+ const char *name; /**< Device name */
+ const char *bus_info; /**< Device bus specific information */
+ const struct rte_driver *driver; /**< Driver assigned after probing */
+ const struct rte_bus *bus; /**< Bus handle assigned on scan */
+ int numa_node; /**< NUMA node connection */
+ struct rte_devargs *devargs; /**< Arguments for latest probing */
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index be8bbe79ee..b58cbd2236 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -72,90 +72,66 @@ rte_driver_name(const struct rte_driver *driver);
/**
* Retrieve a device bus.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device bus.
*/
-__rte_experimental
const struct rte_bus *
rte_dev_bus(const struct rte_device *dev);
/**
* Retrieve bus specific information for a device.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A string describing this device or NULL if none is available.
*/
-__rte_experimental
const char *
rte_dev_bus_info(const struct rte_device *dev);
/**
* Retrieve a device arguments.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device devargs.
*/
-__rte_experimental
const struct rte_devargs *
rte_dev_devargs(const struct rte_device *dev);
/**
* Retrieve a device driver.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device driver.
*/
-__rte_experimental
const struct rte_driver *
rte_dev_driver(const struct rte_device *dev);
/**
* Retrieve a device name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device name.
*/
-__rte_experimental
const char *
rte_dev_name(const struct rte_device *dev);
/**
* Retrieve a device numa node.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device numa node.
*/
-__rte_experimental
int
rte_dev_numa_node(const struct rte_device *dev);
@@ -165,19 +141,6 @@ rte_dev_numa_node(const struct rte_device *dev);
*/
#define RTE_DEV_NAME_MAX_LEN 64
-/**
- * A structure describing a generic device.
- */
-struct rte_device {
- RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
- const char *name; /**< Device name */
- const char *bus_info; /**< Device bus specific information */
- const struct rte_driver *driver; /**< Driver assigned after probing */
- const struct rte_bus *bus; /**< Bus handle assigned on scan */
- int numa_node; /**< NUMA node connection */
- struct rte_devargs *devargs; /**< Arguments for latest probing */
-};
-
/**
* Query status of a device.
*
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 0cf321605e..3c14cf2724 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -26,7 +26,13 @@ DPDK_23 {
rte_delay_us_block;
rte_delay_us_callback_register;
rte_delay_us_sleep;
+ rte_dev_bus;
+ rte_dev_bus_info;
+ rte_dev_devargs;
+ rte_dev_driver;
rte_dev_is_probed;
+ rte_dev_name;
+ rte_dev_numa_node;
rte_dev_probe;
rte_dev_remove;
rte_devargs_add;
@@ -424,14 +430,6 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_dev_bus;
- rte_dev_bus_info;
- rte_dev_devargs;
- rte_dev_driver;
- rte_dev_name;
- rte_dev_numa_node;
};
INTERNAL {
diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index bdebcbe565..aaf3f267e9 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -10,6 +10,7 @@
#include <sys/queue.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_class.h>
#include <rte_malloc.h>
--
2.36.1
^ permalink raw reply [relevance 2%]
* Re: [RFC v3 21/26] bus: hide bus object
2022-07-28 15:26 3% ` [RFC v3 21/26] bus: hide bus object David Marchand
@ 2022-07-28 16:56 0% ` Bruce Richardson
2022-07-28 19:26 0% ` David Marchand
0 siblings, 1 reply; 200+ results
From: Bruce Richardson @ 2022-07-28 16:56 UTC (permalink / raw)
To: David Marchand
Cc: dev, Ray Kinsella, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Rosen Xu, Anatoly Burakov, Stephen Hemminger,
Long Li, Matan Azrad, Viacheslav Ovsiienko, Kevin Laatz,
Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Thomas Monjalon,
Ferruh Yigit, Andrew Rybchenko, Reshma Pattan
On Thu, Jul 28, 2022 at 05:26:35PM +0200, David Marchand wrote:
> Make rte_bus opaque for non internal users.
> This will make extending this object possible without breaking the ABI.
>
> Introduce a new driver header and move rte_bus definition and helpers.
> Update drivers and library to use the internal header.
>
> Some applications may have been dereferencing rte_bus objects, mark
> this object's accessors as stable.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Changes since RFC v2:
> - updated release notes,
> - marked accessors as stable,
>
> Changes since RFC v1:
> - update all existing users of the public header to use the internal one,
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
One small comment below...
> ---
> app/test/test_devargs.c | 2 +-
<snip>
> lib/pcapng/rte_pcapng.c | 2 +-
> 38 files changed, 343 insertions(+), 319 deletions(-)
> create mode 100644 lib/eal/include/bus_driver.h
>
> diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
> index ac5bc34c18..0a4c34a1ad 100644
> --- a/app/test/test_devargs.c
> +++ b/app/test/test_devargs.c
> @@ -9,7 +9,7 @@
> #include <rte_common.h>
> #include <rte_devargs.h>
> #include <rte_kvargs.h>
> -#include <rte_bus.h>
> +#include <bus_driver.h>
> #include <rte_class.h>
>
This seems a strange file to need to access bus internals. Maybe something
to investigate in future.
^ permalink raw reply [relevance 0%]
* Re: [RFC v3 23/26] dev: hide driver object
2022-07-28 15:26 1% ` [RFC v3 23/26] dev: hide driver object David Marchand
@ 2022-07-28 17:00 0% ` Bruce Richardson
2022-08-01 17:18 0% ` Ajit Khaparde
2022-08-01 7:06 0% ` Jayatheerthan, Jay
1 sibling, 1 reply; 200+ results
From: Bruce Richardson @ 2022-07-28 17:00 UTC (permalink / raw)
To: David Marchand
Cc: dev, Nicolas Chautru, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Stephen Hemminger, Long Li, Fan Zhang,
Sunila Sahu, Ashish Gupta, Ajit Khaparde, Raveendra Padasalagi,
Vikas Gupta, Chandubabu Namburu, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Gagandeep Singh, Kevin Laatz, Timothy McDaniel,
Jerin Jacob, Elena Agostini, Ciara Loftus, Qi Zhang,
Shepard Siegel, Ed Czeck, John Miller, Steven Webster,
Matt Peters, Rasesh Mody, Shahed Shaikh, Somnath Kotur,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
John Daley, Hyong Youb Kim, Gaetan Rivet, Xiao Wang,
Yuying Zhang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
Viacheslav Ovsiienko, Chaoyong He, Niklas Soderlund,
Harman Kalra, Devendra Singh Rawat, Andrew Rybchenko,
Maciej Czekaj, Maxime Coquelin, Chenbo Xia, Jochen Behrens,
Jakub Palider, Tomasz Duszynski, Ori Kam, Akhil Goyal,
Chengwen Feng, Ray Kinsella, Thomas Monjalon, Ferruh Yigit,
Abhinandan Gujjar, Jay Jayatheerthan, Olivier Matz,
Reshma Pattan
On Thu, Jul 28, 2022 at 05:26:37PM +0200, David Marchand wrote:
> Make rte_driver opaque for non internal users.
> This will make extending this object possible without breaking the ABI.
>
> Introduce a new driver header and move rte_driver definition.
> Update drivers and library to use the internal header.
>
> Some applications may have been dereferencing rte_driver objects, mark
> this object's accessors as stable.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [relevance 0%]
* Re: [RFC v3 26/26] dev: hide device object
2022-07-28 15:26 2% ` [RFC v3 26/26] dev: hide device object David Marchand
@ 2022-07-28 17:04 0% ` Bruce Richardson
0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2022-07-28 17:04 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Ray Kinsella, Maxime Coquelin, Chenbo Xia
On Thu, Jul 28, 2022 at 05:26:40PM +0200, David Marchand wrote:
> Make rte_device opaque for non internal users.
> This will make extending this object possible without breaking the ABI.
>
> Some applications may have been dereferencing rte_device objects, mark
> this object's accessors as stable.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [relevance 0%]
* Re: [RFC v3 21/26] bus: hide bus object
2022-07-28 16:56 0% ` Bruce Richardson
@ 2022-07-28 19:26 0% ` David Marchand
2022-07-29 10:01 0% ` Bruce Richardson
0 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-07-28 19:26 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, Ray Kinsella, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Rosen Xu, Anatoly Burakov, Stephen Hemminger,
Long Li, Matan Azrad, Viacheslav Ovsiienko, Kevin Laatz,
Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Thomas Monjalon,
Ferruh Yigit, Andrew Rybchenko, Reshma Pattan
On Thu, Jul 28, 2022 at 6:57 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Jul 28, 2022 at 05:26:35PM +0200, David Marchand wrote:
> > Make rte_bus opaque for non internal users.
> > This will make extending this object possible without breaking the ABI.
> >
> > Introduce a new driver header and move rte_bus definition and helpers.
> > Update drivers and library to use the internal header.
> >
> > Some applications may have been dereferencing rte_bus objects, mark
> > this object's accessors as stable.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > Changes since RFC v2:
> > - updated release notes,
> > - marked accessors as stable,
> >
> > Changes since RFC v1:
> > - update all existing users of the public header to use the internal one,
> >
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
> One small comment below...
>
> > ---
> > app/test/test_devargs.c | 2 +-
> <snip>
> > lib/pcapng/rte_pcapng.c | 2 +-
> > 38 files changed, 343 insertions(+), 319 deletions(-)
> > create mode 100644 lib/eal/include/bus_driver.h
> >
> > diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
> > index ac5bc34c18..0a4c34a1ad 100644
> > --- a/app/test/test_devargs.c
> > +++ b/app/test/test_devargs.c
> > @@ -9,7 +9,7 @@
> > #include <rte_common.h>
> > #include <rte_devargs.h>
> > #include <rte_kvargs.h>
> > -#include <rte_bus.h>
> > +#include <bus_driver.h>
> > #include <rte_class.h>
> >
>
> This seems a strange file to need to access bus internals. Maybe something
> to investigate in future.
Yeah... I am not sure it is worth fixing.
This code dereferences a bus object to check the ring driver
registered (by calling vdev_bus->parse()).
We could make it possible to list the drivers (maybe per bus, or even globally).
Or we may expose something like bus_can_parse() / rte_bus_find_by_device_name().
But I did not find applications needing this so I let the code as is.
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: [RFC v3 21/26] bus: hide bus object
2022-07-28 19:26 0% ` David Marchand
@ 2022-07-29 10:01 0% ` Bruce Richardson
0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2022-07-29 10:01 UTC (permalink / raw)
To: David Marchand
Cc: dev, Ray Kinsella, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Rosen Xu, Anatoly Burakov, Stephen Hemminger,
Long Li, Matan Azrad, Viacheslav Ovsiienko, Kevin Laatz,
Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Thomas Monjalon,
Ferruh Yigit, Andrew Rybchenko, Reshma Pattan
On Thu, Jul 28, 2022 at 09:26:16PM +0200, David Marchand wrote:
> On Thu, Jul 28, 2022 at 6:57 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Thu, Jul 28, 2022 at 05:26:35PM +0200, David Marchand wrote:
> > > Make rte_bus opaque for non internal users.
> > > This will make extending this object possible without breaking the ABI.
> > >
> > > Introduce a new driver header and move rte_bus definition and helpers.
> > > Update drivers and library to use the internal header.
> > >
> > > Some applications may have been dereferencing rte_bus objects, mark
> > > this object's accessors as stable.
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> > > Changes since RFC v2:
> > > - updated release notes,
> > > - marked accessors as stable,
> > >
> > > Changes since RFC v1:
> > > - update all existing users of the public header to use the internal one,
> > >
> >
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> >
> > One small comment below...
> >
> > > ---
> > > app/test/test_devargs.c | 2 +-
> > <snip>
> > > lib/pcapng/rte_pcapng.c | 2 +-
> > > 38 files changed, 343 insertions(+), 319 deletions(-)
> > > create mode 100644 lib/eal/include/bus_driver.h
> > >
> > > diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
> > > index ac5bc34c18..0a4c34a1ad 100644
> > > --- a/app/test/test_devargs.c
> > > +++ b/app/test/test_devargs.c
> > > @@ -9,7 +9,7 @@
> > > #include <rte_common.h>
> > > #include <rte_devargs.h>
> > > #include <rte_kvargs.h>
> > > -#include <rte_bus.h>
> > > +#include <bus_driver.h>
> > > #include <rte_class.h>
> > >
> >
> > This seems a strange file to need to access bus internals. Maybe something
> > to investigate in future.
>
> Yeah... I am not sure it is worth fixing.
>
> This code dereferences a bus object to check the ring driver
> registered (by calling vdev_bus->parse()).
> We could make it possible to list the drivers (maybe per bus, or even globally).
> Or we may expose something like bus_can_parse() / rte_bus_find_by_device_name().
>
> But I did not find applications needing this so I let the code as is.
>
Agree it may not be worth fixing.
However, if we do look to fix, how about just dropping the runtime check
completely and just using a build-time one for the RTE_NET_RING macro. I
don't consider it valid for the tests to run with some of the built drivers
deleted. If it was enabled in the build, I think the tests are ok to assume
it is present at runtime.
/Bruce
^ permalink raw reply [relevance 0%]
* RE: [RFC v3 23/26] dev: hide driver object
2022-07-28 15:26 1% ` [RFC v3 23/26] dev: hide driver object David Marchand
2022-07-28 17:00 0% ` Bruce Richardson
@ 2022-08-01 7:06 0% ` Jayatheerthan, Jay
1 sibling, 0 replies; 200+ results
From: Jayatheerthan, Jay @ 2022-08-01 7:06 UTC (permalink / raw)
To: David Marchand, dev
Cc: Chautru, Nicolas, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Stephen Hemminger, Long Li, Zhang, Roy Fan,
Sunila Sahu, Ashish Gupta, Ajit Khaparde, Raveendra Padasalagi,
Vikas Gupta, Chandubabu Namburu, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Gagandeep Singh, Richardson, Bruce, Laatz,
Kevin, McDaniel, Timothy, Jerin Jacob, Elena Agostini, Loftus,
Ciara, Zhang, Qi Z, Shepard Siegel, Ed Czeck, John Miller,
Webster, Steven, Peters, Matt, Rasesh Mody, Shahed Shaikh,
Somnath Kotur, Rahul Lakkireddy, Su, Simei, Wu, Wenjun1,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, Daley, John, Hyong Youb Kim, Gaetan Rivet, Wang,
Xiao W, Zhang, Yuying, Xing, Beilei, Wu, Jingjing, Yang, Qiming,
Matan Azrad, Viacheslav Ovsiienko, Chaoyong He, Niklas Soderlund,
Harman Kalra, Devendra Singh Rawat, Andrew Rybchenko,
Maciej Czekaj, Maxime Coquelin, Xia, Chenbo, Jochen Behrens,
Jakub Palider, Tomasz Duszynski, Ori Kam, Akhil Goyal,
Chengwen Feng, Ray Kinsella, Thomas Monjalon, Ferruh Yigit,
Gujjar, Abhinandan S, Matz, Olivier, Pattan, Reshma
Looks good to me.
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Thursday, July 28, 2022 8:57 PM
> To: dev@dpdk.org
> Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Parav Pandit <parav@nvidia.com>; Xueming Li <xuemingl@nvidia.com>; Hemant
> Agrawal <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@oss.nxp.com>; Stephen Hemminger <sthemmin@microsoft.com>;
> Long Li <longli@microsoft.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Sunila Sahu <ssahu@marvell.com>; Ashish Gupta
> <ashish.gupta@marvell.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>; Raveendra Padasalagi
> <raveendra.padasalagi@broadcom.com>; Vikas Gupta <vikas.gupta@broadcom.com>; Chandubabu Namburu <chandu@amd.com>;
> Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>;
> Gagandeep Singh <g.singh@nxp.com>; Richardson, Bruce <bruce.richardson@intel.com>; Laatz, Kevin <kevin.laatz@intel.com>;
> McDaniel, Timothy <timothy.mcdaniel@intel.com>; Jerin Jacob <jerinj@marvell.com>; Elena Agostini <eagostini@nvidia.com>; Loftus,
> Ciara <ciara.loftus@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Shepard Siegel <shepard.siegel@atomicrules.com>; Ed Czeck
> <ed.czeck@atomicrules.com>; John Miller <john.miller@atomicrules.com>; Webster, Steven <steven.webster@windriver.com>; Peters,
> Matt <matt.peters@windriver.com>; Rasesh Mody <rmody@marvell.com>; Shahed Shaikh <shshaikh@marvell.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>; Su, Simei <simei.su@intel.com>; Wu, Wenjun1
> <wenjun1.wu@intel.com>; Marcin Wojtas <mw@semihalf.com>; Michal Krawczyk <mk@semihalf.com>; Shai Brandes
> <shaibran@amazon.com>; Evgeny Schemeilin <evgenys@amazon.com>; Igor Chauskin <igorch@amazon.com>; Daley, John
> <johndale@cisco.com>; Hyong Youb Kim <hyonkim@cisco.com>; Gaetan Rivet <grive@u256.net>; Wang, Xiao W
> <xiao.w.wang@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Matan Azrad <matan@nvidia.com>; Viacheslav Ovsiienko
> <viacheslavo@nvidia.com>; Chaoyong He <chaoyong.he@corigine.com>; Niklas Soderlund <niklas.soderlund@corigine.com>; Harman
> Kalra <hkalra@marvell.com>; Devendra Singh Rawat <dsinghrawat@marvell.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>; Maciej Czekaj <mczekaj@marvell.com>; Maxime Coquelin <maxime.coquelin@redhat.com>; Xia,
> Chenbo <chenbo.xia@intel.com>; Jochen Behrens <jbehrens@vmware.com>; Jakub Palider <jpalider@marvell.com>; Tomasz Duszynski
> <tduszynski@marvell.com>; Ori Kam <orika@nvidia.com>; Akhil Goyal <gakhil@marvell.com>; Chengwen Feng
> <fengchengwen@huawei.com>; Ray Kinsella <mdr@ashroe.eu>; Thomas Monjalon <thomas@monjalon.net>; Ferruh Yigit
> <ferruh.yigit@xilinx.com>; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>;
> Matz, Olivier <olivier.matz@6wind.com>; Pattan, Reshma <reshma.pattan@intel.com>
> Subject: [RFC v3 23/26] dev: hide driver object
>
> Make rte_driver opaque for non internal users.
> This will make extending this object possible without breaking the ABI.
>
> Introduce a new driver header and move rte_driver definition.
> Update drivers and library to use the internal header.
>
> Some applications may have been dereferencing rte_driver objects, mark
> this object's accessors as stable.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Changes since RFC v2:
> - updated release notes,
> - marked accessors as stable,
>
> ---
> doc/guides/rel_notes/release_22_11.rst | 2 ++
> drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
> .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 2 +-
> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +-
> drivers/bus/auxiliary/auxiliary_params.c | 2 +-
> drivers/bus/auxiliary/bus_auxiliary_driver.h | 2 +-
> drivers/bus/dpaa/bus_dpaa_driver.h | 2 +-
> drivers/bus/fslmc/bus_fslmc_driver.h | 2 +-
> drivers/bus/fslmc/fslmc_vfio.c | 2 +-
> drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +-
> drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +-
> drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
> drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 2 +-
> drivers/bus/pci/bus_pci_driver.h | 2 +-
> drivers/bus/pci/pci_params.c | 2 +-
> drivers/bus/vdev/bus_vdev_driver.h | 2 +-
> drivers/bus/vdev/vdev.c | 2 +-
> drivers/bus/vdev/vdev_params.c | 2 +-
> drivers/bus/vmbus/bus_vmbus_driver.h | 2 +-
> drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
> drivers/common/qat/qat_qp.c | 2 +-
> drivers/compress/zlib/zlib_pmd_ops.c | 2 +-
> drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
> drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
> drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
> drivers/crypto/cnxk/cn10k_cryptodev.c | 2 +-
> drivers/crypto/cnxk/cn9k_cryptodev.c | 2 +-
> drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
> drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +-
> drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
> drivers/dma/idxd/idxd_bus.c | 1 +
> drivers/event/dlb2/dlb2.c | 2 +-
> drivers/event/dlb2/pf/dlb2_pf.c | 2 +-
> drivers/event/dpaa/dpaa_eventdev.c | 2 +-
> drivers/event/dpaa2/dpaa2_eventdev.c | 2 +-
> drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +-
> drivers/event/octeontx/ssovf_evdev.c | 2 +-
> drivers/event/skeleton/skeleton_eventdev.c | 2 +-
> drivers/gpu/cuda/cuda.c | 2 +-
> drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
> drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
> drivers/net/ark/ark_global.h | 2 +-
> drivers/net/avp/avp_ethdev.c | 2 +-
> drivers/net/axgbe/axgbe_common.h | 2 +-
> drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
> drivers/net/bnxt/bnxt_ethdev.c | 2 +-
> drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
> drivers/net/cxgbe/base/t4_hw.c | 2 +-
> drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
> drivers/net/cxgbe/cxgbe_main.c | 2 +-
> drivers/net/cxgbe/sge.c | 2 +-
> drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
> drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
> drivers/net/dpaa2/dpaa2_recycle.c | 2 +-
> drivers/net/dpaa2/dpaa2_rxtx.c | 2 +-
> drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
> drivers/net/e1000/em_ethdev.c | 2 +-
> drivers/net/e1000/igb_ethdev.c | 2 +-
> drivers/net/e1000/igb_flow.c | 2 +-
> drivers/net/ena/ena_ethdev.h | 2 +-
> drivers/net/enic/enic_ethdev.c | 2 +-
> drivers/net/enic/enic_vf_representor.c | 2 +-
> drivers/net/failsafe/failsafe_private.h | 2 +-
> drivers/net/fm10k/fm10k_ethdev.c | 2 +-
> drivers/net/i40e/i40e_ethdev.c | 2 +-
> drivers/net/iavf/iavf_ethdev.c | 2 +-
> drivers/net/iavf/iavf_vchnl.c | 2 +-
> drivers/net/ice/ice_dcf.c | 2 +-
> drivers/net/ice/ice_dcf_ethdev.c | 2 +-
> drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
> drivers/net/ixgbe/ixgbe_flow.c | 2 +-
> drivers/net/mlx4/mlx4.c | 2 +-
> drivers/net/netvsc/hn_ethdev.c | 2 +-
> drivers/net/netvsc/hn_nvs.c | 2 +-
> drivers/net/netvsc/hn_rndis.c | 2 +-
> drivers/net/netvsc/hn_rxtx.c | 2 +-
> drivers/net/nfp/nfp_common.c | 2 +-
> drivers/net/nfp/nfp_ethdev.c | 2 +-
> drivers/net/octeontx/octeontx_ethdev.c | 2 +-
> drivers/net/qede/qede_ethdev.h | 2 +-
> drivers/net/sfc/sfc_ethdev.c | 2 +-
> drivers/net/sfc/sfc_sw_stats.c | 2 +-
> drivers/net/sfc/sfc_sw_stats.h | 2 +-
> drivers/net/thunderx/nicvf_ethdev.c | 2 +-
> drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
> drivers/net/virtio/virtio_ethdev.c | 2 +-
> drivers/net/virtio/virtio_pci_ethdev.c | 2 +-
> drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
> drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
> drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
> drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
> drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
> lib/compressdev/rte_compressdev.c | 2 +-
> lib/compressdev/rte_compressdev_pmd.c | 2 +-
> lib/compressdev/rte_compressdev_pmd.h | 1 +
> lib/cryptodev/cryptodev_pmd.c | 2 +-
> lib/cryptodev/cryptodev_pmd.h | 1 +
> lib/cryptodev/rte_cryptodev.c | 2 +-
> lib/dmadev/rte_dmadev_pmd.h | 2 +-
> lib/eal/common/eal_common_dev.c | 2 +-
> lib/eal/include/dev_driver.h | 28 +++++++++++++++++++
> lib/eal/include/meson.build | 1 +
> lib/eal/include/rte_dev.h | 15 ++--------
> lib/eal/version.map | 4 +--
> lib/ethdev/ethdev_driver.h | 1 +
> lib/eventdev/eventdev_pmd.h | 2 +-
> lib/eventdev/rte_event_crypto_adapter.c | 2 +-
> lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
> lib/eventdev/rte_eventdev.c | 2 +-
> lib/gpudev/gpudev_driver.h | 2 +-
> lib/mempool/rte_mempool_ops.c | 2 +-
> lib/pcapng/rte_pcapng.c | 2 +-
> lib/rawdev/rte_rawdev.c | 2 +-
> lib/rawdev/rte_rawdev_pmd.h | 2 +-
> lib/security/rte_security.c | 2 +-
> 115 files changed, 144 insertions(+), 122 deletions(-)
> create mode 100644 lib/eal/include/dev_driver.h
>
> diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
> index 46bb35ad09..ff1a2d6543 100644
> --- a/doc/guides/rel_notes/release_22_11.rst
> +++ b/doc/guides/rel_notes/release_22_11.rst
> @@ -94,6 +94,8 @@ API Changes
> ``vdev``, ``vmbus`` buses has been marked as an internal API.
> External users may still register their driver using the associated driver
> headers (see ``enable_driver_sdk`` meson option).
> + The ``rte_driver`` object is now opaque and must be manipulated through added
> + accessors.
>
> * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 801e8920df..e2d9409185 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -6,7 +6,7 @@
>
> #include <rte_common.h>
> #include <rte_log.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_mempool.h>
> #include <rte_byteorder.h>
> diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> index c1d877c87f..51dd090c1b 100644
> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> @@ -6,7 +6,7 @@
>
> #include <rte_common.h>
> #include <rte_log.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_mempool.h>
> #include <rte_errno.h>
> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> index f16814e241..036579e3ec 100644
> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> @@ -6,7 +6,7 @@
>
> #include <rte_common.h>
> #include <rte_log.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_mempool.h>
> #include <rte_errno.h>
> diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
> index a889e392c6..e4c7ee0c3b 100644
> --- a/drivers/bus/auxiliary/auxiliary_params.c
> +++ b/drivers/bus/auxiliary/auxiliary_params.c
> @@ -5,7 +5,7 @@
> #include <string.h>
>
> #include <bus_driver.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_kvargs.h>
>
> diff --git a/drivers/bus/auxiliary/bus_auxiliary_driver.h b/drivers/bus/auxiliary/bus_auxiliary_driver.h
> index 1c2d2c04af..58fb7c7f69 100644
> --- a/drivers/bus/auxiliary/bus_auxiliary_driver.h
> +++ b/drivers/bus/auxiliary/bus_auxiliary_driver.h
> @@ -25,7 +25,7 @@ extern "C" {
> #include <rte_compat.h>
> #include <rte_debug.h>
> #include <rte_interrupts.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_kvargs.h>
>
> #define RTE_BUS_AUXILIARY_NAME "auxiliary"
> diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
> index cf66fc0c53..26a83b2cdf 100644
> --- a/drivers/bus/dpaa/bus_dpaa_driver.h
> +++ b/drivers/bus/dpaa/bus_dpaa_driver.h
> @@ -7,7 +7,7 @@
> #define BUS_DPAA_DRIVER_H
>
> #include <rte_compat.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_mbuf_dyn.h>
> #include <rte_mempool.h>
>
> diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
> index 798ddebf3a..7ac5fe6ff1 100644
> --- a/drivers/bus/fslmc/bus_fslmc_driver.h
> +++ b/drivers/bus/fslmc/bus_fslmc_driver.h
> @@ -29,7 +29,7 @@ extern "C" {
> #include <rte_compat.h>
> #include <rte_debug.h>
> #include <rte_interrupts.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_tailq.h>
> #include <rte_devargs.h>
> #include <rte_mbuf.h>
> diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
> index 8604e43947..5966776a85 100644
> --- a/drivers/bus/fslmc/fslmc_vfio.c
> +++ b/drivers/bus/fslmc/fslmc_vfio.c
> @@ -28,7 +28,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal_memconfig.h>
>
> #include "private.h"
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
> index cfe4280f87..d7f6e45b7d 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
> @@ -18,7 +18,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
> #include <rte_mbuf_pool_ops.h>
>
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
> index b7d81b518c..07256ed7ec 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
> @@ -17,7 +17,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
>
> #include <fslmc_logs.h>
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
> index 071b0d297d..4aec7b2cd8 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
> @@ -30,7 +30,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include <fslmc_logs.h>
> #include <bus_fslmc_driver.h>
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
> index 223e34bcba..65e2d799c3 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
> @@ -10,7 +10,7 @@
> #include <errno.h>
>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "private.h"
> #include <fslmc_logs.h>
> diff --git a/drivers/bus/pci/bus_pci_driver.h b/drivers/bus/pci/bus_pci_driver.h
> index b5c7dee617..0f2f9b5101 100644
> --- a/drivers/bus/pci/bus_pci_driver.h
> +++ b/drivers/bus/pci/bus_pci_driver.h
> @@ -11,7 +11,7 @@ extern "C" {
> #endif
>
> #include <rte_bus_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_compat.h>
>
> /** Pathname of PCI devices directory. */
> diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
> index 39d702a418..d24cc201b8 100644
> --- a/drivers/bus/pci/pci_params.c
> +++ b/drivers/bus/pci/pci_params.c
> @@ -6,7 +6,7 @@
>
> #include <bus_driver.h>
> #include <rte_bus_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_kvargs.h>
> #include <rte_devargs.h>
> diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
> index 36748cdfae..bc7e30d7c6 100644
> --- a/drivers/bus/vdev/bus_vdev_driver.h
> +++ b/drivers/bus/vdev/bus_vdev_driver.h
> @@ -11,7 +11,7 @@ extern "C" {
>
> #include <rte_bus_vdev.h>
> #include <rte_compat.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_devargs.h>
>
> struct rte_vdev_device {
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
> index 809a8bb08f..b176b658fc 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -11,7 +11,7 @@
> #include <sys/queue.h>
>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <bus_driver.h>
> #include <rte_common.h>
> #include <rte_devargs.h>
> diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
> index 2c72614776..2d10a1e8ad 100644
> --- a/drivers/bus/vdev/vdev_params.c
> +++ b/drivers/bus/vdev/vdev_params.c
> @@ -4,7 +4,7 @@
>
> #include <string.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_kvargs.h>
> #include <rte_errno.h>
>
> diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
> index 3424e791c9..e2475a642d 100644
> --- a/drivers/bus/vmbus/bus_vmbus_driver.h
> +++ b/drivers/bus/vmbus/bus_vmbus_driver.h
> @@ -12,7 +12,7 @@ extern "C" {
>
> #include <rte_bus_vmbus.h>
> #include <rte_compat.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> struct vmbus_channel;
> struct vmbus_mon_page;
> diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev/qat_dev_gen4.c
> index 7ffde5f4c8..85d6ddfcf4 100644
> --- a/drivers/common/qat/dev/qat_dev_gen4.c
> +++ b/drivers/common/qat/dev/qat_dev_gen4.c
> @@ -2,7 +2,7 @@
> * Copyright(c) 2021 Intel Corporation
> */
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_pci.h>
>
> #include "qat_device.h"
> diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
> index 4a1be35b47..e58e4ceec0 100644
> --- a/drivers/common/qat/qat_qp.c
> +++ b/drivers/common/qat/qat_qp.c
> @@ -4,7 +4,7 @@
>
> #include <rte_common.h>
> #include <rte_cycles.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> #include <rte_pci.h>
> diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
> index 7d657d81bc..445a3baa67 100644
> --- a/drivers/compress/zlib/zlib_pmd_ops.c
> +++ b/drivers/compress/zlib/zlib_pmd_ops.c
> @@ -4,7 +4,7 @@
>
> #include <string.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_common.h>
> #include <rte_malloc.h>
>
> diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
> index 61d457f4e0..d1ede5e990 100644
> --- a/drivers/crypto/bcmfs/bcmfs_qp.c
> +++ b/drivers/crypto/bcmfs/bcmfs_qp.c
> @@ -8,7 +8,7 @@
> #include <rte_atomic.h>
> #include <rte_bitmap.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> #include <rte_prefetch.h>
> diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
> index bc7fb67218..78272d616c 100644
> --- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
> +++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
> @@ -4,7 +4,7 @@
> */
>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_malloc.h>
> #include <cryptodev_pmd.h>
> diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
> index 6c3e45e333..013f3be1e6 100644
> --- a/drivers/crypto/ccp/rte_ccp_pmd.c
> +++ b/drivers/crypto/ccp/rte_ccp_pmd.c
> @@ -9,7 +9,7 @@
> #include <rte_cryptodev.h>
> #include <cryptodev_pmd.h>
> #include <rte_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
>
> #include "ccp_crypto.h"
> diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
> index 3fd9f3c426..db11ac7444 100644
> --- a/drivers/crypto/cnxk/cn10k_cryptodev.c
> +++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
> @@ -7,7 +7,7 @@
> #include <rte_crypto.h>
> #include <rte_cryptodev.h>
> #include <cryptodev_pmd.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_pci.h>
>
> #include "cn10k_cryptodev.h"
> diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
> index bd425f95ff..4cfc1f2150 100644
> --- a/drivers/crypto/cnxk/cn9k_cryptodev.c
> +++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
> @@ -7,7 +7,7 @@
> #include <rte_crypto.h>
> #include <rte_cryptodev.h>
> #include <cryptodev_pmd.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_pci.h>
>
> #include "cn9k_cryptodev.h"
> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> index 0cce861899..3b13578de0 100644
> --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> @@ -17,7 +17,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <cryptodev_pmd.h>
> #include <rte_common.h>
> #include <bus_fslmc_driver.h>
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index 7e554cb2b1..c6bd785262 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -19,7 +19,7 @@
> #include <rte_security_driver.h>
> #endif
> #include <rte_cycles.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_io.h>
> #include <rte_ip.h>
> #include <rte_kvargs.h>
> diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> index f3a1bd626c..971f82897c 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> @@ -5,7 +5,7 @@
>
> #include <rte_common.h>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_cryptodev.h>
> #include <cryptodev_pmd.h>
> #include <rte_reorder.h>
> diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
> index e30dcfc281..9b7b16c6e3 100644
> --- a/drivers/dma/idxd/idxd_bus.c
> +++ b/drivers/dma/idxd/idxd_bus.c
> @@ -9,6 +9,7 @@
> #include <libgen.h>
>
> #include <bus_driver.h>
> +#include <dev_driver.h>
> #include <rte_devargs.h>
> #include <rte_eal.h>
> #include <rte_log.h>
> diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
> index 5a443acff8..759578378f 100644
> --- a/drivers/event/dlb2/dlb2.c
> +++ b/drivers/event/dlb2/dlb2.c
> @@ -17,7 +17,7 @@
> #include <rte_config.h>
> #include <rte_cycles.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_eventdev.h>
> #include <eventdev_pmd.h>
> diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
> index 9f8c6cd8b8..71ac141b66 100644
> --- a/drivers/event/dlb2/pf/dlb2_pf.c
> +++ b/drivers/event/dlb2/pf/dlb2_pf.c
> @@ -15,7 +15,7 @@
>
> #include <rte_debug.h>
> #include <rte_log.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_devargs.h>
> #include <rte_mbuf.h>
> #include <rte_ring.h>
> diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
> index aa403f9e06..8e470584ea 100644
> --- a/drivers/event/dpaa/dpaa_eventdev.c
> +++ b/drivers/event/dpaa/dpaa_eventdev.c
> @@ -14,7 +14,7 @@
> #include <rte_byteorder.h>
> #include <rte_common.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_lcore.h>
> #include <rte_log.h>
> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
> index 08df6e223a..1001297cda 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -14,7 +14,7 @@
> #include <rte_byteorder.h>
> #include <rte_common.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <bus_fslmc_driver.h>
> #include <rte_lcore.h>
> diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
> index 3882a9cf1d..a68d3ac154 100644
> --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c
> +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
> @@ -17,7 +17,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
>
> #include <bus_fslmc_driver.h>
> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
> index fe157c59d5..99fa326ad5 100644
> --- a/drivers/event/octeontx/ssovf_evdev.c
> +++ b/drivers/event/octeontx/ssovf_evdev.c
> @@ -7,7 +7,7 @@
> #include <rte_common.h>
> #include <cryptodev_pmd.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <ethdev_driver.h>
> #include <rte_event_eth_rx_adapter.h>
> diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
> index 6bd8fec6d4..8513b9a013 100644
> --- a/drivers/event/skeleton/skeleton_eventdev.c
> +++ b/drivers/event/skeleton/skeleton_eventdev.c
> @@ -12,7 +12,7 @@
> #include <rte_byteorder.h>
> #include <rte_common.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_log.h>
> #include <rte_malloc.h>
> diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
> index 2be7b8d2df..a552aabeb8 100644
> --- a/drivers/gpu/cuda/cuda.c
> +++ b/drivers/gpu/cuda/cuda.c
> @@ -8,7 +8,7 @@
> #include <rte_pci.h>
> #include <bus_pci_driver.h>
> #include <rte_byteorder.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include <gpudev_driver.h>
>
> diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> index 56c629c681..84371d5d1a 100644
> --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> @@ -20,7 +20,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include "rte_dpaa2_mempool.h"
>
> #include "fslmc_vfio.h"
> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index fd7be47311..9957de2314 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -24,7 +24,7 @@
> #include <rte_string_fns.h>
> #include <rte_branch_prediction.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_ether.h>
> #include <rte_lcore.h>
> diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
> index 748db590c1..71d0b53e03 100644
> --- a/drivers/net/ark/ark_global.h
> +++ b/drivers/net/ark/ark_global.h
> @@ -15,7 +15,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_version.h>
>
> #include "ark_pktdir.h"
> diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
> index 7c0cb666fb..b2a08f5635 100644
> --- a/drivers/net/avp/avp_ethdev.c
> +++ b/drivers/net/avp/avp_ethdev.c
> @@ -22,7 +22,7 @@
> #include <rte_cycles.h>
> #include <rte_spinlock.h>
> #include <rte_byteorder.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_memory.h>
> #include <rte_eal.h>
> #include <rte_io.h>
> diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
> index b9ebf64fb8..a5d11c5832 100644
> --- a/drivers/net/axgbe/axgbe_common.h
> +++ b/drivers/net/axgbe/axgbe_common.h
> @@ -33,7 +33,7 @@
> #include <rte_memzone.h>
> #include <rte_ether.h>
> #include <rte_ethdev.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <ethdev_pci.h>
> #include <rte_common.h>
> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
> index f36ad30e17..4448cf2de2 100644
> --- a/drivers/net/bnx2x/bnx2x_ethdev.c
> +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
> @@ -9,7 +9,7 @@
> #include "bnx2x_rxtx.h"
>
> #include <rte_string_fns.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_pci.h>
> #include <rte_alarm.h>
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index e275d3a53f..1460dce2ab 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -6,7 +6,7 @@
> #include <inttypes.h>
> #include <stdbool.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> #include <rte_malloc.h>
> diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
> index 77ecbef04c..fd1506ddd4 100644
> --- a/drivers/net/bnxt/rte_pmd_bnxt.c
> +++ b/drivers/net/bnxt/rte_pmd_bnxt.c
> @@ -7,7 +7,7 @@
> #include <stdbool.h>
> #include <unistd.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
> #include <rte_malloc.h>
> #include <rte_cycles.h>
> diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
> index 384080e6d3..bed755f5d9 100644
> --- a/drivers/net/cxgbe/base/t4_hw.c
> +++ b/drivers/net/cxgbe/base/t4_hw.c
> @@ -18,7 +18,7 @@
> #include <ethdev_driver.h>
> #include <rte_malloc.h>
> #include <rte_random.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_byteorder.h>
>
> #include "common.h"
> diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
> index fd71a50a58..45bbeaef0c 100644
> --- a/drivers/net/cxgbe/cxgbe_ethdev.c
> +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
> @@ -31,7 +31,7 @@
> #include <ethdev_pci.h>
> #include <rte_malloc.h>
> #include <rte_random.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "cxgbe.h"
> #include "cxgbe_pfvf.h"
> diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
> index 3c02c98b3d..f8dd833032 100644
> --- a/drivers/net/cxgbe/cxgbe_main.c
> +++ b/drivers/net/cxgbe/cxgbe_main.c
> @@ -31,7 +31,7 @@
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> #include <rte_random.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_kvargs.h>
>
> #include "base/common.h"
> diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
> index 5d91355c9a..5b13cb5c94 100644
> --- a/drivers/net/cxgbe/sge.c
> +++ b/drivers/net/cxgbe/sge.c
> @@ -30,7 +30,7 @@
> #include <ethdev_driver.h>
> #include <rte_malloc.h>
> #include <rte_random.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "base/common.h"
> #include "base/t4_regs.h"
> diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
> index 9509f6e8a3..4d33b51fea 100644
> --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
> +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
> @@ -15,7 +15,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include <dpaa2_pmd_logs.h>
> #include <dpaa2_hw_pvt.h>
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index f876f4790c..37a8b43114 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -15,7 +15,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <bus_fslmc_driver.h>
> #include <rte_flow_driver.h>
> #include "rte_dpaa2_mempool.h"
> diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
> index 932570c6e0..fbfdf360d1 100644
> --- a/drivers/net/dpaa2/dpaa2_recycle.c
> +++ b/drivers/net/dpaa2/dpaa2_recycle.c
> @@ -14,7 +14,7 @@
> #include <rte_string_fns.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <bus_fslmc_driver.h>
> #include <rte_flow_driver.h>
>
> diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
> index 7b9c528d13..9436a95ac8 100644
> --- a/drivers/net/dpaa2/dpaa2_rxtx.c
> +++ b/drivers/net/dpaa2/dpaa2_rxtx.c
> @@ -13,7 +13,7 @@
> #include <rte_malloc.h>
> #include <rte_memcpy.h>
> #include <rte_string_fns.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_hexdump.h>
>
> #include <bus_fslmc_driver.h>
> diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
> index ba0d500f74..63463c4fbf 100644
> --- a/drivers/net/dpaa2/dpaa2_sparser.c
> +++ b/drivers/net/dpaa2/dpaa2_sparser.c
> @@ -7,7 +7,7 @@
> #include <rte_malloc.h>
> #include <rte_memcpy.h>
> #include <rte_string_fns.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include <fslmc_logs.h>
> #include <fslmc_vfio.h>
> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
> index 409de50083..8ee9be12ad 100644
> --- a/drivers/net/e1000/em_ethdev.c
> +++ b/drivers/net/e1000/em_ethdev.c
> @@ -20,7 +20,7 @@
> #include <rte_memory.h>
> #include <rte_eal.h>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "e1000_logs.h"
> #include "base/e1000_api.h"
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
> index 43979992d3..d6bcc5bf58 100644
> --- a/drivers/net/e1000/igb_ethdev.c
> +++ b/drivers/net/e1000/igb_ethdev.c
> @@ -22,7 +22,7 @@
> #include <rte_memory.h>
> #include <rte_eal.h>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "e1000_logs.h"
> #include "base/e1000_api.h"
> diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
> index e46697b6a1..b775310651 100644
> --- a/drivers/net/e1000/igb_flow.c
> +++ b/drivers/net/e1000/igb_flow.c
> @@ -21,7 +21,7 @@
> #include <rte_eal.h>
> #include <rte_atomic.h>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_flow.h>
> #include <rte_flow_driver.h>
>
> diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
> index 4709675af8..4d27fba585 100644
> --- a/drivers/net/ena/ena_ethdev.h
> +++ b/drivers/net/ena/ena_ethdev.h
> @@ -14,7 +14,7 @@
> #include <rte_pci.h>
> #include <bus_pci_driver.h>
> #include <rte_timer.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_net.h>
>
> #include "ena_com.h"
> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
> index 998436e5e8..cdf0915591 100644
> --- a/drivers/net/enic/enic_ethdev.c
> +++ b/drivers/net/enic/enic_ethdev.c
> @@ -6,7 +6,7 @@
> #include <stdio.h>
> #include <stdint.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_pci.h>
> #include <bus_pci_driver.h>
> #include <ethdev_driver.h>
> diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
> index 7312c411bd..46f85964e9 100644
> --- a/drivers/net/enic/enic_vf_representor.c
> +++ b/drivers/net/enic/enic_vf_representor.c
> @@ -7,7 +7,7 @@
>
> #include <bus_pci_driver.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> #include <rte_flow_driver.h>
> diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
> index a80f5e2caf..53a451c1b1 100644
> --- a/drivers/net/failsafe/failsafe_private.h
> +++ b/drivers/net/failsafe/failsafe_private.h
> @@ -11,7 +11,7 @@
> #include <pthread.h>
>
> #include <rte_atomic.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
> #include <rte_devargs.h>
> #include <rte_flow.h>
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
> index 8bbd8b445d..7adb20bff9 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -7,7 +7,7 @@
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> #include <rte_string_fns.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_spinlock.h>
> #include <rte_kvargs.h>
> #include <rte_vect.h>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 7bdc453ec1..67111ac251 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -23,7 +23,7 @@
> #include <rte_malloc.h>
> #include <rte_memcpy.h>
> #include <rte_alarm.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_tailq.h>
> #include <rte_hash_crc.h>
> #include <rte_bitmap.h>
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index 506fcff6e3..ef2ab06475 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -24,7 +24,7 @@
> #include <ethdev_pci.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "iavf.h"
> #include "iavf_rxtx.h"
> diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
> index 21bd1e2193..15f695682d 100644
> --- a/drivers/net/iavf/iavf_vchnl.c
> +++ b/drivers/net/iavf/iavf_vchnl.c
> @@ -19,7 +19,7 @@
> #include <rte_ether.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "iavf.h"
> #include "iavf_rxtx.h"
> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
> index 885d58c0f4..1c3d22ae0f 100644
> --- a/drivers/net/ice/ice_dcf.c
> +++ b/drivers/net/ice/ice_dcf.c
> @@ -21,7 +21,7 @@
> #include <ethdev_pci.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "ice_dcf.h"
> #include "ice_rxtx.h"
> diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
> index 0da267db1f..dee712af98 100644
> --- a/drivers/net/ice/ice_dcf_ethdev.c
> +++ b/drivers/net/ice/ice_dcf_ethdev.c
> @@ -18,7 +18,7 @@
> #include <rte_kvargs.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include <iavf_devids.h>
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 552e41692c..04c9ce78a2 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -30,7 +30,7 @@
> #include <ethdev_pci.h>
> #include <rte_malloc.h>
> #include <rte_random.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_hash_crc.h>
> #ifdef RTE_LIB_SECURITY
> #include <rte_security_driver.h>
> diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
> index 368342872a..67373a7b78 100644
> --- a/drivers/net/ixgbe/ixgbe_flow.c
> +++ b/drivers/net/ixgbe/ixgbe_flow.c
> @@ -27,7 +27,7 @@
> #include <ethdev_driver.h>
> #include <rte_malloc.h>
> #include <rte_random.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_hash_crc.h>
> #include <rte_flow.h>
> #include <rte_flow_driver.h>
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index 910b76a92c..7e7e1824ef 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -31,7 +31,7 @@
> #endif
>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
> index ccc06bdda6..d0bbc0a4c0 100644
> --- a/drivers/net/netvsc/hn_ethdev.c
> +++ b/drivers/net/netvsc/hn_ethdev.c
> @@ -30,7 +30,7 @@
> #include <rte_errno.h>
> #include <rte_memory.h>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <bus_driver.h>
> #include <bus_vmbus_driver.h>
> #include <rte_alarm.h>
> diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
> index 817fb06dfb..7db82af9f3 100644
> --- a/drivers/net/netvsc/hn_nvs.c
> +++ b/drivers/net/netvsc/hn_nvs.c
> @@ -28,7 +28,7 @@
> #include <rte_cycles.h>
> #include <rte_memory.h>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <bus_vmbus_driver.h>
>
> #include "hn_logs.h"
> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
> index 20f75a17b0..e6f1f28768 100644
> --- a/drivers/net/netvsc/hn_rndis.c
> +++ b/drivers/net/netvsc/hn_rndis.c
> @@ -26,7 +26,7 @@
> #include <rte_cycles.h>
> #include <rte_memory.h>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <bus_vmbus_driver.h>
>
> #include "hn_logs.h"
> diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
> index 61cf374224..bc6f60c64a 100644
> --- a/drivers/net/netvsc/hn_rxtx.c
> +++ b/drivers/net/netvsc/hn_rxtx.c
> @@ -25,7 +25,7 @@
> #include <rte_errno.h>
> #include <rte_memory.h>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_net.h>
> #include <bus_vmbus_driver.h>
> #include <rte_spinlock.h>
> diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
> index 0e55f0c792..eaafe11fb9 100644
> --- a/drivers/net/nfp/nfp_common.c
> +++ b/drivers/net/nfp/nfp_common.c
> @@ -19,7 +19,7 @@
> #include <rte_debug.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_ether.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
> index 5cdd34e588..47359501bc 100644
> --- a/drivers/net/nfp/nfp_ethdev.c
> +++ b/drivers/net/nfp/nfp_ethdev.c
> @@ -16,7 +16,7 @@
> #include <rte_common.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_ether.h>
> #include <rte_malloc.h>
> #include <rte_memzone.h>
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
> index 9ada22e2ff..0eee191566 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -15,7 +15,7 @@
> #include <bus_vdev_driver.h>
> #include <rte_cycles.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_devargs.h>
> #include <rte_kvargs.h>
> #include <rte_malloc.h>
> diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
> index a38b701183..b781bcdcfd 100644
> --- a/drivers/net/qede/qede_ethdev.h
> +++ b/drivers/net/qede/qede_ethdev.h
> @@ -13,7 +13,7 @@
> #include <rte_ether.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_ip.h>
>
> /* ecore includes */
> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index 506c62a726..2ec743ebce 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c
> @@ -7,7 +7,7 @@
> * for Solarflare) and Solarflare Communications, Inc.
> */
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <ethdev_driver.h>
> #include <ethdev_pci.h>
> #include <rte_pci.h>
> diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
> index 81f5aa3cc4..3ae5023b6f 100644
> --- a/drivers/net/sfc/sfc_sw_stats.c
> +++ b/drivers/net/sfc/sfc_sw_stats.c
> @@ -2,7 +2,7 @@
> *
> * Copyright(c) 2021 Xilinx, Inc.
> */
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_bitmap.h>
>
> #include "sfc.h"
> diff --git a/drivers/net/sfc/sfc_sw_stats.h b/drivers/net/sfc/sfc_sw_stats.h
> index 1abded8018..d9738e5214 100644
> --- a/drivers/net/sfc/sfc_sw_stats.h
> +++ b/drivers/net/sfc/sfc_sw_stats.h
> @@ -5,7 +5,7 @@
> #ifndef _SFC_SW_STATS_H
> #define _SFC_SW_STATS_H
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "sfc.h"
>
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index 28183ec740..9f57cb1a20 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -20,7 +20,7 @@
> #include <rte_common.h>
> #include <rte_cycles.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_ether.h>
> #include <ethdev_driver.h>
> diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
> index dc90569df1..c3e045d892 100644
> --- a/drivers/net/vdev_netvsc/vdev_netvsc.c
> +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
> @@ -27,7 +27,7 @@
> #include <bus_driver.h>
> #include <bus_vdev_driver.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_ethdev.h>
> #include <rte_ether.h>
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index d180162abd..edf3becd32 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -24,7 +24,7 @@
> #include <rte_memory.h>
> #include <rte_eal_paging.h>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_cycles.h>
> #include <rte_kvargs.h>
>
> diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c
> index 2b9e35cef5..abc63b0935 100644
> --- a/drivers/net/virtio/virtio_pci_ethdev.c
> +++ b/drivers/net/virtio/virtio_pci_ethdev.c
> @@ -16,7 +16,7 @@
>
> #include <rte_memory.h>
> #include <rte_eal.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_kvargs.h>
>
> #include "virtio.h"
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index 101b1cb500..fd946dec5c 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -30,7 +30,7 @@
> #include <ethdev_pci.h>
> #include <rte_string_fns.h>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "base/vmxnet3_defs.h"
>
> diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
> index db029cbf34..909fb8faab 100644
> --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
> +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
> @@ -3,7 +3,7 @@
> */
> #include <bus_pci_driver.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_lcore.h>
> #include <rte_pci.h>
> diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
> index 19b523a815..a06b724866 100644
> --- a/drivers/raw/skeleton/skeleton_rawdev.c
> +++ b/drivers/raw/skeleton/skeleton_rawdev.c
> @@ -13,7 +13,7 @@
> #include <rte_byteorder.h>
> #include <rte_common.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_kvargs.h>
> #include <rte_log.h>
> diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
> index fc257c5f44..8ef7a6b127 100644
> --- a/drivers/raw/skeleton/skeleton_rawdev_test.c
> +++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
> @@ -6,7 +6,7 @@
> #include <rte_mbuf.h>
> #include <rte_malloc.h>
> #include <rte_memcpy.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_rawdev.h>
> #include <bus_vdev_driver.h>
> #include <rte_test.h>
> diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
> index 6ab62a12fc..92cf5f495e 100644
> --- a/drivers/regex/mlx5/mlx5_regex_control.c
> +++ b/drivers/regex/mlx5/mlx5_regex_control.c
> @@ -11,7 +11,7 @@
> #include <rte_regexdev.h>
> #include <rte_regexdev_core.h>
> #include <rte_regexdev_driver.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include <mlx5_common.h>
> #include <mlx5_glue.h>
> diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
> index 7f6dedbc52..639a0d66ca 100644
> --- a/lib/compressdev/rte_compressdev.c
> +++ b/lib/compressdev/rte_compressdev.c
> @@ -9,7 +9,7 @@
> #include <rte_common.h>
> #include <rte_string_fns.h>
> #include <rte_malloc.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
> #include <rte_memzone.h>
>
> diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
> index 9bfae077db..41f1415bea 100644
> --- a/lib/compressdev/rte_compressdev_pmd.c
> +++ b/lib/compressdev/rte_compressdev_pmd.c
> @@ -5,7 +5,7 @@
> #include <rte_string_fns.h>
> #include <rte_malloc.h>
> #include <rte_kvargs.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_eal.h>
>
> #include "rte_compressdev_internal.h"
> diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
> index 9fabc399c5..72e52f876f 100644
> --- a/lib/compressdev/rte_compressdev_pmd.h
> +++ b/lib/compressdev/rte_compressdev_pmd.h
> @@ -19,6 +19,7 @@ extern "C" {
>
> #include <string.h>
>
> +#include <dev_driver.h>
>
> #include "rte_compressdev.h"
> #include "rte_compressdev_internal.h"
> diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
> index 75d0075b86..f07b92dfd7 100644
> --- a/lib/cryptodev/cryptodev_pmd.c
> +++ b/lib/cryptodev/cryptodev_pmd.c
> @@ -4,7 +4,7 @@
>
> #include <sys/queue.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_string_fns.h>
> #include <rte_malloc.h>
> diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
> index 3dcc3cb7ed..96d7e225b0 100644
> --- a/lib/cryptodev/cryptodev_pmd.h
> +++ b/lib/cryptodev/cryptodev_pmd.h
> @@ -19,6 +19,7 @@ extern "C" {
>
> #include <string.h>
>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_log.h>
> #include <rte_common.h>
> diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
> index 42f3221052..1dad092317 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -13,7 +13,7 @@
>
> #include <rte_log.h>
> #include <rte_debug.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_memory.h>
> #include <rte_memcpy.h>
> #include <rte_memzone.h>
> diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
> index 82ab7a8cc7..acd7f71cd1 100644
> --- a/lib/dmadev/rte_dmadev_pmd.h
> +++ b/lib/dmadev/rte_dmadev_pmd.h
> @@ -14,7 +14,7 @@
> * by any application.
> */
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "rte_dmadev.h"
>
> diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
> index 16c5aef1d8..98f3c78795 100644
> --- a/lib/eal/common/eal_common_dev.c
> +++ b/lib/eal/common/eal_common_dev.c
> @@ -9,7 +9,7 @@
>
> #include <bus_driver.h>
> #include <rte_class.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_devargs.h>
> #include <rte_errno.h>
> #include <rte_log.h>
> diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
> new file mode 100644
> index 0000000000..015188abd5
> --- /dev/null
> +++ b/lib/eal/include/dev_driver.h
> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright (c) 2022 Red Hat, Inc.
> + */
> +
> +#ifndef DEV_DRIVER_H
> +#define DEV_DRIVER_H
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <rte_common.h>
> +#include <rte_dev.h>
> +
> +/**
> + * A structure describing a device driver.
> + */
> +struct rte_driver {
> + RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
> + const char *name; /**< Driver name. */
> + const char *alias; /**< Driver alias. */
> +};
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* DEV_DRIVER_H */
> diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
> index 77d8621a51..cfcd40aaed 100644
> --- a/lib/eal/include/meson.build
> +++ b/lib/eal/include/meson.build
> @@ -57,6 +57,7 @@ headers += files(
>
> driver_sdk_headers = files(
> 'bus_driver.h',
> + 'dev_driver.h',
> )
>
> # special case install the generic headers, since they go in a subdir
> diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
> index fedf67fba1..38057cc0ef 100644
> --- a/lib/eal/include/rte_dev.h
> +++ b/lib/eal/include/rte_dev.h
> @@ -23,6 +23,8 @@ extern "C" {
> #include <rte_compat.h>
> #include <rte_log.h>
>
> +struct rte_driver;
> +
> /**
> * The device event type.
> */
> @@ -53,27 +55,14 @@ struct rte_mem_resource {
> void *addr; /**< Virtual address, NULL when not mapped. */
> };
>
> -/**
> - * A structure describing a device driver.
> - */
> -struct rte_driver {
> - RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
> - const char *name; /**< Driver name. */
> - const char *alias; /**< Driver alias. */
> -};
> -
> /**
> * Retrieve a driver name.
> *
> - * @warning
> - * @b EXPERIMENTAL: this API may change without prior notice
> - *
> * @param driver
> * A pointer to a driver structure.
> * @return
> * A pointer to the driver name string.
> */
> -__rte_experimental
> const char *
> rte_driver_name(const struct rte_driver *driver);
>
> diff --git a/lib/eal/version.map b/lib/eal/version.map
> index d10fd89458..8b53a1d258 100644
> --- a/lib/eal/version.map
> +++ b/lib/eal/version.map
> @@ -37,6 +37,7 @@ DPDK_23 {
> rte_devargs_parsef;
> rte_devargs_remove;
> rte_devargs_type_count;
> + rte_driver_name;
> rte_dump_physmem_layout;
> rte_dump_stack;
> rte_dump_tailq;
> @@ -423,9 +424,6 @@ EXPERIMENTAL {
> rte_thread_self;
> rte_thread_set_affinity_by_id;
> rte_thread_set_priority;
> -
> - # added in 22.11
> - rte_driver_name;
> };
>
> INTERNAL {
> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
> index 5101868ea7..47a55a419e 100644
> --- a/lib/ethdev/ethdev_driver.h
> +++ b/lib/ethdev/ethdev_driver.h
> @@ -19,6 +19,7 @@ extern "C" {
> *
> */
>
> +#include <dev_driver.h>
> #include <rte_ethdev.h>
>
> /**
> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
> index 69402668d8..def6cd0876 100644
> --- a/lib/eventdev/eventdev_pmd.h
> +++ b/lib/eventdev/eventdev_pmd.h
> @@ -22,7 +22,7 @@ extern "C" {
> #include <rte_common.h>
> #include <rte_compat.h>
> #include <rte_config.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_log.h>
> #include <rte_malloc.h>
> #include <rte_mbuf.h>
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
> index 7c695176f4..5bc10312fc 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -6,7 +6,7 @@
> #include <string.h>
> #include <stdbool.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_cryptodev.h>
> #include <cryptodev_pmd.h>
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
> index bf8741d2ea..4f4efdae9f 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> @@ -9,7 +9,7 @@
>
> #include <rte_cycles.h>
> #include <rte_common.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <ethdev_driver.h>
> #include <rte_log.h>
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 1dc4f966be..54abee2b3f 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -12,7 +12,7 @@
>
> #include <rte_string_fns.h>
> #include <rte_log.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_memzone.h>
> #include <rte_eal.h>
> #include <rte_common.h>
> diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
> index 0e55b00bfe..23972b3dbd 100644
> --- a/lib/gpudev/gpudev_driver.h
> +++ b/lib/gpudev/gpudev_driver.h
> @@ -14,7 +14,7 @@
> #include <stdint.h>
> #include <sys/queue.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "rte_gpudev.h"
>
> diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
> index d60235a7e3..058ad147a5 100644
> --- a/lib/mempool/rte_mempool_ops.c
> +++ b/lib/mempool/rte_mempool_ops.c
> @@ -10,7 +10,7 @@
> #include <rte_string_fns.h>
> #include <rte_mempool.h>
> #include <rte_errno.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
>
> #include "rte_mempool_trace.h"
>
> diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
> index 72aabd4dd0..af2b814251 100644
> --- a/lib/pcapng/rte_pcapng.c
> +++ b/lib/pcapng/rte_pcapng.c
> @@ -14,7 +14,7 @@
> #include <bus_driver.h>
> #include <rte_common.h>
> #include <rte_cycles.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_errno.h>
> #include <rte_ethdev.h>
> #include <rte_ether.h>
> diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
> index 2f0a4f132e..bc51258143 100644
> --- a/lib/rawdev/rte_rawdev.c
> +++ b/lib/rawdev/rte_rawdev.c
> @@ -12,7 +12,7 @@
>
> #include <rte_string_fns.h>
> #include <rte_log.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_common.h>
> #include <rte_malloc.h>
> #include <rte_telemetry.h>
> diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
> index 3b7be57d3e..a51944c8ff 100644
> --- a/lib/rawdev/rte_rawdev_pmd.h
> +++ b/lib/rawdev/rte_rawdev_pmd.h
> @@ -19,7 +19,7 @@ extern "C" {
>
> #include <string.h>
>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_malloc.h>
> #include <rte_log.h>
> #include <rte_common.h>
> diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
> index 046b6496d2..d036ed33f6 100644
> --- a/lib/security/rte_security.c
> +++ b/lib/security/rte_security.c
> @@ -6,7 +6,7 @@
>
> #include <rte_common.h>
> #include <rte_cryptodev.h>
> -#include <rte_dev.h>
> +#include <dev_driver.h>
> #include <rte_telemetry.h>
> #include "rte_security.h"
> #include "rte_security_driver.h"
> --
> 2.36.1
^ permalink raw reply [relevance 0%]
* Re: [RFC v3 23/26] dev: hide driver object
2022-07-28 17:00 0% ` Bruce Richardson
@ 2022-08-01 17:18 0% ` Ajit Khaparde
0 siblings, 0 replies; 200+ results
From: Ajit Khaparde @ 2022-08-01 17:18 UTC (permalink / raw)
To: Bruce Richardson
Cc: David Marchand, dpdk-dev, Nicolas Chautru, Parav Pandit,
Xueming Li, Hemant Agrawal, Sachin Saxena, Stephen Hemminger,
Long Li, Fan Zhang, Sunila Sahu, Ashish Gupta,
Raveendra Padasalagi, Vikas Gupta, Chandubabu Namburu,
Ankur Dwivedi, Anoob Joseph, Tejasree Kondoj, Gagandeep Singh,
Kevin Laatz, Timothy McDaniel, Jerin Jacob, Elena Agostini,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Steven Webster, Matt Peters, Rasesh Mody, Shahed Shaikh,
Somnath Kotur, Rahul Lakkireddy, Simei Su, Wenjun Wu,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Yuying Zhang, Beilei Xing, Jingjing Wu, Qiming Yang,
Matan Azrad, Viacheslav Ovsiienko, Chaoyong He, Niklas Soderlund,
Harman Kalra, Devendra Singh Rawat, Andrew Rybchenko,
Maciej Czekaj, Maxime Coquelin, Chenbo Xia, Jochen Behrens,
Jakub Palider, Tomasz Duszynski, Ori Kam, Akhil Goyal,
Chengwen Feng, Ray Kinsella, Thomas Monjalon, Ferruh Yigit,
Abhinandan Gujjar, Jay Jayatheerthan, Olivier Matz,
Reshma Pattan
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]
On Thu, Jul 28, 2022 at 10:00 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Jul 28, 2022 at 05:26:37PM +0200, David Marchand wrote:
> > Make rte_driver opaque for non internal users.
> > This will make extending this object possible without breaking the ABI.
> >
> > Introduce a new driver header and move rte_driver definition.
> > Update drivers and library to use the internal header.
> >
> > Some applications may have been dereferencing rte_driver objects, mark
> > this object's accessors as stable.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]
^ permalink raw reply [relevance 0%]
* [PATCH v2 1/2] version: 22.11-rc0
@ 2022-08-02 16:45 13% ` Hanumanth Pothula
0 siblings, 0 replies; 200+ results
From: Hanumanth Pothula @ 2022-08-02 16:45 UTC (permalink / raw)
To: Aaron Conole, Michael Santana, Ray Kinsella, Nicolas Chautru,
Gagandeep Singh, Hemant Agrawal, Sachin Saxena, Rosen Xu,
Stephen Hemminger, Long Li, Fan Zhang, Lee Daly, Ashish Gupta,
Matan Azrad, Sunila Sahu, Ruifeng Wang, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Chandubabu Namburu,
Pablo de Lara, Michael Shamis, Liron Himi, Nagadheeraj Rottela,
Srikanth Jampala, Anoob Joseph, Jay Zhou,
Radha Mohan Chintakuntla, Veerasenareddy Burru, Chengwen Feng,
Bruce Richardson, Kevin Laatz, Conor Walsh, Timothy McDaniel,
Mattias Rönnblom, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, Artem V. Andreev,
Andrew Rybchenko, Harman Kalra, Olivier Matz, John W. Linville,
Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck, John Miller,
Igor Russkikh, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Chas Williams, Min Hu (Connor),
Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Rahul Lakkireddy, Simei Su, Wenjun Wu, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Xiao Wang, Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Dongdong Liu,
Yisen Zhuang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Junfeng Guo, Andrew Boyer, Shijith Thotton,
Srisivasubramanian Srinivasan, Jakub Grajciar,
Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler, Chaoyong He,
Niklas Soderlund, Jiawen Wu, Tetsuya Mukawa, Sathesh Edara,
Devendra Singh Rawat, Jasvinder Singh, Cristian Dumitrescu,
Maciej Czekaj, Jian Wang, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Tianfei zhang,
Ori Kam, Vijay Kumar Srivastava, Konstantin Ananyev, Akhil Goyal,
David Hunt, Byron Marohn, Yipeng Wang, Thomas Monjalon,
Ferruh Yigit, Vladimir Medvedkin, Jiayu Hu, Sameh Gobriel,
Bernard Iremonger, Reshma Pattan, Honnappa Nagarahalli,
Ciara Power, Erik Gabriel Carrillo
Cc: dev, David Marchand
From: David Marchand <david.marchand@redhat.com>
Start a new release cycle with empty release notes.
The ABI version becomes 23.0.
The map files are updated to the new ABI major number (23).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Special handling of removed drivers is also dropped in check-abi.sh and
a note has been added in libabigail.abignore as a reminder.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
.github/workflows/build.yml | 4 +-
.travis.yml | 21 +---
ABI_VERSION | 2 +-
VERSION | 2 +-
devtools/check-abi.sh | 4 -
devtools/libabigail.abignore | 37 ------
doc/guides/rel_notes/index.rst | 1 +
doc/guides/rel_notes/release_22_11.rst | 136 +++++++++++++++++++++
drivers/baseband/acc100/version.map | 2 +-
drivers/baseband/fpga_5gnr_fec/version.map | 2 +-
drivers/baseband/fpga_lte_fec/version.map | 2 +-
drivers/baseband/la12xx/version.map | 2 +-
drivers/baseband/null/version.map | 2 +-
drivers/baseband/turbo_sw/version.map | 2 +-
drivers/bus/fslmc/version.map | 2 +-
drivers/bus/ifpga/version.map | 2 +-
drivers/bus/pci/version.map | 2 +-
drivers/bus/vdev/version.map | 2 +-
drivers/bus/vmbus/version.map | 2 +-
drivers/common/qat/version.map | 2 +-
drivers/compress/isal/version.map | 2 +-
drivers/compress/mlx5/version.map | 2 +-
drivers/compress/octeontx/version.map | 2 +-
drivers/compress/zlib/version.map | 2 +-
drivers/crypto/armv8/version.map | 2 +-
drivers/crypto/bcmfs/version.map | 2 +-
drivers/crypto/caam_jr/version.map | 2 +-
drivers/crypto/ccp/version.map | 2 +-
drivers/crypto/ipsec_mb/version.map | 2 +-
drivers/crypto/mlx5/version.map | 2 +-
drivers/crypto/mvsam/version.map | 2 +-
drivers/crypto/nitrox/version.map | 2 +-
drivers/crypto/null/version.map | 2 +-
drivers/crypto/octeontx/version.map | 2 +-
drivers/crypto/openssl/version.map | 2 +-
drivers/crypto/scheduler/version.map | 2 +-
drivers/crypto/virtio/version.map | 2 +-
drivers/dma/cnxk/version.map | 2 +-
drivers/dma/dpaa/version.map | 2 +-
drivers/dma/dpaa2/version.map | 2 +-
drivers/dma/hisilicon/version.map | 2 +-
drivers/dma/idxd/version.map | 2 +-
drivers/dma/ioat/version.map | 2 +-
drivers/dma/skeleton/version.map | 2 +-
drivers/event/dlb2/version.map | 2 +-
drivers/event/dpaa/version.map | 2 +-
drivers/event/dpaa2/version.map | 2 +-
drivers/event/dsw/version.map | 2 +-
drivers/event/octeontx/version.map | 2 +-
drivers/event/opdl/version.map | 2 +-
drivers/event/skeleton/version.map | 2 +-
drivers/event/sw/version.map | 2 +-
drivers/gpu/cuda/version.map | 2 +-
drivers/mempool/bucket/version.map | 2 +-
drivers/mempool/dpaa2/version.map | 2 +-
drivers/mempool/octeontx/version.map | 2 +-
drivers/mempool/ring/version.map | 2 +-
drivers/mempool/stack/version.map | 2 +-
drivers/net/af_packet/version.map | 2 +-
drivers/net/af_xdp/version.map | 2 +-
drivers/net/ark/version.map | 2 +-
drivers/net/atlantic/version.map | 2 +-
drivers/net/avp/version.map | 2 +-
drivers/net/axgbe/version.map | 2 +-
drivers/net/bnx2x/version.map | 2 +-
drivers/net/bnxt/version.map | 2 +-
drivers/net/bonding/version.map | 2 +-
drivers/net/cnxk/version.map | 12 +-
drivers/net/cxgbe/version.map | 2 +-
drivers/net/dpaa/version.map | 2 +-
drivers/net/dpaa2/version.map | 2 +-
drivers/net/e1000/version.map | 2 +-
drivers/net/ena/version.map | 2 +-
drivers/net/enetc/version.map | 2 +-
drivers/net/enetfec/version.map | 2 +-
drivers/net/enic/version.map | 2 +-
drivers/net/failsafe/version.map | 2 +-
drivers/net/fm10k/version.map | 2 +-
drivers/net/hinic/version.map | 2 +-
drivers/net/hns3/version.map | 2 +-
drivers/net/i40e/version.map | 2 +-
drivers/net/iavf/version.map | 2 +-
drivers/net/ice/version.map | 2 +-
drivers/net/igc/version.map | 2 +-
drivers/net/ionic/version.map | 2 +-
drivers/net/ipn3ke/version.map | 2 +-
drivers/net/ixgbe/version.map | 2 +-
drivers/net/kni/version.map | 2 +-
drivers/net/liquidio/version.map | 2 +-
drivers/net/memif/version.map | 2 +-
drivers/net/mlx4/version.map | 2 +-
drivers/net/mlx5/version.map | 2 +-
drivers/net/mvneta/version.map | 2 +-
drivers/net/mvpp2/version.map | 2 +-
drivers/net/netvsc/version.map | 2 +-
drivers/net/nfb/version.map | 2 +-
drivers/net/nfp/version.map | 2 +-
drivers/net/ngbe/version.map | 2 +-
drivers/net/null/version.map | 2 +-
drivers/net/octeontx/version.map | 2 +-
drivers/net/octeontx_ep/version.map | 2 +-
drivers/net/pcap/version.map | 2 +-
drivers/net/pfe/version.map | 2 +-
drivers/net/qede/version.map | 2 +-
drivers/net/ring/version.map | 2 +-
drivers/net/sfc/version.map | 2 +-
drivers/net/softnic/version.map | 2 +-
drivers/net/tap/version.map | 2 +-
drivers/net/thunderx/version.map | 2 +-
drivers/net/txgbe/version.map | 2 +-
drivers/net/vdev_netvsc/version.map | 2 +-
drivers/net/vhost/version.map | 2 +-
drivers/net/virtio/version.map | 2 +-
drivers/net/vmxnet3/version.map | 2 +-
drivers/raw/cnxk_bphy/version.map | 2 +-
drivers/raw/cnxk_gpio/version.map | 2 +-
drivers/raw/dpaa2_cmdif/version.map | 2 +-
drivers/raw/ifpga/version.map | 18 +--
drivers/raw/ioat/version.map | 2 +-
drivers/raw/ntb/version.map | 2 +-
drivers/raw/skeleton/version.map | 2 +-
drivers/regex/cn9k/version.map | 2 +-
drivers/regex/mlx5/version.map | 2 +-
drivers/vdpa/ifc/version.map | 2 +-
drivers/vdpa/mlx5/version.map | 2 +-
drivers/vdpa/sfc/version.map | 2 +-
lib/acl/version.map | 2 +-
lib/bbdev/version.map | 2 +-
lib/bitratestats/version.map | 2 +-
lib/bpf/version.map | 2 +-
lib/cfgfile/version.map | 2 +-
lib/cmdline/version.map | 2 +-
lib/cryptodev/version.map | 2 +-
lib/distributor/version.map | 2 +-
lib/eal/version.map | 2 +-
lib/efd/version.map | 2 +-
lib/ethdev/version.map | 2 +-
lib/eventdev/version.map | 2 +-
lib/fib/version.map | 2 +-
lib/gro/version.map | 2 +-
lib/gso/version.map | 2 +-
lib/hash/version.map | 2 +-
lib/ip_frag/version.map | 2 +-
lib/ipsec/version.map | 2 +-
lib/jobstats/version.map | 2 +-
lib/kni/version.map | 2 +-
lib/kvargs/version.map | 2 +-
lib/latencystats/version.map | 2 +-
lib/lpm/version.map | 2 +-
lib/mbuf/version.map | 2 +-
lib/member/version.map | 2 +-
lib/mempool/version.map | 2 +-
lib/meter/version.map | 2 +-
lib/metrics/version.map | 2 +-
lib/net/version.map | 2 +-
lib/pci/version.map | 2 +-
lib/pdump/version.map | 2 +-
lib/pipeline/version.map | 2 +-
lib/port/version.map | 2 +-
lib/power/version.map | 2 +-
lib/rawdev/version.map | 2 +-
lib/rcu/version.map | 2 +-
lib/reorder/version.map | 2 +-
lib/rib/version.map | 2 +-
lib/ring/version.map | 2 +-
lib/sched/version.map | 2 +-
lib/security/version.map | 2 +-
lib/stack/version.map | 2 +-
lib/table/version.map | 2 +-
lib/telemetry/version.map | 2 +-
lib/timer/version.map | 2 +-
lib/vhost/version.map | 2 +-
172 files changed, 319 insertions(+), 242 deletions(-)
create mode 100644 doc/guides/rel_notes/release_22_11.rst
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1106256539..6f04e7071c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,7 +25,7 @@ jobs:
MINGW: ${{ matrix.config.cross == 'mingw' }}
MINI: ${{ matrix.config.mini != '' }}
PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
- REF_GIT_TAG: v22.03
+ REF_GIT_TAG: none
RISCV64: ${{ matrix.config.cross == 'riscv64' }}
RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
@@ -43,7 +43,7 @@ jobs:
- os: ubuntu-20.04
compiler: gcc
library: shared
- checks: abi+doc+tests
+ checks: doc+tests
- os: ubuntu-20.04
compiler: clang
library: static
diff --git a/.travis.yml b/.travis.yml
index 5f46dccb54..4bb5bf629e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh
env:
global:
- LIBABIGAIL_VERSION=libabigail-1.8
- - REF_GIT_TAG=v22.03
+ - REF_GIT_TAG=none
jobs:
include:
@@ -61,14 +61,6 @@ jobs:
packages:
- *required_packages
- *doc_packages
- - env: DEF_LIB="shared" ABI_CHECKS=true
- arch: amd64
- compiler: gcc
- addons:
- apt:
- packages:
- - *required_packages
- - *libabigail_build_packages
# x86_64 clang jobs
- env: DEF_LIB="static"
arch: amd64
@@ -145,17 +137,6 @@ jobs:
packages:
- *required_packages
- *doc_packages
- - env: DEF_LIB="shared" ABI_CHECKS=true
- dist: focal
- arch: arm64-graviton2
- virt: vm
- group: edge
- compiler: gcc
- addons:
- apt:
- packages:
- - *required_packages
- - *libabigail_build_packages
# aarch64 clang jobs
- env: DEF_LIB="static"
dist: focal
diff --git a/ABI_VERSION b/ABI_VERSION
index 95af471221..919c868b57 100644
--- a/ABI_VERSION
+++ b/ABI_VERSION
@@ -1 +1 @@
-22.2
+23.0
diff --git a/VERSION b/VERSION
index 97371cc668..4bc005def2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-22.07.0
+22.11.0-rc0
diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index d465c8cee0..c583eae2fd 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -37,10 +37,6 @@ fi
error=
for dump in $(find $refdir -name "*.dump"); do
name=$(basename $dump)
- if grep -qE '\<librte_*(.*_octeontx2|raw_dpaa2_qdma)' $dump; then
- echo "Skipped removed driver $name."
- continue
- fi
dump2=$(find $newdir -name $name)
if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then
echo "Error: cannot find $name in $newdir" >&2
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 8c8c648895..7a93de3ba1 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -34,40 +34,3 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Temporary exceptions till next major ABI version ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; Ignore ethdev event enum update
-; because new event cannot be received if not registered
-[suppress_type]
- type_kind = enum
- changed_enumerators = RTE_ETH_EVENT_MAX
-
-; Ignore fields inserted in cacheline boundary of rte_eth_rxq_info
-; because the struct size is unchanged
-[suppress_type]
- name = rte_eth_rxq_info
- has_data_member_inserted_between = {offset_of(rx_buf_size), end}
-
-; Ignore fields inserted in place of reserved_opts of rte_security_ipsec_sa_options
-[suppress_type]
- name = rte_security_ipsec_sa_options
- has_data_member_inserted_between = {offset_of(reserved_opts), end}
-
-; Ignore section attribute fixes in experimental regexdev library
-[suppress_file]
- soname_regexp = ^librte_regexdev\.
-
-; Ignore changes in common mlx5 driver, should be all internal
-[suppress_file]
- soname_regexp = ^librte_common_mlx5\.
-
-; Ignore visibility fix of local functions in experimental auxiliary driver
-[suppress_file]
- soname_regexp = ^librte_bus_auxiliary\.
-
-; Ignore visibility fix of local functions in experimental gpudev library
-[suppress_file]
- soname_regexp = ^librte_gpudev\.
-
-; Ignore libabigail false-positive in clang builds, after moving code.
-[suppress_function]
- name = rte_eal_remote_launch
diff --git a/doc/guides/rel_notes/index.rst b/doc/guides/rel_notes/index.rst
index 93a3f7e5da..f6782b91db 100644
--- a/doc/guides/rel_notes/index.rst
+++ b/doc/guides/rel_notes/index.rst
@@ -8,6 +8,7 @@ Release Notes
:maxdepth: 1
:numbered:
+ release_22_11
release_22_07
release_22_03
release_21_11
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
new file mode 100644
index 0000000000..8c021cf050
--- /dev/null
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -0,0 +1,136 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2022 The DPDK contributors
+
+.. include:: <isonum.txt>
+
+DPDK Release 22.11
+==================
+
+.. **Read this first.**
+
+ The text in the sections below explains how to update the release notes.
+
+ Use proper spelling, capitalization and punctuation in all sections.
+
+ Variable and config names should be quoted as fixed width text:
+ ``LIKE_THIS``.
+
+ Build the docs and view the output file to ensure the changes are correct::
+
+ ninja -C build doc
+ xdg-open build/doc/guides/html/rel_notes/release_22_11.html
+
+
+New Features
+------------
+
+.. This section should contain new features added in this release.
+ Sample format:
+
+ * **Add a title in the past tense with a full stop.**
+
+ Add a short 1-2 sentence description in the past tense.
+ The description should be enough to allow someone scanning
+ the release notes to understand the new feature.
+
+ If the feature adds a lot of sub-features you can use a bullet list
+ like this:
+
+ * Added feature foo to do something.
+ * Enhanced feature bar to do something else.
+
+ Refer to the previous release notes for examples.
+
+ Suggested order in release notes items:
+ * Core libs (EAL, mempool, ring, mbuf, buses)
+ * Device abstraction libs and PMDs (ordered alphabetically by vendor name)
+ - ethdev (lib, PMDs)
+ - cryptodev (lib, PMDs)
+ - eventdev (lib, PMDs)
+ - etc
+ * Other libs
+ * Apps, Examples, Tools (if significant)
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =======================================================
+
+
+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.
+ =======================================================
+
+
+API Changes
+-----------
+
+.. This section should contain API changes. Sample format:
+
+ * sample: Add a short 1-2 sentence description of the API change
+ which was announced in the previous releases and made in this release.
+ Start with a scope label like "ethdev:".
+ Use fixed width quotes for ``function_names`` or ``struct_names``.
+ Use 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.
+ =======================================================
+
+
+ABI Changes
+-----------
+
+.. This section should contain ABI changes. Sample format:
+
+ * sample: Add a short 1-2 sentence description of the ABI change
+ which was announced in the previous releases and made in this release.
+ Start with a scope label like "ethdev:".
+ Use fixed width quotes for ``function_names`` or ``struct_names``.
+ Use 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.
+ =======================================================
+
+
+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.
+ =======================================================
+
+
+Tested Platforms
+----------------
+
+.. This section should contain a list of platforms that were tested
+ with this release.
+
+ The format is:
+
+ * <vendor> platform with <vendor> <type of devices> combinations
+
+ * List of CPU
+ * List of OS
+ * List of devices
+ * Other relevant details...
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =======================================================
diff --git a/drivers/baseband/acc100/version.map b/drivers/baseband/acc100/version.map
index 13f0398d71..b4ff13e38f 100644
--- a/drivers/baseband/acc100/version.map
+++ b/drivers/baseband/acc100/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/fpga_5gnr_fec/version.map b/drivers/baseband/fpga_5gnr_fec/version.map
index de4e5025bf..6b191cf330 100644
--- a/drivers/baseband/fpga_5gnr_fec/version.map
+++ b/drivers/baseband/fpga_5gnr_fec/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/fpga_lte_fec/version.map b/drivers/baseband/fpga_lte_fec/version.map
index e3bfa6edb0..aab28a9976 100644
--- a/drivers/baseband/fpga_lte_fec/version.map
+++ b/drivers/baseband/fpga_lte_fec/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/la12xx/version.map b/drivers/baseband/la12xx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/baseband/la12xx/version.map
+++ b/drivers/baseband/la12xx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/null/version.map b/drivers/baseband/null/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/baseband/null/version.map
+++ b/drivers/baseband/null/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/baseband/turbo_sw/version.map b/drivers/baseband/turbo_sw/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/baseband/turbo_sw/version.map
+++ b/drivers/baseband/turbo_sw/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/bus/fslmc/version.map b/drivers/bus/fslmc/version.map
index 79b29746b6..a25a9e8ca0 100644
--- a/drivers/bus/fslmc/version.map
+++ b/drivers/bus/fslmc/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_fslmc_vfio_mem_dmamap;
diff --git a/drivers/bus/ifpga/version.map b/drivers/bus/ifpga/version.map
index 8ac3a4d258..c0a1eecae8 100644
--- a/drivers/bus/ifpga/version.map
+++ b/drivers/bus/ifpga/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ifpga_driver_register;
diff --git a/drivers/bus/pci/version.map b/drivers/bus/pci/version.map
index aa56439c2b..3d5c2f3068 100644
--- a/drivers/bus/pci/version.map
+++ b/drivers/bus/pci/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pci_dump;
diff --git a/drivers/bus/vdev/version.map b/drivers/bus/vdev/version.map
index 0d60b7e2bc..7cc3098a50 100644
--- a/drivers/bus/vdev/version.map
+++ b/drivers/bus/vdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_vdev_add_custom_scan;
diff --git a/drivers/bus/vmbus/version.map b/drivers/bus/vmbus/version.map
index 3cadec7fae..84db31b6e9 100644
--- a/drivers/bus/vmbus/version.map
+++ b/drivers/bus/vmbus/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_vmbus_chan_close;
diff --git a/drivers/common/qat/version.map b/drivers/common/qat/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/common/qat/version.map
+++ b/drivers/common/qat/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/isal/version.map b/drivers/compress/isal/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/isal/version.map
+++ b/drivers/compress/isal/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/mlx5/version.map b/drivers/compress/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/mlx5/version.map
+++ b/drivers/compress/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/octeontx/version.map b/drivers/compress/octeontx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/octeontx/version.map
+++ b/drivers/compress/octeontx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/compress/zlib/version.map b/drivers/compress/zlib/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/compress/zlib/version.map
+++ b/drivers/compress/zlib/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/armv8/version.map b/drivers/crypto/armv8/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/armv8/version.map
+++ b/drivers/crypto/armv8/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/bcmfs/version.map b/drivers/crypto/bcmfs/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/bcmfs/version.map
+++ b/drivers/crypto/bcmfs/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/caam_jr/version.map b/drivers/crypto/caam_jr/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/caam_jr/version.map
+++ b/drivers/crypto/caam_jr/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/ccp/version.map b/drivers/crypto/ccp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/ccp/version.map
+++ b/drivers/crypto/ccp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/ipsec_mb/version.map b/drivers/crypto/ipsec_mb/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/ipsec_mb/version.map
+++ b/drivers/crypto/ipsec_mb/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/mlx5/version.map b/drivers/crypto/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/mlx5/version.map
+++ b/drivers/crypto/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/mvsam/version.map b/drivers/crypto/mvsam/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/mvsam/version.map
+++ b/drivers/crypto/mvsam/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/nitrox/version.map b/drivers/crypto/nitrox/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/nitrox/version.map
+++ b/drivers/crypto/nitrox/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/null/version.map b/drivers/crypto/null/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/null/version.map
+++ b/drivers/crypto/null/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/octeontx/version.map b/drivers/crypto/octeontx/version.map
index 997a95ea33..cc4b6b0970 100644
--- a/drivers/crypto/octeontx/version.map
+++ b/drivers/crypto/octeontx/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/openssl/version.map b/drivers/crypto/openssl/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/openssl/version.map
+++ b/drivers/crypto/openssl/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/crypto/scheduler/version.map b/drivers/crypto/scheduler/version.map
index 47e4487b75..74491beabb 100644
--- a/drivers/crypto/scheduler/version.map
+++ b/drivers/crypto/scheduler/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_cryptodev_scheduler_load_user_scheduler;
diff --git a/drivers/crypto/virtio/version.map b/drivers/crypto/virtio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/crypto/virtio/version.map
+++ b/drivers/crypto/virtio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/cnxk/version.map b/drivers/dma/cnxk/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/cnxk/version.map
+++ b/drivers/dma/cnxk/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/dpaa/version.map b/drivers/dma/dpaa/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/dpaa/version.map
+++ b/drivers/dma/dpaa/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/dpaa2/version.map b/drivers/dma/dpaa2/version.map
index 38d3d225db..0c020e5249 100644
--- a/drivers/dma/dpaa2/version.map
+++ b/drivers/dma/dpaa2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/hisilicon/version.map b/drivers/dma/hisilicon/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/hisilicon/version.map
+++ b/drivers/dma/hisilicon/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/idxd/version.map b/drivers/dma/idxd/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/idxd/version.map
+++ b/drivers/dma/idxd/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/ioat/version.map b/drivers/dma/ioat/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/ioat/version.map
+++ b/drivers/dma/ioat/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/dma/skeleton/version.map b/drivers/dma/skeleton/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/dma/skeleton/version.map
+++ b/drivers/dma/skeleton/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dlb2/version.map b/drivers/event/dlb2/version.map
index c727207d1a..1327e3e335 100644
--- a/drivers/event/dlb2/version.map
+++ b/drivers/event/dlb2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dpaa/version.map b/drivers/event/dpaa/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/dpaa/version.map
+++ b/drivers/event/dpaa/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dpaa2/version.map b/drivers/event/dpaa2/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/dpaa2/version.map
+++ b/drivers/event/dpaa2/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/dsw/version.map b/drivers/event/dsw/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/dsw/version.map
+++ b/drivers/event/dsw/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/octeontx/version.map b/drivers/event/octeontx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/octeontx/version.map
+++ b/drivers/event/octeontx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/opdl/version.map b/drivers/event/opdl/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/opdl/version.map
+++ b/drivers/event/opdl/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/skeleton/version.map b/drivers/event/skeleton/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/skeleton/version.map
+++ b/drivers/event/skeleton/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/event/sw/version.map b/drivers/event/sw/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/event/sw/version.map
+++ b/drivers/event/sw/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/gpu/cuda/version.map b/drivers/gpu/cuda/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/gpu/cuda/version.map
+++ b/drivers/gpu/cuda/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/bucket/version.map b/drivers/mempool/bucket/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/bucket/version.map
+++ b/drivers/mempool/bucket/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/dpaa2/version.map b/drivers/mempool/dpaa2/version.map
index cfd4ae617a..0023765843 100644
--- a/drivers/mempool/dpaa2/version.map
+++ b/drivers/mempool/dpaa2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_dpaa2_mbuf_from_buf_addr;
diff --git a/drivers/mempool/octeontx/version.map b/drivers/mempool/octeontx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/octeontx/version.map
+++ b/drivers/mempool/octeontx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/ring/version.map b/drivers/mempool/ring/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/ring/version.map
+++ b/drivers/mempool/ring/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/mempool/stack/version.map b/drivers/mempool/stack/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/mempool/stack/version.map
+++ b/drivers/mempool/stack/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/af_packet/version.map b/drivers/net/af_packet/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/af_packet/version.map
+++ b/drivers/net/af_packet/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/af_xdp/version.map b/drivers/net/af_xdp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/af_xdp/version.map
+++ b/drivers/net/af_xdp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ark/version.map b/drivers/net/ark/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ark/version.map
+++ b/drivers/net/ark/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/atlantic/version.map b/drivers/net/atlantic/version.map
index d36fc61a84..e301b105fe 100644
--- a/drivers/net/atlantic/version.map
+++ b/drivers/net/atlantic/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/avp/version.map b/drivers/net/avp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/avp/version.map
+++ b/drivers/net/avp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/axgbe/version.map b/drivers/net/axgbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/axgbe/version.map
+++ b/drivers/net/axgbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/bnx2x/version.map b/drivers/net/bnx2x/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/bnx2x/version.map
+++ b/drivers/net/bnx2x/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/bnxt/version.map b/drivers/net/bnxt/version.map
index 2ba5ec5f6e..075bb37a36 100644
--- a/drivers/net/bnxt/version.map
+++ b/drivers/net/bnxt/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_bnxt_get_vf_rx_status;
diff --git a/drivers/net/bonding/version.map b/drivers/net/bonding/version.map
index d7142c4f94..9333923b4e 100644
--- a/drivers/net/bonding/version.map
+++ b/drivers/net/bonding/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_bond_8023ad_agg_selection_get;
diff --git a/drivers/net/cnxk/version.map b/drivers/net/cnxk/version.map
index 0bcc65fe6f..3ef3e76bb0 100644
--- a/drivers/net/cnxk/version.map
+++ b/drivers/net/cnxk/version.map
@@ -1,15 +1,15 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
-INTERNAL {
- global:
- cnxk_nix_inb_mode_set;
-};
-
EXPERIMENTAL {
# added in 22.07
global:
rte_pmd_cnxk_hw_sa_read;
rte_pmd_cnxk_hw_sa_write;
};
+
+INTERNAL {
+ global:
+ cnxk_nix_inb_mode_set;
+};
diff --git a/drivers/net/cxgbe/version.map b/drivers/net/cxgbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/cxgbe/version.map
+++ b/drivers/net/cxgbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/dpaa/version.map b/drivers/net/dpaa/version.map
index 338ea2d8b2..5268d39ef6 100644
--- a/drivers/net/dpaa/version.map
+++ b/drivers/net/dpaa/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_dpaa_set_tx_loopback;
diff --git a/drivers/net/dpaa2/version.map b/drivers/net/dpaa2/version.map
index cc82b8579d..d6535343b1 100644
--- a/drivers/net/dpaa2/version.map
+++ b/drivers/net/dpaa2/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_dpaa2_mux_flow_create;
diff --git a/drivers/net/e1000/version.map b/drivers/net/e1000/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/e1000/version.map
+++ b/drivers/net/e1000/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ena/version.map b/drivers/net/ena/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ena/version.map
+++ b/drivers/net/ena/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/enetc/version.map b/drivers/net/enetc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/enetc/version.map
+++ b/drivers/net/enetc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/enetfec/version.map b/drivers/net/enetfec/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/enetfec/version.map
+++ b/drivers/net/enetfec/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/enic/version.map b/drivers/net/enic/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/enic/version.map
+++ b/drivers/net/enic/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/failsafe/version.map b/drivers/net/failsafe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/failsafe/version.map
+++ b/drivers/net/failsafe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/fm10k/version.map b/drivers/net/fm10k/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/fm10k/version.map
+++ b/drivers/net/fm10k/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/hinic/version.map b/drivers/net/hinic/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/hinic/version.map
+++ b/drivers/net/hinic/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/hns3/version.map b/drivers/net/hns3/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/hns3/version.map
+++ b/drivers/net/hns3/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/i40e/version.map b/drivers/net/i40e/version.map
index 5dd68158d3..561db50eac 100644
--- a/drivers/net/i40e/version.map
+++ b/drivers/net/i40e/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_i40e_add_vf_mac_addr;
diff --git a/drivers/net/iavf/version.map b/drivers/net/iavf/version.map
index 97f0f87311..4796c2884f 100644
--- a/drivers/net/iavf/version.map
+++ b/drivers/net/iavf/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ice/version.map b/drivers/net/ice/version.map
index 60a3f17393..e7e8e50557 100644
--- a/drivers/net/ice/version.map
+++ b/drivers/net/ice/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/igc/version.map b/drivers/net/igc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/igc/version.map
+++ b/drivers/net/igc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ionic/version.map b/drivers/net/ionic/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ionic/version.map
+++ b/drivers/net/ionic/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ipn3ke/version.map b/drivers/net/ipn3ke/version.map
index 4fd4e7c09b..4c48499993 100644
--- a/drivers/net/ipn3ke/version.map
+++ b/drivers/net/ipn3ke/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ixgbe/version.map b/drivers/net/ixgbe/version.map
index f0f29d8749..94693ccc1a 100644
--- a/drivers/net/ixgbe/version.map
+++ b/drivers/net/ixgbe/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_ixgbe_bypass_event_show;
diff --git a/drivers/net/kni/version.map b/drivers/net/kni/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/kni/version.map
+++ b/drivers/net/kni/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/liquidio/version.map b/drivers/net/liquidio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/liquidio/version.map
+++ b/drivers/net/liquidio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/memif/version.map b/drivers/net/memif/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/memif/version.map
+++ b/drivers/net/memif/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mlx4/version.map b/drivers/net/mlx4/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/mlx4/version.map
+++ b/drivers/net/mlx4/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mlx5/version.map b/drivers/net/mlx5/version.map
index c97dfe440a..9942de5079 100644
--- a/drivers/net/mlx5/version.map
+++ b/drivers/net/mlx5/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mvneta/version.map b/drivers/net/mvneta/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/mvneta/version.map
+++ b/drivers/net/mvneta/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/mvpp2/version.map b/drivers/net/mvpp2/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/mvpp2/version.map
+++ b/drivers/net/mvpp2/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/netvsc/version.map b/drivers/net/netvsc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/netvsc/version.map
+++ b/drivers/net/netvsc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/nfb/version.map b/drivers/net/nfb/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/nfb/version.map
+++ b/drivers/net/nfb/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/nfp/version.map b/drivers/net/nfp/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/nfp/version.map
+++ b/drivers/net/nfp/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ngbe/version.map b/drivers/net/ngbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/ngbe/version.map
+++ b/drivers/net/ngbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/null/version.map b/drivers/net/null/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/null/version.map
+++ b/drivers/net/null/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/octeontx/version.map b/drivers/net/octeontx/version.map
index d12156778e..ae37d32d04 100644
--- a/drivers/net/octeontx/version.map
+++ b/drivers/net/octeontx/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_octeontx_pchan_map;
diff --git a/drivers/net/octeontx_ep/version.map b/drivers/net/octeontx_ep/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/octeontx_ep/version.map
+++ b/drivers/net/octeontx_ep/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/pcap/version.map b/drivers/net/pcap/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/pcap/version.map
+++ b/drivers/net/pcap/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/pfe/version.map b/drivers/net/pfe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/pfe/version.map
+++ b/drivers/net/pfe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/qede/version.map b/drivers/net/qede/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/qede/version.map
+++ b/drivers/net/qede/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/ring/version.map b/drivers/net/ring/version.map
index e43f5ea908..84e52064e0 100644
--- a/drivers/net/ring/version.map
+++ b/drivers/net/ring/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_from_ring;
diff --git a/drivers/net/sfc/version.map b/drivers/net/sfc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/sfc/version.map
+++ b/drivers/net/sfc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/softnic/version.map b/drivers/net/softnic/version.map
index 01e1514276..4dac46ecd5 100644
--- a/drivers/net/softnic/version.map
+++ b/drivers/net/softnic/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pmd_softnic_manage;
diff --git a/drivers/net/tap/version.map b/drivers/net/tap/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/tap/version.map
+++ b/drivers/net/tap/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/thunderx/version.map b/drivers/net/thunderx/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/thunderx/version.map
+++ b/drivers/net/thunderx/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/txgbe/version.map b/drivers/net/txgbe/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/txgbe/version.map
+++ b/drivers/net/txgbe/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/vdev_netvsc/version.map b/drivers/net/vdev_netvsc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/vdev_netvsc/version.map
+++ b/drivers/net/vdev_netvsc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/vhost/version.map b/drivers/net/vhost/version.map
index 1aa8abef75..e42c89f1eb 100644
--- a/drivers/net/vhost/version.map
+++ b/drivers/net/vhost/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_vhost_get_queue_event;
diff --git a/drivers/net/virtio/version.map b/drivers/net/virtio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/virtio/version.map
+++ b/drivers/net/virtio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/net/vmxnet3/version.map b/drivers/net/vmxnet3/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/net/vmxnet3/version.map
+++ b/drivers/net/vmxnet3/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/cnxk_bphy/version.map b/drivers/raw/cnxk_bphy/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/cnxk_bphy/version.map
+++ b/drivers/raw/cnxk_bphy/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/cnxk_gpio/version.map b/drivers/raw/cnxk_gpio/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/cnxk_gpio/version.map
+++ b/drivers/raw/cnxk_gpio/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/dpaa2_cmdif/version.map b/drivers/raw/dpaa2_cmdif/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/dpaa2_cmdif/version.map
+++ b/drivers/raw/dpaa2_cmdif/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index ff71a453e2..f5c3959b7f 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -1,18 +1,18 @@
-DPDK_22 {
+DPDK_23 {
global:
+ rte_pmd_ifpga_cleanup;
rte_pmd_ifpga_get_dev_id;
- rte_pmd_ifpga_get_rsu_status;
- rte_pmd_ifpga_set_rsu_status;
- rte_pmd_ifpga_get_property;
+ rte_pmd_ifpga_get_pci_bus;
rte_pmd_ifpga_get_phy_info;
- rte_pmd_ifpga_update_flash;
- rte_pmd_ifpga_stop_update;
+ rte_pmd_ifpga_get_property;
+ rte_pmd_ifpga_get_rsu_status;
+ rte_pmd_ifpga_partial_reconfigure;
rte_pmd_ifpga_reboot_try;
rte_pmd_ifpga_reload;
- rte_pmd_ifpga_get_pci_bus;
- rte_pmd_ifpga_partial_reconfigure;
- rte_pmd_ifpga_cleanup;
+ rte_pmd_ifpga_set_rsu_status;
+ rte_pmd_ifpga_stop_update;
+ rte_pmd_ifpga_update_flash;
local: *;
};
diff --git a/drivers/raw/ioat/version.map b/drivers/raw/ioat/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/ioat/version.map
+++ b/drivers/raw/ioat/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/ntb/version.map b/drivers/raw/ntb/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/ntb/version.map
+++ b/drivers/raw/ntb/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/raw/skeleton/version.map b/drivers/raw/skeleton/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/raw/skeleton/version.map
+++ b/drivers/raw/skeleton/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/regex/cn9k/version.map b/drivers/regex/cn9k/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/regex/cn9k/version.map
+++ b/drivers/regex/cn9k/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/regex/mlx5/version.map b/drivers/regex/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/regex/mlx5/version.map
+++ b/drivers/regex/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/vdpa/ifc/version.map b/drivers/vdpa/ifc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/vdpa/ifc/version.map
+++ b/drivers/vdpa/ifc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/vdpa/mlx5/version.map b/drivers/vdpa/mlx5/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/vdpa/mlx5/version.map
+++ b/drivers/vdpa/mlx5/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/drivers/vdpa/sfc/version.map b/drivers/vdpa/sfc/version.map
index c2e0723b4c..78c3585d7c 100644
--- a/drivers/vdpa/sfc/version.map
+++ b/drivers/vdpa/sfc/version.map
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
local: *;
};
diff --git a/lib/acl/version.map b/lib/acl/version.map
index 2b18c21601..4c15dbbb36 100644
--- a/lib/acl/version.map
+++ b/lib/acl/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_acl_add_rules;
diff --git a/lib/bbdev/version.map b/lib/bbdev/version.map
index cce3f3c8f5..25a0a22bd4 100644
--- a/lib/bbdev/version.map
+++ b/lib/bbdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_bbdev_allocate;
diff --git a/lib/bitratestats/version.map b/lib/bitratestats/version.map
index 01c61670dd..dc110440e0 100644
--- a/lib/bitratestats/version.map
+++ b/lib/bitratestats/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_stats_bitrate_calc;
diff --git a/lib/bpf/version.map b/lib/bpf/version.map
index 3b953f2f45..04bd657a85 100644
--- a/lib/bpf/version.map
+++ b/lib/bpf/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_bpf_destroy;
diff --git a/lib/cfgfile/version.map b/lib/cfgfile/version.map
index 02cbccb8ab..fdb0f13040 100644
--- a/lib/cfgfile/version.map
+++ b/lib/cfgfile/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_cfgfile_add_entry;
diff --git a/lib/cmdline/version.map b/lib/cmdline/version.map
index fc7fdd6ea4..e3d59aaf8d 100644
--- a/lib/cmdline/version.map
+++ b/lib/cmdline/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
cirbuf_add_buf_head;
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index dbf1f62199..5aee87c6f7 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_crypto_aead_algorithm_strings;
diff --git a/lib/distributor/version.map b/lib/distributor/version.map
index 4d9ff07373..7a34dfa2f2 100644
--- a/lib/distributor/version.map
+++ b/lib/distributor/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_distributor_clear_returns;
diff --git a/lib/eal/version.map b/lib/eal/version.map
index c2a2cebf69..1f293e768b 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
__rte_panic;
diff --git a/lib/efd/version.map b/lib/efd/version.map
index 0226285245..67886414ab 100644
--- a/lib/efd/version.map
+++ b/lib/efd/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_efd_create;
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index d46f31b63f..03f52fee91 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_add_first_rx_callback;
diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
index 886e2ec875..d99f996245 100644
--- a/lib/eventdev/version.map
+++ b/lib/eventdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
__rte_eventdev_trace_crypto_adapter_enqueue;
diff --git a/lib/fib/version.map b/lib/fib/version.map
index b23fa42b9b..a867d2b7d8 100644
--- a/lib/fib/version.map
+++ b/lib/fib/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_fib6_add;
diff --git a/lib/gro/version.map b/lib/gro/version.map
index f8a32e221c..105aa64ca3 100644
--- a/lib/gro/version.map
+++ b/lib/gro/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_gro_ctx_create;
diff --git a/lib/gso/version.map b/lib/gso/version.map
index 73767623b9..f6b552de6d 100644
--- a/lib/gso/version.map
+++ b/lib/gso/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_gso_segment;
diff --git a/lib/hash/version.map b/lib/hash/version.map
index c2e261ed13..bdcebd19c2 100644
--- a/lib/hash/version.map
+++ b/lib/hash/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_fbk_hash_create;
diff --git a/lib/ip_frag/version.map b/lib/ip_frag/version.map
index e537224293..b9c1ccaa1b 100644
--- a/lib/ip_frag/version.map
+++ b/lib/ip_frag/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ip_frag_free_death_row;
diff --git a/lib/ipsec/version.map b/lib/ipsec/version.map
index 0af27ffd60..f17a49dd26 100644
--- a/lib/ipsec/version.map
+++ b/lib/ipsec/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ipsec_pkt_crypto_group;
diff --git a/lib/jobstats/version.map b/lib/jobstats/version.map
index 89faa02004..bca7480afb 100644
--- a/lib/jobstats/version.map
+++ b/lib/jobstats/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_jobstats_abort;
diff --git a/lib/kni/version.map b/lib/kni/version.map
index cc7790651a..83bbbe880f 100644
--- a/lib/kni/version.map
+++ b/lib/kni/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_kni_alloc;
diff --git a/lib/kvargs/version.map b/lib/kvargs/version.map
index 0d42cd58a8..781f71cf23 100644
--- a/lib/kvargs/version.map
+++ b/lib/kvargs/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_kvargs_count;
diff --git a/lib/latencystats/version.map b/lib/latencystats/version.map
index be5b014cd7..79b8395f12 100644
--- a/lib/latencystats/version.map
+++ b/lib/latencystats/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_latencystats_get;
diff --git a/lib/lpm/version.map b/lib/lpm/version.map
index 0cdd04822e..e1a7aaedbb 100644
--- a/lib/lpm/version.map
+++ b/lib/lpm/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_lpm6_add;
diff --git a/lib/mbuf/version.map b/lib/mbuf/version.map
index 2745c2b77c..ed486ed14e 100644
--- a/lib/mbuf/version.map
+++ b/lib/mbuf/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
__rte_pktmbuf_linearize;
diff --git a/lib/member/version.map b/lib/member/version.map
index f287aabc91..19469c6aba 100644
--- a/lib/member/version.map
+++ b/lib/member/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_member_add;
diff --git a/lib/mempool/version.map b/lib/mempool/version.map
index 1b7d7c5456..b67d7aace7 100644
--- a/lib/mempool/version.map
+++ b/lib/mempool/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_mempool_audit;
diff --git a/lib/meter/version.map b/lib/meter/version.map
index befa3b7e32..b10b544641 100644
--- a/lib/meter/version.map
+++ b/lib/meter/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_meter_srtcm_config;
diff --git a/lib/metrics/version.map b/lib/metrics/version.map
index b11a9647cd..89ffa9be80 100644
--- a/lib/metrics/version.map
+++ b/lib/metrics/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_metrics_deinit;
diff --git a/lib/net/version.map b/lib/net/version.map
index 4f4330d1c4..e8fe2b7635 100644
--- a/lib/net/version.map
+++ b/lib/net/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_eth_random_addr;
diff --git a/lib/pci/version.map b/lib/pci/version.map
index 3f38303749..e9282ff49c 100644
--- a/lib/pci/version.map
+++ b/lib/pci/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pci_addr_cmp;
diff --git a/lib/pdump/version.map b/lib/pdump/version.map
index ce5502d9cd..25df5a82c2 100644
--- a/lib/pdump/version.map
+++ b/lib/pdump/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pdump_disable;
diff --git a/lib/pipeline/version.map b/lib/pipeline/version.map
index 8312307a7a..1baa74a77a 100644
--- a/lib/pipeline/version.map
+++ b/lib/pipeline/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_pipeline_ah_packet_drop;
diff --git a/lib/port/version.map b/lib/port/version.map
index 73d0825d2e..af6cf696fd 100644
--- a/lib/port/version.map
+++ b/lib/port/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_port_ethdev_reader_ops;
diff --git a/lib/power/version.map b/lib/power/version.map
index a687754f4a..f9b2947adf 100644
--- a/lib/power/version.map
+++ b/lib/power/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_power_exit;
diff --git a/lib/rawdev/version.map b/lib/rawdev/version.map
index 4f56870761..8278aacdea 100644
--- a/lib/rawdev/version.map
+++ b/lib/rawdev/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_rawdev_close;
diff --git a/lib/rcu/version.map b/lib/rcu/version.map
index b63c74f856..cabed64fca 100644
--- a/lib/rcu/version.map
+++ b/lib/rcu/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_rcu_log_type;
diff --git a/lib/reorder/version.map b/lib/reorder/version.map
index 250e6664f5..e114d17730 100644
--- a/lib/reorder/version.map
+++ b/lib/reorder/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_reorder_create;
diff --git a/lib/rib/version.map b/lib/rib/version.map
index f356fe8849..ca2815e44b 100644
--- a/lib/rib/version.map
+++ b/lib/rib/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_rib6_create;
diff --git a/lib/ring/version.map b/lib/ring/version.map
index 3377293ee4..4d7c27a6d9 100644
--- a/lib/ring/version.map
+++ b/lib/ring/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_ring_create;
diff --git a/lib/sched/version.map b/lib/sched/version.map
index 13d7510584..2f64834c8f 100644
--- a/lib/sched/version.map
+++ b/lib/sched/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_approx;
diff --git a/lib/security/version.map b/lib/security/version.map
index edf4887e12..c770b2e8f8 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_security_capabilities_get;
diff --git a/lib/stack/version.map b/lib/stack/version.map
index e145e32451..c0250f5cdf 100644
--- a/lib/stack/version.map
+++ b/lib/stack/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_stack_create;
diff --git a/lib/table/version.map b/lib/table/version.map
index 623709f886..e32e15a5fc 100644
--- a/lib/table/version.map
+++ b/lib/table/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_table_acl_ops;
diff --git a/lib/telemetry/version.map b/lib/telemetry/version.map
index 77528bb1fe..9794f9ea20 100644
--- a/lib/telemetry/version.map
+++ b/lib/telemetry/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_tel_data_add_array_container;
diff --git a/lib/timer/version.map b/lib/timer/version.map
index 4b782456da..101f5c18b5 100644
--- a/lib/timer/version.map
+++ b/lib/timer/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_timer_alt_dump_stats;
diff --git a/lib/vhost/version.map b/lib/vhost/version.map
index 9329f88e79..18574346d5 100644
--- a/lib/vhost/version.map
+++ b/lib/vhost/version.map
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
global:
rte_vdpa_find_device_by_name;
--
2.25.1
^ permalink raw reply [relevance 13%]
* [PATCH 3/3] ethdev: remove deprecated Flow Director configuration
@ 2022-08-03 11:13 1% ` Andrew Rybchenko
2022-08-04 11:07 0% ` Dongdong Liu
0 siblings, 1 reply; 200+ results
From: Andrew Rybchenko @ 2022-08-03 11:13 UTC (permalink / raw)
To: Aman Singh, Yuying Zhang, Qi Zhang, Xiao Wang, Qiming Yang,
Wenjun Wu, Ray Kinsella, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Dongdong Liu, Yisen Zhuang,
Beilei Xing, Harman Kalra, Rasesh Mody, Devendra Singh Rawat,
Jerin Jacob, Maciej Czekaj, Jiawen Wu, Jian Wang,
Thomas Monjalon, Ferruh Yigit
Cc: dev
Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.
Add internal Flow Director configuration copy in ixgbe and txgbe device
private data since flow API supports requires it. Initialize mode to
the first flow rule mode on the rule validation or creation.
Since Flow Director configuration data types are still used by some
drivers internally, move it from public API to ethdev driver internal
API.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline.c | 343 --------------------
app/test-pmd/config.c | 100 ------
app/test-pmd/parameters.c | 76 -----
app/test-pmd/testpmd.c | 24 --
app/test-pmd/testpmd.h | 6 -
doc/guides/nics/fm10k.rst | 2 -
doc/guides/nics/ixgbe.rst | 1 -
doc/guides/rel_notes/deprecation.rst | 4 -
doc/guides/rel_notes/release_22_11.rst | 4 +
doc/guides/testpmd_app_ug/run_app.rst | 27 --
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 38 ---
drivers/net/cnxk/cnxk_ethdev.c | 5 -
drivers/net/fm10k/fm10k_rxtx_vec.c | 5 -
drivers/net/hns3/hns3_rxtx_vec.c | 4 -
drivers/net/i40e/i40e_ethdev.c | 31 --
drivers/net/i40e/i40e_fdir.c | 304 +----------------
drivers/net/i40e/i40e_rxtx_vec_common.h | 5 -
drivers/net/ixgbe/ixgbe_ethdev.h | 3 +-
drivers/net/ixgbe/ixgbe_flow.c | 13 +-
drivers/net/octeontx/octeontx_ethdev.c | 5 -
drivers/net/qede/qede_filter.c | 29 +-
drivers/net/sfc/sfc.c | 5 -
drivers/net/sfc/sfc_repr.c | 5 -
drivers/net/thunderx/nicvf_ethdev.c | 5 -
drivers/net/txgbe/txgbe_ethdev.h | 3 +-
drivers/net/txgbe/txgbe_flow.c | 13 +-
lib/ethdev/ethdev_driver.h | 36 ++
lib/ethdev/rte_ethdev.h | 43 ---
28 files changed, 67 insertions(+), 1072 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b4fe9dfb17..7057c153f6 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -835,25 +835,6 @@ static void cmd_help_long_parsed(void *parsed_result,
"filters:\n"
"--------\n\n"
- "flow_director_mask (port_id) mode IP vlan (vlan_value)"
- " src_mask (ipv4_src) (ipv6_src) (src_port)"
- " dst_mask (ipv4_dst) (ipv6_dst) (dst_port)\n"
- " Set flow director IP mask.\n\n"
-
- "flow_director_mask (port_id) mode MAC-VLAN"
- " vlan (vlan_value)\n"
- " Set flow director MAC-VLAN mask.\n\n"
-
- "flow_director_mask (port_id) mode Tunnel"
- " vlan (vlan_value) mac (mac_value)"
- " tunnel-type (tunnel_type_value)"
- " tunnel-id (tunnel_id_value)\n"
- " Set flow director Tunnel mask.\n\n"
-
- "flow_director_flex_payload (port_id)"
- " (raw|l2|l3|l4) (config)\n"
- " Configure flex payload selection.\n\n"
-
"flow validate {port_id}"
" [group {group_id}] [priority {level}]"
" [ingress] [egress]"
@@ -8981,326 +8962,6 @@ do { \
} \
} while (0)
-/* *** deal with flow director mask *** */
-struct cmd_flow_director_mask_result {
- cmdline_fixed_string_t flow_director_mask;
- portid_t port_id;
- cmdline_fixed_string_t mode;
- cmdline_fixed_string_t mode_value;
- cmdline_fixed_string_t vlan;
- uint16_t vlan_mask;
- cmdline_fixed_string_t src_mask;
- cmdline_ipaddr_t ipv4_src;
- cmdline_ipaddr_t ipv6_src;
- uint16_t port_src;
- cmdline_fixed_string_t dst_mask;
- cmdline_ipaddr_t ipv4_dst;
- cmdline_ipaddr_t ipv6_dst;
- uint16_t port_dst;
- cmdline_fixed_string_t mac;
- uint8_t mac_addr_byte_mask;
- cmdline_fixed_string_t tunnel_id;
- uint32_t tunnel_id_mask;
- cmdline_fixed_string_t tunnel_type;
- uint8_t tunnel_type_mask;
-};
-
-static void
-cmd_flow_director_mask_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_flow_director_mask_result *res = parsed_result;
- struct rte_eth_fdir_masks *mask;
- struct rte_port *port;
-
- port = &ports[res->port_id];
- /** Check if the port is not started **/
- if (port->port_status != RTE_PORT_STOPPED) {
- fprintf(stderr, "Please stop port %d first\n", res->port_id);
- return;
- }
-
- mask = &port->dev_conf.fdir_conf.mask;
-
- if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
- if (strcmp(res->mode_value, "MAC-VLAN")) {
- fprintf(stderr, "Please set mode to MAC-VLAN.\n");
- return;
- }
-
- mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
- } else if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL) {
- if (strcmp(res->mode_value, "Tunnel")) {
- fprintf(stderr, "Please set mode to Tunnel.\n");
- return;
- }
-
- mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
- mask->mac_addr_byte_mask = res->mac_addr_byte_mask;
- mask->tunnel_id_mask = rte_cpu_to_be_32(res->tunnel_id_mask);
- mask->tunnel_type_mask = res->tunnel_type_mask;
- } else {
- if (strcmp(res->mode_value, "IP")) {
- fprintf(stderr, "Please set mode to IP.\n");
- return;
- }
-
- mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
- IPV4_ADDR_TO_UINT(res->ipv4_src, mask->ipv4_mask.src_ip);
- IPV4_ADDR_TO_UINT(res->ipv4_dst, mask->ipv4_mask.dst_ip);
- IPV6_ADDR_TO_ARRAY(res->ipv6_src, mask->ipv6_mask.src_ip);
- IPV6_ADDR_TO_ARRAY(res->ipv6_dst, mask->ipv6_mask.dst_ip);
- mask->src_port_mask = rte_cpu_to_be_16(res->port_src);
- mask->dst_port_mask = rte_cpu_to_be_16(res->port_dst);
- }
-
- cmd_reconfig_device_queue(res->port_id, 1, 1);
-}
-
-static cmdline_parse_token_string_t cmd_flow_director_mask =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- flow_director_mask, "flow_director_mask");
-static cmdline_parse_token_num_t cmd_flow_director_mask_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_mask_vlan =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- vlan, "vlan");
-static cmdline_parse_token_num_t cmd_flow_director_mask_vlan_value =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- vlan_mask, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_mask_src =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- src_mask, "src_mask");
-static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv4_src =
- TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
- ipv4_src);
-static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv6_src =
- TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
- ipv6_src);
-static cmdline_parse_token_num_t cmd_flow_director_mask_port_src =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- port_src, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_mask_dst =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- dst_mask, "dst_mask");
-static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv4_dst =
- TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
- ipv4_dst);
-static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv6_dst =
- TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
- ipv6_dst);
-static cmdline_parse_token_num_t cmd_flow_director_mask_port_dst =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- port_dst, RTE_UINT16);
-
-static cmdline_parse_token_string_t cmd_flow_director_mask_mode =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- mode, "mode");
-static cmdline_parse_token_string_t cmd_flow_director_mask_mode_ip =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- mode_value, "IP");
-static cmdline_parse_token_string_t cmd_flow_director_mask_mode_mac_vlan =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- mode_value, "MAC-VLAN");
-static cmdline_parse_token_string_t cmd_flow_director_mask_mode_tunnel =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- mode_value, "Tunnel");
-static cmdline_parse_token_string_t cmd_flow_director_mask_mac =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- mac, "mac");
-static cmdline_parse_token_num_t cmd_flow_director_mask_mac_value =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- mac_addr_byte_mask, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_flow_director_mask_tunnel_type =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- tunnel_type, "tunnel-type");
-static cmdline_parse_token_num_t cmd_flow_director_mask_tunnel_type_value =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- tunnel_type_mask, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_flow_director_mask_tunnel_id =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
- tunnel_id, "tunnel-id");
-static cmdline_parse_token_num_t cmd_flow_director_mask_tunnel_id_value =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
- tunnel_id_mask, RTE_UINT32);
-
-static cmdline_parse_inst_t cmd_set_flow_director_ip_mask = {
- .f = cmd_flow_director_mask_parsed,
- .data = NULL,
- .help_str = "flow_director_mask ... : "
- "Set IP mode flow director's mask on NIC",
- .tokens = {
- (void *)&cmd_flow_director_mask,
- (void *)&cmd_flow_director_mask_port_id,
- (void *)&cmd_flow_director_mask_mode,
- (void *)&cmd_flow_director_mask_mode_ip,
- (void *)&cmd_flow_director_mask_vlan,
- (void *)&cmd_flow_director_mask_vlan_value,
- (void *)&cmd_flow_director_mask_src,
- (void *)&cmd_flow_director_mask_ipv4_src,
- (void *)&cmd_flow_director_mask_ipv6_src,
- (void *)&cmd_flow_director_mask_port_src,
- (void *)&cmd_flow_director_mask_dst,
- (void *)&cmd_flow_director_mask_ipv4_dst,
- (void *)&cmd_flow_director_mask_ipv6_dst,
- (void *)&cmd_flow_director_mask_port_dst,
- NULL,
- },
-};
-
-static cmdline_parse_inst_t cmd_set_flow_director_mac_vlan_mask = {
- .f = cmd_flow_director_mask_parsed,
- .data = NULL,
- .help_str = "flow_director_mask ... : Set MAC VLAN mode "
- "flow director's mask on NIC",
- .tokens = {
- (void *)&cmd_flow_director_mask,
- (void *)&cmd_flow_director_mask_port_id,
- (void *)&cmd_flow_director_mask_mode,
- (void *)&cmd_flow_director_mask_mode_mac_vlan,
- (void *)&cmd_flow_director_mask_vlan,
- (void *)&cmd_flow_director_mask_vlan_value,
- NULL,
- },
-};
-
-static cmdline_parse_inst_t cmd_set_flow_director_tunnel_mask = {
- .f = cmd_flow_director_mask_parsed,
- .data = NULL,
- .help_str = "flow_director_mask ... : Set tunnel mode "
- "flow director's mask on NIC",
- .tokens = {
- (void *)&cmd_flow_director_mask,
- (void *)&cmd_flow_director_mask_port_id,
- (void *)&cmd_flow_director_mask_mode,
- (void *)&cmd_flow_director_mask_mode_tunnel,
- (void *)&cmd_flow_director_mask_vlan,
- (void *)&cmd_flow_director_mask_vlan_value,
- (void *)&cmd_flow_director_mask_mac,
- (void *)&cmd_flow_director_mask_mac_value,
- (void *)&cmd_flow_director_mask_tunnel_type,
- (void *)&cmd_flow_director_mask_tunnel_type_value,
- (void *)&cmd_flow_director_mask_tunnel_id,
- (void *)&cmd_flow_director_mask_tunnel_id_value,
- NULL,
- },
-};
-
-/* *** deal with flow director flexible payload configuration *** */
-struct cmd_flow_director_flexpayload_result {
- cmdline_fixed_string_t flow_director_flexpayload;
- portid_t port_id;
- cmdline_fixed_string_t payload_layer;
- cmdline_fixed_string_t payload_cfg;
-};
-
-static inline int
-parse_offsets(const char *q_arg, uint16_t *offsets, uint16_t max_num)
-{
- char s[256];
- const char *p, *p0 = q_arg;
- char *end;
- unsigned long int_fld;
- char *str_fld[max_num];
- int i;
- unsigned size;
- int ret = -1;
-
- p = strchr(p0, '(');
- if (p == NULL)
- return -1;
- ++p;
- p0 = strchr(p, ')');
- if (p0 == NULL)
- return -1;
-
- size = p0 - p;
- if (size >= sizeof(s))
- return -1;
-
- snprintf(s, sizeof(s), "%.*s", size, p);
- ret = rte_strsplit(s, sizeof(s), str_fld, max_num, ',');
- if (ret < 0 || ret > max_num)
- return -1;
- for (i = 0; i < ret; i++) {
- errno = 0;
- int_fld = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || *end != '\0' || int_fld > UINT16_MAX)
- return -1;
- offsets[i] = (uint16_t)int_fld;
- }
- return ret;
-}
-
-static void
-cmd_flow_director_flxpld_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_flow_director_flexpayload_result *res = parsed_result;
- struct rte_eth_flex_payload_cfg flex_cfg;
- struct rte_port *port;
- int ret = 0;
-
- port = &ports[res->port_id];
- /** Check if the port is not started **/
- if (port->port_status != RTE_PORT_STOPPED) {
- fprintf(stderr, "Please stop port %d first\n", res->port_id);
- return;
- }
-
- memset(&flex_cfg, 0, sizeof(struct rte_eth_flex_payload_cfg));
-
- if (!strcmp(res->payload_layer, "raw"))
- flex_cfg.type = RTE_ETH_RAW_PAYLOAD;
- else if (!strcmp(res->payload_layer, "l2"))
- flex_cfg.type = RTE_ETH_L2_PAYLOAD;
- else if (!strcmp(res->payload_layer, "l3"))
- flex_cfg.type = RTE_ETH_L3_PAYLOAD;
- else if (!strcmp(res->payload_layer, "l4"))
- flex_cfg.type = RTE_ETH_L4_PAYLOAD;
-
- ret = parse_offsets(res->payload_cfg, flex_cfg.src_offset,
- RTE_ETH_FDIR_MAX_FLEXLEN);
- if (ret < 0) {
- fprintf(stderr, "error: Cannot parse flex payload input.\n");
- return;
- }
-
- fdir_set_flex_payload(res->port_id, &flex_cfg);
- cmd_reconfig_device_queue(res->port_id, 1, 1);
-}
-
-static cmdline_parse_token_string_t cmd_flow_director_flexpayload =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flexpayload_result,
- flow_director_flexpayload,
- "flow_director_flex_payload");
-static cmdline_parse_token_num_t cmd_flow_director_flexpayload_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_flexpayload_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_flexpayload_payload_layer =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flexpayload_result,
- payload_layer, "raw#l2#l3#l4");
-static cmdline_parse_token_string_t cmd_flow_director_flexpayload_payload_cfg =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flexpayload_result,
- payload_cfg, NULL);
-
-static cmdline_parse_inst_t cmd_set_flow_director_flex_payload = {
- .f = cmd_flow_director_flxpld_parsed,
- .data = NULL,
- .help_str = "flow_director_flexpayload ... : "
- "Set flow director's flex payload on NIC",
- .tokens = {
- (void *)&cmd_flow_director_flexpayload,
- (void *)&cmd_flow_director_flexpayload_port_id,
- (void *)&cmd_flow_director_flexpayload_payload_layer,
- (void *)&cmd_flow_director_flexpayload_payload_cfg,
- NULL,
- },
-};
-
/* Generic flow interface command. */
extern cmdline_parse_inst_t cmd_flow;
@@ -14274,10 +13935,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
(cmdline_parse_inst_t *)&cmd_cleanup_txq_mbufs,
(cmdline_parse_inst_t *)&cmd_dump,
(cmdline_parse_inst_t *)&cmd_dump_one,
- (cmdline_parse_inst_t *)&cmd_set_flow_director_ip_mask,
- (cmdline_parse_inst_t *)&cmd_set_flow_director_mac_vlan_mask,
- (cmdline_parse_inst_t *)&cmd_set_flow_director_tunnel_mask,
- (cmdline_parse_inst_t *)&cmd_set_flow_director_flex_payload,
(cmdline_parse_inst_t *)&cmd_flow,
(cmdline_parse_inst_t *)&cmd_show_port_meter_cap,
(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a2939867c4..c90cdfe382 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5728,41 +5728,6 @@ flowtype_to_str(uint16_t flow_type)
#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-static inline void
-print_fdir_mask(struct rte_eth_fdir_masks *mask)
-{
- printf("\n vlan_tci: 0x%04x", rte_be_to_cpu_16(mask->vlan_tci_mask));
-
- if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
- printf(", mac_addr: 0x%02x, tunnel_type: 0x%01x,"
- " tunnel_id: 0x%08x",
- mask->mac_addr_byte_mask, mask->tunnel_type_mask,
- rte_be_to_cpu_32(mask->tunnel_id_mask));
- else if (fdir_conf.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
- printf(", src_ipv4: 0x%08x, dst_ipv4: 0x%08x",
- rte_be_to_cpu_32(mask->ipv4_mask.src_ip),
- rte_be_to_cpu_32(mask->ipv4_mask.dst_ip));
-
- printf("\n src_port: 0x%04x, dst_port: 0x%04x",
- rte_be_to_cpu_16(mask->src_port_mask),
- rte_be_to_cpu_16(mask->dst_port_mask));
-
- printf("\n src_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
- rte_be_to_cpu_32(mask->ipv6_mask.src_ip[0]),
- rte_be_to_cpu_32(mask->ipv6_mask.src_ip[1]),
- rte_be_to_cpu_32(mask->ipv6_mask.src_ip[2]),
- rte_be_to_cpu_32(mask->ipv6_mask.src_ip[3]));
-
- printf("\n dst_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
- rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[0]),
- rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[1]),
- rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[2]),
- rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[3]));
- }
-
- printf("\n");
-}
-
static inline void
print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
{
@@ -5898,8 +5863,6 @@ fdir_get_infos(portid_t port_id)
fdir_info.flex_payload_unit,
fdir_info.max_flex_payload_segment_num,
fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num);
- printf(" MASK: ");
- print_fdir_mask(&fdir_info.mask);
if (fdir_info.flex_conf.nb_payloads > 0) {
printf(" FLEX PAYLOAD SRC OFFSET:");
print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload);
@@ -5926,69 +5889,6 @@ fdir_get_infos(portid_t port_id)
#endif /* RTE_NET_I40E || RTE_NET_IXGBE */
-void
-fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
-{
- struct rte_port *port;
- struct rte_eth_fdir_flex_conf *flex_conf;
- int i, idx = 0;
-
- port = &ports[port_id];
- flex_conf = &port->dev_conf.fdir_conf.flex_conf;
- for (i = 0; i < RTE_ETH_FLOW_MAX; i++) {
- if (cfg->flow_type == flex_conf->flex_mask[i].flow_type) {
- idx = i;
- break;
- }
- }
- if (i >= RTE_ETH_FLOW_MAX) {
- if (flex_conf->nb_flexmasks < RTE_DIM(flex_conf->flex_mask)) {
- idx = flex_conf->nb_flexmasks;
- flex_conf->nb_flexmasks++;
- } else {
- fprintf(stderr,
- "The flex mask table is full. Can not set flex mask for flow_type(%u).",
- cfg->flow_type);
- return;
- }
- }
- rte_memcpy(&flex_conf->flex_mask[idx],
- cfg,
- sizeof(struct rte_eth_fdir_flex_mask));
-}
-
-void
-fdir_set_flex_payload(portid_t port_id, struct rte_eth_flex_payload_cfg *cfg)
-{
- struct rte_port *port;
- struct rte_eth_fdir_flex_conf *flex_conf;
- int i, idx = 0;
-
- port = &ports[port_id];
- flex_conf = &port->dev_conf.fdir_conf.flex_conf;
- for (i = 0; i < RTE_ETH_PAYLOAD_MAX; i++) {
- if (cfg->type == flex_conf->flex_set[i].type) {
- idx = i;
- break;
- }
- }
- if (i >= RTE_ETH_PAYLOAD_MAX) {
- if (flex_conf->nb_payloads < RTE_DIM(flex_conf->flex_set)) {
- idx = flex_conf->nb_payloads;
- flex_conf->nb_payloads++;
- } else {
- fprintf(stderr,
- "The flex payload table is full. Can not set flex payload for type(%u).",
- cfg->type);
- return;
- }
- }
- rte_memcpy(&flex_conf->flex_set[idx],
- cfg,
- sizeof(struct rte_eth_flex_payload_cfg));
-
-}
-
void
set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
{
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index e3c9757f3f..cfd7cd1e50 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -101,17 +101,6 @@ usage(char* progname)
printf(" --eth-peer=X,M:M:M:M:M:M: set the MAC address of the X peer "
"port (0 <= X < %d).\n", RTE_MAX_ETHPORTS);
#endif
- printf(" --pkt-filter-mode=N: set Flow Director mode "
- "(N: none (default mode) or signature or perfect).\n");
- printf(" --pkt-filter-report-hash=N: set Flow Director report mode "
- "(N: none or match (default) or always).\n");
- printf(" --pkt-filter-size=N: set Flow Director mode "
- "(N: 64K (default mode) or 128K or 256K).\n");
- printf(" --pkt-filter-drop-queue=N: set drop-queue. "
- "In perfect mode, when you add a rule with queue = -1 "
- "the packet will be enqueued into the rx drop-queue. "
- "If the drop-queue doesn't exist, the packet is dropped. "
- "By default drop-queue=127.\n");
#ifdef RTE_LIB_LATENCYSTATS
printf(" --latencystats=N: enable latency and jitter statistics "
"monitoring on forwarding lcore id N.\n");
@@ -625,10 +614,6 @@ launch_args_parse(int argc, char** argv)
{ "total-num-mbufs", 1, 0, 0 },
{ "max-pkt-len", 1, 0, 0 },
{ "max-lro-pkt-size", 1, 0, 0 },
- { "pkt-filter-mode", 1, 0, 0 },
- { "pkt-filter-report-hash", 1, 0, 0 },
- { "pkt-filter-size", 1, 0, 0 },
- { "pkt-filter-drop-queue", 1, 0, 0 },
#ifdef RTE_LIB_LATENCYSTATS
{ "latencystats", 1, 0, 0 },
#endif
@@ -963,67 +948,6 @@ launch_args_parse(int argc, char** argv)
n = atoi(optarg);
rx_mode.max_lro_pkt_size = (uint32_t) n;
}
- if (!strcmp(lgopts[opt_idx].name, "pkt-filter-mode")) {
- if (!strcmp(optarg, "signature"))
- fdir_conf.mode =
- RTE_FDIR_MODE_SIGNATURE;
- else if (!strcmp(optarg, "perfect"))
- fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
- else if (!strcmp(optarg, "perfect-mac-vlan"))
- fdir_conf.mode = RTE_FDIR_MODE_PERFECT_MAC_VLAN;
- else if (!strcmp(optarg, "perfect-tunnel"))
- fdir_conf.mode = RTE_FDIR_MODE_PERFECT_TUNNEL;
- else if (!strcmp(optarg, "none"))
- fdir_conf.mode = RTE_FDIR_MODE_NONE;
- else
- rte_exit(EXIT_FAILURE,
- "pkt-mode-invalid %s invalid - must be: "
- "none, signature, perfect, perfect-mac-vlan"
- " or perfect-tunnel\n",
- optarg);
- }
- if (!strcmp(lgopts[opt_idx].name,
- "pkt-filter-report-hash")) {
- if (!strcmp(optarg, "none"))
- fdir_conf.status =
- RTE_FDIR_NO_REPORT_STATUS;
- else if (!strcmp(optarg, "match"))
- fdir_conf.status =
- RTE_FDIR_REPORT_STATUS;
- else if (!strcmp(optarg, "always"))
- fdir_conf.status =
- RTE_FDIR_REPORT_STATUS_ALWAYS;
- else
- rte_exit(EXIT_FAILURE,
- "pkt-filter-report-hash %s invalid "
- "- must be: none or match or always\n",
- optarg);
- }
- if (!strcmp(lgopts[opt_idx].name, "pkt-filter-size")) {
- if (!strcmp(optarg, "64K"))
- fdir_conf.pballoc =
- RTE_ETH_FDIR_PBALLOC_64K;
- else if (!strcmp(optarg, "128K"))
- fdir_conf.pballoc =
- RTE_ETH_FDIR_PBALLOC_128K;
- else if (!strcmp(optarg, "256K"))
- fdir_conf.pballoc =
- RTE_ETH_FDIR_PBALLOC_256K;
- else
- rte_exit(EXIT_FAILURE, "pkt-filter-size %s invalid -"
- " must be: 64K or 128K or 256K\n",
- optarg);
- }
- if (!strcmp(lgopts[opt_idx].name,
- "pkt-filter-drop-queue")) {
- n = atoi(optarg);
- if (n >= 0)
- fdir_conf.drop_queue = (uint8_t) n;
- else
- rte_exit(EXIT_FAILURE,
- "drop queue %d invalid - must"
- "be >= 0 \n", n);
- }
#ifdef RTE_LIB_LATENCYSTATS
if (!strcmp(lgopts[opt_idx].name,
"latencystats")) {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index addcbcac85..511a870dc9 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -478,29 +478,6 @@ struct rte_eth_txmode tx_mode = {
.offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
};
-struct rte_eth_fdir_conf fdir_conf = {
- .mode = RTE_FDIR_MODE_NONE,
- .pballoc = RTE_ETH_FDIR_PBALLOC_64K,
- .status = RTE_FDIR_REPORT_STATUS,
- .mask = {
- .vlan_tci_mask = 0xFFEF,
- .ipv4_mask = {
- .src_ip = 0xFFFFFFFF,
- .dst_ip = 0xFFFFFFFF,
- },
- .ipv6_mask = {
- .src_ip = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF},
- .dst_ip = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF},
- },
- .src_port_mask = 0xFFFF,
- .dst_port_mask = 0xFFFF,
- .mac_addr_byte_mask = 0xFF,
- .tunnel_type_mask = 1,
- .tunnel_id_mask = 0xFFFFFFFF,
- },
- .drop_queue = 127,
-};
-
volatile int test_done = 1; /* stop packet forwarding when set to 1. */
/*
@@ -3933,7 +3910,6 @@ init_port_config(void)
RTE_ETH_FOREACH_DEV(pid) {
port = &ports[pid];
- port->dev_conf.fdir_conf = fdir_conf;
ret = eth_dev_info_get_print_err(pid, &port->dev_info);
if (ret != 0)
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index fb2f5195d3..27f4b9199c 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -554,8 +554,6 @@ extern lcoreid_t bitrate_lcore_id;
extern uint8_t bitrate_enabled;
#endif
-extern struct rte_eth_fdir_conf fdir_conf;
-
extern uint32_t max_rx_pkt_len;
/*
@@ -1091,10 +1089,6 @@ void pmd_test_exit(void);
#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
void fdir_get_infos(portid_t port_id);
#endif
-void fdir_set_flex_mask(portid_t port_id,
- struct rte_eth_fdir_flex_mask *cfg);
-void fdir_set_flex_payload(portid_t port_id,
- struct rte_eth_flex_payload_cfg *cfg);
void port_rss_reta_info(portid_t port_id,
struct rte_eth_rss_reta_entry64 *reta_conf,
uint16_t nb_entries);
diff --git a/doc/guides/nics/fm10k.rst b/doc/guides/nics/fm10k.rst
index d6efac0917..628ffb5408 100644
--- a/doc/guides/nics/fm10k.rst
+++ b/doc/guides/nics/fm10k.rst
@@ -84,8 +84,6 @@ will be checked:
* ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
-* ``fdir_conf->mode``
-
RX Burst Size
^^^^^^^^^^^^^
diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index ad1a3da610..b1875095de 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -99,7 +99,6 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
* dev_conf
-fdir_conf->mode will also be checked.
Disable SDP3 TX_DISABLE for Fiber Links
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..eb99f51213 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -98,10 +98,6 @@ Deprecation Notices
The per-queue Rx packet split offload ``RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT``
can still be used, and it is configured by ``rte_eth_rxseg_split``.
-* ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
- and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
- will be removed in DPDK 20.11.
-
* ethdev: Announce moving from dedicated modify function for each field,
to using the general ``rte_flow_modify_field`` action.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..caf58c3f82 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,10 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* ethdev: Removed deprecated Flow Director configuration from device
+ configuration (``dev_conf.fdir_conf``). Moved corresponding structures
+ to internal API since some drivers still use it internally.
+
ABI Changes
-----------
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 30edef07ea..8b41b960c8 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -159,33 +159,6 @@ The command line options are:
The default port is the port 9 which is defined for the discard protocol
(RFC 863).
-* ``--pkt-filter-mode=mode``
-
- Set Flow Director mode where mode is either ``none`` (the default), ``signature`` or ``perfect``.
- See :ref:`testpmd_flow_director` for more details.
-
-* ``--pkt-filter-report-hash=mode``
-
- Set Flow Director hash match reporting mode where mode is ``none``, ``match`` (the default) or ``always``.
-
-* ``--pkt-filter-size=N``
-
- Set Flow Director allocated memory size, where N is 64K, 128K or 256K.
- Sizes are in kilobytes. The default is 64.
-
-* ``--pkt-filter-flexbytes-offset=N``
-
- Set the flexbytes offset.
- The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address,
- where N is 0 <= N <= 32.
- The default value is 0x6.
-
-* ``--pkt-filter-drop-queue=N``
-
- Set the drop-queue.
- In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue.
- If the drop-queue does not exist, the packet is dropped. The default value is N=127.
-
* ``--disable-crc-strip``
Disable hardware CRC stripping.
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 330e34427d..bb6e9fd46f 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3004,44 +3004,6 @@ This section details the available filter functions that are available.
Note these functions interface the deprecated legacy filtering framework,
superseded by *rte_flow*. See `Flow rules management`_.
-.. _testpmd_flow_director:
-
-flow_director_mask
-~~~~~~~~~~~~~~~~~~
-
-Set flow director's input masks::
-
- flow_director_mask (port_id) mode IP vlan (vlan_value) \
- src_mask (ipv4_src) (ipv6_src) (src_port) \
- dst_mask (ipv4_dst) (ipv6_dst) (dst_port)
-
- flow_director_mask (port_id) mode MAC-VLAN vlan (vlan_value)
-
- flow_director_mask (port_id) mode Tunnel vlan (vlan_value) \
- mac (mac_value) tunnel-type (tunnel_type_value) \
- tunnel-id (tunnel_id_value)
-
-Example, to set flow director mask on port 0::
-
- testpmd> flow_director_mask 0 mode IP vlan 0xefff \
- src_mask 255.255.255.255 \
- FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF \
- dst_mask 255.255.255.255 \
- FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF
-
-flow_director_flex_payload
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Configure flexible payload selection::
-
- flow_director_flex_payload (port_id) (raw|l2|l3|l4) (config)
-
-For example, to select the first 16 bytes from the offset 4 (bytes) of packet's payload as flexible payload::
-
- testpmd> flow_director_flex_payload 0 l4 \
- (4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)
-
-
.. _testpmd_rte_flow:
Flow rules management
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 24182909f1..98f2b1ad91 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1092,11 +1092,6 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
goto fail_configure;
}
- if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
- plt_err("Flow director is not supported");
- goto fail_configure;
- }
-
if (rxmode->mq_mode != RTE_ETH_MQ_RX_NONE &&
rxmode->mq_mode != RTE_ETH_MQ_RX_RSS) {
plt_err("Unsupported mq rx mode %d", rxmode->mq_mode);
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 10ce5a7582..c7088f36cc 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -209,7 +209,6 @@ fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
{
#ifndef RTE_LIBRTE_IEEE1588
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
- struct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
#ifndef RTE_FM10K_RX_OLFLAGS_ENABLE
/* without rx ol_flags, no VP flag report */
@@ -217,10 +216,6 @@ fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
return -1;
#endif
- /* no fdir support */
- if (fconf->mode != RTE_FDIR_MODE_NONE)
- return -1;
-
/* no header split support */
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
return -1;
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index 73f0ab6bc8..0dd6fccb13 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -230,7 +230,6 @@ hns3_rxq_vec_check(struct hns3_rx_queue *rxq, void *arg)
int
hns3_rx_check_vec_support(struct rte_eth_dev *dev)
{
- struct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
RTE_ETH_RX_OFFLOAD_VLAN;
@@ -240,9 +239,6 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
if (dev->data->scattered_rx)
return -ENOTSUP;
- if (fconf->mode != RTE_FDIR_MODE_NONE)
- return -ENOTSUP;
-
if (rxmode->offloads & offloads_mask)
return -ENOTSUP;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 67d79de08d..3712a78c00 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1886,24 +1886,6 @@ i40e_dev_configure(struct rte_eth_dev *dev)
if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)
dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
- /* Only legacy filter API needs the following fdir config. So when the
- * legacy filter API is deprecated, the following codes should also be
- * removed.
- */
- if (dev->data->dev_conf.fdir_conf.mode == RTE_FDIR_MODE_PERFECT) {
- ret = i40e_fdir_setup(pf);
- if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to setup flow director.");
- return -ENOTSUP;
- }
- ret = i40e_fdir_configure(dev);
- if (ret < 0) {
- PMD_DRV_LOG(ERR, "failed to configure fdir.");
- goto err;
- }
- } else
- i40e_fdir_teardown(pf);
-
ret = i40e_dev_init_vlan(dev);
if (ret < 0)
goto err;
@@ -1945,12 +1927,6 @@ i40e_dev_configure(struct rte_eth_dev *dev)
rte_free(pf->vmdq);
pf->vmdq = NULL;
err:
- /* Need to release fdir resource if exists.
- * Only legacy filter API needs the following fdir config. So when the
- * legacy filter API is deprecated, the following code should also be
- * removed.
- */
- i40e_fdir_teardown(pf);
return ret;
}
@@ -2600,13 +2576,6 @@ i40e_dev_close(struct rte_eth_dev *dev)
i40e_pf_disable_irq0(hw);
rte_intr_disable(intr_handle);
- /*
- * Only legacy filter API needs the following fdir config. So when the
- * legacy filter API is deprecated, the following code should also be
- * removed.
- */
- i40e_fdir_teardown(pf);
-
/* shutdown and destroy the HMC */
i40e_shutdown_lan_hmc(hw);
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 8caedea14e..afcaa593eb 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -373,269 +373,6 @@ i40e_init_flx_pld(struct i40e_pf *pf)
}
}
-#define I40E_VALIDATE_FLEX_PIT(flex_pit1, flex_pit2) do { \
- if ((flex_pit2).src_offset < \
- (flex_pit1).src_offset + (flex_pit1).size) { \
- PMD_DRV_LOG(ERR, "src_offset should be not" \
- " less than than previous offset" \
- " + previous FSIZE."); \
- return -EINVAL; \
- } \
-} while (0)
-
-/*
- * i40e_srcoff_to_flx_pit - transform the src_offset into flex_pit structure,
- * and the flex_pit will be sorted by it's src_offset value
- */
-static inline uint16_t
-i40e_srcoff_to_flx_pit(const uint16_t *src_offset,
- struct i40e_fdir_flex_pit *flex_pit)
-{
- uint16_t src_tmp, size, num = 0;
- uint16_t i, k, j = 0;
-
- while (j < I40E_FDIR_MAX_FLEX_LEN) {
- size = 1;
- for (; j < I40E_FDIR_MAX_FLEX_LEN - 1; j++) {
- if (src_offset[j + 1] == src_offset[j] + 1)
- size++;
- else
- break;
- }
- src_tmp = src_offset[j] + 1 - size;
- /* the flex_pit need to be sort by src_offset */
- for (i = 0; i < num; i++) {
- if (src_tmp < flex_pit[i].src_offset)
- break;
- }
- /* if insert required, move backward */
- for (k = num; k > i; k--)
- flex_pit[k] = flex_pit[k - 1];
- /* insert */
- flex_pit[i].dst_offset = j + 1 - size;
- flex_pit[i].src_offset = src_tmp;
- flex_pit[i].size = size;
- j++;
- num++;
- }
- return num;
-}
-
-/* i40e_check_fdir_flex_payload -check flex payload configuration arguments */
-static inline int
-i40e_check_fdir_flex_payload(const struct rte_eth_flex_payload_cfg *flex_cfg)
-{
- struct i40e_fdir_flex_pit flex_pit[I40E_FDIR_MAX_FLEX_LEN];
- uint16_t num, i;
-
- for (i = 0; i < I40E_FDIR_MAX_FLEX_LEN; i++) {
- if (flex_cfg->src_offset[i] >= I40E_MAX_FLX_SOURCE_OFF) {
- PMD_DRV_LOG(ERR, "exceeds maximal payload limit.");
- return -EINVAL;
- }
- }
-
- memset(flex_pit, 0, sizeof(flex_pit));
- num = i40e_srcoff_to_flx_pit(flex_cfg->src_offset, flex_pit);
- if (num > I40E_MAX_FLXPLD_FIED) {
- PMD_DRV_LOG(ERR, "exceeds maximal number of flex fields.");
- return -EINVAL;
- }
- for (i = 0; i < num; i++) {
- if (flex_pit[i].size & 0x01 || flex_pit[i].dst_offset & 0x01 ||
- flex_pit[i].src_offset & 0x01) {
- PMD_DRV_LOG(ERR, "flexpayload should be measured"
- " in word");
- return -EINVAL;
- }
- if (i != num - 1)
- I40E_VALIDATE_FLEX_PIT(flex_pit[i], flex_pit[i + 1]);
- }
- return 0;
-}
-
-/*
- * i40e_check_fdir_flex_conf -check if the flex payload and mask configuration
- * arguments are valid
- */
-static int
-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;
- uint16_t mask_tmp;
- 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.");
- return -EINVAL;
- }
- /* check flexible payload setting configuration */
- if (conf->nb_payloads > RTE_ETH_L4_PAYLOAD) {
- PMD_DRV_LOG(ERR, "invalid number of payload setting.");
- return -EINVAL;
- }
- for (i = 0; i < conf->nb_payloads; i++) {
- flex_cfg = &conf->flex_set[i];
- if (flex_cfg->type > RTE_ETH_L4_PAYLOAD) {
- PMD_DRV_LOG(ERR, "invalid payload type.");
- return -EINVAL;
- }
- ret = i40e_check_fdir_flex_payload(flex_cfg);
- if (ret < 0) {
- PMD_DRV_LOG(ERR, "invalid flex payload arguments.");
- return -EINVAL;
- }
- }
-
- /* check flex mask setting configuration */
- if (conf->nb_flexmasks >= RTE_ETH_FLOW_MAX) {
- PMD_DRV_LOG(ERR, "invalid number of flex masks.");
- return -EINVAL;
- }
- for (i = 0; i < conf->nb_flexmasks; i++) {
- flex_mask = &conf->flex_mask[i];
- 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;
- }
- nb_bitmask = 0;
- for (j = 0; j < I40E_FDIR_MAX_FLEX_LEN; j += sizeof(uint16_t)) {
- mask_tmp = I40E_WORD(flex_mask->mask[j],
- flex_mask->mask[j + 1]);
- if (mask_tmp != 0x0 && mask_tmp != UINT16_MAX) {
- nb_bitmask++;
- if (nb_bitmask > I40E_FDIR_BITMASK_NUM_WORD) {
- PMD_DRV_LOG(ERR, " exceed maximal"
- " number of bitmasks.");
- return -EINVAL;
- }
- }
- }
- }
- return 0;
-}
-
-/*
- * i40e_set_flx_pld_cfg -configure the rule how bytes stream is extracted as flexible payload
- * @pf: board private structure
- * @cfg: the rule how bytes stream is extracted as flexible payload
- */
-static void
-i40e_set_flx_pld_cfg(struct i40e_pf *pf,
- const struct rte_eth_flex_payload_cfg *cfg)
-{
- struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct i40e_fdir_flex_pit flex_pit[I40E_MAX_FLXPLD_FIED];
- uint32_t flx_pit, flx_ort;
- uint16_t num, min_next_off; /* in words */
- uint8_t field_idx = 0;
- uint8_t layer_idx = 0;
- uint16_t i;
-
- if (cfg->type == RTE_ETH_L2_PAYLOAD)
- layer_idx = I40E_FLXPLD_L2_IDX;
- else if (cfg->type == RTE_ETH_L3_PAYLOAD)
- layer_idx = I40E_FLXPLD_L3_IDX;
- else if (cfg->type == RTE_ETH_L4_PAYLOAD)
- layer_idx = I40E_FLXPLD_L4_IDX;
-
- memset(flex_pit, 0, sizeof(flex_pit));
- num = RTE_MIN(i40e_srcoff_to_flx_pit(cfg->src_offset, flex_pit),
- RTE_DIM(flex_pit));
-
- if (num) {
- flx_ort = (1 << I40E_GLQF_ORT_FLX_PAYLOAD_SHIFT) |
- (num << I40E_GLQF_ORT_FIELD_CNT_SHIFT) |
- (layer_idx * I40E_MAX_FLXPLD_FIED);
- I40E_WRITE_GLB_REG(hw, I40E_GLQF_ORT(33 + layer_idx), flx_ort);
- }
-
- for (i = 0; i < num; i++) {
- field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
- /* record the info in fdir structure */
- pf->fdir.flex_set[field_idx].src_offset =
- flex_pit[i].src_offset / sizeof(uint16_t);
- pf->fdir.flex_set[field_idx].size =
- flex_pit[i].size / sizeof(uint16_t);
- pf->fdir.flex_set[field_idx].dst_offset =
- flex_pit[i].dst_offset / sizeof(uint16_t);
- flx_pit = MK_FLX_PIT(pf->fdir.flex_set[field_idx].src_offset,
- pf->fdir.flex_set[field_idx].size,
- pf->fdir.flex_set[field_idx].dst_offset);
-
- I40E_WRITE_REG(hw, I40E_PRTQF_FLX_PIT(field_idx), flx_pit);
- }
- min_next_off = pf->fdir.flex_set[field_idx].src_offset +
- pf->fdir.flex_set[field_idx].size;
-
- for (; i < I40E_MAX_FLXPLD_FIED; i++) {
- /* set the non-used register obeying register's constrain */
- flx_pit = MK_FLX_PIT(min_next_off, NONUSE_FLX_PIT_FSIZE,
- NONUSE_FLX_PIT_DEST_OFF);
- I40E_WRITE_REG(hw,
- I40E_PRTQF_FLX_PIT(layer_idx * I40E_MAX_FLXPLD_FIED + i),
- flx_pit);
- min_next_off++;
- }
-}
-
-/*
- * i40e_set_flex_mask_on_pctype - configure the mask on flexible payload
- * @pf: board private structure
- * @pctype: packet classify type
- * @flex_masks: mask for flexible payload
- */
-static void
-i40e_set_flex_mask_on_pctype(struct i40e_pf *pf,
- enum i40e_filter_pctype pctype,
- const struct rte_eth_fdir_flex_mask *mask_cfg)
-{
- struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct i40e_fdir_flex_mask *flex_mask;
- uint32_t flxinset, fd_mask;
- uint16_t mask_tmp;
- uint8_t i, nb_bitmask = 0;
-
- flex_mask = &pf->fdir.flex_mask[pctype];
- memset(flex_mask, 0, sizeof(struct i40e_fdir_flex_mask));
- for (i = 0; i < I40E_FDIR_MAX_FLEX_LEN; i += sizeof(uint16_t)) {
- mask_tmp = I40E_WORD(mask_cfg->mask[i], mask_cfg->mask[i + 1]);
- if (mask_tmp != 0x0) {
- flex_mask->word_mask |=
- I40E_FLEX_WORD_MASK(i / sizeof(uint16_t));
- if (mask_tmp != UINT16_MAX) {
- /* set bit mask */
- flex_mask->bitmask[nb_bitmask].mask = ~mask_tmp;
- flex_mask->bitmask[nb_bitmask].offset =
- i / sizeof(uint16_t);
- nb_bitmask++;
- }
- }
- }
- /* write mask to hw */
- flxinset = (flex_mask->word_mask <<
- I40E_PRTQF_FD_FLXINSET_INSET_SHIFT) &
- I40E_PRTQF_FD_FLXINSET_INSET_MASK;
- i40e_write_rx_ctl(hw, I40E_PRTQF_FD_FLXINSET(pctype), flxinset);
-
- for (i = 0; i < nb_bitmask; i++) {
- fd_mask = (flex_mask->bitmask[i].mask <<
- I40E_PRTQF_FD_MSK_MASK_SHIFT) &
- I40E_PRTQF_FD_MSK_MASK_MASK;
- fd_mask |= ((flex_mask->bitmask[i].offset +
- I40E_FLX_OFFSET_IN_FIELD_VECTOR) <<
- I40E_PRTQF_FD_MSK_OFFSET_SHIFT) &
- I40E_PRTQF_FD_MSK_OFFSET_MASK;
- i40e_write_rx_ctl(hw, I40E_PRTQF_FD_MSK(pctype, i), fd_mask);
- }
-}
-
/*
* Enable/disable flow director RX processing in vector routines.
*/
@@ -661,10 +398,7 @@ i40e_fdir_configure(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);
- struct rte_eth_fdir_flex_conf *conf;
- enum i40e_filter_pctype pctype;
uint32_t val;
- uint8_t i;
int ret = 0;
/*
@@ -687,39 +421,6 @@ 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(pf->adapter, conf);
- if (ret < 0) {
- PMD_DRV_LOG(ERR, " invalid configuration arguments.");
- return -EINVAL;
- }
-
- if (!pf->support_multi_driver) {
- /* configure flex payload */
- for (i = 0; i < conf->nb_payloads; i++)
- i40e_set_flx_pld_cfg(pf, &conf->flex_set[i]);
- /* configure flex mask*/
- for (i = 0; i < conf->nb_flexmasks; i++) {
- if (hw->mac.type == I40E_MAC_X722) {
- /* get 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(
- pf->adapter,
- conf->flex_mask[i].flow_type)));
- } else {
- 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]);
- }
- } else {
- PMD_DRV_LOG(ERR, "Not support flexible payload.");
- }
-
/* Enable FDIR processing in RX routines */
i40e_fdir_rx_proc_enable(dev, 1);
@@ -2187,10 +1888,7 @@ i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir)
uint16_t num_flex_mask = 0;
uint16_t i;
- if (dev->data->dev_conf.fdir_conf.mode == RTE_FDIR_MODE_PERFECT)
- fdir->mode = RTE_FDIR_MODE_PERFECT;
- else
- fdir->mode = RTE_FDIR_MODE_NONE;
+ fdir->mode = RTE_FDIR_MODE_NONE;
fdir->guarant_spc =
(uint32_t)hw->func_caps.fd_filters_guaranteed;
diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
index 959832ed6a..39406b7517 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
@@ -211,15 +211,10 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
struct i40e_adapter *ad =
I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
- struct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
struct i40e_rx_queue *rxq;
uint16_t desc, i;
bool first_queue;
- /* no fdir support */
- if (fconf->mode != RTE_FDIR_MODE_NONE)
- return -1;
-
/* no header split support */
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
return -1;
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index eabefd6343..0773a7ec8e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -474,6 +474,7 @@ struct ixgbe_adapter {
struct ixgbe_hw_stats stats;
struct ixgbe_macsec_stats macsec_stats;
struct ixgbe_macsec_setting macsec_setting;
+ struct rte_eth_fdir_conf fdir_conf;
struct ixgbe_hw_fdir_info fdir;
struct ixgbe_interrupt intr;
struct ixgbe_stat_mapping_registers stat_mappings;
@@ -523,7 +524,7 @@ int ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params);
int ixgbe_vf_representor_uninit(struct rte_eth_dev *ethdev);
#define IXGBE_DEV_FDIR_CONF(dev) \
- (&(dev)->data->dev_conf.fdir_conf)
+ (&((struct ixgbe_adapter *)(dev)->data->dev_private)->fdir_conf)
#define IXGBE_DEV_PRIVATE_TO_HW(adapter)\
(&((struct ixgbe_adapter *)adapter)->hw)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index c018bbc0f1..219e11ad09 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2758,7 +2758,7 @@ ixgbe_parse_fdir_filter(struct rte_eth_dev *dev,
{
int ret;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- enum rte_fdir_mode fdir_mode = IXGBE_DEV_FDIR_CONF(dev)->mode;
+ struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
if (hw->mac.type != ixgbe_mac_82599EB &&
hw->mac.type != ixgbe_mac_X540 &&
@@ -2787,9 +2787,16 @@ ixgbe_parse_fdir_filter(struct rte_eth_dev *dev,
rule->ixgbe_fdir.formatted.dst_port != 0))
return -ENOTSUP;
- if (fdir_mode == RTE_FDIR_MODE_NONE ||
- fdir_mode != rule->mode)
+ if (fdir_conf->mode == RTE_FDIR_MODE_NONE) {
+ fdir_conf->mode = rule->mode;
+ ret = ixgbe_fdir_configure(dev);
+ if (ret) {
+ fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ return ret;
+ }
+ } else if (fdir_conf->mode != rule->mode) {
return -ENOTSUP;
+ }
if (rule->queue >= dev->data->nb_rx_queues)
return -ENOTSUP;
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 3aca53fb98..290e562126 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -512,11 +512,6 @@ octeontx_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
- octeontx_log_err("flow director not supported");
- return -EINVAL;
- }
-
nic->num_tx_queues = dev->data->nb_tx_queues;
if (!nic->reconfigure) {
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index ca3165d972..c5945451e8 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -144,31 +144,9 @@ int qede_check_fdir_support(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_fdir_conf *fdir = ð_dev->data->dev_conf.fdir_conf;
- /* check FDIR modes */
- switch (fdir->mode) {
- case RTE_FDIR_MODE_NONE:
- qdev->arfs_info.arfs.mode = ECORE_FILTER_CONFIG_MODE_DISABLE;
- DP_INFO(edev, "flowdir is disabled\n");
- break;
- case RTE_FDIR_MODE_PERFECT:
- if (ECORE_IS_CMT(edev)) {
- DP_ERR(edev, "flowdir is not supported in 100G mode\n");
- qdev->arfs_info.arfs.mode =
- ECORE_FILTER_CONFIG_MODE_DISABLE;
- return -ENOTSUP;
- }
- qdev->arfs_info.arfs.mode =
- ECORE_FILTER_CONFIG_MODE_5_TUPLE;
- DP_INFO(edev, "flowdir is enabled (5 Tuple mode)\n");
- break;
- case RTE_FDIR_MODE_PERFECT_TUNNEL:
- case RTE_FDIR_MODE_SIGNATURE:
- case RTE_FDIR_MODE_PERFECT_MAC_VLAN:
- DP_ERR(edev, "Unsupported flowdir mode %d\n", fdir->mode);
- return -ENOTSUP;
- }
+ qdev->arfs_info.arfs.mode = ECORE_FILTER_CONFIG_MODE_DISABLE;
+ DP_INFO(edev, "flowdir is disabled\n");
return 0;
}
@@ -258,9 +236,6 @@ qede_config_arfs_filter(struct rte_eth_dev *eth_dev,
if (add) {
if (qdev->arfs_info.arfs.mode ==
ECORE_FILTER_CONFIG_MODE_DISABLE) {
- /* Force update */
- eth_dev->data->dev_conf.fdir_conf.mode =
- RTE_FDIR_MODE_PERFECT;
qdev->arfs_info.arfs.mode =
ECORE_FILTER_CONFIG_MODE_5_TUPLE;
DP_INFO(edev, "Force enable flowdir in perfect mode\n");
diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 51726d229b..22753e3417 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -176,11 +176,6 @@ sfc_check_conf(struct sfc_adapter *sa)
rc = EINVAL;
}
- if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
- sfc_err(sa, "Flow Director not supported");
- rc = EINVAL;
- }
-
if ((conf->intr_conf.lsc != 0) &&
(sa->intr.type != EFX_INTR_LINE) &&
(sa->intr.type != EFX_INTR_MESSAGE)) {
diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c
index d0e5385889..417d0073cb 100644
--- a/drivers/net/sfc/sfc_repr.c
+++ b/drivers/net/sfc/sfc_repr.c
@@ -443,11 +443,6 @@ sfc_repr_check_conf(struct sfc_repr *sr, uint16_t nb_rx_queues,
ret = -EINVAL;
}
- if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
- sfcr_err(sr, "Flow Director not supported");
- ret = -EINVAL;
- }
-
if (conf->intr_conf.lsc != 0) {
sfcr_err(sr, "link status change interrupt not supported");
ret = -EINVAL;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 262c024560..dd7a6bf520 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -2013,11 +2013,6 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
- PMD_INIT_LOG(INFO, "Flow director not supported");
- return -EINVAL;
- }
-
assert_primary(nic);
NICVF_STATIC_ASSERT(MAX_RCV_QUEUES_PER_QS == MAX_SND_QUEUES_PER_QS);
cqcount = RTE_MAX(data->nb_tx_queues, data->nb_rx_queues);
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index e36a2c3d0d..e425ab443e 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -346,6 +346,7 @@ struct txgbe_tm_conf {
struct txgbe_adapter {
struct txgbe_hw hw;
struct txgbe_hw_stats stats;
+ struct rte_eth_fdir_conf fdir_conf;
struct txgbe_hw_fdir_info fdir;
struct txgbe_interrupt intr;
struct txgbe_stat_mappings stat_mappings;
@@ -373,7 +374,7 @@ struct txgbe_adapter {
#define TXGBE_DEV_ADAPTER(dev) \
((struct txgbe_adapter *)(dev)->data->dev_private)
-#define TXGBE_DEV_FDIR_CONF(dev) (&(dev)->data->dev_conf.fdir_conf)
+#define TXGBE_DEV_FDIR_CONF(dev) (&TXGBE_DEV_ADAPTER(dev)->fdir_conf)
#define TXGBE_DEV_HW(dev) \
(&((struct txgbe_adapter *)(dev)->data->dev_private)->hw)
diff --git a/drivers/net/txgbe/txgbe_flow.c b/drivers/net/txgbe/txgbe_flow.c
index 26920f43d3..0b89e3fe38 100644
--- a/drivers/net/txgbe/txgbe_flow.c
+++ b/drivers/net/txgbe/txgbe_flow.c
@@ -2439,7 +2439,7 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,
{
int ret;
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
- enum rte_fdir_mode fdir_mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
+ struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
ret = txgbe_parse_fdir_filter_normal(dev, attr, pattern,
actions, rule, error);
@@ -2458,9 +2458,16 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,
(rule->input.src_port != 0 || rule->input.dst_port != 0))
return -ENOTSUP;
- if (fdir_mode == RTE_FDIR_MODE_NONE ||
- fdir_mode != rule->mode)
+ if (fdir_conf->mode == RTE_FDIR_MODE_NONE) {
+ fdir_conf->mode = rule->mode;
+ ret = txgbe_fdir_configure(dev);
+ if (ret) {
+ fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ return ret;
+ }
+ } else if (fdir_conf->mode != rule->mode) {
return -ENOTSUP;
+ }
if (rule->queue >= dev->data->nb_rx_queues)
return -ENOTSUP;
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 5101868ea7..a0e0b2ae88 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -1915,6 +1915,42 @@ struct rte_eth_tunnel_filter_conf {
uint16_t queue_id; /**< Queue assigned to if match */
};
+/**
+ * Memory space that can be configured to store Flow Director filters
+ * in the board memory.
+ */
+enum rte_eth_fdir_pballoc_type {
+ RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */
+ RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */
+ RTE_ETH_FDIR_PBALLOC_256K, /**< 256k. */
+};
+
+/**
+ * Select report mode of FDIR hash information in Rx descriptors.
+ */
+enum rte_fdir_status_mode {
+ RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
+ RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
+ RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
+};
+
+/**
+ * A structure used to configure the Flow Director (FDIR) feature
+ * of an Ethernet port.
+ *
+ * If mode is RTE_FDIR_MODE_NONE, the pballoc value is ignored.
+ */
+struct rte_eth_fdir_conf {
+ enum rte_fdir_mode mode; /**< Flow Director mode. */
+ enum rte_eth_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
+ enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
+ /** Rx queue of packets matching a "drop" filter in perfect mode. */
+ uint8_t drop_queue;
+ struct rte_eth_fdir_masks mask;
+ /** Flex payload configuration. */
+ struct rte_eth_fdir_flex_conf flex_conf;
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d..53b4d91be2 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1492,48 +1492,6 @@ enum rte_eth_tunnel_type {
/* Deprecated API file for rte_eth_dev_filter_* functions */
#include "rte_eth_ctrl.h"
-/**
- * Memory space that can be configured to store Flow Director filters
- * in the board memory.
- */
-enum rte_eth_fdir_pballoc_type {
- RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */
- RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */
- RTE_ETH_FDIR_PBALLOC_256K, /**< 256k. */
-};
-#define rte_fdir_pballoc_type rte_eth_fdir_pballoc_type
-
-#define RTE_FDIR_PBALLOC_64K RTE_DEPRECATED(RTE_FDIR_PBALLOC_64K) RTE_ETH_FDIR_PBALLOC_64K
-#define RTE_FDIR_PBALLOC_128K RTE_DEPRECATED(RTE_FDIR_PBALLOC_128K) RTE_ETH_FDIR_PBALLOC_128K
-#define RTE_FDIR_PBALLOC_256K RTE_DEPRECATED(RTE_FDIR_PBALLOC_256K) RTE_ETH_FDIR_PBALLOC_256K
-
-/**
- * Select report mode of FDIR hash information in Rx descriptors.
- */
-enum rte_fdir_status_mode {
- RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
- RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
- RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
-};
-
-/**
- * A structure used to configure the Flow Director (FDIR) feature
- * of an Ethernet port.
- *
- * If mode is RTE_FDIR_MODE_NONE, the pballoc value is ignored.
- */
-struct rte_eth_fdir_conf {
- enum rte_fdir_mode mode; /**< Flow Director mode. */
- enum rte_eth_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
- enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
- /** Rx queue of packets matching a "drop" filter in perfect mode. */
- uint8_t drop_queue;
- struct rte_eth_fdir_masks mask;
- /** Flex payload configuration. */
- struct rte_eth_fdir_flex_conf flex_conf;
-};
-#define rte_fdir_conf rte_eth_fdir_conf
-
/**
* UDP tunneling configuration.
*
@@ -1602,7 +1560,6 @@ struct rte_eth_conf {
/** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
is needed,and the variable must be set RTE_ETH_DCB_PFC_SUPPORT. */
uint32_t dcb_capability_en;
- struct rte_eth_fdir_conf fdir_conf; /**< FDIR configuration. DEPRECATED */
struct rte_eth_intr_conf intr_conf; /**< Interrupt mode configuration. */
};
--
2.30.2
^ permalink raw reply [relevance 1%]
* Re: [PATCH 3/3] ethdev: remove deprecated Flow Director configuration
2022-08-03 11:13 1% ` [PATCH 3/3] " Andrew Rybchenko
@ 2022-08-04 11:07 0% ` Dongdong Liu
0 siblings, 0 replies; 200+ results
From: Dongdong Liu @ 2022-08-04 11:07 UTC (permalink / raw)
To: Andrew Rybchenko, Aman Singh, Yuying Zhang, Qi Zhang, Xiao Wang,
Qiming Yang, Wenjun Wu, Ray Kinsella, Nithin Dabilpuram,
Kiran Kumar K, Sunil Kumar Kori, Satha Rao, Yisen Zhuang,
Beilei Xing, Harman Kalra, Rasesh Mody, Devendra Singh Rawat,
Jerin Jacob, Maciej Czekaj, Jiawen Wu, Jian Wang,
Thomas Monjalon, Ferruh Yigit
Cc: dev
For hns3 part.
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
Thanks,
Dongdong
On 2022/8/3 19:13, Andrew Rybchenko wrote:
> Remove deprecated fdir_conf from device configuration.
> Assume that mode is equal to RTE_FDIR_MODE_NONE.
>
> Add internal Flow Director configuration copy in ixgbe and txgbe device
> private data since flow API supports requires it. Initialize mode to
> the first flow rule mode on the rule validation or creation.
>
> Since Flow Director configuration data types are still used by some
> drivers internally, move it from public API to ethdev driver internal
> API.
>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
> app/test-pmd/cmdline.c | 343 --------------------
> app/test-pmd/config.c | 100 ------
> app/test-pmd/parameters.c | 76 -----
> app/test-pmd/testpmd.c | 24 --
> app/test-pmd/testpmd.h | 6 -
> doc/guides/nics/fm10k.rst | 2 -
> doc/guides/nics/ixgbe.rst | 1 -
> doc/guides/rel_notes/deprecation.rst | 4 -
> doc/guides/rel_notes/release_22_11.rst | 4 +
> doc/guides/testpmd_app_ug/run_app.rst | 27 --
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 38 ---
> drivers/net/cnxk/cnxk_ethdev.c | 5 -
> drivers/net/fm10k/fm10k_rxtx_vec.c | 5 -
> drivers/net/hns3/hns3_rxtx_vec.c | 4 -
> drivers/net/i40e/i40e_ethdev.c | 31 --
> drivers/net/i40e/i40e_fdir.c | 304 +----------------
> drivers/net/i40e/i40e_rxtx_vec_common.h | 5 -
> drivers/net/ixgbe/ixgbe_ethdev.h | 3 +-
> drivers/net/ixgbe/ixgbe_flow.c | 13 +-
> drivers/net/octeontx/octeontx_ethdev.c | 5 -
> drivers/net/qede/qede_filter.c | 29 +-
> drivers/net/sfc/sfc.c | 5 -
> drivers/net/sfc/sfc_repr.c | 5 -
> drivers/net/thunderx/nicvf_ethdev.c | 5 -
> drivers/net/txgbe/txgbe_ethdev.h | 3 +-
> drivers/net/txgbe/txgbe_flow.c | 13 +-
> lib/ethdev/ethdev_driver.h | 36 ++
> lib/ethdev/rte_ethdev.h | 43 ---
> 28 files changed, 67 insertions(+), 1072 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index b4fe9dfb17..7057c153f6 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -835,25 +835,6 @@ static void cmd_help_long_parsed(void *parsed_result,
> "filters:\n"
> "--------\n\n"
>
> - "flow_director_mask (port_id) mode IP vlan (vlan_value)"
> - " src_mask (ipv4_src) (ipv6_src) (src_port)"
> - " dst_mask (ipv4_dst) (ipv6_dst) (dst_port)\n"
> - " Set flow director IP mask.\n\n"
> -
> - "flow_director_mask (port_id) mode MAC-VLAN"
> - " vlan (vlan_value)\n"
> - " Set flow director MAC-VLAN mask.\n\n"
> -
> - "flow_director_mask (port_id) mode Tunnel"
> - " vlan (vlan_value) mac (mac_value)"
> - " tunnel-type (tunnel_type_value)"
> - " tunnel-id (tunnel_id_value)\n"
> - " Set flow director Tunnel mask.\n\n"
> -
> - "flow_director_flex_payload (port_id)"
> - " (raw|l2|l3|l4) (config)\n"
> - " Configure flex payload selection.\n\n"
> -
> "flow validate {port_id}"
> " [group {group_id}] [priority {level}]"
> " [ingress] [egress]"
> @@ -8981,326 +8962,6 @@ do { \
> } \
> } while (0)
>
> -/* *** deal with flow director mask *** */
> -struct cmd_flow_director_mask_result {
> - cmdline_fixed_string_t flow_director_mask;
> - portid_t port_id;
> - cmdline_fixed_string_t mode;
> - cmdline_fixed_string_t mode_value;
> - cmdline_fixed_string_t vlan;
> - uint16_t vlan_mask;
> - cmdline_fixed_string_t src_mask;
> - cmdline_ipaddr_t ipv4_src;
> - cmdline_ipaddr_t ipv6_src;
> - uint16_t port_src;
> - cmdline_fixed_string_t dst_mask;
> - cmdline_ipaddr_t ipv4_dst;
> - cmdline_ipaddr_t ipv6_dst;
> - uint16_t port_dst;
> - cmdline_fixed_string_t mac;
> - uint8_t mac_addr_byte_mask;
> - cmdline_fixed_string_t tunnel_id;
> - uint32_t tunnel_id_mask;
> - cmdline_fixed_string_t tunnel_type;
> - uint8_t tunnel_type_mask;
> -};
> -
> -static void
> -cmd_flow_director_mask_parsed(void *parsed_result,
> - __rte_unused struct cmdline *cl,
> - __rte_unused void *data)
> -{
> - struct cmd_flow_director_mask_result *res = parsed_result;
> - struct rte_eth_fdir_masks *mask;
> - struct rte_port *port;
> -
> - port = &ports[res->port_id];
> - /** Check if the port is not started **/
> - if (port->port_status != RTE_PORT_STOPPED) {
> - fprintf(stderr, "Please stop port %d first\n", res->port_id);
> - return;
> - }
> -
> - mask = &port->dev_conf.fdir_conf.mask;
> -
> - if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
> - if (strcmp(res->mode_value, "MAC-VLAN")) {
> - fprintf(stderr, "Please set mode to MAC-VLAN.\n");
> - return;
> - }
> -
> - mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
> - } else if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL) {
> - if (strcmp(res->mode_value, "Tunnel")) {
> - fprintf(stderr, "Please set mode to Tunnel.\n");
> - return;
> - }
> -
> - mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
> - mask->mac_addr_byte_mask = res->mac_addr_byte_mask;
> - mask->tunnel_id_mask = rte_cpu_to_be_32(res->tunnel_id_mask);
> - mask->tunnel_type_mask = res->tunnel_type_mask;
> - } else {
> - if (strcmp(res->mode_value, "IP")) {
> - fprintf(stderr, "Please set mode to IP.\n");
> - return;
> - }
> -
> - mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
> - IPV4_ADDR_TO_UINT(res->ipv4_src, mask->ipv4_mask.src_ip);
> - IPV4_ADDR_TO_UINT(res->ipv4_dst, mask->ipv4_mask.dst_ip);
> - IPV6_ADDR_TO_ARRAY(res->ipv6_src, mask->ipv6_mask.src_ip);
> - IPV6_ADDR_TO_ARRAY(res->ipv6_dst, mask->ipv6_mask.dst_ip);
> - mask->src_port_mask = rte_cpu_to_be_16(res->port_src);
> - mask->dst_port_mask = rte_cpu_to_be_16(res->port_dst);
> - }
> -
> - cmd_reconfig_device_queue(res->port_id, 1, 1);
> -}
> -
> -static cmdline_parse_token_string_t cmd_flow_director_mask =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - flow_director_mask, "flow_director_mask");
> -static cmdline_parse_token_num_t cmd_flow_director_mask_port_id =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - port_id, RTE_UINT16);
> -static cmdline_parse_token_string_t cmd_flow_director_mask_vlan =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - vlan, "vlan");
> -static cmdline_parse_token_num_t cmd_flow_director_mask_vlan_value =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - vlan_mask, RTE_UINT16);
> -static cmdline_parse_token_string_t cmd_flow_director_mask_src =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - src_mask, "src_mask");
> -static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv4_src =
> - TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
> - ipv4_src);
> -static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv6_src =
> - TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
> - ipv6_src);
> -static cmdline_parse_token_num_t cmd_flow_director_mask_port_src =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - port_src, RTE_UINT16);
> -static cmdline_parse_token_string_t cmd_flow_director_mask_dst =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - dst_mask, "dst_mask");
> -static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv4_dst =
> - TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
> - ipv4_dst);
> -static cmdline_parse_token_ipaddr_t cmd_flow_director_mask_ipv6_dst =
> - TOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_mask_result,
> - ipv6_dst);
> -static cmdline_parse_token_num_t cmd_flow_director_mask_port_dst =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - port_dst, RTE_UINT16);
> -
> -static cmdline_parse_token_string_t cmd_flow_director_mask_mode =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - mode, "mode");
> -static cmdline_parse_token_string_t cmd_flow_director_mask_mode_ip =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - mode_value, "IP");
> -static cmdline_parse_token_string_t cmd_flow_director_mask_mode_mac_vlan =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - mode_value, "MAC-VLAN");
> -static cmdline_parse_token_string_t cmd_flow_director_mask_mode_tunnel =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - mode_value, "Tunnel");
> -static cmdline_parse_token_string_t cmd_flow_director_mask_mac =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - mac, "mac");
> -static cmdline_parse_token_num_t cmd_flow_director_mask_mac_value =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - mac_addr_byte_mask, RTE_UINT8);
> -static cmdline_parse_token_string_t cmd_flow_director_mask_tunnel_type =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - tunnel_type, "tunnel-type");
> -static cmdline_parse_token_num_t cmd_flow_director_mask_tunnel_type_value =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - tunnel_type_mask, RTE_UINT8);
> -static cmdline_parse_token_string_t cmd_flow_director_mask_tunnel_id =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_mask_result,
> - tunnel_id, "tunnel-id");
> -static cmdline_parse_token_num_t cmd_flow_director_mask_tunnel_id_value =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_mask_result,
> - tunnel_id_mask, RTE_UINT32);
> -
> -static cmdline_parse_inst_t cmd_set_flow_director_ip_mask = {
> - .f = cmd_flow_director_mask_parsed,
> - .data = NULL,
> - .help_str = "flow_director_mask ... : "
> - "Set IP mode flow director's mask on NIC",
> - .tokens = {
> - (void *)&cmd_flow_director_mask,
> - (void *)&cmd_flow_director_mask_port_id,
> - (void *)&cmd_flow_director_mask_mode,
> - (void *)&cmd_flow_director_mask_mode_ip,
> - (void *)&cmd_flow_director_mask_vlan,
> - (void *)&cmd_flow_director_mask_vlan_value,
> - (void *)&cmd_flow_director_mask_src,
> - (void *)&cmd_flow_director_mask_ipv4_src,
> - (void *)&cmd_flow_director_mask_ipv6_src,
> - (void *)&cmd_flow_director_mask_port_src,
> - (void *)&cmd_flow_director_mask_dst,
> - (void *)&cmd_flow_director_mask_ipv4_dst,
> - (void *)&cmd_flow_director_mask_ipv6_dst,
> - (void *)&cmd_flow_director_mask_port_dst,
> - NULL,
> - },
> -};
> -
> -static cmdline_parse_inst_t cmd_set_flow_director_mac_vlan_mask = {
> - .f = cmd_flow_director_mask_parsed,
> - .data = NULL,
> - .help_str = "flow_director_mask ... : Set MAC VLAN mode "
> - "flow director's mask on NIC",
> - .tokens = {
> - (void *)&cmd_flow_director_mask,
> - (void *)&cmd_flow_director_mask_port_id,
> - (void *)&cmd_flow_director_mask_mode,
> - (void *)&cmd_flow_director_mask_mode_mac_vlan,
> - (void *)&cmd_flow_director_mask_vlan,
> - (void *)&cmd_flow_director_mask_vlan_value,
> - NULL,
> - },
> -};
> -
> -static cmdline_parse_inst_t cmd_set_flow_director_tunnel_mask = {
> - .f = cmd_flow_director_mask_parsed,
> - .data = NULL,
> - .help_str = "flow_director_mask ... : Set tunnel mode "
> - "flow director's mask on NIC",
> - .tokens = {
> - (void *)&cmd_flow_director_mask,
> - (void *)&cmd_flow_director_mask_port_id,
> - (void *)&cmd_flow_director_mask_mode,
> - (void *)&cmd_flow_director_mask_mode_tunnel,
> - (void *)&cmd_flow_director_mask_vlan,
> - (void *)&cmd_flow_director_mask_vlan_value,
> - (void *)&cmd_flow_director_mask_mac,
> - (void *)&cmd_flow_director_mask_mac_value,
> - (void *)&cmd_flow_director_mask_tunnel_type,
> - (void *)&cmd_flow_director_mask_tunnel_type_value,
> - (void *)&cmd_flow_director_mask_tunnel_id,
> - (void *)&cmd_flow_director_mask_tunnel_id_value,
> - NULL,
> - },
> -};
> -
> -/* *** deal with flow director flexible payload configuration *** */
> -struct cmd_flow_director_flexpayload_result {
> - cmdline_fixed_string_t flow_director_flexpayload;
> - portid_t port_id;
> - cmdline_fixed_string_t payload_layer;
> - cmdline_fixed_string_t payload_cfg;
> -};
> -
> -static inline int
> -parse_offsets(const char *q_arg, uint16_t *offsets, uint16_t max_num)
> -{
> - char s[256];
> - const char *p, *p0 = q_arg;
> - char *end;
> - unsigned long int_fld;
> - char *str_fld[max_num];
> - int i;
> - unsigned size;
> - int ret = -1;
> -
> - p = strchr(p0, '(');
> - if (p == NULL)
> - return -1;
> - ++p;
> - p0 = strchr(p, ')');
> - if (p0 == NULL)
> - return -1;
> -
> - size = p0 - p;
> - if (size >= sizeof(s))
> - return -1;
> -
> - snprintf(s, sizeof(s), "%.*s", size, p);
> - ret = rte_strsplit(s, sizeof(s), str_fld, max_num, ',');
> - if (ret < 0 || ret > max_num)
> - return -1;
> - for (i = 0; i < ret; i++) {
> - errno = 0;
> - int_fld = strtoul(str_fld[i], &end, 0);
> - if (errno != 0 || *end != '\0' || int_fld > UINT16_MAX)
> - return -1;
> - offsets[i] = (uint16_t)int_fld;
> - }
> - return ret;
> -}
> -
> -static void
> -cmd_flow_director_flxpld_parsed(void *parsed_result,
> - __rte_unused struct cmdline *cl,
> - __rte_unused void *data)
> -{
> - struct cmd_flow_director_flexpayload_result *res = parsed_result;
> - struct rte_eth_flex_payload_cfg flex_cfg;
> - struct rte_port *port;
> - int ret = 0;
> -
> - port = &ports[res->port_id];
> - /** Check if the port is not started **/
> - if (port->port_status != RTE_PORT_STOPPED) {
> - fprintf(stderr, "Please stop port %d first\n", res->port_id);
> - return;
> - }
> -
> - memset(&flex_cfg, 0, sizeof(struct rte_eth_flex_payload_cfg));
> -
> - if (!strcmp(res->payload_layer, "raw"))
> - flex_cfg.type = RTE_ETH_RAW_PAYLOAD;
> - else if (!strcmp(res->payload_layer, "l2"))
> - flex_cfg.type = RTE_ETH_L2_PAYLOAD;
> - else if (!strcmp(res->payload_layer, "l3"))
> - flex_cfg.type = RTE_ETH_L3_PAYLOAD;
> - else if (!strcmp(res->payload_layer, "l4"))
> - flex_cfg.type = RTE_ETH_L4_PAYLOAD;
> -
> - ret = parse_offsets(res->payload_cfg, flex_cfg.src_offset,
> - RTE_ETH_FDIR_MAX_FLEXLEN);
> - if (ret < 0) {
> - fprintf(stderr, "error: Cannot parse flex payload input.\n");
> - return;
> - }
> -
> - fdir_set_flex_payload(res->port_id, &flex_cfg);
> - cmd_reconfig_device_queue(res->port_id, 1, 1);
> -}
> -
> -static cmdline_parse_token_string_t cmd_flow_director_flexpayload =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flexpayload_result,
> - flow_director_flexpayload,
> - "flow_director_flex_payload");
> -static cmdline_parse_token_num_t cmd_flow_director_flexpayload_port_id =
> - TOKEN_NUM_INITIALIZER(struct cmd_flow_director_flexpayload_result,
> - port_id, RTE_UINT16);
> -static cmdline_parse_token_string_t cmd_flow_director_flexpayload_payload_layer =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flexpayload_result,
> - payload_layer, "raw#l2#l3#l4");
> -static cmdline_parse_token_string_t cmd_flow_director_flexpayload_payload_cfg =
> - TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flexpayload_result,
> - payload_cfg, NULL);
> -
> -static cmdline_parse_inst_t cmd_set_flow_director_flex_payload = {
> - .f = cmd_flow_director_flxpld_parsed,
> - .data = NULL,
> - .help_str = "flow_director_flexpayload ... : "
> - "Set flow director's flex payload on NIC",
> - .tokens = {
> - (void *)&cmd_flow_director_flexpayload,
> - (void *)&cmd_flow_director_flexpayload_port_id,
> - (void *)&cmd_flow_director_flexpayload_payload_layer,
> - (void *)&cmd_flow_director_flexpayload_payload_cfg,
> - NULL,
> - },
> -};
> -
> /* Generic flow interface command. */
> extern cmdline_parse_inst_t cmd_flow;
>
> @@ -14274,10 +13935,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
> (cmdline_parse_inst_t *)&cmd_cleanup_txq_mbufs,
> (cmdline_parse_inst_t *)&cmd_dump,
> (cmdline_parse_inst_t *)&cmd_dump_one,
> - (cmdline_parse_inst_t *)&cmd_set_flow_director_ip_mask,
> - (cmdline_parse_inst_t *)&cmd_set_flow_director_mac_vlan_mask,
> - (cmdline_parse_inst_t *)&cmd_set_flow_director_tunnel_mask,
> - (cmdline_parse_inst_t *)&cmd_set_flow_director_flex_payload,
> (cmdline_parse_inst_t *)&cmd_flow,
> (cmdline_parse_inst_t *)&cmd_show_port_meter_cap,
> (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index a2939867c4..c90cdfe382 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -5728,41 +5728,6 @@ flowtype_to_str(uint16_t flow_type)
>
> #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
>
> -static inline void
> -print_fdir_mask(struct rte_eth_fdir_masks *mask)
> -{
> - printf("\n vlan_tci: 0x%04x", rte_be_to_cpu_16(mask->vlan_tci_mask));
> -
> - if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
> - printf(", mac_addr: 0x%02x, tunnel_type: 0x%01x,"
> - " tunnel_id: 0x%08x",
> - mask->mac_addr_byte_mask, mask->tunnel_type_mask,
> - rte_be_to_cpu_32(mask->tunnel_id_mask));
> - else if (fdir_conf.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
> - printf(", src_ipv4: 0x%08x, dst_ipv4: 0x%08x",
> - rte_be_to_cpu_32(mask->ipv4_mask.src_ip),
> - rte_be_to_cpu_32(mask->ipv4_mask.dst_ip));
> -
> - printf("\n src_port: 0x%04x, dst_port: 0x%04x",
> - rte_be_to_cpu_16(mask->src_port_mask),
> - rte_be_to_cpu_16(mask->dst_port_mask));
> -
> - printf("\n src_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
> - rte_be_to_cpu_32(mask->ipv6_mask.src_ip[0]),
> - rte_be_to_cpu_32(mask->ipv6_mask.src_ip[1]),
> - rte_be_to_cpu_32(mask->ipv6_mask.src_ip[2]),
> - rte_be_to_cpu_32(mask->ipv6_mask.src_ip[3]));
> -
> - printf("\n dst_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
> - rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[0]),
> - rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[1]),
> - rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[2]),
> - rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[3]));
> - }
> -
> - printf("\n");
> -}
> -
> static inline void
> print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
> {
> @@ -5898,8 +5863,6 @@ fdir_get_infos(portid_t port_id)
> fdir_info.flex_payload_unit,
> fdir_info.max_flex_payload_segment_num,
> fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num);
> - printf(" MASK: ");
> - print_fdir_mask(&fdir_info.mask);
> if (fdir_info.flex_conf.nb_payloads > 0) {
> printf(" FLEX PAYLOAD SRC OFFSET:");
> print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload);
> @@ -5926,69 +5889,6 @@ fdir_get_infos(portid_t port_id)
>
> #endif /* RTE_NET_I40E || RTE_NET_IXGBE */
>
> -void
> -fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
> -{
> - struct rte_port *port;
> - struct rte_eth_fdir_flex_conf *flex_conf;
> - int i, idx = 0;
> -
> - port = &ports[port_id];
> - flex_conf = &port->dev_conf.fdir_conf.flex_conf;
> - for (i = 0; i < RTE_ETH_FLOW_MAX; i++) {
> - if (cfg->flow_type == flex_conf->flex_mask[i].flow_type) {
> - idx = i;
> - break;
> - }
> - }
> - if (i >= RTE_ETH_FLOW_MAX) {
> - if (flex_conf->nb_flexmasks < RTE_DIM(flex_conf->flex_mask)) {
> - idx = flex_conf->nb_flexmasks;
> - flex_conf->nb_flexmasks++;
> - } else {
> - fprintf(stderr,
> - "The flex mask table is full. Can not set flex mask for flow_type(%u).",
> - cfg->flow_type);
> - return;
> - }
> - }
> - rte_memcpy(&flex_conf->flex_mask[idx],
> - cfg,
> - sizeof(struct rte_eth_fdir_flex_mask));
> -}
> -
> -void
> -fdir_set_flex_payload(portid_t port_id, struct rte_eth_flex_payload_cfg *cfg)
> -{
> - struct rte_port *port;
> - struct rte_eth_fdir_flex_conf *flex_conf;
> - int i, idx = 0;
> -
> - port = &ports[port_id];
> - flex_conf = &port->dev_conf.fdir_conf.flex_conf;
> - for (i = 0; i < RTE_ETH_PAYLOAD_MAX; i++) {
> - if (cfg->type == flex_conf->flex_set[i].type) {
> - idx = i;
> - break;
> - }
> - }
> - if (i >= RTE_ETH_PAYLOAD_MAX) {
> - if (flex_conf->nb_payloads < RTE_DIM(flex_conf->flex_set)) {
> - idx = flex_conf->nb_payloads;
> - flex_conf->nb_payloads++;
> - } else {
> - fprintf(stderr,
> - "The flex payload table is full. Can not set flex payload for type(%u).",
> - cfg->type);
> - return;
> - }
> - }
> - rte_memcpy(&flex_conf->flex_set[idx],
> - cfg,
> - sizeof(struct rte_eth_flex_payload_cfg));
> -
> -}
> -
> void
> set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
> {
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> index e3c9757f3f..cfd7cd1e50 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -101,17 +101,6 @@ usage(char* progname)
> printf(" --eth-peer=X,M:M:M:M:M:M: set the MAC address of the X peer "
> "port (0 <= X < %d).\n", RTE_MAX_ETHPORTS);
> #endif
> - printf(" --pkt-filter-mode=N: set Flow Director mode "
> - "(N: none (default mode) or signature or perfect).\n");
> - printf(" --pkt-filter-report-hash=N: set Flow Director report mode "
> - "(N: none or match (default) or always).\n");
> - printf(" --pkt-filter-size=N: set Flow Director mode "
> - "(N: 64K (default mode) or 128K or 256K).\n");
> - printf(" --pkt-filter-drop-queue=N: set drop-queue. "
> - "In perfect mode, when you add a rule with queue = -1 "
> - "the packet will be enqueued into the rx drop-queue. "
> - "If the drop-queue doesn't exist, the packet is dropped. "
> - "By default drop-queue=127.\n");
> #ifdef RTE_LIB_LATENCYSTATS
> printf(" --latencystats=N: enable latency and jitter statistics "
> "monitoring on forwarding lcore id N.\n");
> @@ -625,10 +614,6 @@ launch_args_parse(int argc, char** argv)
> { "total-num-mbufs", 1, 0, 0 },
> { "max-pkt-len", 1, 0, 0 },
> { "max-lro-pkt-size", 1, 0, 0 },
> - { "pkt-filter-mode", 1, 0, 0 },
> - { "pkt-filter-report-hash", 1, 0, 0 },
> - { "pkt-filter-size", 1, 0, 0 },
> - { "pkt-filter-drop-queue", 1, 0, 0 },
> #ifdef RTE_LIB_LATENCYSTATS
> { "latencystats", 1, 0, 0 },
> #endif
> @@ -963,67 +948,6 @@ launch_args_parse(int argc, char** argv)
> n = atoi(optarg);
> rx_mode.max_lro_pkt_size = (uint32_t) n;
> }
> - if (!strcmp(lgopts[opt_idx].name, "pkt-filter-mode")) {
> - if (!strcmp(optarg, "signature"))
> - fdir_conf.mode =
> - RTE_FDIR_MODE_SIGNATURE;
> - else if (!strcmp(optarg, "perfect"))
> - fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
> - else if (!strcmp(optarg, "perfect-mac-vlan"))
> - fdir_conf.mode = RTE_FDIR_MODE_PERFECT_MAC_VLAN;
> - else if (!strcmp(optarg, "perfect-tunnel"))
> - fdir_conf.mode = RTE_FDIR_MODE_PERFECT_TUNNEL;
> - else if (!strcmp(optarg, "none"))
> - fdir_conf.mode = RTE_FDIR_MODE_NONE;
> - else
> - rte_exit(EXIT_FAILURE,
> - "pkt-mode-invalid %s invalid - must be: "
> - "none, signature, perfect, perfect-mac-vlan"
> - " or perfect-tunnel\n",
> - optarg);
> - }
> - if (!strcmp(lgopts[opt_idx].name,
> - "pkt-filter-report-hash")) {
> - if (!strcmp(optarg, "none"))
> - fdir_conf.status =
> - RTE_FDIR_NO_REPORT_STATUS;
> - else if (!strcmp(optarg, "match"))
> - fdir_conf.status =
> - RTE_FDIR_REPORT_STATUS;
> - else if (!strcmp(optarg, "always"))
> - fdir_conf.status =
> - RTE_FDIR_REPORT_STATUS_ALWAYS;
> - else
> - rte_exit(EXIT_FAILURE,
> - "pkt-filter-report-hash %s invalid "
> - "- must be: none or match or always\n",
> - optarg);
> - }
> - if (!strcmp(lgopts[opt_idx].name, "pkt-filter-size")) {
> - if (!strcmp(optarg, "64K"))
> - fdir_conf.pballoc =
> - RTE_ETH_FDIR_PBALLOC_64K;
> - else if (!strcmp(optarg, "128K"))
> - fdir_conf.pballoc =
> - RTE_ETH_FDIR_PBALLOC_128K;
> - else if (!strcmp(optarg, "256K"))
> - fdir_conf.pballoc =
> - RTE_ETH_FDIR_PBALLOC_256K;
> - else
> - rte_exit(EXIT_FAILURE, "pkt-filter-size %s invalid -"
> - " must be: 64K or 128K or 256K\n",
> - optarg);
> - }
> - if (!strcmp(lgopts[opt_idx].name,
> - "pkt-filter-drop-queue")) {
> - n = atoi(optarg);
> - if (n >= 0)
> - fdir_conf.drop_queue = (uint8_t) n;
> - else
> - rte_exit(EXIT_FAILURE,
> - "drop queue %d invalid - must"
> - "be >= 0 \n", n);
> - }
> #ifdef RTE_LIB_LATENCYSTATS
> if (!strcmp(lgopts[opt_idx].name,
> "latencystats")) {
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index addcbcac85..511a870dc9 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -478,29 +478,6 @@ struct rte_eth_txmode tx_mode = {
> .offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
> };
>
> -struct rte_eth_fdir_conf fdir_conf = {
> - .mode = RTE_FDIR_MODE_NONE,
> - .pballoc = RTE_ETH_FDIR_PBALLOC_64K,
> - .status = RTE_FDIR_REPORT_STATUS,
> - .mask = {
> - .vlan_tci_mask = 0xFFEF,
> - .ipv4_mask = {
> - .src_ip = 0xFFFFFFFF,
> - .dst_ip = 0xFFFFFFFF,
> - },
> - .ipv6_mask = {
> - .src_ip = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF},
> - .dst_ip = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF},
> - },
> - .src_port_mask = 0xFFFF,
> - .dst_port_mask = 0xFFFF,
> - .mac_addr_byte_mask = 0xFF,
> - .tunnel_type_mask = 1,
> - .tunnel_id_mask = 0xFFFFFFFF,
> - },
> - .drop_queue = 127,
> -};
> -
> volatile int test_done = 1; /* stop packet forwarding when set to 1. */
>
> /*
> @@ -3933,7 +3910,6 @@ init_port_config(void)
>
> RTE_ETH_FOREACH_DEV(pid) {
> port = &ports[pid];
> - port->dev_conf.fdir_conf = fdir_conf;
>
> ret = eth_dev_info_get_print_err(pid, &port->dev_info);
> if (ret != 0)
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> index fb2f5195d3..27f4b9199c 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -554,8 +554,6 @@ extern lcoreid_t bitrate_lcore_id;
> extern uint8_t bitrate_enabled;
> #endif
>
> -extern struct rte_eth_fdir_conf fdir_conf;
> -
> extern uint32_t max_rx_pkt_len;
>
> /*
> @@ -1091,10 +1089,6 @@ void pmd_test_exit(void);
> #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> void fdir_get_infos(portid_t port_id);
> #endif
> -void fdir_set_flex_mask(portid_t port_id,
> - struct rte_eth_fdir_flex_mask *cfg);
> -void fdir_set_flex_payload(portid_t port_id,
> - struct rte_eth_flex_payload_cfg *cfg);
> void port_rss_reta_info(portid_t port_id,
> struct rte_eth_rss_reta_entry64 *reta_conf,
> uint16_t nb_entries);
> diff --git a/doc/guides/nics/fm10k.rst b/doc/guides/nics/fm10k.rst
> index d6efac0917..628ffb5408 100644
> --- a/doc/guides/nics/fm10k.rst
> +++ b/doc/guides/nics/fm10k.rst
> @@ -84,8 +84,6 @@ will be checked:
>
> * ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
>
> -* ``fdir_conf->mode``
> -
>
> RX Burst Size
> ^^^^^^^^^^^^^
> diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
> index ad1a3da610..b1875095de 100644
> --- a/doc/guides/nics/ixgbe.rst
> +++ b/doc/guides/nics/ixgbe.rst
> @@ -99,7 +99,6 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
>
> * dev_conf
>
> -fdir_conf->mode will also be checked.
>
> Disable SDP3 TX_DISABLE for Fiber Links
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index e7583cae4c..eb99f51213 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -98,10 +98,6 @@ Deprecation Notices
> The per-queue Rx packet split offload ``RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT``
> can still be used, and it is configured by ``rte_eth_rxseg_split``.
>
> -* ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
> - and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
> - will be removed in DPDK 20.11.
> -
> * ethdev: Announce moving from dedicated modify function for each field,
> to using the general ``rte_flow_modify_field`` action.
>
> diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
> index 8c021cf050..caf58c3f82 100644
> --- a/doc/guides/rel_notes/release_22_11.rst
> +++ b/doc/guides/rel_notes/release_22_11.rst
> @@ -84,6 +84,10 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =======================================================
>
> +* ethdev: Removed deprecated Flow Director configuration from device
> + configuration (``dev_conf.fdir_conf``). Moved corresponding structures
> + to internal API since some drivers still use it internally.
> +
>
> ABI Changes
> -----------
> diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
> index 30edef07ea..8b41b960c8 100644
> --- a/doc/guides/testpmd_app_ug/run_app.rst
> +++ b/doc/guides/testpmd_app_ug/run_app.rst
> @@ -159,33 +159,6 @@ The command line options are:
> The default port is the port 9 which is defined for the discard protocol
> (RFC 863).
>
> -* ``--pkt-filter-mode=mode``
> -
> - Set Flow Director mode where mode is either ``none`` (the default), ``signature`` or ``perfect``.
> - See :ref:`testpmd_flow_director` for more details.
> -
> -* ``--pkt-filter-report-hash=mode``
> -
> - Set Flow Director hash match reporting mode where mode is ``none``, ``match`` (the default) or ``always``.
> -
> -* ``--pkt-filter-size=N``
> -
> - Set Flow Director allocated memory size, where N is 64K, 128K or 256K.
> - Sizes are in kilobytes. The default is 64.
> -
> -* ``--pkt-filter-flexbytes-offset=N``
> -
> - Set the flexbytes offset.
> - The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address,
> - where N is 0 <= N <= 32.
> - The default value is 0x6.
> -
> -* ``--pkt-filter-drop-queue=N``
> -
> - Set the drop-queue.
> - In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue.
> - If the drop-queue does not exist, the packet is dropped. The default value is N=127.
> -
> * ``--disable-crc-strip``
>
> Disable hardware CRC stripping.
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index 330e34427d..bb6e9fd46f 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -3004,44 +3004,6 @@ This section details the available filter functions that are available.
> Note these functions interface the deprecated legacy filtering framework,
> superseded by *rte_flow*. See `Flow rules management`_.
>
> -.. _testpmd_flow_director:
> -
> -flow_director_mask
> -~~~~~~~~~~~~~~~~~~
> -
> -Set flow director's input masks::
> -
> - flow_director_mask (port_id) mode IP vlan (vlan_value) \
> - src_mask (ipv4_src) (ipv6_src) (src_port) \
> - dst_mask (ipv4_dst) (ipv6_dst) (dst_port)
> -
> - flow_director_mask (port_id) mode MAC-VLAN vlan (vlan_value)
> -
> - flow_director_mask (port_id) mode Tunnel vlan (vlan_value) \
> - mac (mac_value) tunnel-type (tunnel_type_value) \
> - tunnel-id (tunnel_id_value)
> -
> -Example, to set flow director mask on port 0::
> -
> - testpmd> flow_director_mask 0 mode IP vlan 0xefff \
> - src_mask 255.255.255.255 \
> - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF \
> - dst_mask 255.255.255.255 \
> - FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF
> -
> -flow_director_flex_payload
> -~~~~~~~~~~~~~~~~~~~~~~~~~~
> -
> -Configure flexible payload selection::
> -
> - flow_director_flex_payload (port_id) (raw|l2|l3|l4) (config)
> -
> -For example, to select the first 16 bytes from the offset 4 (bytes) of packet's payload as flexible payload::
> -
> - testpmd> flow_director_flex_payload 0 l4 \
> - (4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)
> -
> -
> .. _testpmd_rte_flow:
>
> Flow rules management
> diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
> index 24182909f1..98f2b1ad91 100644
> --- a/drivers/net/cnxk/cnxk_ethdev.c
> +++ b/drivers/net/cnxk/cnxk_ethdev.c
> @@ -1092,11 +1092,6 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
> goto fail_configure;
> }
>
> - if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
> - plt_err("Flow director is not supported");
> - goto fail_configure;
> - }
> -
> if (rxmode->mq_mode != RTE_ETH_MQ_RX_NONE &&
> rxmode->mq_mode != RTE_ETH_MQ_RX_RSS) {
> plt_err("Unsupported mq rx mode %d", rxmode->mq_mode);
> diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
> index 10ce5a7582..c7088f36cc 100644
> --- a/drivers/net/fm10k/fm10k_rxtx_vec.c
> +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
> @@ -209,7 +209,6 @@ fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
> {
> #ifndef RTE_LIBRTE_IEEE1588
> struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
> - struct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
>
> #ifndef RTE_FM10K_RX_OLFLAGS_ENABLE
> /* without rx ol_flags, no VP flag report */
> @@ -217,10 +216,6 @@ fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
> return -1;
> #endif
>
> - /* no fdir support */
> - if (fconf->mode != RTE_FDIR_MODE_NONE)
> - return -1;
> -
> /* no header split support */
> if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
> return -1;
> diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
> index 73f0ab6bc8..0dd6fccb13 100644
> --- a/drivers/net/hns3/hns3_rxtx_vec.c
> +++ b/drivers/net/hns3/hns3_rxtx_vec.c
> @@ -230,7 +230,6 @@ hns3_rxq_vec_check(struct hns3_rx_queue *rxq, void *arg)
> int
> hns3_rx_check_vec_support(struct rte_eth_dev *dev)
> {
> - struct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
> struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
> uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
> RTE_ETH_RX_OFFLOAD_VLAN;
> @@ -240,9 +239,6 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
> if (dev->data->scattered_rx)
> return -ENOTSUP;
>
> - if (fconf->mode != RTE_FDIR_MODE_NONE)
> - return -ENOTSUP;
> -
> if (rxmode->offloads & offloads_mask)
> return -ENOTSUP;
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 67d79de08d..3712a78c00 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -1886,24 +1886,6 @@ i40e_dev_configure(struct rte_eth_dev *dev)
> if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)
> dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
>
> - /* Only legacy filter API needs the following fdir config. So when the
> - * legacy filter API is deprecated, the following codes should also be
> - * removed.
> - */
> - if (dev->data->dev_conf.fdir_conf.mode == RTE_FDIR_MODE_PERFECT) {
> - ret = i40e_fdir_setup(pf);
> - if (ret != I40E_SUCCESS) {
> - PMD_DRV_LOG(ERR, "Failed to setup flow director.");
> - return -ENOTSUP;
> - }
> - ret = i40e_fdir_configure(dev);
> - if (ret < 0) {
> - PMD_DRV_LOG(ERR, "failed to configure fdir.");
> - goto err;
> - }
> - } else
> - i40e_fdir_teardown(pf);
> -
> ret = i40e_dev_init_vlan(dev);
> if (ret < 0)
> goto err;
> @@ -1945,12 +1927,6 @@ i40e_dev_configure(struct rte_eth_dev *dev)
> rte_free(pf->vmdq);
> pf->vmdq = NULL;
> err:
> - /* Need to release fdir resource if exists.
> - * Only legacy filter API needs the following fdir config. So when the
> - * legacy filter API is deprecated, the following code should also be
> - * removed.
> - */
> - i40e_fdir_teardown(pf);
> return ret;
> }
>
> @@ -2600,13 +2576,6 @@ i40e_dev_close(struct rte_eth_dev *dev)
> i40e_pf_disable_irq0(hw);
> rte_intr_disable(intr_handle);
>
> - /*
> - * Only legacy filter API needs the following fdir config. So when the
> - * legacy filter API is deprecated, the following code should also be
> - * removed.
> - */
> - i40e_fdir_teardown(pf);
> -
> /* shutdown and destroy the HMC */
> i40e_shutdown_lan_hmc(hw);
>
> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
> index 8caedea14e..afcaa593eb 100644
> --- a/drivers/net/i40e/i40e_fdir.c
> +++ b/drivers/net/i40e/i40e_fdir.c
> @@ -373,269 +373,6 @@ i40e_init_flx_pld(struct i40e_pf *pf)
> }
> }
>
> -#define I40E_VALIDATE_FLEX_PIT(flex_pit1, flex_pit2) do { \
> - if ((flex_pit2).src_offset < \
> - (flex_pit1).src_offset + (flex_pit1).size) { \
> - PMD_DRV_LOG(ERR, "src_offset should be not" \
> - " less than than previous offset" \
> - " + previous FSIZE."); \
> - return -EINVAL; \
> - } \
> -} while (0)
> -
> -/*
> - * i40e_srcoff_to_flx_pit - transform the src_offset into flex_pit structure,
> - * and the flex_pit will be sorted by it's src_offset value
> - */
> -static inline uint16_t
> -i40e_srcoff_to_flx_pit(const uint16_t *src_offset,
> - struct i40e_fdir_flex_pit *flex_pit)
> -{
> - uint16_t src_tmp, size, num = 0;
> - uint16_t i, k, j = 0;
> -
> - while (j < I40E_FDIR_MAX_FLEX_LEN) {
> - size = 1;
> - for (; j < I40E_FDIR_MAX_FLEX_LEN - 1; j++) {
> - if (src_offset[j + 1] == src_offset[j] + 1)
> - size++;
> - else
> - break;
> - }
> - src_tmp = src_offset[j] + 1 - size;
> - /* the flex_pit need to be sort by src_offset */
> - for (i = 0; i < num; i++) {
> - if (src_tmp < flex_pit[i].src_offset)
> - break;
> - }
> - /* if insert required, move backward */
> - for (k = num; k > i; k--)
> - flex_pit[k] = flex_pit[k - 1];
> - /* insert */
> - flex_pit[i].dst_offset = j + 1 - size;
> - flex_pit[i].src_offset = src_tmp;
> - flex_pit[i].size = size;
> - j++;
> - num++;
> - }
> - return num;
> -}
> -
> -/* i40e_check_fdir_flex_payload -check flex payload configuration arguments */
> -static inline int
> -i40e_check_fdir_flex_payload(const struct rte_eth_flex_payload_cfg *flex_cfg)
> -{
> - struct i40e_fdir_flex_pit flex_pit[I40E_FDIR_MAX_FLEX_LEN];
> - uint16_t num, i;
> -
> - for (i = 0; i < I40E_FDIR_MAX_FLEX_LEN; i++) {
> - if (flex_cfg->src_offset[i] >= I40E_MAX_FLX_SOURCE_OFF) {
> - PMD_DRV_LOG(ERR, "exceeds maximal payload limit.");
> - return -EINVAL;
> - }
> - }
> -
> - memset(flex_pit, 0, sizeof(flex_pit));
> - num = i40e_srcoff_to_flx_pit(flex_cfg->src_offset, flex_pit);
> - if (num > I40E_MAX_FLXPLD_FIED) {
> - PMD_DRV_LOG(ERR, "exceeds maximal number of flex fields.");
> - return -EINVAL;
> - }
> - for (i = 0; i < num; i++) {
> - if (flex_pit[i].size & 0x01 || flex_pit[i].dst_offset & 0x01 ||
> - flex_pit[i].src_offset & 0x01) {
> - PMD_DRV_LOG(ERR, "flexpayload should be measured"
> - " in word");
> - return -EINVAL;
> - }
> - if (i != num - 1)
> - I40E_VALIDATE_FLEX_PIT(flex_pit[i], flex_pit[i + 1]);
> - }
> - return 0;
> -}
> -
> -/*
> - * i40e_check_fdir_flex_conf -check if the flex payload and mask configuration
> - * arguments are valid
> - */
> -static int
> -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;
> - uint16_t mask_tmp;
> - 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.");
> - return -EINVAL;
> - }
> - /* check flexible payload setting configuration */
> - if (conf->nb_payloads > RTE_ETH_L4_PAYLOAD) {
> - PMD_DRV_LOG(ERR, "invalid number of payload setting.");
> - return -EINVAL;
> - }
> - for (i = 0; i < conf->nb_payloads; i++) {
> - flex_cfg = &conf->flex_set[i];
> - if (flex_cfg->type > RTE_ETH_L4_PAYLOAD) {
> - PMD_DRV_LOG(ERR, "invalid payload type.");
> - return -EINVAL;
> - }
> - ret = i40e_check_fdir_flex_payload(flex_cfg);
> - if (ret < 0) {
> - PMD_DRV_LOG(ERR, "invalid flex payload arguments.");
> - return -EINVAL;
> - }
> - }
> -
> - /* check flex mask setting configuration */
> - if (conf->nb_flexmasks >= RTE_ETH_FLOW_MAX) {
> - PMD_DRV_LOG(ERR, "invalid number of flex masks.");
> - return -EINVAL;
> - }
> - for (i = 0; i < conf->nb_flexmasks; i++) {
> - flex_mask = &conf->flex_mask[i];
> - 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;
> - }
> - nb_bitmask = 0;
> - for (j = 0; j < I40E_FDIR_MAX_FLEX_LEN; j += sizeof(uint16_t)) {
> - mask_tmp = I40E_WORD(flex_mask->mask[j],
> - flex_mask->mask[j + 1]);
> - if (mask_tmp != 0x0 && mask_tmp != UINT16_MAX) {
> - nb_bitmask++;
> - if (nb_bitmask > I40E_FDIR_BITMASK_NUM_WORD) {
> - PMD_DRV_LOG(ERR, " exceed maximal"
> - " number of bitmasks.");
> - return -EINVAL;
> - }
> - }
> - }
> - }
> - return 0;
> -}
> -
> -/*
> - * i40e_set_flx_pld_cfg -configure the rule how bytes stream is extracted as flexible payload
> - * @pf: board private structure
> - * @cfg: the rule how bytes stream is extracted as flexible payload
> - */
> -static void
> -i40e_set_flx_pld_cfg(struct i40e_pf *pf,
> - const struct rte_eth_flex_payload_cfg *cfg)
> -{
> - struct i40e_hw *hw = I40E_PF_TO_HW(pf);
> - struct i40e_fdir_flex_pit flex_pit[I40E_MAX_FLXPLD_FIED];
> - uint32_t flx_pit, flx_ort;
> - uint16_t num, min_next_off; /* in words */
> - uint8_t field_idx = 0;
> - uint8_t layer_idx = 0;
> - uint16_t i;
> -
> - if (cfg->type == RTE_ETH_L2_PAYLOAD)
> - layer_idx = I40E_FLXPLD_L2_IDX;
> - else if (cfg->type == RTE_ETH_L3_PAYLOAD)
> - layer_idx = I40E_FLXPLD_L3_IDX;
> - else if (cfg->type == RTE_ETH_L4_PAYLOAD)
> - layer_idx = I40E_FLXPLD_L4_IDX;
> -
> - memset(flex_pit, 0, sizeof(flex_pit));
> - num = RTE_MIN(i40e_srcoff_to_flx_pit(cfg->src_offset, flex_pit),
> - RTE_DIM(flex_pit));
> -
> - if (num) {
> - flx_ort = (1 << I40E_GLQF_ORT_FLX_PAYLOAD_SHIFT) |
> - (num << I40E_GLQF_ORT_FIELD_CNT_SHIFT) |
> - (layer_idx * I40E_MAX_FLXPLD_FIED);
> - I40E_WRITE_GLB_REG(hw, I40E_GLQF_ORT(33 + layer_idx), flx_ort);
> - }
> -
> - for (i = 0; i < num; i++) {
> - field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
> - /* record the info in fdir structure */
> - pf->fdir.flex_set[field_idx].src_offset =
> - flex_pit[i].src_offset / sizeof(uint16_t);
> - pf->fdir.flex_set[field_idx].size =
> - flex_pit[i].size / sizeof(uint16_t);
> - pf->fdir.flex_set[field_idx].dst_offset =
> - flex_pit[i].dst_offset / sizeof(uint16_t);
> - flx_pit = MK_FLX_PIT(pf->fdir.flex_set[field_idx].src_offset,
> - pf->fdir.flex_set[field_idx].size,
> - pf->fdir.flex_set[field_idx].dst_offset);
> -
> - I40E_WRITE_REG(hw, I40E_PRTQF_FLX_PIT(field_idx), flx_pit);
> - }
> - min_next_off = pf->fdir.flex_set[field_idx].src_offset +
> - pf->fdir.flex_set[field_idx].size;
> -
> - for (; i < I40E_MAX_FLXPLD_FIED; i++) {
> - /* set the non-used register obeying register's constrain */
> - flx_pit = MK_FLX_PIT(min_next_off, NONUSE_FLX_PIT_FSIZE,
> - NONUSE_FLX_PIT_DEST_OFF);
> - I40E_WRITE_REG(hw,
> - I40E_PRTQF_FLX_PIT(layer_idx * I40E_MAX_FLXPLD_FIED + i),
> - flx_pit);
> - min_next_off++;
> - }
> -}
> -
> -/*
> - * i40e_set_flex_mask_on_pctype - configure the mask on flexible payload
> - * @pf: board private structure
> - * @pctype: packet classify type
> - * @flex_masks: mask for flexible payload
> - */
> -static void
> -i40e_set_flex_mask_on_pctype(struct i40e_pf *pf,
> - enum i40e_filter_pctype pctype,
> - const struct rte_eth_fdir_flex_mask *mask_cfg)
> -{
> - struct i40e_hw *hw = I40E_PF_TO_HW(pf);
> - struct i40e_fdir_flex_mask *flex_mask;
> - uint32_t flxinset, fd_mask;
> - uint16_t mask_tmp;
> - uint8_t i, nb_bitmask = 0;
> -
> - flex_mask = &pf->fdir.flex_mask[pctype];
> - memset(flex_mask, 0, sizeof(struct i40e_fdir_flex_mask));
> - for (i = 0; i < I40E_FDIR_MAX_FLEX_LEN; i += sizeof(uint16_t)) {
> - mask_tmp = I40E_WORD(mask_cfg->mask[i], mask_cfg->mask[i + 1]);
> - if (mask_tmp != 0x0) {
> - flex_mask->word_mask |=
> - I40E_FLEX_WORD_MASK(i / sizeof(uint16_t));
> - if (mask_tmp != UINT16_MAX) {
> - /* set bit mask */
> - flex_mask->bitmask[nb_bitmask].mask = ~mask_tmp;
> - flex_mask->bitmask[nb_bitmask].offset =
> - i / sizeof(uint16_t);
> - nb_bitmask++;
> - }
> - }
> - }
> - /* write mask to hw */
> - flxinset = (flex_mask->word_mask <<
> - I40E_PRTQF_FD_FLXINSET_INSET_SHIFT) &
> - I40E_PRTQF_FD_FLXINSET_INSET_MASK;
> - i40e_write_rx_ctl(hw, I40E_PRTQF_FD_FLXINSET(pctype), flxinset);
> -
> - for (i = 0; i < nb_bitmask; i++) {
> - fd_mask = (flex_mask->bitmask[i].mask <<
> - I40E_PRTQF_FD_MSK_MASK_SHIFT) &
> - I40E_PRTQF_FD_MSK_MASK_MASK;
> - fd_mask |= ((flex_mask->bitmask[i].offset +
> - I40E_FLX_OFFSET_IN_FIELD_VECTOR) <<
> - I40E_PRTQF_FD_MSK_OFFSET_SHIFT) &
> - I40E_PRTQF_FD_MSK_OFFSET_MASK;
> - i40e_write_rx_ctl(hw, I40E_PRTQF_FD_MSK(pctype, i), fd_mask);
> - }
> -}
> -
> /*
> * Enable/disable flow director RX processing in vector routines.
> */
> @@ -661,10 +398,7 @@ i40e_fdir_configure(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);
> - struct rte_eth_fdir_flex_conf *conf;
> - enum i40e_filter_pctype pctype;
> uint32_t val;
> - uint8_t i;
> int ret = 0;
>
> /*
> @@ -687,39 +421,6 @@ 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(pf->adapter, conf);
> - if (ret < 0) {
> - PMD_DRV_LOG(ERR, " invalid configuration arguments.");
> - return -EINVAL;
> - }
> -
> - if (!pf->support_multi_driver) {
> - /* configure flex payload */
> - for (i = 0; i < conf->nb_payloads; i++)
> - i40e_set_flx_pld_cfg(pf, &conf->flex_set[i]);
> - /* configure flex mask*/
> - for (i = 0; i < conf->nb_flexmasks; i++) {
> - if (hw->mac.type == I40E_MAC_X722) {
> - /* get 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(
> - pf->adapter,
> - conf->flex_mask[i].flow_type)));
> - } else {
> - 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]);
> - }
> - } else {
> - PMD_DRV_LOG(ERR, "Not support flexible payload.");
> - }
> -
> /* Enable FDIR processing in RX routines */
> i40e_fdir_rx_proc_enable(dev, 1);
>
> @@ -2187,10 +1888,7 @@ i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir)
> uint16_t num_flex_mask = 0;
> uint16_t i;
>
> - if (dev->data->dev_conf.fdir_conf.mode == RTE_FDIR_MODE_PERFECT)
> - fdir->mode = RTE_FDIR_MODE_PERFECT;
> - else
> - fdir->mode = RTE_FDIR_MODE_NONE;
> + fdir->mode = RTE_FDIR_MODE_NONE;
>
> fdir->guarant_spc =
> (uint32_t)hw->func_caps.fd_filters_guaranteed;
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
> index 959832ed6a..39406b7517 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_common.h
> +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
> @@ -211,15 +211,10 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
> struct i40e_adapter *ad =
> I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
> - struct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
> struct i40e_rx_queue *rxq;
> uint16_t desc, i;
> bool first_queue;
>
> - /* no fdir support */
> - if (fconf->mode != RTE_FDIR_MODE_NONE)
> - return -1;
> -
> /* no header split support */
> if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
> return -1;
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
> index eabefd6343..0773a7ec8e 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.h
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
> @@ -474,6 +474,7 @@ struct ixgbe_adapter {
> struct ixgbe_hw_stats stats;
> struct ixgbe_macsec_stats macsec_stats;
> struct ixgbe_macsec_setting macsec_setting;
> + struct rte_eth_fdir_conf fdir_conf;
> struct ixgbe_hw_fdir_info fdir;
> struct ixgbe_interrupt intr;
> struct ixgbe_stat_mapping_registers stat_mappings;
> @@ -523,7 +524,7 @@ int ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params);
> int ixgbe_vf_representor_uninit(struct rte_eth_dev *ethdev);
>
> #define IXGBE_DEV_FDIR_CONF(dev) \
> - (&(dev)->data->dev_conf.fdir_conf)
> + (&((struct ixgbe_adapter *)(dev)->data->dev_private)->fdir_conf)
>
> #define IXGBE_DEV_PRIVATE_TO_HW(adapter)\
> (&((struct ixgbe_adapter *)adapter)->hw)
> diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
> index c018bbc0f1..219e11ad09 100644
> --- a/drivers/net/ixgbe/ixgbe_flow.c
> +++ b/drivers/net/ixgbe/ixgbe_flow.c
> @@ -2758,7 +2758,7 @@ ixgbe_parse_fdir_filter(struct rte_eth_dev *dev,
> {
> int ret;
> struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> - enum rte_fdir_mode fdir_mode = IXGBE_DEV_FDIR_CONF(dev)->mode;
> + struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
>
> if (hw->mac.type != ixgbe_mac_82599EB &&
> hw->mac.type != ixgbe_mac_X540 &&
> @@ -2787,9 +2787,16 @@ ixgbe_parse_fdir_filter(struct rte_eth_dev *dev,
> rule->ixgbe_fdir.formatted.dst_port != 0))
> return -ENOTSUP;
>
> - if (fdir_mode == RTE_FDIR_MODE_NONE ||
> - fdir_mode != rule->mode)
> + if (fdir_conf->mode == RTE_FDIR_MODE_NONE) {
> + fdir_conf->mode = rule->mode;
> + ret = ixgbe_fdir_configure(dev);
> + if (ret) {
> + fdir_conf->mode = RTE_FDIR_MODE_NONE;
> + return ret;
> + }
> + } else if (fdir_conf->mode != rule->mode) {
> return -ENOTSUP;
> + }
>
> if (rule->queue >= dev->data->nb_rx_queues)
> return -ENOTSUP;
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
> index 3aca53fb98..290e562126 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -512,11 +512,6 @@ octeontx_dev_configure(struct rte_eth_dev *dev)
> return -EINVAL;
> }
>
> - if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
> - octeontx_log_err("flow director not supported");
> - return -EINVAL;
> - }
> -
> nic->num_tx_queues = dev->data->nb_tx_queues;
>
> if (!nic->reconfigure) {
> diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
> index ca3165d972..c5945451e8 100644
> --- a/drivers/net/qede/qede_filter.c
> +++ b/drivers/net/qede/qede_filter.c
> @@ -144,31 +144,9 @@ int qede_check_fdir_support(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_fdir_conf *fdir = ð_dev->data->dev_conf.fdir_conf;
>
> - /* check FDIR modes */
> - switch (fdir->mode) {
> - case RTE_FDIR_MODE_NONE:
> - qdev->arfs_info.arfs.mode = ECORE_FILTER_CONFIG_MODE_DISABLE;
> - DP_INFO(edev, "flowdir is disabled\n");
> - break;
> - case RTE_FDIR_MODE_PERFECT:
> - if (ECORE_IS_CMT(edev)) {
> - DP_ERR(edev, "flowdir is not supported in 100G mode\n");
> - qdev->arfs_info.arfs.mode =
> - ECORE_FILTER_CONFIG_MODE_DISABLE;
> - return -ENOTSUP;
> - }
> - qdev->arfs_info.arfs.mode =
> - ECORE_FILTER_CONFIG_MODE_5_TUPLE;
> - DP_INFO(edev, "flowdir is enabled (5 Tuple mode)\n");
> - break;
> - case RTE_FDIR_MODE_PERFECT_TUNNEL:
> - case RTE_FDIR_MODE_SIGNATURE:
> - case RTE_FDIR_MODE_PERFECT_MAC_VLAN:
> - DP_ERR(edev, "Unsupported flowdir mode %d\n", fdir->mode);
> - return -ENOTSUP;
> - }
> + qdev->arfs_info.arfs.mode = ECORE_FILTER_CONFIG_MODE_DISABLE;
> + DP_INFO(edev, "flowdir is disabled\n");
>
> return 0;
> }
> @@ -258,9 +236,6 @@ qede_config_arfs_filter(struct rte_eth_dev *eth_dev,
> if (add) {
> if (qdev->arfs_info.arfs.mode ==
> ECORE_FILTER_CONFIG_MODE_DISABLE) {
> - /* Force update */
> - eth_dev->data->dev_conf.fdir_conf.mode =
> - RTE_FDIR_MODE_PERFECT;
> qdev->arfs_info.arfs.mode =
> ECORE_FILTER_CONFIG_MODE_5_TUPLE;
> DP_INFO(edev, "Force enable flowdir in perfect mode\n");
> diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
> index 51726d229b..22753e3417 100644
> --- a/drivers/net/sfc/sfc.c
> +++ b/drivers/net/sfc/sfc.c
> @@ -176,11 +176,6 @@ sfc_check_conf(struct sfc_adapter *sa)
> rc = EINVAL;
> }
>
> - if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
> - sfc_err(sa, "Flow Director not supported");
> - rc = EINVAL;
> - }
> -
> if ((conf->intr_conf.lsc != 0) &&
> (sa->intr.type != EFX_INTR_LINE) &&
> (sa->intr.type != EFX_INTR_MESSAGE)) {
> diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c
> index d0e5385889..417d0073cb 100644
> --- a/drivers/net/sfc/sfc_repr.c
> +++ b/drivers/net/sfc/sfc_repr.c
> @@ -443,11 +443,6 @@ sfc_repr_check_conf(struct sfc_repr *sr, uint16_t nb_rx_queues,
> ret = -EINVAL;
> }
>
> - if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
> - sfcr_err(sr, "Flow Director not supported");
> - ret = -EINVAL;
> - }
> -
> if (conf->intr_conf.lsc != 0) {
> sfcr_err(sr, "link status change interrupt not supported");
> ret = -EINVAL;
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index 262c024560..dd7a6bf520 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -2013,11 +2013,6 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
> return -EINVAL;
> }
>
> - if (conf->fdir_conf.mode != RTE_FDIR_MODE_NONE) {
> - PMD_INIT_LOG(INFO, "Flow director not supported");
> - return -EINVAL;
> - }
> -
> assert_primary(nic);
> NICVF_STATIC_ASSERT(MAX_RCV_QUEUES_PER_QS == MAX_SND_QUEUES_PER_QS);
> cqcount = RTE_MAX(data->nb_tx_queues, data->nb_rx_queues);
> diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
> index e36a2c3d0d..e425ab443e 100644
> --- a/drivers/net/txgbe/txgbe_ethdev.h
> +++ b/drivers/net/txgbe/txgbe_ethdev.h
> @@ -346,6 +346,7 @@ struct txgbe_tm_conf {
> struct txgbe_adapter {
> struct txgbe_hw hw;
> struct txgbe_hw_stats stats;
> + struct rte_eth_fdir_conf fdir_conf;
> struct txgbe_hw_fdir_info fdir;
> struct txgbe_interrupt intr;
> struct txgbe_stat_mappings stat_mappings;
> @@ -373,7 +374,7 @@ struct txgbe_adapter {
> #define TXGBE_DEV_ADAPTER(dev) \
> ((struct txgbe_adapter *)(dev)->data->dev_private)
>
> -#define TXGBE_DEV_FDIR_CONF(dev) (&(dev)->data->dev_conf.fdir_conf)
> +#define TXGBE_DEV_FDIR_CONF(dev) (&TXGBE_DEV_ADAPTER(dev)->fdir_conf)
>
> #define TXGBE_DEV_HW(dev) \
> (&((struct txgbe_adapter *)(dev)->data->dev_private)->hw)
> diff --git a/drivers/net/txgbe/txgbe_flow.c b/drivers/net/txgbe/txgbe_flow.c
> index 26920f43d3..0b89e3fe38 100644
> --- a/drivers/net/txgbe/txgbe_flow.c
> +++ b/drivers/net/txgbe/txgbe_flow.c
> @@ -2439,7 +2439,7 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,
> {
> int ret;
> struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
> - enum rte_fdir_mode fdir_mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
> + struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
>
> ret = txgbe_parse_fdir_filter_normal(dev, attr, pattern,
> actions, rule, error);
> @@ -2458,9 +2458,16 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,
> (rule->input.src_port != 0 || rule->input.dst_port != 0))
> return -ENOTSUP;
>
> - if (fdir_mode == RTE_FDIR_MODE_NONE ||
> - fdir_mode != rule->mode)
> + if (fdir_conf->mode == RTE_FDIR_MODE_NONE) {
> + fdir_conf->mode = rule->mode;
> + ret = txgbe_fdir_configure(dev);
> + if (ret) {
> + fdir_conf->mode = RTE_FDIR_MODE_NONE;
> + return ret;
> + }
> + } else if (fdir_conf->mode != rule->mode) {
> return -ENOTSUP;
> + }
>
> if (rule->queue >= dev->data->nb_rx_queues)
> return -ENOTSUP;
> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
> index 5101868ea7..a0e0b2ae88 100644
> --- a/lib/ethdev/ethdev_driver.h
> +++ b/lib/ethdev/ethdev_driver.h
> @@ -1915,6 +1915,42 @@ struct rte_eth_tunnel_filter_conf {
> uint16_t queue_id; /**< Queue assigned to if match */
> };
>
> +/**
> + * Memory space that can be configured to store Flow Director filters
> + * in the board memory.
> + */
> +enum rte_eth_fdir_pballoc_type {
> + RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */
> + RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */
> + RTE_ETH_FDIR_PBALLOC_256K, /**< 256k. */
> +};
> +
> +/**
> + * Select report mode of FDIR hash information in Rx descriptors.
> + */
> +enum rte_fdir_status_mode {
> + RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
> + RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
> + RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
> +};
> +
> +/**
> + * A structure used to configure the Flow Director (FDIR) feature
> + * of an Ethernet port.
> + *
> + * If mode is RTE_FDIR_MODE_NONE, the pballoc value is ignored.
> + */
> +struct rte_eth_fdir_conf {
> + enum rte_fdir_mode mode; /**< Flow Director mode. */
> + enum rte_eth_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
> + enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
> + /** Rx queue of packets matching a "drop" filter in perfect mode. */
> + uint8_t drop_queue;
> + struct rte_eth_fdir_masks mask;
> + /** Flex payload configuration. */
> + struct rte_eth_fdir_flex_conf flex_conf;
> +};
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index de9e970d4d..53b4d91be2 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1492,48 +1492,6 @@ enum rte_eth_tunnel_type {
> /* Deprecated API file for rte_eth_dev_filter_* functions */
> #include "rte_eth_ctrl.h"
>
> -/**
> - * Memory space that can be configured to store Flow Director filters
> - * in the board memory.
> - */
> -enum rte_eth_fdir_pballoc_type {
> - RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */
> - RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */
> - RTE_ETH_FDIR_PBALLOC_256K, /**< 256k. */
> -};
> -#define rte_fdir_pballoc_type rte_eth_fdir_pballoc_type
> -
> -#define RTE_FDIR_PBALLOC_64K RTE_DEPRECATED(RTE_FDIR_PBALLOC_64K) RTE_ETH_FDIR_PBALLOC_64K
> -#define RTE_FDIR_PBALLOC_128K RTE_DEPRECATED(RTE_FDIR_PBALLOC_128K) RTE_ETH_FDIR_PBALLOC_128K
> -#define RTE_FDIR_PBALLOC_256K RTE_DEPRECATED(RTE_FDIR_PBALLOC_256K) RTE_ETH_FDIR_PBALLOC_256K
> -
> -/**
> - * Select report mode of FDIR hash information in Rx descriptors.
> - */
> -enum rte_fdir_status_mode {
> - RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
> - RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
> - RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
> -};
> -
> -/**
> - * A structure used to configure the Flow Director (FDIR) feature
> - * of an Ethernet port.
> - *
> - * If mode is RTE_FDIR_MODE_NONE, the pballoc value is ignored.
> - */
> -struct rte_eth_fdir_conf {
> - enum rte_fdir_mode mode; /**< Flow Director mode. */
> - enum rte_eth_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
> - enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
> - /** Rx queue of packets matching a "drop" filter in perfect mode. */
> - uint8_t drop_queue;
> - struct rte_eth_fdir_masks mask;
> - /** Flex payload configuration. */
> - struct rte_eth_fdir_flex_conf flex_conf;
> -};
> -#define rte_fdir_conf rte_eth_fdir_conf
> -
> /**
> * UDP tunneling configuration.
> *
> @@ -1602,7 +1560,6 @@ struct rte_eth_conf {
> /** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
> is needed,and the variable must be set RTE_ETH_DCB_PFC_SUPPORT. */
> uint32_t dcb_capability_en;
> - struct rte_eth_fdir_conf fdir_conf; /**< FDIR configuration. DEPRECATED */
> struct rte_eth_intr_conf intr_conf; /**< Interrupt mode configuration. */
> };
>
>
^ permalink raw reply [relevance 0%]
* [PATCH 02/10] ethdev: remove deprecated Rx and Tx multi-queue mode defines
2022-08-04 19:05 4% ` [PATCH 01/10] ethdev: remove deprecated link speed and duplex defines Andrew Rybchenko
@ 2022-08-04 19:05 4% ` Andrew Rybchenko
2022-08-04 19:05 3% ` [PATCH 03/10] ethdev: remove deprecated defines for RSS configuration Andrew Rybchenko
` (7 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``ETH_MQ_RX_*`` and ``ETH_MQ_TX_*`` defines.
Use corresponding defines with ``RTE_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_ethdev.h | 18 ------------------
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index e5f9115c50..a1dcfc7e2b 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -88,6 +88,9 @@ API Changes
``ETH_LINK_*`` (duplex-related) defines. Use corresponding defines
with ``RTE_`` prefix instead.
+* ethdev: Removed deprecated ``ETH_MQ_RX_*`` and ``ETH_MQ_TX_*`` defines.
+ Use corresponding defines with ``RTE_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 0acaac0762..44ca2e6ad4 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -366,10 +366,6 @@ struct rte_eth_thresh {
#define RTE_ETH_MQ_RX_VMDQ_FLAG RTE_BIT32(2) /**< Enable VMDq. */
/**@}*/
-#define ETH_MQ_RX_RSS_FLAG RTE_DEPRECATED(ETH_MQ_RX_RSS_FLAG) RTE_ETH_MQ_RX_RSS_FLAG
-#define ETH_MQ_RX_DCB_FLAG RTE_DEPRECATED(ETH_MQ_RX_DCB_FLAG) RTE_ETH_MQ_RX_DCB_FLAG
-#define ETH_MQ_RX_VMDQ_FLAG RTE_DEPRECATED(ETH_MQ_RX_VMDQ_FLAG) RTE_ETH_MQ_RX_VMDQ_FLAG
-
/**
* A set of values to identify what method is to be used to route
* packets to multiple queues.
@@ -396,15 +392,6 @@ enum rte_eth_rx_mq_mode {
RTE_ETH_MQ_RX_VMDQ_FLAG,
};
-#define ETH_MQ_RX_NONE RTE_DEPRECATED(ETH_MQ_RX_NONE) RTE_ETH_MQ_RX_NONE
-#define ETH_MQ_RX_RSS RTE_DEPRECATED(ETH_MQ_RX_RSS) RTE_ETH_MQ_RX_RSS
-#define ETH_MQ_RX_DCB RTE_DEPRECATED(ETH_MQ_RX_DCB) RTE_ETH_MQ_RX_DCB
-#define ETH_MQ_RX_DCB_RSS RTE_DEPRECATED(ETH_MQ_RX_DCB_RSS) RTE_ETH_MQ_RX_DCB_RSS
-#define ETH_MQ_RX_VMDQ_ONLY RTE_DEPRECATED(ETH_MQ_RX_VMDQ_ONLY) RTE_ETH_MQ_RX_VMDQ_ONLY
-#define ETH_MQ_RX_VMDQ_RSS RTE_DEPRECATED(ETH_MQ_RX_VMDQ_RSS) RTE_ETH_MQ_RX_VMDQ_RSS
-#define ETH_MQ_RX_VMDQ_DCB RTE_DEPRECATED(ETH_MQ_RX_VMDQ_DCB) RTE_ETH_MQ_RX_VMDQ_DCB
-#define ETH_MQ_RX_VMDQ_DCB_RSS RTE_DEPRECATED(ETH_MQ_RX_VMDQ_DCB_RSS) RTE_ETH_MQ_RX_VMDQ_DCB_RSS
-
/**
* A set of values to identify what method is to be used to transmit
* packets using multi-TCs.
@@ -416,11 +403,6 @@ enum rte_eth_tx_mq_mode {
RTE_ETH_MQ_TX_VMDQ_ONLY, /**< Only VT on, no DCB */
};
-#define ETH_MQ_TX_NONE RTE_DEPRECATED(ETH_MQ_TX_NONE) RTE_ETH_MQ_TX_NONE
-#define ETH_MQ_TX_DCB RTE_DEPRECATED(ETH_MQ_TX_DCB) RTE_ETH_MQ_TX_DCB
-#define ETH_MQ_TX_VMDQ_DCB RTE_DEPRECATED(ETH_MQ_TX_VMDQ_DCB) RTE_ETH_MQ_TX_VMDQ_DCB
-#define ETH_MQ_TX_VMDQ_ONLY RTE_DEPRECATED(ETH_MQ_TX_VMDQ_ONLY) RTE_ETH_MQ_TX_VMDQ_ONLY
-
/**
* A structure used to configure the Rx features of an Ethernet port.
*/
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 01/10] ethdev: remove deprecated link speed and duplex defines
@ 2022-08-04 19:05 4% ` Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 02/10] ethdev: remove deprecated Rx and Tx multi-queue mode defines Andrew Rybchenko
` (8 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``ETH_LINK_SPEED_``, ``ETH_SPEED_NUM_`` and
``ETH_LINK_`` defines. Use corresponding defines with ``RTE_`` prefix
instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 4 +++
lib/ethdev/rte_ethdev.h | 41 --------------------------
2 files changed, 4 insertions(+), 41 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..e5f9115c50 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,10 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* ethdev: Removed deprecated ``ETH_LINK_SPEED_*``, ``ETH_SPEED_NUM_*`` and
+ ``ETH_LINK_*`` (duplex-related) defines. Use corresponding defines
+ with ``RTE_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d..0acaac0762 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -305,24 +305,6 @@ struct rte_eth_stats {
#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15) /**< 200 Gbps */
/**@}*/
-#define ETH_LINK_SPEED_AUTONEG RTE_DEPRECATED(ETH_LINK_SPEED_AUTONEG) RTE_ETH_LINK_SPEED_AUTONEG
-#define ETH_LINK_SPEED_FIXED RTE_DEPRECATED(ETH_LINK_SPEED_FIXED) RTE_ETH_LINK_SPEED_FIXED
-#define ETH_LINK_SPEED_10M_HD RTE_DEPRECATED(ETH_LINK_SPEED_10M_HD) RTE_ETH_LINK_SPEED_10M_HD
-#define ETH_LINK_SPEED_10M RTE_DEPRECATED(ETH_LINK_SPEED_10M) RTE_ETH_LINK_SPEED_10M
-#define ETH_LINK_SPEED_100M_HD RTE_DEPRECATED(ETH_LINK_SPEED_100M_HD) RTE_ETH_LINK_SPEED_100M_HD
-#define ETH_LINK_SPEED_100M RTE_DEPRECATED(ETH_LINK_SPEED_100M) RTE_ETH_LINK_SPEED_100M
-#define ETH_LINK_SPEED_1G RTE_DEPRECATED(ETH_LINK_SPEED_1G) RTE_ETH_LINK_SPEED_1G
-#define ETH_LINK_SPEED_2_5G RTE_DEPRECATED(ETH_LINK_SPEED_2_5G) RTE_ETH_LINK_SPEED_2_5G
-#define ETH_LINK_SPEED_5G RTE_DEPRECATED(ETH_LINK_SPEED_5G) RTE_ETH_LINK_SPEED_5G
-#define ETH_LINK_SPEED_10G RTE_DEPRECATED(ETH_LINK_SPEED_10G) RTE_ETH_LINK_SPEED_10G
-#define ETH_LINK_SPEED_20G RTE_DEPRECATED(ETH_LINK_SPEED_20G) RTE_ETH_LINK_SPEED_20G
-#define ETH_LINK_SPEED_25G RTE_DEPRECATED(ETH_LINK_SPEED_25G) RTE_ETH_LINK_SPEED_25G
-#define ETH_LINK_SPEED_40G RTE_DEPRECATED(ETH_LINK_SPEED_40G) RTE_ETH_LINK_SPEED_40G
-#define ETH_LINK_SPEED_50G RTE_DEPRECATED(ETH_LINK_SPEED_50G) RTE_ETH_LINK_SPEED_50G
-#define ETH_LINK_SPEED_56G RTE_DEPRECATED(ETH_LINK_SPEED_56G) RTE_ETH_LINK_SPEED_56G
-#define ETH_LINK_SPEED_100G RTE_DEPRECATED(ETH_LINK_SPEED_100G) RTE_ETH_LINK_SPEED_100G
-#define ETH_LINK_SPEED_200G RTE_DEPRECATED(ETH_LINK_SPEED_200G) RTE_ETH_LINK_SPEED_200G
-
/**@{@name Link speed
* Ethernet numeric link speeds in Mbps
*/
@@ -343,22 +325,6 @@ struct rte_eth_stats {
#define RTE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX /**< Unknown */
/**@}*/
-#define ETH_SPEED_NUM_NONE RTE_DEPRECATED(ETH_SPEED_NUM_NONE) RTE_ETH_SPEED_NUM_NONE
-#define ETH_SPEED_NUM_10M RTE_DEPRECATED(ETH_SPEED_NUM_10M) RTE_ETH_SPEED_NUM_10M
-#define ETH_SPEED_NUM_100M RTE_DEPRECATED(ETH_SPEED_NUM_100M) RTE_ETH_SPEED_NUM_100M
-#define ETH_SPEED_NUM_1G RTE_DEPRECATED(ETH_SPEED_NUM_1G) RTE_ETH_SPEED_NUM_1G
-#define ETH_SPEED_NUM_2_5G RTE_DEPRECATED(ETH_SPEED_NUM_2_5G) RTE_ETH_SPEED_NUM_2_5G
-#define ETH_SPEED_NUM_5G RTE_DEPRECATED(ETH_SPEED_NUM_5G) RTE_ETH_SPEED_NUM_5G
-#define ETH_SPEED_NUM_10G RTE_DEPRECATED(ETH_SPEED_NUM_10G) RTE_ETH_SPEED_NUM_10G
-#define ETH_SPEED_NUM_20G RTE_DEPRECATED(ETH_SPEED_NUM_20G) RTE_ETH_SPEED_NUM_20G
-#define ETH_SPEED_NUM_25G RTE_DEPRECATED(ETH_SPEED_NUM_25G) RTE_ETH_SPEED_NUM_25G
-#define ETH_SPEED_NUM_40G RTE_DEPRECATED(ETH_SPEED_NUM_40G) RTE_ETH_SPEED_NUM_40G
-#define ETH_SPEED_NUM_50G RTE_DEPRECATED(ETH_SPEED_NUM_50G) RTE_ETH_SPEED_NUM_50G
-#define ETH_SPEED_NUM_56G RTE_DEPRECATED(ETH_SPEED_NUM_56G) RTE_ETH_SPEED_NUM_56G
-#define ETH_SPEED_NUM_100G RTE_DEPRECATED(ETH_SPEED_NUM_100G) RTE_ETH_SPEED_NUM_100G
-#define ETH_SPEED_NUM_200G RTE_DEPRECATED(ETH_SPEED_NUM_200G) RTE_ETH_SPEED_NUM_200G
-#define ETH_SPEED_NUM_UNKNOWN RTE_DEPRECATED(ETH_SPEED_NUM_UNKNOWN) RTE_ETH_SPEED_NUM_UNKNOWN
-
/**
* A structure used to retrieve link-level information of an Ethernet port.
*/
@@ -382,13 +348,6 @@ struct rte_eth_link {
#define RTE_ETH_LINK_MAX_STR_LEN 40 /**< Max length of default link string. */
/**@}*/
-#define ETH_LINK_HALF_DUPLEX RTE_DEPRECATED(ETH_LINK_HALF_DUPLEX) RTE_ETH_LINK_HALF_DUPLEX
-#define ETH_LINK_FULL_DUPLEX RTE_DEPRECATED(ETH_LINK_FULL_DUPLEX) RTE_ETH_LINK_FULL_DUPLEX
-#define ETH_LINK_DOWN RTE_DEPRECATED(ETH_LINK_DOWN) RTE_ETH_LINK_DOWN
-#define ETH_LINK_UP RTE_DEPRECATED(ETH_LINK_UP) RTE_ETH_LINK_UP
-#define ETH_LINK_FIXED RTE_DEPRECATED(ETH_LINK_FIXED) RTE_ETH_LINK_FIXED
-#define ETH_LINK_AUTONEG RTE_DEPRECATED(ETH_LINK_AUTONEG) RTE_ETH_LINK_AUTONEG
-
/**
* A structure used to configure the ring threshold registers of an Rx/Tx
* queue for an Ethernet port.
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 04/10] ethdev: remove deprecated Rx and Tx offload defines
` (2 preceding siblings ...)
2022-08-04 19:05 3% ` [PATCH 03/10] ethdev: remove deprecated defines for RSS configuration Andrew Rybchenko
@ 2022-08-04 19:05 4% ` Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 05/10] ethdev: remove deprecated DCB and VMDq defines Andrew Rybchenko
` (5 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``DEV_RX_OFFLOAD_*`` and ``DEV_TX_OFFLOAD_`` defines.
Use corresponding defines with ``RTE_ETH_RX_OFFLOAD_`` and
``RTE_ETH_TX_OFFLOAD_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 4 +++
lib/ethdev/rte_ethdev.h | 44 --------------------------
2 files changed, 4 insertions(+), 44 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index c9fa16ceb2..0bed31cbaa 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -95,6 +95,10 @@ API Changes
RETA size specification. Use corresponding defines with ``RTE_`` prefix
instead.
+* ethdev: Removed deprecated ``DEV_RX_OFFLOAD_*`` and ``DEV_TX_OFFLOAD_``
+ defines. Use corresponding defines with ``RTE_ETH_RX_OFFLOAD_`` and
+ ``RTE_ETH_TX_OFFLOAD_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index b27cc744be..3552535780 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1491,34 +1491,13 @@ struct rte_eth_conf {
#define RTE_ETH_RX_OFFLOAD_RSS_HASH RTE_BIT64(19)
#define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT RTE_BIT64(20)
-#define DEV_RX_OFFLOAD_VLAN_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_STRIP) RTE_ETH_RX_OFFLOAD_VLAN_STRIP
-#define DEV_RX_OFFLOAD_IPV4_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_IPV4_CKSUM) RTE_ETH_RX_OFFLOAD_IPV4_CKSUM
-#define DEV_RX_OFFLOAD_UDP_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_UDP_CKSUM) RTE_ETH_RX_OFFLOAD_UDP_CKSUM
-#define DEV_RX_OFFLOAD_TCP_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_TCP_CKSUM) RTE_ETH_RX_OFFLOAD_TCP_CKSUM
-#define DEV_RX_OFFLOAD_TCP_LRO RTE_DEPRECATED(DEV_RX_OFFLOAD_TCP_LRO) RTE_ETH_RX_OFFLOAD_TCP_LRO
-#define DEV_RX_OFFLOAD_QINQ_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_QINQ_STRIP) RTE_ETH_RX_OFFLOAD_QINQ_STRIP
-#define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM
-#define DEV_RX_OFFLOAD_MACSEC_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_MACSEC_STRIP) RTE_ETH_RX_OFFLOAD_MACSEC_STRIP
-#define DEV_RX_OFFLOAD_HEADER_SPLIT RTE_DEPRECATED(DEV_RX_OFFLOAD_HEADER_SPLIT) RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
-#define DEV_RX_OFFLOAD_VLAN_FILTER RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_FILTER) RTE_ETH_RX_OFFLOAD_VLAN_FILTER
-#define DEV_RX_OFFLOAD_VLAN_EXTEND RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_EXTEND) RTE_ETH_RX_OFFLOAD_VLAN_EXTEND
-#define DEV_RX_OFFLOAD_SCATTER RTE_DEPRECATED(DEV_RX_OFFLOAD_SCATTER) RTE_ETH_RX_OFFLOAD_SCATTER
-#define DEV_RX_OFFLOAD_TIMESTAMP RTE_DEPRECATED(DEV_RX_OFFLOAD_TIMESTAMP) RTE_ETH_RX_OFFLOAD_TIMESTAMP
-#define DEV_RX_OFFLOAD_SECURITY RTE_DEPRECATED(DEV_RX_OFFLOAD_SECURITY) RTE_ETH_RX_OFFLOAD_SECURITY
-#define DEV_RX_OFFLOAD_KEEP_CRC RTE_DEPRECATED(DEV_RX_OFFLOAD_KEEP_CRC) RTE_ETH_RX_OFFLOAD_KEEP_CRC
-#define DEV_RX_OFFLOAD_SCTP_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_SCTP_CKSUM) RTE_ETH_RX_OFFLOAD_SCTP_CKSUM
-#define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_OUTER_UDP_CKSUM) RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM
-#define DEV_RX_OFFLOAD_RSS_HASH RTE_DEPRECATED(DEV_RX_OFFLOAD_RSS_HASH) RTE_ETH_RX_OFFLOAD_RSS_HASH
-
#define RTE_ETH_RX_OFFLOAD_CHECKSUM (RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
RTE_ETH_RX_OFFLOAD_TCP_CKSUM)
-#define DEV_RX_OFFLOAD_CHECKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_CHECKSUM) RTE_ETH_RX_OFFLOAD_CHECKSUM
#define RTE_ETH_RX_OFFLOAD_VLAN (RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
-#define DEV_RX_OFFLOAD_VLAN RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN) RTE_ETH_RX_OFFLOAD_VLAN
/*
* If new Rx offload capabilities are defined, they also must be
@@ -1581,29 +1560,6 @@ struct rte_eth_conf {
* mentioned in rte_tx_offload_names in rte_ethdev.c file.
*/
-#define DEV_TX_OFFLOAD_VLAN_INSERT RTE_DEPRECATED(DEV_TX_OFFLOAD_VLAN_INSERT) RTE_ETH_TX_OFFLOAD_VLAN_INSERT
-#define DEV_TX_OFFLOAD_IPV4_CKSUM RTE_DEPRECATED(DEV_TX_OFFLOAD_IPV4_CKSUM) RTE_ETH_TX_OFFLOAD_IPV4_CKSUM
-#define DEV_TX_OFFLOAD_UDP_CKSUM RTE_DEPRECATED(DEV_TX_OFFLOAD_UDP_CKSUM) RTE_ETH_TX_OFFLOAD_UDP_CKSUM
-#define DEV_TX_OFFLOAD_TCP_CKSUM RTE_DEPRECATED(DEV_TX_OFFLOAD_TCP_CKSUM) RTE_ETH_TX_OFFLOAD_TCP_CKSUM
-#define DEV_TX_OFFLOAD_SCTP_CKSUM RTE_DEPRECATED(DEV_TX_OFFLOAD_SCTP_CKSUM) RTE_ETH_TX_OFFLOAD_SCTP_CKSUM
-#define DEV_TX_OFFLOAD_TCP_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_TCP_TSO) RTE_ETH_TX_OFFLOAD_TCP_TSO
-#define DEV_TX_OFFLOAD_UDP_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_UDP_TSO) RTE_ETH_TX_OFFLOAD_UDP_TSO
-#define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM RTE_DEPRECATED(DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM
-#define DEV_TX_OFFLOAD_QINQ_INSERT RTE_DEPRECATED(DEV_TX_OFFLOAD_QINQ_INSERT) RTE_ETH_TX_OFFLOAD_QINQ_INSERT
-#define DEV_TX_OFFLOAD_VXLAN_TNL_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_VXLAN_TNL_TSO) RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO
-#define DEV_TX_OFFLOAD_GRE_TNL_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_GRE_TNL_TSO) RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO
-#define DEV_TX_OFFLOAD_IPIP_TNL_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_IPIP_TNL_TSO) RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO
-#define DEV_TX_OFFLOAD_GENEVE_TNL_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_GENEVE_TNL_TSO) RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO
-#define DEV_TX_OFFLOAD_MACSEC_INSERT RTE_DEPRECATED(DEV_TX_OFFLOAD_MACSEC_INSERT) RTE_ETH_TX_OFFLOAD_MACSEC_INSERT
-#define DEV_TX_OFFLOAD_MT_LOCKFREE RTE_DEPRECATED(DEV_TX_OFFLOAD_MT_LOCKFREE) RTE_ETH_TX_OFFLOAD_MT_LOCKFREE
-#define DEV_TX_OFFLOAD_MULTI_SEGS RTE_DEPRECATED(DEV_TX_OFFLOAD_MULTI_SEGS) RTE_ETH_TX_OFFLOAD_MULTI_SEGS
-#define DEV_TX_OFFLOAD_MBUF_FAST_FREE RTE_DEPRECATED(DEV_TX_OFFLOAD_MBUF_FAST_FREE) RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE
-#define DEV_TX_OFFLOAD_SECURITY RTE_DEPRECATED(DEV_TX_OFFLOAD_SECURITY) RTE_ETH_TX_OFFLOAD_SECURITY
-#define DEV_TX_OFFLOAD_UDP_TNL_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_UDP_TNL_TSO) RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO
-#define DEV_TX_OFFLOAD_IP_TNL_TSO RTE_DEPRECATED(DEV_TX_OFFLOAD_IP_TNL_TSO) RTE_ETH_TX_OFFLOAD_IP_TNL_TSO
-#define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM RTE_DEPRECATED(DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM
-#define DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP RTE_DEPRECATED(DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP
-
/**@{@name Device capabilities
* Non-offload capabilities reported in rte_eth_dev_info.dev_capa.
*/
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 03/10] ethdev: remove deprecated defines for RSS configuration
2022-08-04 19:05 4% ` [PATCH 01/10] ethdev: remove deprecated link speed and duplex defines Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 02/10] ethdev: remove deprecated Rx and Tx multi-queue mode defines Andrew Rybchenko
@ 2022-08-04 19:05 3% ` Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 04/10] ethdev: remove deprecated Rx and Tx offload defines Andrew Rybchenko
` (6 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``ETH_RSS_*`` defines used for hash function and RETA
size specification. Use corresponding defines with ``RTE_`` prefix
instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 4 ++
lib/ethdev/rte_ethdev.h | 84 --------------------------
2 files changed, 4 insertions(+), 84 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index a1dcfc7e2b..c9fa16ceb2 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -91,6 +91,10 @@ API Changes
* ethdev: Removed deprecated ``ETH_MQ_RX_*`` and ``ETH_MQ_TX_*`` defines.
Use corresponding defines with ``RTE_`` prefix instead.
+* ethdev: Removed deprecated ``ETH_RSS_*`` defines for hash function and
+ RETA size specification. Use corresponding defines with ``RTE_`` prefix
+ instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 44ca2e6ad4..b27cc744be 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -543,39 +543,6 @@ struct rte_eth_rss_conf {
#define RTE_ETH_RSS_MPLS RTE_BIT64(33)
#define RTE_ETH_RSS_IPV4_CHKSUM RTE_BIT64(34)
-#define ETH_RSS_IPV4 RTE_DEPRECATED(ETH_RSS_IPV4) RTE_ETH_RSS_IPV4
-#define ETH_RSS_FRAG_IPV4 RTE_DEPRECATED(ETH_RSS_FRAG_IPV4) RTE_ETH_RSS_FRAG_IPV4
-#define ETH_RSS_NONFRAG_IPV4_TCP RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV4_TCP) RTE_ETH_RSS_NONFRAG_IPV4_TCP
-#define ETH_RSS_NONFRAG_IPV4_UDP RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV4_UDP) RTE_ETH_RSS_NONFRAG_IPV4_UDP
-#define ETH_RSS_NONFRAG_IPV4_SCTP RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV4_SCTP) RTE_ETH_RSS_NONFRAG_IPV4_SCTP
-#define ETH_RSS_NONFRAG_IPV4_OTHER RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV4_OTHER) RTE_ETH_RSS_NONFRAG_IPV4_OTHER
-#define ETH_RSS_IPV6 RTE_DEPRECATED(ETH_RSS_IPV6) RTE_ETH_RSS_IPV6
-#define ETH_RSS_FRAG_IPV6 RTE_DEPRECATED(ETH_RSS_FRAG_IPV6) RTE_ETH_RSS_FRAG_IPV6
-#define ETH_RSS_NONFRAG_IPV6_TCP RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV6_TCP) RTE_ETH_RSS_NONFRAG_IPV6_TCP
-#define ETH_RSS_NONFRAG_IPV6_UDP RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV6_UDP) RTE_ETH_RSS_NONFRAG_IPV6_UDP
-#define ETH_RSS_NONFRAG_IPV6_SCTP RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV6_SCTP) RTE_ETH_RSS_NONFRAG_IPV6_SCTP
-#define ETH_RSS_NONFRAG_IPV6_OTHER RTE_DEPRECATED(ETH_RSS_NONFRAG_IPV6_OTHER) RTE_ETH_RSS_NONFRAG_IPV6_OTHER
-#define ETH_RSS_L2_PAYLOAD RTE_DEPRECATED(ETH_RSS_L2_PAYLOAD) RTE_ETH_RSS_L2_PAYLOAD
-#define ETH_RSS_IPV6_EX RTE_DEPRECATED(ETH_RSS_IPV6_EX) RTE_ETH_RSS_IPV6_EX
-#define ETH_RSS_IPV6_TCP_EX RTE_DEPRECATED(ETH_RSS_IPV6_TCP_EX) RTE_ETH_RSS_IPV6_TCP_EX
-#define ETH_RSS_IPV6_UDP_EX RTE_DEPRECATED(ETH_RSS_IPV6_UDP_EX) RTE_ETH_RSS_IPV6_UDP_EX
-#define ETH_RSS_PORT RTE_DEPRECATED(ETH_RSS_PORT) RTE_ETH_RSS_PORT
-#define ETH_RSS_VXLAN RTE_DEPRECATED(ETH_RSS_VXLAN) RTE_ETH_RSS_VXLAN
-#define ETH_RSS_GENEVE RTE_DEPRECATED(ETH_RSS_GENEVE) RTE_ETH_RSS_GENEVE
-#define ETH_RSS_NVGRE RTE_DEPRECATED(ETH_RSS_NVGRE) RTE_ETH_RSS_NVGRE
-#define ETH_RSS_GTPU RTE_DEPRECATED(ETH_RSS_GTPU) RTE_ETH_RSS_GTPU
-#define ETH_RSS_ETH RTE_DEPRECATED(ETH_RSS_ETH) RTE_ETH_RSS_ETH
-#define ETH_RSS_S_VLAN RTE_DEPRECATED(ETH_RSS_S_VLAN) RTE_ETH_RSS_S_VLAN
-#define ETH_RSS_C_VLAN RTE_DEPRECATED(ETH_RSS_C_VLAN) RTE_ETH_RSS_C_VLAN
-#define ETH_RSS_ESP RTE_DEPRECATED(ETH_RSS_ESP) RTE_ETH_RSS_ESP
-#define ETH_RSS_AH RTE_DEPRECATED(ETH_RSS_AH) RTE_ETH_RSS_AH
-#define ETH_RSS_L2TPV3 RTE_DEPRECATED(ETH_RSS_L2TPV3) RTE_ETH_RSS_L2TPV3
-#define ETH_RSS_PFCP RTE_DEPRECATED(ETH_RSS_PFCP) RTE_ETH_RSS_PFCP
-#define ETH_RSS_PPPOE RTE_DEPRECATED(ETH_RSS_PPPOE) RTE_ETH_RSS_PPPOE
-#define ETH_RSS_ECPRI RTE_DEPRECATED(ETH_RSS_ECPRI) RTE_ETH_RSS_ECPRI
-#define ETH_RSS_MPLS RTE_DEPRECATED(ETH_RSS_MPLS) RTE_ETH_RSS_MPLS
-#define ETH_RSS_IPV4_CHKSUM RTE_DEPRECATED(ETH_RSS_IPV4_CHKSUM) RTE_ETH_RSS_IPV4_CHKSUM
-
/**
* The ETH_RSS_L4_CHKSUM works on checksum field of any L4 header.
* It is similar to ETH_RSS_PORT that they don't specify the specific type of
@@ -589,7 +556,6 @@ struct rte_eth_rss_conf {
* it takes the reserved value 0 as input for the hash function.
*/
#define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35)
-#define ETH_RSS_L4_CHKSUM RTE_DEPRECATED(ETH_RSS_L4_CHKSUM) RTE_ETH_RSS_L4_CHKSUM
#define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36)
@@ -609,13 +575,6 @@ struct rte_eth_rss_conf {
#define RTE_ETH_RSS_L2_SRC_ONLY RTE_BIT64(59)
#define RTE_ETH_RSS_L2_DST_ONLY RTE_BIT64(58)
-#define ETH_RSS_L3_SRC_ONLY RTE_DEPRECATED(ETH_RSS_L3_SRC_ONLY) RTE_ETH_RSS_L3_SRC_ONLY
-#define ETH_RSS_L3_DST_ONLY RTE_DEPRECATED(ETH_RSS_L3_DST_ONLY) RTE_ETH_RSS_L3_DST_ONLY
-#define ETH_RSS_L4_SRC_ONLY RTE_DEPRECATED(ETH_RSS_L4_SRC_ONLY) RTE_ETH_RSS_L4_SRC_ONLY
-#define ETH_RSS_L4_DST_ONLY RTE_DEPRECATED(ETH_RSS_L4_DST_ONLY) RTE_ETH_RSS_L4_DST_ONLY
-#define ETH_RSS_L2_SRC_ONLY RTE_DEPRECATED(ETH_RSS_L2_SRC_ONLY) RTE_ETH_RSS_L2_SRC_ONLY
-#define ETH_RSS_L2_DST_ONLY RTE_DEPRECATED(ETH_RSS_L2_DST_ONLY) RTE_ETH_RSS_L2_DST_ONLY
-
/*
* Only select IPV6 address prefix as RSS input set according to
* https://tools.ietf.org/html/rfc6052
@@ -643,14 +602,12 @@ struct rte_eth_rss_conf {
* can be performed on according to PMD and device capabilities.
*/
#define RTE_ETH_RSS_LEVEL_PMD_DEFAULT (UINT64_C(0) << 50)
-#define ETH_RSS_LEVEL_PMD_DEFAULT RTE_DEPRECATED(ETH_RSS_LEVEL_PMD_DEFAULT) RTE_ETH_RSS_LEVEL_PMD_DEFAULT
/**
* level 1, requests RSS to be performed on the outermost packet
* encapsulation level.
*/
#define RTE_ETH_RSS_LEVEL_OUTERMOST (UINT64_C(1) << 50)
-#define ETH_RSS_LEVEL_OUTERMOST RTE_DEPRECATED(ETH_RSS_LEVEL_OUTERMOST) RTE_ETH_RSS_LEVEL_OUTERMOST
/**
* level 2, requests RSS to be performed on the specified inner packet
@@ -659,11 +616,7 @@ struct rte_eth_rss_conf {
#define RTE_ETH_RSS_LEVEL_INNERMOST (UINT64_C(2) << 50)
#define RTE_ETH_RSS_LEVEL_MASK (UINT64_C(3) << 50)
-#define ETH_RSS_LEVEL_INNERMOST RTE_DEPRECATED(ETH_RSS_LEVEL_INNERMOST) RTE_ETH_RSS_LEVEL_INNERMOST
-#define ETH_RSS_LEVEL_MASK RTE_DEPRECATED(ETH_RSS_LEVEL_MASK) RTE_ETH_RSS_LEVEL_MASK
-
#define RTE_ETH_RSS_LEVEL(rss_hf) ((rss_hf & RTE_ETH_RSS_LEVEL_MASK) >> 50)
-#define ETH_RSS_LEVEL(rss_hf) RTE_DEPRECATED(ETH_RSS_LEVEL(rss_hf)) RTE_ETH_RSS_LEVEL(rss_hf)
/**
* For input set change of hash filter, if SRC_ONLY and DST_ONLY of
@@ -690,122 +643,98 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
#define RTE_ETH_RSS_IPV6_PRE32 ( \
RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_L3_PRE32)
-#define ETH_RSS_IPV6_PRE32 RTE_DEPRECATED(ETH_RSS_IPV6_PRE32) RTE_ETH_RSS_IPV6_PRE32
#define RTE_ETH_RSS_IPV6_PRE40 ( \
RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_L3_PRE40)
-#define ETH_RSS_IPV6_PRE40 RTE_DEPRECATED(ETH_RSS_IPV6_PRE40) RTE_ETH_RSS_IPV6_PRE40
#define RTE_ETH_RSS_IPV6_PRE48 ( \
RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_L3_PRE48)
-#define ETH_RSS_IPV6_PRE48 RTE_DEPRECATED(ETH_RSS_IPV6_PRE48) RTE_ETH_RSS_IPV6_PRE48
#define RTE_ETH_RSS_IPV6_PRE56 ( \
RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_L3_PRE56)
-#define ETH_RSS_IPV6_PRE56 RTE_DEPRECATED(ETH_RSS_IPV6_PRE56) RTE_ETH_RSS_IPV6_PRE56
#define RTE_ETH_RSS_IPV6_PRE64 ( \
RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_L3_PRE64)
-#define ETH_RSS_IPV6_PRE64 RTE_DEPRECATED(ETH_RSS_IPV6_PRE64) RTE_ETH_RSS_IPV6_PRE64
#define RTE_ETH_RSS_IPV6_PRE96 ( \
RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_L3_PRE96)
-#define ETH_RSS_IPV6_PRE96 RTE_DEPRECATED(ETH_RSS_IPV6_PRE96) RTE_ETH_RSS_IPV6_PRE96
#define RTE_ETH_RSS_IPV6_PRE32_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_L3_PRE32)
-#define ETH_RSS_IPV6_PRE32_UDP RTE_DEPRECATED(ETH_RSS_IPV6_PRE32_UDP) RTE_ETH_RSS_IPV6_PRE32_UDP
#define RTE_ETH_RSS_IPV6_PRE40_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_L3_PRE40)
-#define ETH_RSS_IPV6_PRE40_UDP RTE_DEPRECATED(ETH_RSS_IPV6_PRE40_UDP) RTE_ETH_RSS_IPV6_PRE40_UDP
#define RTE_ETH_RSS_IPV6_PRE48_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_L3_PRE48)
-#define ETH_RSS_IPV6_PRE48_UDP RTE_DEPRECATED(ETH_RSS_IPV6_PRE48_UDP) RTE_ETH_RSS_IPV6_PRE48_UDP
#define RTE_ETH_RSS_IPV6_PRE56_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_L3_PRE56)
-#define ETH_RSS_IPV6_PRE56_UDP RTE_DEPRECATED(ETH_RSS_IPV6_PRE56_UDP) RTE_ETH_RSS_IPV6_PRE56_UDP
#define RTE_ETH_RSS_IPV6_PRE64_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_L3_PRE64)
-#define ETH_RSS_IPV6_PRE64_UDP RTE_DEPRECATED(ETH_RSS_IPV6_PRE64_UDP) RTE_ETH_RSS_IPV6_PRE64_UDP
#define RTE_ETH_RSS_IPV6_PRE96_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_L3_PRE96)
-#define ETH_RSS_IPV6_PRE96_UDP RTE_DEPRECATED(ETH_RSS_IPV6_PRE96_UDP) RTE_ETH_RSS_IPV6_PRE96_UDP
#define RTE_ETH_RSS_IPV6_PRE32_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_L3_PRE32)
-#define ETH_RSS_IPV6_PRE32_TCP RTE_DEPRECATED(ETH_RSS_IPV6_PRE32_TCP) RTE_ETH_RSS_IPV6_PRE32_TCP
#define RTE_ETH_RSS_IPV6_PRE40_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_L3_PRE40)
-#define ETH_RSS_IPV6_PRE40_TCP RTE_DEPRECATED(ETH_RSS_IPV6_PRE40_TCP) RTE_ETH_RSS_IPV6_PRE40_TCP
#define RTE_ETH_RSS_IPV6_PRE48_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_L3_PRE48)
-#define ETH_RSS_IPV6_PRE48_TCP RTE_DEPRECATED(ETH_RSS_IPV6_PRE48_TCP) RTE_ETH_RSS_IPV6_PRE48_TCP
#define RTE_ETH_RSS_IPV6_PRE56_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_L3_PRE56)
-#define ETH_RSS_IPV6_PRE56_TCP RTE_DEPRECATED(ETH_RSS_IPV6_PRE56_TCP) RTE_ETH_RSS_IPV6_PRE56_TCP
#define RTE_ETH_RSS_IPV6_PRE64_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_L3_PRE64)
-#define ETH_RSS_IPV6_PRE64_TCP RTE_DEPRECATED(ETH_RSS_IPV6_PRE64_TCP) RTE_ETH_RSS_IPV6_PRE64_TCP
#define RTE_ETH_RSS_IPV6_PRE96_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_L3_PRE96)
-#define ETH_RSS_IPV6_PRE96_TCP RTE_DEPRECATED(ETH_RSS_IPV6_PRE96_TCP) RTE_ETH_RSS_IPV6_PRE96_TCP
#define RTE_ETH_RSS_IPV6_PRE32_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
RTE_ETH_RSS_L3_PRE32)
-#define ETH_RSS_IPV6_PRE32_SCTP RTE_DEPRECATED(ETH_RSS_IPV6_PRE32_SCTP) RTE_ETH_RSS_IPV6_PRE32_SCTP
#define RTE_ETH_RSS_IPV6_PRE40_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
RTE_ETH_RSS_L3_PRE40)
-#define ETH_RSS_IPV6_PRE40_SCTP RTE_DEPRECATED(ETH_RSS_IPV6_PRE40_SCTP) RTE_ETH_RSS_IPV6_PRE40_SCTP
#define RTE_ETH_RSS_IPV6_PRE48_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
RTE_ETH_RSS_L3_PRE48)
-#define ETH_RSS_IPV6_PRE48_SCTP RTE_DEPRECATED(ETH_RSS_IPV6_PRE48_SCTP) RTE_ETH_RSS_IPV6_PRE48_SCTP
#define RTE_ETH_RSS_IPV6_PRE56_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
RTE_ETH_RSS_L3_PRE56)
-#define ETH_RSS_IPV6_PRE56_SCTP RTE_DEPRECATED(ETH_RSS_IPV6_PRE56_SCTP) RTE_ETH_RSS_IPV6_PRE56_SCTP
#define RTE_ETH_RSS_IPV6_PRE64_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
RTE_ETH_RSS_L3_PRE64)
-#define ETH_RSS_IPV6_PRE64_SCTP RTE_DEPRECATED(ETH_RSS_IPV6_PRE64_SCTP) RTE_ETH_RSS_IPV6_PRE64_SCTP
#define RTE_ETH_RSS_IPV6_PRE96_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
RTE_ETH_RSS_L3_PRE96)
-#define ETH_RSS_IPV6_PRE96_SCTP RTE_DEPRECATED(ETH_RSS_IPV6_PRE96_SCTP) RTE_ETH_RSS_IPV6_PRE96_SCTP
#define RTE_ETH_RSS_IP ( \
RTE_ETH_RSS_IPV4 | \
@@ -815,35 +744,29 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
RTE_ETH_RSS_FRAG_IPV6 | \
RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \
RTE_ETH_RSS_IPV6_EX)
-#define ETH_RSS_IP RTE_DEPRECATED(ETH_RSS_IP) RTE_ETH_RSS_IP
#define RTE_ETH_RSS_UDP ( \
RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
RTE_ETH_RSS_IPV6_UDP_EX)
-#define ETH_RSS_UDP RTE_DEPRECATED(ETH_RSS_UDP) RTE_ETH_RSS_UDP
#define RTE_ETH_RSS_TCP ( \
RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_IPV6_TCP_EX)
-#define ETH_RSS_TCP RTE_DEPRECATED(ETH_RSS_TCP) RTE_ETH_RSS_TCP
#define RTE_ETH_RSS_SCTP ( \
RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
RTE_ETH_RSS_NONFRAG_IPV6_SCTP)
-#define ETH_RSS_SCTP RTE_DEPRECATED(ETH_RSS_SCTP) RTE_ETH_RSS_SCTP
#define RTE_ETH_RSS_TUNNEL ( \
RTE_ETH_RSS_VXLAN | \
RTE_ETH_RSS_GENEVE | \
RTE_ETH_RSS_NVGRE)
-#define ETH_RSS_TUNNEL RTE_DEPRECATED(ETH_RSS_TUNNEL) RTE_ETH_RSS_TUNNEL
#define RTE_ETH_RSS_VLAN ( \
RTE_ETH_RSS_S_VLAN | \
RTE_ETH_RSS_C_VLAN)
-#define ETH_RSS_VLAN RTE_DEPRECATED(ETH_RSS_VLAN) RTE_ETH_RSS_VLAN
/** Mask of valid RSS hash protocols */
#define RTE_ETH_RSS_PROTO_MASK ( \
@@ -868,7 +791,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
RTE_ETH_RSS_GENEVE | \
RTE_ETH_RSS_NVGRE | \
RTE_ETH_RSS_MPLS)
-#define ETH_RSS_PROTO_MASK RTE_DEPRECATED(ETH_RSS_PROTO_MASK) RTE_ETH_RSS_PROTO_MASK
/*
* Definitions used for redirection table entry size.
@@ -881,12 +803,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
#define RTE_ETH_RSS_RETA_SIZE_512 512
#define RTE_ETH_RETA_GROUP_SIZE 64
-#define ETH_RSS_RETA_SIZE_64 RTE_DEPRECATED(ETH_RSS_RETA_SIZE_64) RTE_ETH_RSS_RETA_SIZE_64
-#define ETH_RSS_RETA_SIZE_128 RTE_DEPRECATED(ETH_RSS_RETA_SIZE_128) RTE_ETH_RSS_RETA_SIZE_128
-#define ETH_RSS_RETA_SIZE_256 RTE_DEPRECATED(ETH_RSS_RETA_SIZE_256) RTE_ETH_RSS_RETA_SIZE_256
-#define ETH_RSS_RETA_SIZE_512 RTE_DEPRECATED(ETH_RSS_RETA_SIZE_512) RTE_ETH_RSS_RETA_SIZE_512
-#define RTE_RETA_GROUP_SIZE RTE_DEPRECATED(RTE_RETA_GROUP_SIZE) RTE_ETH_RETA_GROUP_SIZE
-
/**@{@name VMDq and DCB maximums */
#define RTE_ETH_VMDQ_MAX_VLAN_FILTERS 64 /**< Maximum nb. of VMDq VLAN filters. */
#define RTE_ETH_DCB_NUM_USER_PRIORITIES 8 /**< Maximum nb. of DCB priorities. */
--
2.30.2
^ permalink raw reply [relevance 3%]
* [PATCH 05/10] ethdev: remove deprecated DCB and VMDq defines
` (3 preceding siblings ...)
2022-08-04 19:05 4% ` [PATCH 04/10] ethdev: remove deprecated Rx and Tx offload defines Andrew Rybchenko
@ 2022-08-04 19:05 4% ` Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 06/10] ethdev: remove deprecated tunnel type defines Andrew Rybchenko
` (4 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``ETH_DCB_*``, ``ETH_VMDQ_``, ``ETH_*_TCS``,
``ETH_*_POOLS`` and ``ETH_MAX_VMDQ_POOL`` defines. Use corresponding
defines with ``RTE_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 4 ++++
lib/ethdev/rte_ethdev.h | 24 ------------------------
2 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 0bed31cbaa..a2e3097d61 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -99,6 +99,10 @@ API Changes
defines. Use corresponding defines with ``RTE_ETH_RX_OFFLOAD_`` and
``RTE_ETH_TX_OFFLOAD_`` prefix instead.
+* ethdev: Removed deprecated ``ETH_DCB_*``, ``ETH_VMDQ_``, ``ETH_*_TCS``,
+ ``ETH_*_POOLS`` and ``ETH_MAX_VMDQ_POOL`` defines. Use corresponding
+ defines with ``RTE_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 3552535780..029582837c 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -810,19 +810,11 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
#define RTE_ETH_DCB_NUM_QUEUES 128 /**< Maximum nb. of DCB queues. */
/**@}*/
-#define ETH_VMDQ_MAX_VLAN_FILTERS RTE_DEPRECATED(ETH_VMDQ_MAX_VLAN_FILTERS) RTE_ETH_VMDQ_MAX_VLAN_FILTERS
-#define ETH_DCB_NUM_USER_PRIORITIES RTE_DEPRECATED(ETH_DCB_NUM_USER_PRIORITIES) RTE_ETH_DCB_NUM_USER_PRIORITIES
-#define ETH_VMDQ_DCB_NUM_QUEUES RTE_DEPRECATED(ETH_VMDQ_DCB_NUM_QUEUES) RTE_ETH_VMDQ_DCB_NUM_QUEUES
-#define ETH_DCB_NUM_QUEUES RTE_DEPRECATED(ETH_DCB_NUM_QUEUES) RTE_ETH_DCB_NUM_QUEUES
-
/**@{@name DCB capabilities */
#define RTE_ETH_DCB_PG_SUPPORT RTE_BIT32(0) /**< Priority Group(ETS) support. */
#define RTE_ETH_DCB_PFC_SUPPORT RTE_BIT32(1) /**< Priority Flow Control support. */
/**@}*/
-#define ETH_DCB_PG_SUPPORT RTE_DEPRECATED(ETH_DCB_PG_SUPPORT) RTE_ETH_DCB_PG_SUPPORT
-#define ETH_DCB_PFC_SUPPORT RTE_DEPRECATED(ETH_DCB_PFC_SUPPORT) RTE_ETH_DCB_PFC_SUPPORT
-
/**@{@name VLAN offload bits */
#define RTE_ETH_VLAN_STRIP_OFFLOAD 0x0001 /**< VLAN Strip On/Off */
#define RTE_ETH_VLAN_FILTER_OFFLOAD 0x0002 /**< VLAN Filter On/Off */
@@ -853,7 +845,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
/* Definitions used for unicast hash */
#define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128 /**< Maximum nb. of UC hash array. */
-#define ETH_VMDQ_NUM_UC_HASH_ARRAY RTE_DEPRECATED(ETH_VMDQ_NUM_UC_HASH_ARRAY) RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY
/**@{@name VMDq Rx mode
* @see rte_eth_vmdq_rx_conf.rx_mode
@@ -870,12 +861,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
#define RTE_ETH_VMDQ_ACCEPT_MULTICAST RTE_BIT32(4)
/**@}*/
-#define ETH_VMDQ_ACCEPT_UNTAG RTE_DEPRECATED(ETH_VMDQ_ACCEPT_UNTAG) RTE_ETH_VMDQ_ACCEPT_UNTAG
-#define ETH_VMDQ_ACCEPT_HASH_MC RTE_DEPRECATED(ETH_VMDQ_ACCEPT_HASH_MC) RTE_ETH_VMDQ_ACCEPT_HASH_MC
-#define ETH_VMDQ_ACCEPT_HASH_UC RTE_DEPRECATED(ETH_VMDQ_ACCEPT_HASH_UC) RTE_ETH_VMDQ_ACCEPT_HASH_UC
-#define ETH_VMDQ_ACCEPT_BROADCAST RTE_DEPRECATED(ETH_VMDQ_ACCEPT_BROADCAST) RTE_ETH_VMDQ_ACCEPT_BROADCAST
-#define ETH_VMDQ_ACCEPT_MULTICAST RTE_DEPRECATED(ETH_VMDQ_ACCEPT_MULTICAST) RTE_ETH_VMDQ_ACCEPT_MULTICAST
-
/**
* A structure used to configure 64 entries of Redirection Table of the
* Receive Side Scaling (RSS) feature of an Ethernet port. To configure
@@ -897,8 +882,6 @@ enum rte_eth_nb_tcs {
RTE_ETH_4_TCS = 4, /**< 4 TCs with DCB. */
RTE_ETH_8_TCS = 8 /**< 8 TCs with DCB. */
};
-#define ETH_4_TCS RTE_DEPRECATED(ETH_4_TCS) RTE_ETH_4_TCS
-#define ETH_8_TCS RTE_DEPRECATED(ETH_8_TCS) RTE_ETH_8_TCS
/**
* This enum indicates the possible number of queue pools
@@ -910,10 +893,6 @@ enum rte_eth_nb_pools {
RTE_ETH_32_POOLS = 32, /**< 32 VMDq pools. */
RTE_ETH_64_POOLS = 64 /**< 64 VMDq pools. */
};
-#define ETH_8_POOLS RTE_DEPRECATED(ETH_8_POOLS) RTE_ETH_8_POOLS
-#define ETH_16_POOLS RTE_DEPRECATED(ETH_16_POOLS) RTE_ETH_16_POOLS
-#define ETH_32_POOLS RTE_DEPRECATED(ETH_32_POOLS) RTE_ETH_32_POOLS
-#define ETH_64_POOLS RTE_DEPRECATED(ETH_64_POOLS) RTE_ETH_64_POOLS
/* This structure may be extended in future. */
struct rte_eth_dcb_rx_conf {
@@ -1820,9 +1799,6 @@ struct rte_eth_xstat_name {
#define RTE_ETH_DCB_NUM_TCS 8
#define RTE_ETH_MAX_VMDQ_POOL 64
-#define ETH_DCB_NUM_TCS RTE_DEPRECATED(ETH_DCB_NUM_TCS) RTE_ETH_DCB_NUM_TCS
-#define ETH_MAX_VMDQ_POOL RTE_DEPRECATED(ETH_MAX_VMDQ_POOL) RTE_ETH_MAX_VMDQ_POOL
-
/**
* A structure used to get the information of queue and
* TC mapping on both Tx and Rx paths.
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 06/10] ethdev: remove deprecated tunnel type defines
` (4 preceding siblings ...)
2022-08-04 19:05 4% ` [PATCH 05/10] ethdev: remove deprecated DCB and VMDq defines Andrew Rybchenko
@ 2022-08-04 19:05 4% ` Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 07/10] ethdev: remove deprecated flow control defines Andrew Rybchenko
` (3 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``RTE_TUNNEL_*`` defines. Use corresponding defines
with ``RTE_ETH_TUNNEL_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_ethdev.h | 10 ----------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index a2e3097d61..ca9a38e53c 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -103,6 +103,9 @@ API Changes
``ETH_*_POOLS`` and ``ETH_MAX_VMDQ_POOL`` defines. Use corresponding
defines with ``RTE_`` prefix instead.
+* ethdev: Removed deprecated ``RTE_TUNNEL_*`` defines. Use corresponding
+ defines with ``RTE_ETH_TUNNEL_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 029582837c..da050ad7f7 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1314,16 +1314,6 @@ enum rte_eth_tunnel_type {
RTE_ETH_TUNNEL_TYPE_ECPRI,
RTE_ETH_TUNNEL_TYPE_MAX,
};
-#define RTE_TUNNEL_TYPE_NONE RTE_DEPRECATED(RTE_TUNNEL_TYPE_NONE) RTE_ETH_TUNNEL_TYPE_NONE
-#define RTE_TUNNEL_TYPE_VXLAN RTE_DEPRECATED(RTE_TUNNEL_TYPE_VXLAN) RTE_ETH_TUNNEL_TYPE_VXLAN
-#define RTE_TUNNEL_TYPE_GENEVE RTE_DEPRECATED(RTE_TUNNEL_TYPE_GENEVE) RTE_ETH_TUNNEL_TYPE_GENEVE
-#define RTE_TUNNEL_TYPE_TEREDO RTE_DEPRECATED(RTE_TUNNEL_TYPE_TEREDO) RTE_ETH_TUNNEL_TYPE_TEREDO
-#define RTE_TUNNEL_TYPE_NVGRE RTE_DEPRECATED(RTE_TUNNEL_TYPE_NVGRE) RTE_ETH_TUNNEL_TYPE_NVGRE
-#define RTE_TUNNEL_TYPE_IP_IN_GRE RTE_DEPRECATED(RTE_TUNNEL_TYPE_IP_IN_GRE) RTE_ETH_TUNNEL_TYPE_IP_IN_GRE
-#define RTE_L2_TUNNEL_TYPE_E_TAG RTE_DEPRECATED(RTE_L2_TUNNEL_TYPE_E_TAG) RTE_ETH_L2_TUNNEL_TYPE_E_TAG
-#define RTE_TUNNEL_TYPE_VXLAN_GPE RTE_DEPRECATED(RTE_TUNNEL_TYPE_VXLAN_GPE) RTE_ETH_TUNNEL_TYPE_VXLAN_GPE
-#define RTE_TUNNEL_TYPE_ECPRI RTE_DEPRECATED(RTE_TUNNEL_TYPE_ECPRI) RTE_ETH_TUNNEL_TYPE_ECPRI
-#define RTE_TUNNEL_TYPE_MAX RTE_DEPRECATED(RTE_TUNNEL_TYPE_MAX) RTE_ETH_TUNNEL_TYPE_MAX
/* Deprecated API file for rte_eth_dev_filter_* functions */
#include "rte_eth_ctrl.h"
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 07/10] ethdev: remove deprecated flow control defines
` (5 preceding siblings ...)
2022-08-04 19:05 4% ` [PATCH 06/10] ethdev: remove deprecated tunnel type defines Andrew Rybchenko
@ 2022-08-04 19:05 4% ` Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 08/10] ethdev: remove deprecated VLAN offload configuration defines Andrew Rybchenko
` (2 subsequent siblings)
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:05 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``RTE_FC_*`` defines. Use corresponding defines
with ``RTE_ETH_FC_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_ethdev.h | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index ca9a38e53c..3cb306f185 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -106,6 +106,9 @@ API Changes
* ethdev: Removed deprecated ``RTE_TUNNEL_*`` defines. Use corresponding
defines with ``RTE_ETH_TUNNEL_`` prefix instead.
+* ethdev: Removed deprecated ``RTE_FC_*`` defines. Use corresponding
+ defines with ``RTE_ETH_FC_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index da050ad7f7..27a9fa83d2 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1215,10 +1215,6 @@ enum rte_eth_fc_mode {
RTE_ETH_FC_TX_PAUSE, /**< Tx pause frame, enable flowctrl on Rx side. */
RTE_ETH_FC_FULL /**< Enable flow control on both side. */
};
-#define RTE_FC_NONE RTE_DEPRECATED(RTE_FC_NONE) RTE_ETH_FC_NONE
-#define RTE_FC_RX_PAUSE RTE_DEPRECATED(RTE_FC_RX_PAUSE) RTE_ETH_FC_RX_PAUSE
-#define RTE_FC_TX_PAUSE RTE_DEPRECATED(RTE_FC_TX_PAUSE) RTE_ETH_FC_TX_PAUSE
-#define RTE_FC_FULL RTE_DEPRECATED(RTE_FC_FULL) RTE_ETH_FC_FULL
/**
* A structure used to configure Ethernet flow control parameter.
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 08/10] ethdev: remove deprecated VLAN offload configuration defines
` (6 preceding siblings ...)
2022-08-04 19:05 4% ` [PATCH 07/10] ethdev: remove deprecated flow control defines Andrew Rybchenko
@ 2022-08-04 19:06 4% ` Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 09/10] ethdev: remove deprecated maximum Rx MAC addresses define Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 10/10] ethdev: remove deprecated metadata dynamic fields defines Andrew Rybchenko
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:06 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``ETH_VLAN_*`` and ``ETH_QINQ_`` defines.
Use corresponding defines with ``RTE_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_ethdev.h | 16 ----------------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 3cb306f185..3c8aa2f4f6 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -109,6 +109,9 @@ API Changes
* ethdev: Removed deprecated ``RTE_FC_*`` defines. Use corresponding
defines with ``RTE_ETH_FC_`` prefix instead.
+* ethdev: Removed deprecated ``ETH_VLAN_*`` and ``ETH_QINQ_`` defines.
+ Use corresponding defines with ``RTE_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 27a9fa83d2..77d6d8966d 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -435,11 +435,6 @@ enum rte_vlan_type {
RTE_ETH_VLAN_TYPE_MAX,
};
-#define ETH_VLAN_TYPE_UNKNOWN RTE_DEPRECATED(ETH_VLAN_TYPE_UNKNOWN) RTE_ETH_VLAN_TYPE_UNKNOWN
-#define ETH_VLAN_TYPE_INNER RTE_DEPRECATED(ETH_VLAN_TYPE_INNER) RTE_ETH_VLAN_TYPE_INNER
-#define ETH_VLAN_TYPE_OUTER RTE_DEPRECATED(ETH_VLAN_TYPE_OUTER) RTE_ETH_VLAN_TYPE_OUTER
-#define ETH_VLAN_TYPE_MAX RTE_DEPRECATED(ETH_VLAN_TYPE_MAX) RTE_ETH_VLAN_TYPE_MAX
-
/**
* A structure used to describe a VLAN filter.
* If the bit corresponding to a VID is set, such VID is on.
@@ -821,11 +816,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
#define RTE_ETH_VLAN_EXTEND_OFFLOAD 0x0004 /**< VLAN Extend On/Off */
#define RTE_ETH_QINQ_STRIP_OFFLOAD 0x0008 /**< QINQ Strip On/Off */
-#define ETH_VLAN_STRIP_OFFLOAD RTE_DEPRECATED(ETH_VLAN_STRIP_OFFLOAD) RTE_ETH_VLAN_STRIP_OFFLOAD
-#define ETH_VLAN_FILTER_OFFLOAD RTE_DEPRECATED(ETH_VLAN_FILTER_OFFLOAD) RTE_ETH_VLAN_FILTER_OFFLOAD
-#define ETH_VLAN_EXTEND_OFFLOAD RTE_DEPRECATED(ETH_VLAN_EXTEND_OFFLOAD) RTE_ETH_VLAN_EXTEND_OFFLOAD
-#define ETH_QINQ_STRIP_OFFLOAD RTE_DEPRECATED(ETH_QINQ_STRIP_OFFLOAD) RTE_ETH_QINQ_STRIP_OFFLOAD
-
#define RTE_ETH_VLAN_STRIP_MASK 0x0001 /**< VLAN Strip setting mask */
#define RTE_ETH_VLAN_FILTER_MASK 0x0002 /**< VLAN Filter setting mask*/
#define RTE_ETH_VLAN_EXTEND_MASK 0x0004 /**< VLAN Extend setting mask*/
@@ -833,12 +823,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
#define RTE_ETH_VLAN_ID_MAX 0x0FFF /**< VLAN ID is in lower 12 bits*/
/**@}*/
-#define ETH_VLAN_STRIP_MASK RTE_DEPRECATED(ETH_VLAN_STRIP_MASK) RTE_ETH_VLAN_STRIP_MASK
-#define ETH_VLAN_FILTER_MASK RTE_DEPRECATED(ETH_VLAN_FILTER_MASK) RTE_ETH_VLAN_FILTER_MASK
-#define ETH_VLAN_EXTEND_MASK RTE_DEPRECATED(ETH_VLAN_EXTEND_MASK) RTE_ETH_VLAN_EXTEND_MASK
-#define ETH_QINQ_STRIP_MASK RTE_DEPRECATED(ETH_QINQ_STRIP_MASK) RTE_ETH_QINQ_STRIP_MASK
-#define ETH_VLAN_ID_MAX RTE_DEPRECATED(ETH_VLAN_ID_MAX) RTE_ETH_VLAN_ID_MAX
-
/* Definitions used for receive MAC address */
#define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128 /**< Maximum nb. of receive mac addr. */
#define ETH_NUM_RECEIVE_MAC_ADDR RTE_DEPRECATED(ETH_NUM_RECEIVE_MAC_ADDR) RTE_ETH_NUM_RECEIVE_MAC_ADDR
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 09/10] ethdev: remove deprecated maximum Rx MAC addresses define
` (7 preceding siblings ...)
2022-08-04 19:06 4% ` [PATCH 08/10] ethdev: remove deprecated VLAN offload configuration defines Andrew Rybchenko
@ 2022-08-04 19:06 4% ` Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 10/10] ethdev: remove deprecated metadata dynamic fields defines Andrew Rybchenko
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:06 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``ETH_NUM_RECEIVE_MAC_ADDR`` define.
Use corresponding define with ``RTE_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_ethdev.h | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 3c8aa2f4f6..81bfa2f34e 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -112,6 +112,9 @@ API Changes
* ethdev: Removed deprecated ``ETH_VLAN_*`` and ``ETH_QINQ_`` defines.
Use corresponding defines with ``RTE_`` prefix instead.
+* ethdev: Removed deprecated ``ETH_NUM_RECEIVE_MAC_ADDR`` define.
+ Use corresponding define with ``RTE_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 77d6d8966d..39ede6804c 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -825,7 +825,6 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
/* Definitions used for receive MAC address */
#define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128 /**< Maximum nb. of receive mac addr. */
-#define ETH_NUM_RECEIVE_MAC_ADDR RTE_DEPRECATED(ETH_NUM_RECEIVE_MAC_ADDR) RTE_ETH_NUM_RECEIVE_MAC_ADDR
/* Definitions used for unicast hash */
#define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128 /**< Maximum nb. of UC hash array. */
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 10/10] ethdev: remove deprecated metadata dynamic fields defines
` (8 preceding siblings ...)
2022-08-04 19:06 4% ` [PATCH 09/10] ethdev: remove deprecated maximum Rx MAC addresses define Andrew Rybchenko
@ 2022-08-04 19:06 4% ` Andrew Rybchenko
9 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-04 19:06 UTC (permalink / raw)
To: Ori Kam, Thomas Monjalon, Ferruh Yigit; +Cc: dev
Remove deprecated ``PKT_{R,T}X_DYNF_METADATA`` defines. Use
corresponding defines ``RTE_MBUF_DYNFLAG_{R,T}X_METADATA`` instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_flow.h | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 81bfa2f34e..6c444f89a5 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -115,6 +115,9 @@ API Changes
* ethdev: Removed deprecated ``ETH_NUM_RECEIVE_MAC_ADDR`` define.
Use corresponding define with ``RTE_`` prefix instead.
+* ethdev: Removed deprecated ``PKT_{R,T}X_DYNF_METADATA`` defines.
+ Use corresponding defines ``RTE_MBUF_DYNFLAG_{R,T}X_METADATA`` instead.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index a79f1e7ef0..017f690798 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3761,11 +3761,7 @@ extern uint64_t rte_flow_dynf_metadata_mask;
/* Mbuf dynamic flags for metadata. */
#define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
-#define PKT_RX_DYNF_METADATA RTE_DEPRECATED(PKT_RX_DYNF_METADATA) \
- RTE_MBUF_DYNFLAG_RX_METADATA
#define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
-#define PKT_TX_DYNF_METADATA RTE_DEPRECATED(PKT_TX_DYNF_METADATA) \
- RTE_MBUF_DYNFLAG_TX_METADATA
__rte_experimental
static inline uint32_t
--
2.30.2
^ permalink raw reply [relevance 4%]
* Re: [RFC v3 00/26] Bus and device cleanup for 22.11
` (3 preceding siblings ...)
2022-07-28 15:26 2% ` [RFC v3 26/26] dev: hide device object David Marchand
@ 2022-08-04 23:19 3% ` Harris, James R
4 siblings, 1 reply; 200+ results
From: Harris, James R @ 2022-08-04 23:19 UTC (permalink / raw)
To: David Marchand
Cc: dev, Walker, Benjamin, Liu, Changpeng, Alexey Marchuk, Shuhei Matsumoto
> On Jul 28, 2022, at 8:26 AM, David Marchand <david.marchand@redhat.com> wrote:
>
> This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
> And mark associated driver only API as internal.
>
> A good amount of the patches are preparation work on rte_bus.h,
> rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
> between them.
>
> PCI bus specific handling are removed from testpmd, unit tests and
> examples.
>
> After this series, driver-only API headers for registering to buses are
> not exported anymore, unless the enable_driver_sdk meson option is
> selected.
>
> New accessors for rte_bus, rte_driver and rte_device have been added,
> marked with an experimental tag first when introducing them, and later
> in the series marked as stable since external users will want to use
> those drop-in replacements right away.
>
> A check is added to ensure we won't pollute app/ and examples/ again,
> though some unit tests are left intentionnally untouched as they test
> some internals of DPDK.
>
> Comments welcome.
Hi David,
I certainly understand wanting to hide those objects to avoid ABI
maintenance. SPDK is using fields directly from some of those structures
today, but I think all of them could be replaced with associated helper
functions. This was discussed a bit late last year related to Chenbo’s
earlier patch set:
https://www.mail-archive.com/dev@dpdk.org/msg222560.html
It looks like SPDK never got back to the DPDK project on exactly what APIs
we would need, to see if DPDK could still support a minimal API without
requiring the enable_driver_sdk flag. I’m generating an exact list, but it
would be rendered moot depending on the next question...
Can we keep rte_pci_register(), or a new variation of it that keeps the
rte_pci_driver structure hidden? Hiding rte_pci_register() would mean
SPDK can no longer work with a packaged DPDK. Or the DPDK packages
would need to set enable_driver_sdk which I suspect is not the intent.
If you’re open to this, we (SPDK) can make a proposal on exactly what we
would need to keep SPDK working with a standard DPDK build.
Thanks,
Jim
^ permalink raw reply [relevance 3%]
* [PATCH] mbuf: remove deprecated offload flags
@ 2022-08-05 8:02 3% Andrew Rybchenko
0 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-08-05 8:02 UTC (permalink / raw)
To: Olivier Matz; +Cc: dev
Remove deprecated ``PKT_*`` flags. Use corresponding flags with
``RTE_MBUF_F_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +
lib/mbuf/rte_mbuf_core.h | 113 -------------------------
2 files changed, 3 insertions(+), 113 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..7052a55dfc 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* mbuf: Removed deprecated ``PKT_*`` flags.
+ Use corresponding flags with ``RTE_MBUF_F_`` prefix instead.
+
ABI Changes
-----------
diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
index 3d6ddd6773..a59bb6d3ad 100644
--- a/lib/mbuf/rte_mbuf_core.h
+++ b/lib/mbuf/rte_mbuf_core.h
@@ -48,23 +48,18 @@ extern "C" {
* present.
*/
#define RTE_MBUF_F_RX_VLAN (1ULL << 0)
-#define PKT_RX_VLAN RTE_DEPRECATED(PKT_RX_VLAN) RTE_MBUF_F_RX_VLAN
/** RX packet with RSS hash result. */
#define RTE_MBUF_F_RX_RSS_HASH (1ULL << 1)
-#define PKT_RX_RSS_HASH RTE_DEPRECATED(PKT_RX_RSS_HASH) RTE_MBUF_F_RX_RSS_HASH
/** RX packet with FDIR match indicate. */
#define RTE_MBUF_F_RX_FDIR (1ULL << 2)
-#define PKT_RX_FDIR RTE_DEPRECATED(PKT_RX_FDIR) RTE_MBUF_F_RX_FDIR
/**
* This flag is set when the outermost IP header checksum is detected as
* wrong by the hardware.
*/
#define RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD (1ULL << 5)
-#define PKT_RX_OUTER_IP_CKSUM_BAD RTE_DEPRECATED(PKT_RX_OUTER_IP_CKSUM_BAD) \
- RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD
/**
* A vlan has been stripped by the hardware and its tci is saved in
@@ -73,8 +68,6 @@ extern "C" {
* When RTE_MBUF_F_RX_VLAN_STRIPPED is set, RTE_MBUF_F_RX_VLAN must also be set.
*/
#define RTE_MBUF_F_RX_VLAN_STRIPPED (1ULL << 6)
-#define PKT_RX_VLAN_STRIPPED RTE_DEPRECATED(PKT_RX_VLAN_STRIPPED) \
- RTE_MBUF_F_RX_VLAN_STRIPPED
/**
* Mask of bits used to determine the status of RX IP checksum.
@@ -85,21 +78,11 @@ extern "C" {
* data, but the integrity of the IP header is verified.
*/
#define RTE_MBUF_F_RX_IP_CKSUM_MASK ((1ULL << 4) | (1ULL << 7))
-#define PKT_RX_IP_CKSUM_MASK RTE_DEPRECATED(PKT_RX_IP_CKSUM_MASK) \
- RTE_MBUF_F_RX_IP_CKSUM_MASK
#define RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN 0
#define RTE_MBUF_F_RX_IP_CKSUM_BAD (1ULL << 4)
#define RTE_MBUF_F_RX_IP_CKSUM_GOOD (1ULL << 7)
#define RTE_MBUF_F_RX_IP_CKSUM_NONE ((1ULL << 4) | (1ULL << 7))
-#define PKT_RX_IP_CKSUM_UNKNOWN RTE_DEPRECATED(PKT_RX_IP_CKSUM_UNKNOWN) \
- RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN
-#define PKT_RX_IP_CKSUM_BAD RTE_DEPRECATED(PKT_RX_IP_CKSUM_BAD) \
- RTE_MBUF_F_RX_IP_CKSUM_BAD
-#define PKT_RX_IP_CKSUM_GOOD RTE_DEPRECATED(PKT_RX_IP_CKSUM_GOOD) \
- RTE_MBUF_F_RX_IP_CKSUM_GOOD
-#define PKT_RX_IP_CKSUM_NONE RTE_DEPRECATED(PKT_RX_IP_CKSUM_NONE) \
- RTE_MBUF_F_RX_IP_CKSUM_NONE
/**
* Mask of bits used to determine the status of RX L4 checksum.
@@ -110,41 +93,23 @@ extern "C" {
* data, but the integrity of the L4 data is verified.
*/
#define RTE_MBUF_F_RX_L4_CKSUM_MASK ((1ULL << 3) | (1ULL << 8))
-#define PKT_RX_L4_CKSUM_MASK RTE_DEPRECATED(PKT_RX_L4_CKSUM_MASK) \
- RTE_MBUF_F_RX_L4_CKSUM_MASK
#define RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN 0
#define RTE_MBUF_F_RX_L4_CKSUM_BAD (1ULL << 3)
#define RTE_MBUF_F_RX_L4_CKSUM_GOOD (1ULL << 8)
#define RTE_MBUF_F_RX_L4_CKSUM_NONE ((1ULL << 3) | (1ULL << 8))
-#define PKT_RX_L4_CKSUM_UNKNOWN RTE_DEPRECATED(PKT_RX_L4_CKSUM_UNKNOWN) \
- RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN
-#define PKT_RX_L4_CKSUM_BAD RTE_DEPRECATED(PKT_RX_L4_CKSUM_BAD) \
- RTE_MBUF_F_RX_L4_CKSUM_BAD
-#define PKT_RX_L4_CKSUM_GOOD RTE_DEPRECATED(PKT_RX_L4_CKSUM_GOOD) \
- RTE_MBUF_F_RX_L4_CKSUM_GOOD
-#define PKT_RX_L4_CKSUM_NONE RTE_DEPRECATED(PKT_RX_L4_CKSUM_NONE) \
- RTE_MBUF_F_RX_L4_CKSUM_NONE
/** RX IEEE1588 L2 Ethernet PT Packet. */
#define RTE_MBUF_F_RX_IEEE1588_PTP (1ULL << 9)
-#define PKT_RX_IEEE1588_PTP RTE_DEPRECATED(PKT_RX_IEEE1588_PTP) \
- RTE_MBUF_F_RX_IEEE1588_PTP
/** RX IEEE1588 L2/L4 timestamped packet.*/
#define RTE_MBUF_F_RX_IEEE1588_TMST (1ULL << 10)
-#define PKT_RX_IEEE1588_TMST RTE_DEPRECATED(PKT_RX_IEEE1588_TMST) \
- RTE_MBUF_F_RX_IEEE1588_TMST
/** FD id reported if FDIR match. */
#define RTE_MBUF_F_RX_FDIR_ID (1ULL << 13)
-#define PKT_RX_FDIR_ID RTE_DEPRECATED(PKT_RX_FDIR_ID) \
- RTE_MBUF_F_RX_FDIR_ID
/** Flexible bytes reported if FDIR match. */
#define RTE_MBUF_F_RX_FDIR_FLX (1ULL << 14)
-#define PKT_RX_FDIR_FLX RTE_DEPRECATED(PKT_RX_FDIR_FLX) \
- RTE_MBUF_F_RX_FDIR_FLX
/**
* The outer VLAN has been stripped by the hardware and its TCI is
@@ -162,8 +127,6 @@ extern "C" {
* are saved in mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer).
*/
#define RTE_MBUF_F_RX_QINQ_STRIPPED (1ULL << 15)
-#define PKT_RX_QINQ_STRIPPED RTE_DEPRECATED(PKT_RX_QINQ_STRIPPED) \
- RTE_MBUF_F_RX_QINQ_STRIPPED
/**
* When packets are coalesced by a hardware or virtual driver, this flag
@@ -171,7 +134,6 @@ extern "C" {
* valid and is set to the segment size of original packets.
*/
#define RTE_MBUF_F_RX_LRO (1ULL << 16)
-#define PKT_RX_LRO RTE_DEPRECATED(PKT_RX_LRO) RTE_MBUF_F_RX_LRO
/* There is no flag defined at offset 17. It is free for any future use. */
@@ -179,15 +141,11 @@ extern "C" {
* Indicate that security offload processing was applied on the RX packet.
*/
#define RTE_MBUF_F_RX_SEC_OFFLOAD (1ULL << 18)
-#define PKT_RX_SEC_OFFLOAD RTE_DEPRECATED(PKT_RX_SEC_OFFLOAD) \
- RTE_MBUF_F_RX_SEC_OFFLOAD
/**
* Indicate that security offload processing failed on the RX packet.
*/
#define RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED (1ULL << 19)
-#define PKT_RX_SEC_OFFLOAD_FAILED RTE_DEPRECATED(PKT_RX_SEC_OFFLOAD_FAILED) \
- RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED
/**
* The RX packet is a double VLAN, and the outer tci has been
@@ -198,7 +156,6 @@ extern "C" {
* present.
*/
#define RTE_MBUF_F_RX_QINQ (1ULL << 20)
-#define PKT_RX_QINQ RTE_DEPRECATED(PKT_RX_QINQ) RTE_MBUF_F_RX_QINQ
/**
* Mask of bits used to determine the status of outer RX L4 checksum.
@@ -216,30 +173,16 @@ extern "C" {
* states if the RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM offload is available.
*/
#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK ((1ULL << 21) | (1ULL << 22))
-#define PKT_RX_OUTER_L4_CKSUM_MASK RTE_DEPRECATED(PKT_RX_OUTER_L4_CKSUM_MASK) \
- RTE_MBUF_F_RX_OUTER_L4_CKSUM_MASK
#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN 0
#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD (1ULL << 21)
#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD (1ULL << 22)
#define RTE_MBUF_F_RX_OUTER_L4_CKSUM_INVALID ((1ULL << 21) | (1ULL << 22))
-#define PKT_RX_OUTER_L4_CKSUM_UNKNOWN \
- RTE_DEPRECATED(PKT_RX_OUTER_L4_CKSUM_UNKNOWN) \
- RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
-#define PKT_RX_OUTER_L4_CKSUM_BAD RTE_DEPRECATED(PKT_RX_OUTER_L4_CKSUM_BAD) \
- RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD
-#define PKT_RX_OUTER_L4_CKSUM_GOOD RTE_DEPRECATED(PKT_RX_OUTER_L4_CKSUM_GOOD) \
- RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
-#define PKT_RX_OUTER_L4_CKSUM_INVALID \
- RTE_DEPRECATED(PKT_RX_OUTER_L4_CKSUM_INVALID) \
- RTE_MBUF_F_RX_OUTER_L4_CKSUM_INVALID
/* add new RX flags here, don't forget to update RTE_MBUF_F_FIRST_FREE */
#define RTE_MBUF_F_FIRST_FREE (1ULL << 23)
-#define PKT_FIRST_FREE RTE_DEPRECATED(PKT_FIRST_FREE) RTE_MBUF_F_FIRST_FREE
#define RTE_MBUF_F_LAST_FREE (1ULL << 40)
-#define PKT_LAST_FREE RTE_DEPRECATED(PKT_LAST_FREE) RTE_MBUF_F_LAST_FREE
/* add new TX flags here, don't forget to update RTE_MBUF_F_LAST_FREE */
@@ -253,8 +196,6 @@ extern "C" {
* 2) Configure RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM offload flag.
*/
#define RTE_MBUF_F_TX_OUTER_UDP_CKSUM (1ULL << 41)
-#define PKT_TX_OUTER_UDP_CKSUM RTE_DEPRECATED(PKT_TX_OUTER_UDP_CKSUM) \
- RTE_MBUF_F_TX_OUTER_UDP_CKSUM
/**
* UDP Fragmentation Offload flag. This flag is used for enabling UDP
@@ -262,7 +203,6 @@ extern "C" {
* to store the MSS of UDP fragments.
*/
#define RTE_MBUF_F_TX_UDP_SEG (1ULL << 42)
-#define PKT_TX_UDP_SEG RTE_DEPRECATED(PKT_TX_UDP_SEG) RTE_MBUF_F_TX_UDP_SEG
/**
* Request security offload processing on the TX packet.
@@ -270,15 +210,12 @@ extern "C" {
* indicating L2 header size and where L3 header starts.
*/
#define RTE_MBUF_F_TX_SEC_OFFLOAD (1ULL << 43)
-#define PKT_TX_SEC_OFFLOAD RTE_DEPRECATED(PKT_TX_SEC_OFFLOAD) \
- RTE_MBUF_F_TX_SEC_OFFLOAD
/**
* Offload the MACsec. This flag must be set by the application to enable
* this offload feature for a packet to be transmitted.
*/
#define RTE_MBUF_F_TX_MACSEC (1ULL << 44)
-#define PKT_TX_MACSEC RTE_DEPRECATED(PKT_TX_MACSEC) RTE_MBUF_F_TX_MACSEC
/**
* Bits 45:48 used for the tunnel type.
@@ -326,35 +263,12 @@ extern "C" {
/* add new TX TUNNEL type here */
#define RTE_MBUF_F_TX_TUNNEL_MASK (0xFULL << 45)
-#define PKT_TX_TUNNEL_VXLAN RTE_DEPRECATED(PKT_TX_TUNNEL_VXLAN) \
- RTE_MBUF_F_TX_TUNNEL_VXLAN
-#define PKT_TX_TUNNEL_GRE RTE_DEPRECATED(PKT_TX_TUNNEL_GRE) \
- RTE_MBUF_F_TX_TUNNEL_GRE
-#define PKT_TX_TUNNEL_IPIP RTE_DEPRECATED(PKT_TX_TUNNEL_IPIP) \
- RTE_MBUF_F_TX_TUNNEL_IPIP
-#define PKT_TX_TUNNEL_GENEVE RTE_DEPRECATED(PKT_TX_TUNNEL_GENEVE) \
- RTE_MBUF_F_TX_TUNNEL_GENEVE
-#define PKT_TX_TUNNEL_MPLSINUDP RTE_DEPRECATED(PKT_TX_TUNNEL_MPLSINUDP) \
- RTE_MBUF_F_TX_TUNNEL_MPLSINUDP
-#define PKT_TX_TUNNEL_VXLAN_GPE RTE_DEPRECATED(PKT_TX_TUNNEL_VXLAN_GPE) \
- RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE
-#define PKT_TX_TUNNEL_GTP RTE_DEPRECATED(PKT_TX_TUNNEL_GTP) \
- RTE_MBUF_F_TX_TUNNEL_GTP
-#define PKT_TX_TUNNEL_IP RTE_DEPRECATED(PKT_TX_TUNNEL_IP) \
- RTE_MBUF_F_TX_TUNNEL_IP
-#define PKT_TX_TUNNEL_UDP RTE_DEPRECATED(PKT_TX_TUNNEL_UDP) \
- RTE_MBUF_F_TX_TUNNEL_UDP
-#define PKT_TX_TUNNEL_MASK RTE_DEPRECATED(PKT_TX_TUNNEL_MASK) \
- RTE_MBUF_F_TX_TUNNEL_MASK
-
/**
* Double VLAN insertion (QinQ) request to driver, driver may offload the
* insertion based on device capability.
* mbuf 'vlan_tci' & 'vlan_tci_outer' must be valid when this flag is set.
*/
#define RTE_MBUF_F_TX_QINQ (1ULL << 49)
-#define PKT_TX_QINQ RTE_DEPRECATED(PKT_TX_QINQ) RTE_MBUF_F_TX_QINQ
-#define PKT_TX_QINQ_PKT RTE_DEPRECATED(PKT_TX_QINQ_PKT) RTE_MBUF_F_TX_QINQ
/**
* TCP segmentation offload. To enable this offload feature for a
@@ -366,12 +280,9 @@ extern "C" {
* - fill the mbuf offload information: l2_len, l3_len, l4_len, tso_segsz
*/
#define RTE_MBUF_F_TX_TCP_SEG (1ULL << 50)
-#define PKT_TX_TCP_SEG RTE_DEPRECATED(PKT_TX_TCP_SEG) RTE_MBUF_F_TX_TCP_SEG
/** TX IEEE1588 packet to timestamp. */
#define RTE_MBUF_F_TX_IEEE1588_TMST (1ULL << 51)
-#define PKT_TX_IEEE1588_TMST RTE_DEPRECATED(PKT_TX_IEEE1588_TMST) \
- RTE_MBUF_F_TX_IEEE1588_TMST
/*
* Bits 52+53 used for L4 packet type with checksum enabled: 00: Reserved,
@@ -398,16 +309,6 @@ extern "C" {
/** Mask for L4 cksum offload request. */
#define RTE_MBUF_F_TX_L4_MASK (3ULL << 52)
-#define PKT_TX_L4_NO_CKSUM RTE_DEPRECATED(PKT_TX_L4_NO_CKSUM) \
- RTE_MBUF_F_TX_L4_NO_CKSUM
-#define PKT_TX_TCP_CKSUM RTE_DEPRECATED(PKT_TX_TCP_CKSUM) \
- RTE_MBUF_F_TX_TCP_CKSUM
-#define PKT_TX_SCTP_CKSUM RTE_DEPRECATED(PKT_TX_SCTP_CKSUM) \
- RTE_MBUF_F_TX_SCTP_CKSUM
-#define PKT_TX_UDP_CKSUM RTE_DEPRECATED(PKT_TX_UDP_CKSUM) \
- RTE_MBUF_F_TX_UDP_CKSUM
-#define PKT_TX_L4_MASK RTE_DEPRECATED(PKT_TX_L4_MASK) RTE_MBUF_F_TX_L4_MASK
-
/**
* Offload the IP checksum in the hardware. The flag RTE_MBUF_F_TX_IPV4 should
* also be set by the application, although a PMD will only check
@@ -415,7 +316,6 @@ extern "C" {
* - fill the mbuf offload information: l2_len, l3_len
*/
#define RTE_MBUF_F_TX_IP_CKSUM (1ULL << 54)
-#define PKT_TX_IP_CKSUM RTE_DEPRECATED(PKT_TX_IP_CKSUM) RTE_MBUF_F_TX_IP_CKSUM
/**
* Packet is IPv4. This flag must be set when using any offload feature
@@ -424,7 +324,6 @@ extern "C" {
* the inner headers.
*/
#define RTE_MBUF_F_TX_IPV4 (1ULL << 55)
-#define PKT_TX_IPV4 RTE_DEPRECATED(PKT_TX_IPV4) RTE_MBUF_F_TX_IPV4
/**
* Packet is IPv6. This flag must be set when using an offload feature
@@ -433,7 +332,6 @@ extern "C" {
* the inner headers.
*/
#define RTE_MBUF_F_TX_IPV6 (1ULL << 56)
-#define PKT_TX_IPV6 RTE_DEPRECATED(PKT_TX_IPV6) RTE_MBUF_F_TX_IPV6
/**
* VLAN tag insertion request to driver, driver may offload the insertion
@@ -441,8 +339,6 @@ extern "C" {
* mbuf 'vlan_tci' field must be valid when this flag is set.
*/
#define RTE_MBUF_F_TX_VLAN (1ULL << 57)
-#define PKT_TX_VLAN RTE_DEPRECATED(PKT_TX_VLAN) RTE_MBUF_F_TX_VLAN
-#define PKT_TX_VLAN_PKT RTE_DEPRECATED(PKT_TX_VLAN_PKT) RTE_MBUF_F_TX_VLAN
/**
* Offload the IP checksum of an external header in the hardware. The
@@ -451,8 +347,6 @@ extern "C" {
* - fill the mbuf offload information: outer_l2_len, outer_l3_len
*/
#define RTE_MBUF_F_TX_OUTER_IP_CKSUM (1ULL << 58)
-#define PKT_TX_OUTER_IP_CKSUM RTE_DEPRECATED(PKT_TX_OUTER_IP_CKSUM) \
- RTE_MBUF_F_TX_OUTER_IP_CKSUM
/**
* Packet outer header is IPv4. This flag must be set when using any
@@ -460,8 +354,6 @@ extern "C" {
* outer header of the tunneled packet is an IPv4 packet.
*/
#define RTE_MBUF_F_TX_OUTER_IPV4 (1ULL << 59)
-#define PKT_TX_OUTER_IPV4 RTE_DEPRECATED(PKT_TX_OUTER_IPV4) \
- RTE_MBUF_F_TX_OUTER_IPV4
/**
* Packet outer header is IPv6. This flag must be set when using any
@@ -469,8 +361,6 @@ extern "C" {
* header of the tunneled packet is an IPv6 packet.
*/
#define RTE_MBUF_F_TX_OUTER_IPV6 (1ULL << 60)
-#define PKT_TX_OUTER_IPV6 RTE_DEPRECATED(PKT_TX_OUTER_IPV6) \
- RTE_MBUF_F_TX_OUTER_IPV6
/**
* Bitmask of all supported packet Tx offload features flags,
@@ -493,16 +383,13 @@ extern "C" {
RTE_MBUF_F_TX_SEC_OFFLOAD | \
RTE_MBUF_F_TX_UDP_SEG | \
RTE_MBUF_F_TX_OUTER_UDP_CKSUM)
-#define PKT_TX_OFFLOAD_MASK RTE_DEPRECATED(PKT_TX_OFFLOAD_MASK) RTE_MBUF_F_TX_OFFLOAD_MASK
/**
* Mbuf having an external buffer attached. shinfo in mbuf must be filled.
*/
#define RTE_MBUF_F_EXTERNAL (1ULL << 61)
-#define EXT_ATTACHED_MBUF RTE_DEPRECATED(EXT_ATTACHED_MBUF) RTE_MBUF_F_EXTERNAL
#define RTE_MBUF_F_INDIRECT (1ULL << 62) /**< Indirect attached mbuf */
-#define IND_ATTACHED_MBUF RTE_DEPRECATED(IND_ATTACHED_MBUF) RTE_MBUF_F_INDIRECT
/** Alignment constraint of mbuf private area. */
#define RTE_MBUF_PRIV_ALIGN 8
--
2.30.2
^ permalink raw reply [relevance 3%]
* [PATCH 0/1] update abi maintainership
@ 2022-08-08 10:58 8% Ray Kinsella
2022-08-08 10:58 25% ` [PATCH 1/1] devtools: eol abi as a separate function Ray Kinsella
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-08-08 10:58 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, david.marchand, ferruh.yigit, mdr
In anticipation of a role change. I wanted to make sure there is orderly handover of maintainership
of the abi. I think the proposed change reflects the reality of what is happening in the project in
anycase.
Ray Kinsella (1):
devtools: eol abi as a separate function
MAINTAINERS | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
--
2.20.1
^ permalink raw reply [relevance 8%]
* [PATCH 1/1] devtools: eol abi as a separate function
2022-08-08 10:58 8% [PATCH 0/1] update abi maintainership Ray Kinsella
@ 2022-08-08 10:58 25% ` Ray Kinsella
0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2022-08-08 10:58 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, david.marchand, ferruh.yigit, mdr
Developer tools associated with abi are maintained with as part of
developer tooling, eal abi headers are maintained with eal, abi build
scripts are maintained with the build system and abi policy and version
documents along with rest of the documentation.
Major change is that individual components maintainers become
responsible for ensuring correctness of their map file(s).
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
MAINTAINERS | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 32ffdd1a61..25be8e35bc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -79,20 +79,27 @@ Developers and Maintainers Tools
M: Thomas Monjalon <thomas@monjalon.net>
F: MAINTAINERS
F: devtools/build-dict.sh
+F: devtools/check-abi.sh
+F: devtools/check-abi-version.sh
F: devtools/check-doc-vs-code.sh
F: devtools/check-dup-includes.sh
F: devtools/check-maintainers.sh
F: devtools/check-forbidden-tokens.awk
F: devtools/check-git-log.sh
F: devtools/check-spdx-tag.sh
+F: devtools/check-symbol-change.sh
F: devtools/check-symbol-maps.sh
F: devtools/checkpatches.sh
+F: devtools/gen-abi.sh
F: devtools/get-maintainer.sh
F: devtools/git-log-fixes.sh
F: devtools/load-devel-config
F: devtools/parse-flow-support.sh
F: devtools/process-iwyu.py
+F: devtools/update-abi.sh
F: devtools/update-patches.py
+F: devtools/update_version_map_abi.py
+F: devtools/libabigail.abignore
F: devtools/words-case.txt
F: license/
F: .editorconfig
@@ -103,11 +110,13 @@ F: Makefile
F: meson.build
F: meson_options.txt
F: config/
+F: buildtools/check-symbols.sh
F: buildtools/chkincs/
F: buildtools/call-sphinx-build.py
F: buildtools/get-cpu-count.py
F: buildtools/get-numa-count.py
F: buildtools/list-dir-globs.py
+F: buildtools/map-list-symbol.sh
F: buildtools/pkg-config/
F: buildtools/symlink-drivers-solibs.sh
F: buildtools/symlink-drivers-solibs.py
@@ -121,24 +130,6 @@ F: .travis.yml
F: .github/workflows/build.yml
F: .ci/
-ABI Policy & Versioning
-M: Ray Kinsella <mdr@ashroe.eu>
-F: lib/eal/include/rte_compat.h
-F: lib/eal/include/rte_function_versioning.h
-F: doc/guides/contributing/abi_*.rst
-F: doc/guides/rel_notes/deprecation.rst
-F: devtools/check-abi.sh
-F: devtools/check-abi-version.sh
-F: devtools/check-symbol-change.sh
-F: devtools/gen-abi.sh
-F: devtools/libabigail.abignore
-F: devtools/update-abi.sh
-F: devtools/update_version_map_abi.py
-F: buildtools/check-symbols.sh
-F: buildtools/map-list-symbol.sh
-F: drivers/*/*/*.map
-F: lib/*/*.map
-
Driver information
M: Neil Horman <nhorman@tuxdriver.com>
M: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
--
2.20.1
^ permalink raw reply [relevance 25%]
* [PATCH] net/ice: remove deprecated VF flow action
@ 2022-08-10 6:49 3% zhichaox.zeng
2022-08-12 2:44 0% ` Zhang, Qi Z
0 siblings, 1 reply; 200+ results
From: zhichaox.zeng @ 2022-08-10 6:49 UTC (permalink / raw)
To: dev; +Cc: qiming.yang, yidingx.zhou, Zhichao Zeng, Qi Zhang
From: Zhichao Zeng <zhichaox.zeng@intel.com>
According to the ABI and API Deprecation, remove deprecated VF action
as hard-to-use / ambiguous.
Action REPRESENTED_PORT should be used instead.
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
doc/guides/nics/features/ice.ini | 1 -
drivers/net/ice/ice_switch_filter.c | 22 ----------------------
2 files changed, 23 deletions(-)
diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini
index 12fd802885..fe1e81302c 100644
--- a/doc/guides/nics/features/ice.ini
+++ b/doc/guides/nics/features/ice.ini
@@ -81,5 +81,4 @@ mark = Y
passthru = Y
queue = Y
rss = Y
-vf = Y
represented_port = Y
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 5d65988474..da81e49bfa 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1619,7 +1619,6 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad,
struct ice_adv_rule_info *rule_info)
{
const struct rte_flow_action_ethdev *act_ethdev;
- const struct rte_flow_action_vf *act_vf;
const struct rte_flow_action *action;
const struct rte_eth_dev *repr_dev;
enum rte_flow_action_type action_type;
@@ -1629,26 +1628,6 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad,
RTE_FLOW_ACTION_TYPE_END; action++) {
action_type = action->type;
switch (action_type) {
- case RTE_FLOW_ACTION_TYPE_VF:
- rule_info->sw_act.fltr_act = ICE_FWD_TO_VSI;
- act_vf = action->conf;
-
- if (act_vf->id >= ad->real_hw.num_vfs &&
- !act_vf->original) {
- rte_flow_error_set(error,
- EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
- actions,
- "Invalid vf id");
- return -rte_errno;
- }
-
- if (act_vf->original)
- rule_info->sw_act.vsi_handle =
- ad->real_hw.avf.bus.func;
- else
- rule_info->sw_act.vsi_handle = act_vf->id;
- break;
-
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
rule_info->sw_act.fltr_act = ICE_FWD_TO_VSI;
act_ethdev = action->conf;
@@ -1812,7 +1791,6 @@ ice_switch_check_action(const struct rte_flow_action *actions,
RTE_FLOW_ACTION_TYPE_END; action++) {
action_type = action->type;
switch (action_type) {
- case RTE_FLOW_ACTION_TYPE_VF:
case RTE_FLOW_ACTION_TYPE_RSS:
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_DROP:
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH] eventdev: add weight and affinity attributes to queue conf
@ 2022-08-10 7:36 5% Shijith Thotton
0 siblings, 0 replies; 200+ results
From: Shijith Thotton @ 2022-08-10 7:36 UTC (permalink / raw)
To: jerinj; +Cc: Shijith Thotton, dev, Ray Kinsella, Pavan Nikhilesh
Added new fields to represent event queue weight and affinity in
rte_event_queue_conf structure. Internal op to get queue attribute is
removed as it is no longer needed. Updated driver to use the new field.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
doc/guides/rel_notes/deprecation.rst | 3 --
doc/guides/rel_notes/release_22_11.rst | 3 ++
drivers/event/cnxk/cn10k_eventdev.c | 1 -
drivers/event/cnxk/cn9k_eventdev.c | 1 -
drivers/event/cnxk/cnxk_eventdev.c | 42 ++++++--------------------
drivers/event/cnxk/cnxk_eventdev.h | 9 ------
lib/eventdev/eventdev_pmd.h | 22 --------------
lib/eventdev/rte_eventdev.c | 10 +++---
lib/eventdev/rte_eventdev.h | 16 ++++++++++
9 files changed, 33 insertions(+), 74 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..13e7c6370e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -206,9 +206,6 @@ Deprecation Notices
``rte_event_vector::elem_offset`` gives the number of valid elements left
to process from the ``rte_event_vector::elem_offset``.
-* eventdev: New fields to represent event queue weight and affinity
- will be added to ``rte_event_queue_conf`` structure in DPDK 22.11.
-
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..8ffd71e650 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -88,6 +88,9 @@ API Changes
ABI Changes
-----------
+* eventdev: Added ``weight`` and ``affinity`` fields to ``rte_event_queue_conf``
+ structure.
+
.. This section should contain ABI changes. Sample format:
* sample: Add a short 1-2 sentence description of the ABI change
diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index 5a0cab40a9..aa8ae394bc 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -922,7 +922,6 @@ static struct eventdev_ops cn10k_sso_dev_ops = {
.queue_def_conf = cnxk_sso_queue_def_conf,
.queue_setup = cnxk_sso_queue_setup,
.queue_release = cnxk_sso_queue_release,
- .queue_attr_get = cnxk_sso_queue_attribute_get,
.queue_attr_set = cnxk_sso_queue_attribute_set,
.port_def_conf = cnxk_sso_port_def_conf,
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 2e27030049..58c72a580a 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -1153,7 +1153,6 @@ static struct eventdev_ops cn9k_sso_dev_ops = {
.queue_def_conf = cnxk_sso_queue_def_conf,
.queue_setup = cnxk_sso_queue_setup,
.queue_release = cnxk_sso_queue_release,
- .queue_attr_get = cnxk_sso_queue_attribute_get,
.queue_attr_set = cnxk_sso_queue_attribute_set,
.port_def_conf = cnxk_sso_port_def_conf,
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 97dcf7b66e..45c53ffb4e 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -321,6 +321,8 @@ cnxk_sso_queue_def_conf(struct rte_eventdev *event_dev, uint8_t queue_id,
queue_conf->nb_atomic_order_sequences = (1ULL << 20);
queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES;
queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
+ queue_conf->weight = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
+ queue_conf->affinity = RTE_EVENT_QUEUE_AFFINITY_HIGHEST;
}
int
@@ -330,18 +332,12 @@ cnxk_sso_queue_setup(struct rte_eventdev *event_dev, uint8_t queue_id,
struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
uint8_t priority, weight, affinity;
- /* Default weight and affinity */
- dev->mlt_prio[queue_id].weight = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
- dev->mlt_prio[queue_id].affinity = RTE_EVENT_QUEUE_AFFINITY_HIGHEST;
-
priority = CNXK_QOS_NORMALIZE(queue_conf->priority, 0,
RTE_EVENT_DEV_PRIORITY_LOWEST,
CNXK_SSO_PRIORITY_CNT);
- weight = CNXK_QOS_NORMALIZE(
- dev->mlt_prio[queue_id].weight, CNXK_SSO_WEIGHT_MIN,
- RTE_EVENT_QUEUE_WEIGHT_HIGHEST, CNXK_SSO_WEIGHT_CNT);
- affinity = CNXK_QOS_NORMALIZE(dev->mlt_prio[queue_id].affinity, 0,
- RTE_EVENT_QUEUE_AFFINITY_HIGHEST,
+ weight = CNXK_QOS_NORMALIZE(queue_conf->weight, CNXK_SSO_WEIGHT_MIN,
+ RTE_EVENT_QUEUE_WEIGHT_HIGHEST, CNXK_SSO_WEIGHT_CNT);
+ affinity = CNXK_QOS_NORMALIZE(queue_conf->affinity, 0, RTE_EVENT_QUEUE_AFFINITY_HIGHEST,
CNXK_SSO_AFFINITY_CNT);
plt_sso_dbg("Queue=%u prio=%u weight=%u affinity=%u", queue_id,
@@ -358,22 +354,6 @@ cnxk_sso_queue_release(struct rte_eventdev *event_dev, uint8_t queue_id)
RTE_SET_USED(queue_id);
}
-int
-cnxk_sso_queue_attribute_get(struct rte_eventdev *event_dev, uint8_t queue_id,
- uint32_t attr_id, uint32_t *attr_value)
-{
- struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
-
- if (attr_id == RTE_EVENT_QUEUE_ATTR_WEIGHT)
- *attr_value = dev->mlt_prio[queue_id].weight;
- else if (attr_id == RTE_EVENT_QUEUE_ATTR_AFFINITY)
- *attr_value = dev->mlt_prio[queue_id].affinity;
- else
- return -EINVAL;
-
- return 0;
-}
-
int
cnxk_sso_queue_attribute_set(struct rte_eventdev *event_dev, uint8_t queue_id,
uint32_t attr_id, uint64_t attr_value)
@@ -389,10 +369,10 @@ cnxk_sso_queue_attribute_set(struct rte_eventdev *event_dev, uint8_t queue_id,
conf->priority = attr_value;
break;
case RTE_EVENT_QUEUE_ATTR_WEIGHT:
- dev->mlt_prio[queue_id].weight = attr_value;
+ conf->weight = attr_value;
break;
case RTE_EVENT_QUEUE_ATTR_AFFINITY:
- dev->mlt_prio[queue_id].affinity = attr_value;
+ conf->affinity = attr_value;
break;
case RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS:
case RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES:
@@ -409,11 +389,9 @@ cnxk_sso_queue_attribute_set(struct rte_eventdev *event_dev, uint8_t queue_id,
priority = CNXK_QOS_NORMALIZE(conf->priority, 0,
RTE_EVENT_DEV_PRIORITY_LOWEST,
CNXK_SSO_PRIORITY_CNT);
- weight = CNXK_QOS_NORMALIZE(
- dev->mlt_prio[queue_id].weight, CNXK_SSO_WEIGHT_MIN,
- RTE_EVENT_QUEUE_WEIGHT_HIGHEST, CNXK_SSO_WEIGHT_CNT);
- affinity = CNXK_QOS_NORMALIZE(dev->mlt_prio[queue_id].affinity, 0,
- RTE_EVENT_QUEUE_AFFINITY_HIGHEST,
+ weight = CNXK_QOS_NORMALIZE(conf->weight, CNXK_SSO_WEIGHT_MIN,
+ RTE_EVENT_QUEUE_WEIGHT_HIGHEST, CNXK_SSO_WEIGHT_CNT);
+ affinity = CNXK_QOS_NORMALIZE(conf->affinity, 0, RTE_EVENT_QUEUE_AFFINITY_HIGHEST,
CNXK_SSO_AFFINITY_CNT);
return roc_sso_hwgrp_set_priority(&dev->sso, queue_id, weight, affinity,
diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk_eventdev.h
index bfd0c5627e..d78fb4ea2f 100644
--- a/drivers/event/cnxk/cnxk_eventdev.h
+++ b/drivers/event/cnxk/cnxk_eventdev.h
@@ -88,11 +88,6 @@ struct cnxk_sso_qos {
uint16_t iaq_prcnt;
};
-struct cnxk_sso_mlt_prio {
- uint8_t weight;
- uint8_t affinity;
-};
-
struct cnxk_sso_evdev {
struct roc_sso sso;
uint8_t max_event_queues;
@@ -123,7 +118,6 @@ struct cnxk_sso_evdev {
uint64_t *timer_adptr_sz;
uint16_t vec_pool_cnt;
uint64_t *vec_pools;
- struct cnxk_sso_mlt_prio mlt_prio[RTE_EVENT_MAX_QUEUES_PER_DEV];
/* Dev args */
uint32_t xae_cnt;
uint8_t qos_queue_cnt;
@@ -250,9 +244,6 @@ void cnxk_sso_queue_def_conf(struct rte_eventdev *event_dev, uint8_t queue_id,
int cnxk_sso_queue_setup(struct rte_eventdev *event_dev, uint8_t queue_id,
const struct rte_event_queue_conf *queue_conf);
void cnxk_sso_queue_release(struct rte_eventdev *event_dev, uint8_t queue_id);
-int cnxk_sso_queue_attribute_get(struct rte_eventdev *event_dev,
- uint8_t queue_id, uint32_t attr_id,
- uint32_t *attr_value);
int cnxk_sso_queue_attribute_set(struct rte_eventdev *event_dev,
uint8_t queue_id, uint32_t attr_id,
uint64_t attr_value);
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 69402668d8..8879e43feb 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -341,26 +341,6 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
uint8_t queue_id);
-/**
- * Get an event queue attribute at runtime.
- *
- * @param dev
- * Event device pointer
- * @param queue_id
- * Event queue index
- * @param attr_id
- * Event queue attribute id
- * @param[out] attr_value
- * Event queue attribute value
- *
- * @return
- * - 0: Success.
- * - <0: Error code on failure.
- */
-typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
- uint8_t queue_id, uint32_t attr_id,
- uint32_t *attr_value);
-
/**
* Set an event queue attribute at runtime.
*
@@ -1268,8 +1248,6 @@ struct eventdev_ops {
/**< Set up an event queue. */
eventdev_queue_release_t queue_release;
/**< Release an event queue. */
- eventdev_queue_attr_get_t queue_attr_get;
- /**< Get an event queue attribute. */
eventdev_queue_attr_set_t queue_attr_set;
/**< Set an event queue attribute. */
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 1dc4f966be..b96185b25d 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -859,15 +859,13 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
break;
case RTE_EVENT_QUEUE_ATTR_WEIGHT:
*attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
- if (dev->dev_ops->queue_attr_get)
- return (*dev->dev_ops->queue_attr_get)(
- dev, queue_id, attr_id, attr_value);
+ if (dev->data->event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_QOS)
+ *attr_value = conf->weight;
break;
case RTE_EVENT_QUEUE_ATTR_AFFINITY:
*attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
- if (dev->dev_ops->queue_attr_get)
- return (*dev->dev_ops->queue_attr_get)(
- dev, queue_id, attr_id, attr_value);
+ if (dev->data->event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_QOS)
+ *attr_value = conf->affinity;
break;
default:
return -EINVAL;
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index 6a6f6ea4c1..f1908b82b2 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -640,6 +640,22 @@ struct rte_event_queue_conf {
* event device supported priority value.
* Valid when the device has RTE_EVENT_DEV_CAP_QUEUE_QOS capability
*/
+ uint8_t weight;
+ /**< Weight of the event queue relative to other event queues.
+ * The requested weight should be in the range of
+ * [RTE_EVENT_DEV_WEIGHT_HIGHEST, RTE_EVENT_DEV_WEIGHT_LOWEST].
+ * The implementation shall normalize the requested weight to event
+ * device supported weight value.
+ * Valid when the device has RTE_EVENT_DEV_CAP_QUEUE_QOS capability.
+ */
+ uint8_t affinity;
+ /**< Affinity of the event queue relative to other event queues.
+ * The requested affinity should be in the range of
+ * [RTE_EVENT_DEV_AFFINITY_HIGHEST, RTE_EVENT_DEV_AFFINITY_LOWEST].
+ * The implementation shall normalize the requested affinity to event
+ * device supported affinity value.
+ * Valid when the device has RTE_EVENT_DEV_CAP_QUEUE_QOS capability.
+ */
};
/**
--
2.25.1
^ permalink raw reply [relevance 5%]
* Re: [PATCH] usertools: fix bind failure from dpdk to kernel
2022-08-10 5:59 4% ` Krzysztof Kozlowski
@ 2022-08-10 13:49 3% ` Stephen Hemminger
2022-08-11 2:10 0% ` lihuisong (C)
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-08-10 13:49 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: lihuisong (C),
dev, andrew.rybchenko, thomas, ferruh.yigit, huangdaode,
liudongdong3
On Wed, 10 Aug 2022 08:59:15 +0300
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 09/08/2022 14:44, lihuisong (C) wrote:
> >
> > 在 2022/8/5 23:35, Stephen Hemminger 写道:
> >> On Fri, 5 Aug 2022 11:10:22 +0800
> >> Huisong Li <lihuisong@huawei.com> wrote:
> >>
> >>> Currently, the steps for binding device from dpdk driver to kernel
> >>> driver is as follows:
> >>> echo $BDF > /sys/bus/pci/drivers/vfio-pci/unbind
> >>> echo $BDF > /sys/bus/pci/drivers/$kernel_driver/bind
> >>>
> >>> This steps cannot bind device from dpdk driver to kernel driver on
> >>> platform with kernel 5.19. The 'driver_override' must be specify
> >>> kernel driver before binding device to kernel driver.
> >>>
> >>> Fixes: 720b7a058260 ("usertools: fix device binding with kernel tools")
> >>> Cc: stable@dpdk.org
> >>>
> >>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> >> Not sure exactly what you did and why.
> >> The patch seems to just remove the check that the driver
> >> is in the set of dpdk_drivers.
> >> .
> > Currently, the end of the operation binding device from kernel driver to
> > dpdk driver write '\00' to driver_override file so as to this device can
> > be bound to any other driver.
>
> This could have work but this was not the way to use the
> driver_override. The kernel ABI document clearly states:
> "and may be cleared with an empty string (echo > driver_override)."
> Documentation/ABI/testing/sysfs-bus-pci
>
> Please use the kernel ABI how it is described. Using it in wrong way
> might sometimes work, sometimes not.
No, the kernel ABI is what ever worked before.
The documentation is not the definitive standard.
^ permalink raw reply [relevance 3%]
* Re: [PATCH] usertools: fix bind failure from dpdk to kernel
2022-08-10 6:02 3% ` Krzysztof Kozlowski
@ 2022-08-10 13:50 0% ` Stephen Hemminger
0 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-08-10 13:50 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: lihuisong (C),
dev, andrew.rybchenko, thomas, ferruh.yigit, huangdaode,
liudongdong3
On Wed, 10 Aug 2022 09:02:57 +0300
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 09/08/2022 20:58, Stephen Hemminger wrote:
> >>
> >> However, due to the patch[1] merged into 5.19 kernel, 'driver_override'
> >> in the pci_dev is no longer NULL by writing '\00' to driver_override file.
> >> This causes PCI match device failure and the device will never be bound to
> >> their kernel driver.
> >
> >
> > Linux kernel does not look favorably on API changes and that looks like
> > the kernel changed behavior. That should be reported and fixed there.
>
> To clarify around this issue:
>
> There were no API changes. Linux kernel follows the API exactly how it
> is described in the API document since 2014:
> Documentation/ABI/testing/sysfs-bus-pci
>
> There was no change in kernel API.
>
> There was a change in undocumented, unsupported and wrong usage of
> driver_override API.
>
> Best regards,
> Krzysztof
Linux documentation is not the standard, the code is.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] usertools: fix bind failure from dpdk to kernel
2022-08-10 13:49 3% ` Stephen Hemminger
@ 2022-08-11 2:10 0% ` lihuisong (C)
0 siblings, 0 replies; 200+ results
From: lihuisong (C) @ 2022-08-11 2:10 UTC (permalink / raw)
To: Stephen Hemminger, Krzysztof Kozlowski
Cc: dev, andrew.rybchenko, thomas, ferruh.yigit, huangdaode, liudongdong3
在 2022/8/10 21:49, Stephen Hemminger 写道:
> On Wed, 10 Aug 2022 08:59:15 +0300
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
>> On 09/08/2022 14:44, lihuisong (C) wrote:
>>> 在 2022/8/5 23:35, Stephen Hemminger 写道:
>>>> On Fri, 5 Aug 2022 11:10:22 +0800
>>>> Huisong Li <lihuisong@huawei.com> wrote:
>>>>
>>>>> Currently, the steps for binding device from dpdk driver to kernel
>>>>> driver is as follows:
>>>>> echo $BDF > /sys/bus/pci/drivers/vfio-pci/unbind
>>>>> echo $BDF > /sys/bus/pci/drivers/$kernel_driver/bind
>>>>>
>>>>> This steps cannot bind device from dpdk driver to kernel driver on
>>>>> platform with kernel 5.19. The 'driver_override' must be specify
>>>>> kernel driver before binding device to kernel driver.
>>>>>
>>>>> Fixes: 720b7a058260 ("usertools: fix device binding with kernel tools")
>>>>> Cc: stable@dpdk.org
>>>>>
>>>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>>>> Not sure exactly what you did and why.
>>>> The patch seems to just remove the check that the driver
>>>> is in the set of dpdk_drivers.
>>>> .
>>> Currently, the end of the operation binding device from kernel driver to
>>> dpdk driver write '\00' to driver_override file so as to this device can
>>> be bound to any other driver.
>> This could have work but this was not the way to use the
>> driver_override. The kernel ABI document clearly states:
>> "and may be cleared with an empty string (echo > driver_override)."
>> Documentation/ABI/testing/sysfs-bus-pci
>>
>> Please use the kernel ABI how it is described. Using it in wrong way
>> might sometimes work, sometimes not.
> No, the kernel ABI is what ever worked before.
> The documentation is not the definitive standard.
> .
Before:
Writing "\0" or "\n" to driver_override file can clear
'driver_override' in the pci_dev.
Now(5.19 kernel):
Only "\n" can clear 'driver_override'.
Note: for 'echo > driver_override', the 'buf'
in driver_override_store() is equal to "\n".
^ permalink raw reply [relevance 0%]
* Re: [PATCH] usertools: fix bind failure from dpdk to kernel
@ 2022-08-10 5:59 4% ` Krzysztof Kozlowski
2022-08-10 13:49 3% ` Stephen Hemminger
1 sibling, 1 reply; 200+ results
From: Krzysztof Kozlowski @ 2022-08-10 5:59 UTC (permalink / raw)
To: lihuisong (C), Stephen Hemminger
Cc: dev, andrew.rybchenko, thomas, ferruh.yigit, huangdaode, liudongdong3
On 09/08/2022 14:44, lihuisong (C) wrote:
>
> 在 2022/8/5 23:35, Stephen Hemminger 写道:
>> On Fri, 5 Aug 2022 11:10:22 +0800
>> Huisong Li <lihuisong@huawei.com> wrote:
>>
>>> Currently, the steps for binding device from dpdk driver to kernel
>>> driver is as follows:
>>> echo $BDF > /sys/bus/pci/drivers/vfio-pci/unbind
>>> echo $BDF > /sys/bus/pci/drivers/$kernel_driver/bind
>>>
>>> This steps cannot bind device from dpdk driver to kernel driver on
>>> platform with kernel 5.19. The 'driver_override' must be specify
>>> kernel driver before binding device to kernel driver.
>>>
>>> Fixes: 720b7a058260 ("usertools: fix device binding with kernel tools")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> Not sure exactly what you did and why.
>> The patch seems to just remove the check that the driver
>> is in the set of dpdk_drivers.
>> .
> Currently, the end of the operation binding device from kernel driver to
> dpdk driver write '\00' to driver_override file so as to this device can
> be bound to any other driver.
This could have work but this was not the way to use the
driver_override. The kernel ABI document clearly states:
"and may be cleared with an empty string (echo > driver_override)."
Documentation/ABI/testing/sysfs-bus-pci
Please use the kernel ABI how it is described. Using it in wrong way
might sometimes work, sometimes not.
> And perform following steps to
> bind device dpdk driver to kernel driver:
> echo $BDF > /sys/bus/pci/drivers/vfio-pci/unbind
> echo $BDF > /sys/bus/pci/drivers/$kernel_driver/bind
>
> However, due to the patch[1] merged into 5.19 kernel, 'driver_override'
> in the pci_dev is no longer NULL by writing '\00' to driver_override file.
> This causes PCI match device failure and the device will never be bound to
> their kernel driver.
>
> In 5.19 kernel, I found that dpdk-devbind.py need to write '\n' to
> driver_override file if we want to bind divce to any other driver.
> But I think it is not necessary to write empty to driver_override
> file.
It is necessary because in 2014 it was described that PCI
driver_override works like that. What you are implying here is that "it
is not necessary to follow the API and we can do it differently"...
> After all, the device has only one kernel driver, and binding
> to dpdk driver(like, vfio-pci) must specify driver_override.
>
> [1] 23d99baf9d72 ("PCI: Use driver_set_override() instead of open-coding")
Best regards,
Krzysztof
^ permalink raw reply [relevance 4%]
* Re: [PATCH] usertools: fix bind failure from dpdk to kernel
@ 2022-08-10 6:02 3% ` Krzysztof Kozlowski
2022-08-10 13:50 0% ` Stephen Hemminger
0 siblings, 1 reply; 200+ results
From: Krzysztof Kozlowski @ 2022-08-10 6:02 UTC (permalink / raw)
To: Stephen Hemminger, lihuisong (C)
Cc: dev, andrew.rybchenko, thomas, ferruh.yigit, huangdaode, liudongdong3
On 09/08/2022 20:58, Stephen Hemminger wrote:
>>
>> However, due to the patch[1] merged into 5.19 kernel, 'driver_override'
>> in the pci_dev is no longer NULL by writing '\00' to driver_override file.
>> This causes PCI match device failure and the device will never be bound to
>> their kernel driver.
>
>
> Linux kernel does not look favorably on API changes and that looks like
> the kernel changed behavior. That should be reported and fixed there.
To clarify around this issue:
There were no API changes. Linux kernel follows the API exactly how it
is described in the API document since 2014:
Documentation/ABI/testing/sysfs-bus-pci
There was no change in kernel API.
There was a change in undocumented, unsupported and wrong usage of
driver_override API.
Best regards,
Krzysztof
^ permalink raw reply [relevance 3%]
* [PATCH] ethdev: remove header split Rx offload
@ 2022-08-11 9:20 3% xuan.ding
2022-08-12 3:13 2% ` [PATCH v2] " xuan.ding
0 siblings, 1 reply; 200+ results
From: xuan.ding @ 2022-08-11 9:20 UTC (permalink / raw)
To: thomas, andrew.rybchenko, ferruh.yigit, viacheslavo, jerinj,
cristian.dumitrescu, aman.deep.singh, yuying.zhang, chas3,
humin29, gakhil, qi.z.zhang, xiao.w.wang, qiming.yang,
wenjun1.wu, mdr, ndabilpuram, kirankumark, skori, skoteshwar,
grive, beilei.xing, zr, lironh, mczekaj, orika,
konstantin.v.ananyev, radu.nicolau, pbhagavatula,
bruce.richardson, anatoly.burakov, jingjing.wu, junfeng.guo,
jasvinder.singh, maxime.coquelin, chenbo.xia
Cc: dev, Xuan Ding
From: Xuan Ding <xuan.ding@intel.com>
As announced in the deprecation note, this patch removes the Rx offload
flag 'RTE_ETH_RX_OFFLOAD_HEADER_SPLIT' and 'split_hdr_size' field from
the structure 'rte_eth_rxmode'. User can still use
`RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT` for per-queue packet split offload,
which is configured by 'rte_eth_rxseg_split'.
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---
app/test-eventdev/test_perf_common.c | 1 -
app/test-pipeline/init.c | 1 -
app/test-pmd/cmdline.c | 12 ++++++------
app/test/test_link_bonding.c | 1 -
app/test/test_link_bonding_mode4.c | 1 -
| 2 --
app/test/test_pmd_perf.c | 1 -
app/test/test_security_inline_proto.c | 1 -
doc/guides/nics/fm10k.rst | 4 ----
doc/guides/nics/ixgbe.rst | 4 ----
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_22_11.rst | 5 +++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++--
drivers/net/cnxk/cnxk_ethdev_ops.c | 1 -
drivers/net/failsafe/failsafe_ops.c | 2 --
drivers/net/fm10k/fm10k_ethdev.c | 1 -
drivers/net/fm10k/fm10k_rxtx_vec.c | 4 ----
drivers/net/i40e/i40e_rxtx_vec_common.h | 4 ----
drivers/net/mvneta/mvneta_ethdev.c | 5 -----
drivers/net/mvpp2/mrvl_ethdev.c | 5 -----
drivers/net/thunderx/nicvf_ethdev.c | 5 -----
examples/bond/main.c | 1 -
examples/flow_filtering/main.c | 3 ---
examples/ip_fragmentation/main.c | 1 -
examples/ip_pipeline/link.c | 1 -
examples/ip_reassembly/main.c | 1 -
examples/ipsec-secgw/ipsec-secgw.c | 1 -
examples/l2fwd-event/l2fwd_common.c | 3 ---
examples/l2fwd-jobstats/main.c | 3 ---
examples/l2fwd-keepalive/main.c | 3 ---
examples/l2fwd/main.c | 3 ---
examples/link_status_interrupt/main.c | 3 ---
examples/multi_process/symmetric_mp/main.c | 1 -
examples/ntb/ntb_fwd.c | 1 -
examples/pipeline/obj.c | 1 -
examples/qos_meter/main.c | 1 -
examples/qos_sched/init.c | 3 ---
examples/vhost/main.c | 1 -
lib/ethdev/rte_ethdev.c | 1 -
lib/ethdev/rte_ethdev.h | 3 ---
40 files changed, 13 insertions(+), 92 deletions(-)
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 81420be73a..7474b9270a 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -1244,7 +1244,6 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index eee0719b67..d146c44be0 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -68,7 +68,6 @@ struct app_params app = {
static struct rte_eth_conf port_conf = {
.rxmode = {
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b4fe9dfb17..5787659c32 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -745,7 +745,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"port config <port_id> rx_offload vlan_strip|"
"ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
- "outer_ipv4_cksum|macsec_strip|header_split|"
+ "outer_ipv4_cksum|macsec_strip|"
"vlan_filter|vlan_extend|jumbo_frame|scatter|"
"buffer_split|timestamp|security|keep_crc on|off\n"
" Enable or disable a per port Rx offloading"
@@ -753,7 +753,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"port (port_id) rxq (queue_id) rx_offload vlan_strip|"
"ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
- "outer_ipv4_cksum|macsec_strip|header_split|"
+ "outer_ipv4_cksum|macsec_strip|"
"vlan_filter|vlan_extend|jumbo_frame|scatter|"
"buffer_split|timestamp|security|keep_crc on|off\n"
" Enable or disable a per queue Rx offloading"
@@ -12522,7 +12522,7 @@ static cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_offloa
(struct cmd_config_per_port_rx_offload_result,
offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"
- "header_split#vlan_filter#vlan_extend#jumbo_frame#"
+ "vlan_filter#vlan_extend#jumbo_frame#"
"scatter#buffer_split#timestamp#security#"
"keep_crc#rss_hash");
static cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
@@ -12604,7 +12604,7 @@ static cmdline_parse_inst_t cmd_config_per_port_rx_offload = {
.data = NULL,
.help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
- "macsec_strip|header_split|vlan_filter|vlan_extend|"
+ "macsec_strip|vlan_filter|vlan_extend|"
"jumbo_frame|scatter|buffer_split|timestamp|security|"
"keep_crc|rss_hash on|off",
.tokens = {
@@ -12654,7 +12654,7 @@ static cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_offlo
(struct cmd_config_per_queue_rx_offload_result,
offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"
- "header_split#vlan_filter#vlan_extend#jumbo_frame#"
+ "vlan_filter#vlan_extend#jumbo_frame#"
"scatter#buffer_split#timestamp#security#keep_crc");
static cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
TOKEN_STRING_INITIALIZER
@@ -12712,7 +12712,7 @@ static cmdline_parse_inst_t cmd_config_per_queue_rx_offload = {
.help_str = "port <port_id> rxq <queue_id> rx_offload "
"vlan_strip|ipv4_cksum|"
"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
- "macsec_strip|header_split|vlan_filter|vlan_extend|"
+ "macsec_strip|vlan_filter|vlan_extend|"
"jumbo_frame|scatter|buffer_split|timestamp|security|"
"keep_crc on|off",
.tokens = {
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 194ed5a7ec..977ddc1c00 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -135,7 +135,6 @@ static uint16_t vlan_id = 0x100;
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index d9b9c323c7..21c512c94b 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -108,7 +108,6 @@ static struct link_bonding_unittest_params test_params = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
--git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index b3d71c6f3a..464fb2dbd0 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -81,7 +81,6 @@ static struct link_bonding_rssconf_unittest_params test_params = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
@@ -92,7 +91,6 @@ static struct rte_eth_conf default_pmd_conf = {
static struct rte_eth_conf rss_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index ec3dc251d1..34551e9b1a 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -62,7 +62,6 @@ static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 5f26a04b06..0e5f69e636 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -73,7 +73,6 @@ static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM |
RTE_ETH_RX_OFFLOAD_SECURITY,
},
diff --git a/doc/guides/nics/fm10k.rst b/doc/guides/nics/fm10k.rst
index d6efac0917..c0a37d35cc 100644
--- a/doc/guides/nics/fm10k.rst
+++ b/doc/guides/nics/fm10k.rst
@@ -63,8 +63,6 @@ vPMD. They are:
* Flow director
-* Header split
-
* RX checksum offload
Other features are supported using optional MACRO configuration. They include:
@@ -82,8 +80,6 @@ will be checked:
* ``RTE_ETH_RX_OFFLOAD_CHECKSUM``
-* ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
-
* ``fdir_conf->mode``
diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index ad1a3da610..868d4c08cc 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -77,8 +77,6 @@ They are:
* FDIR
-* Header split
-
* RX checksum off load
Other features are supported using optional MACRO configuration. They include:
@@ -95,8 +93,6 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
* RTE_ETH_RX_OFFLOAD_CHECKSUM
-* RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
-
* dev_conf
fdir_conf->mode will also be checked.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..7ceb0c9955 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -92,12 +92,6 @@ Deprecation Notices
The ``rate`` parameter will be modified to ``uint32_t`` in DPDK 22.11
so that it can work for more than 64 Gbps.
-* ethdev: Since no single PMD supports ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
- offload and the ``split_hdr_size`` field in structure ``rte_eth_rxmode``
- to enable per-port header split, they will be removed in DPDK 22.11.
- The per-queue Rx packet split offload ``RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT``
- can still be used, and it is configured by ``rte_eth_rxseg_split``.
-
* ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
will be removed in DPDK 20.11.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..d28e07b2d6 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -100,6 +100,11 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=======================================================
+ * ethdev: Removed the Rx offload flag ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
+ and field ``split_hdr_size`` from the structure ``rte_eth_rxmode`` used
+ to configure header split. Instead, user can still use
+ ``RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT`` for per-queue packet split
+ offlod, which is configured by ``rte_eth_rxseg_split``.
Known Issues
------------
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 330e34427d..0093fbfcff 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1626,7 +1626,7 @@ Enable or disable a per port Rx offloading on all Rx queues of a port::
* ``offloading``: can be any of these offloading capability:
vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
qinq_strip, outer_ipv4_cksum, macsec_strip,
- header_split, vlan_filter, vlan_extend, jumbo_frame,
+ vlan_filter, vlan_extend, jumbo_frame,
scatter, timestamp, security, keep_crc, rss_hash
This command should be run when the port is stopped, or else it will fail.
@@ -1641,7 +1641,7 @@ Enable or disable a per queue Rx offloading only on a specific Rx queue::
* ``offloading``: can be any of these offloading capability:
vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
qinq_strip, outer_ipv4_cksum, macsec_strip,
- header_split, vlan_filter, vlan_extend, jumbo_frame,
+ vlan_filter, vlan_extend, jumbo_frame,
scatter, timestamp, security, keep_crc
This command should be run when the port is stopped, or else it will fail.
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 1592971073..8c81d8a862 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -90,7 +90,6 @@ cnxk_nix_rx_burst_mode_get(struct rte_eth_dev *eth_dev, uint16_t queue_id,
{RTE_ETH_RX_OFFLOAD_QINQ_STRIP, " QinQ VLAN Strip,"},
{RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM, " Outer IPv4 Checksum,"},
{RTE_ETH_RX_OFFLOAD_MACSEC_STRIP, " MACsec Strip,"},
- {RTE_ETH_RX_OFFLOAD_HEADER_SPLIT, " Header Split,"},
{RTE_ETH_RX_OFFLOAD_VLAN_FILTER, " VLAN Filter,"},
{RTE_ETH_RX_OFFLOAD_VLAN_EXTEND, " VLAN Extend,"},
{RTE_ETH_RX_OFFLOAD_SCATTER, " Scattered,"},
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 55e21d635c..86b4749f30 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1187,7 +1187,6 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_MACSEC_STRIP |
- RTE_ETH_RX_OFFLOAD_HEADER_SPLIT |
RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
RTE_ETH_RX_OFFLOAD_SCATTER |
@@ -1204,7 +1203,6 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_MACSEC_STRIP |
- RTE_ETH_RX_OFFLOAD_HEADER_SPLIT |
RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
RTE_ETH_RX_OFFLOAD_SCATTER |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..3f96703991 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1779,7 +1779,6 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
RTE_ETH_RX_OFFLOAD_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_UDP_CKSUM |
RTE_ETH_RX_OFFLOAD_TCP_CKSUM |
- RTE_ETH_RX_OFFLOAD_HEADER_SPLIT |
RTE_ETH_RX_OFFLOAD_RSS_HASH);
}
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 10ce5a7582..ad998e83bf 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -221,10 +221,6 @@ fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
if (fconf->mode != RTE_FDIR_MODE_NONE)
return -1;
- /* no header split support */
- if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
- return -1;
-
return 0;
#else
RTE_SET_USED(dev);
diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
index 959832ed6a..08266ce1f3 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
@@ -220,10 +220,6 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
if (fconf->mode != RTE_FDIR_MODE_NONE)
return -1;
- /* no header split support */
- if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
- return -1;
-
/* no QinQ support */
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
return -1;
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index eef016aa0b..f9e5b96c77 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -121,11 +121,6 @@ mvneta_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (dev->data->dev_conf.rxmode.split_hdr_size) {
- MVNETA_LOG(INFO, "Split headers not supported");
- return -EINVAL;
- }
-
if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_MULTI_SEGS)
priv->multiseg = 1;
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 735efb6cfc..f0c093e0fd 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -490,11 +490,6 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (dev->data->dev_conf.rxmode.split_hdr_size) {
- MRVL_LOG(INFO, "Split headers not supported");
- return -EINVAL;
- }
-
if (dev->data->dev_conf.rxmode.mtu > priv->max_mtu) {
MRVL_LOG(ERR, "MTU %u is larger than max_mtu %u\n",
dev->data->dev_conf.rxmode.mtu,
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 262c024560..b8b94fc4ff 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -2003,11 +2003,6 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (rxmode->split_hdr_size) {
- PMD_INIT_LOG(INFO, "Rxmode does not support split header");
- return -EINVAL;
- }
-
if (conf->dcb_capability_en) {
PMD_INIT_LOG(INFO, "DCB enable not supported");
return -EINVAL;
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 4efebb3902..9b076bb39f 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -115,7 +115,6 @@ static struct rte_mempool *mbuf_pool;
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index bfc1949c84..f11f91a67c 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -133,9 +133,6 @@ init_port(void)
uint16_t i;
/* Ethernet port configured with default settings. 8< */
struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.offloads =
RTE_ETH_TX_OFFLOAD_VLAN_INSERT |
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 78205d2e12..69378f99e6 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -147,7 +147,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.mtu = JUMBO_FRAME_MAX_SIZE - RTE_ETHER_HDR_LEN -
RTE_ETHER_CRC_LEN,
- .split_hdr_size = 0,
.offloads = (RTE_ETH_RX_OFFLOAD_CHECKSUM |
RTE_ETH_RX_OFFLOAD_SCATTER),
},
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 0290767af4..4d69ebebfb 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -47,7 +47,6 @@ static struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
.mtu = 9000 - (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN), /* Jumbo frame MTU */
- .split_hdr_size = 0, /* Header split buffer size */
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 3ebf895aa0..4cfe09f9d7 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -163,7 +163,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
.mtu = JUMBO_FRAME_MAX_SIZE - RTE_ETHER_HDR_LEN -
RTE_ETHER_CRC_LEN,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 815b9254ae..a0b221a447 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -234,7 +234,6 @@ struct lcore_conf lcore_conf[RTE_MAX_LCORE];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
index 41a0d3f22f..162f880224 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -10,9 +10,6 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 9e71ba2d4e..4be598110c 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -89,9 +89,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index bd0aa7ea7a..72f9ece3c6 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -78,9 +78,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 281c6b7a3f..ca802b5fc5 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -93,9 +93,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9699e14ce6..4ac53c42a0 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -78,9 +78,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
/* Global configuration stored in a static structure. 8< */
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 75237dee6e..1ff85875df 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -176,7 +176,6 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 81964d0308..8cfee864af 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -90,7 +90,6 @@ static uint16_t pkt_burst = NTB_DFLT_PKT_BURST;
static struct rte_eth_conf eth_port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/pipeline/obj.c b/examples/pipeline/obj.c
index b79f044ac7..908b66274a 100644
--- a/examples/pipeline/obj.c
+++ b/examples/pipeline/obj.c
@@ -129,7 +129,6 @@ static struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
.mtu = 9000 - (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN), /* Jumbo frame MTU */
- .split_hdr_size = 0, /* Header split buffer size */
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index a0f78e4ad6..319d0a96b2 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -52,7 +52,6 @@ static struct rte_mempool *pool = NULL;
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..6bd342aba2 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -56,9 +56,6 @@ int mp_size = NB_MBUF;
struct flow_conf qos_conf[MAX_DATA_STREAMS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 7e1666f42a..504f5540ae 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -125,7 +125,6 @@ static struct vhost_queue_ops vdev_queue_ops[RTE_MAX_VHOST_DEVICE];
static struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_VMDQ_ONLY,
- .split_hdr_size = 0,
/*
* VLAN strip is necessary for 1G NIC such as I350,
* this fixes bug of ipv4 forwarding in guest can't
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 1979dc0850..ba6e8801bf 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -92,7 +92,6 @@ static const struct {
RTE_RX_OFFLOAD_BIT2STR(QINQ_STRIP),
RTE_RX_OFFLOAD_BIT2STR(OUTER_IPV4_CKSUM),
RTE_RX_OFFLOAD_BIT2STR(MACSEC_STRIP),
- RTE_RX_OFFLOAD_BIT2STR(HEADER_SPLIT),
RTE_RX_OFFLOAD_BIT2STR(VLAN_FILTER),
RTE_RX_OFFLOAD_BIT2STR(VLAN_EXTEND),
RTE_RX_OFFLOAD_BIT2STR(SCATTER),
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d..1aaaa613b0 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -471,7 +471,6 @@ struct rte_eth_rxmode {
uint32_t mtu; /**< Requested MTU. */
/** Maximum allowed size of LRO aggregated packet. */
uint32_t max_lro_pkt_size;
- uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
/**
* Per-port Rx offloads to be set using RTE_ETH_RX_OFFLOAD_* flags.
* Only offloads set on rx_offload_capa field on rte_eth_dev_info
@@ -1617,7 +1616,6 @@ struct rte_eth_conf {
#define RTE_ETH_RX_OFFLOAD_QINQ_STRIP RTE_BIT64(5)
#define RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(6)
#define RTE_ETH_RX_OFFLOAD_MACSEC_STRIP RTE_BIT64(7)
-#define RTE_ETH_RX_OFFLOAD_HEADER_SPLIT RTE_BIT64(8)
#define RTE_ETH_RX_OFFLOAD_VLAN_FILTER RTE_BIT64(9)
#define RTE_ETH_RX_OFFLOAD_VLAN_EXTEND RTE_BIT64(10)
#define RTE_ETH_RX_OFFLOAD_SCATTER RTE_BIT64(13)
@@ -1642,7 +1640,6 @@ struct rte_eth_conf {
#define DEV_RX_OFFLOAD_QINQ_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_QINQ_STRIP) RTE_ETH_RX_OFFLOAD_QINQ_STRIP
#define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM
#define DEV_RX_OFFLOAD_MACSEC_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_MACSEC_STRIP) RTE_ETH_RX_OFFLOAD_MACSEC_STRIP
-#define DEV_RX_OFFLOAD_HEADER_SPLIT RTE_DEPRECATED(DEV_RX_OFFLOAD_HEADER_SPLIT) RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
#define DEV_RX_OFFLOAD_VLAN_FILTER RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_FILTER) RTE_ETH_RX_OFFLOAD_VLAN_FILTER
#define DEV_RX_OFFLOAD_VLAN_EXTEND RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_EXTEND) RTE_ETH_RX_OFFLOAD_VLAN_EXTEND
#define DEV_RX_OFFLOAD_SCATTER RTE_DEPRECATED(DEV_RX_OFFLOAD_SCATTER) RTE_ETH_RX_OFFLOAD_SCATTER
--
2.17.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH] net/ice: remove deprecated VF flow action
2022-08-10 6:49 3% [PATCH] net/ice: remove deprecated VF flow action zhichaox.zeng
@ 2022-08-12 2:44 0% ` Zhang, Qi Z
0 siblings, 0 replies; 200+ results
From: Zhang, Qi Z @ 2022-08-12 2:44 UTC (permalink / raw)
To: Zeng, ZhichaoX, dev; +Cc: Yang, Qiming, Zhou, YidingX
> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Wednesday, August 10, 2022 2:50 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice: remove deprecated VF flow action
>
> From: Zhichao Zeng <zhichaox.zeng@intel.com>
>
> According to the ABI and API Deprecation, remove deprecated VF action as
> hard-to-use / ambiguous.
>
> Action REPRESENTED_PORT should be used instead.
>
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [relevance 0%]
* [PATCH v2] ethdev: remove header split Rx offload
2022-08-11 9:20 3% [PATCH] ethdev: remove header split Rx offload xuan.ding
@ 2022-08-12 3:13 2% ` xuan.ding
0 siblings, 0 replies; 200+ results
From: xuan.ding @ 2022-08-12 3:13 UTC (permalink / raw)
To: thomas, andrew.rybchenko, ferruh.yigit, viacheslavo, jerinj,
cristian.dumitrescu, aman.deep.singh, yuying.zhang, chas3,
humin29, gakhil, qi.z.zhang, xiao.w.wang, qiming.yang,
wenjun1.wu, mdr, ndabilpuram, kirankumark, skori, skoteshwar,
grive, beilei.xing, zr, lironh, mczekaj, nicolas.chautru, orika,
konstantin.v.ananyev, radu.nicolau, roy.fan.zhang, pbhagavatula,
bruce.richardson, anatoly.burakov, jingjing.wu, junfeng.guo,
jasvinder.singh, maxime.coquelin, chenbo.xia
Cc: dev, Xuan Ding
From: Xuan Ding <xuan.ding@intel.com>
As announced in the deprecation note, this patch removes the Rx offload
flag 'RTE_ETH_RX_OFFLOAD_HEADER_SPLIT' and 'split_hdr_size' field from
the structure 'rte_eth_rxmode'. Meanwhile, the place where the examples
and apps initialize the 'split_hdr_size' field, and where the drivers
check if the 'split_hdr_size' value is 0 are also removed.
User can still use `RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT` for per-queue packet
split offload, which is configured by 'rte_eth_rxseg_split'.
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---
v2:
* fix CI build error
---
app/test-eventdev/test_perf_common.c | 1 -
app/test-pipeline/init.c | 1 -
app/test-pmd/cmdline.c | 12 ++++++------
app/test/test_link_bonding.c | 1 -
app/test/test_link_bonding_mode4.c | 1 -
| 2 --
app/test/test_pmd_perf.c | 1 -
app/test/test_security_inline_proto.c | 1 -
doc/guides/nics/fm10k.rst | 4 ----
doc/guides/nics/ixgbe.rst | 4 ----
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_22_11.rst | 5 +++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++--
drivers/net/cnxk/cnxk_ethdev_ops.c | 1 -
drivers/net/failsafe/failsafe_ops.c | 2 --
drivers/net/fm10k/fm10k_ethdev.c | 1 -
drivers/net/fm10k/fm10k_rxtx_vec.c | 4 ----
drivers/net/i40e/i40e_rxtx_vec_common.h | 4 ----
drivers/net/mvneta/mvneta_ethdev.c | 5 -----
drivers/net/mvpp2/mrvl_ethdev.c | 5 -----
drivers/net/thunderx/nicvf_ethdev.c | 5 -----
examples/bbdev_app/main.c | 1 -
examples/bond/main.c | 1 -
examples/flow_filtering/main.c | 3 ---
examples/ip_fragmentation/main.c | 1 -
examples/ip_pipeline/link.c | 1 -
examples/ip_reassembly/main.c | 1 -
examples/ipsec-secgw/ipsec-secgw.c | 1 -
examples/ipv4_multicast/main.c | 1 -
examples/l2fwd-crypto/main.c | 1 -
examples/l2fwd-event/l2fwd_common.c | 3 ---
examples/l2fwd-jobstats/main.c | 3 ---
examples/l2fwd-keepalive/main.c | 3 ---
examples/l2fwd/main.c | 3 ---
examples/l3fwd-graph/main.c | 1 -
examples/l3fwd-power/main.c | 1 -
examples/l3fwd/main.c | 1 -
examples/link_status_interrupt/main.c | 3 ---
examples/multi_process/symmetric_mp/main.c | 1 -
examples/ntb/ntb_fwd.c | 1 -
examples/pipeline/obj.c | 1 -
examples/qos_meter/main.c | 1 -
examples/qos_sched/init.c | 3 ---
examples/vhost/main.c | 1 -
examples/vmdq/main.c | 1 -
examples/vmdq_dcb/main.c | 1 -
lib/ethdev/rte_ethdev.c | 1 -
lib/ethdev/rte_ethdev.h | 3 ---
48 files changed, 13 insertions(+), 100 deletions(-)
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 81420be73a..7474b9270a 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -1244,7 +1244,6 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index eee0719b67..d146c44be0 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -68,7 +68,6 @@ struct app_params app = {
static struct rte_eth_conf port_conf = {
.rxmode = {
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b4fe9dfb17..5787659c32 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -745,7 +745,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"port config <port_id> rx_offload vlan_strip|"
"ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
- "outer_ipv4_cksum|macsec_strip|header_split|"
+ "outer_ipv4_cksum|macsec_strip|"
"vlan_filter|vlan_extend|jumbo_frame|scatter|"
"buffer_split|timestamp|security|keep_crc on|off\n"
" Enable or disable a per port Rx offloading"
@@ -753,7 +753,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"port (port_id) rxq (queue_id) rx_offload vlan_strip|"
"ipv4_cksum|udp_cksum|tcp_cksum|tcp_lro|qinq_strip|"
- "outer_ipv4_cksum|macsec_strip|header_split|"
+ "outer_ipv4_cksum|macsec_strip|"
"vlan_filter|vlan_extend|jumbo_frame|scatter|"
"buffer_split|timestamp|security|keep_crc on|off\n"
" Enable or disable a per queue Rx offloading"
@@ -12522,7 +12522,7 @@ static cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_offloa
(struct cmd_config_per_port_rx_offload_result,
offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"
- "header_split#vlan_filter#vlan_extend#jumbo_frame#"
+ "vlan_filter#vlan_extend#jumbo_frame#"
"scatter#buffer_split#timestamp#security#"
"keep_crc#rss_hash");
static cmdline_parse_token_string_t cmd_config_per_port_rx_offload_result_on_off =
@@ -12604,7 +12604,7 @@ static cmdline_parse_inst_t cmd_config_per_port_rx_offload = {
.data = NULL,
.help_str = "port config <port_id> rx_offload vlan_strip|ipv4_cksum|"
"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
- "macsec_strip|header_split|vlan_filter|vlan_extend|"
+ "macsec_strip|vlan_filter|vlan_extend|"
"jumbo_frame|scatter|buffer_split|timestamp|security|"
"keep_crc|rss_hash on|off",
.tokens = {
@@ -12654,7 +12654,7 @@ static cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_offlo
(struct cmd_config_per_queue_rx_offload_result,
offload, "vlan_strip#ipv4_cksum#udp_cksum#tcp_cksum#tcp_lro#"
"qinq_strip#outer_ipv4_cksum#macsec_strip#"
- "header_split#vlan_filter#vlan_extend#jumbo_frame#"
+ "vlan_filter#vlan_extend#jumbo_frame#"
"scatter#buffer_split#timestamp#security#keep_crc");
static cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
TOKEN_STRING_INITIALIZER
@@ -12712,7 +12712,7 @@ static cmdline_parse_inst_t cmd_config_per_queue_rx_offload = {
.help_str = "port <port_id> rxq <queue_id> rx_offload "
"vlan_strip|ipv4_cksum|"
"udp_cksum|tcp_cksum|tcp_lro|qinq_strip|outer_ipv4_cksum|"
- "macsec_strip|header_split|vlan_filter|vlan_extend|"
+ "macsec_strip|vlan_filter|vlan_extend|"
"jumbo_frame|scatter|buffer_split|timestamp|security|"
"keep_crc on|off",
.tokens = {
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 194ed5a7ec..977ddc1c00 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -135,7 +135,6 @@ static uint16_t vlan_id = 0x100;
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index d9b9c323c7..21c512c94b 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -108,7 +108,6 @@ static struct link_bonding_unittest_params test_params = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
--git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index b3d71c6f3a..464fb2dbd0 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -81,7 +81,6 @@ static struct link_bonding_rssconf_unittest_params test_params = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
@@ -92,7 +91,6 @@ static struct rte_eth_conf default_pmd_conf = {
static struct rte_eth_conf rss_pmd_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index ec3dc251d1..34551e9b1a 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -62,7 +62,6 @@ static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 5f26a04b06..0e5f69e636 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -73,7 +73,6 @@ static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM |
RTE_ETH_RX_OFFLOAD_SECURITY,
},
diff --git a/doc/guides/nics/fm10k.rst b/doc/guides/nics/fm10k.rst
index d6efac0917..c0a37d35cc 100644
--- a/doc/guides/nics/fm10k.rst
+++ b/doc/guides/nics/fm10k.rst
@@ -63,8 +63,6 @@ vPMD. They are:
* Flow director
-* Header split
-
* RX checksum offload
Other features are supported using optional MACRO configuration. They include:
@@ -82,8 +80,6 @@ will be checked:
* ``RTE_ETH_RX_OFFLOAD_CHECKSUM``
-* ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
-
* ``fdir_conf->mode``
diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index ad1a3da610..868d4c08cc 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -77,8 +77,6 @@ They are:
* FDIR
-* Header split
-
* RX checksum off load
Other features are supported using optional MACRO configuration. They include:
@@ -95,8 +93,6 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
* RTE_ETH_RX_OFFLOAD_CHECKSUM
-* RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
-
* dev_conf
fdir_conf->mode will also be checked.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..7ceb0c9955 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -92,12 +92,6 @@ Deprecation Notices
The ``rate`` parameter will be modified to ``uint32_t`` in DPDK 22.11
so that it can work for more than 64 Gbps.
-* ethdev: Since no single PMD supports ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
- offload and the ``split_hdr_size`` field in structure ``rte_eth_rxmode``
- to enable per-port header split, they will be removed in DPDK 22.11.
- The per-queue Rx packet split offload ``RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT``
- can still be used, and it is configured by ``rte_eth_rxseg_split``.
-
* ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
will be removed in DPDK 20.11.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..d28e07b2d6 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -100,6 +100,11 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=======================================================
+ * ethdev: Removed the Rx offload flag ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT``
+ and field ``split_hdr_size`` from the structure ``rte_eth_rxmode`` used
+ to configure header split. Instead, user can still use
+ ``RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT`` for per-queue packet split
+ offlod, which is configured by ``rte_eth_rxseg_split``.
Known Issues
------------
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 330e34427d..0093fbfcff 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1626,7 +1626,7 @@ Enable or disable a per port Rx offloading on all Rx queues of a port::
* ``offloading``: can be any of these offloading capability:
vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
qinq_strip, outer_ipv4_cksum, macsec_strip,
- header_split, vlan_filter, vlan_extend, jumbo_frame,
+ vlan_filter, vlan_extend, jumbo_frame,
scatter, timestamp, security, keep_crc, rss_hash
This command should be run when the port is stopped, or else it will fail.
@@ -1641,7 +1641,7 @@ Enable or disable a per queue Rx offloading only on a specific Rx queue::
* ``offloading``: can be any of these offloading capability:
vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
qinq_strip, outer_ipv4_cksum, macsec_strip,
- header_split, vlan_filter, vlan_extend, jumbo_frame,
+ vlan_filter, vlan_extend, jumbo_frame,
scatter, timestamp, security, keep_crc
This command should be run when the port is stopped, or else it will fail.
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 1592971073..8c81d8a862 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -90,7 +90,6 @@ cnxk_nix_rx_burst_mode_get(struct rte_eth_dev *eth_dev, uint16_t queue_id,
{RTE_ETH_RX_OFFLOAD_QINQ_STRIP, " QinQ VLAN Strip,"},
{RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM, " Outer IPv4 Checksum,"},
{RTE_ETH_RX_OFFLOAD_MACSEC_STRIP, " MACsec Strip,"},
- {RTE_ETH_RX_OFFLOAD_HEADER_SPLIT, " Header Split,"},
{RTE_ETH_RX_OFFLOAD_VLAN_FILTER, " VLAN Filter,"},
{RTE_ETH_RX_OFFLOAD_VLAN_EXTEND, " VLAN Extend,"},
{RTE_ETH_RX_OFFLOAD_SCATTER, " Scattered,"},
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 55e21d635c..86b4749f30 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1187,7 +1187,6 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_MACSEC_STRIP |
- RTE_ETH_RX_OFFLOAD_HEADER_SPLIT |
RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
RTE_ETH_RX_OFFLOAD_SCATTER |
@@ -1204,7 +1203,6 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_MACSEC_STRIP |
- RTE_ETH_RX_OFFLOAD_HEADER_SPLIT |
RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
RTE_ETH_RX_OFFLOAD_SCATTER |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..3f96703991 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1779,7 +1779,6 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
RTE_ETH_RX_OFFLOAD_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_UDP_CKSUM |
RTE_ETH_RX_OFFLOAD_TCP_CKSUM |
- RTE_ETH_RX_OFFLOAD_HEADER_SPLIT |
RTE_ETH_RX_OFFLOAD_RSS_HASH);
}
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 10ce5a7582..ad998e83bf 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -221,10 +221,6 @@ fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
if (fconf->mode != RTE_FDIR_MODE_NONE)
return -1;
- /* no header split support */
- if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
- return -1;
-
return 0;
#else
RTE_SET_USED(dev);
diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
index 959832ed6a..08266ce1f3 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
@@ -220,10 +220,6 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
if (fconf->mode != RTE_FDIR_MODE_NONE)
return -1;
- /* no header split support */
- if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_HEADER_SPLIT)
- return -1;
-
/* no QinQ support */
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
return -1;
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index eef016aa0b..f9e5b96c77 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -121,11 +121,6 @@ mvneta_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (dev->data->dev_conf.rxmode.split_hdr_size) {
- MVNETA_LOG(INFO, "Split headers not supported");
- return -EINVAL;
- }
-
if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_MULTI_SEGS)
priv->multiseg = 1;
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 735efb6cfc..f0c093e0fd 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -490,11 +490,6 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (dev->data->dev_conf.rxmode.split_hdr_size) {
- MRVL_LOG(INFO, "Split headers not supported");
- return -EINVAL;
- }
-
if (dev->data->dev_conf.rxmode.mtu > priv->max_mtu) {
MRVL_LOG(ERR, "MTU %u is larger than max_mtu %u\n",
dev->data->dev_conf.rxmode.mtu,
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 262c024560..b8b94fc4ff 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -2003,11 +2003,6 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
return -EINVAL;
}
- if (rxmode->split_hdr_size) {
- PMD_INIT_LOG(INFO, "Rxmode does not support split header");
- return -EINVAL;
- }
-
if (conf->dcb_capability_en) {
PMD_INIT_LOG(INFO, "DCB enable not supported");
return -EINVAL;
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8174..ef1528e5ed 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -71,7 +71,6 @@ mbuf_input(struct rte_mbuf *mbuf)
static const struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 4efebb3902..9b076bb39f 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -115,7 +115,6 @@ static struct rte_mempool *mbuf_pool;
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index bfc1949c84..f11f91a67c 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -133,9 +133,6 @@ init_port(void)
uint16_t i;
/* Ethernet port configured with default settings. 8< */
struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.offloads =
RTE_ETH_TX_OFFLOAD_VLAN_INSERT |
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 78205d2e12..69378f99e6 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -147,7 +147,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.mtu = JUMBO_FRAME_MAX_SIZE - RTE_ETHER_HDR_LEN -
RTE_ETHER_CRC_LEN,
- .split_hdr_size = 0,
.offloads = (RTE_ETH_RX_OFFLOAD_CHECKSUM |
RTE_ETH_RX_OFFLOAD_SCATTER),
},
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 0290767af4..4d69ebebfb 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -47,7 +47,6 @@ static struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
.mtu = 9000 - (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN), /* Jumbo frame MTU */
- .split_hdr_size = 0, /* Header split buffer size */
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 3ebf895aa0..4cfe09f9d7 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -163,7 +163,6 @@ static struct rte_eth_conf port_conf = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
.mtu = JUMBO_FRAME_MAX_SIZE - RTE_ETHER_HDR_LEN -
RTE_ETHER_CRC_LEN,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 815b9254ae..a0b221a447 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -234,7 +234,6 @@ struct lcore_conf lcore_conf[RTE_MAX_LCORE];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index bdcaa3bcd1..a3bc977fdf 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -111,7 +111,6 @@ static struct rte_eth_conf port_conf = {
.rxmode = {
.mtu = JUMBO_FRAME_MAX_SIZE - RTE_ETHER_HDR_LEN -
RTE_ETHER_CRC_LEN,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index bf4b862379..cb7ba5cb4c 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -217,7 +217,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
index 41a0d3f22f..162f880224 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -10,9 +10,6 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 9e71ba2d4e..4be598110c 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -89,9 +89,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index bd0aa7ea7a..72f9ece3c6 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -78,9 +78,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 281c6b7a3f..ca802b5fc5 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -93,9 +93,6 @@ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 7f00c65609..4d409b3ee2 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -112,7 +112,6 @@ static uint16_t nb_lcore_params = RTE_DIM(lcore_params_array_default);
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 887c6eae3f..a0dc7009a7 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -250,7 +250,6 @@ uint16_t nb_lcore_params = RTE_DIM(lcore_params_array_default);
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index e090328fcc..865197baa8 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -121,7 +121,6 @@ static uint16_t nb_lcore_params = sizeof(lcore_params_array_default) /
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9699e14ce6..4ac53c42a0 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -78,9 +78,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
/* Global configuration stored in a static structure. 8< */
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 75237dee6e..1ff85875df 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -176,7 +176,6 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 81964d0308..8cfee864af 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -90,7 +90,6 @@ static uint16_t pkt_burst = NTB_DFLT_PKT_BURST;
static struct rte_eth_conf eth_port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/pipeline/obj.c b/examples/pipeline/obj.c
index b79f044ac7..908b66274a 100644
--- a/examples/pipeline/obj.c
+++ b/examples/pipeline/obj.c
@@ -129,7 +129,6 @@ static struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_NONE,
.mtu = 9000 - (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN), /* Jumbo frame MTU */
- .split_hdr_size = 0, /* Header split buffer size */
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index a0f78e4ad6..319d0a96b2 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -52,7 +52,6 @@ static struct rte_mempool *pool = NULL;
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_RSS,
- .split_hdr_size = 0,
.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM,
},
.rx_adv_conf = {
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..6bd342aba2 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -56,9 +56,6 @@ int mp_size = NB_MBUF;
struct flow_conf qos_conf[MAX_DATA_STREAMS];
static struct rte_eth_conf port_conf = {
- .rxmode = {
- .split_hdr_size = 0,
- },
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_NONE,
},
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 7e1666f42a..504f5540ae 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -125,7 +125,6 @@ static struct vhost_queue_ops vdev_queue_ops[RTE_MAX_VHOST_DEVICE];
static struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_VMDQ_ONLY,
- .split_hdr_size = 0,
/*
* VLAN strip is necessary for 1G NIC such as I350,
* this fixes bug of ipv4 forwarding in guest can't
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 10410b8783..0fb9520c25 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -66,7 +66,6 @@ static uint8_t rss_enable;
static const struct rte_eth_conf vmdq_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_VMDQ_ONLY,
- .split_hdr_size = 0,
},
.txmode = {
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index d2218f2cf7..dae858514a 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -69,7 +69,6 @@ static uint8_t rss_enable;
static const struct rte_eth_conf vmdq_dcb_conf_default = {
.rxmode = {
.mq_mode = RTE_ETH_MQ_RX_VMDQ_DCB,
- .split_hdr_size = 0,
},
.txmode = {
.mq_mode = RTE_ETH_MQ_TX_VMDQ_DCB,
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 1979dc0850..ba6e8801bf 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -92,7 +92,6 @@ static const struct {
RTE_RX_OFFLOAD_BIT2STR(QINQ_STRIP),
RTE_RX_OFFLOAD_BIT2STR(OUTER_IPV4_CKSUM),
RTE_RX_OFFLOAD_BIT2STR(MACSEC_STRIP),
- RTE_RX_OFFLOAD_BIT2STR(HEADER_SPLIT),
RTE_RX_OFFLOAD_BIT2STR(VLAN_FILTER),
RTE_RX_OFFLOAD_BIT2STR(VLAN_EXTEND),
RTE_RX_OFFLOAD_BIT2STR(SCATTER),
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d..1aaaa613b0 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -471,7 +471,6 @@ struct rte_eth_rxmode {
uint32_t mtu; /**< Requested MTU. */
/** Maximum allowed size of LRO aggregated packet. */
uint32_t max_lro_pkt_size;
- uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
/**
* Per-port Rx offloads to be set using RTE_ETH_RX_OFFLOAD_* flags.
* Only offloads set on rx_offload_capa field on rte_eth_dev_info
@@ -1617,7 +1616,6 @@ struct rte_eth_conf {
#define RTE_ETH_RX_OFFLOAD_QINQ_STRIP RTE_BIT64(5)
#define RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(6)
#define RTE_ETH_RX_OFFLOAD_MACSEC_STRIP RTE_BIT64(7)
-#define RTE_ETH_RX_OFFLOAD_HEADER_SPLIT RTE_BIT64(8)
#define RTE_ETH_RX_OFFLOAD_VLAN_FILTER RTE_BIT64(9)
#define RTE_ETH_RX_OFFLOAD_VLAN_EXTEND RTE_BIT64(10)
#define RTE_ETH_RX_OFFLOAD_SCATTER RTE_BIT64(13)
@@ -1642,7 +1640,6 @@ struct rte_eth_conf {
#define DEV_RX_OFFLOAD_QINQ_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_QINQ_STRIP) RTE_ETH_RX_OFFLOAD_QINQ_STRIP
#define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_DEPRECATED(DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM
#define DEV_RX_OFFLOAD_MACSEC_STRIP RTE_DEPRECATED(DEV_RX_OFFLOAD_MACSEC_STRIP) RTE_ETH_RX_OFFLOAD_MACSEC_STRIP
-#define DEV_RX_OFFLOAD_HEADER_SPLIT RTE_DEPRECATED(DEV_RX_OFFLOAD_HEADER_SPLIT) RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
#define DEV_RX_OFFLOAD_VLAN_FILTER RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_FILTER) RTE_ETH_RX_OFFLOAD_VLAN_FILTER
#define DEV_RX_OFFLOAD_VLAN_EXTEND RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN_EXTEND) RTE_ETH_RX_OFFLOAD_VLAN_EXTEND
#define DEV_RX_OFFLOAD_SCATTER RTE_DEPRECATED(DEV_RX_OFFLOAD_SCATTER) RTE_ETH_RX_OFFLOAD_SCATTER
--
2.17.1
^ permalink raw reply [relevance 2%]
* [PATCH 01/13] ethdev: strip experimental tag off Rx metadata negotiate API
@ 2022-08-12 19:18 4% ` Ivan Malov
2022-08-12 19:18 4% ` [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions Ivan Malov
` (5 subsequent siblings)
6 siblings, 0 replies; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Ferruh Yigit,
Ray Kinsella
rte_eth_rx_metadata_negotiate() was introduced in DPDK 21.11.
Since then, no one has requested any fixes. At the same time,
the API is required by series [1] in OvS for the new release.
[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_ethdev.h | 4 ----
lib/ethdev/version.map | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..6760ab8b87 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* ethdev: promoted ``rte_eth_rx_metadata_negotiate()``
+ from experimental to stable.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d..e3f28283ce 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -5315,9 +5315,6 @@ int rte_eth_representor_info_get(uint16_t port_id,
#define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Negotiate the NIC's ability to deliver specific kinds of metadata to the PMD.
*
* Invoke this API before the first rte_eth_dev_configure() invocation
@@ -5356,7 +5353,6 @@ int rte_eth_representor_info_get(uint16_t port_id,
* - (-EIO) if the device is removed;
* - (0) on success
*/
-__rte_experimental
int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
/** Flag to offload IP reassembly for IPv4 packets. */
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index 03f52fee91..2ecc1af571 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -98,6 +98,7 @@ DPDK_23 {
rte_eth_remove_rx_callback;
rte_eth_remove_tx_callback;
rte_eth_rx_burst_mode_get;
+ rte_eth_rx_metadata_negotiate;
rte_eth_rx_queue_info_get;
rte_eth_rx_queue_setup;
rte_eth_set_queue_rate_limit;
@@ -250,7 +251,6 @@ EXPERIMENTAL {
rte_eth_dev_capability_name;
rte_eth_dev_conf_get;
rte_eth_macaddrs_get;
- rte_eth_rx_metadata_negotiate;
rte_flow_flex_item_create;
rte_flow_flex_item_release;
rte_flow_pick_transfer_proxy;
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions
2022-08-12 19:18 4% ` [PATCH 01/13] ethdev: strip experimental tag off Rx metadata negotiate API Ivan Malov
@ 2022-08-12 19:18 4% ` Ivan Malov
2022-08-15 12:59 0% ` Ori Kam
2022-08-12 19:18 4% ` [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API Ivan Malov
` (4 subsequent siblings)
6 siblings, 1 reply; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Ferruh Yigit
The following set of primitives has been introduced in 21.11:
- RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
- RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
Since then, no one has requested any fixes. At the same time,
the set is required by series [1] in OvS for the new release.
[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 8 ++++++++
lib/ethdev/rte_flow.h | 6 ------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 6760ab8b87..f039b857e2 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -87,6 +87,14 @@ API Changes
* ethdev: promoted ``rte_eth_rx_metadata_negotiate()``
from experimental to stable.
+* ethdev: promoted the following flow primitives
+ from experimental to stable:
+
+ - ``RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR``
+ - ``RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT``
+ - ``RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR``
+ - ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index a79f1e7ef0..e5d2d87403 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -1918,9 +1918,6 @@ static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask = {
#endif
/**
- * @warning
- * @b EXPERIMENTAL: this structure may change without prior notice
- *
* Provides an ethdev port ID for use with the following items:
* RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR,
* RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT.
@@ -3643,9 +3640,6 @@ struct rte_flow_action_meter_color {
};
/**
- * @warning
- * @b EXPERIMENTAL: this structure may change without prior notice
- *
* Provides an ethdev port ID for use with the following actions:
* RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR,
* RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT.
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API
2022-08-12 19:18 4% ` [PATCH 01/13] ethdev: strip experimental tag off Rx metadata negotiate API Ivan Malov
2022-08-12 19:18 4% ` [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions Ivan Malov
@ 2022-08-12 19:18 4% ` Ivan Malov
2022-08-15 12:58 0% ` Ori Kam
2022-08-12 19:18 5% ` [PATCH 10/13] ethdev: remove deprecated flow item PF Ivan Malov
` (3 subsequent siblings)
6 siblings, 1 reply; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Ferruh Yigit,
Ray Kinsella
rte_flow_pick_transfer_proxy() was first added to DPDK 21.11.
Since then, no one has requested any fixes. At the same time,
the API is required by series [1] in OvS for the new release.
[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/release_22_11.rst | 3 +++
lib/ethdev/rte_flow.h | 4 ----
lib/ethdev/version.map | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index f039b857e2..b74e90d27f 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -95,6 +95,9 @@ API Changes
- ``RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR``
- ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
+* ethdev: promoted ``rte_flow_pick_transfer_proxy()``
+ from experimental to stable.
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index e5d2d87403..bc68fd5631 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -4792,9 +4792,6 @@ rte_flow_tunnel_item_release(uint16_t port_id,
struct rte_flow_error *error);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Get a proxy port to manage "transfer" flows.
*
* Managing "transfer" flows requires that the user communicate them
@@ -4819,7 +4816,6 @@ rte_flow_tunnel_item_release(uint16_t port_id,
* @return
* 0 on success, a negative error code otherwise
*/
-__rte_experimental
int
rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
struct rte_flow_error *error);
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index 2ecc1af571..25e54f9d3e 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -132,6 +132,7 @@ DPDK_23 {
rte_flow_error_set;
rte_flow_flush;
rte_flow_isolate;
+ rte_flow_pick_transfer_proxy;
rte_flow_query;
rte_flow_validate;
@@ -253,7 +254,6 @@ EXPERIMENTAL {
rte_eth_macaddrs_get;
rte_flow_flex_item_create;
rte_flow_flex_item_release;
- rte_flow_pick_transfer_proxy;
# added in 22.03
rte_eth_dev_priority_flow_ctrl_queue_configure;
--
2.30.2
^ permalink raw reply [relevance 4%]
* [PATCH 10/13] ethdev: remove deprecated flow item PF
` (2 preceding siblings ...)
2022-08-12 19:18 4% ` [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API Ivan Malov
@ 2022-08-12 19:18 5% ` Ivan Malov
2022-08-22 5:32 0% ` Ori Kam
2022-08-12 19:18 1% ` [PATCH 11/13] ethdev: remove deprecated flow item VF Ivan Malov
` (2 subsequent siblings)
6 siblings, 1 reply; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline_flow.c | 9 ----
doc/guides/nics/features/bnxt.ini | 1 -
doc/guides/nics/features/cxgbe.ini | 1 -
doc/guides/nics/features/default.ini | 1 -
doc/guides/nics/features/sfc.ini | 1 -
doc/guides/nics/sfc_efx.rst | 2 -
doc/guides/prog_guide/rte_flow.rst | 34 -------------
.../prog_guide/switch_representation.rst | 14 ------
doc/guides/rel_notes/release_22_11.rst | 5 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 -
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 --
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 25 ----------
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 --
drivers/net/cxgbe/cxgbe_flow.c | 21 --------
drivers/net/sfc/sfc_mae.c | 48 -------------------
lib/ethdev/rte_flow.c | 1 -
lib/ethdev/rte_flow.h | 15 ------
17 files changed, 5 insertions(+), 184 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 23889f7ab1..2722d5a48d 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -249,7 +249,6 @@ enum index {
ITEM_INVERT,
ITEM_ANY,
ITEM_ANY_NUM,
- ITEM_PF,
ITEM_VF,
ITEM_VF_ID,
ITEM_PHY_PORT,
@@ -1278,7 +1277,6 @@ static const enum index next_item[] = {
ITEM_VOID,
ITEM_INVERT,
ITEM_ANY,
- ITEM_PF,
ITEM_VF,
ITEM_PHY_PORT,
ITEM_PORT_ID,
@@ -3461,13 +3459,6 @@ static const struct token token_list[] = {
.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
},
- [ITEM_PF] = {
- .name = "pf",
- .help = "match traffic from/to the physical function",
- .priv = PRIV_ITEM(PF, 0),
- .next = NEXT(NEXT_ENTRY(ITEM_NEXT)),
- .call = parse_vc,
- },
[ITEM_VF] = {
.name = "vf",
.help = "match traffic from/to a virtual function ID",
diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index afb5414b49..259480d1df 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -63,7 +63,6 @@ ipv6 = Y
gre = Y
icmp = Y
icmp6 = Y
-pf = Y
phy_port = Y
port_id = Y
port_representor = Y
diff --git a/doc/guides/nics/features/cxgbe.ini b/doc/guides/nics/features/cxgbe.ini
index f674803ec4..d869f2100f 100644
--- a/doc/guides/nics/features/cxgbe.ini
+++ b/doc/guides/nics/features/cxgbe.ini
@@ -39,7 +39,6 @@ Usage doc = Y
eth = Y
ipv4 = Y
ipv6 = Y
-pf = Y
phy_port = Y
tcp = Y
udp = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index d1db0c256a..aff236134e 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -121,7 +121,6 @@ meta =
mpls =
nsh =
nvgre =
-pf =
pfcp =
phy_port =
port_id =
diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini
index 2e798b5ef5..355174d5c2 100644
--- a/doc/guides/nics/features/sfc.ini
+++ b/doc/guides/nics/features/sfc.ini
@@ -47,7 +47,6 @@ ipv4 = Y
ipv6 = Y
mark = P
nvgre = Y
-pf = Y
phy_port = Y
port_id = Y
port_representor = Y
diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 39c6e23d5b..2dbc59e8f7 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -200,8 +200,6 @@ Supported pattern items (***transfer*** rules):
- PHY_PORT (cannot repeat; conflicts with other traffic source items)
-- PF (cannot repeat; conflicts with other traffic source items)
-
- VF (cannot repeat; conflicts with other traffic source items)
- ETH
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 588914b231..72f0c3d346 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -535,37 +535,6 @@ Usage example, matching non-TCPv4 packets only:
| 4 | END |
+-------+----------+
-Item: ``PF``
-^^^^^^^^^^^^
-
-This item is deprecated. Consider:
- - `Item: PORT_REPRESENTOR`_
- - `Item: REPRESENTED_PORT`_
-
-Matches traffic originating from (ingress) or going to (egress) the physical
-function of the current device.
-
-If supported, should work even if the physical function is not managed by
-the application and thus not associated with a DPDK port ID.
-
-- Can be combined with any number of `Item: VF`_ to match both PF and VF
- traffic.
-- ``spec``, ``last`` and ``mask`` must not be set.
-
-.. _table_rte_flow_item_pf:
-
-.. table:: PF
-
- +----------+-------+
- | Field | Value |
- +==========+=======+
- | ``spec`` | unset |
- +----------+-------+
- | ``last`` | unset |
- +----------+-------+
- | ``mask`` | unset |
- +----------+-------+
-
Item: ``VF``
^^^^^^^^^^^^
@@ -584,7 +553,6 @@ separate entities, should be addressed through their own DPDK port IDs.
- Can be specified multiple times to match traffic addressed to several VF
IDs.
-- Can be combined with a PF item to match both PF and VF traffic.
- Default ``mask`` matches any VF ID.
.. _table_rte_flow_item_vf:
@@ -2074,8 +2042,6 @@ This action is deprecated. Consider:
Directs matching traffic to the physical function (PF) of the current
device.
-See `Item: PF`_.
-
- No configurable properties.
.. _table_rte_flow_action_pf:
diff --git a/doc/guides/prog_guide/switch_representation.rst b/doc/guides/prog_guide/switch_representation.rst
index 3da30fc779..6fd7b98bdc 100644
--- a/doc/guides/prog_guide/switch_representation.rst
+++ b/doc/guides/prog_guide/switch_representation.rst
@@ -624,25 +624,11 @@ Same restrictions as `PORT_ID pattern item`_.
- Targets **A**, **B** or **C** in `traffic steering`_.
-PF Pattern Item
-^^^^^^^^^^^^^^^
-
-Matches traffic originating from (ingress) or going to (egress) the physical
-function of the current device.
-
-If supported, should work even if the physical function is not managed by
-the application and thus not associated with a DPDK port ID. Its behavior is
-otherwise similar to `PORT_ID pattern item`_ using PF port ID.
-
-- Matches **A** in `traffic steering`_.
-
PF Action
^^^^^^^^^
Directs matching traffic to the physical function of the current device.
-Same restrictions as `PF pattern item`_.
-
- Targets **A** in `traffic steering`_.
VF Pattern Item
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index c4ce32daed..b7469708af 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -76,6 +76,9 @@ Removed Items
Also, make sure to start the actual text at the margin.
=======================================================
+* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PF``;
+ use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+
API Changes
-----------
@@ -122,6 +125,8 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* ethdev: enum ``RTE_FLOW_ITEM`` was affected by deprecation procedure.
+
Known Issues
------------
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index c105200fe7..4446560369 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3665,8 +3665,6 @@ This section lists supported pattern items and their attributes, if any.
- ``num {unsigned}``: number of layers covered.
-- ``pf``: match traffic from/to the physical function.
-
- ``vf``: match traffic from/to a virtual function ID.
- ``id {unsigned}``: VF ID.
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
index e9337ecd2c..17216426d8 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
@@ -260,10 +260,6 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_item_any_handler
},
- [RTE_FLOW_ITEM_TYPE_PF] = {
- .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
- .proto_hdr_func = ulp_rte_pf_hdr_handler
- },
[RTE_FLOW_ITEM_TYPE_VF] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_vf_hdr_handler
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 9edf3e8799..6a1d235f77 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -507,31 +507,6 @@ ulp_rte_parser_implicit_act_port_process(struct ulp_rte_parser_params *params)
return BNXT_TF_RC_SUCCESS;
}
-/* Function to handle the parsing of RTE Flow item PF Header. */
-int32_t
-ulp_rte_pf_hdr_handler(const struct rte_flow_item *item __rte_unused,
- struct ulp_rte_parser_params *params)
-{
- uint16_t port_id = 0;
- uint16_t svif_mask = 0xFFFF;
- uint32_t ifindex;
-
- /* Get the implicit port id */
- port_id = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_INCOMING_IF);
-
- /* perform the conversion from dpdk port to bnxt ifindex */
- if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
- port_id,
- &ifindex)) {
- BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
- return BNXT_TF_RC_ERROR;
- }
-
- /* Update the SVIF details */
- return ulp_rte_parser_svif_set(params, ifindex, svif_mask,
- BNXT_ULP_DIR_INVALID);
-}
-
/* Function to handle the parsing of RTE Flow item VF Header. */
int32_t
ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
index e4225d00f8..94918f6b4a 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
@@ -80,11 +80,6 @@ bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[],
void
bnxt_ulp_rte_parser_post_process(struct ulp_rte_parser_params *params);
-/* Function to handle the parsing of RTE Flow item PF Header. */
-int32_t
-ulp_rte_pf_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params);
-
/* Function to handle the parsing of RTE Flow item VF Header. */
int32_t
ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 6e460dfe2e..e4f9c152b5 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -288,22 +288,6 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
return 0;
}
-static int
-ch_rte_parsetype_pf(const void *dmask __rte_unused,
- const struct rte_flow_item *item __rte_unused,
- struct ch_filter_specification *fs,
- struct rte_flow_error *e __rte_unused)
-{
- struct rte_flow *flow = (struct rte_flow *)fs->private;
- struct rte_eth_dev *dev = flow->dev;
- struct adapter *adap = ethdev2adap(dev);
-
- CXGBE_FILL_FS(1, 1, pfvf_vld);
-
- CXGBE_FILL_FS(adap->pf, 0x7, pf);
- return 0;
-}
-
static int
ch_rte_parsetype_vf(const void *dmask, const struct rte_flow_item *item,
struct ch_filter_specification *fs,
@@ -1022,11 +1006,6 @@ static struct chrte_fparse parseitem[] = {
.dmask = &rte_flow_item_tcp_mask,
},
- [RTE_FLOW_ITEM_TYPE_PF] = {
- .fptr = ch_rte_parsetype_pf,
- .dmask = NULL,
- },
-
[RTE_FLOW_ITEM_TYPE_VF] = {
.fptr = ch_rte_parsetype_vf,
.dmask = &(const struct rte_flow_item_vf){
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index eb197fbdeb..e8da2d2a0d 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1685,42 +1685,6 @@ sfc_mae_rule_parse_item_phy_port(const struct rte_flow_item *item,
return 0;
}
-static int
-sfc_mae_rule_parse_item_pf(const struct rte_flow_item *item,
- struct sfc_flow_parse_ctx *ctx,
- struct rte_flow_error *error)
-{
- struct sfc_mae_parse_ctx *ctx_mae = ctx->mae;
- const efx_nic_cfg_t *encp = efx_nic_cfg_get(ctx_mae->sa->nic);
- efx_mport_sel_t mport_v;
- int rc;
-
- if (ctx_mae->match_mport_set) {
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Can't handle multiple traffic source items");
- }
-
- rc = efx_mae_mport_by_pcie_function(encp->enc_pf, EFX_PCI_VF_INVALID,
- &mport_v);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to convert the PF ID");
- }
-
- rc = efx_mae_match_spec_mport_set(ctx_mae->match_spec, &mport_v, NULL);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to set MPORT for the PF");
- }
-
- ctx_mae->match_mport_set = B_TRUE;
-
- return 0;
-}
-
static int
sfc_mae_rule_parse_item_vf(const struct rte_flow_item *item,
struct sfc_flow_parse_ctx *ctx,
@@ -2591,18 +2555,6 @@ static const struct sfc_flow_item sfc_flow_items[] = {
.ctx_type = SFC_FLOW_PARSE_CTX_MAE,
.parse = sfc_mae_rule_parse_item_phy_port,
},
- {
- .type = RTE_FLOW_ITEM_TYPE_PF,
- .name = "PF",
- /*
- * In terms of RTE flow, this item is a META one,
- * and its position in the pattern is don't care.
- */
- .prev_layer = SFC_FLOW_ITEM_ANY_LAYER,
- .layer = SFC_FLOW_ITEM_ANY_LAYER,
- .ctx_type = SFC_FLOW_PARSE_CTX_MAE,
- .parse = sfc_mae_rule_parse_item_pf,
- },
{
.type = RTE_FLOW_ITEM_TYPE_VF,
.name = "VF",
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 501be9d602..6ece72bf36 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -97,7 +97,6 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
MK_FLOW_ITEM(VOID, 0),
MK_FLOW_ITEM(INVERT, 0),
MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)),
- MK_FLOW_ITEM(PF, 0),
MK_FLOW_ITEM(VF, sizeof(struct rte_flow_item_vf)),
MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
MK_FLOW_ITEM(PORT_ID, sizeof(struct rte_flow_item_port_id)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index bc68fd5631..97de98e232 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -188,20 +188,6 @@ enum rte_flow_item_type {
*/
RTE_FLOW_ITEM_TYPE_ANY,
- /**
- * @deprecated
- * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
- *
- * [META]
- *
- * Matches traffic originating from (ingress) or going to (egress)
- * the physical function of the current device.
- *
- * No associated specification structure.
- */
- RTE_FLOW_ITEM_TYPE_PF,
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
@@ -732,7 +718,6 @@ static const struct rte_flow_item_any rte_flow_item_any_mask = {
*
* - Can be specified multiple times to match traffic addressed to several
* VF IDs.
- * - Can be combined with a PF item to match both PF and VF traffic.
*
* A zeroed mask can be used to match any VF ID.
*/
--
2.30.2
^ permalink raw reply [relevance 5%]
* [PATCH 11/13] ethdev: remove deprecated flow item VF
` (3 preceding siblings ...)
2022-08-12 19:18 5% ` [PATCH 10/13] ethdev: remove deprecated flow item PF Ivan Malov
@ 2022-08-12 19:18 1% ` Ivan Malov
2022-08-22 5:50 0% ` Ori Kam
2022-08-12 19:18 1% ` [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT Ivan Malov
2022-08-12 19:18 5% ` [PATCH 13/13] ethdev: remove deprecated flow action " Ivan Malov
6 siblings, 1 reply; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit, Beilei Xing
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline_flow.c | 25 -
doc/guides/nics/features/bnxt.ini | 1 -
doc/guides/nics/features/cxgbe.ini | 1 -
doc/guides/nics/features/default.ini | 1 -
doc/guides/nics/features/i40e.ini | 1 -
doc/guides/nics/features/sfc.ini | 1 -
doc/guides/nics/sfc_efx.rst | 2 -
doc/guides/prog_guide/rte_flow.rst | 40 +-
doc/guides/rel_notes/release_22_11.rst | 3 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 -
drivers/net/bnxt/bnxt_flow.c | 58 +-
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 -
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 34 -
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 -
drivers/net/cxgbe/cxgbe_flow.c | 36 -
drivers/net/i40e/i40e_flow.c | 987 ++----------------
drivers/net/sfc/sfc_mae.c | 77 --
lib/ethdev/rte_flow.c | 1 -
lib/ethdev/rte_flow.h | 46 -
19 files changed, 110 insertions(+), 1217 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 2722d5a48d..31b906178c 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -249,8 +249,6 @@ enum index {
ITEM_INVERT,
ITEM_ANY,
ITEM_ANY_NUM,
- ITEM_VF,
- ITEM_VF_ID,
ITEM_PHY_PORT,
ITEM_PHY_PORT_INDEX,
ITEM_PORT_ID,
@@ -1277,7 +1275,6 @@ static const enum index next_item[] = {
ITEM_VOID,
ITEM_INVERT,
ITEM_ANY,
- ITEM_VF,
ITEM_PHY_PORT,
ITEM_PORT_ID,
ITEM_MARK,
@@ -1348,12 +1345,6 @@ static const enum index item_any[] = {
ZERO,
};
-static const enum index item_vf[] = {
- ITEM_VF_ID,
- ITEM_NEXT,
- ZERO,
-};
-
static const enum index item_phy_port[] = {
ITEM_PHY_PORT_INDEX,
ITEM_NEXT,
@@ -3459,19 +3450,6 @@ static const struct token token_list[] = {
.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
},
- [ITEM_VF] = {
- .name = "vf",
- .help = "match traffic from/to a virtual function ID",
- .priv = PRIV_ITEM(VF, sizeof(struct rte_flow_item_vf)),
- .next = NEXT(item_vf),
- .call = parse_vc,
- },
- [ITEM_VF_ID] = {
- .name = "id",
- .help = "VF ID",
- .next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
- .args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
- },
[ITEM_PHY_PORT] = {
.name = "phy_port",
.help = "match traffic from/to a specific physical port",
@@ -10669,9 +10647,6 @@ flow_item_default_mask(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_ANY:
mask = &rte_flow_item_any_mask;
break;
- case RTE_FLOW_ITEM_TYPE_VF:
- mask = &rte_flow_item_vf_mask;
- break;
case RTE_FLOW_ITEM_TYPE_PORT_ID:
mask = &rte_flow_item_port_id_mask;
break;
diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index 259480d1df..860a0a8cf6 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -69,7 +69,6 @@ port_representor = Y
represented_port = Y
tcp = Y
udp = Y
-vf = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/cxgbe.ini b/doc/guides/nics/features/cxgbe.ini
index d869f2100f..3f11cc2ac0 100644
--- a/doc/guides/nics/features/cxgbe.ini
+++ b/doc/guides/nics/features/cxgbe.ini
@@ -42,7 +42,6 @@ ipv6 = Y
phy_port = Y
tcp = Y
udp = Y
-vf = Y
vlan = Y
[rte_flow actions]
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index aff236134e..8fbe1de46a 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -135,7 +135,6 @@ sctp =
tag =
tcp =
udp =
-vf =
vlan =
vxlan =
vxlan_gpe =
diff --git a/doc/guides/nics/features/i40e.ini b/doc/guides/nics/features/i40e.ini
index dd18fec217..95e39aaba0 100644
--- a/doc/guides/nics/features/i40e.ini
+++ b/doc/guides/nics/features/i40e.ini
@@ -68,7 +68,6 @@ raw = Y
sctp = Y
tcp = Y
udp = Y
-vf = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini
index 355174d5c2..363fc6d0ec 100644
--- a/doc/guides/nics/features/sfc.ini
+++ b/doc/guides/nics/features/sfc.ini
@@ -55,7 +55,6 @@ pppoes = Y
represented_port = Y
tcp = Y
udp = Y
-vf = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 2dbc59e8f7..0e0088b09f 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -200,8 +200,6 @@ Supported pattern items (***transfer*** rules):
- PHY_PORT (cannot repeat; conflicts with other traffic source items)
-- VF (cannot repeat; conflicts with other traffic source items)
-
- ETH
- VLAN (double-tagging is supported)
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 72f0c3d346..85bf2bf123 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -535,40 +535,6 @@ Usage example, matching non-TCPv4 packets only:
| 4 | END |
+-------+----------+
-Item: ``VF``
-^^^^^^^^^^^^
-
-This item is deprecated. Consider:
- - `Item: PORT_REPRESENTOR`_
- - `Item: REPRESENTED_PORT`_
-
-Matches traffic originating from (ingress) or going to (egress) a given
-virtual function of the current device.
-
-If supported, should work even if the virtual function is not managed by the
-application and thus not associated with a DPDK port ID.
-
-Note this pattern item does not match VF representors traffic which, as
-separate entities, should be addressed through their own DPDK port IDs.
-
-- Can be specified multiple times to match traffic addressed to several VF
- IDs.
-- Default ``mask`` matches any VF ID.
-
-.. _table_rte_flow_item_vf:
-
-.. table:: VF
-
- +----------+----------+---------------------------+
- | Field | Subfield | Value |
- +==========+==========+===========================+
- | ``spec`` | ``id`` | destination VF ID |
- +----------+----------+---------------------------+
- | ``last`` | ``id`` | upper range value |
- +----------+----------+---------------------------+
- | ``mask`` | ``id`` | zeroed to match any VF ID |
- +----------+----------+---------------------------+
-
Item: ``PHY_PORT``
^^^^^^^^^^^^^^^^^^
@@ -2063,13 +2029,11 @@ This action is deprecated. Consider:
Directs matching traffic to a given virtual function of the current device.
-Packets matched by a VF pattern item can be redirected to their original VF
-ID instead of the specified one. This parameter may not be available and is
+Packets can be redirected to the VF they originate from,
+instead of the specified one. This parameter may not be available and is
not guaranteed to work properly if the VF part is matched by a prior flow
rule or if packets are not addressed to a VF in the first place.
-See `Item: VF`_.
-
.. _table_rte_flow_action_vf:
.. table:: VF
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index b7469708af..cf3d6e4efb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -79,6 +79,9 @@ Removed Items
* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PF``;
use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+* ethdev: removed ``RTE_FLOW_ITEM_TYPE_VF``;
+ use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+
API Changes
-----------
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 4446560369..17049e59f8 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3665,10 +3665,6 @@ This section lists supported pattern items and their attributes, if any.
- ``num {unsigned}``: number of layers covered.
-- ``vf``: match traffic from/to a virtual function ID.
-
- - ``id {unsigned}``: VF ID.
-
- ``phy_port``: match traffic from/to a specific physical port.
- ``index {unsigned}``: physical port index.
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index f8e10968e3..96ef00460c 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -126,8 +126,7 @@ bnxt_filter_type_check(const struct rte_flow_item pattern[],
}
static int
-bnxt_validate_and_parse_flow_type(struct bnxt *bp,
- const struct rte_flow_attr *attr,
+bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
const struct rte_flow_item pattern[],
struct rte_flow_error *error,
struct bnxt_filter_info *filter)
@@ -148,16 +147,13 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
const struct rte_flow_item_vxlan *vxlan_mask;
uint8_t vni_mask[] = {0xFF, 0xFF, 0xFF};
uint8_t tni_mask[] = {0xFF, 0xFF, 0xFF};
- const struct rte_flow_item_vf *vf_spec;
uint32_t tenant_id_be = 0, valid_flags = 0;
bool vni_masked = 0;
bool tni_masked = 0;
uint32_t en_ethertype;
uint8_t inner = 0;
- uint32_t vf = 0;
uint32_t en = 0;
int use_ntuple;
- int dflt_vnic;
use_ntuple = bnxt_filter_type_check(pattern, error);
if (use_ntuple < 0)
@@ -680,56 +676,6 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
}
break;
- case RTE_FLOW_ITEM_TYPE_VF:
- vf_spec = item->spec;
- vf = vf_spec->id;
- if (!BNXT_PF(bp)) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "Configuring on a VF!");
- return -rte_errno;
- }
-
- if (vf >= bp->pdev->max_vfs) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "Incorrect VF id!");
- return -rte_errno;
- }
-
- if (!attr->transfer) {
- rte_flow_error_set(error,
- ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "Matching VF traffic without"
- " affecting it (transfer attribute)"
- " is unsupported");
- return -rte_errno;
- }
-
- filter->mirror_vnic_id =
- dflt_vnic = bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(bp, vf);
- if (dflt_vnic < 0) {
- /* This simply indicates there's no driver
- * loaded. This is not an error.
- */
- rte_flow_error_set
- (error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "Unable to get default VNIC for VF");
- return -rte_errno;
- }
-
- filter->mirror_vnic_id = dflt_vnic;
- en |= NTUPLE_FLTR_ALLOC_INPUT_EN_MIRROR_VNIC_ID;
- break;
default:
break;
}
@@ -1298,7 +1244,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
int rc, use_ntuple;
rc =
- bnxt_validate_and_parse_flow_type(bp, attr, pattern, error, filter);
+ bnxt_validate_and_parse_flow_type(attr, pattern, error, filter);
if (rc != 0)
goto ret;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
index 17216426d8..23081fc99b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
@@ -260,10 +260,6 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_item_any_handler
},
- [RTE_FLOW_ITEM_TYPE_VF] = {
- .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
- .proto_hdr_func = ulp_rte_vf_hdr_handler
- },
[RTE_FLOW_ITEM_TYPE_PHY_PORT] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_phy_port_hdr_handler
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 6a1d235f77..38799840dd 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -507,40 +507,6 @@ ulp_rte_parser_implicit_act_port_process(struct ulp_rte_parser_params *params)
return BNXT_TF_RC_SUCCESS;
}
-/* Function to handle the parsing of RTE Flow item VF Header. */
-int32_t
-ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params)
-{
- const struct rte_flow_item_vf *vf_spec = item->spec;
- const struct rte_flow_item_vf *vf_mask = item->mask;
- uint16_t mask = 0;
- uint32_t ifindex;
- int32_t rc = BNXT_TF_RC_PARSE_ERR;
-
- /* Get VF rte_flow_item for Port details */
- if (!vf_spec) {
- BNXT_TF_DBG(ERR, "ParseErr:VF id is not valid\n");
- return rc;
- }
- if (!vf_mask) {
- BNXT_TF_DBG(ERR, "ParseErr:VF mask is not valid\n");
- return rc;
- }
- mask = vf_mask->id;
-
- /* perform the conversion from VF Func id to bnxt ifindex */
- if (ulp_port_db_dev_func_id_to_ulp_index(params->ulp_ctx,
- vf_spec->id,
- &ifindex)) {
- BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
- return rc;
- }
- /* Update the SVIF details */
- return ulp_rte_parser_svif_set(params, ifindex, mask,
- BNXT_ULP_DIR_INVALID);
-}
-
/* Parse items PORT_ID, PORT_REPRESENTOR and REPRESENTED_PORT. */
int32_t
ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
index 94918f6b4a..0e246abbd8 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
@@ -80,11 +80,6 @@ bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[],
void
bnxt_ulp_rte_parser_post_process(struct ulp_rte_parser_params *params);
-/* Function to handle the parsing of RTE Flow item VF Header. */
-int32_t
-ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params);
-
/* Parse items PORT_ID, PORT_REPRESENTOR and REPRESENTED_PORT. */
int32_t
ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index e4f9c152b5..8b4efc697b 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -288,35 +288,6 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
return 0;
}
-static int
-ch_rte_parsetype_vf(const void *dmask, const struct rte_flow_item *item,
- struct ch_filter_specification *fs,
- struct rte_flow_error *e)
-{
- const struct rte_flow_item_vf *umask = item->mask;
- const struct rte_flow_item_vf *val = item->spec;
- const struct rte_flow_item_vf *mask;
-
- /* If user has not given any mask, then use chelsio supported mask. */
- mask = umask ? umask : (const struct rte_flow_item_vf *)dmask;
-
- CXGBE_FILL_FS(1, 1, pfvf_vld);
-
- if (!val)
- return 0; /* Wildcard, match all Vf */
-
- if (val->id > UCHAR_MAX)
- return rte_flow_error_set(e, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "VF ID > MAX(255)");
-
- if (val->id || (umask && umask->id))
- CXGBE_FILL_FS(val->id, mask->id, vf);
-
- return 0;
-}
-
static int
ch_rte_parsetype_udp(const void *dmask, const struct rte_flow_item *item,
struct ch_filter_specification *fs,
@@ -1005,13 +976,6 @@ static struct chrte_fparse parseitem[] = {
.fptr = ch_rte_parsetype_tcp,
.dmask = &rte_flow_item_tcp_mask,
},
-
- [RTE_FLOW_ITEM_TYPE_VF] = {
- .fptr = ch_rte_parsetype_vf,
- .dmask = &(const struct rte_flow_item_vf){
- .id = 0xffffffff,
- }
- },
};
static int
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 4f3808cb5f..65a826d51c 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -62,7 +62,6 @@ static int i40e_flow_parse_ethertype_action(struct rte_eth_dev *dev,
struct rte_flow_error *error,
struct rte_eth_ethertype_filter *filter);
static int i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
- const struct rte_flow_attr *attr,
const struct rte_flow_item *pattern,
struct rte_flow_error *error,
struct i40e_fdir_filter_conf *filter);
@@ -148,1171 +147,508 @@ const struct rte_flow_ops i40e_flow_ops = {
static union i40e_filter_t cons_filter;
static enum rte_filter_type cons_filter_type = RTE_ETH_FILTER_NONE;
-/* internal pattern w/o VOID items */
-struct rte_flow_item g_items[32];
-
-/* Pattern matched ethertype filter */
-static enum rte_flow_item_type pattern_ethertype[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-/* Pattern matched flow director filter */
-static enum rte_flow_item_type pattern_fdir_ipv4[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_udp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_gtpc[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPC,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_gtpu[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_gtpu_ipv4[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_gtpu_ipv6[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_udp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_gtpc[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPC,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_gtpu[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_gtpu_ipv4[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_gtpu_ipv6[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_GTPU,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
+/* internal pattern w/o VOID items */
+struct rte_flow_item g_items[32];
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_3[] = {
+/* Pattern matched ethertype filter */
+static enum rte_flow_item_type pattern_ethertype[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_1[] = {
+/* Pattern matched flow director filter */
+static enum rte_flow_item_type pattern_fdir_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_2[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_udp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
+ RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_3[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_tcp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_1[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_sctp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_2[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_gtpc[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPC,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_3[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_gtpu[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_2[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_3[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
+ RTE_FLOW_ITEM_TYPE_GTPU,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_2[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_gtpu_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
+ RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_3[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_gtpu_ipv6[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_IPV6,
+ RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_1[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
+ RTE_FLOW_ITEM_TYPE_GTPU,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_2[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_3[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_udp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
+ RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_1[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_tcp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
+ RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_2[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_sctp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_3[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_gtpc[] = {
RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_vf[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_VF,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_vf[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_VF,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_vf[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_VF,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_vf[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_VF,
+ RTE_FLOW_ITEM_TYPE_GTPC,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_gtpu[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_VF,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_gtpu_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_VF,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_gtpu_ipv6[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_VF,
- RTE_FLOW_ITEM_TYPE_END,
-};
-
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_vf[] = {
- RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_vlan[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_TCP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1320,32 +656,29 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_3_vf[] = {
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1353,32 +686,29 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_3_vf[] = {
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1386,62 +716,56 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_3_vf[] = {
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_UDP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
@@ -1449,32 +773,29 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_3_vf[] = {
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_TCP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
@@ -1482,32 +803,29 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_3_vf[] = {
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_1_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_1[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_2_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_2[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
RTE_FLOW_ITEM_TYPE_SCTP,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
-static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_3_vf[] = {
+static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_3[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_VLAN,
RTE_FLOW_ITEM_TYPE_IPV6,
@@ -1515,7 +833,6 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_3_vf[] = {
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
RTE_FLOW_ITEM_TYPE_RAW,
- RTE_FLOW_ITEM_TYPE_VF,
RTE_FLOW_ITEM_TYPE_END,
};
@@ -1765,78 +1082,6 @@ static struct i40e_valid_pattern i40e_supported_patterns[] = {
{ pattern_fdir_vlan_ipv6_sctp_raw_1, i40e_flow_parse_fdir_filter },
{ pattern_fdir_vlan_ipv6_sctp_raw_2, i40e_flow_parse_fdir_filter },
{ pattern_fdir_vlan_ipv6_sctp_raw_3, i40e_flow_parse_fdir_filter },
- /* FDIR - support VF item */
- { pattern_fdir_ipv4_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_udp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_tcp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_sctp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_udp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_tcp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_sctp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv4_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ipv6_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_vlan_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_udp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_tcp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_sctp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_udp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_tcp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_sctp_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_vlan_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_vlan_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_ethertype_vlan_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv4_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
- { pattern_fdir_vlan_ipv6_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
/* VXLAN */
{ pattern_vxlan_1, i40e_flow_parse_vxlan_filter },
{ pattern_vxlan_2, i40e_flow_parse_vxlan_filter },
@@ -2348,7 +1593,6 @@ i40e_flow_set_filter_spi(struct i40e_fdir_filter_conf *filter,
*/
static int
i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
- const struct rte_flow_attr *attr,
const struct rte_flow_item *pattern,
struct rte_flow_error *error,
struct i40e_fdir_filter_conf *filter)
@@ -2365,7 +1609,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
const struct rte_flow_item_gtp *gtp_spec, *gtp_mask;
const struct rte_flow_item_esp *esp_spec, *esp_mask;
const struct rte_flow_item_raw *raw_spec, *raw_mask;
- const struct rte_flow_item_vf *vf_spec;
const struct rte_flow_item_l2tpv3oip *l2tpv3oip_spec, *l2tpv3oip_mask;
uint8_t pctype = 0;
@@ -3067,29 +2310,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
filter->input.flow_ext.raw_id = raw_id;
filter->input.flow_ext.is_flex_flow = true;
break;
- case RTE_FLOW_ITEM_TYPE_VF:
- vf_spec = item->spec;
- if (!attr->transfer) {
- rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "Matching VF traffic"
- " without affecting it"
- " (transfer attribute)"
- " is unsupported");
- return -rte_errno;
- }
- filter->input.flow_ext.is_vf = 1;
- filter->input.flow_ext.dst_id = vf_spec->id;
- if (filter->input.flow_ext.is_vf &&
- filter->input.flow_ext.dst_id >= pf->vf_num) {
- rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "Invalid VF ID for FDIR.");
- return -rte_errno;
- }
- break;
case RTE_FLOW_ITEM_TYPE_L2TPV3OIP:
l2tpv3oip_spec = item->spec;
l2tpv3oip_mask = item->mask;
@@ -3277,8 +2497,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
&filter->fdir_filter;
int ret;
- ret = i40e_flow_parse_fdir_pattern(dev, attr, pattern, error,
- fdir_filter);
+ ret = i40e_flow_parse_fdir_pattern(dev, pattern, error, fdir_filter);
if (ret)
return ret;
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index e8da2d2a0d..06de659ee2 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1685,71 +1685,6 @@ sfc_mae_rule_parse_item_phy_port(const struct rte_flow_item *item,
return 0;
}
-static int
-sfc_mae_rule_parse_item_vf(const struct rte_flow_item *item,
- struct sfc_flow_parse_ctx *ctx,
- struct rte_flow_error *error)
-{
- struct sfc_mae_parse_ctx *ctx_mae = ctx->mae;
- const efx_nic_cfg_t *encp = efx_nic_cfg_get(ctx_mae->sa->nic);
- const struct rte_flow_item_vf supp_mask = {
- .id = 0xffffffff,
- };
- const void *def_mask = &rte_flow_item_vf_mask;
- const struct rte_flow_item_vf *spec = NULL;
- const struct rte_flow_item_vf *mask = NULL;
- efx_mport_sel_t mport_v;
- int rc;
-
- if (ctx_mae->match_mport_set) {
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Can't handle multiple traffic source items");
- }
-
- rc = sfc_flow_parse_init(item,
- (const void **)&spec, (const void **)&mask,
- (const void *)&supp_mask, def_mask,
- sizeof(struct rte_flow_item_vf), error);
- if (rc != 0)
- return rc;
-
- if (mask->id != supp_mask.id) {
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Bad mask in the VF pattern item");
- }
-
- /*
- * If "spec" is not set, the item requests any VF related to the
- * PF of the current DPDK port (but not the PF itself).
- * Reject this match criterion as unsupported.
- */
- if (spec == NULL) {
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Bad spec in the VF pattern item");
- }
-
- rc = efx_mae_mport_by_pcie_function(encp->enc_pf, spec->id, &mport_v);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to convert the PF + VF IDs");
- }
-
- rc = efx_mae_match_spec_mport_set(ctx_mae->match_spec, &mport_v, NULL);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to set MPORT for the PF + VF");
- }
-
- ctx_mae->match_mport_set = B_TRUE;
-
- return 0;
-}
-
/*
* Having this field ID in a field locator means that this
* locator cannot be used to actually set the field at the
@@ -2555,18 +2490,6 @@ static const struct sfc_flow_item sfc_flow_items[] = {
.ctx_type = SFC_FLOW_PARSE_CTX_MAE,
.parse = sfc_mae_rule_parse_item_phy_port,
},
- {
- .type = RTE_FLOW_ITEM_TYPE_VF,
- .name = "VF",
- /*
- * In terms of RTE flow, this item is a META one,
- * and its position in the pattern is don't care.
- */
- .prev_layer = SFC_FLOW_ITEM_ANY_LAYER,
- .layer = SFC_FLOW_ITEM_ANY_LAYER,
- .ctx_type = SFC_FLOW_PARSE_CTX_MAE,
- .parse = sfc_mae_rule_parse_item_vf,
- },
{
.type = RTE_FLOW_ITEM_TYPE_ETH,
.name = "ETH",
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 6ece72bf36..65c74687e3 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -97,7 +97,6 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
MK_FLOW_ITEM(VOID, 0),
MK_FLOW_ITEM(INVERT, 0),
MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)),
- MK_FLOW_ITEM(VF, sizeof(struct rte_flow_item_vf)),
MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
MK_FLOW_ITEM(PORT_ID, sizeof(struct rte_flow_item_port_id)),
MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 97de98e232..0a98db9c1c 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -188,20 +188,6 @@ enum rte_flow_item_type {
*/
RTE_FLOW_ITEM_TYPE_ANY,
- /**
- * @deprecated
- * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
- *
- * [META]
- *
- * Matches traffic originating from (ingress) or going to (egress) a
- * given virtual function of the current device.
- *
- * See struct rte_flow_item_vf.
- */
- RTE_FLOW_ITEM_TYPE_VF,
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
@@ -700,38 +686,6 @@ static const struct rte_flow_item_any rte_flow_item_any_mask = {
};
#endif
-/**
- * @deprecated
- * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
- *
- * RTE_FLOW_ITEM_TYPE_VF
- *
- * Matches traffic originating from (ingress) or going to (egress) a given
- * virtual function of the current device.
- *
- * If supported, should work even if the virtual function is not managed by
- * the application and thus not associated with a DPDK port ID.
- *
- * Note this pattern item does not match VF representors traffic which, as
- * separate entities, should be addressed through their own DPDK port IDs.
- *
- * - Can be specified multiple times to match traffic addressed to several
- * VF IDs.
- *
- * A zeroed mask can be used to match any VF ID.
- */
-struct rte_flow_item_vf {
- uint32_t id; /**< VF ID. */
-};
-
-/** Default mask for RTE_FLOW_ITEM_TYPE_VF. */
-#ifndef __cplusplus
-static const struct rte_flow_item_vf rte_flow_item_vf_mask = {
- .id = 0x00000000,
-};
-#endif
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
--
2.30.2
^ permalink raw reply [relevance 1%]
* [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT
` (4 preceding siblings ...)
2022-08-12 19:18 1% ` [PATCH 11/13] ethdev: remove deprecated flow item VF Ivan Malov
@ 2022-08-12 19:18 1% ` Ivan Malov
2022-08-22 5:33 0% ` Ori Kam
2022-08-12 19:18 5% ` [PATCH 13/13] ethdev: remove deprecated flow action " Ivan Malov
6 siblings, 1 reply; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit, Matan Azrad, Viacheslav Ovsiienko
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline_flow.c | 24 ------
doc/guides/nics/features/bnxt.ini | 1 -
doc/guides/nics/features/cxgbe.ini | 1 -
doc/guides/nics/features/default.ini | 1 -
doc/guides/nics/features/mlx5.ini | 1 -
doc/guides/nics/features/sfc.ini | 1 -
doc/guides/nics/sfc_efx.rst | 2 -
doc/guides/prog_guide/rte_flow.rst | 45 -----------
doc/guides/rel_notes/release_22_11.rst | 3 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 -
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 -
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 75 -------------------
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 --
drivers/net/cxgbe/cxgbe_flow.c | 32 --------
drivers/net/sfc/sfc_mae.c | 69 -----------------
lib/ethdev/rte_flow.c | 1 -
lib/ethdev/rte_flow.h | 56 --------------
17 files changed, 3 insertions(+), 322 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 31b906178c..758c1f0efa 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -249,8 +249,6 @@ enum index {
ITEM_INVERT,
ITEM_ANY,
ITEM_ANY_NUM,
- ITEM_PHY_PORT,
- ITEM_PHY_PORT_INDEX,
ITEM_PORT_ID,
ITEM_PORT_ID_ID,
ITEM_MARK,
@@ -1275,7 +1273,6 @@ static const enum index next_item[] = {
ITEM_VOID,
ITEM_INVERT,
ITEM_ANY,
- ITEM_PHY_PORT,
ITEM_PORT_ID,
ITEM_MARK,
ITEM_RAW,
@@ -1345,12 +1342,6 @@ static const enum index item_any[] = {
ZERO,
};
-static const enum index item_phy_port[] = {
- ITEM_PHY_PORT_INDEX,
- ITEM_NEXT,
- ZERO,
-};
-
static const enum index item_port_id[] = {
ITEM_PORT_ID_ID,
ITEM_NEXT,
@@ -3450,21 +3441,6 @@ static const struct token token_list[] = {
.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
},
- [ITEM_PHY_PORT] = {
- .name = "phy_port",
- .help = "match traffic from/to a specific physical port",
- .priv = PRIV_ITEM(PHY_PORT,
- sizeof(struct rte_flow_item_phy_port)),
- .next = NEXT(item_phy_port),
- .call = parse_vc,
- },
- [ITEM_PHY_PORT_INDEX] = {
- .name = "index",
- .help = "physical port index",
- .next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED),
- item_param),
- .args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
- },
[ITEM_PORT_ID] = {
.name = "port_id",
.help = "match traffic from/to a given DPDK port ID",
diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index 860a0a8cf6..c05bcff909 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -63,7 +63,6 @@ ipv6 = Y
gre = Y
icmp = Y
icmp6 = Y
-phy_port = Y
port_id = Y
port_representor = Y
represented_port = Y
diff --git a/doc/guides/nics/features/cxgbe.ini b/doc/guides/nics/features/cxgbe.ini
index 3f11cc2ac0..295816ab9d 100644
--- a/doc/guides/nics/features/cxgbe.ini
+++ b/doc/guides/nics/features/cxgbe.ini
@@ -39,7 +39,6 @@ Usage doc = Y
eth = Y
ipv4 = Y
ipv6 = Y
-phy_port = Y
tcp = Y
udp = Y
vlan = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 8fbe1de46a..7ed5bd8cb9 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -122,7 +122,6 @@ mpls =
nsh =
nvgre =
pfcp =
-phy_port =
port_id =
port_representor =
ppp =
diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini
index e056516deb..e5974063c8 100644
--- a/doc/guides/nics/features/mlx5.ini
+++ b/doc/guides/nics/features/mlx5.ini
@@ -76,7 +76,6 @@ mark = Y
meta = Y
mpls = Y
nvgre = Y
-phy_port = Y
port_id = Y
tag = Y
tcp = Y
diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini
index 363fc6d0ec..3dac105e35 100644
--- a/doc/guides/nics/features/sfc.ini
+++ b/doc/guides/nics/features/sfc.ini
@@ -47,7 +47,6 @@ ipv4 = Y
ipv6 = Y
mark = P
nvgre = Y
-phy_port = Y
port_id = Y
port_representor = Y
pppoed = Y
diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 0e0088b09f..6eca86e96f 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -198,8 +198,6 @@ Supported pattern items (***transfer*** rules):
- PORT_ID (cannot repeat; conflicts with other traffic source items)
-- PHY_PORT (cannot repeat; conflicts with other traffic source items)
-
- ETH
- VLAN (double-tagging is supported)
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 85bf2bf123..9cf4261494 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -535,44 +535,6 @@ Usage example, matching non-TCPv4 packets only:
| 4 | END |
+-------+----------+
-Item: ``PHY_PORT``
-^^^^^^^^^^^^^^^^^^
-
-This item is deprecated. Consider:
- - `Item: PORT_REPRESENTOR`_
- - `Item: REPRESENTED_PORT`_
-
-Matches traffic originating from (ingress) or going to (egress) a physical
-port of the underlying device.
-
-The first PHY_PORT item overrides the physical port normally associated with
-the specified DPDK input port (port_id). This item can be provided several
-times to match additional physical ports.
-
-Note that physical ports are not necessarily tied to DPDK input ports
-(port_id) when those are not under DPDK control. Possible values are
-specific to each device, they are not necessarily indexed from zero and may
-not be contiguous.
-
-As a device property, the list of allowed values as well as the value
-associated with a port_id should be retrieved by other means.
-
-- Default ``mask`` matches any port index.
-
-.. _table_rte_flow_item_phy_port:
-
-.. table:: PHY_PORT
-
- +----------+-----------+--------------------------------+
- | Field | Subfield | Value |
- +==========+===========+================================+
- | ``spec`` | ``index`` | physical port index |
- +----------+-----------+--------------------------------+
- | ``last`` | ``index`` | upper range value |
- +----------+-----------+--------------------------------+
- | ``mask`` | ``index`` | zeroed to match any port index |
- +----------+-----------+--------------------------------+
-
Item: ``PORT_ID``
^^^^^^^^^^^^^^^^^
@@ -586,11 +548,6 @@ port ID.
Normally only supported if the port ID in question is known by the
underlying PMD and related to the device the flow rule is created against.
-This must not be confused with `Item: PHY_PORT`_ which refers to the
-physical port of a device, whereas `Item: PORT_ID`_ refers to a ``struct
-rte_eth_dev`` object on the application side (also known as "port
-representor" depending on the kind of underlying device).
-
- Default ``mask`` matches the specified DPDK port ID.
.. _table_rte_flow_item_port_id:
@@ -2056,8 +2013,6 @@ This action is deprecated. Consider:
Directs matching traffic to a given physical port index of the underlying
device.
-See `Item: PHY_PORT`_.
-
.. _table_rte_flow_action_phy_port:
.. table:: PHY_PORT
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index cf3d6e4efb..343f40a041 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -82,6 +82,9 @@ Removed Items
* ethdev: removed ``RTE_FLOW_ITEM_TYPE_VF``;
use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PHY_PORT``;
+ use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+
API Changes
-----------
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 17049e59f8..b9c2d7a6fe 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3665,10 +3665,6 @@ This section lists supported pattern items and their attributes, if any.
- ``num {unsigned}``: number of layers covered.
-- ``phy_port``: match traffic from/to a specific physical port.
-
- - ``index {unsigned}``: physical port index.
-
- ``port_id``: match traffic from/to a given DPDK port ID.
- ``id {unsigned}``: DPDK port ID.
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
index 23081fc99b..66cd2fba7e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
@@ -260,10 +260,6 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_item_any_handler
},
- [RTE_FLOW_ITEM_TYPE_PHY_PORT] = {
- .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
- .proto_hdr_func = ulp_rte_phy_port_hdr_handler
- },
[RTE_FLOW_ITEM_TYPE_PORT_ID] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_port_hdr_handler
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 38799840dd..3faafcf788 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -571,81 +571,6 @@ ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
return ulp_rte_parser_svif_set(params, ifindex, mask, item_dir);
}
-/* Function to handle the parsing of RTE Flow item phy port Header. */
-int32_t
-ulp_rte_phy_port_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params)
-{
- const struct rte_flow_item_phy_port *port_spec = item->spec;
- const struct rte_flow_item_phy_port *port_mask = item->mask;
- uint16_t mask = 0;
- int32_t rc = BNXT_TF_RC_ERROR;
- uint16_t svif;
- enum bnxt_ulp_direction_type dir;
- struct ulp_rte_hdr_field *hdr_field;
-
- /* Copy the rte_flow_item for phy port into hdr_field */
- if (!port_spec) {
- BNXT_TF_DBG(ERR, "ParseErr:Phy Port id is not valid\n");
- return rc;
- }
- if (!port_mask) {
- BNXT_TF_DBG(ERR, "ParseErr:Phy Port mask is not valid\n");
- return rc;
- }
- mask = port_mask->index;
-
- /* Update the match port type */
- ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_MATCH_PORT_TYPE,
- BNXT_ULP_INTF_TYPE_PHY_PORT);
-
- /* Compute the Hw direction */
- bnxt_ulp_rte_parser_direction_compute(params);
-
- /* Direction validation */
- dir = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_DIRECTION);
- if (dir == BNXT_ULP_DIR_EGRESS) {
- BNXT_TF_DBG(ERR,
- "Parse Err:Phy ports are valid only for ingress\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
-
- /* Get the physical port details from port db */
- rc = ulp_port_db_phy_port_svif_get(params->ulp_ctx, port_spec->index,
- &svif);
- if (rc) {
- BNXT_TF_DBG(ERR, "Failed to get port details\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
-
- /* Update the SVIF details */
- svif = rte_cpu_to_be_16(svif);
- hdr_field = ¶ms->hdr_field[BNXT_ULP_PROTO_HDR_FIELD_SVIF_IDX];
- memcpy(hdr_field->spec, &svif, sizeof(svif));
- memcpy(hdr_field->mask, &mask, sizeof(mask));
- hdr_field->size = sizeof(svif);
- ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_SVIF_FLAG,
- rte_be_to_cpu_16(svif));
- if (!mask) {
- uint32_t port_id = 0;
- uint16_t phy_port = 0;
-
- /* Validate the control port */
- port_id = ULP_COMP_FLD_IDX_RD(params,
- BNXT_ULP_CF_IDX_DEV_PORT_ID);
- if (ulp_port_db_phy_port_get(params->ulp_ctx,
- port_id, &phy_port) ||
- (uint16_t)port_spec->index != phy_port) {
- BNXT_TF_DBG(ERR, "Mismatch of control and phy_port\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
- ULP_BITMAP_SET(params->hdr_bitmap.bits,
- BNXT_ULP_HDR_BIT_SVIF_IGNORE);
- memset(hdr_field->mask, 0xFF, sizeof(mask));
- }
- return BNXT_TF_RC_SUCCESS;
-}
-
/* Function to handle the update of proto header based on field values */
static void
ulp_rte_l2_proto_type_update(struct ulp_rte_parser_params *param,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
index 0e246abbd8..5a9b056b16 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
@@ -85,11 +85,6 @@ int32_t
ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
struct ulp_rte_parser_params *params);
-/* Function to handle the parsing of RTE Flow item port Header. */
-int32_t
-ulp_rte_phy_port_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params);
-
/* Function to handle the RTE item Ethernet Header. */
int32_t
ulp_rte_eth_hdr_handler(const struct rte_flow_item *item,
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 8b4efc697b..d383334415 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -208,31 +208,6 @@ ch_rte_parsetype_eth(const void *dmask, const struct rte_flow_item *item,
return 0;
}
-static int
-ch_rte_parsetype_port(const void *dmask, const struct rte_flow_item *item,
- struct ch_filter_specification *fs,
- struct rte_flow_error *e)
-{
- const struct rte_flow_item_phy_port *val = item->spec;
- const struct rte_flow_item_phy_port *umask = item->mask;
- const struct rte_flow_item_phy_port *mask;
-
- mask = umask ? umask : (const struct rte_flow_item_phy_port *)dmask;
-
- if (!val)
- return 0; /* Wildcard, match all physical ports */
-
- if (val->index > 0x7)
- return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "port index up to 0x7 is supported");
-
- if (val->index || (umask && umask->index))
- CXGBE_FILL_FS(val->index, mask->index, iport);
-
- return 0;
-}
-
static int
ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
struct ch_filter_specification *fs,
@@ -926,13 +901,6 @@ static struct chrte_fparse parseitem[] = {
}
},
- [RTE_FLOW_ITEM_TYPE_PHY_PORT] = {
- .fptr = ch_rte_parsetype_port,
- .dmask = &(const struct rte_flow_item_phy_port){
- .index = 0x7,
- }
- },
-
[RTE_FLOW_ITEM_TYPE_VLAN] = {
.fptr = ch_rte_parsetype_vlan,
.dmask = &(const struct rte_flow_item_vlan){
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 06de659ee2..4ddb63cbe5 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1628,63 +1628,6 @@ sfc_mae_rule_parse_item_ethdev_based(const struct rte_flow_item *item,
return 0;
}
-static int
-sfc_mae_rule_parse_item_phy_port(const struct rte_flow_item *item,
- struct sfc_flow_parse_ctx *ctx,
- struct rte_flow_error *error)
-{
- struct sfc_mae_parse_ctx *ctx_mae = ctx->mae;
- const struct rte_flow_item_phy_port supp_mask = {
- .index = 0xffffffff,
- };
- const void *def_mask = &rte_flow_item_phy_port_mask;
- const struct rte_flow_item_phy_port *spec = NULL;
- const struct rte_flow_item_phy_port *mask = NULL;
- efx_mport_sel_t mport_v;
- int rc;
-
- if (ctx_mae->match_mport_set) {
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Can't handle multiple traffic source items");
- }
-
- rc = sfc_flow_parse_init(item,
- (const void **)&spec, (const void **)&mask,
- (const void *)&supp_mask, def_mask,
- sizeof(struct rte_flow_item_phy_port), error);
- if (rc != 0)
- return rc;
-
- if (mask->index != supp_mask.index) {
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Bad mask in the PHY_PORT pattern item");
- }
-
- /* If "spec" is not set, could be any physical port */
- if (spec == NULL)
- return 0;
-
- rc = efx_mae_mport_by_phy_port(spec->index, &mport_v);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to convert the PHY_PORT index");
- }
-
- rc = efx_mae_match_spec_mport_set(ctx_mae->match_spec, &mport_v, NULL);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to set MPORT for the PHY_PORT");
- }
-
- ctx_mae->match_mport_set = B_TRUE;
-
- return 0;
-}
-
/*
* Having this field ID in a field locator means that this
* locator cannot be used to actually set the field at the
@@ -2478,18 +2421,6 @@ static const struct sfc_flow_item sfc_flow_items[] = {
.ctx_type = SFC_FLOW_PARSE_CTX_MAE,
.parse = sfc_mae_rule_parse_item_ethdev_based,
},
- {
- .type = RTE_FLOW_ITEM_TYPE_PHY_PORT,
- .name = "PHY_PORT",
- /*
- * In terms of RTE flow, this item is a META one,
- * and its position in the pattern is don't care.
- */
- .prev_layer = SFC_FLOW_ITEM_ANY_LAYER,
- .layer = SFC_FLOW_ITEM_ANY_LAYER,
- .ctx_type = SFC_FLOW_PARSE_CTX_MAE,
- .parse = sfc_mae_rule_parse_item_phy_port,
- },
{
.type = RTE_FLOW_ITEM_TYPE_ETH,
.name = "ETH",
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 65c74687e3..e7ccdb772e 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -97,7 +97,6 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
MK_FLOW_ITEM(VOID, 0),
MK_FLOW_ITEM(INVERT, 0),
MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)),
- MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
MK_FLOW_ITEM(PORT_ID, sizeof(struct rte_flow_item_port_id)),
MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
MK_FLOW_ITEM(ETH, sizeof(struct rte_flow_item_eth)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 0a98db9c1c..066e8c8a99 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -188,20 +188,6 @@ enum rte_flow_item_type {
*/
RTE_FLOW_ITEM_TYPE_ANY,
- /**
- * @deprecated
- * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
- *
- * [META]
- *
- * Matches traffic originating from (ingress) or going to (egress) a
- * physical port of the underlying device.
- *
- * See struct rte_flow_item_phy_port.
- */
- RTE_FLOW_ITEM_TYPE_PHY_PORT,
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
@@ -686,41 +672,6 @@ static const struct rte_flow_item_any rte_flow_item_any_mask = {
};
#endif
-/**
- * @deprecated
- * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
- *
- * RTE_FLOW_ITEM_TYPE_PHY_PORT
- *
- * Matches traffic originating from (ingress) or going to (egress) a
- * physical port of the underlying device.
- *
- * The first PHY_PORT item overrides the physical port normally associated
- * with the specified DPDK input port (port_id). This item can be provided
- * several times to match additional physical ports.
- *
- * Note that physical ports are not necessarily tied to DPDK input ports
- * (port_id) when those are not under DPDK control. Possible values are
- * specific to each device, they are not necessarily indexed from zero and
- * may not be contiguous.
- *
- * As a device property, the list of allowed values as well as the value
- * associated with a port_id should be retrieved by other means.
- *
- * A zeroed mask can be used to match any port index.
- */
-struct rte_flow_item_phy_port {
- uint32_t index; /**< Physical port index. */
-};
-
-/** Default mask for RTE_FLOW_ITEM_TYPE_PHY_PORT. */
-#ifndef __cplusplus
-static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask = {
- .index = 0x00000000,
-};
-#endif
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
@@ -734,11 +685,6 @@ static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask = {
* Normally only supported if the port ID in question is known by the
* underlying PMD and related to the device the flow rule is created
* against.
- *
- * This must not be confused with @p PHY_PORT which refers to the physical
- * port of a device, whereas @p PORT_ID refers to a struct rte_eth_dev
- * object on the application side (also known as "port representor"
- * depending on the kind of underlying device).
*/
struct rte_flow_item_port_id {
uint32_t id; /**< DPDK port ID. */
@@ -3023,8 +2969,6 @@ struct rte_flow_action_vf {
*
* Directs packets to a given physical port index of the underlying
* device.
- *
- * @see RTE_FLOW_ITEM_TYPE_PHY_PORT
*/
struct rte_flow_action_phy_port {
uint32_t original:1; /**< Use original port index if possible. */
--
2.30.2
^ permalink raw reply [relevance 1%]
* [PATCH 13/13] ethdev: remove deprecated flow action PHY PORT
` (5 preceding siblings ...)
2022-08-12 19:18 1% ` [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT Ivan Malov
@ 2022-08-12 19:18 5% ` Ivan Malov
2022-08-22 5:33 0% ` Ori Kam
6 siblings, 1 reply; 200+ results
From: Ivan Malov @ 2022-08-12 19:18 UTC (permalink / raw)
To: dev
Cc: Ori Kam, Eli Britstein, Ilya Maximets, Thomas Monjalon,
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit, Hemant Agrawal, Sachin Saxena
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline_flow.c | 35 -------------
doc/guides/nics/features/bnxt.ini | 1 -
doc/guides/nics/features/cxgbe.ini | 1 -
doc/guides/nics/features/default.ini | 1 -
doc/guides/nics/features/dpaa2.ini | 1 -
doc/guides/nics/features/sfc.ini | 1 -
doc/guides/nics/sfc_efx.rst | 2 -
doc/guides/prog_guide/rte_flow.rst | 22 ---------
doc/guides/rel_notes/release_22_11.rst | 5 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 5 --
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 --
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 49 -------------------
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 --
drivers/net/cxgbe/cxgbe_flow.c | 6 ---
drivers/net/dpaa2/dpaa2_flow.c | 13 +----
drivers/net/sfc/sfc_mae.c | 36 --------------
lib/ethdev/rte_flow.c | 1 -
lib/ethdev/rte_flow.h | 28 -----------
18 files changed, 6 insertions(+), 210 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 758c1f0efa..80f4c0bbef 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -487,9 +487,6 @@ enum index {
ACTION_VF,
ACTION_VF_ORIGINAL,
ACTION_VF_ID,
- ACTION_PHY_PORT,
- ACTION_PHY_PORT_ORIGINAL,
- ACTION_PHY_PORT_INDEX,
ACTION_PORT_ID,
ACTION_PORT_ID_ORIGINAL,
ACTION_PORT_ID_ID,
@@ -1799,7 +1796,6 @@ static const enum index next_action[] = {
ACTION_RSS,
ACTION_PF,
ACTION_VF,
- ACTION_PHY_PORT,
ACTION_PORT_ID,
ACTION_METER,
ACTION_METER_COLOR,
@@ -1893,13 +1889,6 @@ static const enum index action_vf[] = {
ZERO,
};
-static const enum index action_phy_port[] = {
- ACTION_PHY_PORT_ORIGINAL,
- ACTION_PHY_PORT_INDEX,
- ACTION_NEXT,
- ZERO,
-};
-
static const enum index action_port_id[] = {
ACTION_PORT_ID_ORIGINAL,
ACTION_PORT_ID_ID,
@@ -5240,30 +5229,6 @@ static const struct token token_list[] = {
.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
.call = parse_vc_conf,
},
- [ACTION_PHY_PORT] = {
- .name = "phy_port",
- .help = "direct packets to physical port index",
- .priv = PRIV_ACTION(PHY_PORT,
- sizeof(struct rte_flow_action_phy_port)),
- .next = NEXT(action_phy_port),
- .call = parse_vc,
- },
- [ACTION_PHY_PORT_ORIGINAL] = {
- .name = "original",
- .help = "use original port index if possible",
- .next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
- .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
- original, 1)),
- .call = parse_vc_conf,
- },
- [ACTION_PHY_PORT_INDEX] = {
- .name = "index",
- .help = "physical port index",
- .next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
- .args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
- index)),
- .call = parse_vc_conf,
- },
[ACTION_PORT_ID] = {
.name = "port_id",
.help = "direct matching traffic to a given DPDK port ID",
diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index c05bcff909..b2d54f06aa 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -82,7 +82,6 @@ of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
pf = Y
-phy_port = Y
port_id = Y
port_representor = Y
represented_port = Y
diff --git a/doc/guides/nics/features/cxgbe.ini b/doc/guides/nics/features/cxgbe.ini
index 295816ab9d..a9dbcd0573 100644
--- a/doc/guides/nics/features/cxgbe.ini
+++ b/doc/guides/nics/features/cxgbe.ini
@@ -51,7 +51,6 @@ of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
-phy_port = Y
queue = Y
set_ipv4_dst = Y
set_ipv4_src = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 7ed5bd8cb9..f7192cb0da 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -170,7 +170,6 @@ of_set_vlan_pcp =
of_set_vlan_vid =
passthru =
pf =
-phy_port =
port_id =
port_representor =
queue =
diff --git a/doc/guides/nics/features/dpaa2.ini b/doc/guides/nics/features/dpaa2.ini
index 53148ad467..cedc234f26 100644
--- a/doc/guides/nics/features/dpaa2.ini
+++ b/doc/guides/nics/features/dpaa2.ini
@@ -45,7 +45,6 @@ vlan = Y
[rte_flow actions]
drop = Y
-phy_port = Y
port_id = Y
queue = Y
represented_port = Y
diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini
index 3dac105e35..f5ac644278 100644
--- a/doc/guides/nics/features/sfc.ini
+++ b/doc/guides/nics/features/sfc.ini
@@ -70,7 +70,6 @@ of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
pf = Y
-phy_port = Y
port_id = Y
port_representor = Y
represented_port = Y
diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 6eca86e96f..fcad671da2 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -244,8 +244,6 @@ Supported actions (***transfer*** rules):
- MARK
-- PHY_PORT
-
- PF
- VF
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 9cf4261494..becf7c29c9 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -2003,28 +2003,6 @@ rule or if packets are not addressed to a VF in the first place.
| ``id`` | VF ID |
+--------------+--------------------------------+
-Action: ``PHY_PORT``
-^^^^^^^^^^^^^^^^^^^^
-
-This action is deprecated. Consider:
- - `Action: PORT_REPRESENTOR`_
- - `Action: REPRESENTED_PORT`_
-
-Directs matching traffic to a given physical port index of the underlying
-device.
-
-.. _table_rte_flow_action_phy_port:
-
-.. table:: PHY_PORT
-
- +--------------+-------------------------------------+
- | Field | Value |
- +==============+=====================================+
- | ``original`` | use original port index if possible |
- +--------------+-------------------------------------+
- | ``index`` | physical port index |
- +--------------+-------------------------------------+
-
Action: ``PORT_ID``
^^^^^^^^^^^^^^^^^^^
This action is deprecated. Consider:
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 343f40a041..a7a2bf2c60 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -85,6 +85,9 @@ Removed Items
* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PHY_PORT``;
use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+* ethdev: removed ``RTE_FLOW_ACTION_TYPE_PHY_PORT``;
+ use ``RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT``.
+
API Changes
-----------
@@ -133,6 +136,8 @@ ABI Changes
* ethdev: enum ``RTE_FLOW_ITEM`` was affected by deprecation procedure.
+* ethdev: enum ``RTE_FLOW_ACTION`` was affected by deprecation procedure.
+
Known Issues
------------
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index b9c2d7a6fe..710d69ddca 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -4014,11 +4014,6 @@ This section lists supported actions and their attributes, if any.
- ``original {boolean}``: use original VF ID if possible.
- ``id {unsigned}``: VF ID.
-- ``phy_port``: direct packets to physical port index.
-
- - ``original {boolean}``: use original port index if possible.
- - ``index {unsigned}``: physical port index.
-
- ``port_id``: direct matching traffic to a given DPDK port ID.
- ``original {boolean}``: use original DPDK port ID if possible.
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
index 66cd2fba7e..042425ff5c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
@@ -61,10 +61,6 @@ struct bnxt_ulp_rte_act_info ulp_act_info[] = {
.act_type = BNXT_ULP_ACT_TYPE_SUPPORTED,
.proto_act_func = ulp_rte_vf_act_handler
},
- [RTE_FLOW_ACTION_TYPE_PHY_PORT] = {
- .act_type = BNXT_ULP_ACT_TYPE_SUPPORTED,
- .proto_act_func = ulp_rte_phy_port_act_handler
- },
[RTE_FLOW_ACTION_TYPE_PORT_ID] = {
.act_type = BNXT_ULP_ACT_TYPE_SUPPORTED,
.proto_act_func = ulp_rte_port_act_handler
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 3faafcf788..1be649a16c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -2255,55 +2255,6 @@ ulp_rte_port_act_handler(const struct rte_flow_action *act_item,
return ulp_rte_parser_act_port_set(param, ifindex, act_dir);
}
-/* Function to handle the parsing of RTE Flow action phy_port. */
-int32_t
-ulp_rte_phy_port_act_handler(const struct rte_flow_action *action_item,
- struct ulp_rte_parser_params *prm)
-{
- const struct rte_flow_action_phy_port *phy_port;
- uint32_t pid;
- int32_t rc;
- uint16_t pid_s;
- enum bnxt_ulp_direction_type dir;
-
- phy_port = action_item->conf;
- if (!phy_port) {
- BNXT_TF_DBG(ERR,
- "ParseErr: Invalid Argument\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
-
- if (phy_port->original) {
- BNXT_TF_DBG(ERR,
- "Parse Err:Port Original not supported\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
- dir = ULP_COMP_FLD_IDX_RD(prm, BNXT_ULP_CF_IDX_DIRECTION);
- if (dir != BNXT_ULP_DIR_EGRESS) {
- BNXT_TF_DBG(ERR,
- "Parse Err:Phy ports are valid only for egress\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
- /* Get the physical port details from port db */
- rc = ulp_port_db_phy_port_vport_get(prm->ulp_ctx, phy_port->index,
- &pid_s);
- if (rc) {
- BNXT_TF_DBG(ERR, "Failed to get port details\n");
- return -EINVAL;
- }
-
- pid = pid_s;
- pid = rte_cpu_to_be_32(pid);
- memcpy(&prm->act_prop.act_details[BNXT_ULP_ACT_PROP_IDX_VPORT],
- &pid, BNXT_ULP_ACT_PROP_SZ_VPORT);
-
- /* Update the action port set bit */
- ULP_COMP_FLD_IDX_WR(prm, BNXT_ULP_CF_IDX_ACT_PORT_IS_SET, 1);
- ULP_COMP_FLD_IDX_WR(prm, BNXT_ULP_CF_IDX_ACT_PORT_TYPE,
- BNXT_ULP_INTF_TYPE_PHY_PORT);
- return BNXT_TF_RC_SUCCESS;
-}
-
/* Function to handle the parsing of RTE Flow action pop vlan. */
int32_t
ulp_rte_of_pop_vlan_act_handler(const struct rte_flow_action *a __rte_unused,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
index 5a9b056b16..f59b10e88b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
@@ -194,11 +194,6 @@ int32_t
ulp_rte_port_act_handler(const struct rte_flow_action *act_item,
struct ulp_rte_parser_params *params);
-/* Function to handle the parsing of RTE Flow action phy_port. */
-int32_t
-ulp_rte_phy_port_act_handler(const struct rte_flow_action *action_item,
- struct ulp_rte_parser_params *params);
-
/* Function to handle the parsing of RTE Flow action pop vlan. */
int32_t
ulp_rte_of_pop_vlan_act_handler(const struct rte_flow_action *action_item,
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index d383334415..d66672a9e6 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -598,7 +598,6 @@ ch_rte_parse_atype_switch(const struct rte_flow_action *a,
const struct rte_flow_action_set_ipv4 *ipv4;
const struct rte_flow_action_set_ipv6 *ipv6;
const struct rte_flow_action_set_tp *tp_port;
- const struct rte_flow_action_phy_port *port;
const struct rte_flow_action_set_mac *mac;
int item_index;
u16 tmp_vlan;
@@ -645,10 +644,6 @@ ch_rte_parse_atype_switch(const struct rte_flow_action *a,
case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:
fs->newvlan = VLAN_REMOVE;
break;
- case RTE_FLOW_ACTION_TYPE_PHY_PORT:
- port = (const struct rte_flow_action_phy_port *)a->conf;
- fs->eport = port->index;
- break;
case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
item_index = cxgbe_get_flow_item_index(items,
RTE_FLOW_ITEM_TYPE_IPV4);
@@ -836,7 +831,6 @@ cxgbe_rtef_parse_actions(struct rte_flow *flow,
goto action_switch;
case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:
- case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_MAC_SWAP:
case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 25616b0035..df06c3862e 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -83,7 +83,6 @@ static const
enum rte_flow_action_type dpaa2_supported_action_type[] = {
RTE_FLOW_ACTION_TYPE_END,
RTE_FLOW_ACTION_TYPE_QUEUE,
- RTE_FLOW_ACTION_TYPE_PHY_PORT,
RTE_FLOW_ACTION_TYPE_PORT_ID,
RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,
RTE_FLOW_ACTION_TYPE_RSS
@@ -92,7 +91,6 @@ enum rte_flow_action_type dpaa2_supported_action_type[] = {
static const
enum rte_flow_action_type dpaa2_supported_fs_action_type[] = {
RTE_FLOW_ACTION_TYPE_QUEUE,
- RTE_FLOW_ACTION_TYPE_PHY_PORT,
RTE_FLOW_ACTION_TYPE_PORT_ID,
RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,
};
@@ -3281,17 +3279,11 @@ static inline struct rte_eth_dev *
dpaa2_flow_redirect_dev(struct dpaa2_dev_priv *priv,
const struct rte_flow_action *action)
{
- const struct rte_flow_action_phy_port *phy_port;
const struct rte_flow_action_port_id *port_id;
int idx = -1;
struct rte_eth_dev *dest_dev;
- if (action->type == RTE_FLOW_ACTION_TYPE_PHY_PORT) {
- phy_port = (const struct rte_flow_action_phy_port *)
- action->conf;
- if (!phy_port->original)
- idx = phy_port->index;
- } else if (action->type == RTE_FLOW_ACTION_TYPE_PORT_ID) {
+ if (action->type == RTE_FLOW_ACTION_TYPE_PORT_ID) {
port_id = (const struct rte_flow_action_port_id *)
action->conf;
if (!port_id->original)
@@ -3345,7 +3337,6 @@ dpaa2_flow_verify_action(
}
break;
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
- case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_ID:
if (!dpaa2_flow_redirect_dev(priv, &actions[j])) {
DPAA2_PMD_ERR("Invalid port id of action");
@@ -3523,7 +3514,6 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
switch (actions[j].type) {
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
- case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_ID:
memset(&action, 0, sizeof(struct dpni_fs_action_cfg));
flow->action = actions[j].type;
@@ -4098,7 +4088,6 @@ int dpaa2_flow_destroy(struct rte_eth_dev *dev,
switch (flow->action) {
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
- case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_ID:
if (priv->num_rx_tc > 1) {
/* Remove entry from QoS table first */
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 4ddb63cbe5..421bb6da95 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -3463,36 +3463,6 @@ sfc_mae_rule_parse_action_count(struct sfc_adapter *sa,
return rc;
}
-static int
-sfc_mae_rule_parse_action_phy_port(struct sfc_adapter *sa,
- const struct rte_flow_action_phy_port *conf,
- efx_mae_actions_t *spec)
-{
- efx_mport_sel_t mport;
- uint32_t phy_port;
- int rc;
-
- if (conf->original != 0)
- phy_port = efx_nic_cfg_get(sa->nic)->enc_assigned_port;
- else
- phy_port = conf->index;
-
- rc = efx_mae_mport_by_phy_port(phy_port, &mport);
- if (rc != 0) {
- sfc_err(sa, "failed to convert phys. port ID %u to m-port selector: %s",
- phy_port, strerror(rc));
- return rc;
- }
-
- rc = efx_mae_action_set_populate_deliver(spec, &mport);
- if (rc != 0) {
- sfc_err(sa, "failed to request action DELIVER with m-port selector 0x%08x: %s",
- mport.sel, strerror(rc));
- }
-
- return rc;
-}
-
static int
sfc_mae_rule_parse_action_pf_vf(struct sfc_adapter *sa,
const struct rte_flow_action_vf *vf_conf,
@@ -3626,7 +3596,6 @@ static const char * const action_names[] = {
[RTE_FLOW_ACTION_TYPE_COUNT] = "COUNT",
[RTE_FLOW_ACTION_TYPE_FLAG] = "FLAG",
[RTE_FLOW_ACTION_TYPE_MARK] = "MARK",
- [RTE_FLOW_ACTION_TYPE_PHY_PORT] = "PHY_PORT",
[RTE_FLOW_ACTION_TYPE_PF] = "PF",
[RTE_FLOW_ACTION_TYPE_VF] = "VF",
[RTE_FLOW_ACTION_TYPE_PORT_ID] = "PORT_ID",
@@ -3745,11 +3714,6 @@ sfc_mae_rule_parse_action(struct sfc_adapter *sa,
custom_error = B_TRUE;
}
break;
- case RTE_FLOW_ACTION_TYPE_PHY_PORT:
- SFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_PHY_PORT,
- bundle->actions_mask);
- rc = sfc_mae_rule_parse_action_phy_port(sa, action->conf, spec);
- break;
case RTE_FLOW_ACTION_TYPE_PF:
SFC_BUILD_SET_OVERFLOW(RTE_FLOW_ACTION_TYPE_PF,
bundle->actions_mask);
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index e7ccdb772e..eeb9398e77 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -188,7 +188,6 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
MK_FLOW_ACTION(PF, 0),
MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),
- MK_FLOW_ACTION(PHY_PORT, sizeof(struct rte_flow_action_phy_port)),
MK_FLOW_ACTION(PORT_ID, sizeof(struct rte_flow_action_port_id)),
MK_FLOW_ACTION(METER, sizeof(struct rte_flow_action_meter)),
MK_FLOW_ACTION(SECURITY, sizeof(struct rte_flow_action_security)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 066e8c8a99..8c33e84ee8 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2224,18 +2224,6 @@ enum rte_flow_action_type {
*/
RTE_FLOW_ACTION_TYPE_VF,
- /**
- * @deprecated
- * @see RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- *
- * Directs packets to a given physical port index of the underlying
- * device.
- *
- * See struct rte_flow_action_phy_port.
- */
- RTE_FLOW_ACTION_TYPE_PHY_PORT,
-
/**
* @deprecated
* @see RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
@@ -2960,22 +2948,6 @@ struct rte_flow_action_vf {
uint32_t id; /**< VF ID. */
};
-/**
- * @deprecated
- * @see RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- *
- * RTE_FLOW_ACTION_TYPE_PHY_PORT
- *
- * Directs packets to a given physical port index of the underlying
- * device.
- */
-struct rte_flow_action_phy_port {
- uint32_t original:1; /**< Use original port index if possible. */
- uint32_t reserved:31; /**< Reserved, must be zero. */
- uint32_t index; /**< Physical port index. */
-};
-
/**
* @deprecated
* @see RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
--
2.30.2
^ permalink raw reply [relevance 5%]
* RE: [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API
2022-08-12 19:18 4% ` [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API Ivan Malov
@ 2022-08-15 12:58 0% ` Ori Kam
0 siblings, 0 replies; 200+ results
From: Ori Kam @ 2022-08-15 12:58 UTC (permalink / raw)
To: Ivan Malov, dev
Cc: Eli Britstein, Ilya Maximets,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Ferruh Yigit,
Ray Kinsella
Hi,
> -----Original Message-----
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> Sent: Friday, 12 August 2022 22:18
>
> rte_flow_pick_transfer_proxy() was first added to DPDK 21.11.
> Since then, no one has requested any fixes. At the same time,
> the API is required by series [1] in OvS for the new release.
>
> [1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
> doc/guides/rel_notes/release_22_11.rst | 3 +++
> lib/ethdev/rte_flow.h | 4 ----
> lib/ethdev/version.map | 2 +-
> 3 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/doc/guides/rel_notes/release_22_11.rst
> b/doc/guides/rel_notes/release_22_11.rst
> index f039b857e2..b74e90d27f 100644
> --- a/doc/guides/rel_notes/release_22_11.rst
> +++ b/doc/guides/rel_notes/release_22_11.rst
> @@ -95,6 +95,9 @@ API Changes
> - ``RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR``
> - ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
>
> +* ethdev: promoted ``rte_flow_pick_transfer_proxy()``
> + from experimental to stable.
> +
>
> ABI Changes
> -----------
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index e5d2d87403..bc68fd5631 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -4792,9 +4792,6 @@ rte_flow_tunnel_item_release(uint16_t port_id,
> struct rte_flow_error *error);
>
> /**
> - * @warning
> - * @b EXPERIMENTAL: this API may change without prior notice.
> - *
> * Get a proxy port to manage "transfer" flows.
> *
> * Managing "transfer" flows requires that the user communicate them
> @@ -4819,7 +4816,6 @@ rte_flow_tunnel_item_release(uint16_t port_id,
> * @return
> * 0 on success, a negative error code otherwise
> */
> -__rte_experimental
> int
> rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
> struct rte_flow_error *error);
> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
> index 2ecc1af571..25e54f9d3e 100644
> --- a/lib/ethdev/version.map
> +++ b/lib/ethdev/version.map
> @@ -132,6 +132,7 @@ DPDK_23 {
> rte_flow_error_set;
> rte_flow_flush;
> rte_flow_isolate;
> + rte_flow_pick_transfer_proxy;
> rte_flow_query;
> rte_flow_validate;
>
> @@ -253,7 +254,6 @@ EXPERIMENTAL {
> rte_eth_macaddrs_get;
> rte_flow_flex_item_create;
> rte_flow_flex_item_release;
> - rte_flow_pick_transfer_proxy;
>
> # added in 22.03
> rte_eth_dev_priority_flow_ctrl_queue_configure;
> --
> 2.30.2
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
^ permalink raw reply [relevance 0%]
* RE: [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions
2022-08-12 19:18 4% ` [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions Ivan Malov
@ 2022-08-15 12:59 0% ` Ori Kam
0 siblings, 0 replies; 200+ results
From: Ori Kam @ 2022-08-15 12:59 UTC (permalink / raw)
To: Ivan Malov, dev
Cc: Eli Britstein, Ilya Maximets,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Ferruh Yigit
Hi,
> -----Original Message-----
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> Sent: Friday, 12 August 2022 22:18
>
> The following set of primitives has been introduced in 21.11:
>
> - RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
> - RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
> - RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
> - RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
>
> Since then, no one has requested any fixes. At the same time,
> the set is required by series [1] in OvS for the new release.
>
> [1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
> doc/guides/rel_notes/release_22_11.rst | 8 ++++++++
> lib/ethdev/rte_flow.h | 6 ------
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/doc/guides/rel_notes/release_22_11.rst
> b/doc/guides/rel_notes/release_22_11.rst
> index 6760ab8b87..f039b857e2 100644
> --- a/doc/guides/rel_notes/release_22_11.rst
> +++ b/doc/guides/rel_notes/release_22_11.rst
> @@ -87,6 +87,14 @@ API Changes
> * ethdev: promoted ``rte_eth_rx_metadata_negotiate()``
> from experimental to stable.
>
> +* ethdev: promoted the following flow primitives
> + from experimental to stable:
> +
> + - ``RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR``
> + - ``RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT``
> + - ``RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR``
> + - ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``
> +
>
> ABI Changes
> -----------
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index a79f1e7ef0..e5d2d87403 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -1918,9 +1918,6 @@ static const struct rte_flow_item_conntrack
> rte_flow_item_conntrack_mask = {
> #endif
>
> /**
> - * @warning
> - * @b EXPERIMENTAL: this structure may change without prior notice
> - *
> * Provides an ethdev port ID for use with the following items:
> * RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR,
> * RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT.
> @@ -3643,9 +3640,6 @@ struct rte_flow_action_meter_color {
> };
>
> /**
> - * @warning
> - * @b EXPERIMENTAL: this structure may change without prior notice
> - *
> * Provides an ethdev port ID for use with the following actions:
> * RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR,
> * RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT.
> --
> 2.30.2
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
^ permalink raw reply [relevance 0%]
* RE: [PATCH v5 0/7] bbdev changes for 22.11
2022-07-06 23:28 4% ` [PATCH v5 0/7] bbdev changes for 22.11 Nicolas Chautru
2022-07-06 23:28 3% ` [PATCH v5 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
@ 2022-08-15 17:54 0% ` Chautru, Nicolas
2 siblings, 0 replies; 200+ results
From: Chautru, Nicolas @ 2022-08-15 17:54 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, Richardson, Bruce, david.marchand, stephen
Hi Hemant,
Could you please provide a +1 for that serie please? This has been under review for a while but would like to get it merged soon if possible. I believe you had already reviewed and acked a previous version.
Much appreciated, thanks,
Nic
> -----Original Message-----
> From: Chautru, Nicolas <nicolas.chautru@intel.com>
> Sent: Wednesday, July 6, 2022 4:28 PM
> To: dev@dpdk.org; thomas@monjalon.net; gakhil@marvell.com;
> hemant.agrawal@nxp.com
> Cc: maxime.coquelin@redhat.com; trix@redhat.com; mdr@ashroe.eu;
> Richardson, Bruce <bruce.richardson@intel.com>;
> david.marchand@redhat.com; stephen@networkplumber.org; Chautru,
> Nicolas <nicolas.chautru@intel.com>
> Subject: [PATCH v5 0/7] bbdev changes for 22.11
>
> v5: update base on review from Tom Rix. Number of typos reported and
> resolved, removed the commit related to rw_lock for now, added a commit
> for code clean up from review, resolved one rebase issue between 2
> commits, used size of array for some bound check implementation. Thanks.
> v4: update to the last 2 commits to include function to print the queue status
> and a fix to the rte_lock within the wrong structure
> v3: update to device status info to also use padded size for the related array.
> Adding also 2 additionals commits to allow the API struc to expose more
> information related to queues corner cases/warning as well as an optional
> rw lock.
> Hemant, Maxime, this is planned for DPDK 21.11 but would like review/ack
> early is possible to get this applied earlier and due to time off this summer.
> Thanks
> Nic
>
> --
>
> Hi,
>
> Agregating together in a single serie a number of bbdev api changes
> previously submitted over the last few months and all targeted for 22.11 (4
> different series detailed below). Related deprecation notice being pushed in
> 22.07 in parallel.
> * bbdev: add device status info
> * bbdev: add new operation for FFT processing
> * bbdev: add device info on queue topology
> * bbdev: allow operation type enum for growth
>
> v2: Update to the RTE_BBDEV_COUNT removal based on feedback from
> Thomas/Stephen : rejecting out of range op type and adjusting the new
> name for the padded maximum value used for fixed size arrays.
>
> ---
>
> Previous cover letters agregated below:
>
> * bbdev: add device status info
> https://patches.dpdk.org/project/dpdk/list/?series=23367
>
> The updated structure will allow PMDs to expose through info_get what be
> may the status of the underlying accelerator, notably in case an HW error
> event having happened.
>
> * bbdev: add new operation for FFT processing
> https://patches.dpdk.org/project/dpdk/list/?series=22111
>
> This contribution adds a new operation type to the existing ones already
> supported by the bbdev PMDs.
> This set of operation is FFT-based processing for 5GNR baseband processing
> acceleration. This operates in the same lookaside fashion as other existing
> bbdev operation with a dedicated set of capabilities and parameters (marked
> as experimental).
>
> I plan to also include a new PMD supporting this operation (and most of the
> related capabilities) in the next couple of months (either in 22.06 or 22.09) as
> well as extending the related bbdev-test.
>
> * bbdev: add device info on queue topology
> https://patches.dpdk.org/project/dpdk/list/?series=22076
>
> Addressing an historical concern that the device info struct only imperfectly
> captured what queues are available on the device (number of operation and
> priority). This ended up being an iterative process for application to find each
> queue could be configured.
>
> ie. the gap was captured as technical debt previously in comments
> /* This isn't ideal because it reports the maximum number of queues but
> * does not provide info on how many can be uplink/downlink or different
> * priorities
> */
>
> This is now being exposed explictly based on the what the device actually
> supports using the existing info_get api
>
> * bbdev: allow operation type enum for growth
> https://patches.dpdk.org/project/dpdk/list/?series=23509
>
> This is related to the general intent to remove using MAX value for enums.
> There is consensus that we should avoid this for a while notably for future-
> proofed ABI concerns
> https://patches.dpdk.org/project/dpdk/patch/20200130142003.2645765-1-
> ferruh.yigit@intel.com/.
> But still there is arguably not yet an explicit best recommendation to handle
> this especially when we actualy need to expose array whose index is such an
> enum.
> As a specific example here I am refering to RTE_BBDEV_OP_TYPE_COUNT in
> enum rte_bbdev_op_type which is being extended for new operation type
> being support in bbdev (such as
> https://patches.dpdk.org/project/dpdk/patch/1646956157-245769-2-git-
> send-email-nicolas.chautru@intel.com/ adding new FFT operation)
>
> There is also the intent to be able to expose information for each operation
> type through the bbdev api such as dynamically configured queues
> information per such operation type
> https://patches.dpdk.org/project/dpdk/patch/1646785355-168133-2-git-
> send-email-nicolas.chautru@intel.com/
>
> Basically we are considering best way to accomodate for this, notably based
> on discussions with Ray Kinsella and Bruce Richardson, to handle such a case
> moving forward: specifically for the example with
> RTE_BBDEV_OP_TYPE_COUNT and also more generally.
>
> One possible option is captured in that patchset and is basically based on the
> simple principle to allow for growth and prevent ABI breakage. Ie. the last
> value of the enum is set with a higher value than required so that to allow
> insertion of new enum outside of the major ABI versions.
> In that case the RTE_BBDEV_OP_TYPE_COUNT is still present and can be
> exposed and used while still allowing for addition thanks to the implicit
> padding-like room. As an alternate variant, instead of using that last enum
> value, that extended size could be exposed as an #define outside of the
> enum but would be fundamentally the same (public).
>
> Another option would be to avoid array alltogether and use each time this a
> new dedicated API function (operation type enum being an input argument
> instead of an index to an array in an existing structure so that to get access
> to structure related to a given operation type enum) but that is arguably not
> well scalable within DPDK to use such a scheme for each enums and keep an
> uncluttered and clean API. In that very example that would be very odd
> indeed not to get this simply from info_get().
>
> Some pros and cons, arguably the simple option in that patchset is a valid
> compromise option and a step in the right direction but we would like to
> know your view wrt best recommendation, or any other thought.
>
>
>
> Nicolas Chautru (7):
> bbdev: allow operation type enum for growth
> bbdev: add device status info
> bbdev: add device info on queue topology
> drivers/baseband: update PMDs to expose queue per operation
> bbdev: add new operation for FFT processing
> bbdev: add queue related warning and status information
> bbdev: remove unnecessary if-check
>
> app/test-bbdev/test_bbdev.c | 2 +-
> app/test-bbdev/test_bbdev_perf.c | 6 +-
> doc/guides/prog_guide/bbdev.rst | 130 +++++++++++++++++
> drivers/baseband/acc100/rte_acc100_pmd.c | 30 ++--
> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 9 ++
> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 9 ++
> drivers/baseband/la12xx/bbdev_la12xx.c | 10 +-
> drivers/baseband/null/bbdev_null.c | 1 +
> drivers/baseband/turbo_sw/bbdev_turbo_software.c | 12 ++
> examples/bbdev_app/main.c | 2 +-
> lib/bbdev/rte_bbdev.c | 57 +++++++-
> lib/bbdev/rte_bbdev.h | 149 +++++++++++++++++++-
> lib/bbdev/rte_bbdev_op.h | 156 ++++++++++++++++++++-
> lib/bbdev/version.map | 11 ++
> 14 files changed, 555 insertions(+), 29 deletions(-)
>
> --
> 1.8.3.1
^ permalink raw reply [relevance 0%]
* [Bug 1042] [dpdk-22.07](ABI) unit_tests_eal/link_bonding_rssconf: link_bonding_rssconf_autotest test failed
2022-06-27 9:32 4% [Bug 1042] [dpdk-22.07](ABI) unit_tests_eal/link_bonding_rssconf: link_bonding_rssconf_autotest test failed bugzilla
@ 2022-08-19 8:45 4% ` bugzilla
0 siblings, 0 replies; 200+ results
From: bugzilla @ 2022-08-19 8:45 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=1042
lingwei (weix.ling@intel.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from lingwei (weix.ling@intel.com) ---
Verified based on dpdk-stable branch 21.11 with these 2 patches PASSED.
http://git.dpdk.org/next/dpdk-next-net/commit/?id=dfa70bf8097dd3bce3a4d4e1ccc8fd2536b51d30
http://git.dpdk.org/next/dpdk-next-net/commit/?id=22fd87b7ad7c500cfa9e6448cdce3e0a3c11d7d7
OS: Red Hat Enterprise Linux 8.4 (Ootpa)/Linux 4.18.0-305.el8.x86_64
NIC driver & firmware: ice-2.19.3/8.70 0x8000c40f 1.3179.0
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [relevance 4%]
* [PATCH 2/3] eal: uninline rte_str_to_size
@ 2022-08-21 20:50 3% ` Dmitry Kozlyuk
2022-08-22 7:24 0% ` Morten Brørup
1 sibling, 1 reply; 200+ results
From: Dmitry Kozlyuk @ 2022-08-21 20:50 UTC (permalink / raw)
To: dev; +Cc: Dmitry Kozlyuk, Ray Kinsella
There is no reason for rte_str_to_size() to be inline.
Move the implementation out of <rte_common.h>.
Export it as a stable ABI because it always has been public.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
Now <rte_common.h> doesn't need to #include <ctypes.h> and <stdlib.h>,
but removing them breaks some DPDK code, may break user code too.
I'm not sure what is the compatibility policy in this regard.
If such a breakage is allowed, I'd remove includes and fix DPDK code.
lib/eal/common/eal_common_string_fns.c | 32 ++++++++++++++++++++++++++
lib/eal/include/rte_common.h | 30 ++----------------------
lib/eal/version.map | 1 +
3 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/lib/eal/common/eal_common_string_fns.c b/lib/eal/common/eal_common_string_fns.c
index 0236ae4023..5fc4ee71dc 100644
--- a/lib/eal/common/eal_common_string_fns.c
+++ b/lib/eal/common/eal_common_string_fns.c
@@ -64,3 +64,35 @@ rte_strscpy(char *dst, const char *src, size_t dsize)
rte_errno = E2BIG;
return -rte_errno;
}
+
+uint64_t
+rte_str_to_size(const char *str)
+{
+ char *endptr;
+ unsigned long long size;
+
+ while (isspace((int)*str))
+ str++;
+ if (*str == '-')
+ return 0;
+
+ errno = 0;
+ size = strtoull(str, &endptr, 0);
+ if (errno)
+ return 0;
+
+ if (*endptr == ' ')
+ endptr++; /* allow 1 space gap */
+
+ switch (*endptr) {
+ case 'G': case 'g':
+ size *= 1024; /* fall-through */
+ case 'M': case 'm':
+ size *= 1024; /* fall-through */
+ case 'K': case 'k':
+ size *= 1024; /* fall-through */
+ default:
+ break;
+ }
+ return size;
+}
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index d517e9f75f..772e40f8c2 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -875,34 +875,8 @@ rte_log2_u64(uint64_t v)
* @return
* Number.
*/
-static inline uint64_t
-rte_str_to_size(const char *str)
-{
- char *endptr;
- unsigned long long size;
-
- while (isspace((int)*str))
- str++;
- if (*str == '-')
- return 0;
-
- errno = 0;
- size = strtoull(str, &endptr, 0);
- if (errno)
- return 0;
-
- if (*endptr == ' ')
- endptr++; /* allow 1 space gap */
-
- switch (*endptr){
- case 'G': case 'g': size *= 1024; /* fall-through */
- case 'M': case 'm': size *= 1024; /* fall-through */
- case 'K': case 'k': size *= 1024; /* fall-through */
- default:
- break;
- }
- return size;
-}
+uint64_t
+rte_str_to_size(const char *str);
/**
* Function to terminate the application immediately, printing an error
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 1f293e768b..773b0902c0 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -261,6 +261,7 @@ DPDK_23 {
rte_socket_id;
rte_socket_id_by_idx;
rte_srand;
+ rte_str_to_size;
rte_strerror;
rte_strscpy;
rte_strsplit;
--
2.33.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH 10/13] ethdev: remove deprecated flow item PF
2022-08-12 19:18 5% ` [PATCH 10/13] ethdev: remove deprecated flow item PF Ivan Malov
@ 2022-08-22 5:32 0% ` Ori Kam
0 siblings, 0 replies; 200+ results
From: Ori Kam @ 2022-08-22 5:32 UTC (permalink / raw)
To: Ivan Malov, dev
Cc: Eli Britstein, Ilya Maximets,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit
Hi Ivan
> -----Original Message-----
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> Sent: Friday, 12 August 2022 22:18
PF
>
> Such deprecation was commenced in DPDK 21.11.
> Since then, no parties have objected. Remove.
>
> The patch breaks ABI.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
> app/test-pmd/cmdline_flow.c | 9 ----
> doc/guides/nics/features/bnxt.ini | 1 -
> doc/guides/nics/features/cxgbe.ini | 1 -
> doc/guides/nics/features/default.ini | 1 -
> doc/guides/nics/features/sfc.ini | 1 -
> doc/guides/nics/sfc_efx.rst | 2 -
> doc/guides/prog_guide/rte_flow.rst | 34 -------------
> .../prog_guide/switch_representation.rst | 14 ------
> doc/guides/rel_notes/release_22_11.rst | 5 ++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 -
> drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 --
> drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 25 ----------
> drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 --
> drivers/net/cxgbe/cxgbe_flow.c | 21 --------
> drivers/net/sfc/sfc_mae.c | 48 -------------------
> lib/ethdev/rte_flow.c | 1 -
> lib/ethdev/rte_flow.h | 15 ------
> 17 files changed, 5 insertions(+), 184 deletions(-)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 23889f7ab1..2722d5a48d 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -249,7 +249,6 @@ enum index {
> ITEM_INVERT,
> ITEM_ANY,
> ITEM_ANY_NUM,
> - ITEM_PF,
> ITEM_VF,
> ITEM_VF_ID,
> ITEM_PHY_PORT,
> @@ -1278,7 +1277,6 @@ static const enum index next_item[] = {
> ITEM_VOID,
> ITEM_INVERT,
> ITEM_ANY,
> - ITEM_PF,
> ITEM_VF,
> ITEM_PHY_PORT,
> ITEM_PORT_ID,
> @@ -3461,13 +3459,6 @@ static const struct token token_list[] = {
> .next = NEXT(item_any,
> NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> .args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
> },
> - [ITEM_PF] = {
> - .name = "pf",
> - .help = "match traffic from/to the physical function",
> - .priv = PRIV_ITEM(PF, 0),
> - .next = NEXT(NEXT_ENTRY(ITEM_NEXT)),
> - .call = parse_vc,
> - },
> [ITEM_VF] = {
> .name = "vf",
> .help = "match traffic from/to a virtual function ID",
> diff --git a/doc/guides/nics/features/bnxt.ini
> b/doc/guides/nics/features/bnxt.ini
> index afb5414b49..259480d1df 100644
> --- a/doc/guides/nics/features/bnxt.ini
> +++ b/doc/guides/nics/features/bnxt.ini
> @@ -63,7 +63,6 @@ ipv6 = Y
> gre = Y
> icmp = Y
> icmp6 = Y
> -pf = Y
> phy_port = Y
> port_id = Y
> port_representor = Y
> diff --git a/doc/guides/nics/features/cxgbe.ini
> b/doc/guides/nics/features/cxgbe.ini
> index f674803ec4..d869f2100f 100644
> --- a/doc/guides/nics/features/cxgbe.ini
> +++ b/doc/guides/nics/features/cxgbe.ini
> @@ -39,7 +39,6 @@ Usage doc = Y
> eth = Y
> ipv4 = Y
> ipv6 = Y
> -pf = Y
> phy_port = Y
> tcp = Y
> udp = Y
> diff --git a/doc/guides/nics/features/default.ini
> b/doc/guides/nics/features/default.ini
> index d1db0c256a..aff236134e 100644
> --- a/doc/guides/nics/features/default.ini
> +++ b/doc/guides/nics/features/default.ini
> @@ -121,7 +121,6 @@ meta =
> mpls =
> nsh =
> nvgre =
> -pf =
> pfcp =
> phy_port =
> port_id =
> diff --git a/doc/guides/nics/features/sfc.ini
> b/doc/guides/nics/features/sfc.ini
> index 2e798b5ef5..355174d5c2 100644
> --- a/doc/guides/nics/features/sfc.ini
> +++ b/doc/guides/nics/features/sfc.ini
> @@ -47,7 +47,6 @@ ipv4 = Y
> ipv6 = Y
> mark = P
> nvgre = Y
> -pf = Y
> phy_port = Y
> port_id = Y
> port_representor = Y
> diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
> index 39c6e23d5b..2dbc59e8f7 100644
> --- a/doc/guides/nics/sfc_efx.rst
> +++ b/doc/guides/nics/sfc_efx.rst
> @@ -200,8 +200,6 @@ Supported pattern items (***transfer*** rules):
>
> - PHY_PORT (cannot repeat; conflicts with other traffic source items)
>
> -- PF (cannot repeat; conflicts with other traffic source items)
> -
> - VF (cannot repeat; conflicts with other traffic source items)
>
> - ETH
> diff --git a/doc/guides/prog_guide/rte_flow.rst
> b/doc/guides/prog_guide/rte_flow.rst
> index 588914b231..72f0c3d346 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -535,37 +535,6 @@ Usage example, matching non-TCPv4 packets only:
> | 4 | END |
> +-------+----------+
>
> -Item: ``PF``
> -^^^^^^^^^^^^
> -
> -This item is deprecated. Consider:
> - - `Item: PORT_REPRESENTOR`_
> - - `Item: REPRESENTED_PORT`_
> -
> -Matches traffic originating from (ingress) or going to (egress) the physical
> -function of the current device.
> -
> -If supported, should work even if the physical function is not managed by
> -the application and thus not associated with a DPDK port ID.
> -
> -- Can be combined with any number of `Item: VF`_ to match both PF and VF
> - traffic.
> -- ``spec``, ``last`` and ``mask`` must not be set.
> -
> -.. _table_rte_flow_item_pf:
> -
> -.. table:: PF
> -
> - +----------+-------+
> - | Field | Value |
> - +==========+=======+
> - | ``spec`` | unset |
> - +----------+-------+
> - | ``last`` | unset |
> - +----------+-------+
> - | ``mask`` | unset |
> - +----------+-------+
> -
> Item: ``VF``
> ^^^^^^^^^^^^
>
> @@ -584,7 +553,6 @@ separate entities, should be addressed through their
> own DPDK port IDs.
>
> - Can be specified multiple times to match traffic addressed to several VF
> IDs.
> -- Can be combined with a PF item to match both PF and VF traffic.
> - Default ``mask`` matches any VF ID.
>
> .. _table_rte_flow_item_vf:
> @@ -2074,8 +2042,6 @@ This action is deprecated. Consider:
> Directs matching traffic to the physical function (PF) of the current
> device.
>
> -See `Item: PF`_.
> -
> - No configurable properties.
>
> .. _table_rte_flow_action_pf:
> diff --git a/doc/guides/prog_guide/switch_representation.rst
> b/doc/guides/prog_guide/switch_representation.rst
> index 3da30fc779..6fd7b98bdc 100644
> --- a/doc/guides/prog_guide/switch_representation.rst
> +++ b/doc/guides/prog_guide/switch_representation.rst
> @@ -624,25 +624,11 @@ Same restrictions as `PORT_ID pattern item`_.
>
> - Targets **A**, **B** or **C** in `traffic steering`_.
>
> -PF Pattern Item
> -^^^^^^^^^^^^^^^
> -
> -Matches traffic originating from (ingress) or going to (egress) the physical
> -function of the current device.
> -
> -If supported, should work even if the physical function is not managed by
> -the application and thus not associated with a DPDK port ID. Its behavior is
> -otherwise similar to `PORT_ID pattern item`_ using PF port ID.
> -
> -- Matches **A** in `traffic steering`_.
> -
> PF Action
> ^^^^^^^^^
>
> Directs matching traffic to the physical function of the current device.
>
> -Same restrictions as `PF pattern item`_.
> -
> - Targets **A** in `traffic steering`_.
>
> VF Pattern Item
> diff --git a/doc/guides/rel_notes/release_22_11.rst
> b/doc/guides/rel_notes/release_22_11.rst
> index c4ce32daed..b7469708af 100644
> --- a/doc/guides/rel_notes/release_22_11.rst
> +++ b/doc/guides/rel_notes/release_22_11.rst
> @@ -76,6 +76,9 @@ Removed Items
> Also, make sure to start the actual text at the margin.
> =======================================================
>
> +* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PF``;
> + use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
> +
>
> API Changes
> -----------
> @@ -122,6 +125,8 @@ ABI Changes
> Also, make sure to start the actual text at the margin.
> =======================================================
>
> +* ethdev: enum ``RTE_FLOW_ITEM`` was affected by deprecation
> procedure.
> +
>
> Known Issues
> ------------
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index c105200fe7..4446560369 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -3665,8 +3665,6 @@ This section lists supported pattern items and their
> attributes, if any.
>
> - ``num {unsigned}``: number of layers covered.
>
> -- ``pf``: match traffic from/to the physical function.
> -
> - ``vf``: match traffic from/to a virtual function ID.
>
> - ``id {unsigned}``: VF ID.
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
> b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
> index e9337ecd2c..17216426d8 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
> +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c
> @@ -260,10 +260,6 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = {
> .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
> .proto_hdr_func = ulp_rte_item_any_handler
> },
> - [RTE_FLOW_ITEM_TYPE_PF] = {
> - .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
> - .proto_hdr_func = ulp_rte_pf_hdr_handler
> - },
> [RTE_FLOW_ITEM_TYPE_VF] = {
> .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
> .proto_hdr_func = ulp_rte_vf_hdr_handler
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> index 9edf3e8799..6a1d235f77 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> @@ -507,31 +507,6 @@ ulp_rte_parser_implicit_act_port_process(struct
> ulp_rte_parser_params *params)
> return BNXT_TF_RC_SUCCESS;
> }
>
> -/* Function to handle the parsing of RTE Flow item PF Header. */
> -int32_t
> -ulp_rte_pf_hdr_handler(const struct rte_flow_item *item __rte_unused,
> - struct ulp_rte_parser_params *params)
> -{
> - uint16_t port_id = 0;
> - uint16_t svif_mask = 0xFFFF;
> - uint32_t ifindex;
> -
> - /* Get the implicit port id */
> - port_id = ULP_COMP_FLD_IDX_RD(params,
> BNXT_ULP_CF_IDX_INCOMING_IF);
> -
> - /* perform the conversion from dpdk port to bnxt ifindex */
> - if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
> - port_id,
> - &ifindex)) {
> - BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
> - return BNXT_TF_RC_ERROR;
> - }
> -
> - /* Update the SVIF details */
> - return ulp_rte_parser_svif_set(params, ifindex, svif_mask,
> - BNXT_ULP_DIR_INVALID);
> -}
> -
> /* Function to handle the parsing of RTE Flow item VF Header. */
> int32_t
> ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
> b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
> index e4225d00f8..94918f6b4a 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
> +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
> @@ -80,11 +80,6 @@ bnxt_ulp_rte_parser_act_parse(const struct
> rte_flow_action actions[],
> void
> bnxt_ulp_rte_parser_post_process(struct ulp_rte_parser_params
> *params);
>
> -/* Function to handle the parsing of RTE Flow item PF Header. */
> -int32_t
> -ulp_rte_pf_hdr_handler(const struct rte_flow_item *item,
> - struct ulp_rte_parser_params *params);
> -
> /* Function to handle the parsing of RTE Flow item VF Header. */
> int32_t
> ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
> diff --git a/drivers/net/cxgbe/cxgbe_flow.c
> b/drivers/net/cxgbe/cxgbe_flow.c
> index 6e460dfe2e..e4f9c152b5 100644
> --- a/drivers/net/cxgbe/cxgbe_flow.c
> +++ b/drivers/net/cxgbe/cxgbe_flow.c
> @@ -288,22 +288,6 @@ ch_rte_parsetype_vlan(const void *dmask, const
> struct rte_flow_item *item,
> return 0;
> }
>
> -static int
> -ch_rte_parsetype_pf(const void *dmask __rte_unused,
> - const struct rte_flow_item *item __rte_unused,
> - struct ch_filter_specification *fs,
> - struct rte_flow_error *e __rte_unused)
> -{
> - struct rte_flow *flow = (struct rte_flow *)fs->private;
> - struct rte_eth_dev *dev = flow->dev;
> - struct adapter *adap = ethdev2adap(dev);
> -
> - CXGBE_FILL_FS(1, 1, pfvf_vld);
> -
> - CXGBE_FILL_FS(adap->pf, 0x7, pf);
> - return 0;
> -}
> -
> static int
> ch_rte_parsetype_vf(const void *dmask, const struct rte_flow_item *item,
> struct ch_filter_specification *fs,
> @@ -1022,11 +1006,6 @@ static struct chrte_fparse parseitem[] = {
> .dmask = &rte_flow_item_tcp_mask,
> },
>
> - [RTE_FLOW_ITEM_TYPE_PF] = {
> - .fptr = ch_rte_parsetype_pf,
> - .dmask = NULL,
> - },
> -
> [RTE_FLOW_ITEM_TYPE_VF] = {
> .fptr = ch_rte_parsetype_vf,
> .dmask = &(const struct rte_flow_item_vf){
> diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
> index eb197fbdeb..e8da2d2a0d 100644
> --- a/drivers/net/sfc/sfc_mae.c
> +++ b/drivers/net/sfc/sfc_mae.c
> @@ -1685,42 +1685,6 @@ sfc_mae_rule_parse_item_phy_port(const struct
> rte_flow_item *item,
> return 0;
> }
>
> -static int
> -sfc_mae_rule_parse_item_pf(const struct rte_flow_item *item,
> - struct sfc_flow_parse_ctx *ctx,
> - struct rte_flow_error *error)
> -{
> - struct sfc_mae_parse_ctx *ctx_mae = ctx->mae;
> - const efx_nic_cfg_t *encp = efx_nic_cfg_get(ctx_mae->sa->nic);
> - efx_mport_sel_t mport_v;
> - int rc;
> -
> - if (ctx_mae->match_mport_set) {
> - return rte_flow_error_set(error, ENOTSUP,
> - RTE_FLOW_ERROR_TYPE_ITEM, item,
> - "Can't handle multiple traffic source items");
> - }
> -
> - rc = efx_mae_mport_by_pcie_function(encp->enc_pf,
> EFX_PCI_VF_INVALID,
> - &mport_v);
> - if (rc != 0) {
> - return rte_flow_error_set(error, rc,
> - RTE_FLOW_ERROR_TYPE_ITEM, item,
> - "Failed to convert the PF ID");
> - }
> -
> - rc = efx_mae_match_spec_mport_set(ctx_mae->match_spec,
> &mport_v, NULL);
> - if (rc != 0) {
> - return rte_flow_error_set(error, rc,
> - RTE_FLOW_ERROR_TYPE_ITEM, item,
> - "Failed to set MPORT for the PF");
> - }
> -
> - ctx_mae->match_mport_set = B_TRUE;
> -
> - return 0;
> -}
> -
> static int
> sfc_mae_rule_parse_item_vf(const struct rte_flow_item *item,
> struct sfc_flow_parse_ctx *ctx,
> @@ -2591,18 +2555,6 @@ static const struct sfc_flow_item sfc_flow_items[]
> = {
> .ctx_type = SFC_FLOW_PARSE_CTX_MAE,
> .parse = sfc_mae_rule_parse_item_phy_port,
> },
> - {
> - .type = RTE_FLOW_ITEM_TYPE_PF,
> - .name = "PF",
> - /*
> - * In terms of RTE flow, this item is a META one,
> - * and its position in the pattern is don't care.
> - */
> - .prev_layer = SFC_FLOW_ITEM_ANY_LAYER,
> - .layer = SFC_FLOW_ITEM_ANY_LAYER,
> - .ctx_type = SFC_FLOW_PARSE_CTX_MAE,
> - .parse = sfc_mae_rule_parse_item_pf,
> - },
> {
> .type = RTE_FLOW_ITEM_TYPE_VF,
> .name = "VF",
> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
> index 501be9d602..6ece72bf36 100644
> --- a/lib/ethdev/rte_flow.c
> +++ b/lib/ethdev/rte_flow.c
> @@ -97,7 +97,6 @@ static const struct rte_flow_desc_data
> rte_flow_desc_item[] = {
> MK_FLOW_ITEM(VOID, 0),
> MK_FLOW_ITEM(INVERT, 0),
> MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)),
> - MK_FLOW_ITEM(PF, 0),
> MK_FLOW_ITEM(VF, sizeof(struct rte_flow_item_vf)),
> MK_FLOW_ITEM(PHY_PORT, sizeof(struct
> rte_flow_item_phy_port)),
> MK_FLOW_ITEM(PORT_ID, sizeof(struct rte_flow_item_port_id)),
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index bc68fd5631..97de98e232 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -188,20 +188,6 @@ enum rte_flow_item_type {
> */
> RTE_FLOW_ITEM_TYPE_ANY,
>
> - /**
> - * @deprecated
> - * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
> - * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
> - *
> - * [META]
> - *
> - * Matches traffic originating from (ingress) or going to (egress)
> - * the physical function of the current device.
> - *
> - * No associated specification structure.
> - */
> - RTE_FLOW_ITEM_TYPE_PF,
> -
> /**
> * @deprecated
> * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
> @@ -732,7 +718,6 @@ static const struct rte_flow_item_any
> rte_flow_item_any_mask = {
> *
> * - Can be specified multiple times to match traffic addressed to several
> * VF IDs.
> - * - Can be combined with a PF item to match both PF and VF traffic.
> *
> * A zeroed mask can be used to match any VF ID.
> */
> --
> 2.30.2
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
^ permalink raw reply [relevance 0%]
* RE: [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT
2022-08-12 19:18 1% ` [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT Ivan Malov
@ 2022-08-22 5:33 0% ` Ori Kam
0 siblings, 0 replies; 200+ results
From: Ori Kam @ 2022-08-22 5:33 UTC (permalink / raw)
To: Ivan Malov, dev
Cc: Eli Britstein, Ilya Maximets,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit, Matan Azrad, Slava Ovsiienko
Hi
> -----Original Message-----
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> Sent: Friday, 12 August 2022 22:18
> Subject: [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT
>
> Such deprecation was commenced in DPDK 21.11.
> Since then, no parties have objected. Remove.
>
> The patch breaks ABI.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
^ permalink raw reply [relevance 0%]
* RE: [PATCH 13/13] ethdev: remove deprecated flow action PHY PORT
2022-08-12 19:18 5% ` [PATCH 13/13] ethdev: remove deprecated flow action " Ivan Malov
@ 2022-08-22 5:33 0% ` Ori Kam
0 siblings, 0 replies; 200+ results
From: Ori Kam @ 2022-08-22 5:33 UTC (permalink / raw)
To: Ivan Malov, dev
Cc: Eli Britstein, Ilya Maximets,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit, Hemant Agrawal, Sachin Saxena
Hi Ivan,
> -----Original Message-----
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> Sent: Friday, 12 August 2022 22:18
> Subject: [PATCH 13/13] ethdev: remove deprecated flow action PHY PORT
>
> Such deprecation was commenced in DPDK 21.11.
> Since then, no parties have objected. Remove.
>
> The patch breaks ABI.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
^ permalink raw reply [relevance 0%]
* RE: [PATCH 11/13] ethdev: remove deprecated flow item VF
2022-08-12 19:18 1% ` [PATCH 11/13] ethdev: remove deprecated flow item VF Ivan Malov
@ 2022-08-22 5:50 0% ` Ori Kam
0 siblings, 0 replies; 200+ results
From: Ori Kam @ 2022-08-22 5:50 UTC (permalink / raw)
To: Ivan Malov, dev
Cc: Eli Britstein, Ilya Maximets,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Stephen Hemminger, Jerin Jacob, Andrew Rybchenko, Aman Singh,
Yuying Zhang, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Ferruh Yigit, Beilei Xing
Hi Ivan
Some comments inline,
> -----Original Message-----
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> Sent: Friday, 12 August 2022 22:18
> Subject: [PATCH 11/13] ethdev: remove deprecated flow item VF
>
> Such deprecation was commenced in DPDK 21.11.
> Since then, no parties have objected. Remove.
>
> The patch breaks ABI.
>
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
^ permalink raw reply [relevance 0%]
* RE: [PATCH 2/3] eal: uninline rte_str_to_size
2022-08-21 20:50 3% ` [PATCH 2/3] eal: uninline rte_str_to_size Dmitry Kozlyuk
@ 2022-08-22 7:24 0% ` Morten Brørup
2022-08-22 14:06 0% ` Bruce Richardson
0 siblings, 1 reply; 200+ results
From: Morten Brørup @ 2022-08-22 7:24 UTC (permalink / raw)
To: Dmitry Kozlyuk, dev; +Cc: Ray Kinsella
> From: Dmitry Kozlyuk [mailto:dmitry.kozliuk@gmail.com]
> Sent: Sunday, 21 August 2022 22.50
> To: dev@dpdk.org
> Cc: Dmitry Kozlyuk; Ray Kinsella
> Subject: [PATCH 2/3] eal: uninline rte_str_to_size
>
> There is no reason for rte_str_to_size() to be inline.
> Move the implementation out of <rte_common.h>.
> Export it as a stable ABI because it always has been public.
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
> ---
> Now <rte_common.h> doesn't need to #include <ctypes.h> and <stdlib.h>,
> but removing them breaks some DPDK code, may break user code too.
> I'm not sure what is the compatibility policy in this regard.
> If such a breakage is allowed, I'd remove includes and fix DPDK code.
>
The question I'm asking myself here is: Do we want rte_common.h to include common headers like these, just so we don't need to include them elsewhere? I think not.
I'm in favor of the principle of keeping it clean: Remove them from rte_common.h, and deal with the consequences.
If we keep them, we will forget why they are there, and some day in the future, someone will ask what these unused headers are doing in <rte_common.h>.
^ permalink raw reply [relevance 0%]
* Re: Reason to alway to build both static and shared libs
@ 2022-08-22 11:23 3% ` Bruce Richardson
0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2022-08-22 11:23 UTC (permalink / raw)
To: Jianshen Liu; +Cc: dev
On Wed, Aug 03, 2022 at 10:13:24PM -0700, Jianshen Liu wrote:
> Hi all, Could I know the reason for always building both static and
> shared libs of DPDK? I can find the [1]patch to enable this behavior,
> but it seems that it didn't mention the reason behind it. Also, if I
> propose a change to use "both" as the default for default_library in
> meson's config file and still allow users to choose either static or
> shared as they want, is there any reason against that change? Thanks,
> Jianshen
>
When DPDK moved to use the meson build system, there was no "both" option
for static and shared libs, so that is the primary reason why it is not
used as the default. As for why even without that both libraries are always
built, the main reasons we do so are:
* traditionally DPDK has been built and linked into applications as a
static library, and when moving build systems from make to meson we wanted
to keep that as the default, since the transition was already confusing
enough for users.
* with the older make build system when users submitted patches to DPDK
there was many, many cases where the patches did not include changes to
the version.map files, leading to shared lib build failures. By ensuring
that shared libs are always built, this whole class of patch errors are
caught before users push their patches to the mailing list.
Therefore by always building both shared and static we can keep consistency
and ensure higher quality patches to the mailing list.
I have looked a little into this in the past and from that investigation
some other considerations are:
* We can't actually use the built-in "both_libraries" option in DPDK
directly since - due to ABI versioning - some files actually need to be
compiled with different flags for static libraries (which don't have
function versions) and shared libs (which do). This means that even if we
do use "both_library" function, or "library" function with a default of
"both" we will still need to maintain the code path fallback for building
static and shared separately.
* The built-in option for building static and/or shared libraries only
controls what libraries get built - it does not control what way things
get linked. Right now, the default in DPDK is to build both libraries but
link the applications like testpmd or examples, using the static libs. If
we use the defaults in meson for "both" the shared library versions will
be used for linking in preference to the static ones. This means that if
we switch to using the default_library option for building only
static/shared/both we also need a separate flag for indicating whether to
link apps statically or dynamically in the "both" case.
I'm also a bit curious as to how much benefit you would expect to come from
this change. Since in 99% of cases the C files are only ever built once and
then put into the static and shared libs, I would not expect there to be a
large build-time improvement from disabling one of the library types.
However, having never tested it, I may be wrong on this and there may be a
boost from disabling the shared libs - though that in turn means fewer
build-time checks for the version.map files, for example. Let me know if
you do try it and see a big benefit.
Hope this input helps.
Regards,
/Bruce
^ permalink raw reply [relevance 3%]
* Re: [PATCH 2/3] eal: uninline rte_str_to_size
2022-08-22 7:24 0% ` Morten Brørup
@ 2022-08-22 14:06 0% ` Bruce Richardson
0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2022-08-22 14:06 UTC (permalink / raw)
To: Morten Brørup; +Cc: Dmitry Kozlyuk, dev, Ray Kinsella
On Mon, Aug 22, 2022 at 09:24:47AM +0200, Morten Brørup wrote:
> > From: Dmitry Kozlyuk [mailto:dmitry.kozliuk@gmail.com]
> > Sent: Sunday, 21 August 2022 22.50
> > To: dev@dpdk.org
> > Cc: Dmitry Kozlyuk; Ray Kinsella
> > Subject: [PATCH 2/3] eal: uninline rte_str_to_size
> >
> > There is no reason for rte_str_to_size() to be inline.
> > Move the implementation out of <rte_common.h>.
> > Export it as a stable ABI because it always has been public.
> >
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
>
> > ---
> > Now <rte_common.h> doesn't need to #include <ctypes.h> and <stdlib.h>,
> > but removing them breaks some DPDK code, may break user code too.
> > I'm not sure what is the compatibility policy in this regard.
> > If such a breakage is allowed, I'd remove includes and fix DPDK code.
> >
>
> The question I'm asking myself here is: Do we want rte_common.h to include common headers like these, just so we don't need to include them elsewhere? I think not.
>
> I'm in favor of the principle of keeping it clean: Remove them from rte_common.h, and deal with the consequences.
>
> If we keep them, we will forget why they are there, and some day in the future, someone will ask what these unused headers are doing in <rte_common.h>.
>
+1
Since removing headers is a build-time issue only and not runtime, I think
we should just remove them.
/Bruce
^ permalink raw reply [relevance 0%]
* [RFC PATCH v1 05/10] dts: add system under test node
@ 2022-08-24 16:24 2% ` Juraj Linkeš
0 siblings, 0 replies; 200+ results
From: Juraj Linkeš @ 2022-08-24 16:24 UTC (permalink / raw)
To: thomas, david.marchand, ronan.randles, Honnappa.Nagarahalli,
ohilyard, lijuan.tu
Cc: dev, Juraj Linkeš
The SUT node contains methods to configure the node and build and
configure DPDK.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
dts/framework/sut_node.py | 603 ++++++++++++++++++++++++++++++++++++++
1 file changed, 603 insertions(+)
create mode 100644 dts/framework/sut_node.py
diff --git a/dts/framework/sut_node.py b/dts/framework/sut_node.py
new file mode 100644
index 0000000000..c9f5e69d73
--- /dev/null
+++ b/dts/framework/sut_node.py
@@ -0,0 +1,603 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2010-2014 Intel Corporation
+# Copyright(c) 2022 PANTHEON.tech s.r.o.
+#
+
+import os
+import re
+import tarfile
+import time
+from typing import List, Optional, Union
+
+from framework.config import NodeConfiguration
+
+from .exception import ParameterInvalidException
+from .node import Node
+from .settings import SETTINGS
+
+
+class SutNode(Node):
+ """
+ A class for managing connections to the System under test, providing
+ methods that retrieve the necessary information about the node (such as
+ cpu, memory and NIC details) and configuration capabilities.
+ """
+
+ def __init__(self, node_config: NodeConfiguration):
+ super(SutNode, self).__init__(node_config)
+ self.tg_node = None
+ self.architecture = node_config.arch
+ self.prefix_subfix = (
+ str(os.getpid()) + "_" + time.strftime("%Y%m%d%H%M%S", time.localtime())
+ )
+ self.hugepage_path = None
+ self.dpdk_version = ""
+ self.testpmd = None
+
+ def prerequisites(self):
+ """
+ Copy DPDK package to SUT and apply patch files.
+ """
+ self.prepare_package()
+ self.sut_prerequisites()
+
+ def prepare_package(self):
+ if not self.skip_setup:
+ assert os.path.isfile(SETTINGS.dpdk_ref) is True, "Invalid package"
+
+ out = self.send_expect(
+ "ls -d %s" % SETTINGS.remote_dpdk_dir, "# ", verify=True
+ )
+ if out == 2:
+ self.send_expect("mkdir -p %s" % SETTINGS.remote_dpdk_dir, "# ")
+
+ out = self.send_expect(
+ "ls %s && cd %s" % (SETTINGS.remote_dpdk_dir, SETTINGS.remote_dpdk_dir),
+ "#",
+ verify=True,
+ )
+ if out == -1:
+ raise IOError(
+ f"A failure occurred when creating {SETTINGS.remote_dpdk_dir} on "
+ f"{self}."
+ )
+ self.main_session.copy_file_to(SETTINGS.dpdk_ref, SETTINGS.remote_dpdk_dir)
+ self.kill_all()
+
+ # enable core dump
+ self.send_expect("ulimit -c unlimited", "#")
+
+ with tarfile.open(SETTINGS.dpdk_ref) as dpdk_tar:
+ dpdk_top_dir = dpdk_tar.getnames()[0]
+
+ remote_dpdk_top_dir = os.path.join(SETTINGS.remote_dpdk_dir, dpdk_top_dir)
+
+ # unpack the code and change to the working folder
+ self.send_expect("rm -rf %s" % remote_dpdk_top_dir, "#")
+
+ remote_dpdk_path = os.path.join(
+ SETTINGS.remote_dpdk_dir, os.path.basename(SETTINGS.dpdk_ref)
+ )
+
+ # unpack dpdk
+ out = self.send_expect(
+ f"tar xfm {remote_dpdk_path} -C {SETTINGS.remote_dpdk_dir}",
+ "# ",
+ 60,
+ verify=True,
+ )
+ if out == -1:
+ raise IOError(
+ f"Extracting remote DPDK package {remote_dpdk_path} to "
+ f"{SETTINGS.remote_dpdk_dir} failed."
+ )
+
+ # check dpdk dir name is expect
+ out = self.send_expect("ls %s" % remote_dpdk_top_dir, "# ", 20, verify=True)
+ if out == -1:
+ raise FileNotFoundError(
+ f"Remote DPDK dir {remote_dpdk_top_dir} not found."
+ )
+
+ def set_target(self, target):
+ """
+ Set env variable, these have to be setup all the time. Some tests
+ need to compile example apps by themselves and will fail otherwise.
+ Set hugepage on SUT and install modules required by DPDK.
+ Configure default ixgbe PMD function.
+ """
+ self.target = target
+
+ self.set_toolchain(target)
+
+ # set env variable
+ self.set_env_variable()
+
+ if not self.skip_setup:
+ self.build_install_dpdk(target)
+
+ self.setup_memory()
+
+ def set_env_variable(self):
+ # These have to be setup all the time. Some tests need to compile
+ # example apps by themselves and will fail otherwise.
+ self.send_expect("export RTE_TARGET=" + self.target, "#")
+ self.send_expect("export RTE_SDK=`pwd`", "#")
+
+ def build_install_dpdk(self, target):
+ """
+ Build DPDK source code with specified target.
+ """
+ if self.get_os() == "linux":
+ self.build_install_dpdk_linux_meson(target)
+
+ def build_install_dpdk_linux_meson(self, target):
+ """
+ Build DPDK source code on linux use meson
+ """
+ build_time = 1800
+ target_info = target.split("-")
+ arch = target_info[0]
+ toolchain = target_info[3]
+
+ default_library = "static"
+ if arch == "i686":
+ # find the pkg-config path and set the PKG_CONFIG_LIBDIR environmental variable to point it
+ out = self.send_expect("find /usr -type d -name pkgconfig", "# ")
+ pkg_path = ""
+ res_path = out.split("\r\n")
+ for cur_path in res_path:
+ if "i386" in cur_path:
+ pkg_path = cur_path
+ break
+ assert (
+ pkg_path != ""
+ ), "please make sure you env have the i386 pkg-config path"
+
+ self.send_expect("export CFLAGS=-m32", "# ")
+ self.send_expect("export PKG_CONFIG_LIBDIR=%s" % pkg_path, "# ")
+
+ self.send_expect("rm -rf " + target, "#")
+ out = self.send_expect(
+ "CC=%s meson -Denable_kmods=True -Dlibdir=lib --default-library=%s %s"
+ % (toolchain, default_library, target),
+ "[~|~\]]# ",
+ build_time,
+ )
+ assert "FAILED" not in out, "meson setup failed ..."
+
+ out = self.send_expect("ninja -C %s" % target, "[~|~\]]# ", build_time)
+ assert "FAILED" not in out, "ninja complie failed ..."
+
+ # copy kmod file to the folder same as make
+ out = self.send_expect(
+ "find ./%s/kernel/ -name *.ko" % target, "# ", verify=True
+ )
+ self.send_expect("mkdir -p %s/kmod" % target, "# ")
+ if not isinstance(out, int) and len(out) > 0:
+ kmod = out.split("\r\n")
+ for mod in kmod:
+ self.send_expect("cp %s %s/kmod/" % (mod, target), "# ")
+
+ def build_dpdk_apps(self, folder):
+ """
+ Build dpdk sample applications.
+ """
+ if self.get_os() == "linux":
+ return self.build_dpdk_apps_linux_meson(folder)
+
+ def build_dpdk_apps_linux_meson(self, folder):
+ """
+ Build dpdk sample applications on linux use meson
+ """
+ # icc compile need more time
+ if "icc" in self.target:
+ timeout = 300
+ else:
+ timeout = 90
+
+ target_info = self.target.split("-")
+ arch = target_info[0]
+ if arch == "i686":
+ # find the pkg-config path and set the PKG_CONFIG_LIBDIR environmental variable to point it
+ out = self.send_expect("find /usr -type d -name pkgconfig", "# ")
+ pkg_path = ""
+ res_path = out.split("\r\n")
+ for cur_path in res_path:
+ if "i386" in cur_path:
+ pkg_path = cur_path
+ break
+ assert (
+ pkg_path != ""
+ ), "please make sure you env have the i386 pkg-config path"
+
+ self.send_expect("export CFLAGS=-m32", "# ", alt_session=True)
+ self.send_expect(
+ "export PKG_CONFIG_LIBDIR=%s" % pkg_path, "# ", alt_session=True
+ )
+
+ folder_info = folder.split("/")
+ name = folder_info[-1]
+
+ if name == "examples":
+ example = "all"
+ else:
+ example = "/".join(folder_info[folder_info.index("examples") + 1 :])
+ out = self.send_expect(
+ "meson configure -Dexamples=%s %s" % (example, self.target), "# "
+ )
+ assert "FAILED" not in out, "Compilation error..."
+ out = self.send_expect("ninja -C %s" % self.target, "[~|~\]]# ", timeout)
+ assert "FAILED" not in out, "Compilation error..."
+
+ # verify the app build in the config path
+ if example != "all":
+ out = self.send_expect("ls %s" % self.apps_name[name], "# ", verify=True)
+ assert isinstance(out, str), (
+ "please confirm %s app path and name in app_name.cfg" % name
+ )
+
+ return out
+
+ def filter_cores_from_node_cfg(self) -> None:
+ # get core list from conf.yaml
+ core_list = []
+ all_core_list = [str(core.core) for core in self.cores]
+ core_list_str = self._config.cores
+ if core_list_str == "":
+ core_list = all_core_list
+ split_by_comma = core_list_str.split(",")
+ range_cores = []
+ for item in split_by_comma:
+ if "-" in item:
+ tmp = item.split("-")
+ range_cores.extend(
+ [str(i) for i in range(int(tmp[0]), int(tmp[1]) + 1)]
+ )
+ else:
+ core_list.append(item)
+ core_list.extend(range_cores)
+
+ abnormal_core_list = []
+ for core in core_list:
+ if core not in all_core_list:
+ abnormal_core_list.append(core)
+
+ if abnormal_core_list:
+ self.logger.info(
+ "those %s cores are out of range system, all core list of system are %s"
+ % (abnormal_core_list, all_core_list)
+ )
+ raise Exception("configured cores out of range system")
+
+ core_list = [core for core in self.cores if str(core.core) in core_list]
+ self.cores = core_list
+ self.number_of_cores = len(self.cores)
+
+ def create_eal_parameters(
+ self,
+ fixed_prefix: bool = False,
+ socket: Optional[int] = None,
+ cores: Union[str, List[int], List[str]] = "default",
+ prefix: str = "",
+ no_pci: bool = False,
+ vdevs: List[str] = None,
+ other_eal_param: str = "",
+ ) -> str:
+ """
+ generate eal parameters character string;
+ :param fixed_prefix: use fixed file-prefix or not, when it is true,
+ the file-prefix will not be added a timestamp
+ :param socket: the physical CPU socket index, -1 means no care cpu socket;
+ :param cores: set the core info, eg:
+ cores=[0,1,2,3],
+ cores=['0', '1', '2', '3'],
+ cores='default',
+ cores='1S/4C/1T',
+ cores='all';
+ :param prefix: set file prefix string, eg:
+ prefix='vf';
+ :param no_pci: switch of disable PCI bus eg:
+ no_pci=True;
+ :param vdevs: virtual device list, eg:
+ vdevs=['net_ring0', 'net_ring1'];
+ :param other_eal_param: user defined DPDK eal parameters, eg:
+ other_eal_param='--single-file-segments';
+ :return: eal param string, eg:
+ '-c 0xf -a 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420';
+ if DPDK version < 20.11-rc4, eal_str eg:
+ '-c 0xf -w 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420';
+ """
+ if vdevs is None:
+ vdevs = []
+
+ if socket is None:
+ socket = -1
+
+ config = {
+ "cores": cores,
+ "prefix": prefix,
+ "no_pci": no_pci,
+ "vdevs": vdevs,
+ "other_eal_param": other_eal_param,
+ }
+
+ eal_parameter_creator = _EalParameter(
+ sut_node=self, fixed_prefix=fixed_prefix, socket=socket, **config
+ )
+ eal_str = eal_parameter_creator.make_eal_param()
+
+ return eal_str
+
+ def set_toolchain(self, target):
+ """
+ This looks at the current target and instantiates an attribute to
+ be either a NodeLinuxApp or NodeBareMetal object. These latter two
+ classes are private and should not be used directly by client code.
+ """
+ self.kill_all()
+ self.target = target
+ [arch, _, _, toolchain] = target.split("-")
+
+ if toolchain == "icc":
+ icc_vars = os.getenv("ICC_VARS", "/opt/intel/composer_xe_2013/bin/")
+ icc_vars += "compilervars.sh"
+
+ if arch == "x86_64":
+ icc_arch = "intel64"
+ elif arch == "i686":
+ icc_arch = "ia32"
+ self.send_expect("source " + icc_vars + " " + icc_arch, "# ")
+
+ self.architecture = arch
+
+ def sut_prerequisites(self):
+ """
+ Prerequest function should be called before execute any test case.
+ Will call function to scan all lcore's information which on SUT.
+ Then call pci scan function to collect nic device information.
+ At last setup SUT' environment for validation.
+ """
+ out = self.send_expect(f"cd {SETTINGS.remote_dpdk_dir}", "# ")
+ assert "No such file or directory" not in out, "Can't switch to dpdk folder!!!"
+ out = self.send_expect("cat VERSION", "# ")
+ if "No such file or directory" in out:
+ self.logger.error("Can't get DPDK version due to VERSION not exist!!!")
+ else:
+ self.dpdk_version = out
+ self.send_expect("alias ls='ls --color=none'", "#")
+
+ self.init_core_list()
+ self.filter_cores_from_node_cfg()
+
+ def setup_memory(self, hugepages=-1):
+ """
+ Setup hugepage on SUT.
+ """
+ function_name = "setup_memory_%s" % self.get_os()
+ try:
+ setup_memory = getattr(self, function_name)
+ setup_memory(hugepages)
+ except AttributeError:
+ self.logger.error("%s is not implemented" % function_name)
+
+ def setup_memory_linux(self, hugepages=-1):
+ """
+ Setup Linux hugepages.
+ """
+ hugepages_size = self.send_expect(
+ "awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# "
+ )
+ total_huge_pages = self.get_total_huge_pages()
+ numa_nodes = self.send_expect("ls /sys/devices/system/node | grep node*", "# ")
+ if not numa_nodes:
+ total_numa_nodes = -1
+ else:
+ numa_nodes = numa_nodes.splitlines()
+ total_numa_nodes = len(numa_nodes)
+ self.logger.info(numa_nodes)
+
+ force_socket = False
+
+ if int(hugepages_size) < (1024 * 1024):
+ if hugepages <= 0:
+ if self.architecture == "x86_64":
+ arch_huge_pages = 4096
+ elif self.architecture == "i686":
+ arch_huge_pages = 512
+ force_socket = True
+ # set huge pagesize for x86_x32 abi target
+ elif self.architecture == "x86_x32":
+ arch_huge_pages = 256
+ force_socket = True
+ elif self.architecture == "ppc_64":
+ arch_huge_pages = 512
+ elif self.architecture == "arm64":
+ if int(hugepages_size) >= (512 * 1024):
+ arch_huge_pages = 8
+ else:
+ arch_huge_pages = 2048
+ else:
+ arch_huge_pages = 256
+ else:
+ arch_huge_pages = hugepages
+
+ if total_huge_pages != arch_huge_pages:
+ if total_numa_nodes == -1:
+ self.set_huge_pages(arch_huge_pages)
+ else:
+ # before all hugepage average distribution by all socket,
+ # but sometimes create mbuf pool on socket 0 failed when
+ # setup testpmd, so set all huge page on first socket
+ if force_socket:
+ self.set_huge_pages(arch_huge_pages, numa_nodes[0])
+ self.logger.info("force_socket on %s" % numa_nodes[0])
+ else:
+ # set huge pages to all numa_nodes
+ for numa_node in numa_nodes:
+ self.set_huge_pages(arch_huge_pages, numa_node)
+
+ self.mount_huge_pages()
+ self.hugepage_path = self.strip_hugepage_path()
+
+ def get_memory_channels(self):
+ n = self._config.memory_channels
+ if n is not None and n > 0:
+ return n
+ else:
+ return 1
+
+
+class _EalParameter(object):
+ def __init__(
+ self,
+ sut_node: SutNode,
+ fixed_prefix: bool,
+ socket: int,
+ cores: Union[str, List[int], List[str]],
+ prefix: str,
+ no_pci: bool,
+ vdevs: List[str],
+ other_eal_param: str,
+ ):
+ """
+ generate eal parameters character string;
+ :param sut_node: SUT Node;
+ :param fixed_prefix: use fixed file-prefix or not, when it is true,
+ the file-prefix will not be added a timestamp
+ :param socket: the physical CPU socket index, -1 means no care cpu socket;
+ :param cores: set the core info, eg:
+ cores=[0,1,2,3],
+ cores=['0','1','2','3'],
+ cores='default',
+ cores='1S/4C/1T',
+ cores='all';
+ param prefix: set file prefix string, eg:
+ prefix='vf';
+ param no_pci: switch of disable PCI bus eg:
+ no_pci=True;
+ param vdevs: virtual device list, eg:
+ vdevs=['net_ring0', 'net_ring1'];
+ param other_eal_param: user defined DPDK eal parameters, eg:
+ other_eal_param='--single-file-segments';
+ """
+ self.os = sut_node.get_os()
+ self.fixed_prefix = fixed_prefix
+ self.socket = socket
+ self.sut_node = sut_node
+ self.cores = self._validate_cores(cores)
+ self.prefix = prefix
+ self.no_pci = no_pci
+ self.vdevs = vdevs
+ self.other_eal_param = other_eal_param
+
+ _param_validate_exception_info_template = (
+ "Invalid parameter of %s about value of %s, Please reference API doc."
+ )
+
+ @staticmethod
+ def _validate_cores(cores: Union[str, List[int], List[str]]):
+ core_string_match = r"default|all|\d+S/\d+C/\d+T|$"
+ if isinstance(cores, list) and (
+ all(map(lambda _core: type(_core) == int, cores))
+ or all(map(lambda _core: type(_core) == str, cores))
+ ):
+ return cores
+ elif type(cores) == str and re.match(core_string_match, cores, re.I):
+ return cores
+ else:
+ raise ParameterInvalidException("cores", cores)
+
+ def _make_cores_param(self) -> str:
+ is_use_default_cores = (
+ self.cores == ""
+ or isinstance(self.cores, str)
+ and self.cores.lower() == "default"
+ )
+ if is_use_default_cores:
+ default_cores = "1S/2C/1T"
+ core_list = self.sut_node.get_core_list(default_cores)
+ else:
+ core_list = self._get_cores()
+
+ def _get_consecutive_cores_range(_cores: List[int]):
+ _formated_core_list = []
+ _tmp_cores_list = list(sorted(map(int, _cores)))
+ _segment = _tmp_cores_list[:1]
+ for _core_num in _tmp_cores_list[1:]:
+ if _core_num - _segment[-1] == 1:
+ _segment.append(_core_num)
+ else:
+ _formated_core_list.append(
+ f"{_segment[0]}-{_segment[-1]}"
+ if len(_segment) > 1
+ else f"{_segment[0]}"
+ )
+ _index = _tmp_cores_list.index(_core_num)
+ _formated_core_list.extend(
+ _get_consecutive_cores_range(_tmp_cores_list[_index:])
+ )
+ _segment.clear()
+ break
+ if len(_segment) > 0:
+ _formated_core_list.append(
+ f"{_segment[0]}-{_segment[-1]}"
+ if len(_segment) > 1
+ else f"{_segment[0]}"
+ )
+ return _formated_core_list
+
+ return f'-l {",".join(_get_consecutive_cores_range(core_list))}'
+
+ def _make_memory_channels(self) -> str:
+ param_template = "-n {}"
+ return param_template.format(self.sut_node.get_memory_channels())
+
+ def _make_no_pci_param(self) -> str:
+ if self.no_pci is True:
+ return "--no-pci"
+ else:
+ return ""
+
+ def _make_prefix_param(self) -> str:
+ if self.prefix == "":
+ fixed_file_prefix = "dpdk" + "_" + self.sut_node.prefix_subfix
+ else:
+ fixed_file_prefix = self.prefix
+ if not self.fixed_prefix:
+ fixed_file_prefix = (
+ fixed_file_prefix + "_" + self.sut_node.prefix_subfix
+ )
+ fixed_file_prefix = self._do_os_handle_with_prefix_param(fixed_file_prefix)
+ return fixed_file_prefix
+
+ def _make_vdevs_param(self) -> str:
+ if len(self.vdevs) == 0:
+ return ""
+ else:
+ _vdevs = ["--vdev " + vdev for vdev in self.vdevs]
+ return " ".join(_vdevs)
+
+ def _get_cores(self) -> List[int]:
+ if type(self.cores) == list:
+ return self.cores
+ elif isinstance(self.cores, str):
+ return self.sut_node.get_core_list(self.cores, socket=self.socket)
+
+ def _do_os_handle_with_prefix_param(self, file_prefix: str) -> str:
+ self.sut_node.prefix_list.append(file_prefix)
+ return "--file-prefix=" + file_prefix
+
+ def make_eal_param(self) -> str:
+ _eal_str = " ".join(
+ [
+ self._make_cores_param(),
+ self._make_memory_channels(),
+ self._make_prefix_param(),
+ self._make_no_pci_param(),
+ self._make_vdevs_param(),
+ # append user defined eal parameters
+ self.other_eal_param,
+ ]
+ )
+ return _eal_str
--
2.30.2
^ permalink raw reply [relevance 2%]
* Re: [PATCH v5 1/7] bbdev: allow operation type enum for growth
2022-07-06 23:28 3% ` [PATCH v5 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
@ 2022-08-25 13:54 0% ` Maxime Coquelin
0 siblings, 0 replies; 200+ results
From: Maxime Coquelin @ 2022-08-25 13:54 UTC (permalink / raw)
To: Nicolas Chautru, dev, thomas, gakhil, hemant.agrawal
Cc: trix, mdr, bruce.richardson, david.marchand, stephen
Hi Nicolas,
On 7/7/22 01:28, Nicolas Chautru wrote:
> Updating the enum for rte_bbdev_op_type
> to allow to keep ABI compatible for enum insertion
> while adding padded maximum value for array need.
> Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
> RTE_BBDEV_OP_TYPE_PADDED_MAX.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
> app/test-bbdev/test_bbdev.c | 2 +-
> app/test-bbdev/test_bbdev_perf.c | 4 ++--
> examples/bbdev_app/main.c | 2 +-
> lib/bbdev/rte_bbdev.c | 8 +++++---
> lib/bbdev/rte_bbdev_op.h | 2 +-
> 5 files changed, 10 insertions(+), 8 deletions(-)
>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4 2/7] bbdev: add device status info
2022-07-06 21:16 3% ` Chautru, Nicolas
2022-07-07 13:37 0% ` Tom Rix
@ 2022-08-25 14:08 3% ` Maxime Coquelin
1 sibling, 0 replies; 200+ results
From: Maxime Coquelin @ 2022-08-25 14:08 UTC (permalink / raw)
To: Chautru, Nicolas, Tom Rix, dev, thomas, gakhil, hemant.agrawal
Cc: mdr, Richardson, Bruce, david.marchand, stephen
On 7/6/22 23:16, Chautru, Nicolas wrote:
>>> +};
>>> +
>>> /** Device statistics. */
>>> struct rte_bbdev_stats {
>>> uint64_t enqueued_count; /**< Count of all operations enqueued */
>>> @@ -285,12 +300,14 @@ struct rte_bbdev_driver_info {
>>> /** Set if device supports per-queue interrupts */
>>> bool queue_intr_supported;
>>> /** Minimum alignment of buffers, in bytes */
>>> - uint16_t min_alignment;
>>> - /** HARQ memory available in kB */
>>> + /** Device Status */
>>> + enum rte_bbdev_device_status device_status;
>> New elements should be added to the end to improve backward compatibility.
> Same comment in different patch. I would like to know if there is a real recommendation from DPDK on this. I have heard opposite view as well.
> In that very case we are breaking the ABI in that new serie for 22.11 (sizes and offsets are changing).
>
Since we are breaking ABI anyways, I don't find it unreasonable to take
the opportunity to improve packing the struct.
Maxime
^ permalink raw reply [relevance 3%]
* [PATCH v2 3/4] eal: uninline rte_str_to_size
@ 2022-08-25 15:37 3% ` Dmitry Kozlyuk
1 sibling, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2022-08-25 15:37 UTC (permalink / raw)
To: dev
Cc: Dmitry Kozlyuk, Ray Kinsella, Morten Brørup,
Bruce Richardson, Chengwen Feng
There is no reason for rte_str_to_size() to be inline.
Move the implementation out of <rte_common.h>.
Export it as a stable ABI because it always has been public.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/eal/common/eal_common_string_fns.c | 32 ++++++++++++++++++++++++++
lib/eal/include/rte_common.h | 30 ++----------------------
lib/eal/version.map | 1 +
3 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/lib/eal/common/eal_common_string_fns.c b/lib/eal/common/eal_common_string_fns.c
index 0236ae4023..5fc4ee71dc 100644
--- a/lib/eal/common/eal_common_string_fns.c
+++ b/lib/eal/common/eal_common_string_fns.c
@@ -64,3 +64,35 @@ rte_strscpy(char *dst, const char *src, size_t dsize)
rte_errno = E2BIG;
return -rte_errno;
}
+
+uint64_t
+rte_str_to_size(const char *str)
+{
+ char *endptr;
+ unsigned long long size;
+
+ while (isspace((int)*str))
+ str++;
+ if (*str == '-')
+ return 0;
+
+ errno = 0;
+ size = strtoull(str, &endptr, 0);
+ if (errno)
+ return 0;
+
+ if (*endptr == ' ')
+ endptr++; /* allow 1 space gap */
+
+ switch (*endptr) {
+ case 'G': case 'g':
+ size *= 1024; /* fall-through */
+ case 'M': case 'm':
+ size *= 1024; /* fall-through */
+ case 'K': case 'k':
+ size *= 1024; /* fall-through */
+ default:
+ break;
+ }
+ return size;
+}
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index b65555bac6..86c50c55e0 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -873,34 +873,8 @@ rte_log2_u64(uint64_t v)
* @return
* Number.
*/
-static inline uint64_t
-rte_str_to_size(const char *str)
-{
- char *endptr;
- unsigned long long size;
-
- while (isspace((int)*str))
- str++;
- if (*str == '-')
- return 0;
-
- errno = 0;
- size = strtoull(str, &endptr, 0);
- if (errno)
- return 0;
-
- if (*endptr == ' ')
- endptr++; /* allow 1 space gap */
-
- switch (*endptr){
- case 'G': case 'g': size *= 1024; /* fall-through */
- case 'M': case 'm': size *= 1024; /* fall-through */
- case 'K': case 'k': size *= 1024; /* fall-through */
- default:
- break;
- }
- return size;
-}
+uint64_t
+rte_str_to_size(const char *str);
/**
* Function to terminate the application immediately, printing an error
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 1f293e768b..773b0902c0 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -261,6 +261,7 @@ DPDK_23 {
rte_socket_id;
rte_socket_id_by_idx;
rte_srand;
+ rte_str_to_size;
rte_strerror;
rte_strscpy;
rte_strsplit;
--
2.33.1
^ permalink raw reply [relevance 3%]
* [PATCH v6 1/7] bbdev: allow operation type enum for growth
@ 2022-08-25 18:24 3% ` Nicolas Chautru
0 siblings, 0 replies; 200+ results
From: Nicolas Chautru @ 2022-08-25 18:24 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, Nicolas Chautru
Updating the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_PADDED_MAX.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 4 ++--
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 8 +++++---
lib/bbdev/rte_bbdev_op.h | 2 +-
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index ac06d73..1063f6e 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
rte_mempool_free(mp);
TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
- RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) == NULL,
+ RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size, 0)) == NULL,
"Failed test for rte_bbdev_op_pool_create: "
"returned value is not NULL for invalid type");
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index fad3b1e..1abda2d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct active_device *ad,
/* Find capabilities */
const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
- for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
+ do {
if (cap->type == test_vector.op_type) {
capabilities = cap;
break;
}
cap++;
- }
+ } while (cap->type != RTE_BBDEV_OP_NONE);
TEST_ASSERT_NOT_NULL(capabilities,
"Couldn't find capabilities");
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8..ef0ba76 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
void *sigret;
struct app_config_params app_params = def_app_config;
struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool;
- struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
+ struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
struct stats_lcore_params stats_lcore;
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index aaee7b7..4da8047 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -23,6 +23,8 @@
#define DEV_NAME "BBDEV"
+/* Number of supported operation types */
+#define BBDEV_OP_TYPE_COUNT 5
/* BBDev library logging ID */
RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
@@ -890,10 +892,10 @@ struct rte_mempool *
return NULL;
}
- if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
+ if (type >= BBDEV_OP_TYPE_COUNT) {
rte_bbdev_log(ERR,
"Invalid op type (%u), should be less than %u",
- type, RTE_BBDEV_OP_TYPE_COUNT);
+ type, BBDEV_OP_TYPE_COUNT);
return NULL;
}
@@ -1125,7 +1127,7 @@ struct rte_mempool *
"RTE_BBDEV_OP_LDPC_ENC",
};
- if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
+ if (op_type < BBDEV_OP_TYPE_COUNT)
return op_types[op_type];
rte_bbdev_log(ERR, "Invalid operation type");
diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h
index 6d56133..cd82418 100644
--- a/lib/bbdev/rte_bbdev_op.h
+++ b/lib/bbdev/rte_bbdev_op.h
@@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
- RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
+ RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type number including padding */
};
/** Bit indexes of possible errors reported through status field */
--
1.8.3.1
^ permalink raw reply [relevance 3%]
* [PATCH v3 3/4] eal: uninline rte_str_to_size
@ 2022-08-25 22:33 3% ` Dmitry Kozlyuk
1 sibling, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2022-08-25 22:33 UTC (permalink / raw)
To: dev
Cc: Dmitry Kozlyuk, Ray Kinsella, Morten Brørup,
Bruce Richardson, Chengwen Feng
There is no reason for rte_str_to_size() to be inline.
Move the implementation out of <rte_common.h>.
Export it as a stable ABI because it always has been public.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/eal/common/eal_common_string_fns.c | 32 ++++++++++++++++++++++++++
lib/eal/include/rte_common.h | 30 ++----------------------
lib/eal/version.map | 1 +
3 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/lib/eal/common/eal_common_string_fns.c b/lib/eal/common/eal_common_string_fns.c
index 0236ae4023..5fc4ee71dc 100644
--- a/lib/eal/common/eal_common_string_fns.c
+++ b/lib/eal/common/eal_common_string_fns.c
@@ -64,3 +64,35 @@ rte_strscpy(char *dst, const char *src, size_t dsize)
rte_errno = E2BIG;
return -rte_errno;
}
+
+uint64_t
+rte_str_to_size(const char *str)
+{
+ char *endptr;
+ unsigned long long size;
+
+ while (isspace((int)*str))
+ str++;
+ if (*str == '-')
+ return 0;
+
+ errno = 0;
+ size = strtoull(str, &endptr, 0);
+ if (errno)
+ return 0;
+
+ if (*endptr == ' ')
+ endptr++; /* allow 1 space gap */
+
+ switch (*endptr) {
+ case 'G': case 'g':
+ size *= 1024; /* fall-through */
+ case 'M': case 'm':
+ size *= 1024; /* fall-through */
+ case 'K': case 'k':
+ size *= 1024; /* fall-through */
+ default:
+ break;
+ }
+ return size;
+}
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index b65555bac6..86c50c55e0 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -873,34 +873,8 @@ rte_log2_u64(uint64_t v)
* @return
* Number.
*/
-static inline uint64_t
-rte_str_to_size(const char *str)
-{
- char *endptr;
- unsigned long long size;
-
- while (isspace((int)*str))
- str++;
- if (*str == '-')
- return 0;
-
- errno = 0;
- size = strtoull(str, &endptr, 0);
- if (errno)
- return 0;
-
- if (*endptr == ' ')
- endptr++; /* allow 1 space gap */
-
- switch (*endptr){
- case 'G': case 'g': size *= 1024; /* fall-through */
- case 'M': case 'm': size *= 1024; /* fall-through */
- case 'K': case 'k': size *= 1024; /* fall-through */
- default:
- break;
- }
- return size;
-}
+uint64_t
+rte_str_to_size(const char *str);
/**
* Function to terminate the application immediately, printing an error
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 1f293e768b..773b0902c0 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -261,6 +261,7 @@ DPDK_23 {
rte_socket_id;
rte_socket_id_by_idx;
rte_srand;
+ rte_str_to_size;
rte_strerror;
rte_strscpy;
rte_strsplit;
--
2.33.1
^ permalink raw reply [relevance 3%]
* [PATCH v4 00/27] Bus and device cleanup for 22.11
2022-06-28 14:46 2% [RFC PATCH 00/11] Bus cleanup for 22.11 David Marchand
` (2 preceding siblings ...)
@ 2022-08-26 12:41 1% ` David Marchand
2022-08-26 12:41 4% ` [PATCH v4 03/27] raw/ifpga: remove PCI bus accessor David Marchand
` (3 more replies)
2022-09-05 8:35 1% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
2022-09-05 8:39 1% ` David Marchand
5 siblings, 4 replies; 200+ results
From: David Marchand @ 2022-08-26 12:41 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson
The rte_bus, rte_driver and rte_device objects are part of the public
ABI and this has proved to be a problem when needing to extend them.
This series hides them, and mark associated driver only API as internal.
A good amount of the patches are preparation work on rte_bus.h,
rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
between them.
PCI bus specific handling are removed from testpmd, unit tests and
examples.
After this series, driver-only API headers for registering to buses are
not exported anymore, unless the enable_driver_sdk meson option is
selected.
New accessors for rte_bus, rte_driver and rte_device have been added,
marked with an experimental tag first when introducing them, and later
in the series marked as stable since external users will want to use
those drop-in replacements right away.
A check is added to ensure we won't pollute app/ and examples/ again,
though some unit tests are left intentionnally untouched as they test
some internals of DPDK.
Changes since RFC v3:
- marked the series as non-RFC,
- rebased on v22.11-rc0,
- marked RTE_FUNC_PTR_* macros as deprecated,
- split the bus specific patch in two patches,
Changes since RFC v2:
- added check for additions of include .*_(driver|pmd)\.h in apps and
examples,
- dropped legacy/debug testpmd commands to read PCI BAR0 registers,
- dropped patches on bbdev, ethdev, rawdev driver headers for now,
- reordered patches and separated changes per bus type to ease review,
- added more accessor for device,
- introduced rte_dev_bus_info to provide a Bus specific description of
a device, a first use is for providing a PCI device vendor / device
identifiers that are otherwise unavailable through a generic existing
API,
Changes since RFC v1:
- added two more cleanups (new patch 3 and 4) for unit test and examples
relying on PCI specific info,
- went on with masking rte_driver and rte_device too,
--
David Marchand
David Marchand (27):
devtools: forbid inclusions of driver only headers
common/mlx5: rework check on driver registration
raw/ifpga: remove PCI bus accessor
app/testpmd: drop PCI register commands
kni: stop populating PCI info in examples
examples/ethtool: prefer device name
dev: hide debug messages in device iterator
eal: deprecate RTE_FUNC_PTR_* macros
devargs: remove dependency on bus header
build: export drivers headers
bus/auxiliary: make driver-only headers private
bus/dpaa: make driver-only headers private
bus/fslmc: make driver-only headers private
bus/ifpga: cleanup exported symbols
bus/ifpga: make driver-only headers private
bus/pci: make driver-only headers private
bus/vdev: make driver-only headers private
bus/vmbus: make driver-only headers private
bus: move IOVA definition from header
bus: introduce accessors
bus: hide bus object
dev: introduce driver accessors
dev: hide driver object
dev: introduce device accessors
dev: provide bus specific information
bus/pci: fill bus specific information
dev: hide device object
app/proc-info/main.c | 6 +-
app/test-compress-perf/comp_perf_options.h | 2 +
app/test-pmd/cmdline.c | 339 +-----------------
app/test-pmd/config.c | 222 +-----------
app/test-pmd/csumonly.c | 1 -
app/test-pmd/flowgen.c | 1 -
app/test-pmd/iofwd.c | 1 -
app/test-pmd/macfwd.c | 1 -
app/test-pmd/macswap.c | 1 -
app/test-pmd/meson.build | 2 +-
app/test-pmd/parameters.c | 1 -
app/test-pmd/rxonly.c | 1 -
app/test-pmd/testpmd.c | 12 +-
app/test-pmd/testpmd.h | 72 +---
app/test-pmd/txonly.c | 1 -
app/test/test_devargs.c | 6 +-
app/test/test_kni.c | 30 --
app/test/test_vdev.c | 3 +-
app/test/virtual_pmd.c | 2 +-
devtools/checkpatches.sh | 8 +
devtools/cocci/func_or_ret.cocci | 12 +
doc/guides/rel_notes/deprecation.rst | 20 +-
doc/guides/rel_notes/release_22_11.rst | 19 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 81 -----
drivers/baseband/acc100/rte_acc100_pmd.c | 4 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 4 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 2 +-
drivers/baseband/null/bbdev_null.c | 2 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 5 +-
drivers/bus/auxiliary/auxiliary_params.c | 5 +-
...bus_auxiliary.h => bus_auxiliary_driver.h} | 26 +-
drivers/bus/auxiliary/linux/auxiliary.c | 2 -
drivers/bus/auxiliary/meson.build | 4 +-
drivers/bus/auxiliary/private.h | 30 +-
drivers/bus/auxiliary/version.map | 3 +-
drivers/bus/dpaa/base/qbman/qman.c | 2 +-
.../{rte_dpaa_bus.h => bus_dpaa_driver.h} | 25 +-
drivers/bus/dpaa/dpaa_bus.c | 22 +-
.../fslmc/{rte_fslmc.h => bus_fslmc_driver.h} | 30 +-
drivers/bus/fslmc/fslmc_bus.c | 14 +-
drivers/bus/fslmc/fslmc_vfio.c | 5 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 4 +-
drivers/bus/fslmc/private.h | 27 ++
.../{rte_bus_ifpga.h => bus_ifpga_driver.h} | 18 +-
drivers/bus/ifpga/ifpga_bus.c | 21 +-
drivers/bus/ifpga/ifpga_common.c | 88 -----
drivers/bus/ifpga/ifpga_common.h | 54 ++-
drivers/bus/ifpga/meson.build | 4 +-
drivers/bus/ifpga/version.map | 4 +-
drivers/bus/pci/bsd/pci.c | 11 +-
drivers/bus/pci/bus_pci_driver.h | 201 +++++++++++
drivers/bus/pci/linux/pci.c | 27 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/meson.build | 1 +
drivers/bus/pci/pci_common.c | 21 +-
drivers/bus/pci/pci_params.c | 4 +-
drivers/bus/pci/private.h | 29 +-
drivers/bus/pci/rte_bus_pci.h | 201 +----------
drivers/bus/pci/version.map | 11 +-
drivers/bus/pci/windows/pci.c | 7 +-
drivers/bus/pci/windows/pci_netuio.c | 1 +
drivers/bus/vdev/bus_vdev_driver.h | 151 ++++++++
drivers/bus/vdev/meson.build | 1 +
drivers/bus/vdev/rte_bus_vdev.h | 134 -------
drivers/bus/vdev/vdev.c | 12 +-
drivers/bus/vdev/vdev_params.c | 3 +-
drivers/bus/vdev/version.map | 9 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 106 ++++++
drivers/bus/vmbus/linux/vmbus_uio.c | 1 -
drivers/bus/vmbus/meson.build | 1 +
drivers/bus/vmbus/private.h | 20 +-
drivers/bus/vmbus/rte_bus_vmbus.h | 104 ------
drivers/bus/vmbus/version.map | 9 +-
drivers/bus/vmbus/vmbus_bufring.c | 1 -
drivers/bus/vmbus/vmbus_channel.c | 1 -
drivers/bus/vmbus/vmbus_common.c | 3 -
drivers/bus/vmbus/vmbus_common_uio.c | 1 -
drivers/common/cnxk/roc_platform.h | 2 +-
.../common/mlx5/linux/mlx5_common_auxiliary.c | 12 +-
drivers/common/mlx5/linux/mlx5_common_os.c | 4 +-
drivers/common/mlx5/linux/mlx5_common_os.h | 2 +-
drivers/common/mlx5/mlx5_common.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 3 +-
drivers/common/mlx5/mlx5_common_private.h | 2 +-
drivers/common/mlx5/windows/mlx5_common_os.c | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_device.c | 8 +-
drivers/common/qat/qat_device.h | 2 +-
drivers/common/qat/qat_qp.c | 35 +-
drivers/common/sfc_efx/sfc_efx.h | 2 +-
drivers/compress/isal/isal_compress_pmd.c | 2 +-
drivers/compress/mlx5/mlx5_compress.c | 2 +-
drivers/compress/octeontx/otx_zip.h | 2 +-
drivers/compress/qat/qat_comp.c | 2 +-
drivers/compress/qat/qat_comp_pmd.c | 4 +-
drivers/compress/zlib/zlib_pmd.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 1 +
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_device.h | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 2 +-
drivers/crypto/ccp/ccp_dev.h | 2 +-
drivers/crypto/ccp/ccp_pci.h | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 6 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 4 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
drivers/crypto/ipsec_mb/pmd_kasumi.c | 2 +-
drivers/crypto/mlx5/mlx5_crypto.c | 2 +-
drivers/crypto/mvsam/rte_mrvl_pmd.c | 2 +-
drivers/crypto/nitrox/nitrox_device.h | 2 +-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev_ops.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym.c | 2 +-
.../scheduler/rte_cryptodev_scheduler.c | 6 +-
drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 8 +-
drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
drivers/crypto/virtio/virtio_pci.c | 1 -
drivers/crypto/virtio/virtio_pci.h | 2 +-
drivers/dma/cnxk/cnxk_dmadev.c | 3 +-
drivers/dma/dpaa/dpaa_qdma.c | 2 +-
drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
drivers/dma/hisilicon/hisi_dmadev.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 3 +-
drivers/dma/idxd/idxd_pci.c | 2 +-
drivers/dma/ioat/ioat_dmadev.c | 2 +-
drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_main.h | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 4 +-
drivers/event/dpaa/dpaa_eventdev.c | 4 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 6 +-
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 4 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 4 +-
drivers/event/octeontx/ssovf_evdev.c | 4 +-
drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-
drivers/event/octeontx/ssovf_probe.c | 2 +-
drivers/event/octeontx/timvf_probe.c | 2 +-
drivers/event/opdl/opdl_evdev.c | 2 +-
drivers/event/opdl/opdl_evdev_init.c | 2 +-
drivers/event/opdl/opdl_test.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 4 +-
drivers/event/sw/sw_evdev.c | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 2 +-
drivers/gpu/cuda/cuda.c | 4 +-
drivers/mempool/cnxk/cnxk_mempool.c | 2 +-
drivers/mempool/dpaa/dpaa_mempool.h | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 2 +-
drivers/meson.build | 4 +
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +-
drivers/net/ark/ark_ethdev.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 4 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 3 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
drivers/net/cxgbe/base/adapter.h | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 4 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
drivers/net/dpaa/dpaa_rxtx.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 4 +-
drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 4 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 4 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 4 +-
drivers/net/e1000/em_rxtx.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 4 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/e1000/igb_pf.c | 2 +-
drivers/net/ena/ena_ethdev.h | 4 +-
drivers/net/enic/base/vnic_dev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 4 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 4 +-
drivers/net/failsafe/failsafe.c | 3 +-
drivers/net/failsafe/failsafe_eal.c | 1 +
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwif.c | 2 +-
drivers/net/hinic/base/hinic_pmd_nicio.c | 2 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 2 +-
drivers/net/hns3/hns3_common.c | 2 +-
drivers/net/hns3/hns3_ethdev.c | 2 +-
drivers/net/hns3/hns3_rxtx.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 4 +-
drivers/net/i40e/i40e_vf_representor.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/igc/igc_ethdev.c | 2 +-
drivers/net/ionic/ionic.h | 2 +-
drivers/net/ionic/ionic_ethdev.c | 2 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 2 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 4 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 3 +-
drivers/net/kni/rte_eth_kni.c | 2 +-
drivers/net/liquidio/lio_ethdev.c | 3 +-
drivers/net/memif/memif_socket.c | 2 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/mlx4/mlx4_ethdev.c | 2 +-
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 5 +-
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
drivers/net/mvneta/mvneta_ethdev.c | 2 +-
drivers/net/mvpp2/mrvl_ethdev.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 5 +-
drivers/net/netvsc/hn_nvs.c | 4 +-
drivers/net/netvsc/hn_rndis.c | 4 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/netvsc/hn_vf.c | 4 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/ngbe/base/ngbe_osdep.h | 2 +-
drivers/net/ngbe/ngbe_pf.c | 2 +-
drivers/net/null/rte_eth_null.c | 2 +-
drivers/net/octeontx/base/octeontx_pkivf.c | 2 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 +-
drivers/net/pcap/pcap_ethdev.c | 2 +-
drivers/net/pfe/pfe_ethdev.c | 2 +-
drivers/net/qede/base/bcm_osal.h | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/ring/rte_eth_ring.c | 2 +-
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 4 +-
drivers/net/sfc/sfc_sriov.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/softnic/rte_eth_softnic.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ethdev.h | 2 +-
drivers/net/txgbe/txgbe_flow.c | 2 +-
drivers/net/txgbe/txgbe_pf.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 6 +-
drivers/net/vhost/rte_eth_vhost.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/net/virtio/virtio_pci.h | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 4 +-
drivers/net/virtio/virtio_user_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +-
drivers/raw/cnxk_gpio/cnxk_gpio.c | 2 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 2 +-
drivers/raw/ifpga/afu_pmd_core.h | 2 +-
drivers/raw/ifpga/afu_pmd_he_hssi.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_lpbk.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_mem.c | 4 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 4 +-
drivers/raw/ifpga/ifpga_rawdev.c | 21 +-
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 8 +-
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 -
drivers/raw/ifpga/version.map | 1 -
drivers/raw/ioat/idxd_bus.c | 2 +-
drivers/raw/ioat/idxd_pci.c | 2 +-
drivers/raw/ioat/ioat_rawdev.c | 2 +-
drivers/raw/ntb/ntb.c | 2 +-
drivers/raw/ntb/ntb_hw_intel.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 25 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 4 +-
drivers/regex/mlx5/mlx5_regex.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
drivers/regex/mlx5/mlx5_regex_fastpath.c | 2 +-
drivers/vdpa/ifc/base/ifcvf_osdep.h | 2 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
drivers/vdpa/sfc/sfc_vdpa.h | 2 +-
examples/ethtool/lib/rte_ethtool.c | 17 +-
examples/ip_pipeline/kni.c | 10 -
examples/l3fwd/l3fwd_em.c | 4 +-
examples/l3fwd/l3fwd_fib.c | 8 +-
examples/l3fwd/l3fwd_lpm.c | 4 +-
examples/multi_process/hotplug_mp/commands.c | 6 +-
examples/vdpa/main.c | 16 +-
lib/compressdev/rte_compressdev.c | 48 ++-
lib/compressdev/rte_compressdev_pmd.c | 1 +
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 45 ++-
lib/dmadev/rte_dmadev.c | 21 +-
lib/dmadev/rte_dmadev.h | 21 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_bus.c | 28 +-
lib/eal/common/eal_common_dev.c | 53 ++-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/eal_private.h | 2 +-
lib/eal/common/eal_thread.h | 1 +
lib/eal/common/hotplug_mp.c | 1 +
lib/eal/include/bus_driver.h | 296 +++++++++++++++
lib/eal/include/dev_driver.h | 41 +++
lib/eal/include/meson.build | 5 +
lib/eal/include/rte_bus.h | 290 +--------------
lib/eal/include/rte_dev.h | 104 ++++--
lib/eal/include/rte_devargs.h | 4 +-
lib/eal/include/rte_eal.h | 15 +-
lib/eal/include/rte_lcore.h | 2 +
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 12 +-
lib/eal/windows/eal.c | 1 +
lib/ethdev/ethdev_driver.c | 18 +-
lib/ethdev/ethdev_driver.h | 1 +
lib/ethdev/ethdev_pci.h | 5 +-
lib/ethdev/ethdev_vdev.h | 2 +-
lib/ethdev/rte_ethdev.c | 277 +++++++++-----
lib/ethdev/rte_ethdev.h | 11 +-
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/eventdev_pmd_pci.h | 2 +-
lib/eventdev/eventdev_pmd_vdev.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 12 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 15 +-
lib/eventdev/rte_eventdev.c | 64 ++--
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 5 +-
lib/pcapng/rte_pcapng.c | 3 +-
lib/rawdev/rte_rawdev.c | 77 ++--
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/regexdev/rte_regexdev.c | 59 +--
lib/regexdev/rte_regexdev.h | 6 +-
lib/security/rte_security.c | 8 +-
lib/vhost/vdpa.c | 10 +-
lib/vhost/vhost_user.c | 6 +-
367 files changed, 2193 insertions(+), 2489 deletions(-)
create mode 100644 devtools/cocci/func_or_ret.cocci
rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (90%)
rename drivers/bus/dpaa/{rte_dpaa_bus.h => bus_dpaa_driver.h} (92%)
rename drivers/bus/fslmc/{rte_fslmc.h => bus_fslmc_driver.h} (88%)
create mode 100644 drivers/bus/fslmc/private.h
rename drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)
delete mode 100644 drivers/bus/ifpga/ifpga_common.c
create mode 100644 drivers/bus/pci/bus_pci_driver.h
create mode 100644 drivers/bus/vdev/bus_vdev_driver.h
create mode 100644 drivers/bus/vmbus/bus_vmbus_driver.h
create mode 100644 lib/eal/include/bus_driver.h
create mode 100644 lib/eal/include/dev_driver.h
--
2.37.2
^ permalink raw reply [relevance 1%]
* [PATCH v4 03/27] raw/ifpga: remove PCI bus accessor
2022-08-26 12:41 1% ` [PATCH v4 00/27] " David Marchand
@ 2022-08-26 12:41 4% ` David Marchand
2022-08-26 12:42 3% ` [PATCH v4 21/27] bus: hide bus object David Marchand
` (2 subsequent siblings)
3 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-08-26 12:41 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, Rosen Xu, Ray Kinsella, Tianfei zhang
There is no in-tree user for this accessor that returns the PCI bus
object.
On the other hand, a bus object can be retrieved by name using
rte_bus_find_by_name.
We can remove this driver specific API.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
Changes since RFC v2:
- updated release notes,
---
doc/guides/rel_notes/deprecation.rst | 3 ---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/raw/ifpga/ifpga_rawdev.c | 7 +------
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 6 ------
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 ----------
drivers/raw/ifpga/version.map | 1 -
7 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..dba252067c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -228,9 +228,6 @@ Deprecation Notices
* raw/dpaa2_cmdif: The ``dpaa2_cmdif`` rawdev driver will be deprecated
in DPDK 22.11, as it is no longer in use, no active user known.
-* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` will be removed
- in DPDK 22.11.
-
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..3cea3aa8eb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
+
ABI Changes
-----------
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 8c05302a65..78a7123528 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -10,8 +10,8 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/epoll.h>
+
#include <rte_log.h>
-#include <rte_bus.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
@@ -1888,11 +1888,6 @@ RTE_PMD_REGISTER_PARAM_STRING(ifpga_rawdev_cfg,
"port=<int> "
"afu_bts=<path>");
-struct rte_pci_bus *ifpga_get_pci_bus(void)
-{
- return rte_ifpga_rawdev_pmd.bus;
-}
-
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file)
{
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 4c191190ca..0fb66cbaae 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -91,7 +91,6 @@ int
ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
int vec_start, rte_intr_callback_fn handler, void *arg);
-struct rte_pci_bus *ifpga_get_pci_bus(void);
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file);
void ifpga_rawdev_cleanup(void);
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.c b/drivers/raw/ifpga/rte_pmd_ifpga.c
index 23146432c2..1ca248123b 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.c
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.c
@@ -402,12 +402,6 @@ rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page)
return opae_mgr_reload(adapter->mgr, type, page);
}
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void)
-{
- return ifpga_get_pci_bus();
-}
-
int
rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file)
{
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.h b/drivers/raw/ifpga/rte_pmd_ifpga.h
index 3fa5d3435a..791543f2cd 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.h
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.h
@@ -220,16 +220,6 @@ rte_pmd_ifpga_reboot_try(uint16_t dev_id);
int
rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
-/**
- * Get PCI bus the Intel FPGA driver register to
- *
- * @return
- * - (valid pointer) if successful.
- * - (NULL) if the Intel FPGA driver is not registered to any PCI bus.
- */
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void);
-
/**
* Perform PR (partial reconfiguration) on specified Intel FPGA device
*
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index f5c3959b7f..916da8a4f2 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -3,7 +3,6 @@ DPDK_23 {
rte_pmd_ifpga_cleanup;
rte_pmd_ifpga_get_dev_id;
- rte_pmd_ifpga_get_pci_bus;
rte_pmd_ifpga_get_phy_info;
rte_pmd_ifpga_get_property;
rte_pmd_ifpga_get_rsu_status;
--
2.37.2
^ permalink raw reply [relevance 4%]
* [PATCH v4 21/27] bus: hide bus object
2022-08-26 12:41 1% ` [PATCH v4 00/27] " David Marchand
2022-08-26 12:41 4% ` [PATCH v4 03/27] raw/ifpga: remove PCI bus accessor David Marchand
@ 2022-08-26 12:42 3% ` David Marchand
2022-08-26 12:42 1% ` [PATCH v4 23/27] dev: hide driver object David Marchand
2022-08-26 12:42 2% ` [PATCH v4 27/27] dev: hide device object David Marchand
3 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-08-26 12:42 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, Ray Kinsella, Parav Pandit, Xueming Li,
Hemant Agrawal, Sachin Saxena, Rosen Xu, Anatoly Burakov,
Stephen Hemminger, Long Li, Matan Azrad, Viacheslav Ovsiienko,
Kevin Laatz, Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Ferruh Yigit,
Andrew Rybchenko, Reshma Pattan
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_bus objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
Changes since RFC v1:
- update all existing users of the public header to use the internal one,
---
app/test/test_devargs.c | 2 +-
app/test/test_vdev.c | 2 +-
doc/guides/rel_notes/deprecation.rst | 6 -
doc/guides/rel_notes/release_22_11.rst | 6 +
drivers/bus/auxiliary/auxiliary_common.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/private.h | 2 +-
drivers/bus/dpaa/dpaa_bus.c | 2 +-
drivers/bus/fslmc/fslmc_bus.c | 2 +-
drivers/bus/fslmc/private.h | 2 +-
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/pci_common.c | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/pci/private.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vmbus/private.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 2 +-
drivers/net/failsafe/failsafe.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/raw/ioat/idxd_bus.c | 2 +-
lib/eal/common/eal_common_bus.c | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/hotplug_mp.c | 2 +-
lib/eal/include/bus_driver.h | 296 +++++++++++++++++++++++
lib/eal/include/meson.build | 4 +
lib/eal/include/rte_bus.h | 278 +--------------------
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 8 +-
lib/ethdev/rte_ethdev.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
38 files changed, 343 insertions(+), 319 deletions(-)
create mode 100644 lib/eal/include/bus_driver.h
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index ac5bc34c18..0a4c34a1ad 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -9,7 +9,7 @@
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include "test.h"
diff --git a/app/test/test_vdev.c b/app/test/test_vdev.c
index 3cc3abe70b..c3a8ad64bb 100644
--- a/app/test/test_vdev.c
+++ b/app/test/test_vdev.c
@@ -8,7 +8,7 @@
#include <rte_common.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include "test.h"
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5b4ffc992d..98a00da385 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -47,12 +47,6 @@ Deprecation Notices
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
-* bus: The ``rte_bus`` object will be made opaque in DPDK 22.11.
- The goal is to remove it from the public ABI and make this object extendable.
- As a side effect, registering a bus will be marked as an internal API:
- external users may still register their bus using a new driver header
- (see ``enable_driver_sdk`` meson option).
-
* drivers: As a follow-up of the work on the ``rte_bus`` object,
the ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
their bus-specific counterparts) will be made opaque in DPDK 22.11.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index e08a548285..36df0ccf93 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -88,6 +88,12 @@ API Changes
in the future. Applications can use ``devtools/cocci/func_or_ret.cocci``
to update their code.
+* bus: Registering a bus has been marked as an internal API.
+ External users may still register their bus using the ``bus_driver.h``
+ driver header (see ``enable_driver_sdk`` meson option).
+ The ``rte_bus`` object is now opaque and must be manipulated through added
+ accessors.
+
* drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``,
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 6cf6c170ec..259ff152c4 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -12,7 +12,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_eal.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index 0289777922..a889e392c6 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_dev.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index 3f49f62493..3dee13e1d1 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "bus_auxiliary_driver.h"
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 1ac6aa314f..682427ba2c 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -29,7 +29,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_ring.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_mbuf_pool_ops.h>
#include <rte_mbuf_dyn.h>
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index b9b0981329..8503004e3d 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
diff --git a/drivers/bus/fslmc/private.h b/drivers/bus/fslmc/private.h
index 60d68155e1..6f14085d98 100644
--- a/drivers/bus/fslmc/private.h
+++ b/drivers/bus/fslmc/private.h
@@ -5,7 +5,7 @@
#ifndef BUS_FSLMC_PRIVATE_H
#define BUS_FSLMC_PRIVATE_H
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 27e2de7072..bb943b58b5 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <rte_errno.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_memzone.h>
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index cd0d0b1670..fab3483d9f 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -18,7 +18,7 @@
#include <rte_malloc.h>
#include <rte_vfio.h>
#include <rte_eal.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_tailq.h>
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 0d61d49287..c26aacd364 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -13,7 +13,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
#include <rte_lcore.h>
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 61a868707f..39d702a418 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include <rte_dev.h>
#include <rte_errno.h>
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 4e40a2ed85..fddf49251d 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -8,7 +8,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <rte_os_shim.h>
#include <rte_pci.h>
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 7d78cf93bc..809a8bb08f 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -12,7 +12,7 @@
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_memory.h>
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index 3d233fa83c..e33424675c 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <sys/uio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_log.h>
#include <rte_eal_paging.h>
diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c
index e82cb881bf..73178ce0f3 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -9,7 +9,7 @@
#include <rte_errno.h>
#include <rte_class.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include "mlx5_common_log.h"
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 13cb967f6d..e30dcfc281 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -8,7 +8,7 @@
#include <sys/mman.h>
#include <libgen.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 1a86eb3c00..6553166f5c 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -4,7 +4,7 @@
#include <rte_devargs.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 5d4d52c341..32811403b4 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -11,7 +11,7 @@
#include <ethdev_vdev.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include "failsafe_private.h"
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index 130344dce2..d71b512f81 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -3,7 +3,7 @@
* Copyright 2017 Mellanox Technologies, Ltd
*/
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index efb262e368..4f0a6f4d55 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -19,7 +19,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <bus_auxiliary_driver.h>
#include <rte_common.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 188d92ffac..ccc06bdda6 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -31,7 +31,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 65043a04eb..dc90569df1 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
#include <rte_dev.h>
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 632451dcbe..9cf4d760b4 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -9,7 +9,7 @@
#endif
#include <rte_io.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "virtio_pci.h"
#include "virtio_logs.h"
diff --git a/drivers/raw/ioat/idxd_bus.c b/drivers/raw/ioat/idxd_bus.c
index 539f51b1b1..f32d811055 100644
--- a/drivers/raw/ioat/idxd_bus.c
+++ b/drivers/raw/ioat/idxd_bus.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/mman.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_string_fns.h>
#include "ioat_private.h"
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index cbf382f967..be64d31b0f 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_debug.h>
#include <rte_string_fns.h>
#include <rte_errno.h>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index b6f0392f30..62a598957c 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c
index d5833af373..03e6e59baf 100644
--- a/lib/eal/common/eal_common_devargs.c
+++ b/lib/eal/common/eal_common_devargs.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <stdarg.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index 1614a57752..5202bd5658 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -3,7 +3,7 @@
*/
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_eal.h>
#include <rte_errno.h>
#include <rte_alarm.h>
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
new file mode 100644
index 0000000000..d2e615a736
--- /dev/null
+++ b/lib/eal/include/bus_driver.h
@@ -0,0 +1,296 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef BUS_DRIVER_H
+#define BUS_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bus.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
+#include <rte_eal.h>
+#include <rte_tailq.h>
+
+struct rte_devargs;
+struct rte_device;
+
+/** Double linked list of buses */
+RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
+
+/**
+ * Bus specific scan for devices attached on the bus.
+ * For each bus object, the scan would be responsible for finding devices and
+ * adding them to its private device list.
+ *
+ * A bus should mandatorily implement this method.
+ *
+ * @return
+ * 0 for successful scan
+ * <0 for unsuccessful scan with error value
+ */
+typedef int (*rte_bus_scan_t)(void);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * This is called while iterating over each registered bus.
+ *
+ * @return
+ * 0 for successful probe
+ * !0 for any error while probing
+ */
+typedef int (*rte_bus_probe_t)(void);
+
+/**
+ * Device iterator to find a device on a bus.
+ *
+ * This function returns an rte_device if one of those held by the bus
+ * matches the data passed as parameter.
+ *
+ * If the comparison function returns zero this function should stop iterating
+ * over any more devices. To continue a search the device of a previous search
+ * can be passed via the start parameter.
+ *
+ * @param cmp
+ * Comparison function.
+ *
+ * @param data
+ * Data to compare each device against.
+ *
+ * @param start
+ * starting point for the iteration
+ *
+ * @return
+ * The first device matching the data, NULL if none exists.
+ */
+typedef struct rte_device *
+(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
+ const void *data);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_plug_t)(struct rte_device *dev);
+
+/**
+ * Implementation specific remove function which is responsible for unlinking
+ * devices on that bus from assigned driver.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
+
+/**
+ * Bus specific parsing function.
+ * Validates the syntax used in the textual representation of a device,
+ * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
+ * device representation to ``addr``.
+ *
+ * @param[in] name
+ * device textual description
+ *
+ * @param[out] addr
+ * device information location address, into which parsed info
+ * should be written. If NULL, nothing should be written, which
+ * is not an error.
+ *
+ * @return
+ * 0 if parsing was successful.
+ * !0 for any error.
+ */
+typedef int (*rte_bus_parse_t)(const char *name, void *addr);
+
+/**
+ * Parse bus part of the device arguments.
+ *
+ * The field name of the struct rte_devargs will be set.
+ *
+ * @param da
+ * Pointer to the devargs to parse.
+ *
+ * @return
+ * 0 on successful parsing, otherwise rte_errno is set.
+ * -EINVAL: on parsing error.
+ * -ENODEV: if no key matching a device argument is specified.
+ * -E2BIG: device name is too long.
+ */
+typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
+
+/**
+ * Device level DMA map function.
+ * After a successful call, the memory segment will be mapped to the
+ * given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to map.
+ * @param iova
+ * IOVA address to map.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Device level DMA unmap function.
+ * After a successful call, the memory segment will no longer be
+ * accessible by the given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to unmap.
+ * @param iova
+ * IOVA address to unmap.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if un-mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Implement a specific hot-unplug handler, which is responsible for
+ * handle the failure when device be hot-unplugged. When the event of
+ * hot-unplug be detected, it could call this function to handle
+ * the hot-unplug failure and avoid app crash.
+ * @param dev
+ * Pointer of the device structure.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
+
+/**
+ * Implement a specific sigbus handler, which is responsible for handling
+ * the sigbus error which is either original memory error, or specific memory
+ * error that caused of device be hot-unplugged. When sigbus error be captured,
+ * it could call this function to handle sigbus error.
+ * @param failure_addr
+ * Pointer of the fault address of the sigbus error.
+ *
+ * @return
+ * 0 for success handle the sigbus for hot-unplug.
+ * 1 for not process it, because it is a generic sigbus error.
+ * -1 for failed to handle the sigbus for hot-unplug.
+ */
+typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
+
+/**
+ * Bus scan policies
+ */
+enum rte_bus_scan_mode {
+ RTE_BUS_SCAN_UNDEFINED,
+ RTE_BUS_SCAN_ALLOWLIST,
+ RTE_BUS_SCAN_BLOCKLIST,
+};
+
+/**
+ * A structure used to configure bus operations.
+ */
+struct rte_bus_conf {
+ enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
+};
+
+
+/**
+ * Get common iommu class of the all the devices on the bus. The bus may
+ * check that those devices are attached to iommu driver.
+ * If no devices are attached to the bus. The bus may return with don't care
+ * (_DC) value.
+ * Otherwise, The bus will return appropriate _pa or _va iova mode.
+ *
+ * @return
+ * enum rte_iova_mode value.
+ */
+typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
+
+/**
+ * A structure describing a generic bus.
+ */
+struct rte_bus {
+ RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
+ const char *name; /**< Name of the bus */
+ rte_bus_scan_t scan; /**< Scan for devices attached to bus */
+ rte_bus_probe_t probe; /**< Probe devices on bus */
+ rte_bus_find_device_t find_device; /**< Find a device on the bus */
+ rte_bus_plug_t plug; /**< Probe single device for drivers */
+ rte_bus_unplug_t unplug; /**< Remove single device from driver */
+ rte_bus_parse_t parse; /**< Parse a device name */
+ rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
+ rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
+ rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
+ struct rte_bus_conf conf; /**< Bus configuration */
+ rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
+ rte_dev_iterate_t dev_iterate; /**< Device iterator. */
+ rte_bus_hot_unplug_handler_t hot_unplug_handler;
+ /**< handle hot-unplug failure on the bus */
+ rte_bus_sigbus_handler_t sigbus_handler;
+ /**< handle sigbus error on the bus */
+};
+
+/**
+ * Register a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be registered.
+ */
+__rte_internal
+void rte_bus_register(struct rte_bus *bus);
+
+/**
+ * Helper for Bus registration.
+ * The constructor has higher priority than PMD constructors.
+ */
+#define RTE_REGISTER_BUS(nm, bus) \
+RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
+{\
+ (bus).name = RTE_STR(nm);\
+ rte_bus_register(&bus); \
+}
+
+/**
+ * Unregister a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be unregistered.
+ */
+__rte_internal
+void rte_bus_unregister(struct rte_bus *bus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BUS_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index fd6e844224..77d8621a51 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -55,6 +55,10 @@ headers += files(
'rte_vfio.h',
)
+driver_sdk_headers = files(
+ 'bus_driver.h',
+)
+
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'generic/rte_atomic.h',
diff --git a/lib/eal/include/rte_bus.h b/lib/eal/include/rte_bus.h
index 3848b44db0..dfe756fb11 100644
--- a/lib/eal/include/rte_bus.h
+++ b/lib/eal/include/rte_bus.h
@@ -20,284 +20,21 @@ extern "C" {
#include <stdio.h>
-#include <rte_dev.h>
#include <rte_eal.h>
-#include <rte_log.h>
-/** Double linked list of buses */
-RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
-
-/**
- * Bus specific scan for devices attached on the bus.
- * For each bus object, the scan would be responsible for finding devices and
- * adding them to its private device list.
- *
- * A bus should mandatorily implement this method.
- *
- * @return
- * 0 for successful scan
- * <0 for unsuccessful scan with error value
- */
-typedef int (*rte_bus_scan_t)(void);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * This is called while iterating over each registered bus.
- *
- * @return
- * 0 for successful probe
- * !0 for any error while probing
- */
-typedef int (*rte_bus_probe_t)(void);
-
-/**
- * Device iterator to find a device on a bus.
- *
- * This function returns an rte_device if one of those held by the bus
- * matches the data passed as parameter.
- *
- * If the comparison function returns zero this function should stop iterating
- * over any more devices. To continue a search the device of a previous search
- * can be passed via the start parameter.
- *
- * @param cmp
- * Comparison function.
- *
- * @param data
- * Data to compare each device against.
- *
- * @param start
- * starting point for the iteration
- *
- * @return
- * The first device matching the data, NULL if none exists.
- */
-typedef struct rte_device *
-(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
- const void *data);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_plug_t)(struct rte_device *dev);
-
-/**
- * Implementation specific remove function which is responsible for unlinking
- * devices on that bus from assigned driver.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
-
-/**
- * Bus specific parsing function.
- * Validates the syntax used in the textual representation of a device,
- * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
- * device representation to ``addr``.
- *
- * @param[in] name
- * device textual description
- *
- * @param[out] addr
- * device information location address, into which parsed info
- * should be written. If NULL, nothing should be written, which
- * is not an error.
- *
- * @return
- * 0 if parsing was successful.
- * !0 for any error.
- */
-typedef int (*rte_bus_parse_t)(const char *name, void *addr);
-
-/**
- * Parse bus part of the device arguments.
- *
- * The field name of the struct rte_devargs will be set.
- *
- * @param da
- * Pointer to the devargs to parse.
- *
- * @return
- * 0 on successful parsing, otherwise rte_errno is set.
- * -EINVAL: on parsing error.
- * -ENODEV: if no key matching a device argument is specified.
- * -E2BIG: device name is too long.
- */
-typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
-
-/**
- * Device level DMA map function.
- * After a successful call, the memory segment will be mapped to the
- * given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to map.
- * @param iova
- * IOVA address to map.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Device level DMA unmap function.
- * After a successful call, the memory segment will no longer be
- * accessible by the given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to unmap.
- * @param iova
- * IOVA address to unmap.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if un-mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Implement a specific hot-unplug handler, which is responsible for
- * handle the failure when device be hot-unplugged. When the event of
- * hot-unplug be detected, it could call this function to handle
- * the hot-unplug failure and avoid app crash.
- * @param dev
- * Pointer of the device structure.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
-
-/**
- * Implement a specific sigbus handler, which is responsible for handling
- * the sigbus error which is either original memory error, or specific memory
- * error that caused of device be hot-unplugged. When sigbus error be captured,
- * it could call this function to handle sigbus error.
- * @param failure_addr
- * Pointer of the fault address of the sigbus error.
- *
- * @return
- * 0 for success handle the sigbus for hot-unplug.
- * 1 for not process it, because it is a generic sigbus error.
- * -1 for failed to handle the sigbus for hot-unplug.
- */
-typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
-
-/**
- * Bus scan policies
- */
-enum rte_bus_scan_mode {
- RTE_BUS_SCAN_UNDEFINED,
- RTE_BUS_SCAN_ALLOWLIST,
- RTE_BUS_SCAN_BLOCKLIST,
-};
-
-/**
- * A structure used to configure bus operations.
- */
-struct rte_bus_conf {
- enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
-};
-
-
-/**
- * Get common iommu class of the all the devices on the bus. The bus may
- * check that those devices are attached to iommu driver.
- * If no devices are attached to the bus. The bus may return with don't care
- * (_DC) value.
- * Otherwise, The bus will return appropriate _pa or _va iova mode.
- *
- * @return
- * enum rte_iova_mode value.
- */
-typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
-
-
-/**
- * A structure describing a generic bus.
- */
-struct rte_bus {
- RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
- const char *name; /**< Name of the bus */
- rte_bus_scan_t scan; /**< Scan for devices attached to bus */
- rte_bus_probe_t probe; /**< Probe devices on bus */
- rte_bus_find_device_t find_device; /**< Find a device on the bus */
- rte_bus_plug_t plug; /**< Probe single device for drivers */
- rte_bus_unplug_t unplug; /**< Remove single device from driver */
- rte_bus_parse_t parse; /**< Parse a device name */
- rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
- rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
- rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
- struct rte_bus_conf conf; /**< Bus configuration */
- rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
- rte_dev_iterate_t dev_iterate; /**< Device iterator. */
- rte_bus_hot_unplug_handler_t hot_unplug_handler;
- /**< handle hot-unplug failure on the bus */
- rte_bus_sigbus_handler_t sigbus_handler;
- /**< handle sigbus error on the bus */
-
-};
+struct rte_bus;
+struct rte_device;
/**
* Retrieve a bus name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param bus
* A pointer to a rte_bus structure.
* @return
* A pointer to the bus name string.
*/
-__rte_experimental
const char *rte_bus_name(const struct rte_bus *bus);
-/**
- * Register a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be registered.
- */
-void rte_bus_register(struct rte_bus *bus);
-
-/**
- * Unregister a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be unregistered.
- */
-void rte_bus_unregister(struct rte_bus *bus);
-
/**
* Scan all the buses.
*
@@ -387,17 +124,6 @@ struct rte_bus *rte_bus_find_by_name(const char *busname);
*/
enum rte_iova_mode rte_bus_get_iommu_class(void);
-/**
- * Helper for Bus registration.
- * The constructor has higher priority than PMD constructors.
- */
-#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
-{\
- (bus).name = RTE_STR(nm);\
- rte_bus_register(&bus); \
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 02ae1cde29..098a2c3076 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -13,7 +13,7 @@
#include <rte_dev.h>
#include <rte_interrupts.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_errno.h>
diff --git a/lib/eal/version.map b/lib/eal/version.map
index aa53064db1..6ec15f1147 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -12,10 +12,9 @@ DPDK_23 {
rte_bus_find_by_device;
rte_bus_find_by_name;
rte_bus_get_iommu_class;
+ rte_bus_name;
rte_bus_probe;
- rte_bus_register;
rte_bus_scan;
- rte_bus_unregister;
rte_calloc;
rte_calloc_socket;
rte_cpu_get_flag_enabled;
@@ -424,14 +423,13 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_bus_name;
};
INTERNAL {
global:
+ rte_bus_register;
+ rte_bus_unregister;
rte_eal_get_baseaddr;
rte_firmware_read;
rte_intr_allow_others;
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 9e358d187a..0c2c1088c0 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_interrupts.h>
#include <rte_memcpy.h>
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 5b079cd14a..72aabd4dd0 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -11,7 +11,7 @@
#include <time.h>
#include <unistd.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_dev.h>
--
2.37.2
^ permalink raw reply [relevance 3%]
* [PATCH v4 23/27] dev: hide driver object
2022-08-26 12:41 1% ` [PATCH v4 00/27] " David Marchand
2022-08-26 12:41 4% ` [PATCH v4 03/27] raw/ifpga: remove PCI bus accessor David Marchand
2022-08-26 12:42 3% ` [PATCH v4 21/27] bus: hide bus object David Marchand
@ 2022-08-26 12:42 1% ` David Marchand
2022-08-26 12:42 2% ` [PATCH v4 27/27] dev: hide device object David Marchand
3 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-08-26 12:42 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, Jay Jayatheerthan, Ajit Khaparde,
Nicolas Chautru, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Stephen Hemminger, Long Li, Fan Zhang,
Sunila Sahu, Ashish Gupta, Raveendra Padasalagi, Vikas Gupta,
Chandubabu Namburu, Ankur Dwivedi, Anoob Joseph, Tejasree Kondoj,
Gagandeep Singh, Kevin Laatz, Timothy McDaniel, Jerin Jacob,
Elena Agostini, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck,
John Miller, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Rahul Lakkireddy, Simei Su,
Wenjun Wu, Marcin Wojtas, Michal Krawczyk, Shai Brandes,
Evgeny Schemeilin, Igor Chauskin, John Daley, Hyong Youb Kim,
Gaetan Rivet, Xiao Wang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Matan Azrad, Viacheslav Ovsiienko, Chaoyong He,
Niklas Soderlund, Harman Kalra, Devendra Singh Rawat,
Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Ori Kam,
Akhil Goyal, Chengwen Feng, Ray Kinsella, Ferruh Yigit,
Abhinandan Gujjar, Olivier Matz, Reshma Pattan
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 2 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/bus_auxiliary_driver.h | 2 +-
drivers/bus/dpaa/bus_dpaa_driver.h | 2 +-
drivers/bus/fslmc/bus_fslmc_driver.h | 2 +-
drivers/bus/fslmc/fslmc_vfio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 2 +-
drivers/bus/pci/bus_pci_driver.h | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/vdev/bus_vdev_driver.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 2 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 1 +
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 2 +-
drivers/event/dpaa/dpaa_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +-
drivers/event/octeontx/ssovf_evdev.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 2 +-
drivers/gpu/cuda/cuda.c | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 2 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 2 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 2 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/ena/ena_ethdev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 2 +-
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/netvsc/hn_nvs.c | 2 +-
drivers/net/netvsc/hn_rndis.c | 2 +-
drivers/net/netvsc/hn_rxtx.c | 2 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
lib/compressdev/rte_compressdev.c | 2 +-
lib/compressdev/rte_compressdev_pmd.c | 2 +-
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +-
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 2 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/include/dev_driver.h | 28 +++++++++++++++++++
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_dev.h | 15 ++--------
lib/eal/version.map | 4 +--
lib/ethdev/ethdev_driver.h | 1 +
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 2 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
lib/eventdev/rte_eventdev.c | 2 +-
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
lib/rawdev/rte_rawdev.c | 2 +-
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/security/rte_security.c | 2 +-
115 files changed, 144 insertions(+), 122 deletions(-)
create mode 100644 lib/eal/include/dev_driver.h
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 36df0ccf93..4e20345b7a 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -98,6 +98,8 @@ API Changes
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
headers (see ``enable_driver_sdk`` meson option).
+ The ``rte_driver`` object is now opaque and must be manipulated through added
+ accessors.
* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 801e8920df..e2d9409185 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_byteorder.h>
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index c1d877c87f..51dd090c1b 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index f16814e241..036579e3ec 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index a889e392c6..e4c7ee0c3b 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <bus_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/bus_auxiliary_driver.h b/drivers/bus/auxiliary/bus_auxiliary_driver.h
index 1c2d2c04af..58fb7c7f69 100644
--- a/drivers/bus/auxiliary/bus_auxiliary_driver.h
+++ b/drivers/bus/auxiliary/bus_auxiliary_driver.h
@@ -25,7 +25,7 @@ extern "C" {
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#define RTE_BUS_AUXILIARY_NAME "auxiliary"
diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
index cf66fc0c53..26a83b2cdf 100644
--- a/drivers/bus/dpaa/bus_dpaa_driver.h
+++ b/drivers/bus/dpaa/bus_dpaa_driver.h
@@ -7,7 +7,7 @@
#define BUS_DPAA_DRIVER_H
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_mbuf_dyn.h>
#include <rte_mempool.h>
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 798ddebf3a..7ac5fe6ff1 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -29,7 +29,7 @@ extern "C" {
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 8604e43947..5966776a85 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -28,7 +28,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal_memconfig.h>
#include "private.h"
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index cfe4280f87..d7f6e45b7d 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -18,7 +18,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_mbuf_pool_ops.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
index b7d81b518c..07256ed7ec 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <fslmc_logs.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 071b0d297d..4aec7b2cd8 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -30,7 +30,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
index 223e34bcba..65e2d799c3 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
@@ -10,7 +10,7 @@
#include <errno.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "private.h"
#include <fslmc_logs.h>
diff --git a/drivers/bus/pci/bus_pci_driver.h b/drivers/bus/pci/bus_pci_driver.h
index b5c7dee617..0f2f9b5101 100644
--- a/drivers/bus/pci/bus_pci_driver.h
+++ b/drivers/bus/pci/bus_pci_driver.h
@@ -11,7 +11,7 @@ extern "C" {
#endif
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_compat.h>
/** Pathname of PCI devices directory. */
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 39d702a418..d24cc201b8 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -6,7 +6,7 @@
#include <bus_driver.h>
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
index 36748cdfae..bc7e30d7c6 100644
--- a/drivers/bus/vdev/bus_vdev_driver.h
+++ b/drivers/bus/vdev/bus_vdev_driver.h
@@ -11,7 +11,7 @@ extern "C" {
#include <rte_bus_vdev.h>
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
struct rte_vdev_device {
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 809a8bb08f..b176b658fc 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -11,7 +11,7 @@
#include <sys/queue.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
index 2c72614776..2d10a1e8ad 100644
--- a/drivers/bus/vdev/vdev_params.c
+++ b/drivers/bus/vdev/vdev_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include <rte_errno.h>
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index 3424e791c9..e2475a642d 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -12,7 +12,7 @@ extern "C" {
#include <rte_bus_vmbus.h>
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
struct vmbus_channel;
struct vmbus_mon_page;
diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev/qat_dev_gen4.c
index 7ffde5f4c8..85d6ddfcf4 100644
--- a/drivers/common/qat/dev/qat_dev_gen4.c
+++ b/drivers/common/qat/dev/qat_dev_gen4.c
@@ -2,7 +2,7 @@
* Copyright(c) 2021 Intel Corporation
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "qat_device.h"
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 5916e745e2..9cbd19a481 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -4,7 +4,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_pci.h>
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 7d657d81bc..445a3baa67 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
index 61d457f4e0..d1ede5e990 100644
--- a/drivers/crypto/bcmfs/bcmfs_qp.c
+++ b/drivers/crypto/bcmfs/bcmfs_qp.c
@@ -8,7 +8,7 @@
#include <rte_atomic.h>
#include <rte_bitmap.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_prefetch.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index bc7fb67218..78272d616c 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -4,7 +4,7 @@
*/
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_malloc.h>
#include <cryptodev_pmd.h>
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 6c3e45e333..013f3be1e6 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -9,7 +9,7 @@
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include "ccp_crypto.h"
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index 3fd9f3c426..db11ac7444 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn10k_cryptodev.h"
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index bd425f95ff..4cfc1f2150 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn9k_cryptodev.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 0cce861899..3b13578de0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <cryptodev_pmd.h>
#include <rte_common.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 7e554cb2b1..c6bd785262 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -19,7 +19,7 @@
#include <rte_security_driver.h>
#endif
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_io.h>
#include <rte_ip.h>
#include <rte_kvargs.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 83ae6b6be9..11b559e025 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -5,7 +5,7 @@
#include <rte_common.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_reorder.h>
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index e30dcfc281..9b7b16c6e3 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -9,6 +9,7 @@
#include <libgen.h>
#include <bus_driver.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 5a443acff8..759578378f 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -17,7 +17,7 @@
#include <rte_config.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_eventdev.h>
#include <eventdev_pmd.h>
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index 9f8c6cd8b8..71ac141b66 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -15,7 +15,7 @@
#include <rte_debug.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
#include <rte_ring.h>
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index aa403f9e06..8e470584ea 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_log.h>
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 08df6e223a..1001297cda 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <bus_fslmc_driver.h>
#include <rte_lcore.h>
diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
index 3882a9cf1d..a68d3ac154 100644
--- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c
+++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index fe157c59d5..99fa326ad5 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -7,7 +7,7 @@
#include <rte_common.h>
#include <cryptodev_pmd.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <ethdev_driver.h>
#include <rte_event_eth_rx_adapter.h>
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index 6bd8fec6d4..8513b9a013 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_log.h>
#include <rte_malloc.h>
diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index 2be7b8d2df..a552aabeb8 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -8,7 +8,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <gpudev_driver.h>
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 56c629c681..84371d5d1a 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -20,7 +20,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dpaa2_mempool.h"
#include "fslmc_vfio.h"
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index fd7be47311..9957de2314 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -24,7 +24,7 @@
#include <rte_string_fns.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <rte_lcore.h>
diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
index 748db590c1..71d0b53e03 100644
--- a/drivers/net/ark/ark_global.h
+++ b/drivers/net/ark/ark_global.h
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_version.h>
#include "ark_pktdir.h"
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 7c0cb666fb..b2a08f5635 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_cycles.h>
#include <rte_spinlock.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_io.h>
diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index b9ebf64fb8..a5d11c5832 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -33,7 +33,7 @@
#include <rte_memzone.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_pci.h>
#include <rte_common.h>
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index f36ad30e17..4448cf2de2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -9,7 +9,7 @@
#include "bnx2x_rxtx.h"
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_pci.h>
#include <rte_alarm.h>
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e275d3a53f..1460dce2ab 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6,7 +6,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_malloc.h>
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 77ecbef04c..fd1506ddd4 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -7,7 +7,7 @@
#include <stdbool.h>
#include <unistd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_cycles.h>
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 384080e6d3..bed755f5d9 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -18,7 +18,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_byteorder.h>
#include "common.h"
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index fd71a50a58..45bbeaef0c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -31,7 +31,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "cxgbe.h"
#include "cxgbe_pfvf.h"
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 3c02c98b3d..f8dd833032 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -31,7 +31,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "base/common.h"
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5d91355c9a..5b13cb5c94 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -30,7 +30,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/common.h"
#include "base/t4_regs.h"
diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index 9509f6e8a3..4d33b51fea 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <dpaa2_pmd_logs.h>
#include <dpaa2_hw_pvt.h>
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index f876f4790c..37a8b43114 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
#include "rte_dpaa2_mempool.h"
diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
index 932570c6e0..fbfdf360d1 100644
--- a/drivers/net/dpaa2/dpaa2_recycle.c
+++ b/drivers/net/dpaa2/dpaa2_recycle.c
@@ -14,7 +14,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 7b9c528d13..9436a95ac8 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -13,7 +13,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hexdump.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
index ba0d500f74..63463c4fbf 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.c
+++ b/drivers/net/dpaa2/dpaa2_sparser.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 409de50083..8ee9be12ad 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 43979992d3..d6bcc5bf58 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index e46697b6a1..b775310651 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -21,7 +21,7 @@
#include <rte_eal.h>
#include <rte_atomic.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index 4709675af8..4d27fba585 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -14,7 +14,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_timer.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include "ena_com.h"
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 998436e5e8..cdf0915591 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdint.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 7312c411bd..46f85964e9 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -7,7 +7,7 @@
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index a80f5e2caf..53a451c1b1 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -11,7 +11,7 @@
#include <pthread.h>
#include <rte_atomic.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_devargs.h>
#include <rte_flow.h>
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..7adb20bff9 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_spinlock.h>
#include <rte_kvargs.h>
#include <rte_vect.h>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7bdc453ec1..67111ac251 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -23,7 +23,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_alarm.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_hash_crc.h>
#include <rte_bitmap.h>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 506fcff6e3..ef2ab06475 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -24,7 +24,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 21bd1e2193..15f695682d 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -19,7 +19,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 885d58c0f4..1c3d22ae0f 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -21,7 +21,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "ice_dcf.h"
#include "ice_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 0da267db1f..dee712af98 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -18,7 +18,7 @@
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <iavf_devids.h>
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 552e41692c..04c9ce78a2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#ifdef RTE_LIB_SECURITY
#include <rte_security_driver.h>
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 368342872a..67373a7b78 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -27,7 +27,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 910b76a92c..7e7e1824ef 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -31,7 +31,7 @@
#endif
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index ccc06bdda6..d0bbc0a4c0 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -30,7 +30,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 817fb06dfb..7db82af9f3 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -28,7 +28,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 20f75a17b0..e6f1f28768 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -26,7 +26,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 61cf374224..bc6f60c64a 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -25,7 +25,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include <bus_vmbus_driver.h>
#include <rte_spinlock.h>
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 0e55f0c792..eaafe11fb9 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -19,7 +19,7 @@
#include <rte_debug.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 5cdd34e588..47359501bc 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_common.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 9ada22e2ff..0eee191566 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -15,7 +15,7 @@
#include <bus_vdev_driver.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a38b701183..b781bcdcfd 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -13,7 +13,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ip.h>
/* ecore includes */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 506c62a726..2ec743ebce 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -7,7 +7,7 @@
* for Solarflare) and Solarflare Communications, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index 81f5aa3cc4..3ae5023b6f 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -2,7 +2,7 @@
*
* Copyright(c) 2021 Xilinx, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_bitmap.h>
#include "sfc.h"
diff --git a/drivers/net/sfc/sfc_sw_stats.h b/drivers/net/sfc/sfc_sw_stats.h
index 1abded8018..d9738e5214 100644
--- a/drivers/net/sfc/sfc_sw_stats.h
+++ b/drivers/net/sfc/sfc_sw_stats.h
@@ -5,7 +5,7 @@
#ifndef _SFC_SW_STATS_H
#define _SFC_SW_STATS_H
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "sfc.h"
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 28183ec740..9f57cb1a20 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index dc90569df1..c3e045d892 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -27,7 +27,7 @@
#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d180162abd..edf3becd32 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -24,7 +24,7 @@
#include <rte_memory.h>
#include <rte_eal_paging.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c
index 2b9e35cef5..abc63b0935 100644
--- a/drivers/net/virtio/virtio_pci_ethdev.c
+++ b/drivers/net/virtio/virtio_pci_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "virtio.h"
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 101b1cb500..fd946dec5c 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/vmxnet3_defs.h"
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index db029cbf34..909fb8faab 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -3,7 +3,7 @@
*/
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_pci.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 6831cc8d20..5dd5bbb652 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -13,7 +13,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_kvargs.h>
#include <rte_log.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index fc257c5f44..8ef7a6b127 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -6,7 +6,7 @@
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_rawdev.h>
#include <bus_vdev_driver.h>
#include <rte_test.h>
diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
index 6ab62a12fc..92cf5f495e 100644
--- a/drivers/regex/mlx5/mlx5_regex_control.c
+++ b/drivers/regex/mlx5/mlx5_regex_control.c
@@ -11,7 +11,7 @@
#include <rte_regexdev.h>
#include <rte_regexdev_core.h>
#include <rte_regexdev_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <mlx5_common.h>
#include <mlx5_glue.h>
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index e997bd01ed..cf2c20a704 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -8,7 +8,7 @@
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_memzone.h>
diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 9bfae077db..41f1415bea 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -5,7 +5,7 @@
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include "rte_compressdev_internal.h"
diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
index 9fabc399c5..72e52f876f 100644
--- a/lib/compressdev/rte_compressdev_pmd.h
+++ b/lib/compressdev/rte_compressdev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include "rte_compressdev.h"
#include "rte_compressdev_internal.h"
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 75d0075b86..f07b92dfd7 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 3dcc3cb7ed..96d7e225b0 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 6250302f3b..29c9c55131 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -13,7 +13,7 @@
#include <rte_log.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
index 82ab7a8cc7..acd7f71cd1 100644
--- a/lib/dmadev/rte_dmadev_pmd.h
+++ b/lib/dmadev/rte_dmadev_pmd.h
@@ -14,7 +14,7 @@
* by any application.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dmadev.h"
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 16c5aef1d8..98f3c78795 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -9,7 +9,7 @@
#include <bus_driver.h>
#include <rte_class.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_errno.h>
#include <rte_log.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
new file mode 100644
index 0000000000..015188abd5
--- /dev/null
+++ b/lib/eal/include/dev_driver.h
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef DEV_DRIVER_H
+#define DEV_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include <rte_dev.h>
+
+/**
+ * A structure describing a device driver.
+ */
+struct rte_driver {
+ RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
+ const char *name; /**< Driver name. */
+ const char *alias; /**< Driver alias. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEV_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index 77d8621a51..cfcd40aaed 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -57,6 +57,7 @@ headers += files(
driver_sdk_headers = files(
'bus_driver.h',
+ 'dev_driver.h',
)
# special case install the generic headers, since they go in a subdir
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index ddea163cca..7214f5d7fb 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -24,6 +24,8 @@ extern "C" {
#include <rte_compat.h>
#include <rte_log.h>
+struct rte_driver;
+
/**
* The device event type.
*/
@@ -67,27 +69,14 @@ struct rte_mem_resource {
void *addr; /**< Virtual address, NULL when not mapped. */
};
-/**
- * A structure describing a device driver.
- */
-struct rte_driver {
- RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
- const char *name; /**< Driver name. */
- const char *alias; /**< Driver alias. */
-};
-
/**
* Retrieve a driver name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param driver
* A pointer to a driver structure.
* @return
* A pointer to the driver name string.
*/
-__rte_experimental
const char *
rte_driver_name(const struct rte_driver *driver);
diff --git a/lib/eal/version.map b/lib/eal/version.map
index d10fd89458..8b53a1d258 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -37,6 +37,7 @@ DPDK_23 {
rte_devargs_parsef;
rte_devargs_remove;
rte_devargs_type_count;
+ rte_driver_name;
rte_dump_physmem_layout;
rte_dump_stack;
rte_dump_tailq;
@@ -423,9 +424,6 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_driver_name;
};
INTERNAL {
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 5101868ea7..47a55a419e 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -19,6 +19,7 @@ extern "C" {
*
*/
+#include <dev_driver.h>
#include <rte_ethdev.h>
/**
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 69402668d8..def6cd0876 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -22,7 +22,7 @@ extern "C" {
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_config.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 4938b4ee07..a8ef5bac06 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdbool.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 8e81cf774d..29515401bd 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -9,7 +9,7 @@
#include <rte_cycles.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <rte_log.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 79b905e9fc..bbb027aa0c 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_common.h>
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index 0e55b00bfe..23972b3dbd 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_gpudev.h"
diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
index ac32c4bb72..3b43edc548 100644
--- a/lib/mempool/rte_mempool_ops.c
+++ b/lib/mempool/rte_mempool_ops.c
@@ -9,7 +9,7 @@
#include <rte_string_fns.h>
#include <rte_mempool.h>
#include <rte_errno.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_mempool_trace.h"
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 72aabd4dd0..af2b814251 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -14,7 +14,7 @@
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index e157d65332..569e836560 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
#include <rte_telemetry.h>
diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
index 3b7be57d3e..a51944c8ff 100644
--- a/lib/rawdev/rte_rawdev_pmd.h
+++ b/lib/rawdev/rte_rawdev_pmd.h
@@ -19,7 +19,7 @@ extern "C" {
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
index 1a2a408f0e..94160f4177 100644
--- a/lib/security/rte_security.c
+++ b/lib/security/rte_security.c
@@ -5,7 +5,7 @@
*/
#include <rte_cryptodev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_telemetry.h>
#include "rte_security.h"
#include "rte_security_driver.h"
--
2.37.2
^ permalink raw reply [relevance 1%]
* [PATCH v4 27/27] dev: hide device object
2022-08-26 12:41 1% ` [PATCH v4 00/27] " David Marchand
` (2 preceding siblings ...)
2022-08-26 12:42 1% ` [PATCH v4 23/27] dev: hide driver object David Marchand
@ 2022-08-26 12:42 2% ` David Marchand
3 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-08-26 12:42 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, Ray Kinsella, Maxime Coquelin, Chenbo Xia
Make rte_device opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Some applications may have been dereferencing rte_device objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
---
doc/guides/rel_notes/deprecation.rst | 7 -----
doc/guides/rel_notes/release_22_11.rst | 4 +--
lib/eal/common/eal_private.h | 2 +-
lib/eal/include/dev_driver.h | 13 +++++++++
lib/eal/include/rte_dev.h | 37 --------------------------
lib/eal/version.map | 14 +++++-----
lib/vhost/vdpa.c | 1 +
7 files changed, 23 insertions(+), 55 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 98a00da385..64668500c7 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -47,13 +47,6 @@ Deprecation Notices
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
-* drivers: As a follow-up of the work on the ``rte_bus`` object,
- the ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
- their bus-specific counterparts) will be made opaque in DPDK 22.11.
- Registering a driver on a bus will be marked as an internal API:
- external users may still register their drivers using the bus-specific
- driver header (see ``enable_driver_sdk`` meson option).
-
* bus: The ``dev->device.numa_node`` field is set by each bus driver for
every device it manages to indicate on which NUMA node this device lies.
When this information is unknown, the assigned value is not consistent
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 4e20345b7a..43502349bd 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -98,8 +98,8 @@ API Changes
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
headers (see ``enable_driver_sdk`` meson option).
- The ``rte_driver`` object is now opaque and must be manipulated through added
- accessors.
+ The ``rte_driver`` and ``rte_device`` objects are now opaque and must be
+ manipulated through added accessors.
* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
diff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h
index 44d14241f0..3ca9ce2ffc 100644
--- a/lib/eal/common/eal_private.h
+++ b/lib/eal/common/eal_private.h
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_lcore.h>
#include <rte_memory.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
index 015188abd5..5efa8c437e 100644
--- a/lib/eal/include/dev_driver.h
+++ b/lib/eal/include/dev_driver.h
@@ -21,6 +21,19 @@ struct rte_driver {
const char *alias; /**< Driver alias. */
};
+/**
+ * A structure describing a generic device.
+ */
+struct rte_device {
+ RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
+ const char *name; /**< Device name */
+ const char *bus_info; /**< Device bus specific information */
+ const struct rte_driver *driver; /**< Driver assigned after probing */
+ const struct rte_bus *bus; /**< Bus handle assigned on scan */
+ int numa_node; /**< NUMA node connection */
+ struct rte_devargs *devargs; /**< Arguments for latest probing */
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index f010dd6441..dc1acc8953 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -86,90 +86,66 @@ rte_driver_name(const struct rte_driver *driver);
/**
* Retrieve a device bus.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device bus.
*/
-__rte_experimental
const struct rte_bus *
rte_dev_bus(const struct rte_device *dev);
/**
* Retrieve bus specific information for a device.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A string describing this device or NULL if none is available.
*/
-__rte_experimental
const char *
rte_dev_bus_info(const struct rte_device *dev);
/**
* Retrieve a device arguments.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device devargs.
*/
-__rte_experimental
const struct rte_devargs *
rte_dev_devargs(const struct rte_device *dev);
/**
* Retrieve a device driver.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device driver.
*/
-__rte_experimental
const struct rte_driver *
rte_dev_driver(const struct rte_device *dev);
/**
* Retrieve a device name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device name.
*/
-__rte_experimental
const char *
rte_dev_name(const struct rte_device *dev);
/**
* Retrieve a device numa node.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param dev
* A pointer to a device structure.
* @return
* A pointer to this device numa node.
*/
-__rte_experimental
int
rte_dev_numa_node(const struct rte_device *dev);
@@ -179,19 +155,6 @@ rte_dev_numa_node(const struct rte_device *dev);
*/
#define RTE_DEV_NAME_MAX_LEN 64
-/**
- * A structure describing a generic device.
- */
-struct rte_device {
- RTE_TAILQ_ENTRY(rte_device) next; /**< Next device */
- const char *name; /**< Device name */
- const char *bus_info; /**< Device bus specific information */
- const struct rte_driver *driver; /**< Driver assigned after probing */
- const struct rte_bus *bus; /**< Bus handle assigned on scan */
- int numa_node; /**< NUMA node connection */
- struct rte_devargs *devargs; /**< Arguments for latest probing */
-};
-
/**
* Query status of a device.
*
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 0cf321605e..3c14cf2724 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -26,7 +26,13 @@ DPDK_23 {
rte_delay_us_block;
rte_delay_us_callback_register;
rte_delay_us_sleep;
+ rte_dev_bus;
+ rte_dev_bus_info;
+ rte_dev_devargs;
+ rte_dev_driver;
rte_dev_is_probed;
+ rte_dev_name;
+ rte_dev_numa_node;
rte_dev_probe;
rte_dev_remove;
rte_devargs_add;
@@ -424,14 +430,6 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_dev_bus;
- rte_dev_bus_info;
- rte_dev_devargs;
- rte_dev_driver;
- rte_dev_name;
- rte_dev_numa_node;
};
INTERNAL {
diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index a6ca785b29..bb828577cb 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -10,6 +10,7 @@
#include <sys/queue.h>
+#include <dev_driver.h>
#include <rte_class.h>
#include <rte_malloc.h>
#include <rte_spinlock.h>
--
2.37.2
^ permalink raw reply [relevance 2%]
* [PATCH v4 3/4] eal: uninline rte_str_to_size
@ 2022-08-27 11:32 3% ` Dmitry Kozlyuk
0 siblings, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2022-08-27 11:32 UTC (permalink / raw)
To: dev
Cc: Dmitry Kozlyuk, Ray Kinsella, Morten Brørup,
Bruce Richardson, Chengwen Feng
There is no reason for rte_str_to_size() to be inline.
Move the implementation out of <rte_common.h>.
Export it as a stable ABI because it always has been public.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/eal/common/eal_common_string_fns.c | 32 ++++++++++++++++++++++++++
lib/eal/include/rte_common.h | 30 ++----------------------
lib/eal/version.map | 1 +
3 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/lib/eal/common/eal_common_string_fns.c b/lib/eal/common/eal_common_string_fns.c
index 0236ae4023..5fc4ee71dc 100644
--- a/lib/eal/common/eal_common_string_fns.c
+++ b/lib/eal/common/eal_common_string_fns.c
@@ -64,3 +64,35 @@ rte_strscpy(char *dst, const char *src, size_t dsize)
rte_errno = E2BIG;
return -rte_errno;
}
+
+uint64_t
+rte_str_to_size(const char *str)
+{
+ char *endptr;
+ unsigned long long size;
+
+ while (isspace((int)*str))
+ str++;
+ if (*str == '-')
+ return 0;
+
+ errno = 0;
+ size = strtoull(str, &endptr, 0);
+ if (errno)
+ return 0;
+
+ if (*endptr == ' ')
+ endptr++; /* allow 1 space gap */
+
+ switch (*endptr) {
+ case 'G': case 'g':
+ size *= 1024; /* fall-through */
+ case 'M': case 'm':
+ size *= 1024; /* fall-through */
+ case 'K': case 'k':
+ size *= 1024; /* fall-through */
+ default:
+ break;
+ }
+ return size;
+}
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index b65555bac6..86c50c55e0 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -873,34 +873,8 @@ rte_log2_u64(uint64_t v)
* @return
* Number.
*/
-static inline uint64_t
-rte_str_to_size(const char *str)
-{
- char *endptr;
- unsigned long long size;
-
- while (isspace((int)*str))
- str++;
- if (*str == '-')
- return 0;
-
- errno = 0;
- size = strtoull(str, &endptr, 0);
- if (errno)
- return 0;
-
- if (*endptr == ' ')
- endptr++; /* allow 1 space gap */
-
- switch (*endptr){
- case 'G': case 'g': size *= 1024; /* fall-through */
- case 'M': case 'm': size *= 1024; /* fall-through */
- case 'K': case 'k': size *= 1024; /* fall-through */
- default:
- break;
- }
- return size;
-}
+uint64_t
+rte_str_to_size(const char *str);
/**
* Function to terminate the application immediately, printing an error
diff --git a/lib/eal/version.map b/lib/eal/version.map
index 1f293e768b..773b0902c0 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -261,6 +261,7 @@ DPDK_23 {
rte_socket_id;
rte_socket_id_by_idx;
rte_srand;
+ rte_str_to_size;
rte_strerror;
rte_strscpy;
rte_strsplit;
--
2.33.1
^ permalink raw reply [relevance 3%]
* [PATCH 1/3] cryptodev: rework session framework
@ 2022-08-29 16:06 1% ` Fan Zhang
2022-08-29 16:06 3% ` [PATCH 3/3] cryptodev: hide sym session structure Fan Zhang
1 sibling, 0 replies; 200+ results
From: Fan Zhang @ 2022-08-29 16:06 UTC (permalink / raw)
To: dev
Cc: gakhil, maxime.coquelin, chandu, ruifeng.wang, ajit.khaparde,
anoobj, pablo.de.lara.guarch, matan, g.singh, jianjay.zhou,
Fan Zhang
As per current design, rte_cryptodev_sym_session_create() and
rte_cryptodev_sym_session_init() use separate mempool objects
for a single session.
And structure rte_cryptodev_sym_session is not directly used
by the application, it may cause ABI breakage if the structure
is modified in future.
To address these two issues, the rte_cryptodev_sym_session_create
will take one mempool object that the session and session private
data are virtually/physically contiguous, and initializes both
fields. The API rte_cryptodev_sym_session_init is removed.
rte_cryptodev_sym_session_create will now return an opaque session
pointer which will be used by the app and other APIs.
In data path, opaque session pointer is attached to rte_crypto_op
and the PMD can call an internal library API to get the session
private data pointer based on the driver id.
Note: currently single session may be used by different device
drivers, given it is initialized by them. After the change the
session created by one device driver cannot be used or
reinitialized by another driver.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 21 +-
app/test-crypto-perf/cperf_test_latency.c | 6 +-
.../cperf_test_pmd_cyclecount.c | 5 +-
app/test-crypto-perf/cperf_test_throughput.c | 6 +-
app/test-crypto-perf/cperf_test_verify.c | 6 +-
app/test-crypto-perf/main.c | 29 +-
app/test-eventdev/test_perf_common.c | 35 +-
app/test-eventdev/test_perf_common.h | 1 -
app/test/test_cryptodev.c | 298 +++++-------------
app/test/test_cryptodev_blockcipher.c | 16 +-
app/test/test_event_crypto_adapter.c | 35 +-
app/test/test_ipsec.c | 42 +--
drivers/crypto/armv8/rte_armv8_pmd.c | 21 +-
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 32 +-
drivers/crypto/bcmfs/bcmfs_sym_session.c | 38 +--
drivers/crypto/bcmfs/bcmfs_sym_session.h | 3 +-
drivers/crypto/caam_jr/caam_jr.c | 28 +-
drivers/crypto/ccp/ccp_crypto.c | 58 +---
drivers/crypto/ccp/ccp_pmd_ops.c | 32 +-
drivers/crypto/ccp/ccp_pmd_private.h | 2 -
drivers/crypto/ccp/rte_ccp_pmd.c | 29 +-
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 36 +--
drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 31 +-
drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 54 +---
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 14 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 31 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 3 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 37 +--
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 4 +-
drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 34 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 41 ++-
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 48 +--
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 26 +-
drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 4 -
drivers/crypto/ipsec_mb/pmd_kasumi.c | 10 +-
drivers/crypto/ipsec_mb/pmd_snow3g.c | 9 +-
drivers/crypto/ipsec_mb/pmd_zuc.c | 4 -
drivers/crypto/mlx5/mlx5_crypto.c | 26 +-
drivers/crypto/mvsam/rte_mrvl_pmd.c | 8 +-
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 21 +-
drivers/crypto/nitrox/nitrox_sym.c | 39 +--
drivers/crypto/null/null_crypto_pmd.c | 19 +-
drivers/crypto/null/null_crypto_pmd_ops.c | 33 +-
drivers/crypto/null/null_crypto_pmd_private.h | 2 -
.../crypto/octeontx/otx_cryptodev_hw_access.h | 1 -
drivers/crypto/octeontx/otx_cryptodev_ops.c | 67 +---
drivers/crypto/openssl/openssl_pmd_private.h | 2 -
drivers/crypto/openssl/rte_openssl_pmd.c | 24 +-
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 29 +-
drivers/crypto/qat/qat_sym.c | 10 +-
drivers/crypto/qat/qat_sym.h | 4 +-
drivers/crypto/qat/qat_sym_session.c | 40 +--
drivers/crypto/qat/qat_sym_session.h | 6 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 38 +--
drivers/crypto/virtio/virtio_cryptodev.c | 40 +--
drivers/crypto/virtio/virtio_rxtx.c | 3 +-
examples/fips_validation/fips_dev_self_test.c | 30 +-
examples/fips_validation/main.c | 35 +-
examples/ipsec-secgw/ipsec-secgw.c | 10 +-
examples/ipsec-secgw/ipsec.c | 7 +-
examples/l2fwd-crypto/main.c | 54 +---
examples/vhost_crypto/main.c | 16 +-
lib/cryptodev/cryptodev_pmd.h | 28 +-
lib/cryptodev/cryptodev_trace_points.c | 6 -
lib/cryptodev/rte_cryptodev.c | 272 ++++++----------
lib/cryptodev/rte_cryptodev.h | 123 ++------
lib/cryptodev/rte_cryptodev_trace.h | 33 +-
lib/cryptodev/version.map | 6 -
lib/pipeline/rte_table_action.c | 10 +-
lib/vhost/rte_vhost_crypto.h | 3 -
lib/vhost/vhost_crypto.c | 28 +-
71 files changed, 545 insertions(+), 1657 deletions(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index d746d51082..c6f5735bb0 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -912,7 +912,6 @@ cperf_create_session(struct rte_mempool *sess_mp,
&sess_conf, sess_mp, priv_mp);
}
#endif
- sess = rte_cryptodev_sym_session_create(sess_mp);
/*
* cipher only
*/
@@ -937,8 +936,8 @@ cperf_create_session(struct rte_mempool *sess_mp,
cipher_xform.cipher.iv.length = 0;
}
/* create crypto session */
- rte_cryptodev_sym_session_init(dev_id, sess, &cipher_xform,
- priv_mp);
+ sess = rte_cryptodev_sym_session_create(dev_id, &cipher_xform,
+ sess_mp);
/*
* auth only
*/
@@ -965,8 +964,8 @@ cperf_create_session(struct rte_mempool *sess_mp,
auth_xform.auth.iv.length = 0;
}
/* create crypto session */
- rte_cryptodev_sym_session_init(dev_id, sess, &auth_xform,
- priv_mp);
+ sess = rte_cryptodev_sym_session_create(dev_id, &auth_xform,
+ sess_mp);
/*
* cipher and auth
*/
@@ -1024,13 +1023,13 @@ cperf_create_session(struct rte_mempool *sess_mp,
if (options->op_type == CPERF_CIPHER_THEN_AUTH) {
cipher_xform.next = &auth_xform;
/* create crypto session */
- rte_cryptodev_sym_session_init(dev_id,
- sess, &cipher_xform, priv_mp);
+ sess = rte_cryptodev_sym_session_create(dev_id,
+ &cipher_xform, sess_mp);
} else { /* auth then cipher */
auth_xform.next = &cipher_xform;
/* create crypto session */
- rte_cryptodev_sym_session_init(dev_id,
- sess, &auth_xform, priv_mp);
+ sess = rte_cryptodev_sym_session_create(dev_id,
+ &auth_xform, sess_mp);
}
} else { /* options->op_type == CPERF_AEAD */
aead_xform.type = RTE_CRYPTO_SYM_XFORM_AEAD;
@@ -1050,8 +1049,8 @@ cperf_create_session(struct rte_mempool *sess_mp,
options->aead_aad_sz;
/* Create crypto session */
- rte_cryptodev_sym_session_init(dev_id,
- sess, &aead_xform, priv_mp);
+ sess = rte_cryptodev_sym_session_create(dev_id, &aead_xform,
+ sess_mp);
}
return sess;
diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 6f972cea49..afd8cb209b 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -44,10 +44,8 @@ static void
cperf_latency_test_free(struct cperf_latency_ctx *ctx)
{
if (ctx) {
- if (ctx->sess) {
- rte_cryptodev_sym_session_clear(ctx->dev_id, ctx->sess);
- rte_cryptodev_sym_session_free(ctx->sess);
- }
+ if (ctx->sess)
+ rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
rte_mempool_free(ctx->pool);
diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 6b4d09e623..7efeecf848 100644
--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -73,10 +73,7 @@ cperf_pmd_cyclecount_test_free(struct cperf_pmd_cyclecount_ctx *ctx)
(struct rte_security_session *)ctx->sess);
} else
#endif
- {
- rte_cryptodev_sym_session_clear(ctx->dev_id, ctx->sess);
- rte_cryptodev_sym_session_free(ctx->sess);
- }
+ rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
}
rte_mempool_free(ctx->pool);
diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
index cecf30e470..24261a1d10 100644
--- a/app/test-crypto-perf/cperf_test_throughput.c
+++ b/app/test-crypto-perf/cperf_test_throughput.c
@@ -50,10 +50,8 @@ cperf_throughput_test_free(struct cperf_throughput_ctx *ctx)
(struct rte_security_session *)ctx->sess);
}
#endif
- else {
- rte_cryptodev_sym_session_clear(ctx->dev_id, ctx->sess);
- rte_cryptodev_sym_session_free(ctx->sess);
- }
+ else
+ rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
}
rte_mempool_free(ctx->pool);
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 5c0dc82290..54f7e8ba2f 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -37,10 +37,8 @@ static void
cperf_verify_test_free(struct cperf_verify_ctx *ctx)
{
if (ctx) {
- if (ctx->sess) {
- rte_cryptodev_sym_session_clear(ctx->dev_id, ctx->sess);
- rte_cryptodev_sym_session_free(ctx->sess);
- }
+ if (ctx->sess)
+ rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
rte_mempool_free(ctx->pool);
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 17e30a8e74..55d7614d84 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -96,35 +96,14 @@ fill_session_pool_socket(int32_t socket_id, uint32_t session_priv_size,
char mp_name[RTE_MEMPOOL_NAMESIZE];
struct rte_mempool *sess_mp;
- if (session_pool_socket[socket_id].priv_mp == NULL) {
- snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
- "priv_sess_mp_%u", socket_id);
-
- sess_mp = rte_mempool_create(mp_name,
- nb_sessions,
- session_priv_size,
- 0, 0, NULL, NULL, NULL,
- NULL, socket_id,
- 0);
-
- if (sess_mp == NULL) {
- printf("Cannot create pool \"%s\" on socket %d\n",
- mp_name, socket_id);
- return -ENOMEM;
- }
-
- printf("Allocated pool \"%s\" on socket %d\n",
- mp_name, socket_id);
- session_pool_socket[socket_id].priv_mp = sess_mp;
- }
-
if (session_pool_socket[socket_id].sess_mp == NULL) {
snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
"sess_mp_%u", socket_id);
sess_mp = rte_cryptodev_sym_session_pool_create(mp_name,
- nb_sessions, 0, 0, 0, socket_id);
+ nb_sessions, session_priv_size, 0, 0,
+ socket_id);
if (sess_mp == NULL) {
printf("Cannot create pool \"%s\" on socket %d\n",
@@ -135,6 +114,7 @@ fill_session_pool_socket(int32_t socket_id, uint32_t session_priv_size,
printf("Allocated pool \"%s\" on socket %d\n",
mp_name, socket_id);
session_pool_socket[socket_id].sess_mp = sess_mp;
+ session_pool_socket[socket_id].priv_mp = sess_mp;
}
return 0;
@@ -322,12 +302,9 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
return ret;
qp_conf.mp_session = session_pool_socket[socket_id].sess_mp;
- qp_conf.mp_session_private =
- session_pool_socket[socket_id].priv_mp;
if (opts->op_type == CPERF_ASYM_MODEX) {
qp_conf.mp_session = NULL;
- qp_conf.mp_session_private = NULL;
}
ret = rte_cryptodev_configure(cdev_id, &conf);
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 81420be73a..30cefcb6dd 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -864,18 +864,13 @@ cryptodev_sym_sess_create(struct prod_data *p, struct test_perf *t)
cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
cipher_xform.next = NULL;
- sess = rte_cryptodev_sym_session_create(t->ca_sess_pool);
+ sess = rte_cryptodev_sym_session_create(p->ca.cdev_id, &cipher_xform,
+ t->ca_sess_pool);
if (sess == NULL) {
evt_err("Failed to create sym session");
return NULL;
}
- if (rte_cryptodev_sym_session_init(p->ca.cdev_id, sess, &cipher_xform,
- t->ca_sess_priv_pool)) {
- evt_err("Failed to init session");
- return NULL;
- }
-
return sess;
}
@@ -1382,15 +1377,6 @@ perf_cryptodev_setup(struct evt_test *test, struct evt_options *opt)
goto err;
}
- t->ca_sess_pool = rte_cryptodev_sym_session_pool_create(
- "ca_sess_pool", nb_sessions, 0, 0,
- sizeof(union rte_event_crypto_metadata), SOCKET_ID_ANY);
- if (t->ca_sess_pool == NULL) {
- evt_err("Failed to create sym session pool");
- ret = -ENOMEM;
- goto err;
- }
-
max_session_size = 0;
for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
unsigned int session_size;
@@ -1401,12 +1387,11 @@ perf_cryptodev_setup(struct evt_test *test, struct evt_options *opt)
max_session_size = session_size;
}
- max_session_size += sizeof(union rte_event_crypto_metadata);
- t->ca_sess_priv_pool = rte_mempool_create(
- "ca_sess_priv_pool", nb_sessions, max_session_size, 0, 0, NULL,
- NULL, NULL, NULL, SOCKET_ID_ANY, 0);
- if (t->ca_sess_priv_pool == NULL) {
- evt_err("failed to create sym session private pool");
+ t->ca_sess_pool = rte_cryptodev_sym_session_pool_create(
+ "ca_sess_pool", nb_sessions, max_session_size, 0,
+ sizeof(union rte_event_crypto_metadata), SOCKET_ID_ANY);
+ if (t->ca_sess_pool == NULL) {
+ evt_err("Failed to create sym session pool");
ret = -ENOMEM;
goto err;
}
@@ -1446,7 +1431,6 @@ perf_cryptodev_setup(struct evt_test *test, struct evt_options *opt)
qp_conf.nb_descriptors = NB_CRYPTODEV_DESCRIPTORS;
qp_conf.mp_session = t->ca_sess_pool;
- qp_conf.mp_session_private = t->ca_sess_priv_pool;
for (qp_id = 0; qp_id < conf.nb_queue_pairs; qp_id++) {
ret = rte_cryptodev_queue_pair_setup(
@@ -1467,7 +1451,6 @@ perf_cryptodev_setup(struct evt_test *test, struct evt_options *opt)
rte_mempool_free(t->ca_op_pool);
rte_mempool_free(t->ca_sess_pool);
- rte_mempool_free(t->ca_sess_priv_pool);
rte_mempool_free(t->ca_asym_sess_pool);
return ret;
@@ -1492,8 +1475,7 @@ perf_cryptodev_destroy(struct evt_test *test, struct evt_options *opt)
for (flow_id = 0; flow_id < t->nb_flows; flow_id++) {
sess = p->ca.crypto_sess[flow_id];
cdev_id = p->ca.cdev_id;
- rte_cryptodev_sym_session_clear(cdev_id, sess);
- rte_cryptodev_sym_session_free(sess);
+ rte_cryptodev_sym_session_free(cdev_id, sess);
}
rte_event_crypto_adapter_queue_pair_del(
@@ -1509,7 +1491,6 @@ perf_cryptodev_destroy(struct evt_test *test, struct evt_options *opt)
rte_mempool_free(t->ca_op_pool);
rte_mempool_free(t->ca_sess_pool);
- rte_mempool_free(t->ca_sess_priv_pool);
rte_mempool_free(t->ca_asym_sess_pool);
}
diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h
index 8cbd06fe42..d06d52cdf8 100644
--- a/app/test-eventdev/test_perf_common.h
+++ b/app/test-eventdev/test_perf_common.h
@@ -70,7 +70,6 @@ struct test_perf {
RTE_EVENT_TIMER_ADAPTER_NUM_MAX] __rte_cache_aligned;
struct rte_mempool *ca_op_pool;
struct rte_mempool *ca_sess_pool;
- struct rte_mempool *ca_sess_priv_pool;
struct rte_mempool *ca_asym_sess_pool;
} __rte_cache_aligned;
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 6ee4480399..c975c38001 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -13,6 +13,7 @@
#include <rte_pause.h>
#include <rte_bus_vdev.h>
#include <rte_ether.h>
+#include <rte_errno.h>
#include <rte_crypto.h>
#include <rte_cryptodev.h>
@@ -644,23 +645,17 @@ testsuite_setup(void)
}
ts_params->session_mpool = rte_cryptodev_sym_session_pool_create(
- "test_sess_mp", MAX_NB_SESSIONS, 0, 0, 0,
+ "test_sess_mp", MAX_NB_SESSIONS, session_size, 0, 0,
SOCKET_ID_ANY);
TEST_ASSERT_NOT_NULL(ts_params->session_mpool,
"session mempool allocation failed");
-
ts_params->session_priv_mpool = rte_mempool_create(
- "test_sess_mp_priv",
- MAX_NB_SESSIONS,
- session_size,
- 0, 0, NULL, NULL, NULL,
- NULL, SOCKET_ID_ANY,
- 0);
+ "test_sess_mp_priv", MAX_NB_SESSIONS, session_size,
+ 0, 0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0);
+
TEST_ASSERT_NOT_NULL(ts_params->session_priv_mpool,
"session mempool allocation failed");
-
-
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id,
&ts_params->conf),
"Failed to configure cryptodev %u with %u qps",
@@ -668,7 +663,6 @@ testsuite_setup(void)
ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
ts_params->qp_conf.mp_session = ts_params->session_mpool;
- ts_params->qp_conf.mp_session_private = ts_params->session_priv_mpool;
for (qp_id = 0; qp_id < info.max_nb_queue_pairs; qp_id++) {
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
@@ -697,15 +691,11 @@ testsuite_teardown(void)
rte_mempool_avail_count(ts_params->op_mpool));
}
- /* Free session mempools */
- if (ts_params->session_priv_mpool != NULL) {
- rte_mempool_free(ts_params->session_priv_mpool);
- ts_params->session_priv_mpool = NULL;
- }
-
if (ts_params->session_mpool != NULL) {
rte_mempool_free(ts_params->session_mpool);
ts_params->session_mpool = NULL;
+ rte_mempool_free(ts_params->session_priv_mpool);
+ ts_params->session_priv_mpool = NULL;
}
res = rte_cryptodev_close(ts_params->valid_devs[0]);
@@ -1381,7 +1371,6 @@ dev_configure_and_start(uint64_t ff_disable)
ts_params->conf.ff_disable = ff_disable;
ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
ts_params->qp_conf.mp_session = ts_params->session_mpool;
- ts_params->qp_conf.mp_session_private = ts_params->session_priv_mpool;
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
&ts_params->conf),
@@ -1441,10 +1430,8 @@ ut_teardown(void)
#endif
{
if (ut_params->sess) {
- rte_cryptodev_sym_session_clear(
- ts_params->valid_devs[0],
+ rte_cryptodev_sym_session_free(ts_params->valid_devs[0],
ut_params->sess);
- rte_cryptodev_sym_session_free(ut_params->sess);
ut_params->sess = NULL;
}
}
@@ -1599,7 +1586,6 @@ test_queue_pair_descriptor_setup(void)
*/
qp_conf.nb_descriptors = MIN_NUM_OPS_INFLIGHT; /* min size*/
qp_conf.mp_session = ts_params->session_mpool;
- qp_conf.mp_session_private = ts_params->session_priv_mpool;
for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs; qp_id++) {
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
@@ -2144,8 +2130,6 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
- int status;
-
/* Verify the capabilities */
struct rte_cryptodev_sym_capability_idx cap_idx;
cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
@@ -2190,18 +2174,11 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
ut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA1;
ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->cipher_xform,
ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- /* Create crypto session*/
- status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
-
- if (status == -ENOTSUP)
+ if (rte_errno == ENOTSUP)
return TEST_SKIPPED;
-
- TEST_ASSERT_EQUAL(status, 0, "Session init failed");
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
/* Generate crypto op data structure */
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
@@ -2430,7 +2407,6 @@ create_wireless_algo_hash_session(uint8_t dev_id,
enum rte_crypto_auth_algorithm algo)
{
uint8_t hash_key[key_len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2450,16 +2426,11 @@ create_wireless_algo_hash_session(uint8_t dev_id,
ut_params->auth_xform.auth.digest_length = auth_len;
ut_params->auth_xform.auth.iv.offset = IV_OFFSET;
ut_params->auth_xform.auth.iv.length = iv_len;
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
-
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->auth_xform,
- ts_params->session_priv_mpool);
- if (status == -ENOTSUP)
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->auth_xform, ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
- TEST_ASSERT_EQUAL(status, 0, "session init failed");
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
@@ -2472,7 +2443,6 @@ create_wireless_algo_cipher_session(uint8_t dev_id,
uint8_t iv_len)
{
uint8_t cipher_key[key_len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2492,16 +2462,12 @@ create_wireless_algo_cipher_session(uint8_t dev_id,
debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session */
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->cipher_xform, ts_params->session_mpool);
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
- if (status == -ENOTSUP)
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
- TEST_ASSERT_EQUAL(status, 0, "session init failed");
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
@@ -2579,7 +2545,6 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
{
uint8_t cipher_auth_key[key_len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2614,17 +2579,12 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
- if (status == -ENOTSUP)
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->cipher_xform, ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
- TEST_ASSERT_EQUAL(status, 0, "session init failed");
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
@@ -2638,7 +2598,6 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
{
const uint8_t key_len = tdata->key.len;
uint8_t cipher_auth_key[key_len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2678,16 +2637,11 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
-
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
- if (status == -ENOTSUP)
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->cipher_xform, ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
- TEST_ASSERT_EQUAL(status, 0, "session init failed");
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
@@ -2713,7 +2667,6 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
uint8_t cipher_iv_len)
{
uint8_t auth_cipher_key[key_len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2744,26 +2697,19 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
ut_params->auth_xform.next = NULL;
ut_params->cipher_xform.next = &ut_params->auth_xform;
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
-
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->cipher_xform, ts_params->session_mpool);
} else
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->auth_xform,
- ts_params->session_priv_mpool);
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->auth_xform, ts_params->session_mpool);
- if (status == -ENOTSUP)
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
- TEST_ASSERT_EQUAL(status, 0, "session init failed");
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
return 0;
}
@@ -8194,7 +8140,6 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
uint8_t iv_len)
{
uint8_t aead_key[key_len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -8216,15 +8161,12 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
debug_hexdump(stdout, "key:", key, key_len);
/* Create Crypto session*/
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->aead_xform, ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
+ return TEST_SKIPPED;
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->aead_xform,
- ts_params->session_priv_mpool);
-
- return status;
+ return 0;
}
static int
@@ -8668,7 +8610,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
/* Create security session */
ut_params->sec_session = rte_security_session_create(ctx,
&sess_conf, ts_params->session_mpool,
- ts_params->session_priv_mpool);
+ NULL);
if (!ut_params->sec_session) {
printf("TestCase %s()-%d line %d failed %s: ",
@@ -12018,7 +11960,6 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
const struct HMAC_MD5_vector *test_case)
{
uint8_t key[64];
- int status;
memcpy(key, test_case->key.data, test_case->key.len);
@@ -12033,16 +11974,11 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
ut_params->auth_xform.auth.key.data = key;
ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->auth_xform,
ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
- if (ut_params->sess == NULL)
- return TEST_FAILED;
-
- status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess, &ut_params->auth_xform,
- ts_params->session_priv_mpool);
- if (status == -ENOTSUP)
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
@@ -12250,12 +12186,9 @@ test_multi_session(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
-
struct rte_cryptodev_info dev_info;
struct rte_cryptodev_sym_session **sessions;
-
uint16_t i;
- int status;
/* Verify the capabilities */
struct rte_cryptodev_sym_capability_idx cap_idx;
@@ -12282,20 +12215,15 @@ test_multi_session(void)
/* Create multiple crypto sessions*/
for (i = 0; i < MAX_NB_SESSIONS; i++) {
-
sessions[i] = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->auth_xform,
ts_params->session_mpool);
+ if (sessions[i] == NULL && rte_errno == ENOTSUP)
+ return TEST_SKIPPED;
+
TEST_ASSERT_NOT_NULL(sessions[i],
"Session creation failed at session number %u",
i);
-
- status = rte_cryptodev_sym_session_init(
- ts_params->valid_devs[0],
- sessions[i], &ut_params->auth_xform,
- ts_params->session_priv_mpool);
- if (status == -ENOTSUP)
- return TEST_SKIPPED;
-
/* Attempt to send a request on each session */
TEST_ASSERT_SUCCESS( test_AES_CBC_HMAC_SHA512_decrypt_perform(
sessions[i],
@@ -12325,18 +12253,9 @@ test_multi_session(void)
}
}
- sessions[i] = NULL;
- /* Next session create should fail */
- rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- sessions[i], &ut_params->auth_xform,
- ts_params->session_priv_mpool);
- TEST_ASSERT_NULL(sessions[i],
- "Session creation succeeded unexpectedly!");
-
for (i = 0; i < MAX_NB_SESSIONS; i++) {
- rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
+ rte_cryptodev_sym_session_free(ts_params->valid_devs[0],
sessions[i]);
- rte_cryptodev_sym_session_free(sessions[i]);
}
rte_free(sessions);
@@ -12387,7 +12306,6 @@ test_multi_session_random_usage(void)
},
};
- int status;
/* Verify the capabilities */
struct rte_cryptodev_sym_capability_idx cap_idx;
@@ -12409,11 +12327,6 @@ test_multi_session_random_usage(void)
* MAX_NB_SESSIONS) + 1, 0);
for (i = 0; i < MB_SESSION_NUMBER; i++) {
- sessions[i] = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(sessions[i],
- "Session creation failed at session number %u",
- i);
rte_memcpy(&ut_paramz[i].ut_params, &unittest_params,
sizeof(struct crypto_unittest_params));
@@ -12423,16 +12336,16 @@ test_multi_session_random_usage(void)
ut_paramz[i].cipher_key, ut_paramz[i].hmac_key);
/* Create multiple crypto sessions*/
- status = rte_cryptodev_sym_session_init(
+ sessions[i] = rte_cryptodev_sym_session_create(
ts_params->valid_devs[0],
- sessions[i],
&ut_paramz[i].ut_params.auth_xform,
- ts_params->session_priv_mpool);
-
- if (status == -ENOTSUP)
+ ts_params->session_mpool);
+ if (sessions[i] == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
- TEST_ASSERT_EQUAL(status, 0, "Session init failed");
+ TEST_ASSERT_NOT_NULL(sessions[i],
+ "Session creation failed at session number %u",
+ i);
}
srand(time(NULL));
@@ -12470,9 +12383,8 @@ test_multi_session_random_usage(void)
}
for (i = 0; i < MB_SESSION_NUMBER; i++) {
- rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
+ rte_cryptodev_sym_session_free(ts_params->valid_devs[0],
sessions[i]);
- rte_cryptodev_sym_session_free(sessions[i]);
}
rte_free(sessions);
@@ -12490,7 +12402,6 @@ test_null_invalid_operation(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
- int ret;
/* This test is for NULL PMD only */
if (gbl_driver_id != rte_cryptodev_driver_id_get(
@@ -12504,17 +12415,13 @@ test_null_invalid_operation(void)
ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ /* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->cipher_xform,
ts_params->session_mpool);
-
- /* Create Crypto session*/
- ret = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
- TEST_ASSERT(ret < 0,
+ TEST_ASSERT(ut_params->sess == NULL,
"Session creation succeeded unexpectedly");
-
/* Setup HMAC Parameters */
ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
ut_params->auth_xform.next = NULL;
@@ -12522,14 +12429,11 @@ test_null_invalid_operation(void)
ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+ /* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->auth_xform,
ts_params->session_mpool);
-
- /* Create Crypto session*/
- ret = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess, &ut_params->auth_xform,
- ts_params->session_priv_mpool);
- TEST_ASSERT(ret < 0,
+ TEST_ASSERT(ut_params->sess == NULL,
"Session creation succeeded unexpectedly");
return TEST_SUCCESS;
@@ -12543,7 +12447,6 @@ test_null_burst_operation(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
- int status;
unsigned i, burst_len = NULL_BURST_LENGTH;
@@ -12569,19 +12472,14 @@ test_null_burst_operation(void)
ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
/* Create Crypto session*/
- status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess, &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
-
- if (status == -ENOTSUP)
+ ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0],
+ &ut_params->auth_xform,
+ ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
-
- TEST_ASSERT_EQUAL(status, 0, "Session init failed");
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
TEST_ASSERT_EQUAL(rte_crypto_op_bulk_alloc(ts_params->op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC, burst, burst_len),
@@ -12692,7 +12590,6 @@ test_enq_callback_setup(void)
qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
qp_conf.mp_session = ts_params->session_mpool;
- qp_conf.mp_session_private = ts_params->session_priv_mpool;
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
ts_params->valid_devs[0], qp_id, &qp_conf,
@@ -12792,7 +12689,6 @@ test_deq_callback_setup(void)
qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
qp_conf.mp_session = ts_params->session_mpool;
- qp_conf.mp_session_private = ts_params->session_priv_mpool;
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
ts_params->valid_devs[0], qp_id, &qp_conf,
@@ -12979,7 +12875,6 @@ static int create_gmac_session(uint8_t dev_id,
enum rte_crypto_auth_operation auth_op)
{
uint8_t auth_key[tdata->key.len];
- int status;
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -12998,15 +12893,13 @@ static int create_gmac_session(uint8_t dev_id,
ut_params->auth_xform.auth.iv.length = tdata->iv.len;
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
+ &ut_params->auth_xform, ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
+ return TEST_SKIPPED;
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->auth_xform,
- ts_params->session_priv_mpool);
-
- return status;
+ return 0;
}
static int
@@ -13635,7 +13528,6 @@ create_auth_session(struct crypto_unittest_params *ut_params,
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
uint8_t auth_key[reference->auth_key.len + 1];
- int status;
memcpy(auth_key, reference->auth_key.data, reference->auth_key.len);
@@ -13649,15 +13541,13 @@ create_auth_session(struct crypto_unittest_params *ut_params,
ut_params->auth_xform.auth.digest_length = reference->digest.len;
/* Create Crypto session*/
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
&ut_params->auth_xform,
- ts_params->session_priv_mpool);
+ ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
+ return TEST_SKIPPED;
- return status;
+ return 0;
}
static int
@@ -13670,7 +13560,6 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
struct crypto_testsuite_params *ts_params = &testsuite_params;
uint8_t cipher_key[reference->cipher_key.len + 1];
uint8_t auth_key[reference->auth_key.len + 1];
- int status;
memcpy(cipher_key, reference->cipher_key.data,
reference->cipher_key.len);
@@ -13702,15 +13591,13 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
}
/* Create Crypto session*/
- ut_params->sess = rte_cryptodev_sym_session_create(
- ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+ ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
&ut_params->auth_xform,
- ts_params->session_priv_mpool);
+ ts_params->session_mpool);
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
+ return TEST_SKIPPED;
- return status;
+ return 0;
}
static int
@@ -14168,7 +14055,6 @@ test_authenticated_encrypt_with_esn(
uint8_t cipher_key[reference->cipher_key.len + 1];
uint8_t auth_key[reference->auth_key.len + 1];
struct rte_cryptodev_info dev_info;
- int status;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
uint64_t feat_flags = dev_info.feature_flags;
@@ -14219,18 +14105,11 @@ test_authenticated_encrypt_with_esn(
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->cipher_xform,
ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess,
- &ut_params->cipher_xform,
- ts_params->session_priv_mpool);
-
- if (status == -ENOTSUP)
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
-
- TEST_ASSERT_EQUAL(status, 0, "Session init failed");
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
TEST_ASSERT_NOT_NULL(ut_params->ibuf,
@@ -14355,18 +14234,11 @@ test_authenticated_decrypt_with_esn(
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
+ ts_params->valid_devs[0], &ut_params->auth_xform,
ts_params->session_mpool);
- TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
- retval = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
- ut_params->sess,
- &ut_params->auth_xform,
- ts_params->session_priv_mpool);
-
- if (retval == -ENOTSUP)
+ if (ut_params->sess == NULL && rte_errno == ENOTSUP)
return TEST_SKIPPED;
-
- TEST_ASSERT_EQUAL(retval, 0, "Session init failed");
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
TEST_ASSERT_NOT_NULL(ut_params->ibuf,
@@ -15138,8 +15010,6 @@ test_scheduler_attach_worker_op(void)
}
ts_params->qp_conf.mp_session = ts_params->session_mpool;
- ts_params->qp_conf.mp_session_private =
- ts_params->session_priv_mpool;
ret = rte_cryptodev_scheduler_worker_attach(sched_id,
(uint8_t)i);
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index b5813b956f..4fcdd55660 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -68,7 +68,6 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
struct rte_mempool *mbuf_pool,
struct rte_mempool *op_mpool,
struct rte_mempool *sess_mpool,
- struct rte_mempool *sess_priv_mpool,
uint8_t dev_id,
char *test_msg)
{
@@ -514,11 +513,9 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
*/
if (!(t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SESSIONLESS) &&
nb_iterates == 0) {
- sess = rte_cryptodev_sym_session_create(sess_mpool);
-
- status = rte_cryptodev_sym_session_init(dev_id, sess,
- init_xform, sess_priv_mpool);
- if (status == -ENOTSUP) {
+ sess = rte_cryptodev_sym_session_create(dev_id, init_xform,
+ sess_mpool);
+ if (sess == NULL) {
snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "UNSUPPORTED");
status = TEST_SKIPPED;
goto error_exit;
@@ -801,10 +798,8 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
error_exit:
if (!(t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SESSIONLESS)) {
- if (sess) {
- rte_cryptodev_sym_session_clear(dev_id, sess);
- rte_cryptodev_sym_session_free(sess);
- }
+ if (sess)
+ rte_cryptodev_sym_session_free(dev_id, sess);
rte_free(cipher_xform);
rte_free(auth_xform);
}
@@ -829,7 +824,6 @@ blockcipher_test_case_run(const void *data)
p_testsuite_params->mbuf_pool,
p_testsuite_params->op_mpool,
p_testsuite_params->session_mpool,
- p_testsuite_params->session_priv_mpool,
p_testsuite_params->valid_devs[0],
test_msg);
return status;
diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 2ecc7e2cea..c6cf9c5401 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -157,7 +157,6 @@ struct event_crypto_adapter_test_params {
struct rte_mempool *op_mpool;
struct rte_mempool *asym_op_mpool;
struct rte_mempool *session_mpool;
- struct rte_mempool *session_priv_mpool;
struct rte_mempool *asym_sess_mpool;
struct rte_cryptodev_config *config;
uint8_t crypto_event_port_id;
@@ -307,15 +306,10 @@ test_op_forward_mode(uint8_t session_less)
sym_op = op->sym;
if (!session_less) {
- sess = rte_cryptodev_sym_session_create(
- params.session_mpool);
+ sess = rte_cryptodev_sym_session_create(TEST_CDEV_ID,
+ &cipher_xform, params.session_mpool);
TEST_ASSERT_NOT_NULL(sess, "Session creation failed\n");
- /* Create Crypto session*/
- ret = rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess,
- &cipher_xform, params.session_priv_mpool);
- TEST_ASSERT_SUCCESS(ret, "Failed to init session\n");
-
ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
&cap);
TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
@@ -683,8 +677,8 @@ test_op_new_mode(uint8_t session_less)
sym_op = op->sym;
if (!session_less) {
- sess = rte_cryptodev_sym_session_create(
- params.session_mpool);
+ sess = rte_cryptodev_sym_session_create(TEST_CDEV_ID,
+ &cipher_xform, params.session_mpool);
TEST_ASSERT_NOT_NULL(sess, "Session creation failed\n");
ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
@@ -699,9 +693,6 @@ test_op_new_mode(uint8_t session_less)
RTE_CRYPTO_OP_WITH_SESSION,
&m_data, sizeof(m_data));
}
- ret = rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess,
- &cipher_xform, params.session_priv_mpool);
- TEST_ASSERT_SUCCESS(ret, "Failed to init session\n");
rte_crypto_op_attach_sym_session(op, sess);
} else {
@@ -994,22 +985,12 @@ configure_cryptodev(void)
params.session_mpool = rte_cryptodev_sym_session_pool_create(
"CRYPTO_ADAPTER_SESSION_MP",
- MAX_NB_SESSIONS, 0, 0,
+ MAX_NB_SESSIONS, session_size, 0,
sizeof(union rte_event_crypto_metadata),
SOCKET_ID_ANY);
TEST_ASSERT_NOT_NULL(params.session_mpool,
"session mempool allocation failed\n");
- params.session_priv_mpool = rte_mempool_create(
- "CRYPTO_AD_SESS_MP_PRIV",
- MAX_NB_SESSIONS,
- session_size,
- 0, 0, NULL, NULL, NULL,
- NULL, SOCKET_ID_ANY,
- 0);
- TEST_ASSERT_NOT_NULL(params.session_priv_mpool,
- "session mempool allocation failed\n");
-
rte_cryptodev_info_get(TEST_CDEV_ID, &info);
while ((capability = &info.capabilities[i++])->op !=
@@ -1048,7 +1029,6 @@ configure_cryptodev(void)
qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT;
qp_conf.mp_session = params.session_mpool;
- qp_conf.mp_session_private = params.session_priv_mpool;
TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
TEST_CDEV_ID, TEST_CDEV_QP_ID, &qp_conf,
@@ -1410,11 +1390,6 @@ crypto_teardown(void)
rte_mempool_free(params.session_mpool);
params.session_mpool = NULL;
}
- if (params.session_priv_mpool != NULL) {
- rte_mempool_avail_count(params.session_priv_mpool);
- rte_mempool_free(params.session_priv_mpool);
- params.session_priv_mpool = NULL;
- }
/* Free asym session mempool */
if (params.asym_sess_mpool != NULL) {
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index aa533483fd..04d231468b 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -370,20 +370,9 @@ testsuite_setup(void)
return TEST_FAILED;
}
- ts_params->qp_conf.mp_session_private = rte_mempool_create(
- "test_priv_sess_mp",
- MAX_NB_SESSIONS,
- sess_sz,
- 0, 0, NULL, NULL, NULL,
- NULL, SOCKET_ID_ANY,
- 0);
-
- TEST_ASSERT_NOT_NULL(ts_params->qp_conf.mp_session_private,
- "private session mempool allocation failed");
-
ts_params->qp_conf.mp_session =
rte_cryptodev_sym_session_pool_create("test_sess_mp",
- MAX_NB_SESSIONS, 0, 0, 0, SOCKET_ID_ANY);
+ MAX_NB_SESSIONS, sess_sz, 0, 0, SOCKET_ID_ANY);
TEST_ASSERT_NOT_NULL(ts_params->qp_conf.mp_session,
"session mempool allocation failed");
@@ -428,11 +417,6 @@ testsuite_teardown(void)
rte_mempool_free(ts_params->qp_conf.mp_session);
ts_params->qp_conf.mp_session = NULL;
}
-
- if (ts_params->qp_conf.mp_session_private != NULL) {
- rte_mempool_free(ts_params->qp_conf.mp_session_private);
- ts_params->qp_conf.mp_session_private = NULL;
- }
}
static int
@@ -647,8 +631,7 @@ create_dummy_sec_session(struct ipsec_unitest_params *ut,
static struct rte_security_session_conf conf;
ut->ss[j].security.ses = rte_security_session_create(&dummy_sec_ctx,
- &conf, qp->mp_session,
- qp->mp_session_private);
+ &conf, qp->mp_session, NULL);
if (ut->ss[j].security.ses == NULL)
return -ENOMEM;
@@ -662,25 +645,15 @@ static int
create_crypto_session(struct ipsec_unitest_params *ut,
struct rte_cryptodev_qp_conf *qp, uint8_t dev_id, uint32_t j)
{
- int32_t rc;
struct rte_cryptodev_sym_session *s;
- s = rte_cryptodev_sym_session_create(qp->mp_session);
+ s = rte_cryptodev_sym_session_create(dev_id, ut->crypto_xforms,
+ qp->mp_session);
if (s == NULL)
return -ENOMEM;
- /* initialize SA crypto session for device */
- rc = rte_cryptodev_sym_session_init(dev_id, s,
- ut->crypto_xforms, qp->mp_session_private);
- if (rc == 0) {
- ut->ss[j].crypto.ses = s;
- return 0;
- } else {
- /* failure, do cleanup */
- rte_cryptodev_sym_session_clear(dev_id, s);
- rte_cryptodev_sym_session_free(s);
- return rc;
- }
+ ut->ss[j].crypto.ses = s;
+ return 0;
}
static int
@@ -1196,8 +1169,7 @@ static void
destroy_crypto_session(struct ipsec_unitest_params *ut,
uint8_t crypto_dev, uint32_t j)
{
- rte_cryptodev_sym_session_clear(crypto_dev, ut->ss[j].crypto.ses);
- rte_cryptodev_sym_session_free(ut->ss[j].crypto.ses);
+ rte_cryptodev_sym_session_free(crypto_dev, ut->ss[j].crypto.ses);
memset(&ut->ss[j], 0, sizeof(ut->ss[j]));
}
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 32127a874c..75a95e3689 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -521,34 +521,23 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
/* get existing session */
if (likely(op->sym->session != NULL)) {
- sess = (struct armv8_crypto_session *)
- get_sym_session_private_data(
- op->sym->session,
- cryptodev_driver_id);
+ sess = op->sym->session->data;
}
} else {
/* provide internal session */
- void *_sess = NULL;
- void *_sess_private_data = NULL;
+ struct rte_cryptodev_sym_session *_sess = NULL;
if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
return NULL;
- if (rte_mempool_get(qp->sess_mp_priv,
- (void **)&_sess_private_data))
- return NULL;
-
- sess = (struct armv8_crypto_session *)_sess_private_data;
+ sess = (struct armv8_crypto_session *)_sess->data;
if (unlikely(armv8_crypto_set_session_parameters(sess,
op->sym->xform) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
- rte_mempool_put(qp->sess_mp_priv, _sess_private_data);
sess = NULL;
}
op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
- set_sym_session_private_data(op->sym->session,
- cryptodev_driver_id, _sess_private_data);
}
if (unlikely(sess == NULL))
@@ -674,10 +663,6 @@ process_op(struct armv8_crypto_qp *qp, struct rte_crypto_op *op,
/* Free session if a session-less crypto op */
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct armv8_crypto_session));
- memset(op->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- op->sym->session));
- rte_mempool_put(qp->sess_mp_priv, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c07ac0489e..176bb9e6a0 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -267,8 +267,7 @@ armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
static int
armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
void *sess_private_data;
int ret;
@@ -278,43 +277,22 @@ armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
return -EINVAL;
}
- if (rte_mempool_get(mempool, &sess_private_data)) {
- CDEV_LOG_ERR(
- "Couldn't get object from session mempool");
- return -ENOMEM;
- }
+ sess_private_data = sess->data;
ret = armv8_crypto_set_session_parameters(sess_private_data, xform);
if (ret != 0) {
ARMV8_CRYPTO_LOG_ERR("failed configure session parameters");
-
- /* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
return 0;
}
/** Clear the memory of session so it doesn't leave key material behind */
static void
-armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess)
-{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
-
- /* Zero out the whole structure */
- if (sess_priv) {
- memset(sess_priv, 0, sizeof(struct armv8_crypto_session));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
- }
-}
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
.dev_configure = armv8_crypto_pmd_config,
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.c b/drivers/crypto/bcmfs/bcmfs_sym_session.c
index 675ed0ad55..d3334dc920 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.c
@@ -211,8 +211,7 @@ bcmfs_sym_get_session(struct rte_crypto_op *op)
} else if (likely(op->sym->session != NULL)) {
/* get existing session */
sess = (struct bcmfs_sym_session *)
- get_sym_session_private_data(op->sym->session,
- cryptodev_bcmfs_driver_id);
+ op->sym->session->driver_priv_data;
}
if (sess == NULL)
@@ -222,10 +221,9 @@ bcmfs_sym_get_session(struct rte_crypto_op *op)
}
int
-bcmfs_sym_session_configure(struct rte_cryptodev *dev,
+bcmfs_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
void *sess_private_data;
int ret;
@@ -235,45 +233,23 @@ bcmfs_sym_session_configure(struct rte_cryptodev *dev,
return -EINVAL;
}
- if (rte_mempool_get(mempool, &sess_private_data)) {
- BCMFS_DP_LOG(ERR,
- "Couldn't get object from session mempool");
- return -ENOMEM;
- }
+ sess_private_data = (void *)sess->driver_priv_data;
ret = crypto_set_session_parameters(sess_private_data, xform);
if (ret != 0) {
BCMFS_DP_LOG(ERR, "Failed configure session parameters");
- /* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
return 0;
}
/* Clear the memory of session so it doesn't leave key material behind */
void
-bcmfs_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess)
-{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
-
- if (sess_priv) {
- struct rte_mempool *sess_mp;
-
- memset(sess_priv, 0, sizeof(struct bcmfs_sym_session));
- sess_mp = rte_mempool_from_obj(sess_priv);
-
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
- }
-}
+bcmfs_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
unsigned int
bcmfs_sym_session_get_private_size(struct rte_cryptodev *dev __rte_unused)
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h
index d40595b4bd..4a0a012ae7 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.h
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h
@@ -93,8 +93,7 @@ bcmfs_process_crypto_op(struct rte_crypto_op *op,
int
bcmfs_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool);
+ struct rte_cryptodev_sym_session *sess);
void
bcmfs_sym_session_clear(struct rte_cryptodev *dev,
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 8e9cfe73d8..a9c93dea13 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -1357,8 +1357,7 @@ caam_jr_enqueue_op(struct rte_crypto_op *op, struct caam_jr_qp *qp)
switch (op->sess_type) {
case RTE_CRYPTO_OP_WITH_SESSION:
ses = (struct caam_jr_session *)
- get_sym_session_private_data(op->sym->session,
- cryptodev_driver_id);
+ op->sym->session->driver_priv_data;
break;
case RTE_CRYPTO_OP_SECURITY_SESSION:
ses = (struct caam_jr_session *)
@@ -1692,54 +1691,39 @@ caam_jr_set_session_parameters(struct rte_cryptodev *dev,
}
static int
-caam_jr_sym_session_configure(struct rte_cryptodev *dev,
+caam_jr_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
void *sess_private_data;
int ret;
PMD_INIT_FUNC_TRACE();
-
- if (rte_mempool_get(mempool, &sess_private_data)) {
- CAAM_JR_ERR("Couldn't get object from session mempool");
- return -ENOMEM;
- }
-
+ sess_private_data = (void *)sess->driver_priv_data;
memset(sess_private_data, 0, sizeof(struct caam_jr_session));
ret = caam_jr_set_session_parameters(dev, xform, sess_private_data);
if (ret != 0) {
CAAM_JR_ERR("failed to configure session parameters");
/* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
-
return 0;
}
/* Clear the memory of session so it doesn't leave key material behind */
static void
-caam_jr_sym_session_clear(struct rte_cryptodev *dev,
+caam_jr_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
+ void *sess_priv = (void *)sess->driver_priv_data;
struct caam_jr_session *s = (struct caam_jr_session *)sess_priv;
PMD_INIT_FUNC_TRACE();
if (sess_priv) {
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-
rte_free(s->cipher_key.data);
rte_free(s->auth_key.data);
- memset(s, 0, sizeof(struct caam_jr_session));
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
}
}
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4bab18323b..bd999abe61 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1585,9 +1585,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
void *append_ptr;
uint8_t *addr;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
addr = session->auth.pre_compute;
src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
@@ -1766,9 +1764,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
void *append_ptr;
uint64_t auth_msg_bits;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
op->sym->auth.data.offset);
@@ -1859,9 +1855,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
uint32_t tail;
phys_addr_t src_addr, dest_addr, ctx_paddr, dest_addr_t;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
op->sym->auth.data.offset);
@@ -2005,9 +1999,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
uint32_t tail;
phys_addr_t src_addr, dest_addr, ctx_paddr;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
op->sym->auth.data.offset);
@@ -2079,9 +2071,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
phys_addr_t src_addr, dest_addr, key_addr;
int length, non_align_len;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
key_addr = rte_mem_virt2phy(session->auth.key_ccp);
src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
@@ -2242,9 +2232,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
phys_addr_t src_addr, dest_addr, key_addr;
uint8_t *iv;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
function.raw = 0;
iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2330,9 +2318,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
uint8_t *iv;
phys_addr_t src_addr, dest_addr, key_addr;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
switch (session->cipher.um.des_mode) {
@@ -2440,9 +2426,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
phys_addr_t digest_dest_addr;
int length, non_align_len;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
key_addr = session->cipher.key_phys;
@@ -2607,9 +2591,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
int result = 0;
struct ccp_session *session;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
switch (session->cipher.algo) {
case CCP_CIPHER_ALGO_AES_CBC:
@@ -2645,9 +2627,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
int result = 0;
struct ccp_session *session;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
switch (session->auth.algo) {
case CCP_AUTH_ALGO_SHA1:
@@ -2715,9 +2695,7 @@ ccp_crypto_aead(struct rte_crypto_op *op,
int result = 0;
struct ccp_session *session;
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
switch (session->auth.algo) {
case CCP_AUTH_ALGO_AES_GCM:
@@ -2780,9 +2758,8 @@ process_ops_to_enqueue(struct ccp_qp *qp,
b_info->head_offset = (uint32_t)(cmd_q->qbase_phys_addr + cmd_q->qidx *
Q_DESC_SIZE);
for (i = b_idx; i < (nb_ops+b_idx); i++) {
- session = (struct ccp_session *)get_sym_session_private_data(
- op[i]->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)
+ op[i]->sym->session->driver_priv_data;
switch (session->cmd_id) {
case CCP_CMD_CIPHER:
result = ccp_crypto_cipher(op[i], cmd_q, b_info);
@@ -2858,9 +2835,7 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
int offset, digest_offset;
uint8_t digest_le[64];
- session = (struct ccp_session *)get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)op->sym->session->driver_priv_data;
if (session->cmd_id == CCP_CMD_COMBINED) {
digest_data = op->sym->aead.digest.data;
@@ -2934,9 +2909,8 @@ ccp_prepare_ops(struct ccp_qp *qp,
for (i = b_info->b_idx; i < min_ops; i++) {
op_d[i] = b_info->op[b_info->b_idx + b_info->op_idx++];
- session = (struct ccp_session *)get_sym_session_private_data(
- op_d[i]->sym->session,
- ccp_cryptodev_driver_id);
+ session = (struct ccp_session *)
+ op_d[i]->sym->session->driver_priv_data;
switch (session->cmd_id) {
case CCP_CMD_CIPHER:
op_d[i]->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 1b600e81ad..e401793a76 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -727,7 +727,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
}
qp->sess_mp = qp_conf->mp_session;
- qp->sess_mp_priv = qp_conf->mp_session_private;
/* mempool for batch info */
qp->batch_mp = rte_mempool_create(
@@ -757,8 +756,7 @@ ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
static int
ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
int ret;
void *sess_private_data;
@@ -769,40 +767,22 @@ ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
return -ENOMEM;
}
- if (rte_mempool_get(mempool, &sess_private_data)) {
- CCP_LOG_ERR("Couldn't get object from session mempool");
- return -ENOMEM;
- }
+ sess_private_data = (void *)sess->driver_priv_data;
+
internals = (struct ccp_private *)dev->data->dev_private;
ret = ccp_set_session_parameters(sess_private_data, xform, internals);
if (ret != 0) {
CCP_LOG_ERR("failed configure session parameters");
-
- /* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
return 0;
}
static void
-ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess)
-{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
-
- if (sess_priv) {
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-
- rte_mempool_put(sess_mp, sess_priv);
- memset(sess_priv, 0, sizeof(struct ccp_session));
- set_sym_session_private_data(sess, index, NULL);
- }
-}
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
struct rte_cryptodev_ops ccp_ops = {
.dev_configure = ccp_pmd_config,
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index 1c4118ee3c..6704e39ab8 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -78,8 +78,6 @@ struct ccp_qp {
/**< Ring for placing process packets */
struct rte_mempool *sess_mp;
/**< Session Mempool */
- struct rte_mempool *sess_mp_priv;
- /**< Session Private Data Mempool */
struct rte_mempool *batch_mp;
/**< Session Mempool for batch info */
struct rte_cryptodev_stats qp_stats;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index a35a8cd775..7502281ad9 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -56,33 +56,23 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
if (unlikely(op->sym->session == NULL))
return NULL;
- sess = (struct ccp_session *)
- get_sym_session_private_data(
- op->sym->session,
- ccp_cryptodev_driver_id);
+ sess = (void *)op->sym->session->driver_priv_data;
} else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
- void *_sess;
- void *_sess_private_data = NULL;
+ struct rte_cryptodev_sym_session *_sess;
struct ccp_private *internals;
- if (rte_mempool_get(qp->sess_mp, &_sess))
- return NULL;
- if (rte_mempool_get(qp->sess_mp, (void **)&_sess_private_data))
+ if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
return NULL;
- sess = (struct ccp_session *)_sess_private_data;
+ sess = (void *)_sess->driver_priv_data;
internals = (struct ccp_private *)qp->dev->data->dev_private;
if (unlikely(ccp_set_session_parameters(sess, op->sym->xform,
internals) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
- rte_mempool_put(qp->sess_mp_priv, _sess_private_data);
sess = NULL;
}
- op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
- set_sym_session_private_data(op->sym->session,
- ccp_cryptodev_driver_id,
- _sess_private_data);
+ op->sym->session = _sess;
}
return sess;
@@ -161,13 +151,10 @@ ccp_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
for (i = 0; i < nb_dequeued; i++)
if (unlikely(ops[i]->sess_type ==
RTE_CRYPTO_OP_SESSIONLESS)) {
- struct ccp_session *sess = (struct ccp_session *)
- get_sym_session_private_data(
- ops[i]->sym->session,
- ccp_cryptodev_driver_id);
+ struct ccp_session *sess =
+ (void *)ops[i]->sym->session->driver_priv_data;
- rte_mempool_put(qp->sess_mp_priv,
- sess);
+ memset(sess, 0, sizeof(*sess));
rte_mempool_put(qp->sess_mp,
ops[i]->sym->session);
ops[i]->sym->session = NULL;
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index 586941cd70..f96e132513 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -22,24 +22,23 @@
static inline struct cnxk_se_sess *
cn10k_cpt_sym_temp_sess_create(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op)
{
- const int driver_id = cn10k_cryptodev_driver_id;
struct rte_crypto_sym_op *sym_op = op->sym;
struct rte_cryptodev_sym_session *sess;
struct cnxk_se_sess *priv;
int ret;
/* Create temporary session */
- sess = rte_cryptodev_sym_session_create(qp->sess_mp);
- if (sess == NULL)
+ if (rte_mempool_get(qp->sess_mp, (void **)&sess) < 0)
return NULL;
- ret = sym_session_configure(qp->lf.roc_cpt, driver_id, sym_op->xform,
- sess, qp->sess_mp_priv);
- if (ret)
+ ret = sym_session_configure(qp->lf.roc_cpt, sym_op->xform,
+ sess);
+ if (ret) {
+ rte_mempool_put(qp->sess_mp, (void *)sess);
goto sess_put;
+ }
- priv = get_sym_session_private_data(sess, driver_id);
-
+ priv = (void *)sess->driver_priv_data;
sym_op->session = sess;
return priv;
@@ -111,8 +110,7 @@ cn10k_cpt_fill_inst(struct cnxk_cpt_qp *qp, struct rte_crypto_op *ops[],
return 0;
w7 = sec_sess->sa.inst.w7;
} else if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- sess = get_sym_session_private_data(
- sym_op->session, cn10k_cryptodev_driver_id);
+ sess = (void *)sym_op->session->driver_priv_data;
ret = cpt_sym_inst_fill(qp, op, sess, infl_req,
&inst[0]);
if (unlikely(ret))
@@ -128,8 +126,7 @@ cn10k_cpt_fill_inst(struct cnxk_cpt_qp *qp, struct rte_crypto_op *ops[],
ret = cpt_sym_inst_fill(qp, op, sess, infl_req,
&inst[0]);
if (unlikely(ret)) {
- sym_session_clear(cn10k_cryptodev_driver_id,
- op->sym->session);
+ sym_session_clear(op->sym->session);
rte_mempool_put(qp->sess_mp, op->sym->session);
return 0;
}
@@ -296,8 +293,9 @@ cn10k_cpt_crypto_adapter_ev_mdata_set(struct rte_cryptodev *dev __rte_unused,
} else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
struct cnxk_se_sess *priv;
- priv = get_sym_session_private_data(
- sess, cn10k_cryptodev_driver_id);
+ priv = (void *)(
+ ((struct rte_cryptodev_sym_session *)sess)->
+ driver_priv_data);
priv->qp = qp;
priv->cpt_inst_w2 = w2;
} else
@@ -334,8 +332,7 @@ cn10k_ca_meta_info_extract(struct rte_crypto_op *op,
} else if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
struct cnxk_se_sess *priv;
- priv = get_sym_session_private_data(
- op->sym->session, cn10k_cryptodev_driver_id);
+ priv = (void *)op->sym->session->driver_priv_data;
*qp = priv->qp;
*w2 = priv->cpt_inst_w2;
} else {
@@ -543,7 +540,6 @@ cn10k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp,
{
const uint8_t uc_compcode = res->uc_compcode;
const uint8_t compcode = res->compcode;
- unsigned int sz;
cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
@@ -620,11 +616,7 @@ cn10k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp,
temp_sess_free:
if (unlikely(cop->sess_type == RTE_CRYPTO_OP_SESSIONLESS)) {
if (cop->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
- sym_session_clear(cn10k_cryptodev_driver_id,
- cop->sym->session);
- sz = rte_cryptodev_sym_get_existing_header_session_size(
- cop->sym->session);
- memset(cop->sym->session, 0, sz);
+ sym_session_clear(cop->sym->session);
rte_mempool_put(qp->sess_mp, cop->sym->session);
cop->sym->session = NULL;
}
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index b753c1cb4b..a44f111ba6 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -56,23 +56,20 @@ cn9k_cpt_sec_inst_fill(struct rte_crypto_op *op,
static inline struct cnxk_se_sess *
cn9k_cpt_sym_temp_sess_create(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op)
{
- const int driver_id = cn9k_cryptodev_driver_id;
struct rte_crypto_sym_op *sym_op = op->sym;
struct rte_cryptodev_sym_session *sess;
struct cnxk_se_sess *priv;
int ret;
/* Create temporary session */
- sess = rte_cryptodev_sym_session_create(qp->sess_mp);
- if (sess == NULL)
+ if (rte_mempool_get(qp->sess_mp, (void **)&sess) < 0)
return NULL;
- ret = sym_session_configure(qp->lf.roc_cpt, driver_id, sym_op->xform,
- sess, qp->sess_mp_priv);
+ ret = sym_session_configure(qp->lf.roc_cpt, sym_op->xform, sess);
if (ret)
goto sess_put;
- priv = get_sym_session_private_data(sess, driver_id);
+ priv = (void *)sess->driver_priv_data;
sym_op->session = sess;
@@ -95,8 +92,7 @@ cn9k_cpt_inst_prep(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
sym_op = op->sym;
- sess = get_sym_session_private_data(
- sym_op->session, cn9k_cryptodev_driver_id);
+ sess = (void *)sym_op->session->driver_priv_data;
ret = cpt_sym_inst_fill(qp, op, sess, infl_req, inst);
inst->w7.u64 = sess->cpt_inst_w7;
} else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
@@ -110,8 +106,7 @@ cn9k_cpt_inst_prep(struct cnxk_cpt_qp *qp, struct rte_crypto_op *op,
ret = cpt_sym_inst_fill(qp, op, sess, infl_req, inst);
if (unlikely(ret)) {
- sym_session_clear(cn9k_cryptodev_driver_id,
- op->sym->session);
+ sym_session_clear(op->sym->session);
rte_mempool_put(qp->sess_mp, op->sym->session);
}
inst->w7.u64 = sess->cpt_inst_w7;
@@ -349,8 +344,9 @@ cn9k_cpt_crypto_adapter_ev_mdata_set(struct rte_cryptodev *dev __rte_unused,
} else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
struct cnxk_se_sess *priv;
- priv = get_sym_session_private_data(
- sess, cn9k_cryptodev_driver_id);
+ priv = (void *)((
+ (struct rte_cryptodev_sym_session *)sess)->
+ driver_priv_data);
priv->qp = qp;
priv->cpt_inst_w2 = w2;
} else
@@ -387,8 +383,7 @@ cn9k_ca_meta_info_extract(struct rte_crypto_op *op,
} else if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
struct cnxk_se_sess *priv;
- priv = get_sym_session_private_data(
- op->sym->session, cn9k_cryptodev_driver_id);
+ priv = (void *)op->sym->session->driver_priv_data;
*qp = priv->qp;
inst->w2.u64 = priv->cpt_inst_w2;
} else {
@@ -583,8 +578,6 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,
struct cpt_inflight_req *infl_req,
struct cpt_cn9k_res_s *res)
{
- unsigned int sz;
-
if (likely(res->compcode == CPT_COMP_GOOD)) {
if (unlikely(res->uc_compcode)) {
if (res->uc_compcode == ROC_SE_ERR_GC_ICV_MISCOMPARE)
@@ -645,11 +638,7 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,
temp_sess_free:
if (unlikely(cop->sess_type == RTE_CRYPTO_OP_SESSIONLESS)) {
if (cop->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
- sym_session_clear(cn9k_cryptodev_driver_id,
- cop->sym->session);
- sz = rte_cryptodev_sym_get_existing_header_session_size(
- cop->sym->session);
- memset(cop->sym->session, 0, sz);
+ sym_session_clear(cop->sym->session);
rte_mempool_put(qp->sess_mp, cop->sym->session);
cop->sym->session = NULL;
}
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index cf91b92c2c..0c76dd36a6 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -406,7 +406,6 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
}
qp->sess_mp = conf->mp_session;
- qp->sess_mp_priv = conf->mp_session_private;
dev->data->queue_pairs[qp_id] = qp;
return 0;
@@ -620,25 +619,14 @@ cnxk_cpt_inst_w7_get(struct cnxk_se_sess *sess, struct roc_cpt *roc_cpt)
}
int
-sym_session_configure(struct roc_cpt *roc_cpt, int driver_id,
+sym_session_configure(struct roc_cpt *roc_cpt,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *pool)
+ struct rte_cryptodev_sym_session *sess)
{
enum cpt_dp_thread_type thr_type;
- struct cnxk_se_sess *sess_priv;
- void *priv;
+ struct cnxk_se_sess *sess_priv = (void *)sess->driver_priv_data;
int ret;
- if (unlikely(rte_mempool_get(pool, &priv))) {
- plt_dp_err("Could not allocate session private data");
- return -ENOMEM;
- }
-
- memset(priv, 0, sizeof(struct cnxk_se_sess));
-
- sess_priv = priv;
-
ret = cnxk_sess_fill(roc_cpt, xform, sess_priv);
if (ret)
goto priv_put;
@@ -684,61 +672,37 @@ sym_session_configure(struct roc_cpt *roc_cpt, int driver_id,
}
sess_priv->cpt_inst_w7 = cnxk_cpt_inst_w7_get(sess_priv, roc_cpt);
-
- set_sym_session_private_data(sess, driver_id, sess_priv);
-
return 0;
priv_put:
- rte_mempool_put(pool, priv);
-
return ret;
}
int
cnxk_cpt_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *pool)
+ struct rte_cryptodev_sym_session *sess)
{
struct cnxk_cpt_vf *vf = dev->data->dev_private;
struct roc_cpt *roc_cpt = &vf->cpt;
- uint8_t driver_id;
-
- driver_id = dev->driver_id;
- return sym_session_configure(roc_cpt, driver_id, xform, sess, pool);
+ return sym_session_configure(roc_cpt, xform, sess);
}
void
-sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess)
+sym_session_clear(struct rte_cryptodev_sym_session *sess)
{
- void *priv = get_sym_session_private_data(sess, driver_id);
- struct cnxk_se_sess *sess_priv;
- struct rte_mempool *pool;
-
- if (priv == NULL)
- return;
-
- sess_priv = priv;
+ struct cnxk_se_sess *sess_priv = (void *)sess->driver_priv_data;
if (sess_priv->roc_se_ctx.auth_key != NULL)
plt_free(sess_priv->roc_se_ctx.auth_key);
-
- memset(priv, 0, cnxk_cpt_sym_session_get_size(NULL));
-
- pool = rte_mempool_from_obj(priv);
-
- set_sym_session_private_data(sess, driver_id, NULL);
-
- rte_mempool_put(pool, priv);
}
void
-cnxk_cpt_sym_session_clear(struct rte_cryptodev *dev,
+cnxk_cpt_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{
- return sym_session_clear(dev->driver_id, sess);
+ return sym_session_clear(sess);
}
unsigned int
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
index ffe4ae19aa..ca90567620 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
@@ -78,8 +78,6 @@ struct cnxk_cpt_qp {
/**< Crypto adapter related info */
struct rte_mempool *sess_mp;
/**< Session mempool */
- struct rte_mempool *sess_mp_priv;
- /**< Session private data mempool */
};
int cnxk_cpt_dev_config(struct rte_cryptodev *dev,
@@ -104,18 +102,16 @@ unsigned int cnxk_cpt_sym_session_get_size(struct rte_cryptodev *dev);
int cnxk_cpt_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *pool);
+ struct rte_cryptodev_sym_session *sess);
-int sym_session_configure(struct roc_cpt *roc_cpt, int driver_id,
+int sym_session_configure(struct roc_cpt *roc_cpt,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *pool);
+ struct rte_cryptodev_sym_session *sess);
void cnxk_cpt_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess);
+ struct rte_cryptodev_sym_session *sess);
-void sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess);
+void sym_session_clear(struct rte_cryptodev_sym_session *sess);
unsigned int cnxk_ae_session_size_get(struct rte_cryptodev *dev __rte_unused);
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 8444f1a795..5a38d53022 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1379,8 +1379,7 @@ build_sec_fd(struct rte_crypto_op *op,
dpaa2_sec_session *sess;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
- sess = (dpaa2_sec_session *)get_sym_session_private_data(
- op->sym->session, cryptodev_driver_id);
+ sess = (dpaa2_sec_session *)op->sym->session->driver_priv_data;
#ifdef RTE_LIB_SECURITY
else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -1678,8 +1677,7 @@ dpaa2_sec_dump(struct rte_crypto_op *op)
struct rte_crypto_sym_op *sym_op;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
- sess = (dpaa2_sec_session *)get_sym_session_private_data(
- op->sym->session, cryptodev_driver_id);
+ sess = (dpaa2_sec_session *)op->sym->session->driver_priv_data;
#ifdef RTE_LIBRTE_SECURITY
else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -3754,51 +3752,36 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
}
#endif
static int
-dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
- void *sess_private_data;
+ void *sess_private_data = (void *)sess->driver_priv_data;
int ret;
- if (rte_mempool_get(mempool, &sess_private_data)) {
- DPAA2_SEC_ERR("Couldn't get object from session mempool");
- return -ENOMEM;
- }
-
ret = dpaa2_sec_set_session_parameters(xform, sess_private_data);
if (ret != 0) {
DPAA2_SEC_ERR("Failed to configure session parameters");
/* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
return 0;
}
/** Clear the memory of session so it doesn't leave key material behind */
static void
-dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{
PMD_INIT_FUNC_TRACE();
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
+ void *sess_priv = (void *)sess->driver_priv_data;
dpaa2_sec_session *s = (dpaa2_sec_session *)sess_priv;
if (sess_priv) {
rte_free(s->ctxt);
rte_free(s->cipher_key.data);
rte_free(s->auth_key.data);
- memset(s, 0, sizeof(dpaa2_sec_session));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
}
}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
index e68a4875dd..795be3acc3 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
@@ -1012,8 +1012,7 @@ dpaa2_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
sess = (dpaa2_sec_session *)get_sec_session_private_data(
session_ctx.sec_sess);
else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION)
- sess = (dpaa2_sec_session *)get_sym_session_private_data(
- session_ctx.crypto_sess, cryptodev_driver_id);
+ sess = (void *)session_ctx.crypto_sess->driver_priv_data;
else
return -ENOTSUP;
raw_dp_ctx->dequeue_burst = dpaa2_sec_raw_dequeue_burst;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 05415dbf3b..0cc773fba6 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -670,10 +670,7 @@ dpaa_sec_dump(struct dpaa_sec_op_ctx *ctx, struct dpaa_sec_qp *qp)
struct qm_sg_entry sg[2];
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
- sess = (dpaa_sec_session *)
- get_sym_session_private_data(
- op->sym->session,
- dpaa_cryptodev_driver_id);
+ sess = (dpaa_sec_session *)op->sym->session->driver_priv_data;
#ifdef RTE_LIBRTE_SECURITY
else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
sess = (dpaa_sec_session *)
@@ -1927,10 +1924,8 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
switch (op->sess_type) {
case RTE_CRYPTO_OP_WITH_SESSION:
- ses = (dpaa_sec_session *)
- get_sym_session_private_data(
- op->sym->session,
- dpaa_cryptodev_driver_id);
+ ses = (void *)
+ op->sym->session->driver_priv_data;
break;
#ifdef RTE_LIB_SECURITY
case RTE_CRYPTO_OP_SECURITY_SESSION:
@@ -2676,31 +2671,19 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
static int
dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
- void *sess_private_data;
+ void *sess_private_data = (void *)sess->driver_priv_data;
int ret;
PMD_INIT_FUNC_TRACE();
- if (rte_mempool_get(mempool, &sess_private_data)) {
- DPAA_SEC_ERR("Couldn't get object from session mempool");
- return -ENOMEM;
- }
-
ret = dpaa_sec_set_session_parameters(dev, xform, sess_private_data);
if (ret != 0) {
DPAA_SEC_ERR("failed to configure session parameters");
-
- /* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
ret = dpaa_sec_prep_cdb(sess_private_data);
if (ret) {
DPAA_SEC_ERR("Unable to prepare sec cdb");
@@ -2714,7 +2697,6 @@ static inline void
free_session_memory(struct rte_cryptodev *dev, dpaa_sec_session *s)
{
struct dpaa_sec_dev_private *qi = dev->data->dev_private;
- struct rte_mempool *sess_mp = rte_mempool_from_obj((void *)s);
uint8_t i;
for (i = 0; i < MAX_DPAA_CORES; i++) {
@@ -2724,7 +2706,6 @@ free_session_memory(struct rte_cryptodev *dev, dpaa_sec_session *s)
s->qp[i] = NULL;
}
free_session_data(s);
- rte_mempool_put(sess_mp, (void *)s);
}
/** Clear the memory of session so it doesn't leave key material behind */
@@ -2733,14 +2714,10 @@ dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess)
{
PMD_INIT_FUNC_TRACE();
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
+ void *sess_priv = (void *)sess->driver_priv_data;
dpaa_sec_session *s = (dpaa_sec_session *)sess_priv;
- if (sess_priv) {
- free_session_memory(dev, s);
- set_sym_session_private_data(sess, index, NULL);
- }
+ free_session_memory(dev, s);
}
#ifdef RTE_LIB_SECURITY
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
index d081953e26..d2e4d9d787 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
@@ -1017,8 +1017,8 @@ dpaa_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
sess = (dpaa_sec_session *)get_sec_session_private_data(
session_ctx.sec_sess);
else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION)
- sess = (dpaa_sec_session *)get_sym_session_private_data(
- session_ctx.crypto_sess, dpaa_cryptodev_driver_id);
+ sess = (dpaa_sec_session *)
+ session_ctx.crypto_sess->driver_priv_data;
else
return -ENOTSUP;
raw_dp_ctx->dequeue_burst = dpaa_sec_raw_dequeue_burst;
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 7e8396b4a3..90ce5bc965 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -264,7 +264,6 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
qp->pmd_type = internals->pmd_type;
qp->sess_mp = qp_conf->mp_session;
- qp->sess_mp_priv = qp_conf->mp_session_private;
qp->ingress_queue = ipsec_mb_qp_create_processed_ops_ring(qp,
qp_conf->nb_descriptors, socket_id);
@@ -312,9 +311,8 @@ ipsec_mb_sym_session_get_size(struct rte_cryptodev *dev)
int
ipsec_mb_sym_session_configure(
struct rte_cryptodev *dev, struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess, struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
- void *sess_private_data;
struct ipsec_mb_dev_private *internals = dev->data->dev_private;
struct ipsec_mb_internals *pmd_data =
&ipsec_mb_pmds[internals->pmd_type];
@@ -330,42 +328,22 @@ ipsec_mb_sym_session_configure(
return -EINVAL;
}
- if (rte_mempool_get(mempool, &sess_private_data)) {
- IPSEC_MB_LOG(ERR, "Couldn't get object from session mempool");
- free_mb_mgr(mb_mgr);
- return -ENOMEM;
- }
-
- ret = (*pmd_data->session_configure)(mb_mgr, sess_private_data, xform);
+ ret = (*pmd_data->session_configure)(mb_mgr,
+ (void *)sess->driver_priv_data, xform);
if (ret != 0) {
IPSEC_MB_LOG(ERR, "failed configure session parameters");
/* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
free_mb_mgr(mb_mgr);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
-
free_mb_mgr(mb_mgr);
return 0;
}
/** Clear the session memory */
void
-ipsec_mb_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess)
-{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
-
- /* Zero out the whole structure */
- if (sess_priv) {
- memset(sess_priv, 0, ipsec_mb_sym_session_get_size(dev));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
- }
-}
+ipsec_mb_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index d074b33133..14f962ef28 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -136,8 +136,6 @@ struct ipsec_mb_qp {
struct rte_ring *ingress_queue;
/**< Ring for placing operations ready for processing */
struct rte_mempool *sess_mp;
- /**< Session Mempool */
- struct rte_mempool *sess_mp_priv;
/**< Session Private Data Mempool */
struct rte_cryptodev_stats stats;
/**< Queue pair statistics */
@@ -399,8 +397,7 @@ ipsec_mb_sym_session_get_size(struct rte_cryptodev *dev);
int ipsec_mb_sym_session_configure(
struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool);
+ struct rte_cryptodev_sym_session *sess);
/** Clear the memory of session so it does not leave key material behind */
void
@@ -411,50 +408,50 @@ ipsec_mb_sym_session_clear(struct rte_cryptodev *dev,
static __rte_always_inline void *
ipsec_mb_get_session_private(struct ipsec_mb_qp *qp, struct rte_crypto_op *op)
{
- void *sess = NULL;
+ struct rte_cryptodev_sym_session *sess = NULL;
uint32_t driver_id = ipsec_mb_get_driver_id(qp->pmd_type);
struct rte_crypto_sym_op *sym_op = op->sym;
uint8_t sess_type = op->sess_type;
void *_sess;
- void *_sess_private_data = NULL;
struct ipsec_mb_internals *pmd_data = &ipsec_mb_pmds[qp->pmd_type];
switch (sess_type) {
case RTE_CRYPTO_OP_WITH_SESSION:
if (likely(sym_op->session != NULL))
- sess = get_sym_session_private_data(sym_op->session,
- driver_id);
+ sess = sym_op->session;
+ else
+ goto error_exit;
break;
case RTE_CRYPTO_OP_SESSIONLESS:
if (!qp->sess_mp ||
rte_mempool_get(qp->sess_mp, (void **)&_sess))
return NULL;
- if (!qp->sess_mp_priv ||
- rte_mempool_get(qp->sess_mp_priv,
- (void **)&_sess_private_data))
- return NULL;
+ sess = _sess;
+ if (sess->sess_data_sz < pmd_data->session_priv_size) {
+ rte_mempool_put(qp->sess_mp, _sess);
+ goto error_exit;
+ }
- sess = _sess_private_data;
if (unlikely(pmd_data->session_configure(qp->mb_mgr,
- sess, sym_op->xform) != 0)) {
+ (void *)sess->driver_priv_data, sym_op->xform) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
- rte_mempool_put(qp->sess_mp_priv, _sess_private_data);
- sess = NULL;
+ goto error_exit;
}
- sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
- set_sym_session_private_data(sym_op->session, driver_id,
- _sess_private_data);
+ sess->driver_id = driver_id;
+ sym_op->session = sess;
+
break;
default:
IPSEC_MB_LOG(ERR, "Unrecognized session type %u", sess_type);
}
- if (unlikely(sess == NULL))
- op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
+ return (void *)sess->driver_priv_data;
- return sess;
+error_exit:
+ op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
+ return NULL;
}
#endif /* _IPSEC_MB_PRIVATE_H_ */
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c b/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
index 2c033c6f28..e4f274b608 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
@@ -241,10 +241,6 @@ handle_completed_gcm_crypto_op(struct ipsec_mb_qp *qp,
/* Free session if a session-less crypto op */
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct aesni_gcm_session));
- memset(op->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- op->sym->session));
- rte_mempool_put(qp->sess_mp_priv, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
@@ -455,44 +451,35 @@ static inline struct aesni_gcm_session *
aesni_gcm_get_session(struct ipsec_mb_qp *qp,
struct rte_crypto_op *op)
{
- struct aesni_gcm_session *sess = NULL;
- uint32_t driver_id =
- ipsec_mb_get_driver_id(IPSEC_MB_PMD_TYPE_AESNI_GCM);
+ struct rte_cryptodev_sym_session *sess = NULL;
struct rte_crypto_sym_op *sym_op = op->sym;
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
if (likely(sym_op->session != NULL))
- sess = (struct aesni_gcm_session *)
- get_sym_session_private_data(sym_op->session,
- driver_id);
+ sess = sym_op->session;
} else {
- void *_sess;
- void *_sess_private_data = NULL;
-
- if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+ if (rte_mempool_get(qp->sess_mp, (void **)&sess))
return NULL;
- if (rte_mempool_get(qp->sess_mp_priv,
- (void **)&_sess_private_data))
+ if (unlikely(sess->sess_data_sz <
+ sizeof(struct aesni_gcm_session))) {
+ rte_mempool_put(qp->sess_mp, sess);
return NULL;
-
- sess = (struct aesni_gcm_session *)_sess_private_data;
+ }
if (unlikely(aesni_gcm_session_configure(qp->mb_mgr,
- _sess_private_data, sym_op->xform) != 0)) {
- rte_mempool_put(qp->sess_mp, _sess);
- rte_mempool_put(qp->sess_mp_priv, _sess_private_data);
+ (void *)sess->driver_priv_data,
+ sym_op->xform) != 0)) {
+ rte_mempool_put(qp->sess_mp, sess);
sess = NULL;
}
- sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
- set_sym_session_private_data(sym_op->session, driver_id,
- _sess_private_data);
+ sym_op->session = sess;
}
if (unlikely(sess == NULL))
op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
- return sess;
+ return (void *)sess->driver_priv_data;
}
static uint16_t
@@ -712,22 +699,15 @@ aesni_gmac_sgl_verify(struct aesni_gcm_session *s,
/** Process CPU crypto bulk operations */
static uint32_t
-aesni_gcm_process_bulk(struct rte_cryptodev *dev,
+aesni_gcm_process_bulk(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess,
__rte_unused union rte_crypto_sym_ofs ofs,
struct rte_crypto_sym_vec *vec)
{
- struct aesni_gcm_session *s;
+ struct aesni_gcm_session *s = (void *)sess->driver_priv_data;
struct gcm_context_data gdata_ctx;
IMB_MGR *mb_mgr;
- s = (struct aesni_gcm_session *) get_sym_session_private_data(sess,
- dev->driver_id);
- if (unlikely(s == NULL)) {
- aesni_gcm_fill_error_code(vec, EINVAL);
- return 0;
- }
-
/* get per-thread MB MGR, create one if needed */
mb_mgr = get_per_thread_mb_mgr();
if (unlikely(mb_mgr == NULL))
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index 6d5d3ce8eb..fe5a7005f3 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -1710,8 +1710,6 @@ post_process_mb_job(struct ipsec_mb_qp *qp, IMB_JOB *job)
{
struct rte_crypto_op *op = (struct rte_crypto_op *)job->user_data;
struct aesni_mb_session *sess = NULL;
- uint32_t driver_id = ipsec_mb_get_driver_id(
- IPSEC_MB_PMD_TYPE_AESNI_MB);
#ifdef AESNI_MB_DOCSIS_SEC_ENABLED
uint8_t is_docsis_sec = 0;
@@ -1725,15 +1723,7 @@ post_process_mb_job(struct ipsec_mb_qp *qp, IMB_JOB *job)
sess = get_sec_session_private_data(op->sym->sec_session);
} else
#endif
- {
- sess = get_sym_session_private_data(op->sym->session,
- driver_id);
- }
-
- if (unlikely(sess == NULL)) {
- op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
- return op;
- }
+ sess = (void *)op->sym->session->driver_priv_data;
if (likely(op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)) {
switch (job->status) {
@@ -1771,10 +1761,6 @@ post_process_mb_job(struct ipsec_mb_qp *qp, IMB_JOB *job)
/* Free session if a session-less crypto op */
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct aesni_mb_session));
- memset(op->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- op->sym->session));
- rte_mempool_put(qp->sess_mp_priv, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
@@ -2028,7 +2014,7 @@ verify_sync_dgst(struct rte_crypto_sym_vec *vec,
}
static uint32_t
-aesni_mb_process_bulk(struct rte_cryptodev *dev,
+aesni_mb_process_bulk(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs sofs,
struct rte_crypto_sym_vec *vec)
{
@@ -2037,15 +2023,9 @@ aesni_mb_process_bulk(struct rte_cryptodev *dev,
void *buf;
IMB_JOB *job;
IMB_MGR *mb_mgr;
- struct aesni_mb_session *s;
+ struct aesni_mb_session *s = (void *)sess->driver_priv_data;
uint8_t tmp_dgst[vec->num][DIGEST_LENGTH_MAX];
- s = get_sym_session_private_data(sess, dev->driver_id);
- if (s == NULL) {
- ipsec_mb_fill_error_code(vec, EINVAL);
- return 0;
- }
-
/* get per-thread MB MGR, create one if needed */
mb_mgr = get_per_thread_mb_mgr();
if (unlikely(mb_mgr == NULL))
diff --git a/drivers/crypto/ipsec_mb/pmd_chacha_poly.c b/drivers/crypto/ipsec_mb/pmd_chacha_poly.c
index d953d6e5f5..97e7cef233 100644
--- a/drivers/crypto/ipsec_mb/pmd_chacha_poly.c
+++ b/drivers/crypto/ipsec_mb/pmd_chacha_poly.c
@@ -290,10 +290,6 @@ handle_completed_chacha20_poly1305_crypto_op(struct ipsec_mb_qp *qp,
/* Free session if a session-less crypto op */
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sess, 0, sizeof(struct chacha20_poly1305_session));
- memset(op->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- op->sym->session));
- rte_mempool_put(qp->sess_mp_priv, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
diff --git a/drivers/crypto/ipsec_mb/pmd_kasumi.c b/drivers/crypto/ipsec_mb/pmd_kasumi.c
index c9d4f9d0ae..b2fb168154 100644
--- a/drivers/crypto/ipsec_mb/pmd_kasumi.c
+++ b/drivers/crypto/ipsec_mb/pmd_kasumi.c
@@ -231,11 +231,6 @@ process_ops(struct rte_crypto_op **ops, struct kasumi_session *session,
/* Free session if a session-less crypto op. */
if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(session, 0, sizeof(struct kasumi_session));
- memset(
- ops[i]->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- ops[i]->sym->session));
- rte_mempool_put(qp->sess_mp_priv, session);
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
}
@@ -287,8 +282,9 @@ process_op_bit(struct rte_crypto_op *op, struct kasumi_session *session,
/* Free session if a session-less crypto op. */
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
- memset(op->sym->session, 0, sizeof(struct kasumi_session));
- rte_cryptodev_sym_session_free(op->sym->session);
+ memset(op->sym->session->driver_priv_data, 0,
+ sizeof(struct kasumi_session));
+ rte_mempool_put(qp->sess_mp, (void *)op->sym->session);
op->sym->session = NULL;
}
return processed_op;
diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c
index 9a85f46721..f052d6d847 100644
--- a/drivers/crypto/ipsec_mb/pmd_snow3g.c
+++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c
@@ -362,10 +362,6 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
/* Free session if a session-less crypto op. */
if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(session, 0, sizeof(struct snow3g_session));
- memset(ops[i]->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- ops[i]->sym->session));
- rte_mempool_put(qp->sess_mp_priv, session);
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
}
@@ -417,8 +413,9 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
/* Free session if a session-less crypto op. */
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
- memset(op->sym->session, 0, sizeof(struct snow3g_session));
- rte_cryptodev_sym_session_free(op->sym->session);
+ memset(op->sym->session->driver_priv_data, 0,
+ sizeof(struct snow3g_session));
+ rte_mempool_put(qp->sess_mp, (void *)op->sym->session);
op->sym->session = NULL;
}
diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c
index e36c7092d6..92fd9d1808 100644
--- a/drivers/crypto/ipsec_mb/pmd_zuc.c
+++ b/drivers/crypto/ipsec_mb/pmd_zuc.c
@@ -239,10 +239,6 @@ process_ops(struct rte_crypto_op **ops, enum ipsec_mb_operation op_type,
/* Free session if a session-less crypto op. */
if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(sessions[i], 0, sizeof(struct zuc_session));
- memset(ops[i]->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- ops[i]->sym->session));
- rte_mempool_put(qp->sess_mp_priv, sessions[i]);
rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
ops[i]->sym->session = NULL;
}
diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index eb7616257e..46ea507cf5 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -171,14 +171,13 @@ mlx5_crypto_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
static int
mlx5_crypto_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *session,
- struct rte_mempool *mp)
+ struct rte_cryptodev_sym_session *session)
{
struct mlx5_crypto_priv *priv = dev->data->dev_private;
- struct mlx5_crypto_session *sess_private_data;
+ struct mlx5_crypto_session *sess_private_data =
+ (void *)session->driver_priv_data;
struct rte_crypto_cipher_xform *cipher;
uint8_t encryption_order;
- int ret;
if (unlikely(xform->next != NULL)) {
DRV_LOG(ERR, "Xform next is not supported.");
@@ -189,17 +188,9 @@ mlx5_crypto_sym_session_configure(struct rte_cryptodev *dev,
DRV_LOG(ERR, "Only AES-XTS algorithm is supported.");
return -ENOTSUP;
}
- ret = rte_mempool_get(mp, (void *)&sess_private_data);
- if (ret != 0) {
- DRV_LOG(ERR,
- "Failed to get session %p private data from mempool.",
- sess_private_data);
- return -ENOMEM;
- }
cipher = &xform->cipher;
sess_private_data->dek = mlx5_crypto_dek_prepare(priv, cipher);
if (sess_private_data->dek == NULL) {
- rte_mempool_put(mp, sess_private_data);
DRV_LOG(ERR, "Failed to prepare dek.");
return -ENOMEM;
}
@@ -239,8 +230,6 @@ mlx5_crypto_sym_session_configure(struct rte_cryptodev *dev,
sess_private_data->dek_id =
rte_cpu_to_be_32(sess_private_data->dek->obj->id &
0xffffff);
- set_sym_session_private_data(session, dev->driver_id,
- sess_private_data);
DRV_LOG(DEBUG, "Session %p was configured.", sess_private_data);
return 0;
}
@@ -250,16 +239,13 @@ mlx5_crypto_sym_session_clear(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess)
{
struct mlx5_crypto_priv *priv = dev->data->dev_private;
- struct mlx5_crypto_session *spriv = get_sym_session_private_data(sess,
- dev->driver_id);
+ struct mlx5_crypto_session *spriv = (void *)sess->driver_priv_data;
if (unlikely(spriv == NULL)) {
DRV_LOG(ERR, "Failed to get session %p private data.", spriv);
return;
}
mlx5_crypto_dek_destroy(priv, spriv->dek);
- set_sym_session_private_data(sess, dev->driver_id, NULL);
- rte_mempool_put(rte_mempool_from_obj(spriv), spriv);
DRV_LOG(DEBUG, "Session %p was cleared.", spriv);
}
@@ -369,8 +355,8 @@ mlx5_crypto_wqe_set(struct mlx5_crypto_priv *priv,
struct rte_crypto_op *op,
struct mlx5_umr_wqe *umr)
{
- struct mlx5_crypto_session *sess = get_sym_session_private_data
- (op->sym->session, mlx5_crypto_driver_id);
+ struct mlx5_crypto_session *sess =
+ (void *)op->sym->session->driver_priv_data;
struct mlx5_wqe_cseg *cseg = &umr->ctr;
struct mlx5_wqe_mkey_cseg *mkc = &umr->mkc;
struct mlx5_wqe_dseg *klms = &umr->kseg[0];
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 04efd9aaa8..bb86f671a4 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -597,13 +597,7 @@ mrvl_request_prepare_crp(struct sam_cio_op_params *request,
return -EINVAL;
}
- sess = (struct mrvl_crypto_session *)get_sym_session_private_data(
- op->sym->session,
- cryptodev_driver_id);
- if (unlikely(sess == NULL)) {
- MRVL_LOG(ERR, "Session was not created for this device!");
- return -EINVAL;
- }
+ sess = (struct mrvl_crypto_session *)op->sym->session->data;
request->sa = sess->sam_sess;
request->cookie = op;
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index f828dc9db5..214c0fcb08 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -736,8 +736,7 @@ mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
static int
mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mp)
+ struct rte_cryptodev_sym_session *sess)
{
struct mrvl_crypto_session *mrvl_sess;
void *sess_private_data;
@@ -748,23 +747,15 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
return -EINVAL;
}
- if (rte_mempool_get(mp, &sess_private_data)) {
- CDEV_LOG_ERR("Couldn't get object from session mempool.");
- return -ENOMEM;
- }
-
+ sess_private_data = sess->data;
memset(sess_private_data, 0, sizeof(struct mrvl_crypto_session));
ret = mrvl_crypto_set_session_parameters(sess_private_data, xform);
if (ret != 0) {
MRVL_LOG(ERR, "Failed to configure session parameters!");
-
- /* Return session to mempool */
- rte_mempool_put(mp, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
if (sam_session_create(&mrvl_sess->sam_sess_params,
@@ -791,8 +782,7 @@ mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess)
{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
+ void *sess_priv = sess->data;
/* Zero out the whole structure */
if (sess_priv) {
@@ -803,11 +793,6 @@ mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
sam_session_destroy(mrvl_sess->sam_sess) < 0) {
MRVL_LOG(ERR, "Error while destroying session!");
}
-
- memset(mrvl_sess, 0, sizeof(struct mrvl_crypto_session));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
}
}
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index cb5393d2f1..505024a810 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -530,24 +530,16 @@ configure_aead_ctx(struct rte_crypto_aead_xform *xform,
}
static int
-nitrox_sym_dev_sess_configure(struct rte_cryptodev *cdev,
+nitrox_sym_dev_sess_configure(struct rte_cryptodev *cdev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
- void *mp_obj;
- struct nitrox_crypto_ctx *ctx;
+ struct nitrox_crypto_ctx *ctx = (void *)sess->driver_priv_data;
struct rte_crypto_cipher_xform *cipher_xform = NULL;
struct rte_crypto_auth_xform *auth_xform = NULL;
struct rte_crypto_aead_xform *aead_xform = NULL;
int ret = -EINVAL;
- if (rte_mempool_get(mempool, &mp_obj)) {
- NITROX_LOG(ERR, "Couldn't allocate context\n");
- return -ENOMEM;
- }
-
- ctx = mp_obj;
ctx->nitrox_chain = get_crypto_chain_order(xform);
switch (ctx->nitrox_chain) {
case NITROX_CHAIN_CIPHER_ONLY:
@@ -585,38 +577,23 @@ nitrox_sym_dev_sess_configure(struct rte_cryptodev *cdev,
goto err;
}
- ctx->iova = rte_mempool_virt2iova(ctx);
- set_sym_session_private_data(sess, cdev->driver_id, ctx);
+ ctx->iova = sess->driver_priv_data_iova;
return 0;
err:
- rte_mempool_put(mempool, mp_obj);
return ret;
}
static void
-nitrox_sym_dev_sess_clear(struct rte_cryptodev *cdev,
- struct rte_cryptodev_sym_session *sess)
-{
- struct nitrox_crypto_ctx *ctx = get_sym_session_private_data(sess,
- cdev->driver_id);
- struct rte_mempool *sess_mp;
-
- if (!ctx)
- return;
-
- memset(ctx, 0, sizeof(*ctx));
- sess_mp = rte_mempool_from_obj(ctx);
- set_sym_session_private_data(sess, cdev->driver_id, NULL);
- rte_mempool_put(sess_mp, ctx);
-}
+nitrox_sym_dev_sess_clear(struct rte_cryptodev *cdev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
static struct nitrox_crypto_ctx *
get_crypto_ctx(struct rte_crypto_op *op)
{
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
if (likely(op->sym->session))
- return get_sym_session_private_data(op->sym->session,
- nitrox_sym_drv_id);
+ return (void *)op->sym->session->driver_priv_data;
}
return NULL;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 9ecb434fd0..09aac3065e 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -58,7 +58,7 @@ process_op(const struct null_crypto_qp *qp, struct rte_crypto_op *op,
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
memset(op->sym->session, 0,
sizeof(struct null_crypto_session));
- rte_cryptodev_sym_session_free(op->sym->session);
+ rte_mempool_put(qp->sess_mp, (void *)op->sym->session);
op->sym->session = NULL;
}
@@ -78,30 +78,21 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
if (likely(sym_op->session != NULL))
sess = (struct null_crypto_session *)
- get_sym_session_private_data(
- sym_op->session, cryptodev_driver_id);
+ sym_op->session->driver_priv_data;
} else {
- void *_sess = NULL;
- void *_sess_private_data = NULL;
+ struct rte_cryptodev_sym_session *_sess = NULL;
if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
return NULL;
- if (rte_mempool_get(qp->sess_mp_priv,
- (void **)&_sess_private_data))
- return NULL;
-
- sess = (struct null_crypto_session *)_sess_private_data;
+ sess = (struct null_crypto_session *)_sess->driver_priv_data;
if (unlikely(null_crypto_set_session_parameters(sess,
sym_op->xform) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
- rte_mempool_put(qp->sess_mp_priv, _sess_private_data);
sess = NULL;
}
- sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
- set_sym_session_private_data(op->sym->session,
- cryptodev_driver_id, _sess_private_data);
+ sym_op->session = _sess;
}
return sess;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 90a675dfff..fb43d3f7b5 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -233,7 +233,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
}
qp->sess_mp = qp_conf->mp_session;
- qp->sess_mp_priv = qp_conf->mp_session_private;
memset(&qp->qp_stats, 0, sizeof(qp->qp_stats));
@@ -256,8 +255,7 @@ null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
static int
null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mp)
+ struct rte_cryptodev_sym_session *sess)
{
void *sess_private_data;
int ret;
@@ -267,43 +265,22 @@ null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
return -EINVAL;
}
- if (rte_mempool_get(mp, &sess_private_data)) {
- NULL_LOG(ERR,
- "Couldn't get object from session mempool");
- return -ENOMEM;
- }
+ sess_private_data = (void *)sess->driver_priv_data;
ret = null_crypto_set_session_parameters(sess_private_data, xform);
if (ret != 0) {
NULL_LOG(ERR, "failed configure session parameters");
-
- /* Return session to mempool */
- rte_mempool_put(mp, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
return 0;
}
/** Clear the memory of session so it doesn't leave key material behind */
static void
-null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess)
-{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
-
- /* Zero out the whole structure */
- if (sess_priv) {
- memset(sess_priv, 0, sizeof(struct null_crypto_session));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
- }
-}
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
static struct rte_cryptodev_ops pmd_ops = {
.dev_configure = null_crypto_pmd_config,
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 89c4345b6f..ae34ce6671 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -31,8 +31,6 @@ struct null_crypto_qp {
/**< Ring for placing process packets */
struct rte_mempool *sess_mp;
/**< Session Mempool */
- struct rte_mempool *sess_mp_priv;
- /**< Session Mempool */
struct rte_cryptodev_stats qp_stats;
/**< Queue pair statistics */
} __rte_cache_aligned;
diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
index e48805fb09..4647d568de 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
+++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
@@ -49,7 +49,6 @@ struct cpt_instance {
uint32_t queue_id;
uintptr_t rsvd;
struct rte_mempool *sess_mp;
- struct rte_mempool *sess_mp_priv;
struct cpt_qp_meta_info meta_info;
uint8_t ca_enabled;
};
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 7aee67ab09..cd5ebc2af6 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -171,7 +171,6 @@ otx_cpt_que_pair_setup(struct rte_cryptodev *dev,
instance->queue_id = que_pair_id;
instance->sess_mp = qp_conf->mp_session;
- instance->sess_mp_priv = qp_conf->mp_session_private;
dev->data->queue_pairs[que_pair_id] = instance;
return 0;
@@ -243,25 +242,19 @@ sym_xform_verify(struct rte_crypto_sym_xform *xform)
}
static int
-sym_session_configure(int driver_id, struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *pool)
+sym_session_configure(struct rte_crypto_sym_xform *xform,
+ struct rte_cryptodev_sym_session *sess)
{
struct rte_crypto_sym_xform *temp_xform = xform;
struct cpt_sess_misc *misc;
vq_cmd_word3_t vq_cmd_w3;
- void *priv;
+ void *priv = (void *)sess->driver_priv_data;
int ret;
ret = sym_xform_verify(xform);
if (unlikely(ret))
return ret;
- if (unlikely(rte_mempool_get(pool, &priv))) {
- CPT_LOG_ERR("Could not allocate session private data");
- return -ENOMEM;
- }
-
memset(priv, 0, sizeof(struct cpt_sess_misc) +
offsetof(struct cpt_ctx, mc_ctx));
@@ -301,9 +294,7 @@ sym_session_configure(int driver_id, struct rte_crypto_sym_xform *xform,
goto priv_put;
}
- set_sym_session_private_data(sess, driver_id, priv);
-
- misc->ctx_dma_addr = rte_mempool_virt2iova(misc) +
+ misc->ctx_dma_addr = sess->driver_priv_data_iova +
sizeof(struct cpt_sess_misc);
vq_cmd_w3.u64 = 0;
@@ -316,17 +307,14 @@ sym_session_configure(int driver_id, struct rte_crypto_sym_xform *xform,
return 0;
priv_put:
- if (priv)
- rte_mempool_put(pool, priv);
return -ENOTSUP;
}
static void
-sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess)
+sym_session_clear(struct rte_cryptodev_sym_session *sess)
{
- void *priv = get_sym_session_private_data(sess, driver_id);
+ void *priv = (void *)sess->driver_priv_data;
struct cpt_sess_misc *misc;
- struct rte_mempool *pool;
struct cpt_ctx *ctx;
if (priv == NULL)
@@ -336,35 +324,26 @@ sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess)
ctx = SESS_PRIV(misc);
rte_free(ctx->auth_key);
-
- memset(priv, 0, cpt_get_session_size());
-
- pool = rte_mempool_from_obj(priv);
-
- set_sym_session_private_data(sess, driver_id, NULL);
-
- rte_mempool_put(pool, priv);
}
static int
-otx_cpt_session_cfg(struct rte_cryptodev *dev,
+otx_cpt_session_cfg(struct rte_cryptodev *dev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *pool)
+ struct rte_cryptodev_sym_session *sess)
{
CPT_PMD_INIT_FUNC_TRACE();
- return sym_session_configure(dev->driver_id, xform, sess, pool);
+ return sym_session_configure(xform, sess);
}
static void
-otx_cpt_session_clear(struct rte_cryptodev *dev,
+otx_cpt_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{
CPT_PMD_INIT_FUNC_TRACE();
- return sym_session_clear(dev->driver_id, sess);
+ return sym_session_clear(sess);
}
static unsigned int
@@ -528,10 +507,7 @@ otx_cpt_enq_single_sym(struct cpt_instance *instance,
void *req;
uint64_t cpt_op;
- sess = (struct cpt_sess_misc *)
- get_sym_session_private_data(sym_op->session,
- otx_cryptodev_driver_id);
-
+ sess = (struct cpt_sess_misc *)sym_op->session->driver_priv_data;
cpt_op = sess->cpt_op;
if (likely(cpt_op & CPT_OP_CIPHER_MASK))
@@ -560,21 +536,18 @@ static __rte_always_inline void * __rte_hot
otx_cpt_enq_single_sym_sessless(struct cpt_instance *instance,
struct rte_crypto_op *op)
{
- const int driver_id = otx_cryptodev_driver_id;
struct rte_crypto_sym_op *sym_op = op->sym;
struct rte_cryptodev_sym_session *sess;
void *req;
int ret;
/* Create temporary session */
- sess = rte_cryptodev_sym_session_create(instance->sess_mp);
- if (sess == NULL) {
+ if (rte_mempool_get(instance->sess_mp, (void **)&sess) < 0) {
rte_errno = ENOMEM;
return NULL;
}
- ret = sym_session_configure(driver_id, sym_op->xform, sess,
- instance->sess_mp_priv);
+ ret = sym_session_configure(sym_op->xform, sess);
if (ret)
goto sess_put;
@@ -583,12 +556,10 @@ otx_cpt_enq_single_sym_sessless(struct cpt_instance *instance,
/* Enqueue op with the tmp session set */
req = otx_cpt_enq_single_sym(instance, op);
if (unlikely(req == NULL))
- goto priv_put;
+ goto sess_put;
return req;
-priv_put:
- sym_session_clear(driver_id, sess);
sess_put:
rte_mempool_put(instance->sess_mp, sess);
return NULL;
@@ -873,13 +844,9 @@ static inline void
free_sym_session_data(const struct cpt_instance *instance,
struct rte_crypto_op *cop)
{
- void *sess_private_data_t = get_sym_session_private_data(
- cop->sym->session, otx_cryptodev_driver_id);
+ void *sess_private_data_t = (void *)cop->sym->session->driver_priv_data;
+
memset(sess_private_data_t, 0, cpt_get_session_size());
- memset(cop->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- cop->sym->session));
- rte_mempool_put(instance->sess_mp_priv, sess_private_data_t);
rte_mempool_put(instance->sess_mp, cop->sym->session);
cop->sym->session = NULL;
}
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index c34fd9a546..ed6841e460 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -70,8 +70,6 @@ struct openssl_qp {
/**< Ring for placing process packets */
struct rte_mempool *sess_mp;
/**< Session Mempool */
- struct rte_mempool *sess_mp_priv;
- /**< Session Private Data Mempool */
struct rte_cryptodev_stats stats;
/**< Queue pair statistics */
uint8_t temp_digest[DIGEST_LENGTH_MAX];
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 392b546a63..48e8ff107b 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -887,10 +887,8 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
/* get existing session */
if (likely(op->sym->session != NULL))
- sess = (struct openssl_session *)
- get_sym_session_private_data(
- op->sym->session,
- cryptodev_driver_id);
+ sess = (void *)
+ op->sym->session->driver_priv_data;
} else {
if (likely(op->asym->session != NULL))
asym_sess = (struct openssl_asym_session *)
@@ -901,32 +899,26 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
return asym_sess;
}
} else {
+ struct rte_cryptodev_sym_session *_sess;
/* sessionless asymmetric not supported */
if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC)
return NULL;
/* provide internal session */
- void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
- void *_sess_private_data = NULL;
+ rte_mempool_get(qp->sess_mp, (void **)&_sess);
if (_sess == NULL)
return NULL;
- if (rte_mempool_get(qp->sess_mp_priv,
- (void **)&_sess_private_data))
- return NULL;
-
- sess = (struct openssl_session *)_sess_private_data;
+ sess = (struct openssl_session *)_sess->driver_priv_data;
if (unlikely(openssl_set_session_parameters(sess,
op->sym->xform) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
- rte_mempool_put(qp->sess_mp_priv, _sess_private_data);
sess = NULL;
}
op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
- set_sym_session_private_data(op->sym->session,
- cryptodev_driver_id, _sess_private_data);
+
}
if (sess == NULL)
@@ -2900,10 +2892,6 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
openssl_reset_session(sess);
memset(sess, 0, sizeof(struct openssl_session));
- memset(op->sym->session, 0,
- rte_cryptodev_sym_get_existing_header_session_size(
- op->sym->session));
- rte_mempool_put(qp->sess_mp_priv, sess);
rte_mempool_put(qp->sess_mp, op->sym->session);
op->sym->session = NULL;
}
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index f7ddbf9c73..2a3662ee5a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -764,7 +764,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
goto qp_setup_cleanup;
qp->sess_mp = qp_conf->mp_session;
- qp->sess_mp_priv = qp_conf->mp_session_private;
memset(&qp->stats, 0, sizeof(qp->stats));
@@ -794,10 +793,9 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
static int
openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
- void *sess_private_data;
+ void *sess_private_data = (void *)sess->driver_priv_data;
int ret;
if (unlikely(sess == NULL)) {
@@ -805,24 +803,14 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
return -EINVAL;
}
- if (rte_mempool_get(mempool, &sess_private_data)) {
- OPENSSL_LOG(ERR,
- "Couldn't get object from session mempool");
- return -ENOMEM;
- }
-
ret = openssl_set_session_parameters(sess_private_data, xform);
if (ret != 0) {
OPENSSL_LOG(ERR, "failed configure session parameters");
/* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
return 0;
}
@@ -1328,20 +1316,13 @@ openssl_pmd_asym_session_configure(struct rte_cryptodev *dev __rte_unused,
/** Clear the memory of session so it doesn't leave key material behind */
static void
-openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
+ void *sess_priv = (void *)sess->driver_priv_data;
/* Zero out the whole structure */
- if (sess_priv) {
- openssl_reset_session(sess_priv);
- memset(sess_priv, 0, sizeof(struct openssl_session));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
- }
+ openssl_reset_session(sess_priv);
}
static void openssl_reset_asym_session(struct openssl_asym_session *sess)
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index db6316fbe9..408ae9e42b 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -67,12 +67,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
return -EINVAL;
if (likely(op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)) {
- ctx = get_sym_session_private_data(op->sym->session,
- qat_sym_driver_id);
- if (unlikely(!ctx)) {
- QAT_DP_LOG(ERR, "No session for this device");
- return -EINVAL;
- }
+ ctx = (void *)op->sym->session->driver_priv_data;
if (sess != (uintptr_t)ctx) {
struct rte_cryptodev *cdev;
struct qat_cryptodev_private *internals;
@@ -391,8 +386,7 @@ qat_sym_configure_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
if (sess_type != RTE_CRYPTO_OP_WITH_SESSION)
return -EINVAL;
- ctx = (struct qat_sym_session *)get_sym_session_private_data(
- session_ctx.crypto_sess, qat_sym_driver_id);
+ ctx = (void *)session_ctx.crypto_sess->driver_priv_data;
dp_ctx->session = ctx;
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 074612c11b..2853ac5b88 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -317,9 +317,7 @@ qat_sym_process_response(void **op, uint8_t *resp, void *op_cookie,
#endif
{
sess = (struct qat_sym_session *)
- get_sym_session_private_data(
- rx_op->sym->session,
- qat_sym_driver_id);
+ rx_op->sym->session->driver_priv_data;
is_docsis_sec = 0;
}
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 52b3455cf0..8dd2357702 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -219,22 +219,13 @@ qat_is_auth_alg_supported(enum rte_crypto_auth_algorithm algo,
}
void
-qat_sym_session_clear(struct rte_cryptodev *dev,
+qat_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
struct rte_cryptodev_sym_session *sess)
{
- uint8_t index = dev->driver_id;
- void *sess_priv = get_sym_session_private_data(sess, index);
- struct qat_sym_session *s = (struct qat_sym_session *)sess_priv;
-
- if (sess_priv) {
- if (s->bpi_ctx)
- bpi_cipher_ctx_free(s->bpi_ctx);
- memset(s, 0, qat_sym_session_get_private_size(dev));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
+ struct qat_sym_session *s = (void *)sess->driver_priv_data;
- set_sym_session_private_data(sess, index, NULL);
- rte_mempool_put(sess_mp, sess_priv);
- }
+ if (s->bpi_ctx)
+ bpi_cipher_ctx_free(s->bpi_ctx);
}
static int
@@ -505,35 +496,24 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
int
qat_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
- void *sess_private_data;
int ret;
- if (rte_mempool_get(mempool, &sess_private_data)) {
- CDEV_LOG_ERR(
- "Couldn't get object from session mempool");
- return -ENOMEM;
- }
-
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
if (ossl_legacy_provider_load())
return -EINVAL;
#endif
- ret = qat_sym_session_set_parameters(dev, xform, sess_private_data);
+ ret = qat_sym_session_set_parameters(dev, xform,
+ (void *)sess->driver_priv_data,
+ sess->driver_priv_data_iova);
if (ret != 0) {
QAT_LOG(ERR,
"Crypto QAT PMD: failed to configure session parameters");
- /* Return session to mempool */
- rte_mempool_put(mempool, sess_private_data);
return ret;
}
- set_sym_session_private_data(sess, dev->driver_id,
- sess_private_data);
-
# if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
ossl_legacy_provider_unload();
# endif
@@ -542,7 +522,8 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
int
qat_sym_session_set_parameters(struct rte_cryptodev *dev,
- struct rte_crypto_sym_xform *xform, void *session_private)
+ struct rte_crypto_sym_xform *xform, void *session_private,
+ rte_iova_t session_paddr)
{
struct qat_sym_session *session = session_private;
struct qat_cryptodev_private *internals = dev->data->dev_private;
@@ -551,7 +532,6 @@ qat_sym_session_set_parameters(struct rte_cryptodev *dev,
int qat_cmd_id;
/* Verify the session physical address is known */
- rte_iova_t session_paddr = rte_mempool_virt2iova(session);
if (session_paddr == 0 || session_paddr == RTE_BAD_IOVA) {
QAT_LOG(ERR,
"Session physical address unknown. Bad memory pool.");
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index 01908abd9e..9e4aab06a6 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -123,12 +123,12 @@ struct qat_sym_session {
int
qat_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool);
+ struct rte_cryptodev_sym_session *sess);
int
qat_sym_session_set_parameters(struct rte_cryptodev *dev,
- struct rte_crypto_sym_xform *xform, void *session_private);
+ struct rte_crypto_sym_xform *xform, void *session_private,
+ rte_iova_t session_private_iova);
int
qat_sym_session_configure_aead(struct rte_cryptodev *dev,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f3a1bd626c..b93821783b 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -468,44 +468,18 @@ scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
}
static int
-scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
- struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+ struct rte_crypto_sym_xform *xform __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
{
- struct scheduler_ctx *sched_ctx = dev->data->dev_private;
- uint32_t i;
- int ret;
-
- for (i = 0; i < sched_ctx->nb_workers; i++) {
- struct scheduler_worker *worker = &sched_ctx->workers[i];
-
- ret = rte_cryptodev_sym_session_init(worker->dev_id, sess,
- xform, mempool);
- if (ret < 0) {
- CR_SCHED_LOG(ERR, "unable to config sym session");
- return ret;
- }
- }
-
return 0;
}
/** Clear the memory of session so it doesn't leave key material behind */
static void
-scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
- struct rte_cryptodev_sym_session *sess)
-{
- struct scheduler_ctx *sched_ctx = dev->data->dev_private;
- uint32_t i;
-
- /* Clear private data of workers */
- for (i = 0; i < sched_ctx->nb_workers; i++) {
- struct scheduler_worker *worker = &sched_ctx->workers[i];
-
- rte_cryptodev_sym_session_clear(worker->dev_id, sess);
- }
-}
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev __rte_unused,
+ struct rte_cryptodev_sym_session *sess __rte_unused)
+{}
static struct rte_cryptodev_ops scheduler_pmd_ops = {
.dev_configure = scheduler_pmd_config,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index ed64866758..6b9e57ee66 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -40,8 +40,7 @@ static void virtio_crypto_sym_clear_session(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess);
static int virtio_crypto_sym_configure_session(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *session,
- struct rte_mempool *mp);
+ struct rte_cryptodev_sym_session *session);
/*
* The set of PCI devices this driver supports
@@ -952,12 +951,7 @@ virtio_crypto_sym_clear_session(
hw = dev->data->dev_private;
vq = hw->cvq;
- session = (struct virtio_crypto_session *)get_sym_session_private_data(
- sess, cryptodev_virtio_driver_id);
- if (session == NULL) {
- VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid session parameter");
- return;
- }
+ session = (struct virtio_crypto_session *)sess->driver_priv_data;
VIRTIO_CRYPTO_SESSION_LOG_INFO("vq->vq_desc_head_idx = %d, "
"vq = %p", vq->vq_desc_head_idx, vq);
@@ -1070,10 +1064,6 @@ virtio_crypto_sym_clear_session(
VIRTIO_CRYPTO_SESSION_LOG_INFO("Close session %"PRIu64" successfully ",
session->session_id);
- memset(session, 0, sizeof(struct virtio_crypto_session));
- struct rte_mempool *sess_mp = rte_mempool_from_obj(session);
- set_sym_session_private_data(sess, cryptodev_virtio_driver_id, NULL);
- rte_mempool_put(sess_mp, session);
rte_free(malloc_virt_addr);
}
@@ -1292,11 +1282,9 @@ static int
virtio_crypto_check_sym_configure_session_paras(
struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sym_sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sym_sess)
{
- if (unlikely(xform == NULL) || unlikely(sym_sess == NULL) ||
- unlikely(mempool == NULL)) {
+ if (unlikely(xform == NULL) || unlikely(sym_sess == NULL)) {
VIRTIO_CRYPTO_SESSION_LOG_ERR("NULL pointer");
return -1;
}
@@ -1311,12 +1299,9 @@ static int
virtio_crypto_sym_configure_session(
struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *sess,
- struct rte_mempool *mempool)
+ struct rte_cryptodev_sym_session *sess)
{
int ret;
- struct virtio_crypto_session crypto_sess;
- void *session_private = &crypto_sess;
struct virtio_crypto_session *session;
struct virtio_crypto_op_ctrl_req *ctrl_req;
enum virtio_crypto_cmd_id cmd_id;
@@ -1328,19 +1313,12 @@ virtio_crypto_sym_configure_session(
PMD_INIT_FUNC_TRACE();
ret = virtio_crypto_check_sym_configure_session_paras(dev, xform,
- sess, mempool);
+ sess);
if (ret < 0) {
VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid parameters");
return ret;
}
-
- if (rte_mempool_get(mempool, &session_private)) {
- VIRTIO_CRYPTO_SESSION_LOG_ERR(
- "Couldn't get object from session mempool");
- return -ENOMEM;
- }
-
- session = (struct virtio_crypto_session *)session_private;
+ session = (struct virtio_crypto_session *)sess->driver_priv_data;
memset(session, 0, sizeof(struct virtio_crypto_session));
ctrl_req = &session->ctrl;
ctrl_req->header.opcode = VIRTIO_CRYPTO_CIPHER_CREATE_SESSION;
@@ -1402,10 +1380,6 @@ virtio_crypto_sym_configure_session(
"Unsupported operation chain order parameter");
goto error_out;
}
-
- set_sym_session_private_data(sess, dev->driver_id,
- session_private);
-
return 0;
error_out:
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 08359b3a39..b7f492a7f2 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -207,8 +207,7 @@ virtqueue_crypto_sym_enqueue_xmit(
offsetof(struct virtio_crypto_op_cookie, iv);
struct rte_crypto_sym_op *sym_op = cop->sym;
struct virtio_crypto_session *session =
- (struct virtio_crypto_session *)get_sym_session_private_data(
- cop->sym->session, cryptodev_virtio_driver_id);
+ (void *)cop->sym->session->driver_priv_data;
struct virtio_crypto_op_data_req *op_data_req;
uint32_t hash_result_len = 0;
struct virtio_crypto_op_cookie *crypto_op_cookie;
diff --git a/examples/fips_validation/fips_dev_self_test.c b/examples/fips_validation/fips_dev_self_test.c
index 19af134bbe..bce903e007 100644
--- a/examples/fips_validation/fips_dev_self_test.c
+++ b/examples/fips_validation/fips_dev_self_test.c
@@ -969,7 +969,6 @@ struct fips_dev_auto_test_env {
struct rte_mempool *mpool;
struct rte_mempool *op_pool;
struct rte_mempool *sess_pool;
- struct rte_mempool *sess_priv_pool;
struct rte_mbuf *mbuf;
struct rte_crypto_op *op;
};
@@ -1479,13 +1478,8 @@ run_single_test(uint8_t dev_id,
return ret;
}
- sess = rte_cryptodev_sym_session_create(env->sess_pool);
- if (!sess)
- return -ENOMEM;
-
- ret = rte_cryptodev_sym_session_init(dev_id,
- sess, &xform, env->sess_priv_pool);
- if (ret < 0) {
+ sess = rte_cryptodev_sym_session_create(dev_id, &xform, env->sess_pool);
+ if (!sess) {
RTE_LOG(ERR, PMD, "Error %i: Init session\n", ret);
return ret;
}
@@ -1508,8 +1502,7 @@ run_single_test(uint8_t dev_id,
1);
} while (n_deqd == 0);
- rte_cryptodev_sym_session_clear(dev_id, sess);
- rte_cryptodev_sym_session_free(sess);
+ rte_cryptodev_sym_session_free(dev_id, sess);
if (env->op->status != RTE_CRYPTO_OP_STATUS_SUCCESS)
return -1;
@@ -1527,7 +1520,6 @@ fips_dev_auto_test_uninit(uint8_t dev_id,
rte_mempool_free(env->mpool);
rte_mempool_free(env->op_pool);
rte_mempool_free(env->sess_pool);
- rte_mempool_free(env->sess_priv_pool);
rte_cryptodev_stop(dev_id);
}
@@ -1535,7 +1527,7 @@ fips_dev_auto_test_uninit(uint8_t dev_id,
static int
fips_dev_auto_test_init(uint8_t dev_id, struct fips_dev_auto_test_env *env)
{
- struct rte_cryptodev_qp_conf qp_conf = {128, NULL, NULL};
+ struct rte_cryptodev_qp_conf qp_conf = {128, NULL};
uint32_t sess_sz = rte_cryptodev_sym_get_private_session_size(dev_id);
struct rte_cryptodev_config conf;
char name[128];
@@ -1579,25 +1571,13 @@ fips_dev_auto_test_init(uint8_t dev_id, struct fips_dev_auto_test_env *env)
snprintf(name, 128, "%s%u", "SELF_TEST_SESS_POOL", dev_id);
env->sess_pool = rte_cryptodev_sym_session_pool_create(name,
- 128, 0, 0, 0, rte_cryptodev_socket_id(dev_id));
+ 128, sess_sz, 0, 0, rte_cryptodev_socket_id(dev_id));
if (!env->sess_pool) {
ret = -ENOMEM;
goto error_exit;
}
- memset(name, 0, 128);
- snprintf(name, 128, "%s%u", "SELF_TEST_SESS_PRIV_POOL", dev_id);
-
- env->sess_priv_pool = rte_mempool_create(name,
- 128, sess_sz, 0, 0, NULL, NULL, NULL,
- NULL, rte_cryptodev_socket_id(dev_id), 0);
- if (!env->sess_priv_pool) {
- ret = -ENOMEM;
- goto error_exit;
- }
-
qp_conf.mp_session = env->sess_pool;
- qp_conf.mp_session_private = env->sess_priv_pool;
ret = rte_cryptodev_queue_pair_setup(dev_id, 0, &qp_conf,
rte_cryptodev_socket_id(dev_id));
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 8bd5a66889..23878f17cd 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -54,7 +54,6 @@ struct cryptodev_fips_validate_env {
uint16_t mbuf_data_room;
struct rte_mempool *mpool;
struct rte_mempool *sess_mpool;
- struct rte_mempool *sess_priv_mpool;
struct rte_mempool *op_pool;
struct rte_mbuf *mbuf;
uint8_t *digest;
@@ -69,7 +68,7 @@ static int
cryptodev_fips_validate_app_int(void)
{
struct rte_cryptodev_config conf = {rte_socket_id(), 1, 0};
- struct rte_cryptodev_qp_conf qp_conf = {128, NULL, NULL};
+ struct rte_cryptodev_qp_conf qp_conf = {128, NULL};
struct rte_cryptodev_info dev_info;
uint32_t sess_sz = rte_cryptodev_sym_get_private_session_size(
env.dev_id);
@@ -109,16 +108,11 @@ cryptodev_fips_validate_app_int(void)
ret = -ENOMEM;
env.sess_mpool = rte_cryptodev_sym_session_pool_create(
- "FIPS_SESS_MEMPOOL", 16, 0, 0, 0, rte_socket_id());
+ "FIPS_SESS_MEMPOOL", 16, sess_sz, 0, 0,
+ rte_socket_id());
if (!env.sess_mpool)
goto error_exit;
- env.sess_priv_mpool = rte_mempool_create("FIPS_SESS_PRIV_MEMPOOL",
- 16, sess_sz, 0, 0, NULL, NULL, NULL,
- NULL, rte_socket_id(), 0);
- if (!env.sess_priv_mpool)
- goto error_exit;
-
env.op_pool = rte_crypto_op_pool_create(
"FIPS_OP_POOL",
RTE_CRYPTO_OP_TYPE_SYMMETRIC,
@@ -133,7 +127,6 @@ cryptodev_fips_validate_app_int(void)
goto error_exit;
qp_conf.mp_session = env.sess_mpool;
- qp_conf.mp_session_private = env.sess_priv_mpool;
ret = rte_cryptodev_queue_pair_setup(env.dev_id, 0, &qp_conf,
rte_socket_id());
@@ -150,7 +143,6 @@ cryptodev_fips_validate_app_int(void)
rte_mempool_free(env.mpool);
rte_mempool_free(env.sess_mpool);
- rte_mempool_free(env.sess_priv_mpool);
rte_mempool_free(env.op_pool);
return ret;
@@ -161,11 +153,9 @@ cryptodev_fips_validate_app_uninit(void)
{
rte_pktmbuf_free(env.mbuf);
rte_crypto_op_free(env.op);
- rte_cryptodev_sym_session_clear(env.dev_id, env.sess);
- rte_cryptodev_sym_session_free(env.sess);
+ rte_cryptodev_sym_session_free(env.dev_id, env.sess);
rte_mempool_free(env.mpool);
rte_mempool_free(env.sess_mpool);
- rte_mempool_free(env.sess_priv_mpool);
rte_mempool_free(env.op_pool);
}
@@ -1201,13 +1191,9 @@ fips_run_test(void)
if (ret < 0)
return ret;
- env.sess = rte_cryptodev_sym_session_create(env.sess_mpool);
- if (!env.sess)
- return -ENOMEM;
-
- ret = rte_cryptodev_sym_session_init(env.dev_id,
- env.sess, &xform, env.sess_priv_mpool);
- if (ret < 0) {
+ env.sess = rte_cryptodev_sym_session_create(env.dev_id, &xform,
+ env.sess_mpool);
+ if (!env.sess) {
RTE_LOG(ERR, USER1, "Error %i: Init session\n",
ret);
goto exit;
@@ -1236,9 +1222,10 @@ fips_run_test(void)
vec.status = env.op->status;
exit:
- rte_cryptodev_sym_session_clear(env.dev_id, env.sess);
- rte_cryptodev_sym_session_free(env.sess);
- env.sess = NULL;
+ if (env.sess) {
+ rte_cryptodev_sym_session_free(env.dev_id, env.sess);
+ env.sess = NULL;
+ }
return ret;
}
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8a25b83535..ce4b4ba806 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1693,8 +1693,6 @@ cryptodevs_init(uint16_t req_queue_num)
qp_conf.nb_descriptors = qp_desc_nb;
qp_conf.mp_session =
socket_ctx[dev_conf.socket_id].session_pool;
- qp_conf.mp_session_private =
- socket_ctx[dev_conf.socket_id].session_priv_pool;
for (qp = 0; qp < dev_conf.nb_queue_pairs; qp++)
if (rte_cryptodev_queue_pair_setup(cdev_id, qp,
&qp_conf, dev_conf.socket_id))
@@ -2523,12 +2521,8 @@ one_session_free(struct rte_ipsec_session *ips)
if (ips->crypto.ses == NULL)
return 0;
- ret = rte_cryptodev_sym_session_clear(ips->crypto.dev_id,
- ips->crypto.ses);
- if (ret)
- return ret;
-
- ret = rte_cryptodev_sym_session_free(ips->crypto.ses);
+ ret = rte_cryptodev_sym_session_free(ips->crypto.dev_id,
+ ips->crypto.ses);
} else {
/* Session has not been created */
if (ips->security.ctx == NULL || ips->security.ses == NULL)
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 7b7bfff696..bb84dcec7e 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -174,11 +174,8 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
}
ips->crypto.dev_id = cdev_id;
- ips->crypto.ses = rte_cryptodev_sym_session_create(
- skt_ctx->session_pool);
- rte_cryptodev_sym_session_init(cdev_id,
- ips->crypto.ses, sa->xforms,
- skt_ctx->session_priv_pool);
+ ips->crypto.ses = rte_cryptodev_sym_session_create(cdev_id,
+ sa->xforms, skt_ctx->session_pool);
rte_cryptodev_info_get(cdev_id, &cdev_info);
}
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index bf4b862379..b555e63ff6 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -228,7 +228,6 @@ struct rte_mempool *l2fwd_pktmbuf_pool;
struct rte_mempool *l2fwd_crypto_op_pool;
static struct {
struct rte_mempool *sess_mp;
- struct rte_mempool *priv_mp;
} session_pool_socket[RTE_MAX_NUMA_NODES];
/* Per-port statistics struct */
@@ -675,7 +674,6 @@ static struct rte_cryptodev_sym_session *
initialize_crypto_session(struct l2fwd_crypto_options *options, uint8_t cdev_id)
{
struct rte_crypto_sym_xform *first_xform;
- struct rte_cryptodev_sym_session *session;
int retval = rte_cryptodev_socket_id(cdev_id);
if (retval < 0)
@@ -697,17 +695,8 @@ initialize_crypto_session(struct l2fwd_crypto_options *options, uint8_t cdev_id)
first_xform = &options->auth_xform;
}
- session = rte_cryptodev_sym_session_create(
+ return rte_cryptodev_sym_session_create(cdev_id, first_xform,
session_pool_socket[socket_id].sess_mp);
- if (session == NULL)
- return NULL;
-
- if (rte_cryptodev_sym_session_init(cdev_id, session,
- first_xform,
- session_pool_socket[socket_id].priv_mp) < 0)
- return NULL;
-
- return session;
}
/* >8 End of creation of session. */
@@ -2380,13 +2369,10 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
rte_cryptodev_info_get(cdev_id, &dev_info);
- /*
- * Two sessions objects are required for each session
- * (one for the header, one for the private data)
- */
if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
#ifdef RTE_CRYPTO_SCHEDULER
- uint32_t nb_workers =
+ /* scheduler session header + 1 session per worker */
+ uint32_t nb_workers = 1 +
rte_cryptodev_scheduler_workers_get(cdev_id,
NULL);
@@ -2395,41 +2381,15 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
} else
sessions_needed = enabled_cdev_count;
- if (session_pool_socket[socket_id].priv_mp == NULL) {
- char mp_name[RTE_MEMPOOL_NAMESIZE];
-
- snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
- "priv_sess_mp_%u", socket_id);
-
- session_pool_socket[socket_id].priv_mp =
- rte_mempool_create(mp_name,
- sessions_needed,
- max_sess_sz,
- 0, 0, NULL, NULL, NULL,
- NULL, socket_id,
- 0);
-
- if (session_pool_socket[socket_id].priv_mp == NULL) {
- printf("Cannot create pool on socket %d\n",
- socket_id);
- return -ENOMEM;
- }
-
- printf("Allocated pool \"%s\" on socket %d\n",
- mp_name, socket_id);
- }
-
if (session_pool_socket[socket_id].sess_mp == NULL) {
char mp_name[RTE_MEMPOOL_NAMESIZE];
snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
"sess_mp_%u", socket_id);
session_pool_socket[socket_id].sess_mp =
- rte_cryptodev_sym_session_pool_create(
- mp_name,
- sessions_needed,
- 0, 0, 0, socket_id);
-
+ rte_cryptodev_sym_session_pool_create(
+ mp_name, sessions_needed, max_sess_sz,
+ 0, 0, socket_id);
if (session_pool_socket[socket_id].sess_mp == NULL) {
printf("Cannot create pool on socket %d\n",
socket_id);
@@ -2580,8 +2540,6 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
qp_conf.nb_descriptors = 2048;
qp_conf.mp_session = session_pool_socket[socket_id].sess_mp;
- qp_conf.mp_session_private =
- session_pool_socket[socket_id].priv_mp;
retval = rte_cryptodev_queue_pair_setup(cdev_id, 0, &qp_conf,
socket_id);
diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 7d75623a5e..02987ebd76 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -46,7 +46,6 @@ struct vhost_crypto_info {
int vids[MAX_NB_SOCKETS];
uint32_t nb_vids;
struct rte_mempool *sess_pool;
- struct rte_mempool *sess_priv_pool;
struct rte_mempool *cop_pool;
uint8_t cid;
uint32_t qid;
@@ -304,7 +303,6 @@ new_device(int vid)
}
ret = rte_vhost_crypto_create(vid, info->cid, info->sess_pool,
- info->sess_priv_pool,
rte_lcore_to_socket_id(options.los[i].lcore_id));
if (ret) {
RTE_LOG(ERR, USER1, "Cannot create vhost crypto\n");
@@ -458,7 +456,6 @@ free_resource(void)
rte_mempool_free(info->cop_pool);
rte_mempool_free(info->sess_pool);
- rte_mempool_free(info->sess_priv_pool);
for (j = 0; j < lo->nb_sockets; j++) {
rte_vhost_driver_unregister(lo->socket_files[i]);
@@ -544,16 +541,12 @@ main(int argc, char *argv[])
snprintf(name, 127, "SESS_POOL_%u", lo->lcore_id);
info->sess_pool = rte_cryptodev_sym_session_pool_create(name,
- SESSION_MAP_ENTRIES, 0, 0, 0,
- rte_lcore_to_socket_id(lo->lcore_id));
-
- snprintf(name, 127, "SESS_POOL_PRIV_%u", lo->lcore_id);
- info->sess_priv_pool = rte_mempool_create(name,
SESSION_MAP_ENTRIES,
rte_cryptodev_sym_get_private_session_size(
- info->cid), 64, 0, NULL, NULL, NULL, NULL,
- rte_lcore_to_socket_id(lo->lcore_id), 0);
- if (!info->sess_priv_pool || !info->sess_pool) {
+ info->cid), 0, 0,
+ rte_lcore_to_socket_id(lo->lcore_id));
+
+ if (!info->sess_pool) {
RTE_LOG(ERR, USER1, "Failed to create mempool");
goto error_exit;
}
@@ -574,7 +567,6 @@ main(int argc, char *argv[])
qp_conf.nb_descriptors = NB_CRYPTO_DESCRIPTORS;
qp_conf.mp_session = info->sess_pool;
- qp_conf.mp_session_private = info->sess_priv_pool;
for (j = 0; j < dev_info.max_nb_queue_pairs; j++) {
ret = rte_cryptodev_queue_pair_setup(info->cid, j,
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 3dcc3cb7ed..f518a0f89b 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -301,7 +301,6 @@ typedef unsigned int (*cryptodev_asym_get_session_private_size_t)(
* @param dev Crypto device pointer
* @param xform Single or chain of crypto xforms
* @param session Pointer to cryptodev's private session structure
- * @param mp Mempool where the private session is allocated
*
* @return
* - Returns 0 if private session structure have been created successfully.
@@ -311,8 +310,8 @@ typedef unsigned int (*cryptodev_asym_get_session_private_size_t)(
*/
typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
- struct rte_cryptodev_sym_session *session,
- struct rte_mempool *mp);
+ struct rte_cryptodev_sym_session *session);
+
/**
* Configure a Crypto asymmetric session on a device.
*
@@ -337,6 +336,7 @@ typedef int (*cryptodev_asym_configure_session_t)(struct rte_cryptodev *dev,
*/
typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess);
+
/**
* Clear asymmetric session private data.
*
@@ -637,28 +637,6 @@ __rte_internal
void *
rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
-static inline void *
-get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
- uint8_t driver_id) {
- if (unlikely(sess->nb_drivers <= driver_id))
- return NULL;
-
- return sess->sess_data[driver_id].data;
-}
-
-static inline void
-set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
- uint8_t driver_id, void *private_data)
-{
- if (unlikely(sess->nb_drivers <= driver_id)) {
- CDEV_LOG_ERR("Set private data for driver %u not allowed\n",
- driver_id);
- return;
- }
-
- sess->sess_data[driver_id].data = private_data;
-}
-
/**
* @internal
* Cryptodev asymmetric crypto session.
diff --git a/lib/cryptodev/cryptodev_trace_points.c b/lib/cryptodev/cryptodev_trace_points.c
index c5bfe08b79..019fc0c800 100644
--- a/lib/cryptodev/cryptodev_trace_points.c
+++ b/lib/cryptodev/cryptodev_trace_points.c
@@ -39,12 +39,6 @@ RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_free,
RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_free,
lib.cryptodev.asym.free)
-RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_init,
- lib.cryptodev.sym.init)
-
-RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_clear,
- lib.cryptodev.sym.clear)
-
RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_enqueue_burst,
lib.cryptodev.enq.burst)
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 42f3221052..63b8255a45 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -190,12 +190,9 @@ const char *rte_crypto_asym_ke_strings[] = {
[RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY] = "pub_ec_key_verify"
};
-/**
- * The private data structure stored in the sym session mempool private data.
- */
struct rte_cryptodev_sym_session_pool_private_data {
- uint16_t nb_drivers;
- /**< number of elements in sess_data array */
+ uint16_t sess_data_sz;
+ /**< driver session data size */
uint16_t user_data_sz;
/**< session user data will be placed after sess_data */
};
@@ -1202,6 +1199,24 @@ rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
return 0;
}
+static uint8_t
+rte_cryptodev_sym_is_valid_session_pool(struct rte_mempool *mp,
+ uint32_t sess_priv_size)
+{
+ struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
+
+ if (!mp)
+ return 0;
+
+ pool_priv = rte_mempool_get_priv(mp);
+
+ if (!pool_priv || mp->private_data_size < sizeof(*pool_priv) ||
+ pool_priv->sess_data_sz < sess_priv_size)
+ return 0;
+
+ return 1;
+}
+
int
rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id)
@@ -1225,17 +1240,8 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
return -EINVAL;
}
- if ((qp_conf->mp_session && !qp_conf->mp_session_private) ||
- (!qp_conf->mp_session && qp_conf->mp_session_private)) {
- CDEV_LOG_ERR("Invalid mempools\n");
- return -EINVAL;
- }
-
if (qp_conf->mp_session) {
struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
- uint32_t obj_size = qp_conf->mp_session->elt_size;
- uint32_t obj_priv_size = qp_conf->mp_session_private->elt_size;
- struct rte_cryptodev_sym_session s = {0};
pool_priv = rte_mempool_get_priv(qp_conf->mp_session);
if (!pool_priv || qp_conf->mp_session->private_data_size <
@@ -1244,13 +1250,9 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
return -EINVAL;
}
- s.nb_drivers = pool_priv->nb_drivers;
- s.user_data_sz = pool_priv->user_data_sz;
-
- if ((rte_cryptodev_sym_get_existing_header_session_size(&s) >
- obj_size) || (s.nb_drivers <= dev->driver_id) ||
- rte_cryptodev_sym_get_private_session_size(dev_id) >
- obj_priv_size) {
+ if (!rte_cryptodev_sym_is_valid_session_pool(
+ qp_conf->mp_session,
+ rte_cryptodev_sym_get_private_session_size(dev_id))) {
CDEV_LOG_ERR("Invalid mempool\n");
return -EINVAL;
}
@@ -1710,53 +1712,6 @@ rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
rte_spinlock_unlock(&rte_cryptodev_cb_lock);
}
-int
-rte_cryptodev_sym_session_init(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess,
- struct rte_crypto_sym_xform *xforms,
- struct rte_mempool *mp)
-{
- struct rte_cryptodev *dev;
- uint32_t sess_priv_sz = rte_cryptodev_sym_get_private_session_size(
- dev_id);
- uint8_t index;
- int ret;
-
- if (!rte_cryptodev_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = rte_cryptodev_pmd_get_dev(dev_id);
-
- if (sess == NULL || xforms == NULL || dev == NULL || mp == NULL)
- return -EINVAL;
-
- if (mp->elt_size < sess_priv_sz)
- return -EINVAL;
-
- index = dev->driver_id;
- if (index >= sess->nb_drivers)
- return -EINVAL;
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);
-
- if (sess->sess_data[index].refcnt == 0) {
- ret = dev->dev_ops->sym_session_configure(dev, xforms,
- sess, mp);
- if (ret < 0) {
- CDEV_LOG_ERR(
- "dev_id %d failed to configure session details",
- dev_id);
- return ret;
- }
- }
-
- rte_cryptodev_trace_sym_session_init(dev_id, sess, xforms, mp);
- sess->sess_data[index].refcnt++;
- return 0;
-}
-
struct rte_mempool *
rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
uint32_t elt_size, uint32_t cache_size, uint16_t user_data_size,
@@ -1766,16 +1721,13 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
uint32_t obj_sz;
- obj_sz = rte_cryptodev_sym_get_header_session_size() + user_data_size;
- if (obj_sz > elt_size)
- CDEV_LOG_INFO("elt_size %u is expanded to %u\n", elt_size,
- obj_sz);
- else
- obj_sz = elt_size;
+ obj_sz = sizeof(struct rte_cryptodev_sym_session) + elt_size +
+ user_data_size;
+ obj_sz = RTE_ALIGN_CEIL(obj_sz, RTE_CACHE_LINE_SIZE);
mp = rte_mempool_create(name, nb_elts, obj_sz, cache_size,
- (uint32_t)(sizeof(*pool_priv)),
- NULL, NULL, NULL, NULL,
+ (uint32_t)(sizeof(*pool_priv)), NULL, NULL,
+ NULL, NULL,
socket_id, 0);
if (mp == NULL) {
CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
@@ -1791,7 +1743,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
return NULL;
}
- pool_priv->nb_drivers = nb_drivers;
+ pool_priv->sess_data_sz = elt_size;
pool_priv->user_data_sz = user_data_size;
rte_cryptodev_trace_sym_session_pool_create(name, nb_elts,
@@ -1849,64 +1801,68 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
return mp;
}
-static unsigned int
-rte_cryptodev_sym_session_data_size(struct rte_cryptodev_sym_session *sess)
-{
- return (sizeof(sess->sess_data[0]) * sess->nb_drivers) +
- sess->user_data_sz;
-}
-
-static uint8_t
-rte_cryptodev_sym_is_valid_session_pool(struct rte_mempool *mp)
+void *
+rte_cryptodev_sym_session_create(uint8_t dev_id,
+ struct rte_crypto_sym_xform *xforms,
+ struct rte_mempool *mp)
{
+ struct rte_cryptodev *dev;
+ struct rte_cryptodev_sym_session *sess;
struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
- if (!mp)
- return 0;
-
- pool_priv = rte_mempool_get_priv(mp);
-
- if (!pool_priv || mp->private_data_size < sizeof(*pool_priv) ||
- pool_priv->nb_drivers != nb_drivers ||
- mp->elt_size <
- rte_cryptodev_sym_get_header_session_size()
- + pool_priv->user_data_sz)
- return 0;
+ uint32_t sess_priv_sz;
+ int ret;
- return 1;
-}
+ if (!rte_cryptodev_is_valid_dev(dev_id)) {
+ CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+ return NULL;
+ }
-struct rte_cryptodev_sym_session *
-rte_cryptodev_sym_session_create(struct rte_mempool *mp)
-{
- struct rte_cryptodev_sym_session *sess;
- struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
+ if (xforms == NULL) {
+ CDEV_LOG_ERR("Invalid xform\n");
+ return NULL;
+ }
- if (!rte_cryptodev_sym_is_valid_session_pool(mp)) {
+ sess_priv_sz = rte_cryptodev_sym_get_private_session_size(dev_id);
+ if (!rte_cryptodev_sym_is_valid_session_pool(mp, sess_priv_sz)) {
CDEV_LOG_ERR("Invalid mempool\n");
return NULL;
}
- pool_priv = rte_mempool_get_priv(mp);
+ dev = rte_cryptodev_pmd_get_dev(dev_id);
/* Allocate a session structure from the session pool */
if (rte_mempool_get(mp, (void **)&sess)) {
CDEV_LOG_ERR("couldn't get object from session mempool");
+ rte_errno = ENOMEM;
return NULL;
}
- sess->nb_drivers = pool_priv->nb_drivers;
+ pool_priv = rte_mempool_get_priv(mp);
+ sess->driver_id = dev->driver_id;
+ sess->sess_data_sz = pool_priv->sess_data_sz;
sess->user_data_sz = pool_priv->user_data_sz;
- sess->opaque_data = 0;
+ sess->driver_priv_data_iova = rte_mempool_virt2iova(sess) +
+ offsetof(struct rte_cryptodev_sym_session, driver_priv_data);
- /* Clear device session pointer.
- * Include the flag indicating presence of user data
- */
- memset(sess->sess_data, 0,
- rte_cryptodev_sym_session_data_size(sess));
+ if (dev->dev_ops->sym_session_configure == NULL) {
+ rte_errno = ENOTSUP;
+ goto error_exit;
+ }
- rte_cryptodev_trace_sym_session_create(mp, sess);
- return sess;
+ ret = dev->dev_ops->sym_session_configure(dev, xforms, sess);
+ if (ret < 0) {
+ rte_errno = -ret;
+ goto error_exit;
+ }
+ sess->driver_id = dev->driver_id;
+
+ rte_cryptodev_trace_sym_session_create(dev_id, sess, xforms, mp);
+
+ return (void *)sess;
+error_exit:
+ rte_mempool_put(mp, (void *)sess);
+ return NULL;
}
int
@@ -1985,11 +1941,15 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
}
int
-rte_cryptodev_sym_session_clear(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess)
+rte_cryptodev_sym_session_free(uint8_t dev_id,
+ struct rte_cryptodev_sym_session *sess)
{
struct rte_cryptodev *dev;
- uint8_t driver_id;
+ struct rte_mempool *sess_mp;
+ struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
+
+ if (sess == NULL)
+ return -EINVAL;
if (!rte_cryptodev_is_valid_dev(dev_id)) {
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
@@ -2001,37 +1961,24 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
if (dev == NULL || sess == NULL)
return -EINVAL;
- driver_id = dev->driver_id;
- if (sess->sess_data[driver_id].refcnt == 0)
- return 0;
- if (--sess->sess_data[driver_id].refcnt != 0)
- return -EBUSY;
+ sess_mp = rte_mempool_from_obj(sess);
+ if (!sess_mp)
+ return -EINVAL;
+ pool_priv = rte_mempool_get_priv(sess_mp);
+
+ if (sess->driver_id != dev->driver_id) {
+ CDEV_LOG_ERR("Session created by driver %u but freed by %u",
+ sess->driver_id, dev->driver_id);
+ return -EINVAL;
+ }
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);
dev->dev_ops->sym_session_clear(dev, sess);
-
- rte_cryptodev_trace_sym_session_clear(dev_id, sess);
- return 0;
-}
-
-int
-rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
-{
- uint8_t i;
- struct rte_mempool *sess_mp;
-
- if (sess == NULL)
- return -EINVAL;
-
- /* Check that all device private data has been freed */
- for (i = 0; i < sess->nb_drivers; i++) {
- if (sess->sess_data[i].refcnt != 0)
- return -EBUSY;
- }
+ memset(sess->driver_priv_data, 0, pool_priv->sess_data_sz +
+ pool_priv->user_data_sz);
/* Return session to mempool */
- sess_mp = rte_mempool_from_obj(sess);
rte_mempool_put(sess_mp, sess);
rte_cryptodev_trace_sym_session_free(sess);
@@ -2068,33 +2015,6 @@ rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess)
return 0;
}
-unsigned int
-rte_cryptodev_sym_get_header_session_size(void)
-{
- /*
- * Header contains pointers to the private data of all registered
- * drivers and all necessary information to ensure safely clear
- * or free al session.
- */
- struct rte_cryptodev_sym_session s = {0};
-
- s.nb_drivers = nb_drivers;
-
- return (unsigned int)(sizeof(s) +
- rte_cryptodev_sym_session_data_size(&s));
-}
-
-unsigned int
-rte_cryptodev_sym_get_existing_header_session_size(
- struct rte_cryptodev_sym_session *sess)
-{
- if (!sess)
- return 0;
- else
- return (unsigned int)(sizeof(*sess) +
- rte_cryptodev_sym_session_data_size(sess));
-}
-
unsigned int
rte_cryptodev_asym_get_header_session_size(void)
{
@@ -2141,9 +2061,8 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
int
rte_cryptodev_sym_session_set_user_data(
- struct rte_cryptodev_sym_session *sess,
- void *data,
- uint16_t size)
+ struct rte_cryptodev_sym_session *sess, void *data,
+ uint16_t size)
{
if (sess == NULL)
return -EINVAL;
@@ -2151,18 +2070,17 @@ rte_cryptodev_sym_session_set_user_data(
if (sess->user_data_sz < size)
return -ENOMEM;
- rte_memcpy(sess->sess_data + sess->nb_drivers, data, size);
+ rte_memcpy(sess->driver_priv_data + sess->sess_data_sz, data, size);
return 0;
}
void *
-rte_cryptodev_sym_session_get_user_data(
- struct rte_cryptodev_sym_session *sess)
+rte_cryptodev_sym_session_get_user_data(struct rte_cryptodev_sym_session *sess)
{
if (sess == NULL || sess->user_data_sz == 0)
return NULL;
- return (void *)(sess->sess_data + sess->nb_drivers);
+ return (void *)(sess->driver_priv_data + sess->sess_data_sz);
}
int
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 56f459c6a0..0c65958f25 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -544,8 +544,6 @@ struct rte_cryptodev_qp_conf {
uint32_t nb_descriptors; /**< Number of descriptors per queue pair */
struct rte_mempool *mp_session;
/**< The mempool for creating session in sessionless mode */
- struct rte_mempool *mp_session_private;
- /**< The mempool for creating sess private data in sessionless mode */
};
/**
@@ -909,17 +907,21 @@ rte_cryptodev_get_sec_ctx(uint8_t dev_id);
* has a fixed algo, key, op-type, digest_len etc.
*/
struct rte_cryptodev_sym_session {
+ RTE_MARKER cacheline0;
+ uint8_t driver_id;
uint64_t opaque_data;
/**< Can be used for external metadata */
- uint16_t nb_drivers;
- /**< number of elements in sess_data array */
+ uint32_t sess_data_sz;
+ /**< Pointer to the user data stored after sess data */
uint16_t user_data_sz;
- /**< session user data will be placed after sess_data */
- __extension__ struct {
- void *data;
- uint16_t refcnt;
- } sess_data[];
- /**< Driver specific session material, variable size */
+ /**< session user data will be placed after sess data */
+ rte_iova_t driver_priv_data_iova;
+ /**< session driver data IOVA address */
+
+ RTE_MARKER cacheline1 __rte_cache_min_aligned;
+ /**< second cache line - start of the driver session data */
+ uint8_t driver_priv_data[0];
+ /**< Driver specific session data, variable size */
};
/**
@@ -954,6 +956,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
int socket_id);
+
/**
* Create an asymmetric session mempool.
*
@@ -980,17 +983,22 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
uint32_t cache_size, uint16_t user_data_size, int socket_id);
/**
- * Create symmetric crypto session header (generic with no private data)
+ * Create symmetric crypto session and fill out private data for the device id,
+ * based on its device type.
+ *
+ * @param dev_id ID of device that we want the session to be used on
+ * @param xforms Symmetric crypto transform operations to apply on flow
+ * processed with this session
+ * @param mempool Mempool where the private data is allocated.
*
- * @param mempool Symmetric session mempool to allocate session
- * objects from
* @return
- * - On success return pointer to sym-session
- * - On failure returns NULL
+ * - On success return pointer to sym-session.
+ * - On failure returns NULL.
*/
-struct rte_cryptodev_sym_session *
-rte_cryptodev_sym_session_create(struct rte_mempool *mempool);
-
+void *
+rte_cryptodev_sym_session_create(uint8_t dev_id,
+ struct rte_crypto_sym_xform *xforms,
+ struct rte_mempool *mp);
/**
* Create and initialise an asymmetric crypto session structure.
* Calls the PMD to configure the private session data.
@@ -1015,19 +1023,20 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
void **session);
/**
- * Frees symmetric crypto session header, after checking that all
- * the device private data has been freed, returning it
- * to its original mempool.
+ * Frees session for the device id and returning it to its mempool.
+ * It is the application's responsibility to ensure that the session
+ * is not still in-flight operations using it.
*
+ * @param dev_id ID of device that uses the session.
* @param sess Session header to be freed.
*
* @return
* - 0 if successful.
- * - -EINVAL if session is NULL.
- * - -EBUSY if not all device private data has been freed.
+ * - -EINVAL if session is NULL or the mismatched device ids.
*/
int
-rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
+rte_cryptodev_sym_session_free(uint8_t dev_id,
+ struct rte_cryptodev_sym_session *sess);
/**
* Clears and frees asymmetric crypto session header and private data,
@@ -1044,72 +1053,6 @@ __rte_experimental
int
rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess);
-/**
- * Fill out private data for the device id, based on its device type.
- *
- * @param dev_id ID of device that we want the session to be used on
- * @param sess Session where the private data will be attached to
- * @param xforms Symmetric crypto transform operations to apply on flow
- * processed with this session
- * @param mempool Mempool where the private data is allocated.
- *
- * @return
- * - On success, zero.
- * - -EINVAL if input parameters are invalid.
- * - -ENOTSUP if crypto device does not support the crypto transform or
- * does not support symmetric operations.
- * - -ENOMEM if the private session could not be allocated.
- */
-int
-rte_cryptodev_sym_session_init(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess,
- struct rte_crypto_sym_xform *xforms,
- struct rte_mempool *mempool);
-
-/**
- * Frees private data for the device id, based on its device type,
- * returning it to its mempool. It is the application's responsibility
- * to ensure that private session data is not cleared while there are
- * still in-flight operations using it.
- *
- * @param dev_id ID of device that uses the session.
- * @param sess Session containing the reference to the private data
- *
- * @return
- * - 0 if successful.
- * - -EINVAL if device is invalid or session is NULL.
- * - -ENOTSUP if crypto device does not support symmetric operations.
- */
-int
-rte_cryptodev_sym_session_clear(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess);
-
-/**
- * Get the size of the header session, for all registered drivers excluding
- * the user data size.
- *
- * @return
- * Size of the symmetric header session.
- */
-unsigned int
-rte_cryptodev_sym_get_header_session_size(void);
-
-/**
- * Get the size of the header session from created session.
- *
- * @param sess
- * The sym cryptodev session pointer
- *
- * @return
- * - If sess is not NULL, return the size of the header session including
- * the private data size defined within sess.
- * - If sess is NULL, return 0.
- */
-__rte_experimental
-unsigned int
-rte_cryptodev_sym_get_existing_header_session_size(
- struct rte_cryptodev_sym_session *sess);
-
/**
* Get the size of the asymmetric session header.
*
diff --git a/lib/cryptodev/rte_cryptodev_trace.h b/lib/cryptodev/rte_cryptodev_trace.h
index a3f6048e7d..055c44fb22 100644
--- a/lib/cryptodev/rte_cryptodev_trace.h
+++ b/lib/cryptodev/rte_cryptodev_trace.h
@@ -56,7 +56,6 @@ RTE_TRACE_POINT(
rte_trace_point_emit_u16(queue_pair_id);
rte_trace_point_emit_u32(conf->nb_descriptors);
rte_trace_point_emit_ptr(conf->mp_session);
- rte_trace_point_emit_ptr(conf->mp_session_private);
)
RTE_TRACE_POINT(
@@ -74,13 +73,16 @@ RTE_TRACE_POINT(
RTE_TRACE_POINT(
rte_cryptodev_trace_sym_session_create,
- RTE_TRACE_POINT_ARGS(void *mempool,
- struct rte_cryptodev_sym_session *sess),
- rte_trace_point_emit_ptr(mempool);
+ RTE_TRACE_POINT_ARGS(uint8_t dev_id,
+ struct rte_cryptodev_sym_session *sess, void *xforms,
+ void *mempool),
+ rte_trace_point_emit_u8(dev_id);
rte_trace_point_emit_ptr(sess);
rte_trace_point_emit_u64(sess->opaque_data);
- rte_trace_point_emit_u16(sess->nb_drivers);
+ rte_trace_point_emit_u8(sess->driver_id);
rte_trace_point_emit_u16(sess->user_data_sz);
+ rte_trace_point_emit_ptr(xforms);
+ rte_trace_point_emit_ptr(mempool);
)
RTE_TRACE_POINT(
@@ -117,27 +119,6 @@ RTE_TRACE_POINT(
rte_trace_point_emit_ptr(sess);
)
-RTE_TRACE_POINT(
- rte_cryptodev_trace_sym_session_init,
- RTE_TRACE_POINT_ARGS(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess, void *xforms,
- void *mempool),
- rte_trace_point_emit_u8(dev_id);
- rte_trace_point_emit_ptr(sess);
- rte_trace_point_emit_u64(sess->opaque_data);
- rte_trace_point_emit_u16(sess->nb_drivers);
- rte_trace_point_emit_u16(sess->user_data_sz);
- rte_trace_point_emit_ptr(xforms);
- rte_trace_point_emit_ptr(mempool);
-)
-
-RTE_TRACE_POINT(
- rte_cryptodev_trace_sym_session_clear,
- RTE_TRACE_POINT_ARGS(uint8_t dev_id, void *sess),
- rte_trace_point_emit_u8(dev_id);
- rte_trace_point_emit_ptr(sess);
-)
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 5aee87c6f7..6fcf6ae985 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -38,12 +38,9 @@ DPDK_23 {
rte_cryptodev_sym_capability_check_auth;
rte_cryptodev_sym_capability_check_cipher;
rte_cryptodev_sym_capability_get;
- rte_cryptodev_sym_get_header_session_size;
rte_cryptodev_sym_get_private_session_size;
- rte_cryptodev_sym_session_clear;
rte_cryptodev_sym_session_create;
rte_cryptodev_sym_session_free;
- rte_cryptodev_sym_session_init;
local: *;
};
@@ -60,7 +57,6 @@ EXPERIMENTAL {
rte_cryptodev_asym_xform_capability_check_modlen;
rte_cryptodev_asym_xform_capability_check_optype;
rte_cryptodev_sym_cpu_crypto_process;
- rte_cryptodev_sym_get_existing_header_session_size;
rte_cryptodev_sym_session_get_user_data;
rte_cryptodev_sym_session_pool_create;
rte_cryptodev_sym_session_set_user_data;
@@ -78,8 +74,6 @@ EXPERIMENTAL {
__rte_cryptodev_trace_asym_session_create;
__rte_cryptodev_trace_sym_session_free;
__rte_cryptodev_trace_asym_session_free;
- __rte_cryptodev_trace_sym_session_init;
- __rte_cryptodev_trace_sym_session_clear;
__rte_cryptodev_trace_dequeue_burst;
__rte_cryptodev_trace_enqueue_burst;
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index b1310be565..cb792bbe0d 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -1898,17 +1898,11 @@ sym_crypto_apply(struct sym_crypto_data *data,
}
}
- session = rte_cryptodev_sym_session_create(cfg->mp_create);
+ session = rte_cryptodev_sym_session_create(cfg->cryptodev_id,
+ p->xform, cfg->mp_create);
if (!session)
return -ENOMEM;
- ret = rte_cryptodev_sym_session_init(cfg->cryptodev_id, session,
- p->xform, cfg->mp_init);
- if (ret < 0) {
- rte_cryptodev_sym_session_free(session);
- return ret;
- }
-
data->data_offset = (uint16_t)p->data_offset;
data->session = session;
diff --git a/lib/vhost/rte_vhost_crypto.h b/lib/vhost/rte_vhost_crypto.h
index b49e389579..2b01ecda08 100644
--- a/lib/vhost/rte_vhost_crypto.h
+++ b/lib/vhost/rte_vhost_crypto.h
@@ -54,8 +54,6 @@ rte_vhost_crypto_driver_start(const char *path);
* multiple Vhost-crypto devices.
* @param sess_pool
* The pointer to the created cryptodev session pool.
- * @param sess_priv_pool
- * The pointer to the created cryptodev session private data mempool.
* @param socket_id
* NUMA Socket ID to allocate resources on. *
* @return
@@ -65,7 +63,6 @@ rte_vhost_crypto_driver_start(const char *path);
int
rte_vhost_crypto_create(int vid, uint8_t cryptodev_id,
struct rte_mempool *sess_pool,
- struct rte_mempool *sess_priv_pool,
int socket_id);
/**
diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 54946f46d9..7321da21b7 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -197,7 +197,6 @@ struct vhost_crypto {
struct rte_hash *session_map;
struct rte_mempool *mbuf_pool;
struct rte_mempool *sess_pool;
- struct rte_mempool *sess_priv_pool;
struct rte_mempool *wb_pool;
/** DPDK cryptodev ID */
@@ -376,31 +375,21 @@ vhost_crypto_create_sess(struct vhost_crypto *vcrypto,
return;
}
- session = rte_cryptodev_sym_session_create(vcrypto->sess_pool);
+ session = rte_cryptodev_sym_session_create(vcrypto->cid, &xform1,
+ vcrypto->sess_pool);
if (!session) {
VC_LOG_ERR("Failed to create session");
sess_param->session_id = -VIRTIO_CRYPTO_ERR;
return;
}
- if (rte_cryptodev_sym_session_init(vcrypto->cid, session, &xform1,
- vcrypto->sess_priv_pool) < 0) {
- VC_LOG_ERR("Failed to initialize session");
- sess_param->session_id = -VIRTIO_CRYPTO_ERR;
- return;
- }
-
/* insert hash to map */
if (rte_hash_add_key_data(vcrypto->session_map,
&vcrypto->last_session_id, session) < 0) {
VC_LOG_ERR("Failed to insert session to hash table");
- if (rte_cryptodev_sym_session_clear(vcrypto->cid, session) < 0)
- VC_LOG_ERR("Failed to clear session");
- else {
- if (rte_cryptodev_sym_session_free(session) < 0)
- VC_LOG_ERR("Failed to free session");
- }
+ if (rte_cryptodev_sym_session_free(vcrypto->cid, session) < 0)
+ VC_LOG_ERR("Failed to free session");
sess_param->session_id = -VIRTIO_CRYPTO_ERR;
return;
}
@@ -427,12 +416,7 @@ vhost_crypto_close_sess(struct vhost_crypto *vcrypto, uint64_t session_id)
return -VIRTIO_CRYPTO_INVSESS;
}
- if (rte_cryptodev_sym_session_clear(vcrypto->cid, session) < 0) {
- VC_LOG_DBG("Failed to clear session");
- return -VIRTIO_CRYPTO_ERR;
- }
-
- if (rte_cryptodev_sym_session_free(session) < 0) {
+ if (rte_cryptodev_sym_session_free(vcrypto->cid, session) < 0) {
VC_LOG_DBG("Failed to free session");
return -VIRTIO_CRYPTO_ERR;
}
@@ -1393,7 +1377,6 @@ rte_vhost_crypto_driver_start(const char *path)
int
rte_vhost_crypto_create(int vid, uint8_t cryptodev_id,
struct rte_mempool *sess_pool,
- struct rte_mempool *sess_priv_pool,
int socket_id)
{
struct virtio_net *dev = get_device(vid);
@@ -1415,7 +1398,6 @@ rte_vhost_crypto_create(int vid, uint8_t cryptodev_id,
}
vcrypto->sess_pool = sess_pool;
- vcrypto->sess_priv_pool = sess_priv_pool;
vcrypto->cid = cryptodev_id;
vcrypto->cache_session_id = UINT64_MAX;
vcrypto->last_session_id = 1;
--
2.34.1
^ permalink raw reply [relevance 1%]
* [PATCH 3/3] cryptodev: hide sym session structure
2022-08-29 16:06 1% ` [PATCH 1/3] cryptodev: rework session framework Fan Zhang
@ 2022-08-29 16:06 3% ` Fan Zhang
1 sibling, 0 replies; 200+ results
From: Fan Zhang @ 2022-08-29 16:06 UTC (permalink / raw)
To: dev
Cc: gakhil, maxime.coquelin, chandu, ruifeng.wang, ajit.khaparde,
anoobj, pablo.de.lara.guarch, matan, g.singh, jianjay.zhou,
Fan Zhang
Structure rte_cryptodev_sym_session is moved to internal
headers which are not visible to applications.
The only field which should be used by app is opaque_data.
This field can now be accessed via set/get APIs added in this
patch.
Subsequent changes in app and lib are made to compile the code.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_ipsec_perf.c | 4 +-
doc/guides/prog_guide/cryptodev_lib.rst | 16 ++----
doc/guides/rel_notes/deprecation.rst | 9 ++++
doc/guides/rel_notes/release_22_11.rst | 7 +++
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 2 +-
drivers/crypto/qat/qat_sym.c | 2 +-
lib/cryptodev/cryptodev_pmd.h | 31 ++++++++++++
lib/cryptodev/rte_cryptodev.c | 16 +++---
lib/cryptodev/rte_cryptodev.h | 56 ++++++++++-----------
lib/cryptodev/rte_cryptodev_trace.h | 8 +--
lib/ipsec/rte_ipsec_group.h | 5 +-
lib/ipsec/ses.c | 3 +-
13 files changed, 100 insertions(+), 61 deletions(-)
diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c
index b5d0c2e036..b221b7fc32 100644
--- a/app/test/test_ipsec_perf.c
+++ b/app/test/test_ipsec_perf.c
@@ -227,7 +227,7 @@ static int
create_sa(enum rte_security_session_action_type action_type,
struct ipsec_sa *sa)
{
- static struct rte_cryptodev_sym_session dummy_ses;
+ void *dummy_ses = NULL;
size_t sz;
int rc;
@@ -247,7 +247,7 @@ create_sa(enum rte_security_session_action_type action_type,
"failed to allocate memory for rte_ipsec_sa\n");
sa->ss[0].type = action_type;
- sa->ss[0].crypto.ses = &dummy_ses;
+ sa->ss[0].crypto.ses = dummy_ses;
rc = rte_ipsec_sa_init(sa->ss[0].sa, &sa->sa_prm, sz);
rc = (rc > 0 && (uint32_t)rc <= sz) ? 0 : -EINVAL;
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 9e54683aa1..01aad842a9 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -125,13 +125,11 @@ Each queue pairs resources may be allocated on a specified socket.
uint32_t nb_descriptors; /**< Number of descriptors per queue pair */
struct rte_mempool *mp_session;
/**< The mempool for creating session in sessionless mode */
- struct rte_mempool *mp_session_private;
- /**< The mempool for creating sess private data in sessionless mode */
};
-The fields ``mp_session`` and ``mp_session_private`` are used for creating
-temporary session to process the crypto operations in the session-less mode.
+The field ``mp_session`` is used for creating temporary session to process
+the crypto operations in the session-less mode.
They can be the same other different mempools. Please note not all Cryptodev
PMDs supports session-less mode.
@@ -595,7 +593,7 @@ chain.
struct rte_mbuf *m_dst;
union {
- struct rte_cryptodev_sym_session *session;
+ void *session;
/**< Handle for the initialised session context */
struct rte_crypto_sym_xform *xform;
/**< Session-less API Crypto operation parameters */
@@ -943,15 +941,11 @@ using one of the crypto PMDs available in DPDK.
/* Create crypto session and initialize it for the crypto device. */
struct rte_cryptodev_sym_session *session;
- session = rte_cryptodev_sym_session_create(session_pool);
+ session = rte_cryptodev_sym_session_create(cdev_id, &cipher_xform,
+ session_pool);
if (session == NULL)
rte_exit(EXIT_FAILURE, "Session could not be created\n");
- if (rte_cryptodev_sym_session_init(cdev_id, session,
- &cipher_xform, session_priv_pool) < 0)
- rte_exit(EXIT_FAILURE, "Session could not be initialized "
- "for the crypto device\n");
-
/* Get a burst of crypto operations. */
struct rte_crypto_op *crypto_ops[BURST_SIZE];
if (rte_crypto_op_bulk_alloc(crypto_op_pool,
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..ba46b6930f 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -237,3 +237,12 @@ Deprecation Notices
applications should be updated to use the ``dmadev`` library instead,
with the underlying HW-functionality being provided by the ``ioat`` or
``idxd`` dma drivers
+
+* cryptodev: Hide structure ``rte_cryptodev_sym_session`` to remove unnecessary
+ indirection between session and the private data of session. An opaque pointer
+ can be exposed directly to application which can be attached to the
+ ``rte_crypto_op``.
+
+* cryptodev: The functions ``rte_cryptodev_sym_session_init`` and
+ ``rte_cryptodev_sym_session_clear`` are deprecated. The sym crypto session
+ opaque pointer can no longer be used by different crypto device drivers.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 7fab9d6550..d6f199573f 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -89,6 +89,13 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* cryptodev: The structure ``rte_cryptodev_sym_session`` was moved to
+ cryptodev_pmd.h and was hidden from the application. The APIs to create/init and
+ destroy sym crypto session were updated to take a single mempool with element size
+ enough to hold session data and session private data. Inline APIs was created to
+ get and set the session data. All sample applications were updated to attach an
+ opaque pointer for the session to the ``rte_crypto_op`` while enqueuing.
+
ABI Changes
-----------
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
index 795be3acc3..8c1e0abb95 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
@@ -1012,7 +1012,7 @@ dpaa2_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
sess = (dpaa2_sec_session *)get_sec_session_private_data(
session_ctx.sec_sess);
else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION)
- sess = (void *)session_ctx.crypto_sess->driver_priv_data;
+ sess = CRYPTODEV_GET_SYM_SESS_PRIV(session_ctx.crypto_sess);
else
return -ENOTSUP;
raw_dp_ctx->dequeue_burst = dpaa2_sec_raw_dequeue_burst;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
index d2e4d9d787..93129e7614 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
@@ -1018,7 +1018,7 @@ dpaa_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
session_ctx.sec_sess);
else if (sess_type == RTE_CRYPTO_OP_WITH_SESSION)
sess = (dpaa_sec_session *)
- session_ctx.crypto_sess->driver_priv_data;
+ CRYPTODEV_GET_SYM_SESS_PRIV(session_ctx.crypto_sess);
else
return -ENOTSUP;
raw_dp_ctx->dequeue_burst = dpaa_sec_raw_dequeue_burst;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 408ae9e42b..e94a199f4b 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -386,7 +386,7 @@ qat_sym_configure_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
if (sess_type != RTE_CRYPTO_OP_WITH_SESSION)
return -EINVAL;
- ctx = (void *)session_ctx.crypto_sess->driver_priv_data;
+ ctx = CRYPTODEV_GET_SYM_SESS_PRIV(session_ctx.crypto_sess);
dp_ctx->session = ctx;
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index f518a0f89b..7bd39e02a3 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -132,6 +132,37 @@ struct cryptodev_driver {
uint8_t id;
};
+/** Cryptodev symmetric crypto session
+ * Each session is derived from a fixed xform chain. Therefore each session
+ * has a fixed algo, key, op-type, digest_len etc.
+ */
+struct rte_cryptodev_sym_session {
+ RTE_MARKER cacheline0;
+ uint8_t driver_id;
+ uint64_t opaque_data;
+ /**< Can be used for external metadata */
+ uint32_t sess_data_sz;
+ /**< Pointer to the user data stored after sess data */
+ uint16_t user_data_sz;
+ /**< session user data will be placed after sess data */
+ rte_iova_t driver_priv_data_iova;
+ /**< session driver data IOVA address */
+
+ RTE_MARKER cacheline1 __rte_cache_min_aligned;
+ /**< second cache line - start of the driver session data */
+ uint8_t driver_priv_data[0];
+ /**< Driver specific session data, variable size */
+};
+
+/**
+ * Helper macro to get driver private data
+ */
+#define CRYPTODEV_GET_SYM_SESS_PRIV(s) \
+ (void *)(((struct rte_cryptodev_sym_session *)s)->driver_priv_data)
+#define CRYPTODEV_GET_SYM_SESS_PRIV_IOVA(s) \
+ (((struct rte_cryptodev_sym_session *)s)->driver_priv_data_iova)
+
+
/**
* Get the rte_cryptodev structure device pointer for the device. Assumes a
* valid device index.
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 63b8255a45..88dbe71c51 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1941,11 +1941,11 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
}
int
-rte_cryptodev_sym_session_free(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess)
+rte_cryptodev_sym_session_free(uint8_t dev_id, void *_sess)
{
struct rte_cryptodev *dev;
struct rte_mempool *sess_mp;
+ struct rte_cryptodev_sym_session *sess = _sess;
struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
if (sess == NULL)
@@ -2060,10 +2060,11 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
}
int
-rte_cryptodev_sym_session_set_user_data(
- struct rte_cryptodev_sym_session *sess, void *data,
+rte_cryptodev_sym_session_set_user_data(void *_sess, void *data,
uint16_t size)
{
+ struct rte_cryptodev_sym_session *sess = _sess;
+
if (sess == NULL)
return -EINVAL;
@@ -2075,8 +2076,10 @@ rte_cryptodev_sym_session_set_user_data(
}
void *
-rte_cryptodev_sym_session_get_user_data(struct rte_cryptodev_sym_session *sess)
+rte_cryptodev_sym_session_get_user_data(void *_sess)
{
+ struct rte_cryptodev_sym_session *sess = _sess;
+
if (sess == NULL || sess->user_data_sz == 0)
return NULL;
@@ -2120,10 +2123,11 @@ sym_crypto_fill_status(struct rte_crypto_sym_vec *vec, int32_t errnum)
uint32_t
rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs,
+ void *_sess, union rte_crypto_sym_ofs ofs,
struct rte_crypto_sym_vec *vec)
{
struct rte_cryptodev *dev;
+ struct rte_cryptodev_sym_session *sess = _sess;
if (!rte_cryptodev_is_valid_dev(dev_id)) {
sym_crypto_fill_status(vec, EINVAL);
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 0c65958f25..0cbdccc61a 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -902,28 +902,6 @@ struct rte_cryptodev_cb_rcu {
void *
rte_cryptodev_get_sec_ctx(uint8_t dev_id);
-/** Cryptodev symmetric crypto session
- * Each session is derived from a fixed xform chain. Therefore each session
- * has a fixed algo, key, op-type, digest_len etc.
- */
-struct rte_cryptodev_sym_session {
- RTE_MARKER cacheline0;
- uint8_t driver_id;
- uint64_t opaque_data;
- /**< Can be used for external metadata */
- uint32_t sess_data_sz;
- /**< Pointer to the user data stored after sess data */
- uint16_t user_data_sz;
- /**< session user data will be placed after sess data */
- rte_iova_t driver_priv_data_iova;
- /**< session driver data IOVA address */
-
- RTE_MARKER cacheline1 __rte_cache_min_aligned;
- /**< second cache line - start of the driver session data */
- uint8_t driver_priv_data[0];
- /**< Driver specific session data, variable size */
-};
-
/**
* Create a symmetric session mempool.
*
@@ -1036,7 +1014,7 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
*/
int
rte_cryptodev_sym_session_free(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess);
+ void *sess);
/**
* Clears and frees asymmetric crypto session header and private data,
@@ -1136,11 +1114,31 @@ const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
*/
__rte_experimental
int
-rte_cryptodev_sym_session_set_user_data(
- struct rte_cryptodev_sym_session *sess,
+rte_cryptodev_sym_session_set_user_data(void *sess,
void *data,
uint16_t size);
+#define CRYPTO_SESS_OPAQUE_DATA_OFF 0
+/**
+ * Get opaque data from session handle
+ */
+static inline uint64_t
+rte_cryptodev_sym_session_opaque_data_get(void *sess)
+{
+ return *((uint64_t *)sess - CRYPTO_SESS_OPAQUE_DATA_OFF);
+}
+
+/**
+ * Set opaque data in session handle
+ */
+static inline void
+rte_cryptodev_sym_session_opaque_data_set(void *sess, uint64_t opaque)
+{
+ uint64_t *data;
+ data = (((uint64_t *)sess) - CRYPTO_SESS_OPAQUE_DATA_OFF);
+ *data = opaque;
+}
+
/**
* Get user data stored in a session.
*
@@ -1153,8 +1151,7 @@ rte_cryptodev_sym_session_set_user_data(
*/
__rte_experimental
void *
-rte_cryptodev_sym_session_get_user_data(
- struct rte_cryptodev_sym_session *sess);
+rte_cryptodev_sym_session_get_user_data(void *sess);
/**
* Store user data in an asymmetric session.
@@ -1202,7 +1199,7 @@ rte_cryptodev_asym_session_get_user_data(void *sess);
__rte_experimental
uint32_t
rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs,
+ void *sess, union rte_crypto_sym_ofs ofs,
struct rte_crypto_sym_vec *vec);
/**
@@ -1244,8 +1241,7 @@ rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
* Union of different crypto session types, including session-less xform
* pointer.
*/
-union rte_cryptodev_session_ctx {
- struct rte_cryptodev_sym_session *crypto_sess;
+union rte_cryptodev_session_ctx {void *crypto_sess;
struct rte_crypto_sym_xform *xform;
struct rte_security_session *sec_sess;
};
diff --git a/lib/cryptodev/rte_cryptodev_trace.h b/lib/cryptodev/rte_cryptodev_trace.h
index 055c44fb22..7b4ec5c389 100644
--- a/lib/cryptodev/rte_cryptodev_trace.h
+++ b/lib/cryptodev/rte_cryptodev_trace.h
@@ -73,14 +73,10 @@ RTE_TRACE_POINT(
RTE_TRACE_POINT(
rte_cryptodev_trace_sym_session_create,
- RTE_TRACE_POINT_ARGS(uint8_t dev_id,
- struct rte_cryptodev_sym_session *sess, void *xforms,
+ RTE_TRACE_POINT_ARGS(uint8_t dev_id, void *sess, void *xforms,
void *mempool),
rte_trace_point_emit_u8(dev_id);
rte_trace_point_emit_ptr(sess);
- rte_trace_point_emit_u64(sess->opaque_data);
- rte_trace_point_emit_u8(sess->driver_id);
- rte_trace_point_emit_u16(sess->user_data_sz);
rte_trace_point_emit_ptr(xforms);
rte_trace_point_emit_ptr(mempool);
)
@@ -108,7 +104,7 @@ RTE_TRACE_POINT(
RTE_TRACE_POINT(
rte_cryptodev_trace_sym_session_free,
- RTE_TRACE_POINT_ARGS(struct rte_cryptodev_sym_session *sess),
+ RTE_TRACE_POINT_ARGS(void *sess),
rte_trace_point_emit_ptr(sess);
)
diff --git a/lib/ipsec/rte_ipsec_group.h b/lib/ipsec/rte_ipsec_group.h
index 62c2bd7217..a4e0e128f8 100644
--- a/lib/ipsec/rte_ipsec_group.h
+++ b/lib/ipsec/rte_ipsec_group.h
@@ -45,14 +45,15 @@ static inline struct rte_ipsec_session *
rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop)
{
const struct rte_security_session *ss;
- const struct rte_cryptodev_sym_session *cs;
+ void *cs;
if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
ss = cop->sym[0].sec_session;
return (struct rte_ipsec_session *)(uintptr_t)ss->opaque_data;
} else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
cs = cop->sym[0].session;
- return (struct rte_ipsec_session *)(uintptr_t)cs->opaque_data;
+ return (struct rte_ipsec_session *)(uintptr_t)
+ rte_cryptodev_sym_session_opaque_data_get(cs);
}
return NULL;
}
diff --git a/lib/ipsec/ses.c b/lib/ipsec/ses.c
index 3d51ac4986..0d3c932302 100644
--- a/lib/ipsec/ses.c
+++ b/lib/ipsec/ses.c
@@ -45,7 +45,8 @@ rte_ipsec_session_prepare(struct rte_ipsec_session *ss)
ss->pkt_func = fp;
if (ss->type == RTE_SECURITY_ACTION_TYPE_NONE)
- ss->crypto.ses->opaque_data = (uintptr_t)ss;
+ rte_cryptodev_sym_session_opaque_data_set(ss->crypto.ses,
+ (uintptr_t)ss);
else
ss->security.ses->opaque_data = (uintptr_t)ss;
--
2.34.1
^ permalink raw reply [relevance 3%]
* RE: [RFC v3 00/26] Bus and device cleanup for 22.11
@ 2022-08-29 17:12 3% ` Walker, Benjamin
2022-08-30 15:09 5% ` David Marchand
0 siblings, 1 reply; 200+ results
From: Walker, Benjamin @ 2022-08-29 17:12 UTC (permalink / raw)
To: David Marchand, Harris, James R
Cc: dev, Liu, Changpeng, Alexey Marchuk, Shuhei Matsumoto
> From: David Marchand <david.marchand@redhat.com>
>
> Hello,
>
> On Fri, Aug 5, 2022 at 1:19 AM Harris, James R <james.r.harris@intel.com>
> wrote:
> > Can we keep rte_pci_register(), or a new variation of it that keeps
> > the rte_pci_driver structure hidden? Hiding rte_pci_register() would
> > mean SPDK can no longer work with a packaged DPDK. Or the DPDK
> > packages would need to set enable_driver_sdk which I suspect is not the
> intent.
>
> What do you think if SPDK maintains a copy of the internal headers?
>
> The internal API are not supposed to change that often, but we (DPDK) won't
> guarantee it.
> This would still put some maintenance burden on SPDK but I think it is a good
> compromise.
>
Would these internal symbols be considered part of the public/official ABI? When
SPDK goes to dynamically load a shared DPDK library, how can we detect
whether it's a version that we support linking against?
> I did a PoC this morning and put patches in my forked repo:
> https://github.com/david-marchand/spdk/commits/master
>
>
> --
> David Marchand
^ permalink raw reply [relevance 3%]
* [PATCH v7 1/7] bbdev: allow operation type enum for growth
@ 2022-08-29 18:07 3% ` Nicolas Chautru
0 siblings, 0 replies; 200+ results
From: Nicolas Chautru @ 2022-08-29 18:07 UTC (permalink / raw)
To: dev, thomas, gakhil, hemant.agrawal
Cc: maxime.coquelin, trix, mdr, bruce.richardson, david.marchand,
stephen, mingshan.zhang, Nicolas Chautru
Updating the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_PADDED_MAX.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev.c | 2 +-
app/test-bbdev/test_bbdev_perf.c | 4 ++--
examples/bbdev_app/main.c | 2 +-
lib/bbdev/rte_bbdev.c | 8 +++++---
lib/bbdev/rte_bbdev_op.h | 2 +-
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index ac06d73..1063f6e 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -521,7 +521,7 @@ struct bbdev_testsuite_params {
rte_mempool_free(mp);
TEST_ASSERT((mp = rte_bbdev_op_pool_create("Test_INV",
- RTE_BBDEV_OP_TYPE_COUNT, size, cache_size, 0)) == NULL,
+ RTE_BBDEV_OP_TYPE_PADDED_MAX, size, cache_size, 0)) == NULL,
"Failed test for rte_bbdev_op_pool_create: "
"returned value is not NULL for invalid type");
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index fad3b1e..1abda2d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2428,13 +2428,13 @@ typedef int (test_case_function)(struct active_device *ad,
/* Find capabilities */
const struct rte_bbdev_op_cap *cap = info.drv.capabilities;
- for (i = 0; i < RTE_BBDEV_OP_TYPE_COUNT; i++) {
+ do {
if (cap->type == test_vector.op_type) {
capabilities = cap;
break;
}
cap++;
- }
+ } while (cap->type != RTE_BBDEV_OP_NONE);
TEST_ASSERT_NOT_NULL(capabilities,
"Couldn't find capabilities");
diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fc7e8b8..ef0ba76 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1041,7 +1041,7 @@ uint16_t bbdev_parse_number(const char *mask)
void *sigret;
struct app_config_params app_params = def_app_config;
struct rte_mempool *ethdev_mbuf_mempool, *bbdev_mbuf_mempool;
- struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_COUNT];
+ struct rte_mempool *bbdev_op_pools[RTE_BBDEV_OP_TYPE_PADDED_MAX];
struct lcore_conf lcore_conf[RTE_MAX_LCORE] = { {0} };
struct lcore_statistics lcore_stats[RTE_MAX_LCORE] = { {0} };
struct stats_lcore_params stats_lcore;
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index aaee7b7..4da8047 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -23,6 +23,8 @@
#define DEV_NAME "BBDEV"
+/* Number of supported operation types */
+#define BBDEV_OP_TYPE_COUNT 5
/* BBDev library logging ID */
RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
@@ -890,10 +892,10 @@ struct rte_mempool *
return NULL;
}
- if (type >= RTE_BBDEV_OP_TYPE_COUNT) {
+ if (type >= BBDEV_OP_TYPE_COUNT) {
rte_bbdev_log(ERR,
"Invalid op type (%u), should be less than %u",
- type, RTE_BBDEV_OP_TYPE_COUNT);
+ type, BBDEV_OP_TYPE_COUNT);
return NULL;
}
@@ -1125,7 +1127,7 @@ struct rte_mempool *
"RTE_BBDEV_OP_LDPC_ENC",
};
- if (op_type < RTE_BBDEV_OP_TYPE_COUNT)
+ if (op_type < BBDEV_OP_TYPE_COUNT)
return op_types[op_type];
rte_bbdev_log(ERR, "Invalid operation type");
diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h
index 6d56133..cd82418 100644
--- a/lib/bbdev/rte_bbdev_op.h
+++ b/lib/bbdev/rte_bbdev_op.h
@@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
RTE_BBDEV_OP_TURBO_ENC, /**< Turbo encode */
RTE_BBDEV_OP_LDPC_DEC, /**< LDPC decode */
RTE_BBDEV_OP_LDPC_ENC, /**< LDPC encode */
- RTE_BBDEV_OP_TYPE_COUNT, /**< Count of different op types */
+ RTE_BBDEV_OP_TYPE_PADDED_MAX = 8, /**< Maximum op type number including padding */
};
/** Bit indexes of possible errors reported through status field */
--
1.8.3.1
^ permalink raw reply [relevance 3%]
* Re: [PATCH] net/ice: remove deprecated VF flow action
@ 2022-08-30 1:23 0% Xu, Ke1
0 siblings, 0 replies; 200+ results
From: Xu, Ke1 @ 2022-08-30 1:23 UTC (permalink / raw)
To: Zeng, ZhichaoX; +Cc: dev, Zhang, Qi Z, Yang, Qiming, Zhou, YidingX
> Subject: [PATCH] net/ice: remove deprecated VF flow action
> Date: Wed, 10 Aug 2022 14:49:37 +0800
> Message-ID: <20220810064937.162455-1-zhichaox.zeng@intel.com> (raw)
>
> From: Zhichao Zeng <zhichaox.zeng@intel.com>
>
> According to the ABI and API Deprecation, remove deprecated VF action
> as hard-to-use / ambiguous.
>
> Action REPRESENTED_PORT should be used instead.
>
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested and passed.
Regards,
Tested-by: Ke Xu <ke1.xu@intel.com>
> ---
> doc/guides/nics/features/ice.ini | 1 -
> drivers/net/ice/ice_switch_filter.c | 22 ----------------------
> 2 files changed, 23 deletions(-)
^ permalink raw reply [relevance 0%]
* Re: [PATCH v5 2/7] bbdev: add device status info
@ 2022-08-30 7:08 3% ` Maxime Coquelin
2022-08-30 19:38 0% ` Chautru, Nicolas
0 siblings, 1 reply; 200+ results
From: Maxime Coquelin @ 2022-08-30 7:08 UTC (permalink / raw)
To: Chautru, Nicolas, dev, thomas, gakhil, hemant.agrawal
Cc: trix, mdr, Richardson, Bruce, david.marchand, stephen
On 8/29/22 18:10, Chautru, Nicolas wrote:
> Hi Maxime,
>
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Friday, August 26, 2022 3:13 AM
>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
>> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
>> Cc: trix@redhat.com; mdr@ashroe.eu; Richardson, Bruce
>> <bruce.richardson@intel.com>; david.marchand@redhat.com;
>> stephen@networkplumber.org
>> Subject: Re: [PATCH v5 2/7] bbdev: add device status info
>>
>> Hi,
>>
>> On 8/25/22 20:30, Chautru, Nicolas wrote:
>>> Thanks Maxime,
>>>
>>>> -----Original Message-----
>>>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>>>> Sent: Thursday, August 25, 2022 7:19 AM
>>>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
>>>> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
>>>> Cc: trix@redhat.com; mdr@ashroe.eu; Richardson, Bruce
>>>> <bruce.richardson@intel.com>; david.marchand@redhat.com;
>>>> stephen@networkplumber.org
>>>> Subject: Re: [PATCH v5 2/7] bbdev: add device status info
>>>>
>>>>
>>>>
>>>> On 7/7/22 01:28, Nicolas Chautru wrote:
>>>>> Added device status information, so that the PMD can expose
>>>>> information related to the underlying accelerator device status.
>>>>> Minor order change in structure to fit into padding hole.
>>>>>
>>>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
>>>>> ---
>>>>> drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
>>>>> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 1 +
>>>>> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 1 +
>>>>> drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
>>>>> drivers/baseband/null/bbdev_null.c | 1 +
>>>>> drivers/baseband/turbo_sw/bbdev_turbo_software.c | 1 +
>>>>> lib/bbdev/rte_bbdev.c | 22 ++++++++++++++
>>>>> lib/bbdev/rte_bbdev.h | 35 ++++++++++++++++++++--
>>>>> lib/bbdev/version.map | 6 ++++
>>>>> 9 files changed, 67 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> b/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> index de7e4bc..17ba798 100644
>>>>> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
>>>>> @@ -1060,6 +1060,7 @@
>>>>>
>>>>> /* Read and save the populated config from ACC100 registers */
>>>>> fetch_acc100_config(dev);
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> /* This isn't ideal because it reports the maximum number of
>>>>> queues
>>>> but
>>>>> * does not provide info on how many can be uplink/downlink or
>>>>> different diff --git
>>>>> a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> index 82ae6ba..57b12af 100644
>>>>> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
>>>>> @@ -369,6 +369,7 @@
>>>>> dev_info->capabilities = bbdev_capabilities;
>>>>> dev_info->cpu_flag_reqs = NULL;
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> /* Calculates number of queues assigned to device */
>>>>> dev_info->max_num_queues = 0;
>>>>> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> index 21d3529..2a330c4 100644
>>>>> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
>>>>> @@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {
>>>>> dev_info->capabilities = bbdev_capabilities;
>>>>> dev_info->cpu_flag_reqs = NULL;
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> /* Calculates number of queues assigned to device */
>>>>> dev_info->max_num_queues = 0;
>>>>> diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> b/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> index 4d1bd16..c1f88c6 100644
>>>>> --- a/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
>>>>> @@ -100,6 +100,7 @@ struct bbdev_la12xx_params {
>>>>> dev_info->capabilities = bbdev_capabilities;
>>>>> dev_info->cpu_flag_reqs = NULL;
>>>>> dev_info->min_alignment = 64;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> rte_bbdev_log_debug("got device info from %u", dev->data-
>>>>> dev_id);
>>>>> }
>>>>> diff --git a/drivers/baseband/null/bbdev_null.c
>>>>> b/drivers/baseband/null/bbdev_null.c
>>>>> index 248e129..94a1976 100644
>>>>> --- a/drivers/baseband/null/bbdev_null.c
>>>>> +++ b/drivers/baseband/null/bbdev_null.c
>>>>> @@ -82,6 +82,7 @@ struct bbdev_queue {
>>>>> * here for code completeness.
>>>>> */
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> rte_bbdev_log_debug("got device info from %u", dev->data-
>>>>> dev_id);
>>>>> }
>>>>> diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> index af7bc41..dbc5524 100644
>>>>> --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
>>>>> @@ -254,6 +254,7 @@ struct turbo_sw_queue {
>>>>> dev_info->min_alignment = 64;
>>>>> dev_info->harq_buffer_size = 0;
>>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
>>>>> + dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>>>>>
>>>>> rte_bbdev_log_debug("got device info from %u\n", dev->data-
>>>>> dev_id);
>>>>> }
>>>>> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
>>>>> 4da8047..38630a2 100644
>>>>> --- a/lib/bbdev/rte_bbdev.c
>>>>> +++ b/lib/bbdev/rte_bbdev.c
>>>>> @@ -1133,3 +1133,25 @@ struct rte_mempool *
>>>>> rte_bbdev_log(ERR, "Invalid operation type");
>>>>> return NULL;
>>>>> }
>>>>> +
>>>>> +const char *
>>>>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status) {
>>>>> + static const char * const dev_sta_string[] = {
>>>>> + "RTE_BBDEV_DEV_NOSTATUS",
>>>>> + "RTE_BBDEV_DEV_NOT_SUPPORTED",
>>>>> + "RTE_BBDEV_DEV_RESET",
>>>>> + "RTE_BBDEV_DEV_CONFIGURED",
>>>>> + "RTE_BBDEV_DEV_ACTIVE",
>>>>> + "RTE_BBDEV_DEV_FATAL_ERR",
>>>>> + "RTE_BBDEV_DEV_RESTART_REQ",
>>>>> + "RTE_BBDEV_DEV_RECONFIG_REQ",
>>>>> + "RTE_BBDEV_DEV_CORRECT_ERR",
>>>>> + };
>>>>> +
>>>>> + if (status < sizeof(dev_sta_string) / sizeof(char *))
>>>>> + return dev_sta_string[status];
>>>>> +
>>>>> + rte_bbdev_log(ERR, "Invalid device status");
>>>>> + return NULL;
>>>>> +}
>>>>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
>>>>> b88c881..9b1ffa4 100644
>>>>> --- a/lib/bbdev/rte_bbdev.h
>>>>> +++ b/lib/bbdev/rte_bbdev.h
>>>>> @@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {
>>>>> int
>>>>> rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
>>>>>
>>>>> +/**
>>>>> + * Flags indicate the status of the device */ enum
>>>>> +rte_bbdev_device_status {
>>>>> + RTE_BBDEV_DEV_NOSTATUS, /**< Nothing being reported */
>>>>> + RTE_BBDEV_DEV_NOT_SUPPORTED, /**< Device status is not
>>>> supported on the PMD */
>>>>> + RTE_BBDEV_DEV_RESET, /**< Device in reset and un-
>>>> configured state */
>>>>> + RTE_BBDEV_DEV_CONFIGURED, /**< Device is configured and
>>>> ready to use */
>>>>> + RTE_BBDEV_DEV_ACTIVE, /**< Device is configured and VF is
>>>> being used */
>>>>> + RTE_BBDEV_DEV_FATAL_ERR, /**< Device has hit a fatal
>>>> uncorrectable error */
>>>>> + RTE_BBDEV_DEV_RESTART_REQ, /**< Device requires application
>>>> to restart */
>>>>> + RTE_BBDEV_DEV_RECONFIG_REQ, /**< Device requires
>>>> application to reconfigure queues */
>>>>> + RTE_BBDEV_DEV_CORRECT_ERR, /**< Warning of a correctable
>>>> error event happened */
>>>>> +};
>>>>
>>>> I don't have a strong opinion on this, but I think NOT_SUPPORTED
>>>> should be a special value. If you want to keep 0 value for NOSTATUS,
>>>> maybe you could
>>>> do:
>>>>
>>>> enum rte_bbdev_device_status {
>>>> RTE_BBDEV_DEV_NOT_SUPPORTED = -1, /**< Device status is not
>>>> supported
>>>> on the PMD */
>>>> RTE_BBDEV_DEV_NOSTATUS = 0, /**< Nothing being reported
>>>> */
>>>> RTE_BBDEV_DEV_RESET, /**< Device in reset and un-
>>>> configured
>>>> state */
>>>> ...
>>>
>>> Thanks Maxime. My concern is that I am upstreaming in parallel in
>> pf_bb_config in parallel hence would like to keep it unchanged if possible.
>>> Given you don’t have a strong opinion is that okay to keep as is? Or I can
>> force special value 1 for NOT_SUPPORTED so that this is explicitly defined. But
>> really enum should always be used.
>>
>> I don't understand. It should not have any impact on pf_bb_config, given
>> pf_bb_config does not use DPDK.
>>
>> Maxime
>
> That device status is being shared from pf_bb_config to the bbdev PMD through PF2VF communications, hence they share that same enum.
>
Ok, but generic DPDK ABI should not be dependent on a vendor internal
implementation IMHO.
Maxime
^ permalink raw reply [relevance 3%]
* Re: [RFC] memarea: introduce memory area library
2022-07-21 15:22 3% ` Stephen Hemminger
@ 2022-08-30 12:41 3% ` Dmitry Kozlyuk
1 sibling, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2022-08-30 12:41 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Thomas Monjalon, dpdk-dev
[-- Attachment #1: Type: text/plain, Size: 4369 bytes --]
>
> Note:
> a) the memarea is oriented towards the application layer, which could
> provides 'region-based memory management' [1] function.
>
Judging from the API, this library would rather provide
an interface to a generic allocator over a fixed memory extent,
because it offers freeing of specific elements, and thus must track them.
So it's more than RBMM. Is this intended?
It's a very interesting RFC anyway, just trying to understand the scope.
b) the eal library also provide memory zone/heap management, but these
> are tied to huge pages management.
>
[...]
> + * The memarea is a collection of allocated objects that can be
> efficiently
> + * alloc or free all at once, the main feature are as follows:
> + * a) it facilitate alloc and free of memory with low overhead.
> + * [...]
>
+ * c) it supports MT-safe as long as it's specified at creation time.
>
These two bullets seem to add the most value compared to DPDK heap API.
DPDK heap overhead is at least 64 bytes per allocation (sizeof malloc_elem),
so I assume memarea aims at a large number of small elements.
> +struct rte_memarea_param {
> + char name[RTE_MEMAREA_NAMESIZE]; /**< Name of memarea */
> + enum rte_memarea_source source; /**< Memory source of memarea */
> + uint64_t size; /**< Size (byte) of memarea */
>
Is it an upper limit or a guaranteed size?
It probably depends on the source: guaranteed for USER_ADDR,
upper limit for SYSAPI (or it would be no different from USER_ADDR),
not sure about USER_MEMAREA.
Do you envision memarea as always limited?
Generic allocators usually have means of adding extents,
even if this one doesn't currently.
Nit: size is uint64_t here but uint32_t in rte_memarea_allloc().
Should be size_t in both places.
> + uint32_t align; /**< Align of allocated object */
>
+ /** Indicates whether the memarea should be MT-safe */
> + bool mt_safe;
> + /** Indicates whether the memarea is visible to multiple process.
> + * If the memory source is RTE_MEMAREA_SOURCE_USER_ADDR, this filed
> + * depends on user settings and must be set.
> + * If the memory source is RTE_MEMAREA_SOURCE_SYSAPI or
> + * RTE_MEMAREA_SOURCE_USER_MEMAREA, this filed does not need to be
> set.
> + */
> + bool mp_visible;
> + /** User provided address, this field is valid only when source
> + * is set to RTE_MEMAREA_SOURCE_USER_ADDR.
> + */
> + void *user_addr;
> + /** User provided memarea, this field is valid only when source
> + * is set to RTE_MEMAREA_SOURCE_MEMAREA.
> + */
> + struct rte_memarea *user_memarea;
>
Jerin already suggested a union here.
I'll add another reason to do so: if in the future there will be new
memarea types
that require new options, one pointer-sized field can be used to pass
anything
without breaking the ABI once this structure becomes stable.
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice.
> + *
> + * Update memory's refcnt.
> + *
> + * Update one memory region's refcnt.
> + *
> + * @param ma
> + * The pointer of memarea.
> + * @param ptr
> + * The pointer of memory region which need be updated refcnt.
> + * @param value
> + * The value which need be updated.
> + * Note: it could be negative.
> + *
> + * @return
> + * 0 on success. Otherwise negative value is returned.
> + */
> +__rte_experimental
> +int rte_memarea_refcnt_update(struct rte_memarea *ma, void *ptr, int16_t
> value);
>
If this function only updates the refcnt, an API to inspect the refcnt is
missing.
Furthermore, in this case refcnt is just a value attached to every object,
what is the benefit compared to simply storing it in the object?
If this function also frees "ptr" when refcnt reaches zero,
missing is a way for the user to know that it did.
What happens if refcnt > 1 on rte_memarea_free()?
I don't think refcnt belongs to this library.
A principal objection: memarea is for freeing all objects at once,
refcnt is for releasing objects one-by-one when they're not used.
Technical issues I foresee: refcnt can be atomic (and require alignment) or
not,
16 bits may be too few (rte_flow_action_handle ref'd by thousands of
rte_flow).
Refcnt could be optional per memarea, but it seems like another
complication.
[-- Attachment #2: Type: text/html, Size: 6663 bytes --]
^ permalink raw reply [relevance 3%]
* Re: [RFC v3 00/26] Bus and device cleanup for 22.11
2022-08-29 17:12 3% ` Walker, Benjamin
@ 2022-08-30 15:09 5% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-08-30 15:09 UTC (permalink / raw)
To: Walker, Benjamin
Cc: Harris, James R, dev, Liu, Changpeng, Alexey Marchuk,
Shuhei Matsumoto, Thomas Monjalon, Bruce Richardson,
Stephen Hemminger
On Mon, Aug 29, 2022 at 7:12 PM Walker, Benjamin
<benjamin.walker@intel.com> wrote:
> > > Can we keep rte_pci_register(), or a new variation of it that keeps
> > > the rte_pci_driver structure hidden? Hiding rte_pci_register() would
> > > mean SPDK can no longer work with a packaged DPDK. Or the DPDK
> > > packages would need to set enable_driver_sdk which I suspect is not the
> > intent.
> >
> > What do you think if SPDK maintains a copy of the internal headers?
> >
> > The internal API are not supposed to change that often, but we (DPDK) won't
> > guarantee it.
> > This would still put some maintenance burden on SPDK but I think it is a good
> > compromise.
> >
>
> Would these internal symbols be considered part of the public/official ABI? When
What do you mean by "public/official"?
If you mean the "stable" ABI (as described in the ABI policy document
and for which compatibility is preserved across minor versions of the
ABI), the answer is no: internal symbols are not part of it.
> SPDK goes to dynamically load a shared DPDK library, how can we detect
> whether it's a version that we support linking against?
The runtime version of a DPDK library is available via rte_version().
As for the PCI drivers that SPDK wants to register in DPDK, what do
you think if SPDK people added and maintained a "generic" PCI driver
in DPDK.
This driver would expose a new API (which can not re-expose internal
structures, like rte_pci_driver and consorts) and ensure its ABI is
maintained in the long term.
This makes me think of pci-stub, but in DPDK.
I did not think too much about it and I don't understand what SPDK
requires, but is there something wrong with this approach?
--
David Marchand
^ permalink raw reply [relevance 5%]
* RE: [PATCH v5 2/7] bbdev: add device status info
2022-08-30 7:08 3% ` Maxime Coquelin
@ 2022-08-30 19:38 0% ` Chautru, Nicolas
0 siblings, 0 replies; 200+ results
From: Chautru, Nicolas @ 2022-08-30 19:38 UTC (permalink / raw)
To: Maxime Coquelin, dev, thomas, gakhil, hemant.agrawal
Cc: trix, mdr, Richardson, Bruce, david.marchand, stephen
Hi Maxime,
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, August 30, 2022 12:09 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
> Cc: trix@redhat.com; mdr@ashroe.eu; Richardson, Bruce
> <bruce.richardson@intel.com>; david.marchand@redhat.com;
> stephen@networkplumber.org
> Subject: Re: [PATCH v5 2/7] bbdev: add device status info
>
>
>
> On 8/29/22 18:10, Chautru, Nicolas wrote:
> > Hi Maxime,
> >
> >> -----Original Message-----
> >> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> >> Sent: Friday, August 26, 2022 3:13 AM
> >> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> >> thomas@monjalon.net; gakhil@marvell.com; hemant.agrawal@nxp.com
> >> Cc: trix@redhat.com; mdr@ashroe.eu; Richardson, Bruce
> >> <bruce.richardson@intel.com>; david.marchand@redhat.com;
> >> stephen@networkplumber.org
> >> Subject: Re: [PATCH v5 2/7] bbdev: add device status info
> >>
> >> Hi,
> >>
> >> On 8/25/22 20:30, Chautru, Nicolas wrote:
> >>> Thanks Maxime,
> >>>
> >>>> -----Original Message-----
> >>>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> >>>> Sent: Thursday, August 25, 2022 7:19 AM
> >>>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> >>>> thomas@monjalon.net; gakhil@marvell.com;
> hemant.agrawal@nxp.com
> >>>> Cc: trix@redhat.com; mdr@ashroe.eu; Richardson, Bruce
> >>>> <bruce.richardson@intel.com>; david.marchand@redhat.com;
> >>>> stephen@networkplumber.org
> >>>> Subject: Re: [PATCH v5 2/7] bbdev: add device status info
> >>>>
> >>>>
> >>>>
> >>>> On 7/7/22 01:28, Nicolas Chautru wrote:
> >>>>> Added device status information, so that the PMD can expose
> >>>>> information related to the underlying accelerator device status.
> >>>>> Minor order change in structure to fit into padding hole.
> >>>>>
> >>>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> >>>>> ---
> >>>>> drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
> >>>>> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 1 +
> >>>>> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 1 +
> >>>>> drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
> >>>>> drivers/baseband/null/bbdev_null.c | 1 +
> >>>>> drivers/baseband/turbo_sw/bbdev_turbo_software.c | 1 +
> >>>>> lib/bbdev/rte_bbdev.c | 22 ++++++++++++++
> >>>>> lib/bbdev/rte_bbdev.h | 35
> ++++++++++++++++++++--
> >>>>> lib/bbdev/version.map | 6 ++++
> >>>>> 9 files changed, 67 insertions(+), 2 deletions(-)
> >>>>>
> >>>>> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c
> >>>>> b/drivers/baseband/acc100/rte_acc100_pmd.c
> >>>>> index de7e4bc..17ba798 100644
> >>>>> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> >>>>> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> >>>>> @@ -1060,6 +1060,7 @@
> >>>>>
> >>>>> /* Read and save the populated config from ACC100
> registers */
> >>>>> fetch_acc100_config(dev);
> >>>>> + dev_info->device_status =
> RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>>>
> >>>>> /* This isn't ideal because it reports the maximum number of
> >>>>> queues
> >>>> but
> >>>>> * does not provide info on how many can be
> uplink/downlink
> >>>>> or different diff --git
> >>>>> a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>>>> b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>>>> index 82ae6ba..57b12af 100644
> >>>>> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>>>> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> >>>>> @@ -369,6 +369,7 @@
> >>>>> dev_info->capabilities = bbdev_capabilities;
> >>>>> dev_info->cpu_flag_reqs = NULL;
> >>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>>>> + dev_info->device_status =
> RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>>>
> >>>>> /* Calculates number of queues assigned to device */
> >>>>> dev_info->max_num_queues = 0; diff --git
> >>>>> a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>>>> b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>>>> index 21d3529..2a330c4 100644
> >>>>> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>>>> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> >>>>> @@ -645,6 +645,7 @@ struct __rte_cache_aligned fpga_queue {
> >>>>> dev_info->capabilities = bbdev_capabilities;
> >>>>> dev_info->cpu_flag_reqs = NULL;
> >>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>>>> + dev_info->device_status =
> RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>>>
> >>>>> /* Calculates number of queues assigned to device */
> >>>>> dev_info->max_num_queues = 0; diff --git
> >>>>> a/drivers/baseband/la12xx/bbdev_la12xx.c
> >>>>> b/drivers/baseband/la12xx/bbdev_la12xx.c
> >>>>> index 4d1bd16..c1f88c6 100644
> >>>>> --- a/drivers/baseband/la12xx/bbdev_la12xx.c
> >>>>> +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
> >>>>> @@ -100,6 +100,7 @@ struct bbdev_la12xx_params {
> >>>>> dev_info->capabilities = bbdev_capabilities;
> >>>>> dev_info->cpu_flag_reqs = NULL;
> >>>>> dev_info->min_alignment = 64;
> >>>>> + dev_info->device_status =
> RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>>>
> >>>>> rte_bbdev_log_debug("got device info from %u", dev->data-
> >>>>> dev_id);
> >>>>> }
> >>>>> diff --git a/drivers/baseband/null/bbdev_null.c
> >>>>> b/drivers/baseband/null/bbdev_null.c
> >>>>> index 248e129..94a1976 100644
> >>>>> --- a/drivers/baseband/null/bbdev_null.c
> >>>>> +++ b/drivers/baseband/null/bbdev_null.c
> >>>>> @@ -82,6 +82,7 @@ struct bbdev_queue {
> >>>>> * here for code completeness.
> >>>>> */
> >>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>>>> + dev_info->device_status =
> RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>>>
> >>>>> rte_bbdev_log_debug("got device info from %u", dev->data-
> >>>>> dev_id);
> >>>>> }
> >>>>> diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>>>> b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>>>> index af7bc41..dbc5524 100644
> >>>>> --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>>>> +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> >>>>> @@ -254,6 +254,7 @@ struct turbo_sw_queue {
> >>>>> dev_info->min_alignment = 64;
> >>>>> dev_info->harq_buffer_size = 0;
> >>>>> dev_info->data_endianness = RTE_LITTLE_ENDIAN;
> >>>>> + dev_info->device_status =
> RTE_BBDEV_DEV_NOT_SUPPORTED;
> >>>>>
> >>>>> rte_bbdev_log_debug("got device info from %u\n", dev-
> >data-
> >>>>> dev_id);
> >>>>> }
> >>>>> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index
> >>>>> 4da8047..38630a2 100644
> >>>>> --- a/lib/bbdev/rte_bbdev.c
> >>>>> +++ b/lib/bbdev/rte_bbdev.c
> >>>>> @@ -1133,3 +1133,25 @@ struct rte_mempool *
> >>>>> rte_bbdev_log(ERR, "Invalid operation type");
> >>>>> return NULL;
> >>>>> }
> >>>>> +
> >>>>> +const char *
> >>>>> +rte_bbdev_device_status_str(enum rte_bbdev_device_status status)
> {
> >>>>> + static const char * const dev_sta_string[] = {
> >>>>> + "RTE_BBDEV_DEV_NOSTATUS",
> >>>>> + "RTE_BBDEV_DEV_NOT_SUPPORTED",
> >>>>> + "RTE_BBDEV_DEV_RESET",
> >>>>> + "RTE_BBDEV_DEV_CONFIGURED",
> >>>>> + "RTE_BBDEV_DEV_ACTIVE",
> >>>>> + "RTE_BBDEV_DEV_FATAL_ERR",
> >>>>> + "RTE_BBDEV_DEV_RESTART_REQ",
> >>>>> + "RTE_BBDEV_DEV_RECONFIG_REQ",
> >>>>> + "RTE_BBDEV_DEV_CORRECT_ERR",
> >>>>> + };
> >>>>> +
> >>>>> + if (status < sizeof(dev_sta_string) / sizeof(char *))
> >>>>> + return dev_sta_string[status];
> >>>>> +
> >>>>> + rte_bbdev_log(ERR, "Invalid device status");
> >>>>> + return NULL;
> >>>>> +}
> >>>>> diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h index
> >>>>> b88c881..9b1ffa4 100644
> >>>>> --- a/lib/bbdev/rte_bbdev.h
> >>>>> +++ b/lib/bbdev/rte_bbdev.h
> >>>>> @@ -223,6 +223,21 @@ struct rte_bbdev_queue_conf {
> >>>>> int
> >>>>> rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
> >>>>>
> >>>>> +/**
> >>>>> + * Flags indicate the status of the device */ enum
> >>>>> +rte_bbdev_device_status {
> >>>>> + RTE_BBDEV_DEV_NOSTATUS, /**< Nothing being
> reported */
> >>>>> + RTE_BBDEV_DEV_NOT_SUPPORTED, /**< Device status is
> not
> >>>> supported on the PMD */
> >>>>> + RTE_BBDEV_DEV_RESET, /**< Device in reset and un-
> >>>> configured state */
> >>>>> + RTE_BBDEV_DEV_CONFIGURED, /**< Device is
> configured and
> >>>> ready to use */
> >>>>> + RTE_BBDEV_DEV_ACTIVE, /**< Device is configured
> and VF is
> >>>> being used */
> >>>>> + RTE_BBDEV_DEV_FATAL_ERR, /**< Device has hit a fatal
> >>>> uncorrectable error */
> >>>>> + RTE_BBDEV_DEV_RESTART_REQ, /**< Device requires
> application
> >>>> to restart */
> >>>>> + RTE_BBDEV_DEV_RECONFIG_REQ, /**< Device requires
> >>>> application to reconfigure queues */
> >>>>> + RTE_BBDEV_DEV_CORRECT_ERR, /**< Warning of a
> correctable
> >>>> error event happened */
> >>>>> +};
> >>>>
> >>>> I don't have a strong opinion on this, but I think NOT_SUPPORTED
> >>>> should be a special value. If you want to keep 0 value for
> >>>> NOSTATUS, maybe you could
> >>>> do:
> >>>>
> >>>> enum rte_bbdev_device_status {
> >>>> RTE_BBDEV_DEV_NOT_SUPPORTED = -1, /**< Device status is not
> >>>> supported
> >>>> on the PMD */
> >>>> RTE_BBDEV_DEV_NOSTATUS = 0, /**< Nothing being reported
> >>>> */
> >>>> RTE_BBDEV_DEV_RESET, /**< Device in reset and un-
> >>>> configured
> >>>> state */
> >>>> ...
> >>>
> >>> Thanks Maxime. My concern is that I am upstreaming in parallel in
> >> pf_bb_config in parallel hence would like to keep it unchanged if possible.
> >>> Given you don’t have a strong opinion is that okay to keep as is? Or
> >>> I can
> >> force special value 1 for NOT_SUPPORTED so that this is explicitly
> >> defined. But really enum should always be used.
> >>
> >> I don't understand. It should not have any impact on pf_bb_config,
> >> given pf_bb_config does not use DPDK.
> >>
> >> Maxime
> >
> > That device status is being shared from pf_bb_config to the bbdev PMD
> through PF2VF communications, hence they share that same enum.
> >
>
> Ok, but generic DPDK ABI should not be dependent on a vendor internal
> implementation IMHO.
>
I agree. This is the opposite direction, pf_bb_config is reusing the same API enumeration for now the assumption is that enum is being applied.
In case we change here (for a fairly cosmetic reason) that would cause to change as well on the other ingredient, which is doable but has overhead.
If you really believe that there is a strong reason to do such a change let me know now, we would need to impact pf_bb_config release to have similar change and match that API change which is possible but not ideal.
Thanks
Nic
^ permalink raw reply [relevance 0%]
* [PATCH 9/9] net/ngbe: support to set link down/up
@ 2022-09-02 3:00 4% ` Jiawen Wu
0 siblings, 0 replies; 200+ results
From: Jiawen Wu @ 2022-09-02 3:00 UTC (permalink / raw)
To: dev; +Cc: Jiawen Wu
Add support to set device link down/up.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
doc/guides/rel_notes/release_22_11.rst | 4 ++++
drivers/net/ngbe/base/ngbe_phy.c | 1 +
drivers/net/ngbe/base/ngbe_phy_rtl.c | 13 ++++++++++++
drivers/net/ngbe/base/ngbe_phy_rtl.h | 2 ++
drivers/net/ngbe/ngbe_ethdev.c | 28 ++++++++++++++++++++++++++
5 files changed, 48 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..843501c7c2 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,10 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Wangxun ngbe driver.**
+
+ * Added support to set device link down/up.
+
ABI Changes
-----------
diff --git a/drivers/net/ngbe/base/ngbe_phy.c b/drivers/net/ngbe/base/ngbe_phy.c
index 06562b594f..acff7bfebf 100644
--- a/drivers/net/ngbe/base/ngbe_phy.c
+++ b/drivers/net/ngbe/base/ngbe_phy.c
@@ -400,6 +400,7 @@ s32 ngbe_init_phy(struct ngbe_hw *hw)
hw->phy.init_hw = ngbe_init_phy_rtl;
hw->phy.check_link = ngbe_check_phy_link_rtl;
hw->phy.setup_link = ngbe_setup_phy_link_rtl;
+ hw->phy.set_phy_power = ngbe_set_phy_power_rtl;
hw->phy.get_adv_pause = ngbe_get_phy_advertised_pause_rtl;
hw->phy.get_lp_adv_pause = ngbe_get_phy_lp_advertised_pause_rtl;
hw->phy.set_pause_adv = ngbe_set_phy_pause_adv_rtl;
diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.c b/drivers/net/ngbe/base/ngbe_phy_rtl.c
index 33c5e79e87..9b323624ec 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.c
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.c
@@ -393,3 +393,16 @@ s32 ngbe_check_phy_link_rtl(struct ngbe_hw *hw, u32 *speed, bool *link_up)
return status;
}
+s32 ngbe_set_phy_power_rtl(struct ngbe_hw *hw, bool on)
+{
+ u16 value = 0;
+
+ hw->phy.read_reg(hw, RTL_BMCR, 0, &value);
+ if (on)
+ value &= ~RTL_BMCR_PWDN;
+ else
+ value |= RTL_BMCR_PWDN;
+ hw->phy.write_reg(hw, RTL_BMCR, 0, value);
+
+ return 0;
+}
diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.h b/drivers/net/ngbe/base/ngbe_phy_rtl.h
index d717a1915c..b2fbc4f74d 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.h
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.h
@@ -15,6 +15,7 @@
#define RTL_BMCR_RESET MS16(15, 0x1)
#define RTL_BMCR_SPEED_SELECT0 MS16(13, 0x1)
#define RTL_BMCR_ANE MS16(12, 0x1)
+#define RTL_BMCR_PWDN MS16(11, 0x1)
#define RTL_BMCR_RESTART_AN MS16(9, 0x1)
#define RTL_BMCR_DUPLEX MS16(8, 0x1)
#define RTL_BMCR_SPEED_SELECT1 MS16(6, 0x1)
@@ -88,5 +89,6 @@ s32 ngbe_get_phy_lp_advertised_pause_rtl(struct ngbe_hw *hw, u8 *pause_bit);
s32 ngbe_set_phy_pause_adv_rtl(struct ngbe_hw *hw, u16 pause_bit);
s32 ngbe_check_phy_link_rtl(struct ngbe_hw *hw,
u32 *speed, bool *link_up);
+s32 ngbe_set_phy_power_rtl(struct ngbe_hw *hw, bool on);
#endif /* _NGBE_PHY_RTL_H_ */
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 1090ba9a11..afdb3ad41f 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1219,6 +1219,32 @@ ngbe_dev_stop(struct rte_eth_dev *dev)
return 0;
}
+/*
+ * Set device link up: power on.
+ */
+static int
+ngbe_dev_set_link_up(struct rte_eth_dev *dev)
+{
+ struct ngbe_hw *hw = ngbe_dev_hw(dev);
+
+ hw->phy.set_phy_power(hw, true);
+
+ return 0;
+}
+
+/*
+ * Set device link down: power off.
+ */
+static int
+ngbe_dev_set_link_down(struct rte_eth_dev *dev)
+{
+ struct ngbe_hw *hw = ngbe_dev_hw(dev);
+
+ hw->phy.set_phy_power(hw, false);
+
+ return 0;
+}
+
/*
* Reset and stop device.
*/
@@ -3030,6 +3056,8 @@ static const struct eth_dev_ops ngbe_eth_dev_ops = {
.dev_infos_get = ngbe_dev_info_get,
.dev_start = ngbe_dev_start,
.dev_stop = ngbe_dev_stop,
+ .dev_set_link_up = ngbe_dev_set_link_up,
+ .dev_set_link_down = ngbe_dev_set_link_down,
.dev_close = ngbe_dev_close,
.dev_reset = ngbe_dev_reset,
.promiscuous_enable = ngbe_dev_promiscuous_enable,
--
2.27.0
^ permalink raw reply [relevance 4%]
* [PATCH v5 00/27] Bus and device cleanup for 22.11
2022-06-28 14:46 2% [RFC PATCH 00/11] Bus cleanup for 22.11 David Marchand
` (3 preceding siblings ...)
2022-08-26 12:41 1% ` [PATCH v4 00/27] " David Marchand
@ 2022-09-05 8:35 1% ` David Marchand
2022-09-05 8:35 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
2022-09-05 8:39 0% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
2022-09-05 8:39 1% ` David Marchand
5 siblings, 2 replies; 200+ results
From: David Marchand @ 2022-09-05 8:35 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson
The rte_bus, rte_driver and rte_device objects are part of the public
ABI and this has proved to be a problem when needing to extend them.
This series hides them, and mark associated driver only API as internal.
A good amount of the patches are preparation work on rte_bus.h,
rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
between them.
PCI bus specific handling are removed from testpmd, unit tests and
examples.
After this series, driver-only API headers for registering to buses are
not exported anymore, unless the enable_driver_sdk meson option is
selected.
New accessors for rte_bus, rte_driver and rte_device have been added,
marked with an experimental tag first when introducing them, and later
in the series marked as stable since external users will want to use
those drop-in replacements right away.
A check is added to ensure we won't pollute app/ and examples/ again,
though some unit tests are left intentionnally untouched as they test
some internals of DPDK.
Changes since v4:
- (hopefully, because I can't test) fixed Windows build,
- dropped unneeded change in vdev unit test,
Changes since RFC v3:
- marked the series as non-RFC,
- rebased on v22.11-rc0,
- marked RTE_FUNC_PTR_* macros as deprecated,
- split the bus specific patch in two patches,
Changes since RFC v2:
- added check for additions of include .*_(driver|pmd)\.h in apps and
examples,
- dropped legacy/debug testpmd commands to read PCI BAR0 registers,
- dropped patches on bbdev, ethdev, rawdev driver headers for now,
- reordered patches and separated changes per bus type to ease review,
- added more accessor for device,
- introduced rte_dev_bus_info to provide a Bus specific description of
a device, a first use is for providing a PCI device vendor / device
identifiers that are otherwise unavailable through a generic existing
API,
Changes since RFC v1:
- added two more cleanups (new patch 3 and 4) for unit test and examples
relying on PCI specific info,
- went on with masking rte_driver and rte_device too,
--
David Marchand
David Marchand (27):
devtools: forbid inclusions of driver only headers
common/mlx5: rework check on driver registration
raw/ifpga: remove PCI bus accessor
app/testpmd: drop PCI register commands
kni: stop populating PCI info in examples
examples/ethtool: prefer device name
dev: hide debug messages in device iterator
eal: deprecate RTE_FUNC_PTR_* macros
devargs: remove dependency on bus header
build: export drivers headers
bus/auxiliary: make driver-only headers private
bus/dpaa: make driver-only headers private
bus/fslmc: make driver-only headers private
bus/ifpga: cleanup exported symbols
bus/ifpga: make driver-only headers private
bus/pci: make driver-only headers private
bus/vdev: make driver-only headers private
bus/vmbus: make driver-only headers private
bus: move IOVA definition from header
bus: introduce accessors
bus: hide bus object
dev: introduce driver accessors
dev: hide driver object
dev: introduce device accessors
dev: provide bus specific information
bus/pci: fill bus specific information
dev: hide device object
app/proc-info/main.c | 6 +-
app/test-compress-perf/comp_perf_options.h | 2 +
app/test-pmd/cmdline.c | 339 +-----------------
app/test-pmd/config.c | 222 +-----------
app/test-pmd/csumonly.c | 1 -
app/test-pmd/flowgen.c | 1 -
app/test-pmd/iofwd.c | 1 -
app/test-pmd/macfwd.c | 1 -
app/test-pmd/macswap.c | 1 -
app/test-pmd/meson.build | 2 +-
app/test-pmd/parameters.c | 1 -
app/test-pmd/rxonly.c | 1 -
app/test-pmd/testpmd.c | 12 +-
app/test-pmd/testpmd.h | 72 +---
app/test-pmd/txonly.c | 1 -
app/test/test_devargs.c | 6 +-
app/test/test_kni.c | 30 --
app/test/test_vdev.c | 5 +-
app/test/virtual_pmd.c | 2 +-
devtools/checkpatches.sh | 8 +
devtools/cocci/func_or_ret.cocci | 12 +
doc/guides/rel_notes/deprecation.rst | 20 +-
doc/guides/rel_notes/release_22_11.rst | 19 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 81 -----
drivers/baseband/acc100/rte_acc100_pmd.c | 4 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 4 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 2 +-
drivers/baseband/null/bbdev_null.c | 2 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 5 +-
drivers/bus/auxiliary/auxiliary_params.c | 5 +-
...bus_auxiliary.h => bus_auxiliary_driver.h} | 26 +-
drivers/bus/auxiliary/linux/auxiliary.c | 2 -
drivers/bus/auxiliary/meson.build | 4 +-
drivers/bus/auxiliary/private.h | 30 +-
drivers/bus/auxiliary/version.map | 3 +-
drivers/bus/dpaa/base/qbman/qman.c | 2 +-
.../{rte_dpaa_bus.h => bus_dpaa_driver.h} | 25 +-
drivers/bus/dpaa/dpaa_bus.c | 22 +-
.../fslmc/{rte_fslmc.h => bus_fslmc_driver.h} | 30 +-
drivers/bus/fslmc/fslmc_bus.c | 14 +-
drivers/bus/fslmc/fslmc_vfio.c | 5 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 4 +-
drivers/bus/fslmc/private.h | 27 ++
.../{rte_bus_ifpga.h => bus_ifpga_driver.h} | 18 +-
drivers/bus/ifpga/ifpga_bus.c | 21 +-
drivers/bus/ifpga/ifpga_common.c | 88 -----
drivers/bus/ifpga/ifpga_common.h | 54 ++-
drivers/bus/ifpga/meson.build | 4 +-
drivers/bus/ifpga/version.map | 4 +-
drivers/bus/pci/bsd/pci.c | 11 +-
drivers/bus/pci/bus_pci_driver.h | 201 +++++++++++
drivers/bus/pci/linux/pci.c | 27 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/meson.build | 1 +
drivers/bus/pci/pci_common.c | 52 ++-
drivers/bus/pci/pci_params.c | 4 +-
drivers/bus/pci/private.h | 29 +-
drivers/bus/pci/rte_bus_pci.h | 201 +----------
drivers/bus/pci/version.map | 11 +-
drivers/bus/pci/windows/pci.c | 7 +-
drivers/bus/pci/windows/pci_netuio.c | 1 +
drivers/bus/vdev/bus_vdev_driver.h | 151 ++++++++
drivers/bus/vdev/meson.build | 1 +
drivers/bus/vdev/rte_bus_vdev.h | 134 -------
drivers/bus/vdev/vdev.c | 12 +-
drivers/bus/vdev/vdev_params.c | 3 +-
drivers/bus/vdev/version.map | 9 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 106 ++++++
drivers/bus/vmbus/linux/vmbus_uio.c | 1 -
drivers/bus/vmbus/meson.build | 1 +
drivers/bus/vmbus/private.h | 20 +-
drivers/bus/vmbus/rte_bus_vmbus.h | 104 ------
drivers/bus/vmbus/version.map | 9 +-
drivers/bus/vmbus/vmbus_bufring.c | 1 -
drivers/bus/vmbus/vmbus_channel.c | 1 -
drivers/bus/vmbus/vmbus_common.c | 3 -
drivers/bus/vmbus/vmbus_common_uio.c | 1 -
drivers/common/cnxk/roc_platform.h | 2 +-
.../common/mlx5/linux/mlx5_common_auxiliary.c | 12 +-
drivers/common/mlx5/linux/mlx5_common_os.c | 4 +-
drivers/common/mlx5/linux/mlx5_common_os.h | 2 +-
drivers/common/mlx5/mlx5_common.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 3 +-
drivers/common/mlx5/mlx5_common_private.h | 2 +-
drivers/common/mlx5/windows/mlx5_common_os.c | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_device.c | 8 +-
drivers/common/qat/qat_device.h | 2 +-
drivers/common/qat/qat_qp.c | 35 +-
drivers/common/sfc_efx/sfc_efx.h | 2 +-
drivers/compress/isal/isal_compress_pmd.c | 2 +-
drivers/compress/mlx5/mlx5_compress.c | 2 +-
drivers/compress/octeontx/otx_zip.h | 2 +-
drivers/compress/qat/qat_comp.c | 2 +-
drivers/compress/qat/qat_comp_pmd.c | 4 +-
drivers/compress/zlib/zlib_pmd.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 1 +
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_device.h | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 2 +-
drivers/crypto/ccp/ccp_dev.h | 2 +-
drivers/crypto/ccp/ccp_pci.h | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 6 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 4 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
drivers/crypto/ipsec_mb/pmd_kasumi.c | 2 +-
drivers/crypto/mlx5/mlx5_crypto.c | 2 +-
drivers/crypto/mvsam/rte_mrvl_pmd.c | 2 +-
drivers/crypto/nitrox/nitrox_device.h | 2 +-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev_ops.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym.c | 2 +-
.../scheduler/rte_cryptodev_scheduler.c | 6 +-
drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 8 +-
drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
drivers/crypto/virtio/virtio_pci.c | 1 -
drivers/crypto/virtio/virtio_pci.h | 2 +-
drivers/dma/cnxk/cnxk_dmadev.c | 3 +-
drivers/dma/dpaa/dpaa_qdma.c | 2 +-
drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
drivers/dma/hisilicon/hisi_dmadev.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 3 +-
drivers/dma/idxd/idxd_pci.c | 2 +-
drivers/dma/ioat/ioat_dmadev.c | 2 +-
drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_main.h | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 4 +-
drivers/event/dpaa/dpaa_eventdev.c | 4 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 6 +-
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 4 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 4 +-
drivers/event/octeontx/ssovf_evdev.c | 4 +-
drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-
drivers/event/octeontx/ssovf_probe.c | 2 +-
drivers/event/octeontx/timvf_probe.c | 2 +-
drivers/event/opdl/opdl_evdev.c | 2 +-
drivers/event/opdl/opdl_evdev_init.c | 2 +-
drivers/event/opdl/opdl_test.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 4 +-
drivers/event/sw/sw_evdev.c | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 2 +-
drivers/gpu/cuda/cuda.c | 4 +-
drivers/mempool/cnxk/cnxk_mempool.c | 2 +-
drivers/mempool/dpaa/dpaa_mempool.h | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 2 +-
drivers/meson.build | 4 +
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +-
drivers/net/ark/ark_ethdev.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 4 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 3 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
drivers/net/cxgbe/base/adapter.h | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 4 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
drivers/net/dpaa/dpaa_rxtx.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 4 +-
drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 4 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 4 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 4 +-
drivers/net/e1000/em_rxtx.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 4 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/e1000/igb_pf.c | 2 +-
drivers/net/ena/ena_ethdev.h | 4 +-
drivers/net/enic/base/vnic_dev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 4 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 4 +-
drivers/net/failsafe/failsafe.c | 3 +-
drivers/net/failsafe/failsafe_eal.c | 1 +
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwif.c | 2 +-
drivers/net/hinic/base/hinic_pmd_nicio.c | 2 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 2 +-
drivers/net/hns3/hns3_common.c | 2 +-
drivers/net/hns3/hns3_ethdev.c | 2 +-
drivers/net/hns3/hns3_rxtx.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 4 +-
drivers/net/i40e/i40e_vf_representor.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/igc/igc_ethdev.c | 2 +-
drivers/net/ionic/ionic.h | 2 +-
drivers/net/ionic/ionic_ethdev.c | 2 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 2 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 4 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 3 +-
drivers/net/kni/rte_eth_kni.c | 2 +-
drivers/net/liquidio/lio_ethdev.c | 3 +-
drivers/net/memif/memif_socket.c | 2 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/mlx4/mlx4_ethdev.c | 2 +-
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 5 +-
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
drivers/net/mvneta/mvneta_ethdev.c | 2 +-
drivers/net/mvpp2/mrvl_ethdev.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 5 +-
drivers/net/netvsc/hn_nvs.c | 4 +-
drivers/net/netvsc/hn_rndis.c | 4 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/netvsc/hn_vf.c | 4 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/ngbe/base/ngbe_osdep.h | 2 +-
drivers/net/ngbe/ngbe_pf.c | 2 +-
drivers/net/null/rte_eth_null.c | 2 +-
drivers/net/octeontx/base/octeontx_pkivf.c | 2 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 +-
drivers/net/pcap/pcap_ethdev.c | 2 +-
drivers/net/pfe/pfe_ethdev.c | 2 +-
drivers/net/qede/base/bcm_osal.h | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/ring/rte_eth_ring.c | 2 +-
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 4 +-
drivers/net/sfc/sfc_sriov.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/softnic/rte_eth_softnic.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ethdev.h | 2 +-
drivers/net/txgbe/txgbe_flow.c | 2 +-
drivers/net/txgbe/txgbe_pf.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 6 +-
drivers/net/vhost/rte_eth_vhost.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/net/virtio/virtio_pci.h | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 4 +-
drivers/net/virtio/virtio_user_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +-
drivers/raw/cnxk_gpio/cnxk_gpio.c | 2 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 2 +-
drivers/raw/ifpga/afu_pmd_core.h | 2 +-
drivers/raw/ifpga/afu_pmd_he_hssi.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_lpbk.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_mem.c | 4 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 4 +-
drivers/raw/ifpga/ifpga_rawdev.c | 21 +-
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 8 +-
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 -
drivers/raw/ifpga/version.map | 1 -
drivers/raw/ioat/idxd_bus.c | 2 +-
drivers/raw/ioat/idxd_pci.c | 2 +-
drivers/raw/ioat/ioat_rawdev.c | 2 +-
drivers/raw/ntb/ntb.c | 2 +-
drivers/raw/ntb/ntb_hw_intel.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 25 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 4 +-
drivers/regex/mlx5/mlx5_regex.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
drivers/regex/mlx5/mlx5_regex_fastpath.c | 2 +-
drivers/vdpa/ifc/base/ifcvf_osdep.h | 2 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
drivers/vdpa/sfc/sfc_vdpa.h | 2 +-
examples/ethtool/lib/rte_ethtool.c | 17 +-
examples/ip_pipeline/kni.c | 10 -
examples/l3fwd/l3fwd_em.c | 4 +-
examples/l3fwd/l3fwd_fib.c | 8 +-
examples/l3fwd/l3fwd_lpm.c | 4 +-
examples/multi_process/hotplug_mp/commands.c | 6 +-
examples/vdpa/main.c | 16 +-
lib/compressdev/rte_compressdev.c | 48 ++-
lib/compressdev/rte_compressdev_pmd.c | 1 +
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 45 ++-
lib/dmadev/rte_dmadev.c | 21 +-
lib/dmadev/rte_dmadev.h | 21 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_bus.c | 28 +-
lib/eal/common/eal_common_dev.c | 53 ++-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/eal_private.h | 2 +-
lib/eal/common/eal_thread.h | 1 +
lib/eal/common/hotplug_mp.c | 1 +
lib/eal/include/bus_driver.h | 296 +++++++++++++++
lib/eal/include/dev_driver.h | 41 +++
lib/eal/include/meson.build | 5 +
lib/eal/include/rte_bus.h | 290 +--------------
lib/eal/include/rte_dev.h | 104 ++++--
lib/eal/include/rte_devargs.h | 4 +-
lib/eal/include/rte_eal.h | 15 +-
lib/eal/include/rte_lcore.h | 2 +
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 12 +-
lib/eal/windows/eal.c | 1 +
lib/ethdev/ethdev_driver.c | 18 +-
lib/ethdev/ethdev_driver.h | 1 +
lib/ethdev/ethdev_pci.h | 5 +-
lib/ethdev/ethdev_vdev.h | 2 +-
lib/ethdev/rte_ethdev.c | 277 +++++++++-----
lib/ethdev/rte_ethdev.h | 11 +-
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/eventdev_pmd_pci.h | 2 +-
lib/eventdev/eventdev_pmd_vdev.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 12 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 15 +-
lib/eventdev/rte_eventdev.c | 64 ++--
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 5 +-
lib/pcapng/rte_pcapng.c | 3 +-
lib/rawdev/rte_rawdev.c | 77 ++--
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/regexdev/rte_regexdev.c | 59 +--
lib/regexdev/rte_regexdev.h | 6 +-
lib/security/rte_security.c | 8 +-
lib/vhost/vdpa.c | 10 +-
lib/vhost/vhost_user.c | 6 +-
367 files changed, 2225 insertions(+), 2490 deletions(-)
create mode 100644 devtools/cocci/func_or_ret.cocci
rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (90%)
rename drivers/bus/dpaa/{rte_dpaa_bus.h => bus_dpaa_driver.h} (92%)
rename drivers/bus/fslmc/{rte_fslmc.h => bus_fslmc_driver.h} (88%)
create mode 100644 drivers/bus/fslmc/private.h
rename drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)
delete mode 100644 drivers/bus/ifpga/ifpga_common.c
create mode 100644 drivers/bus/pci/bus_pci_driver.h
create mode 100644 drivers/bus/vdev/bus_vdev_driver.h
create mode 100644 drivers/bus/vmbus/bus_vmbus_driver.h
create mode 100644 lib/eal/include/bus_driver.h
create mode 100644 lib/eal/include/dev_driver.h
--
2.37.2
^ permalink raw reply [relevance 1%]
* [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor
2022-09-05 8:35 1% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
@ 2022-09-05 8:35 4% ` David Marchand
2022-09-05 8:39 0% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
1 sibling, 0 replies; 200+ results
From: David Marchand @ 2022-09-05 8:35 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, Rosen Xu, Ray Kinsella, Tianfei zhang
There is no in-tree user for this accessor that returns the PCI bus
object.
On the other hand, a bus object can be retrieved by name using
rte_bus_find_by_name.
We can remove this driver specific API.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
Changes since RFC v2:
- updated release notes,
---
doc/guides/rel_notes/deprecation.rst | 3 ---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/raw/ifpga/ifpga_rawdev.c | 7 +------
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 6 ------
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 ----------
drivers/raw/ifpga/version.map | 1 -
7 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..dba252067c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -228,9 +228,6 @@ Deprecation Notices
* raw/dpaa2_cmdif: The ``dpaa2_cmdif`` rawdev driver will be deprecated
in DPDK 22.11, as it is no longer in use, no active user known.
-* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` will be removed
- in DPDK 22.11.
-
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..3cea3aa8eb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
+
ABI Changes
-----------
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 8c05302a65..78a7123528 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -10,8 +10,8 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/epoll.h>
+
#include <rte_log.h>
-#include <rte_bus.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
@@ -1888,11 +1888,6 @@ RTE_PMD_REGISTER_PARAM_STRING(ifpga_rawdev_cfg,
"port=<int> "
"afu_bts=<path>");
-struct rte_pci_bus *ifpga_get_pci_bus(void)
-{
- return rte_ifpga_rawdev_pmd.bus;
-}
-
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file)
{
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 4c191190ca..0fb66cbaae 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -91,7 +91,6 @@ int
ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
int vec_start, rte_intr_callback_fn handler, void *arg);
-struct rte_pci_bus *ifpga_get_pci_bus(void);
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file);
void ifpga_rawdev_cleanup(void);
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.c b/drivers/raw/ifpga/rte_pmd_ifpga.c
index 23146432c2..1ca248123b 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.c
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.c
@@ -402,12 +402,6 @@ rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page)
return opae_mgr_reload(adapter->mgr, type, page);
}
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void)
-{
- return ifpga_get_pci_bus();
-}
-
int
rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file)
{
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.h b/drivers/raw/ifpga/rte_pmd_ifpga.h
index 3fa5d3435a..791543f2cd 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.h
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.h
@@ -220,16 +220,6 @@ rte_pmd_ifpga_reboot_try(uint16_t dev_id);
int
rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
-/**
- * Get PCI bus the Intel FPGA driver register to
- *
- * @return
- * - (valid pointer) if successful.
- * - (NULL) if the Intel FPGA driver is not registered to any PCI bus.
- */
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void);
-
/**
* Perform PR (partial reconfiguration) on specified Intel FPGA device
*
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index f5c3959b7f..916da8a4f2 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -3,7 +3,6 @@ DPDK_23 {
rte_pmd_ifpga_cleanup;
rte_pmd_ifpga_get_dev_id;
- rte_pmd_ifpga_get_pci_bus;
rte_pmd_ifpga_get_phy_info;
rte_pmd_ifpga_get_property;
rte_pmd_ifpga_get_rsu_status;
--
2.37.2
^ permalink raw reply [relevance 4%]
* Re: [PATCH v5 00/27] Bus and device cleanup for 22.11
2022-09-05 8:35 1% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
2022-09-05 8:35 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
@ 2022-09-05 8:39 0% ` David Marchand
1 sibling, 0 replies; 200+ results
From: David Marchand @ 2022-09-05 8:39 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Bruce Richardson
On Mon, Sep 5, 2022 at 10:36 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> The rte_bus, rte_driver and rte_device objects are part of the public
> ABI and this has proved to be a problem when needing to extend them.
> This series hides them, and mark associated driver only API as internal.
>
> A good amount of the patches are preparation work on rte_bus.h,
> rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
> between them.
>
> PCI bus specific handling are removed from testpmd, unit tests and
> examples.
>
> After this series, driver-only API headers for registering to buses are
> not exported anymore, unless the enable_driver_sdk meson option is
> selected.
>
> New accessors for rte_bus, rte_driver and rte_device have been added,
> marked with an experimental tag first when introducing them, and later
> in the series marked as stable since external users will want to use
> those drop-in replacements right away.
>
> A check is added to ensure we won't pollute app/ and examples/ again,
> though some unit tests are left intentionnally untouched as they test
> some internals of DPDK.
>
> Changes since v4:
> - (hopefully, because I can't test) fixed Windows build,
> - dropped unneeded change in vdev unit test,
Pebcak, I only sent the first patches... resending the whole series.
Sorry for the noise.
--
David Marchand
^ permalink raw reply [relevance 0%]
* [PATCH v5 00/27] Bus and device cleanup for 22.11
2022-06-28 14:46 2% [RFC PATCH 00/11] Bus cleanup for 22.11 David Marchand
` (4 preceding siblings ...)
2022-09-05 8:35 1% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
@ 2022-09-05 8:39 1% ` David Marchand
2022-09-05 8:39 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
` (2 more replies)
5 siblings, 3 replies; 200+ results
From: David Marchand @ 2022-09-05 8:39 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson
The rte_bus, rte_driver and rte_device objects are part of the public
ABI and this has proved to be a problem when needing to extend them.
This series hides them, and mark associated driver only API as internal.
A good amount of the patches are preparation work on rte_bus.h,
rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
between them.
PCI bus specific handling are removed from testpmd, unit tests and
examples.
After this series, driver-only API headers for registering to buses are
not exported anymore, unless the enable_driver_sdk meson option is
selected.
New accessors for rte_bus, rte_driver and rte_device have been added,
marked with an experimental tag first when introducing them, and later
in the series marked as stable since external users will want to use
those drop-in replacements right away.
A check is added to ensure we won't pollute app/ and examples/ again,
though some unit tests are left intentionnally untouched as they test
some internals of DPDK.
Changes since v4:
- (hopefully, because I can't test) fixed Windows build,
- dropped unneeded change in vdev unit test,
Changes since RFC v3:
- marked the series as non-RFC,
- rebased on v22.11-rc0,
- marked RTE_FUNC_PTR_* macros as deprecated,
- split the bus specific patch in two patches,
Changes since RFC v2:
- added check for additions of include .*_(driver|pmd)\.h in apps and
examples,
- dropped legacy/debug testpmd commands to read PCI BAR0 registers,
- dropped patches on bbdev, ethdev, rawdev driver headers for now,
- reordered patches and separated changes per bus type to ease review,
- added more accessor for device,
- introduced rte_dev_bus_info to provide a Bus specific description of
a device, a first use is for providing a PCI device vendor / device
identifiers that are otherwise unavailable through a generic existing
API,
Changes since RFC v1:
- added two more cleanups (new patch 3 and 4) for unit test and examples
relying on PCI specific info,
- went on with masking rte_driver and rte_device too,
--
David Marchand
David Marchand (27):
devtools: forbid inclusions of driver only headers
common/mlx5: rework check on driver registration
raw/ifpga: remove PCI bus accessor
app/testpmd: drop PCI register commands
kni: stop populating PCI info in examples
examples/ethtool: prefer device name
dev: hide debug messages in device iterator
eal: deprecate RTE_FUNC_PTR_* macros
devargs: remove dependency on bus header
build: export drivers headers
bus/auxiliary: make driver-only headers private
bus/dpaa: make driver-only headers private
bus/fslmc: make driver-only headers private
bus/ifpga: cleanup exported symbols
bus/ifpga: make driver-only headers private
bus/pci: make driver-only headers private
bus/vdev: make driver-only headers private
bus/vmbus: make driver-only headers private
bus: move IOVA definition from header
bus: introduce accessors
bus: hide bus object
dev: introduce driver accessors
dev: hide driver object
dev: introduce device accessors
dev: provide bus specific information
bus/pci: fill bus specific information
dev: hide device object
app/proc-info/main.c | 6 +-
app/test-compress-perf/comp_perf_options.h | 2 +
app/test-pmd/cmdline.c | 339 +-----------------
app/test-pmd/config.c | 222 +-----------
app/test-pmd/csumonly.c | 1 -
app/test-pmd/flowgen.c | 1 -
app/test-pmd/iofwd.c | 1 -
app/test-pmd/macfwd.c | 1 -
app/test-pmd/macswap.c | 1 -
app/test-pmd/meson.build | 2 +-
app/test-pmd/parameters.c | 1 -
app/test-pmd/rxonly.c | 1 -
app/test-pmd/testpmd.c | 12 +-
app/test-pmd/testpmd.h | 72 +---
app/test-pmd/txonly.c | 1 -
app/test/test_devargs.c | 6 +-
app/test/test_kni.c | 30 --
app/test/test_vdev.c | 5 +-
app/test/virtual_pmd.c | 2 +-
devtools/checkpatches.sh | 8 +
devtools/cocci/func_or_ret.cocci | 12 +
doc/guides/rel_notes/deprecation.rst | 20 +-
doc/guides/rel_notes/release_22_11.rst | 19 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 81 -----
drivers/baseband/acc100/rte_acc100_pmd.c | 4 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 4 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 2 +-
drivers/baseband/null/bbdev_null.c | 2 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 5 +-
drivers/bus/auxiliary/auxiliary_params.c | 5 +-
...bus_auxiliary.h => bus_auxiliary_driver.h} | 26 +-
drivers/bus/auxiliary/linux/auxiliary.c | 2 -
drivers/bus/auxiliary/meson.build | 4 +-
drivers/bus/auxiliary/private.h | 30 +-
drivers/bus/auxiliary/version.map | 3 +-
drivers/bus/dpaa/base/qbman/qman.c | 2 +-
.../{rte_dpaa_bus.h => bus_dpaa_driver.h} | 25 +-
drivers/bus/dpaa/dpaa_bus.c | 22 +-
.../fslmc/{rte_fslmc.h => bus_fslmc_driver.h} | 30 +-
drivers/bus/fslmc/fslmc_bus.c | 14 +-
drivers/bus/fslmc/fslmc_vfio.c | 5 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 4 +-
drivers/bus/fslmc/private.h | 27 ++
.../{rte_bus_ifpga.h => bus_ifpga_driver.h} | 18 +-
drivers/bus/ifpga/ifpga_bus.c | 21 +-
drivers/bus/ifpga/ifpga_common.c | 88 -----
drivers/bus/ifpga/ifpga_common.h | 54 ++-
drivers/bus/ifpga/meson.build | 4 +-
drivers/bus/ifpga/version.map | 4 +-
drivers/bus/pci/bsd/pci.c | 11 +-
drivers/bus/pci/bus_pci_driver.h | 201 +++++++++++
drivers/bus/pci/linux/pci.c | 27 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/meson.build | 1 +
drivers/bus/pci/pci_common.c | 52 ++-
drivers/bus/pci/pci_params.c | 4 +-
drivers/bus/pci/private.h | 29 +-
drivers/bus/pci/rte_bus_pci.h | 201 +----------
drivers/bus/pci/version.map | 11 +-
drivers/bus/pci/windows/pci.c | 7 +-
drivers/bus/pci/windows/pci_netuio.c | 1 +
drivers/bus/vdev/bus_vdev_driver.h | 151 ++++++++
drivers/bus/vdev/meson.build | 1 +
drivers/bus/vdev/rte_bus_vdev.h | 134 -------
drivers/bus/vdev/vdev.c | 12 +-
drivers/bus/vdev/vdev_params.c | 3 +-
drivers/bus/vdev/version.map | 9 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 106 ++++++
drivers/bus/vmbus/linux/vmbus_uio.c | 1 -
drivers/bus/vmbus/meson.build | 1 +
drivers/bus/vmbus/private.h | 20 +-
drivers/bus/vmbus/rte_bus_vmbus.h | 104 ------
drivers/bus/vmbus/version.map | 9 +-
drivers/bus/vmbus/vmbus_bufring.c | 1 -
drivers/bus/vmbus/vmbus_channel.c | 1 -
drivers/bus/vmbus/vmbus_common.c | 3 -
drivers/bus/vmbus/vmbus_common_uio.c | 1 -
drivers/common/cnxk/roc_platform.h | 2 +-
.../common/mlx5/linux/mlx5_common_auxiliary.c | 12 +-
drivers/common/mlx5/linux/mlx5_common_os.c | 4 +-
drivers/common/mlx5/linux/mlx5_common_os.h | 2 +-
drivers/common/mlx5/mlx5_common.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 3 +-
drivers/common/mlx5/mlx5_common_private.h | 2 +-
drivers/common/mlx5/windows/mlx5_common_os.c | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_device.c | 8 +-
drivers/common/qat/qat_device.h | 2 +-
drivers/common/qat/qat_qp.c | 35 +-
drivers/common/sfc_efx/sfc_efx.h | 2 +-
drivers/compress/isal/isal_compress_pmd.c | 2 +-
drivers/compress/mlx5/mlx5_compress.c | 2 +-
drivers/compress/octeontx/otx_zip.h | 2 +-
drivers/compress/qat/qat_comp.c | 2 +-
drivers/compress/qat/qat_comp_pmd.c | 4 +-
drivers/compress/zlib/zlib_pmd.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 1 +
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_device.h | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 2 +-
drivers/crypto/ccp/ccp_dev.h | 2 +-
drivers/crypto/ccp/ccp_pci.h | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 6 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 4 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
drivers/crypto/ipsec_mb/pmd_kasumi.c | 2 +-
drivers/crypto/mlx5/mlx5_crypto.c | 2 +-
drivers/crypto/mvsam/rte_mrvl_pmd.c | 2 +-
drivers/crypto/nitrox/nitrox_device.h | 2 +-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev_ops.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym.c | 2 +-
.../scheduler/rte_cryptodev_scheduler.c | 6 +-
drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 8 +-
drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
drivers/crypto/virtio/virtio_pci.c | 1 -
drivers/crypto/virtio/virtio_pci.h | 2 +-
drivers/dma/cnxk/cnxk_dmadev.c | 3 +-
drivers/dma/dpaa/dpaa_qdma.c | 2 +-
drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
drivers/dma/hisilicon/hisi_dmadev.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 3 +-
drivers/dma/idxd/idxd_pci.c | 2 +-
drivers/dma/ioat/ioat_dmadev.c | 2 +-
drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_main.h | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 4 +-
drivers/event/dpaa/dpaa_eventdev.c | 4 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 6 +-
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 4 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 4 +-
drivers/event/octeontx/ssovf_evdev.c | 4 +-
drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-
drivers/event/octeontx/ssovf_probe.c | 2 +-
drivers/event/octeontx/timvf_probe.c | 2 +-
drivers/event/opdl/opdl_evdev.c | 2 +-
drivers/event/opdl/opdl_evdev_init.c | 2 +-
drivers/event/opdl/opdl_test.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 4 +-
drivers/event/sw/sw_evdev.c | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 2 +-
drivers/gpu/cuda/cuda.c | 4 +-
drivers/mempool/cnxk/cnxk_mempool.c | 2 +-
drivers/mempool/dpaa/dpaa_mempool.h | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 2 +-
drivers/meson.build | 4 +
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +-
drivers/net/ark/ark_ethdev.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 4 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 3 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
drivers/net/cxgbe/base/adapter.h | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 4 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
drivers/net/dpaa/dpaa_rxtx.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 4 +-
drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 4 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 4 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 4 +-
drivers/net/e1000/em_rxtx.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 4 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/e1000/igb_pf.c | 2 +-
drivers/net/ena/ena_ethdev.h | 4 +-
drivers/net/enic/base/vnic_dev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 4 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 4 +-
drivers/net/failsafe/failsafe.c | 3 +-
drivers/net/failsafe/failsafe_eal.c | 1 +
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
drivers/net/hinic/base/hinic_pmd_hwif.c | 2 +-
drivers/net/hinic/base/hinic_pmd_nicio.c | 2 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 2 +-
drivers/net/hns3/hns3_common.c | 2 +-
drivers/net/hns3/hns3_ethdev.c | 2 +-
drivers/net/hns3/hns3_rxtx.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 4 +-
drivers/net/i40e/i40e_vf_representor.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/igc/igc_ethdev.c | 2 +-
drivers/net/ionic/ionic.h | 2 +-
drivers/net/ionic/ionic_ethdev.c | 2 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 2 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 4 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 3 +-
drivers/net/kni/rte_eth_kni.c | 2 +-
drivers/net/liquidio/lio_ethdev.c | 3 +-
drivers/net/memif/memif_socket.c | 2 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/mlx4/mlx4_ethdev.c | 2 +-
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 5 +-
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
drivers/net/mvneta/mvneta_ethdev.c | 2 +-
drivers/net/mvpp2/mrvl_ethdev.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 5 +-
drivers/net/netvsc/hn_nvs.c | 4 +-
drivers/net/netvsc/hn_rndis.c | 4 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/netvsc/hn_vf.c | 4 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/ngbe/base/ngbe_osdep.h | 2 +-
drivers/net/ngbe/ngbe_pf.c | 2 +-
drivers/net/null/rte_eth_null.c | 2 +-
drivers/net/octeontx/base/octeontx_pkivf.c | 2 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 +-
drivers/net/pcap/pcap_ethdev.c | 2 +-
drivers/net/pfe/pfe_ethdev.c | 2 +-
drivers/net/qede/base/bcm_osal.h | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/ring/rte_eth_ring.c | 2 +-
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 4 +-
drivers/net/sfc/sfc_sriov.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/softnic/rte_eth_softnic.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ethdev.h | 2 +-
drivers/net/txgbe/txgbe_flow.c | 2 +-
drivers/net/txgbe/txgbe_pf.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 6 +-
drivers/net/vhost/rte_eth_vhost.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/net/virtio/virtio_pci.h | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 4 +-
drivers/net/virtio/virtio_user_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 4 +-
drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +-
drivers/raw/cnxk_gpio/cnxk_gpio.c | 2 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 2 +-
drivers/raw/ifpga/afu_pmd_core.h | 2 +-
drivers/raw/ifpga/afu_pmd_he_hssi.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_lpbk.c | 4 +-
drivers/raw/ifpga/afu_pmd_he_mem.c | 4 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 4 +-
drivers/raw/ifpga/ifpga_rawdev.c | 21 +-
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 8 +-
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 -
drivers/raw/ifpga/version.map | 1 -
drivers/raw/ioat/idxd_bus.c | 2 +-
drivers/raw/ioat/idxd_pci.c | 2 +-
drivers/raw/ioat/ioat_rawdev.c | 2 +-
drivers/raw/ntb/ntb.c | 2 +-
drivers/raw/ntb/ntb_hw_intel.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 25 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 4 +-
drivers/regex/mlx5/mlx5_regex.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
drivers/regex/mlx5/mlx5_regex_fastpath.c | 2 +-
drivers/vdpa/ifc/base/ifcvf_osdep.h | 2 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
drivers/vdpa/sfc/sfc_vdpa.h | 2 +-
examples/ethtool/lib/rte_ethtool.c | 17 +-
examples/ip_pipeline/kni.c | 10 -
examples/l3fwd/l3fwd_em.c | 4 +-
examples/l3fwd/l3fwd_fib.c | 8 +-
examples/l3fwd/l3fwd_lpm.c | 4 +-
examples/multi_process/hotplug_mp/commands.c | 6 +-
examples/vdpa/main.c | 16 +-
lib/compressdev/rte_compressdev.c | 48 ++-
lib/compressdev/rte_compressdev_pmd.c | 1 +
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 45 ++-
lib/dmadev/rte_dmadev.c | 21 +-
lib/dmadev/rte_dmadev.h | 21 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_bus.c | 28 +-
lib/eal/common/eal_common_dev.c | 53 ++-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/eal_private.h | 2 +-
lib/eal/common/eal_thread.h | 1 +
lib/eal/common/hotplug_mp.c | 1 +
lib/eal/include/bus_driver.h | 296 +++++++++++++++
lib/eal/include/dev_driver.h | 41 +++
lib/eal/include/meson.build | 5 +
lib/eal/include/rte_bus.h | 290 +--------------
lib/eal/include/rte_dev.h | 104 ++++--
lib/eal/include/rte_devargs.h | 4 +-
lib/eal/include/rte_eal.h | 15 +-
lib/eal/include/rte_lcore.h | 2 +
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 12 +-
lib/eal/windows/eal.c | 1 +
lib/ethdev/ethdev_driver.c | 18 +-
lib/ethdev/ethdev_driver.h | 1 +
lib/ethdev/ethdev_pci.h | 5 +-
lib/ethdev/ethdev_vdev.h | 2 +-
lib/ethdev/rte_ethdev.c | 277 +++++++++-----
lib/ethdev/rte_ethdev.h | 11 +-
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/eventdev_pmd_pci.h | 2 +-
lib/eventdev/eventdev_pmd_vdev.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 12 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 15 +-
lib/eventdev/rte_eventdev.c | 64 ++--
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 5 +-
lib/pcapng/rte_pcapng.c | 3 +-
lib/rawdev/rte_rawdev.c | 77 ++--
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/regexdev/rte_regexdev.c | 59 +--
lib/regexdev/rte_regexdev.h | 6 +-
lib/security/rte_security.c | 8 +-
lib/vhost/vdpa.c | 10 +-
lib/vhost/vhost_user.c | 6 +-
367 files changed, 2225 insertions(+), 2490 deletions(-)
create mode 100644 devtools/cocci/func_or_ret.cocci
rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (90%)
rename drivers/bus/dpaa/{rte_dpaa_bus.h => bus_dpaa_driver.h} (92%)
rename drivers/bus/fslmc/{rte_fslmc.h => bus_fslmc_driver.h} (88%)
create mode 100644 drivers/bus/fslmc/private.h
rename drivers/bus/ifpga/{rte_bus_ifpga.h => bus_ifpga_driver.h} (91%)
delete mode 100644 drivers/bus/ifpga/ifpga_common.c
create mode 100644 drivers/bus/pci/bus_pci_driver.h
create mode 100644 drivers/bus/vdev/bus_vdev_driver.h
create mode 100644 drivers/bus/vmbus/bus_vmbus_driver.h
create mode 100644 lib/eal/include/bus_driver.h
create mode 100644 lib/eal/include/dev_driver.h
--
2.37.2
^ permalink raw reply [relevance 1%]
* [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor
2022-09-05 8:39 1% ` David Marchand
@ 2022-09-05 8:39 4% ` David Marchand
2022-09-05 8:39 3% ` [PATCH v5 21/27] bus: hide bus object David Marchand
2022-09-05 8:39 1% ` [PATCH v5 23/27] dev: hide driver object David Marchand
2 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-09-05 8:39 UTC (permalink / raw)
To: dev; +Cc: thomas, bruce.richardson, Rosen Xu, Ray Kinsella, Tianfei zhang
There is no in-tree user for this accessor that returns the PCI bus
object.
On the other hand, a bus object can be retrieved by name using
rte_bus_find_by_name.
We can remove this driver specific API.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
Changes since RFC v2:
- updated release notes,
---
doc/guides/rel_notes/deprecation.rst | 3 ---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/raw/ifpga/ifpga_rawdev.c | 7 +------
drivers/raw/ifpga/ifpga_rawdev.h | 1 -
drivers/raw/ifpga/rte_pmd_ifpga.c | 6 ------
drivers/raw/ifpga/rte_pmd_ifpga.h | 10 ----------
drivers/raw/ifpga/version.map | 1 -
7 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e7583cae4c..dba252067c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -228,9 +228,6 @@ Deprecation Notices
* raw/dpaa2_cmdif: The ``dpaa2_cmdif`` rawdev driver will be deprecated
in DPDK 22.11, as it is no longer in use, no active user known.
-* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` will be removed
- in DPDK 22.11.
-
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 8c021cf050..3cea3aa8eb 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -84,6 +84,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
+
ABI Changes
-----------
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 8c05302a65..78a7123528 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -10,8 +10,8 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/epoll.h>
+
#include <rte_log.h>
-#include <rte_bus.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
@@ -1888,11 +1888,6 @@ RTE_PMD_REGISTER_PARAM_STRING(ifpga_rawdev_cfg,
"port=<int> "
"afu_bts=<path>");
-struct rte_pci_bus *ifpga_get_pci_bus(void)
-{
- return rte_ifpga_rawdev_pmd.bus;
-}
-
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file)
{
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 4c191190ca..0fb66cbaae 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -91,7 +91,6 @@ int
ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
int vec_start, rte_intr_callback_fn handler, void *arg);
-struct rte_pci_bus *ifpga_get_pci_bus(void);
int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
const char *file);
void ifpga_rawdev_cleanup(void);
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.c b/drivers/raw/ifpga/rte_pmd_ifpga.c
index 23146432c2..1ca248123b 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.c
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.c
@@ -402,12 +402,6 @@ rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page)
return opae_mgr_reload(adapter->mgr, type, page);
}
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void)
-{
- return ifpga_get_pci_bus();
-}
-
int
rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file)
{
diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.h b/drivers/raw/ifpga/rte_pmd_ifpga.h
index 3fa5d3435a..791543f2cd 100644
--- a/drivers/raw/ifpga/rte_pmd_ifpga.h
+++ b/drivers/raw/ifpga/rte_pmd_ifpga.h
@@ -220,16 +220,6 @@ rte_pmd_ifpga_reboot_try(uint16_t dev_id);
int
rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
-/**
- * Get PCI bus the Intel FPGA driver register to
- *
- * @return
- * - (valid pointer) if successful.
- * - (NULL) if the Intel FPGA driver is not registered to any PCI bus.
- */
-const struct rte_pci_bus *
-rte_pmd_ifpga_get_pci_bus(void);
-
/**
* Perform PR (partial reconfiguration) on specified Intel FPGA device
*
diff --git a/drivers/raw/ifpga/version.map b/drivers/raw/ifpga/version.map
index f5c3959b7f..916da8a4f2 100644
--- a/drivers/raw/ifpga/version.map
+++ b/drivers/raw/ifpga/version.map
@@ -3,7 +3,6 @@ DPDK_23 {
rte_pmd_ifpga_cleanup;
rte_pmd_ifpga_get_dev_id;
- rte_pmd_ifpga_get_pci_bus;
rte_pmd_ifpga_get_phy_info;
rte_pmd_ifpga_get_property;
rte_pmd_ifpga_get_rsu_status;
--
2.37.2
^ permalink raw reply [relevance 4%]
* [PATCH v5 21/27] bus: hide bus object
2022-09-05 8:39 1% ` David Marchand
2022-09-05 8:39 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
@ 2022-09-05 8:39 3% ` David Marchand
2022-09-05 8:39 1% ` [PATCH v5 23/27] dev: hide driver object David Marchand
2 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-09-05 8:39 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, Ray Kinsella, Parav Pandit, Xueming Li,
Hemant Agrawal, Sachin Saxena, Rosen Xu, Anatoly Burakov,
Stephen Hemminger, Long Li, Matan Azrad, Viacheslav Ovsiienko,
Kevin Laatz, Chas Williams, Min Hu (Connor),
Gaetan Rivet, Maxime Coquelin, Chenbo Xia, Ferruh Yigit,
Andrew Rybchenko, Reshma Pattan
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_bus objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
Changes since RFC v1:
- update all existing users of the public header to use the internal one,
---
app/test/test_devargs.c | 2 +-
app/test/test_vdev.c | 2 +-
doc/guides/rel_notes/deprecation.rst | 6 -
doc/guides/rel_notes/release_22_11.rst | 6 +
drivers/bus/auxiliary/auxiliary_common.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/private.h | 2 +-
drivers/bus/dpaa/dpaa_bus.c | 2 +-
drivers/bus/fslmc/fslmc_bus.c | 2 +-
drivers/bus/fslmc/private.h | 2 +-
drivers/bus/ifpga/ifpga_bus.c | 2 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/pci_common.c | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/pci/private.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vmbus/private.h | 2 +-
drivers/common/mlx5/mlx5_common_pci.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 2 +-
drivers/net/bonding/rte_eth_bond_args.c | 2 +-
drivers/net/failsafe/failsafe.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/mlx5/linux/mlx5_os.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/raw/ioat/idxd_bus.c | 2 +-
lib/eal/common/eal_common_bus.c | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/common/eal_common_devargs.c | 2 +-
lib/eal/common/hotplug_mp.c | 2 +-
lib/eal/include/bus_driver.h | 296 +++++++++++++++++++++++
lib/eal/include/meson.build | 4 +
lib/eal/include/rte_bus.h | 278 +--------------------
lib/eal/linux/eal_dev.c | 2 +-
lib/eal/version.map | 8 +-
lib/ethdev/rte_ethdev.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
38 files changed, 343 insertions(+), 319 deletions(-)
create mode 100644 lib/eal/include/bus_driver.h
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index ac5bc34c18..0a4c34a1ad 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -9,7 +9,7 @@
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include "test.h"
diff --git a/app/test/test_vdev.c b/app/test/test_vdev.c
index 5eeff3106d..1904e76e44 100644
--- a/app/test/test_vdev.c
+++ b/app/test/test_vdev.c
@@ -8,7 +8,7 @@
#include <rte_common.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_vdev.h>
#include "test.h"
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5b4ffc992d..98a00da385 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -47,12 +47,6 @@ Deprecation Notices
* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
will be removed in DPDK 22.11.
-* bus: The ``rte_bus`` object will be made opaque in DPDK 22.11.
- The goal is to remove it from the public ABI and make this object extendable.
- As a side effect, registering a bus will be marked as an internal API:
- external users may still register their bus using a new driver header
- (see ``enable_driver_sdk`` meson option).
-
* drivers: As a follow-up of the work on the ``rte_bus`` object,
the ``rte_driver`` and ``rte_device`` objects (and as a domino effect,
their bus-specific counterparts) will be made opaque in DPDK 22.11.
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index e08a548285..36df0ccf93 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -88,6 +88,12 @@ API Changes
in the future. Applications can use ``devtools/cocci/func_or_ret.cocci``
to update their code.
+* bus: Registering a bus has been marked as an internal API.
+ External users may still register their bus using the ``bus_driver.h``
+ driver header (see ``enable_driver_sdk`` meson option).
+ The ``rte_bus`` object is now opaque and must be manipulated through added
+ accessors.
+
* drivers: Registering a driver on the ``auxiliary``, ``ifpga``, ``pci``,
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 6cf6c170ec..259ff152c4 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -12,7 +12,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_eal.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index 0289777922..a889e392c6 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_dev.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index 3f49f62493..3dee13e1d1 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "bus_auxiliary_driver.h"
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 1ac6aa314f..682427ba2c 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -29,7 +29,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_ring.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_mbuf_pool_ops.h>
#include <rte_mbuf_dyn.h>
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index b9b0981329..8503004e3d 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_malloc.h>
#include <rte_devargs.h>
#include <rte_memcpy.h>
diff --git a/drivers/bus/fslmc/private.h b/drivers/bus/fslmc/private.h
index 60d68155e1..6f14085d98 100644
--- a/drivers/bus/fslmc/private.h
+++ b/drivers/bus/fslmc/private.h
@@ -5,7 +5,7 @@
#ifndef BUS_FSLMC_PRIVATE_H
#define BUS_FSLMC_PRIVATE_H
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 27e2de7072..bb943b58b5 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <rte_errno.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_memzone.h>
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index cd0d0b1670..fab3483d9f 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -18,7 +18,7 @@
#include <rte_malloc.h>
#include <rte_vfio.h>
#include <rte_eal.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_tailq.h>
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 0d61d49287..c26aacd364 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -13,7 +13,7 @@
#include <rte_errno.h>
#include <rte_interrupts.h>
#include <rte_log.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
#include <rte_lcore.h>
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 61a868707f..39d702a418 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_bus_pci.h>
#include <rte_dev.h>
#include <rte_errno.h>
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 4e40a2ed85..fddf49251d 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -8,7 +8,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <rte_os_shim.h>
#include <rte_pci.h>
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 7d78cf93bc..809a8bb08f 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -12,7 +12,7 @@
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
#include <rte_memory.h>
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index 3d233fa83c..e33424675c 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -9,7 +9,7 @@
#include <stdbool.h>
#include <sys/uio.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_log.h>
#include <rte_eal_paging.h>
diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c
index e82cb881bf..73178ce0f3 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -9,7 +9,7 @@
#include <rte_errno.h>
#include <rte_class.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include "mlx5_common_log.h"
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 13cb967f6d..e30dcfc281 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -8,7 +8,7 @@
#include <sys/mman.h>
#include <libgen.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 1a86eb3c00..6553166f5c 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -4,7 +4,7 @@
#include <rte_devargs.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 5d4d52c341..32811403b4 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -11,7 +11,7 @@
#include <ethdev_vdev.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include "failsafe_private.h"
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index 130344dce2..d71b512f81 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -3,7 +3,7 @@
* Copyright 2017 Mellanox Technologies, Ltd
*/
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index efb262e368..4f0a6f4d55 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -19,7 +19,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_pci_driver.h>
#include <bus_auxiliary_driver.h>
#include <rte_common.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 188d92ffac..ccc06bdda6 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -31,7 +31,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_dev.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 65043a04eb..dc90569df1 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
#include <rte_dev.h>
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 632451dcbe..9cf4d760b4 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -9,7 +9,7 @@
#endif
#include <rte_io.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include "virtio_pci.h"
#include "virtio_logs.h"
diff --git a/drivers/raw/ioat/idxd_bus.c b/drivers/raw/ioat/idxd_bus.c
index 539f51b1b1..f32d811055 100644
--- a/drivers/raw/ioat/idxd_bus.c
+++ b/drivers/raw/ioat/idxd_bus.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/mman.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_string_fns.h>
#include "ioat_private.h"
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index cbf382f967..be64d31b0f 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_debug.h>
#include <rte_string_fns.h>
#include <rte_errno.h>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index b6f0392f30..62a598957c 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c
index d5833af373..03e6e59baf 100644
--- a/lib/eal/common/eal_common_devargs.c
+++ b/lib/eal/common/eal_common_devargs.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <stdarg.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_class.h>
#include <rte_dev.h>
#include <rte_devargs.h>
diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c
index 1614a57752..5202bd5658 100644
--- a/lib/eal/common/hotplug_mp.c
+++ b/lib/eal/common/hotplug_mp.c
@@ -3,7 +3,7 @@
*/
#include <string.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_eal.h>
#include <rte_errno.h>
#include <rte_alarm.h>
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
new file mode 100644
index 0000000000..d2e615a736
--- /dev/null
+++ b/lib/eal/include/bus_driver.h
@@ -0,0 +1,296 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef BUS_DRIVER_H
+#define BUS_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bus.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
+#include <rte_eal.h>
+#include <rte_tailq.h>
+
+struct rte_devargs;
+struct rte_device;
+
+/** Double linked list of buses */
+RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
+
+/**
+ * Bus specific scan for devices attached on the bus.
+ * For each bus object, the scan would be responsible for finding devices and
+ * adding them to its private device list.
+ *
+ * A bus should mandatorily implement this method.
+ *
+ * @return
+ * 0 for successful scan
+ * <0 for unsuccessful scan with error value
+ */
+typedef int (*rte_bus_scan_t)(void);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * This is called while iterating over each registered bus.
+ *
+ * @return
+ * 0 for successful probe
+ * !0 for any error while probing
+ */
+typedef int (*rte_bus_probe_t)(void);
+
+/**
+ * Device iterator to find a device on a bus.
+ *
+ * This function returns an rte_device if one of those held by the bus
+ * matches the data passed as parameter.
+ *
+ * If the comparison function returns zero this function should stop iterating
+ * over any more devices. To continue a search the device of a previous search
+ * can be passed via the start parameter.
+ *
+ * @param cmp
+ * Comparison function.
+ *
+ * @param data
+ * Data to compare each device against.
+ *
+ * @param start
+ * starting point for the iteration
+ *
+ * @return
+ * The first device matching the data, NULL if none exists.
+ */
+typedef struct rte_device *
+(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
+ const void *data);
+
+/**
+ * Implementation specific probe function which is responsible for linking
+ * devices on that bus with applicable drivers.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_plug_t)(struct rte_device *dev);
+
+/**
+ * Implementation specific remove function which is responsible for unlinking
+ * devices on that bus from assigned driver.
+ *
+ * @param dev
+ * Device pointer that was returned by a previous call to find_device.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
+
+/**
+ * Bus specific parsing function.
+ * Validates the syntax used in the textual representation of a device,
+ * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
+ * device representation to ``addr``.
+ *
+ * @param[in] name
+ * device textual description
+ *
+ * @param[out] addr
+ * device information location address, into which parsed info
+ * should be written. If NULL, nothing should be written, which
+ * is not an error.
+ *
+ * @return
+ * 0 if parsing was successful.
+ * !0 for any error.
+ */
+typedef int (*rte_bus_parse_t)(const char *name, void *addr);
+
+/**
+ * Parse bus part of the device arguments.
+ *
+ * The field name of the struct rte_devargs will be set.
+ *
+ * @param da
+ * Pointer to the devargs to parse.
+ *
+ * @return
+ * 0 on successful parsing, otherwise rte_errno is set.
+ * -EINVAL: on parsing error.
+ * -ENODEV: if no key matching a device argument is specified.
+ * -E2BIG: device name is too long.
+ */
+typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
+
+/**
+ * Device level DMA map function.
+ * After a successful call, the memory segment will be mapped to the
+ * given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to map.
+ * @param iova
+ * IOVA address to map.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Device level DMA unmap function.
+ * After a successful call, the memory segment will no longer be
+ * accessible by the given device.
+ *
+ * @param dev
+ * Device pointer.
+ * @param addr
+ * Virtual address to unmap.
+ * @param iova
+ * IOVA address to unmap.
+ * @param len
+ * Length of the memory segment being mapped.
+ *
+ * @return
+ * 0 if un-mapping was successful.
+ * Negative value and rte_errno is set otherwise.
+ */
+typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
+ uint64_t iova, size_t len);
+
+/**
+ * Implement a specific hot-unplug handler, which is responsible for
+ * handle the failure when device be hot-unplugged. When the event of
+ * hot-unplug be detected, it could call this function to handle
+ * the hot-unplug failure and avoid app crash.
+ * @param dev
+ * Pointer of the device structure.
+ *
+ * @return
+ * 0 on success.
+ * !0 on error.
+ */
+typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
+
+/**
+ * Implement a specific sigbus handler, which is responsible for handling
+ * the sigbus error which is either original memory error, or specific memory
+ * error that caused of device be hot-unplugged. When sigbus error be captured,
+ * it could call this function to handle sigbus error.
+ * @param failure_addr
+ * Pointer of the fault address of the sigbus error.
+ *
+ * @return
+ * 0 for success handle the sigbus for hot-unplug.
+ * 1 for not process it, because it is a generic sigbus error.
+ * -1 for failed to handle the sigbus for hot-unplug.
+ */
+typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
+
+/**
+ * Bus scan policies
+ */
+enum rte_bus_scan_mode {
+ RTE_BUS_SCAN_UNDEFINED,
+ RTE_BUS_SCAN_ALLOWLIST,
+ RTE_BUS_SCAN_BLOCKLIST,
+};
+
+/**
+ * A structure used to configure bus operations.
+ */
+struct rte_bus_conf {
+ enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
+};
+
+
+/**
+ * Get common iommu class of the all the devices on the bus. The bus may
+ * check that those devices are attached to iommu driver.
+ * If no devices are attached to the bus. The bus may return with don't care
+ * (_DC) value.
+ * Otherwise, The bus will return appropriate _pa or _va iova mode.
+ *
+ * @return
+ * enum rte_iova_mode value.
+ */
+typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
+
+/**
+ * A structure describing a generic bus.
+ */
+struct rte_bus {
+ RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
+ const char *name; /**< Name of the bus */
+ rte_bus_scan_t scan; /**< Scan for devices attached to bus */
+ rte_bus_probe_t probe; /**< Probe devices on bus */
+ rte_bus_find_device_t find_device; /**< Find a device on the bus */
+ rte_bus_plug_t plug; /**< Probe single device for drivers */
+ rte_bus_unplug_t unplug; /**< Remove single device from driver */
+ rte_bus_parse_t parse; /**< Parse a device name */
+ rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
+ rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
+ rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
+ struct rte_bus_conf conf; /**< Bus configuration */
+ rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
+ rte_dev_iterate_t dev_iterate; /**< Device iterator. */
+ rte_bus_hot_unplug_handler_t hot_unplug_handler;
+ /**< handle hot-unplug failure on the bus */
+ rte_bus_sigbus_handler_t sigbus_handler;
+ /**< handle sigbus error on the bus */
+};
+
+/**
+ * Register a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be registered.
+ */
+__rte_internal
+void rte_bus_register(struct rte_bus *bus);
+
+/**
+ * Helper for Bus registration.
+ * The constructor has higher priority than PMD constructors.
+ */
+#define RTE_REGISTER_BUS(nm, bus) \
+RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
+{\
+ (bus).name = RTE_STR(nm);\
+ rte_bus_register(&bus); \
+}
+
+/**
+ * Unregister a Bus handler.
+ *
+ * @param bus
+ * A pointer to a rte_bus structure describing the bus
+ * to be unregistered.
+ */
+__rte_internal
+void rte_bus_unregister(struct rte_bus *bus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BUS_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index fd6e844224..77d8621a51 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -55,6 +55,10 @@ headers += files(
'rte_vfio.h',
)
+driver_sdk_headers = files(
+ 'bus_driver.h',
+)
+
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'generic/rte_atomic.h',
diff --git a/lib/eal/include/rte_bus.h b/lib/eal/include/rte_bus.h
index 3848b44db0..dfe756fb11 100644
--- a/lib/eal/include/rte_bus.h
+++ b/lib/eal/include/rte_bus.h
@@ -20,284 +20,21 @@ extern "C" {
#include <stdio.h>
-#include <rte_dev.h>
#include <rte_eal.h>
-#include <rte_log.h>
-/** Double linked list of buses */
-RTE_TAILQ_HEAD(rte_bus_list, rte_bus);
-
-/**
- * Bus specific scan for devices attached on the bus.
- * For each bus object, the scan would be responsible for finding devices and
- * adding them to its private device list.
- *
- * A bus should mandatorily implement this method.
- *
- * @return
- * 0 for successful scan
- * <0 for unsuccessful scan with error value
- */
-typedef int (*rte_bus_scan_t)(void);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * This is called while iterating over each registered bus.
- *
- * @return
- * 0 for successful probe
- * !0 for any error while probing
- */
-typedef int (*rte_bus_probe_t)(void);
-
-/**
- * Device iterator to find a device on a bus.
- *
- * This function returns an rte_device if one of those held by the bus
- * matches the data passed as parameter.
- *
- * If the comparison function returns zero this function should stop iterating
- * over any more devices. To continue a search the device of a previous search
- * can be passed via the start parameter.
- *
- * @param cmp
- * Comparison function.
- *
- * @param data
- * Data to compare each device against.
- *
- * @param start
- * starting point for the iteration
- *
- * @return
- * The first device matching the data, NULL if none exists.
- */
-typedef struct rte_device *
-(*rte_bus_find_device_t)(const struct rte_device *start, rte_dev_cmp_t cmp,
- const void *data);
-
-/**
- * Implementation specific probe function which is responsible for linking
- * devices on that bus with applicable drivers.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_plug_t)(struct rte_device *dev);
-
-/**
- * Implementation specific remove function which is responsible for unlinking
- * devices on that bus from assigned driver.
- *
- * @param dev
- * Device pointer that was returned by a previous call to find_device.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_unplug_t)(struct rte_device *dev);
-
-/**
- * Bus specific parsing function.
- * Validates the syntax used in the textual representation of a device,
- * If the syntax is valid and ``addr`` is not NULL, writes the bus-specific
- * device representation to ``addr``.
- *
- * @param[in] name
- * device textual description
- *
- * @param[out] addr
- * device information location address, into which parsed info
- * should be written. If NULL, nothing should be written, which
- * is not an error.
- *
- * @return
- * 0 if parsing was successful.
- * !0 for any error.
- */
-typedef int (*rte_bus_parse_t)(const char *name, void *addr);
-
-/**
- * Parse bus part of the device arguments.
- *
- * The field name of the struct rte_devargs will be set.
- *
- * @param da
- * Pointer to the devargs to parse.
- *
- * @return
- * 0 on successful parsing, otherwise rte_errno is set.
- * -EINVAL: on parsing error.
- * -ENODEV: if no key matching a device argument is specified.
- * -E2BIG: device name is too long.
- */
-typedef int (*rte_bus_devargs_parse_t)(struct rte_devargs *da);
-
-/**
- * Device level DMA map function.
- * After a successful call, the memory segment will be mapped to the
- * given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to map.
- * @param iova
- * IOVA address to map.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_map_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Device level DMA unmap function.
- * After a successful call, the memory segment will no longer be
- * accessible by the given device.
- *
- * @param dev
- * Device pointer.
- * @param addr
- * Virtual address to unmap.
- * @param iova
- * IOVA address to unmap.
- * @param len
- * Length of the memory segment being mapped.
- *
- * @return
- * 0 if un-mapping was successful.
- * Negative value and rte_errno is set otherwise.
- */
-typedef int (*rte_dev_dma_unmap_t)(struct rte_device *dev, void *addr,
- uint64_t iova, size_t len);
-
-/**
- * Implement a specific hot-unplug handler, which is responsible for
- * handle the failure when device be hot-unplugged. When the event of
- * hot-unplug be detected, it could call this function to handle
- * the hot-unplug failure and avoid app crash.
- * @param dev
- * Pointer of the device structure.
- *
- * @return
- * 0 on success.
- * !0 on error.
- */
-typedef int (*rte_bus_hot_unplug_handler_t)(struct rte_device *dev);
-
-/**
- * Implement a specific sigbus handler, which is responsible for handling
- * the sigbus error which is either original memory error, or specific memory
- * error that caused of device be hot-unplugged. When sigbus error be captured,
- * it could call this function to handle sigbus error.
- * @param failure_addr
- * Pointer of the fault address of the sigbus error.
- *
- * @return
- * 0 for success handle the sigbus for hot-unplug.
- * 1 for not process it, because it is a generic sigbus error.
- * -1 for failed to handle the sigbus for hot-unplug.
- */
-typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);
-
-/**
- * Bus scan policies
- */
-enum rte_bus_scan_mode {
- RTE_BUS_SCAN_UNDEFINED,
- RTE_BUS_SCAN_ALLOWLIST,
- RTE_BUS_SCAN_BLOCKLIST,
-};
-
-/**
- * A structure used to configure bus operations.
- */
-struct rte_bus_conf {
- enum rte_bus_scan_mode scan_mode; /**< Scan policy. */
-};
-
-
-/**
- * Get common iommu class of the all the devices on the bus. The bus may
- * check that those devices are attached to iommu driver.
- * If no devices are attached to the bus. The bus may return with don't care
- * (_DC) value.
- * Otherwise, The bus will return appropriate _pa or _va iova mode.
- *
- * @return
- * enum rte_iova_mode value.
- */
-typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);
-
-
-/**
- * A structure describing a generic bus.
- */
-struct rte_bus {
- RTE_TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
- const char *name; /**< Name of the bus */
- rte_bus_scan_t scan; /**< Scan for devices attached to bus */
- rte_bus_probe_t probe; /**< Probe devices on bus */
- rte_bus_find_device_t find_device; /**< Find a device on the bus */
- rte_bus_plug_t plug; /**< Probe single device for drivers */
- rte_bus_unplug_t unplug; /**< Remove single device from driver */
- rte_bus_parse_t parse; /**< Parse a device name */
- rte_bus_devargs_parse_t devargs_parse; /**< Parse bus devargs */
- rte_dev_dma_map_t dma_map; /**< DMA map for device in the bus */
- rte_dev_dma_unmap_t dma_unmap; /**< DMA unmap for device in the bus */
- struct rte_bus_conf conf; /**< Bus configuration */
- rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
- rte_dev_iterate_t dev_iterate; /**< Device iterator. */
- rte_bus_hot_unplug_handler_t hot_unplug_handler;
- /**< handle hot-unplug failure on the bus */
- rte_bus_sigbus_handler_t sigbus_handler;
- /**< handle sigbus error on the bus */
-
-};
+struct rte_bus;
+struct rte_device;
/**
* Retrieve a bus name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param bus
* A pointer to a rte_bus structure.
* @return
* A pointer to the bus name string.
*/
-__rte_experimental
const char *rte_bus_name(const struct rte_bus *bus);
-/**
- * Register a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be registered.
- */
-void rte_bus_register(struct rte_bus *bus);
-
-/**
- * Unregister a Bus handler.
- *
- * @param bus
- * A pointer to a rte_bus structure describing the bus
- * to be unregistered.
- */
-void rte_bus_unregister(struct rte_bus *bus);
-
/**
* Scan all the buses.
*
@@ -387,17 +124,6 @@ struct rte_bus *rte_bus_find_by_name(const char *busname);
*/
enum rte_iova_mode rte_bus_get_iommu_class(void);
-/**
- * Helper for Bus registration.
- * The constructor has higher priority than PMD constructors.
- */
-#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
-{\
- (bus).name = RTE_STR(nm);\
- rte_bus_register(&bus); \
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 02ae1cde29..098a2c3076 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -13,7 +13,7 @@
#include <rte_dev.h>
#include <rte_interrupts.h>
#include <rte_alarm.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_spinlock.h>
#include <rte_errno.h>
diff --git a/lib/eal/version.map b/lib/eal/version.map
index aa53064db1..6ec15f1147 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -12,10 +12,9 @@ DPDK_23 {
rte_bus_find_by_device;
rte_bus_find_by_name;
rte_bus_get_iommu_class;
+ rte_bus_name;
rte_bus_probe;
- rte_bus_register;
rte_bus_scan;
- rte_bus_unregister;
rte_calloc;
rte_calloc_socket;
rte_cpu_get_flag_enabled;
@@ -424,14 +423,13 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_bus_name;
};
INTERNAL {
global:
+ rte_bus_register;
+ rte_bus_unregister;
rte_eal_get_baseaddr;
rte_firmware_read;
rte_intr_allow_others;
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 9e358d187a..0c2c1088c0 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <sys/queue.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_log.h>
#include <rte_interrupts.h>
#include <rte_memcpy.h>
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 5b079cd14a..72aabd4dd0 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -11,7 +11,7 @@
#include <time.h>
#include <unistd.h>
-#include <rte_bus.h>
+#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_dev.h>
--
2.37.2
^ permalink raw reply [relevance 3%]
* [PATCH v5 23/27] dev: hide driver object
2022-09-05 8:39 1% ` David Marchand
2022-09-05 8:39 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
2022-09-05 8:39 3% ` [PATCH v5 21/27] bus: hide bus object David Marchand
@ 2022-09-05 8:39 1% ` David Marchand
2 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-09-05 8:39 UTC (permalink / raw)
To: dev
Cc: thomas, bruce.richardson, Jay Jayatheerthan, Ajit Khaparde,
Nicolas Chautru, Parav Pandit, Xueming Li, Hemant Agrawal,
Sachin Saxena, Stephen Hemminger, Long Li, Fan Zhang,
Sunila Sahu, Ashish Gupta, Raveendra Padasalagi, Vikas Gupta,
Chandubabu Namburu, Ankur Dwivedi, Anoob Joseph, Tejasree Kondoj,
Gagandeep Singh, Kevin Laatz, Timothy McDaniel, Jerin Jacob,
Elena Agostini, Ciara Loftus, Qi Zhang, Shepard Siegel, Ed Czeck,
John Miller, Steven Webster, Matt Peters, Rasesh Mody,
Shahed Shaikh, Somnath Kotur, Rahul Lakkireddy, Simei Su,
Wenjun Wu, Marcin Wojtas, Michal Krawczyk, Shai Brandes,
Evgeny Schemeilin, Igor Chauskin, John Daley, Hyong Youb Kim,
Gaetan Rivet, Xiao Wang, Yuying Zhang, Beilei Xing, Jingjing Wu,
Qiming Yang, Matan Azrad, Viacheslav Ovsiienko, Chaoyong He,
Niklas Soderlund, Harman Kalra, Devendra Singh Rawat,
Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Jakub Palider, Tomasz Duszynski, Ori Kam,
Akhil Goyal, Chengwen Feng, Ray Kinsella, Ferruh Yigit,
Abhinandan Gujjar, Olivier Matz, Reshma Pattan
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
Changes since RFC v2:
- updated release notes,
- marked accessors as stable,
---
doc/guides/rel_notes/release_22_11.rst | 2 ++
drivers/baseband/acc100/rte_acc100_pmd.c | 2 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 2 +-
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2 +-
drivers/bus/auxiliary/auxiliary_params.c | 2 +-
drivers/bus/auxiliary/bus_auxiliary_driver.h | 2 +-
drivers/bus/dpaa/bus_dpaa_driver.h | 2 +-
drivers/bus/fslmc/bus_fslmc_driver.h | 2 +-
drivers/bus/fslmc/fslmc_vfio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 2 +-
drivers/bus/pci/bus_pci_driver.h | 2 +-
drivers/bus/pci/pci_params.c | 2 +-
drivers/bus/vdev/bus_vdev_driver.h | 2 +-
drivers/bus/vdev/vdev.c | 2 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/bus_vmbus_driver.h | 2 +-
drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/compress/zlib/zlib_pmd_ops.c | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cn10k_cryptodev.c | 2 +-
drivers/crypto/cnxk/cn9k_cryptodev.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +-
drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
drivers/dma/idxd/idxd_bus.c | 1 +
drivers/event/dlb2/dlb2.c | 2 +-
drivers/event/dlb2/pf/dlb2_pf.c | 2 +-
drivers/event/dpaa/dpaa_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 2 +-
drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +-
drivers/event/octeontx/ssovf_evdev.c | 2 +-
drivers/event/skeleton/skeleton_eventdev.c | 2 +-
drivers/gpu/cuda/cuda.c | 2 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
drivers/net/ark/ark_global.h | 2 +-
drivers/net/avp/avp_ethdev.c | 2 +-
drivers/net/axgbe/axgbe_common.h | 2 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
drivers/net/cxgbe/base/t4_hw.c | 2 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
drivers/net/cxgbe/cxgbe_main.c | 2 +-
drivers/net/cxgbe/sge.c | 2 +-
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 2 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
drivers/net/dpaa2/dpaa2_recycle.c | 2 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 2 +-
drivers/net/dpaa2/dpaa2_sparser.c | 2 +-
drivers/net/e1000/em_ethdev.c | 2 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/ena/ena_ethdev.h | 2 +-
drivers/net/enic/enic_ethdev.c | 2 +-
drivers/net/enic/enic_vf_representor.c | 2 +-
drivers/net/failsafe/failsafe_private.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 2 +-
drivers/net/iavf/iavf_vchnl.c | 2 +-
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/mlx4/mlx4.c | 2 +-
drivers/net/netvsc/hn_ethdev.c | 2 +-
drivers/net/netvsc/hn_nvs.c | 2 +-
drivers/net/netvsc/hn_rndis.c | 2 +-
drivers/net/netvsc/hn_rxtx.c | 2 +-
drivers/net/nfp/nfp_common.c | 2 +-
drivers/net/nfp/nfp_ethdev.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 2 +-
drivers/net/qede/qede_ethdev.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_sw_stats.h | 2 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_pci_ethdev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
drivers/regex/mlx5/mlx5_regex_control.c | 2 +-
lib/compressdev/rte_compressdev.c | 2 +-
lib/compressdev/rte_compressdev_pmd.c | 2 +-
lib/compressdev/rte_compressdev_pmd.h | 1 +
lib/cryptodev/cryptodev_pmd.c | 2 +-
lib/cryptodev/cryptodev_pmd.h | 1 +
lib/cryptodev/rte_cryptodev.c | 2 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +-
lib/eal/common/eal_common_dev.c | 2 +-
lib/eal/include/dev_driver.h | 28 +++++++++++++++++++
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_dev.h | 15 ++--------
lib/eal/version.map | 4 +--
lib/ethdev/ethdev_driver.h | 1 +
lib/eventdev/eventdev_pmd.h | 2 +-
lib/eventdev/rte_event_crypto_adapter.c | 2 +-
lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
lib/eventdev/rte_eventdev.c | 2 +-
lib/gpudev/gpudev_driver.h | 2 +-
lib/mempool/rte_mempool_ops.c | 2 +-
lib/pcapng/rte_pcapng.c | 2 +-
lib/rawdev/rte_rawdev.c | 2 +-
lib/rawdev/rte_rawdev_pmd.h | 2 +-
lib/security/rte_security.c | 2 +-
115 files changed, 144 insertions(+), 122 deletions(-)
create mode 100644 lib/eal/include/dev_driver.h
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 36df0ccf93..4e20345b7a 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -98,6 +98,8 @@ API Changes
``vdev``, ``vmbus`` buses has been marked as an internal API.
External users may still register their driver using the associated driver
headers (see ``enable_driver_sdk`` meson option).
+ The ``rte_driver`` object is now opaque and must be manipulated through added
+ accessors.
* raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 801e8920df..e2d9409185 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_byteorder.h>
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index c1d877c87f..51dd090c1b 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index f16814e241..036579e3ec 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -6,7 +6,7 @@
#include <rte_common.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_errno.h>
diff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c
index a889e392c6..e4c7ee0c3b 100644
--- a/drivers/bus/auxiliary/auxiliary_params.c
+++ b/drivers/bus/auxiliary/auxiliary_params.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <bus_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
diff --git a/drivers/bus/auxiliary/bus_auxiliary_driver.h b/drivers/bus/auxiliary/bus_auxiliary_driver.h
index 1c2d2c04af..58fb7c7f69 100644
--- a/drivers/bus/auxiliary/bus_auxiliary_driver.h
+++ b/drivers/bus/auxiliary/bus_auxiliary_driver.h
@@ -25,7 +25,7 @@ extern "C" {
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#define RTE_BUS_AUXILIARY_NAME "auxiliary"
diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
index cf66fc0c53..26a83b2cdf 100644
--- a/drivers/bus/dpaa/bus_dpaa_driver.h
+++ b/drivers/bus/dpaa/bus_dpaa_driver.h
@@ -7,7 +7,7 @@
#define BUS_DPAA_DRIVER_H
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_mbuf_dyn.h>
#include <rte_mempool.h>
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 798ddebf3a..7ac5fe6ff1 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -29,7 +29,7 @@ extern "C" {
#include <rte_compat.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 8604e43947..5966776a85 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -28,7 +28,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal_memconfig.h>
#include "private.h"
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index cfe4280f87..d7f6e45b7d 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -18,7 +18,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_mbuf_pool_ops.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
index b7d81b518c..07256ed7ec 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <fslmc_logs.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 071b0d297d..4aec7b2cd8 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -30,7 +30,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
index 223e34bcba..65e2d799c3 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dprc.c
@@ -10,7 +10,7 @@
#include <errno.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "private.h"
#include <fslmc_logs.h>
diff --git a/drivers/bus/pci/bus_pci_driver.h b/drivers/bus/pci/bus_pci_driver.h
index b5c7dee617..0f2f9b5101 100644
--- a/drivers/bus/pci/bus_pci_driver.h
+++ b/drivers/bus/pci/bus_pci_driver.h
@@ -11,7 +11,7 @@ extern "C" {
#endif
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_compat.h>
/** Pathname of PCI devices directory. */
diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c
index 39d702a418..d24cc201b8 100644
--- a/drivers/bus/pci/pci_params.c
+++ b/drivers/bus/pci/pci_params.c
@@ -6,7 +6,7 @@
#include <bus_driver.h>
#include <rte_bus_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_kvargs.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
index 36748cdfae..bc7e30d7c6 100644
--- a/drivers/bus/vdev/bus_vdev_driver.h
+++ b/drivers/bus/vdev/bus_vdev_driver.h
@@ -11,7 +11,7 @@ extern "C" {
#include <rte_bus_vdev.h>
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
struct rte_vdev_device {
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 809a8bb08f..b176b658fc 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -11,7 +11,7 @@
#include <sys/queue.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_devargs.h>
diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
index 2c72614776..2d10a1e8ad 100644
--- a/drivers/bus/vdev/vdev_params.c
+++ b/drivers/bus/vdev/vdev_params.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include <rte_errno.h>
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index 3424e791c9..e2475a642d 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -12,7 +12,7 @@ extern "C" {
#include <rte_bus_vmbus.h>
#include <rte_compat.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
struct vmbus_channel;
struct vmbus_mon_page;
diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev/qat_dev_gen4.c
index 7ffde5f4c8..85d6ddfcf4 100644
--- a/drivers/common/qat/dev/qat_dev_gen4.c
+++ b/drivers/common/qat/dev/qat_dev_gen4.c
@@ -2,7 +2,7 @@
* Copyright(c) 2021 Intel Corporation
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "qat_device.h"
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 5916e745e2..9cbd19a481 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -4,7 +4,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_pci.h>
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 7d657d81bc..445a3baa67 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -4,7 +4,7 @@
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
index 61d457f4e0..d1ede5e990 100644
--- a/drivers/crypto/bcmfs/bcmfs_qp.c
+++ b/drivers/crypto/bcmfs/bcmfs_qp.c
@@ -8,7 +8,7 @@
#include <rte_atomic.h>
#include <rte_bitmap.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_prefetch.h>
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index bc7fb67218..78272d616c 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -4,7 +4,7 @@
*/
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_malloc.h>
#include <cryptodev_pmd.h>
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 6c3e45e333..013f3be1e6 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -9,7 +9,7 @@
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include "ccp_crypto.h"
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index 3fd9f3c426..db11ac7444 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn10k_cryptodev.h"
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index bd425f95ff..4cfc1f2150 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -7,7 +7,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include "cn9k_cryptodev.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 0cce861899..3b13578de0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <cryptodev_pmd.h>
#include <rte_common.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 7e554cb2b1..c6bd785262 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -19,7 +19,7 @@
#include <rte_security_driver.h>
#endif
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_io.h>
#include <rte_ip.h>
#include <rte_kvargs.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 83ae6b6be9..11b559e025 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -5,7 +5,7 @@
#include <rte_common.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
#include <rte_reorder.h>
diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index e30dcfc281..9b7b16c6e3 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -9,6 +9,7 @@
#include <libgen.h>
#include <bus_driver.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_eal.h>
#include <rte_log.h>
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 5a443acff8..759578378f 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -17,7 +17,7 @@
#include <rte_config.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_eventdev.h>
#include <eventdev_pmd.h>
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index 9f8c6cd8b8..71ac141b66 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -15,7 +15,7 @@
#include <rte_debug.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_mbuf.h>
#include <rte_ring.h>
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index aa403f9e06..8e470584ea 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_log.h>
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 08df6e223a..1001297cda 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -14,7 +14,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <bus_fslmc_driver.h>
#include <rte_lcore.h>
diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
index 3882a9cf1d..a68d3ac154 100644
--- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c
+++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c
@@ -17,7 +17,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index fe157c59d5..99fa326ad5 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -7,7 +7,7 @@
#include <rte_common.h>
#include <cryptodev_pmd.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <ethdev_driver.h>
#include <rte_event_eth_rx_adapter.h>
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index 6bd8fec6d4..8513b9a013 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_log.h>
#include <rte_malloc.h>
diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index 2be7b8d2df..a552aabeb8 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -8,7 +8,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <gpudev_driver.h>
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 56c629c681..84371d5d1a 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -20,7 +20,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dpaa2_mempool.h"
#include "fslmc_vfio.h"
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index fd7be47311..9957de2314 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -24,7 +24,7 @@
#include <rte_string_fns.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <rte_lcore.h>
diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
index 748db590c1..71d0b53e03 100644
--- a/drivers/net/ark/ark_global.h
+++ b/drivers/net/ark/ark_global.h
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_version.h>
#include "ark_pktdir.h"
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 7c0cb666fb..b2a08f5635 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_cycles.h>
#include <rte_spinlock.h>
#include <rte_byteorder.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_io.h>
diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index b9ebf64fb8..a5d11c5832 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -33,7 +33,7 @@
#include <rte_memzone.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_pci.h>
#include <rte_common.h>
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index f36ad30e17..4448cf2de2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -9,7 +9,7 @@
#include "bnx2x_rxtx.h"
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_pci.h>
#include <rte_alarm.h>
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e275d3a53f..1460dce2ab 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6,7 +6,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_malloc.h>
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 77ecbef04c..fd1506ddd4 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -7,7 +7,7 @@
#include <stdbool.h>
#include <unistd.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_cycles.h>
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 384080e6d3..bed755f5d9 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -18,7 +18,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_byteorder.h>
#include "common.h"
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index fd71a50a58..45bbeaef0c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -31,7 +31,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "cxgbe.h"
#include "cxgbe_pfvf.h"
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 3c02c98b3d..f8dd833032 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -31,7 +31,7 @@
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "base/common.h"
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5d91355c9a..5b13cb5c94 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -30,7 +30,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/common.h"
#include "base/t4_regs.h"
diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index 9509f6e8a3..4d33b51fea 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <dpaa2_pmd_logs.h>
#include <dpaa2_hw_pvt.h>
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index f876f4790c..37a8b43114 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -15,7 +15,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
#include "rte_dpaa2_mempool.h"
diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
index 932570c6e0..fbfdf360d1 100644
--- a/drivers/net/dpaa2/dpaa2_recycle.c
+++ b/drivers/net/dpaa2/dpaa2_recycle.c
@@ -14,7 +14,7 @@
#include <rte_string_fns.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_fslmc_driver.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 7b9c528d13..9436a95ac8 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -13,7 +13,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hexdump.h>
#include <bus_fslmc_driver.h>
diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
index ba0d500f74..63463c4fbf 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.c
+++ b/drivers/net/dpaa2/dpaa2_sparser.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 409de50083..8ee9be12ad 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 43979992d3..d6bcc5bf58 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -22,7 +22,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "e1000_logs.h"
#include "base/e1000_api.h"
diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index e46697b6a1..b775310651 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -21,7 +21,7 @@
#include <rte_eal.h>
#include <rte_atomic.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index 4709675af8..4d27fba585 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -14,7 +14,7 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_timer.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include "ena_com.h"
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 998436e5e8..cdf0915591 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdint.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 7312c411bd..46f85964e9 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -7,7 +7,7 @@
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index a80f5e2caf..53a451c1b1 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -11,7 +11,7 @@
#include <pthread.h>
#include <rte_atomic.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <rte_devargs.h>
#include <rte_flow.h>
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8bbd8b445d..7adb20bff9 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -7,7 +7,7 @@
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_spinlock.h>
#include <rte_kvargs.h>
#include <rte_vect.h>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7bdc453ec1..67111ac251 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -23,7 +23,7 @@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_alarm.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_tailq.h>
#include <rte_hash_crc.h>
#include <rte_bitmap.h>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 506fcff6e3..ef2ab06475 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -24,7 +24,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 21bd1e2193..15f695682d 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -19,7 +19,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "iavf.h"
#include "iavf_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 885d58c0f4..1c3d22ae0f 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -21,7 +21,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "ice_dcf.h"
#include "ice_rxtx.h"
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 0da267db1f..dee712af98 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -18,7 +18,7 @@
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <iavf_devids.h>
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 552e41692c..04c9ce78a2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#ifdef RTE_LIB_SECURITY
#include <rte_security_driver.h>
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 368342872a..67373a7b78 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -27,7 +27,7 @@
#include <ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_random.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_hash_crc.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 910b76a92c..7e7e1824ef 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -31,7 +31,7 @@
#endif
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index ccc06bdda6..d0bbc0a4c0 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -30,7 +30,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_driver.h>
#include <bus_vmbus_driver.h>
#include <rte_alarm.h>
diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 817fb06dfb..7db82af9f3 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -28,7 +28,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 20f75a17b0..e6f1f28768 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -26,7 +26,7 @@
#include <rte_cycles.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <bus_vmbus_driver.h>
#include "hn_logs.h"
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 61cf374224..bc6f60c64a 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -25,7 +25,7 @@
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_net.h>
#include <bus_vmbus_driver.h>
#include <rte_spinlock.h>
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 0e55f0c792..eaafe11fb9 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -19,7 +19,7 @@
#include <rte_debug.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 5cdd34e588..47359501bc 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_common.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 9ada22e2ff..0eee191566 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -15,7 +15,7 @@
#include <bus_vdev_driver.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a38b701183..b781bcdcfd 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -13,7 +13,7 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_ip.h>
/* ecore includes */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 506c62a726..2ec743ebce 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -7,7 +7,7 @@
* for Solarflare) and Solarflare Communications, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <ethdev_driver.h>
#include <ethdev_pci.h>
#include <rte_pci.h>
diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index 81f5aa3cc4..3ae5023b6f 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -2,7 +2,7 @@
*
* Copyright(c) 2021 Xilinx, Inc.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_bitmap.h>
#include "sfc.h"
diff --git a/drivers/net/sfc/sfc_sw_stats.h b/drivers/net/sfc/sfc_sw_stats.h
index 1abded8018..d9738e5214 100644
--- a/drivers/net/sfc/sfc_sw_stats.h
+++ b/drivers/net/sfc/sfc_sw_stats.h
@@ -5,7 +5,7 @@
#ifndef _SFC_SW_STATS_H
#define _SFC_SW_STATS_H
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "sfc.h"
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 28183ec740..9f57cb1a20 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -20,7 +20,7 @@
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_driver.h>
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index dc90569df1..c3e045d892 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -27,7 +27,7 @@
#include <bus_driver.h>
#include <bus_vdev_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d180162abd..edf3becd32 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -24,7 +24,7 @@
#include <rte_memory.h>
#include <rte_eal_paging.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_cycles.h>
#include <rte_kvargs.h>
diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c
index 2b9e35cef5..abc63b0935 100644
--- a/drivers/net/virtio/virtio_pci_ethdev.c
+++ b/drivers/net/virtio/virtio_pci_ethdev.c
@@ -16,7 +16,7 @@
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_kvargs.h>
#include "virtio.h"
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 101b1cb500..fd946dec5c 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -30,7 +30,7 @@
#include <ethdev_pci.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "base/vmxnet3_defs.h"
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index db029cbf34..909fb8faab 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -3,7 +3,7 @@
*/
#include <bus_pci_driver.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_lcore.h>
#include <rte_pci.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 6831cc8d20..5dd5bbb652 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -13,7 +13,7 @@
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_kvargs.h>
#include <rte_log.h>
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index fc257c5f44..8ef7a6b127 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -6,7 +6,7 @@
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_rawdev.h>
#include <bus_vdev_driver.h>
#include <rte_test.h>
diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5/mlx5_regex_control.c
index 6ab62a12fc..92cf5f495e 100644
--- a/drivers/regex/mlx5/mlx5_regex_control.c
+++ b/drivers/regex/mlx5/mlx5_regex_control.c
@@ -11,7 +11,7 @@
#include <rte_regexdev.h>
#include <rte_regexdev_core.h>
#include <rte_regexdev_driver.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <mlx5_common.h>
#include <mlx5_glue.h>
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index e997bd01ed..cf2c20a704 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -8,7 +8,7 @@
#include <rte_string_fns.h>
#include <rte_malloc.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include <rte_memzone.h>
diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 9bfae077db..41f1415bea 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -5,7 +5,7 @@
#include <rte_string_fns.h>
#include <rte_malloc.h>
#include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_eal.h>
#include "rte_compressdev_internal.h"
diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
index 9fabc399c5..72e52f876f 100644
--- a/lib/compressdev/rte_compressdev_pmd.h
+++ b/lib/compressdev/rte_compressdev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include "rte_compressdev.h"
#include "rte_compressdev_internal.h"
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 75d0075b86..f07b92dfd7 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -4,7 +4,7 @@
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_string_fns.h>
#include <rte_malloc.h>
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 3dcc3cb7ed..96d7e225b0 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -19,6 +19,7 @@ extern "C" {
#include <string.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 6250302f3b..29c9c55131 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -13,7 +13,7 @@
#include <rte_log.h>
#include <rte_debug.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
index 82ab7a8cc7..acd7f71cd1 100644
--- a/lib/dmadev/rte_dmadev_pmd.h
+++ b/lib/dmadev/rte_dmadev_pmd.h
@@ -14,7 +14,7 @@
* by any application.
*/
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_dmadev.h"
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 16c5aef1d8..98f3c78795 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -9,7 +9,7 @@
#include <bus_driver.h>
#include <rte_class.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_devargs.h>
#include <rte_errno.h>
#include <rte_log.h>
diff --git a/lib/eal/include/dev_driver.h b/lib/eal/include/dev_driver.h
new file mode 100644
index 0000000000..015188abd5
--- /dev/null
+++ b/lib/eal/include/dev_driver.h
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2022 Red Hat, Inc.
+ */
+
+#ifndef DEV_DRIVER_H
+#define DEV_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_common.h>
+#include <rte_dev.h>
+
+/**
+ * A structure describing a device driver.
+ */
+struct rte_driver {
+ RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
+ const char *name; /**< Driver name. */
+ const char *alias; /**< Driver alias. */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEV_DRIVER_H */
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index 77d8621a51..cfcd40aaed 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -57,6 +57,7 @@ headers += files(
driver_sdk_headers = files(
'bus_driver.h',
+ 'dev_driver.h',
)
# special case install the generic headers, since they go in a subdir
diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
index ddea163cca..7214f5d7fb 100644
--- a/lib/eal/include/rte_dev.h
+++ b/lib/eal/include/rte_dev.h
@@ -24,6 +24,8 @@ extern "C" {
#include <rte_compat.h>
#include <rte_log.h>
+struct rte_driver;
+
/**
* The device event type.
*/
@@ -67,27 +69,14 @@ struct rte_mem_resource {
void *addr; /**< Virtual address, NULL when not mapped. */
};
-/**
- * A structure describing a device driver.
- */
-struct rte_driver {
- RTE_TAILQ_ENTRY(rte_driver) next; /**< Next in list. */
- const char *name; /**< Driver name. */
- const char *alias; /**< Driver alias. */
-};
-
/**
* Retrieve a driver name.
*
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* @param driver
* A pointer to a driver structure.
* @return
* A pointer to the driver name string.
*/
-__rte_experimental
const char *
rte_driver_name(const struct rte_driver *driver);
diff --git a/lib/eal/version.map b/lib/eal/version.map
index d10fd89458..8b53a1d258 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -37,6 +37,7 @@ DPDK_23 {
rte_devargs_parsef;
rte_devargs_remove;
rte_devargs_type_count;
+ rte_driver_name;
rte_dump_physmem_layout;
rte_dump_stack;
rte_dump_tailq;
@@ -423,9 +424,6 @@ EXPERIMENTAL {
rte_thread_self;
rte_thread_set_affinity_by_id;
rte_thread_set_priority;
-
- # added in 22.11
- rte_driver_name;
};
INTERNAL {
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 5101868ea7..47a55a419e 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -19,6 +19,7 @@ extern "C" {
*
*/
+#include <dev_driver.h>
#include <rte_ethdev.h>
/**
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 69402668d8..def6cd0876 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -22,7 +22,7 @@ extern "C" {
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_config.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 4938b4ee07..a8ef5bac06 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdbool.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_cryptodev.h>
#include <cryptodev_pmd.h>
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 8e81cf774d..29515401bd 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -9,7 +9,7 @@
#include <rte_cycles.h>
#include <rte_common.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <ethdev_driver.h>
#include <rte_log.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 79b905e9fc..bbb027aa0c 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_common.h>
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index 0e55b00bfe..23972b3dbd 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <sys/queue.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_gpudev.h"
diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
index ac32c4bb72..3b43edc548 100644
--- a/lib/mempool/rte_mempool_ops.c
+++ b/lib/mempool/rte_mempool_ops.c
@@ -9,7 +9,7 @@
#include <rte_string_fns.h>
#include <rte_mempool.h>
#include <rte_errno.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include "rte_mempool_trace.h"
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 72aabd4dd0..af2b814251 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -14,7 +14,7 @@
#include <bus_driver.h>
#include <rte_common.h>
#include <rte_cycles.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index e157d65332..569e836560 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -12,7 +12,7 @@
#include <rte_string_fns.h>
#include <rte_log.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
#include <rte_telemetry.h>
diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
index 3b7be57d3e..a51944c8ff 100644
--- a/lib/rawdev/rte_rawdev_pmd.h
+++ b/lib/rawdev/rte_rawdev_pmd.h
@@ -19,7 +19,7 @@ extern "C" {
#include <string.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
index 1a2a408f0e..94160f4177 100644
--- a/lib/security/rte_security.c
+++ b/lib/security/rte_security.c
@@ -5,7 +5,7 @@
*/
#include <rte_cryptodev.h>
-#include <rte_dev.h>
+#include <dev_driver.h>
#include <rte_telemetry.h>
#include "rte_security.h"
#include "rte_security_driver.h"
--
2.37.2
^ permalink raw reply [relevance 1%]
Results 11601-11800 of ~18000 next (newer) | prev (older) | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2021-03-10 23:24 [dpdk-dev] [PATCH] doc: propose correction rte_bsf64 return type declaration Tyler Retzlaff
2021-10-26 7:45 ` [dpdk-dev] [PATCH v2] doc: propose correction rte_{bsf, fls} inline functions type use Morten Brørup
2021-11-11 4:15 ` Tyler Retzlaff
2021-11-11 11:54 ` Thomas Monjalon
2021-11-11 12:41 ` Morten Brørup
2022-07-11 14:07 0% ` Jerin Jacob
2021-06-23 17:31 [dpdk-dev] [PATCH] doc: note KNI alternatives and deprecation plan Ferruh Yigit
2021-11-24 17:16 ` [PATCH v3 1/2] doc: note KNI alternatives Ferruh Yigit
2021-11-24 17:16 ` [PATCH v3 2/2] doc: announce KNI deprecation Ferruh Yigit
2022-07-11 14:47 0% ` Jerin Jacob
2022-07-13 16:10 5% ` [PATCH v4] " Thomas Monjalon
2022-07-13 19:51 0% ` Thomas Monjalon
2022-07-14 9:20 0% ` Bruce Richardson
2022-07-14 10:07 0% ` Thomas Monjalon
2022-07-14 14:50 0% ` Ferruh Yigit
2022-07-14 15:03 0% ` Ferruh Yigit
2022-07-15 15:32 0% ` Thomas Monjalon
2021-09-10 2:23 [dpdk-dev] [PATCH 0/8] Removal of PCI bus ABIs Chenbo Xia
2021-10-13 22:48 ` [dpdk-dev] [PATCH v2 0/7] " Walker, Benjamin
2021-10-14 6:41 ` Thomas Monjalon
2022-07-11 12:11 0% ` Thomas Monjalon
2022-02-19 23:43 [PATCH 0/3] more unnecessary null checks Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 0/8] yet more unnecessary NULL checks Stephen Hemminger
2022-06-24 12:41 0% ` David Marchand
2022-03-17 18:37 [PATCH v2] doc: announce changes in bbdev related to enum extension Nicolas Chautru
2022-06-09 0:34 ` [PATCH v4] " Nicolas Chautru
2022-06-09 0:34 ` Nicolas Chautru
2022-06-09 7:53 ` Maxime Coquelin
2022-06-17 16:13 ` Chautru, Nicolas
2022-06-27 20:47 0% ` Chautru, Nicolas
2022-06-30 14:52 0% ` Chautru, Nicolas
2022-07-05 15:45 0% ` Bruce Richardson
2022-07-17 9:48 0% ` Thomas Monjalon
2022-05-30 13:15 [dpdk-dev] [RFC PATCH] ethdev: support congestion management jerinj
2022-05-30 19:43 ` Ajit Khaparde
2022-07-13 12:11 0% ` Jerin Jacob
2022-05-31 16:09 ` Stephen Hemminger
2022-07-13 12:25 0% ` Jerin Jacob
2022-07-13 13:03 2% ` [dpdk-dev] [PATCH v1] " jerinj
2022-06-04 9:09 Optimizations are not features Morten Brørup
2022-06-04 9:33 ` Jerin Jacob
2022-06-04 10:00 ` Andrew Rybchenko
2022-06-04 11:10 ` Jerin Jacob
2022-06-04 12:19 ` Morten Brørup
2022-06-04 12:51 ` Andrew Rybchenko
2022-06-06 9:35 ` Konstantin Ananyev
2022-06-29 20:44 0% ` Honnappa Nagarahalli
2022-06-30 15:39 0% ` Morten Brørup
2022-07-03 19:38 0% ` Konstantin Ananyev
2022-06-17 18:37 [PATCH v2 5/5] bbdev: add new operation for FFT processing Nicolas Chautru
2022-06-28 1:35 4% ` [PATCH v3 0/7] bbdev changes for 22.11 Nicolas Chautru
2022-06-28 1:35 3% ` [PATCH v3 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
2022-07-06 0:23 4% ` [PATCH v4 0/7] bbdev changes for 22.11 Nicolas Chautru
2022-07-06 0:23 3% ` [PATCH v4 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
2022-07-06 12:50 0% ` Tom Rix
2022-07-06 21:20 0% ` Chautru, Nicolas
2022-07-06 0:23 ` [PATCH v4 2/7] bbdev: add device status info Nicolas Chautru
2022-07-06 15:38 ` Tom Rix
2022-07-06 21:16 3% ` Chautru, Nicolas
2022-07-07 13:37 0% ` Tom Rix
2022-07-07 17:15 0% ` Chautru, Nicolas
2022-07-18 13:09 0% ` Tom Rix
2022-08-25 14:08 3% ` Maxime Coquelin
2022-07-06 0:23 ` [PATCH v4 3/7] bbdev: add device info on queue topology Nicolas Chautru
2022-07-06 16:06 ` Tom Rix
2022-07-06 21:12 3% ` Chautru, Nicolas
2022-07-07 13:34 0% ` Tom Rix
2022-07-07 17:13 3% ` Chautru, Nicolas
2022-07-18 13:04 3% ` Tom Rix
2022-07-06 23:28 4% ` [PATCH v5 0/7] bbdev changes for 22.11 Nicolas Chautru
2022-07-06 23:28 3% ` [PATCH v5 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
2022-08-25 13:54 0% ` Maxime Coquelin
2022-07-06 23:28 ` [PATCH v5 2/7] bbdev: add device status info Nicolas Chautru
2022-08-25 14:18 ` Maxime Coquelin
2022-08-25 18:30 ` Chautru, Nicolas
2022-08-26 10:12 ` Maxime Coquelin
2022-08-29 16:10 ` Chautru, Nicolas
2022-08-30 7:08 3% ` Maxime Coquelin
2022-08-30 19:38 0% ` Chautru, Nicolas
2022-08-15 17:54 0% ` [PATCH v5 0/7] bbdev changes for 22.11 Chautru, Nicolas
2022-08-25 18:24 ` [PATCH v6 " Nicolas Chautru
2022-08-25 18:24 3% ` [PATCH v6 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
2022-08-29 18:07 ` [PATCH v7 0/7] bbdev changes for 22.11 Nicolas Chautru
2022-08-29 18:07 3% ` [PATCH v7 1/7] bbdev: allow operation type enum for growth Nicolas Chautru
2022-06-21 8:16 [PATCH v6] sched: enable CMAN at runtime Marcin Danilewicz
2022-07-04 9:19 1% ` [PATCH v7] " Marcin Danilewicz
2022-07-05 17:05 1% ` [PATCH v8] " Marcin Danilewicz
2022-07-05 18:00 0% ` Ajmera, Megha
2022-07-06 8:53 0% ` Singh, Jasvinder
2022-07-07 13:07 0% ` Danilewicz, MarcinX
2022-07-08 13:14 1% ` [PATCH v9] " Marcin Danilewicz
2022-06-24 13:35 [PATCH 1/1] doc: notice to add new ipsec event subtypes Vamsi Attunuru
2022-06-27 5:29 ` [PATCH v2 1/1] doc: announce addition of " Vamsi Attunuru
2022-07-12 15:03 3% ` Thomas Monjalon
2022-07-12 15:30 0% ` [EXT] " Akhil Goyal
2022-07-12 20:44 0% ` Thomas Monjalon
2022-06-27 9:32 4% [Bug 1042] [dpdk-22.07](ABI) unit_tests_eal/link_bonding_rssconf: link_bonding_rssconf_autotest test failed bugzilla
2022-08-19 8:45 4% ` bugzilla
2022-06-27 9:57 [PATCH 1/2] doc: add enqueue depth for new event type pbhagavatula
2022-07-12 15:01 ` Thomas Monjalon
2022-07-12 18:11 ` [EXT] " Pavan Nikhilesh Bhagavatula
2022-07-13 9:08 ` Mattias Rönnblom
2022-07-13 10:40 ` Pavan Nikhilesh Bhagavatula
2022-07-13 12:15 ` Mattias Rönnblom
2022-07-14 6:32 ` Pavan Nikhilesh Bhagavatula
2022-07-14 10:43 ` Mattias Rönnblom
2022-07-14 16:42 ` Pavan Nikhilesh Bhagavatula
2022-07-14 16:53 ` Van Haaren, Harry
2022-07-14 16:57 4% ` Van Haaren, Harry
2022-07-15 8:13 0% ` Mattias Rönnblom
2022-07-17 12:38 0% ` Thomas Monjalon
2022-06-28 13:53 [PATCH 1/2] doc: announce region based device mapping support skori
2022-07-07 12:39 ` Xia, Chenbo
2022-07-13 7:03 3% ` Sunil Kumar Kori
2022-07-13 7:27 3% ` Xia, Chenbo
2022-07-13 7:38 0% ` Sunil Kumar Kori
2022-07-13 7:18 ` David Marchand
2022-07-13 7:21 3% ` Xia, Chenbo
2022-06-28 14:46 2% [RFC PATCH 00/11] Bus cleanup for 22.11 David Marchand
2022-06-28 14:46 1% ` [RFC PATCH 11/11] bus: hide bus object David Marchand
2022-06-28 16:22 3% ` Tyler Retzlaff
2022-06-28 16:29 0% ` Stephen Hemminger
2022-06-28 17:07 0% ` Tyler Retzlaff
2022-07-09 8:26 1% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 13/29] bus: hide bus object David Marchand
2022-07-09 8:26 1% ` [RFC v2 v2 27/29] dev: hide driver object David Marchand
2022-07-09 8:26 3% ` [RFC v2 v2 29/29] dev: hide device object David Marchand
2022-07-09 16:30 0% ` [RFC v2 v2 00/29] Bus and device cleanup for 22.11 Stephen Hemminger
2022-07-11 8:38 0% ` Bruce Richardson
2022-07-28 15:26 ` [RFC v3 00/26] " David Marchand
2022-07-28 15:26 4% ` [RFC v3 03/26] raw/ifpga: remove PCI bus accessor David Marchand
2022-07-28 15:26 3% ` [RFC v3 21/26] bus: hide bus object David Marchand
2022-07-28 16:56 0% ` Bruce Richardson
2022-07-28 19:26 0% ` David Marchand
2022-07-29 10:01 0% ` Bruce Richardson
2022-07-28 15:26 1% ` [RFC v3 23/26] dev: hide driver object David Marchand
2022-07-28 17:00 0% ` Bruce Richardson
2022-08-01 17:18 0% ` Ajit Khaparde
2022-08-01 7:06 0% ` Jayatheerthan, Jay
2022-07-28 15:26 2% ` [RFC v3 26/26] dev: hide device object David Marchand
2022-07-28 17:04 0% ` Bruce Richardson
2022-08-04 23:19 3% ` [RFC v3 00/26] Bus and device cleanup for 22.11 Harris, James R
2022-08-25 9:31 ` David Marchand
2022-08-29 17:12 3% ` Walker, Benjamin
2022-08-30 15:09 5% ` David Marchand
2022-08-26 12:41 1% ` [PATCH v4 00/27] " David Marchand
2022-08-26 12:41 4% ` [PATCH v4 03/27] raw/ifpga: remove PCI bus accessor David Marchand
2022-08-26 12:42 3% ` [PATCH v4 21/27] bus: hide bus object David Marchand
2022-08-26 12:42 1% ` [PATCH v4 23/27] dev: hide driver object David Marchand
2022-08-26 12:42 2% ` [PATCH v4 27/27] dev: hide device object David Marchand
2022-09-05 8:35 1% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
2022-09-05 8:35 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
2022-09-05 8:39 0% ` [PATCH v5 00/27] Bus and device cleanup for 22.11 David Marchand
2022-09-05 8:39 1% ` David Marchand
2022-09-05 8:39 4% ` [PATCH v5 03/27] raw/ifpga: remove PCI bus accessor David Marchand
2022-09-05 8:39 3% ` [PATCH v5 21/27] bus: hide bus object David Marchand
2022-09-05 8:39 1% ` [PATCH v5 23/27] dev: hide driver object David Marchand
2022-06-28 19:08 3% [PATCH] doc: announce support for MACsec in rte_security Akhil Goyal
2022-06-29 3:37 0% ` Hemant Agrawal
2022-06-29 7:40 0% ` Zhang, Roy Fan
2022-07-11 15:00 0% ` Jerin Jacob
2022-07-17 9:56 0% ` Thomas Monjalon
2022-06-29 21:22 3% Call for Proposals - Userspace 2022 Nathan Southern
2022-06-30 9:41 8% [PATCH] doc: announce marking bus object as internal David Marchand
2022-06-30 9:54 0% ` Bruce Richardson
2022-06-30 14:36 0% ` Thomas Monjalon
2022-07-04 14:29 0% ` Kevin Laatz
2022-07-05 4:43 0% ` Hemant Agrawal
2022-07-05 6:59 0% ` Andrew Rybchenko
2022-07-15 16:16 0% ` Thomas Monjalon
2022-06-30 10:47 DPDK Release Status Meeting 2022-06-30 Mcnamara, John
2022-06-30 11:43 3% ` Ferruh Yigit
2022-06-30 11:57 0% ` David Marchand
2022-06-30 12:40 0% ` Ferruh Yigit
2022-06-30 12:43 0% ` Dodji Seketeli
2022-06-30 17:52 0% ` Ferruh Yigit
[not found] <20220708131431.148279-1-marcinx.danilewicz>
2022-07-08 14:22 1% ` [PATCH v10] sched: enable CMAN at runtime Marcin Danilewicz
2022-07-15 14:51 1% ` [PATCH v11] " Marcin Danilewicz
2022-07-26 13:49 0% ` Singh, Jasvinder
2022-07-27 11:58 0% ` Danilewicz, MarcinX
2022-07-10 6:17 13% [PATCH] doc: announce marking device and driver objects as internal David Marchand
2022-07-10 8:25 0% ` Andrew Rybchenko
2022-07-11 2:16 0% ` Xia, Chenbo
2022-07-11 12:36 4% ` Thomas Monjalon
2022-07-11 15:01 0% ` Jerin Jacob
2022-07-12 4:25 0% ` Hemant Agrawal
2022-07-12 8:24 0% ` Kevin Laatz
2022-07-12 11:38 0% ` Andrew Rybchenko
2022-07-15 16:22 0% ` Thomas Monjalon
2022-07-17 23:00 3% DPDK 22.07 released Thomas Monjalon
2022-07-17 23:03 3% Thomas Monjalon
2022-07-18 10:09 14% [PATCH] version: 22.11-rc0 David Marchand
2022-07-18 12:34 3% ` David Marchand
2022-07-18 16:21 3% ` Lincoln Lavoie
2022-07-19 10:35 0% ` David Marchand
2022-07-19 12:04 0% ` Lincoln Lavoie
2022-07-19 10:38 0% ` David Marchand
2022-07-19 21:02 0% ` Thomas Monjalon
2022-07-20 6:21 0% ` David Marchand
2022-07-20 9:33 0% ` Thomas Monjalon
2022-07-21 10:27 0% ` David Marchand
2022-07-21 4:46 [RFC] memarea: introduce memory area library Chengwen Feng
2022-07-21 15:22 3% ` Stephen Hemminger
2022-08-30 12:41 3% ` Dmitry Kozlyuk
2022-07-21 17:15 3% REMINDER: DPDK Userspace submissions due July 22 Jill Lovato
2022-07-26 10:47 [RFC] regexdev: add maximum number of mbuf segments field Gerry Gribbon
2022-07-26 15:16 3% ` Stephen Hemminger
2022-07-28 9:35 [PATCH 0/3] mempool: apply deprecations Andrew Rybchenko
2022-07-28 9:35 4% ` [PATCH 1/3] mempool: remove deprecated macro to calculate header size Andrew Rybchenko
2022-07-28 9:35 4% ` [PATCH 2/3] mempool: remove deprecated macro to register mempool driver Andrew Rybchenko
2022-07-28 9:35 5% ` [PATCH 3/3] mempool: remove deprecated unused defines Andrew Rybchenko
2022-08-01 13:13 [PATCH] app/testpmd: add command line argument 'rx-metadata' Hanumanth Pothula
2022-08-02 16:45 ` [PATCH] app/testpmd: add command line argument 'nic-to-pmd-rx-metadata' Hanumanth Pothula
2022-08-02 16:45 13% ` [PATCH v2 1/2] version: 22.11-rc0 Hanumanth Pothula
2022-08-03 11:13 [PATCH 0/3] ethdev: remove deprecated Flow Director configuration Andrew Rybchenko
2022-08-03 11:13 1% ` [PATCH 3/3] " Andrew Rybchenko
2022-08-04 11:07 0% ` Dongdong Liu
2022-08-04 5:13 Reason to alway to build both static and shared libs Jianshen Liu
2022-08-22 11:23 3% ` Bruce Richardson
2022-08-04 19:05 [PATCH 00/10] ethdev: cleanup deprecated defines Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 01/10] ethdev: remove deprecated link speed and duplex defines Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 02/10] ethdev: remove deprecated Rx and Tx multi-queue mode defines Andrew Rybchenko
2022-08-04 19:05 3% ` [PATCH 03/10] ethdev: remove deprecated defines for RSS configuration Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 04/10] ethdev: remove deprecated Rx and Tx offload defines Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 05/10] ethdev: remove deprecated DCB and VMDq defines Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 06/10] ethdev: remove deprecated tunnel type defines Andrew Rybchenko
2022-08-04 19:05 4% ` [PATCH 07/10] ethdev: remove deprecated flow control defines Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 08/10] ethdev: remove deprecated VLAN offload configuration defines Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 09/10] ethdev: remove deprecated maximum Rx MAC addresses define Andrew Rybchenko
2022-08-04 19:06 4% ` [PATCH 10/10] ethdev: remove deprecated metadata dynamic fields defines Andrew Rybchenko
2022-08-05 3:10 [PATCH] usertools: fix bind failure from dpdk to kernel Huisong Li
2022-08-05 15:35 ` Stephen Hemminger
2022-08-09 11:44 ` lihuisong (C)
2022-08-09 17:58 ` Stephen Hemminger
2022-08-10 6:02 3% ` Krzysztof Kozlowski
2022-08-10 13:50 0% ` Stephen Hemminger
2022-08-10 5:59 4% ` Krzysztof Kozlowski
2022-08-10 13:49 3% ` Stephen Hemminger
2022-08-11 2:10 0% ` lihuisong (C)
2022-08-05 8:02 3% [PATCH] mbuf: remove deprecated offload flags Andrew Rybchenko
2022-08-08 10:58 8% [PATCH 0/1] update abi maintainership Ray Kinsella
2022-08-08 10:58 25% ` [PATCH 1/1] devtools: eol abi as a separate function Ray Kinsella
2022-08-10 6:49 3% [PATCH] net/ice: remove deprecated VF flow action zhichaox.zeng
2022-08-12 2:44 0% ` Zhang, Qi Z
2022-08-10 7:36 5% [PATCH] eventdev: add weight and affinity attributes to queue conf Shijith Thotton
2022-08-11 9:20 3% [PATCH] ethdev: remove header split Rx offload xuan.ding
2022-08-12 3:13 2% ` [PATCH v2] " xuan.ding
2022-08-12 19:18 [PATCH 00/13] ethdev: proceed with flow subsystem rework Ivan Malov
2022-08-12 19:18 4% ` [PATCH 01/13] ethdev: strip experimental tag off Rx metadata negotiate API Ivan Malov
2022-08-12 19:18 4% ` [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions Ivan Malov
2022-08-15 12:59 0% ` Ori Kam
2022-08-12 19:18 4% ` [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API Ivan Malov
2022-08-15 12:58 0% ` Ori Kam
2022-08-12 19:18 5% ` [PATCH 10/13] ethdev: remove deprecated flow item PF Ivan Malov
2022-08-22 5:32 0% ` Ori Kam
2022-08-12 19:18 1% ` [PATCH 11/13] ethdev: remove deprecated flow item VF Ivan Malov
2022-08-22 5:50 0% ` Ori Kam
2022-08-12 19:18 1% ` [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT Ivan Malov
2022-08-22 5:33 0% ` Ori Kam
2022-08-12 19:18 5% ` [PATCH 13/13] ethdev: remove deprecated flow action " Ivan Malov
2022-08-22 5:33 0% ` Ori Kam
2022-08-21 20:50 [PATCH 0/3] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-21 20:50 3% ` [PATCH 2/3] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-22 7:24 0% ` Morten Brørup
2022-08-22 14:06 0% ` Bruce Richardson
2022-08-25 15:37 ` [PATCH v2 0/4] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-25 15:37 3% ` [PATCH v2 3/4] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-25 22:33 ` [PATCH v3 0/4] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-25 22:33 3% ` [PATCH v3 3/4] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-27 11:32 ` [PATCH v4 0/4] eal: small rte_common.h fixes and cleanup Dmitry Kozlyuk
2022-08-27 11:32 3% ` [PATCH v4 3/4] eal: uninline rte_str_to_size Dmitry Kozlyuk
2022-08-24 16:24 [RFC PATCH v1 00/10] dts: add hello world testcase Juraj Linkeš
2022-08-24 16:24 2% ` [RFC PATCH v1 05/10] dts: add system under test node Juraj Linkeš
2022-08-29 16:06 [PATCH 0/3] cryptodev: sym session framework rework Fan Zhang
2022-08-29 16:06 1% ` [PATCH 1/3] cryptodev: rework session framework Fan Zhang
2022-08-29 16:06 3% ` [PATCH 3/3] cryptodev: hide sym session structure Fan Zhang
2022-08-30 1:23 0% [PATCH] net/ice: remove deprecated VF flow action Xu, Ke1
2022-09-02 3:00 [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-09-02 3:00 4% ` [PATCH 9/9] net/ngbe: support to set link down/up Jiawen Wu
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).