#
2b843cac |
| 13-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
drivers: use per line logging in helpers
Use RTE_LOG(_DP)?_LINE(_PREFIX)? in existing macros that append a \n.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Chengwen Feng <fen
drivers: use per line logging in helpers
Use RTE_LOG(_DP)?_LINE(_PREFIX)? in existing macros that append a \n.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
e12a0166 |
| 14-May-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
drivers: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microso
drivers: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
show more ...
|
#
a54db8d3 |
| 09-Nov-2023 |
Jie Hai <haijie1@huawei.com> |
net/null: fix RSS key size
The ethdev uses "dev_info->hash_key_size" to check RSS configuration. So drivers should report the correct info, This patch fixes it.
Fixes: bae3cfa520a7 ("ethdev: clarif
net/null: fix RSS key size
The ethdev uses "dev_info->hash_key_size" to check RSS configuration. So drivers should report the correct info, This patch fixes it.
Fixes: bae3cfa520a7 ("ethdev: clarify RSS related fields usage")
Signed-off-by: Jie Hai <haijie1@huawei.com> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
#
9b4b368e |
| 08-Sep-2023 |
Jie Hai <haijie1@huawei.com> |
net/null: fix Rx and Tx queue state
The DPDK framework reports the queue state, which is stored in dev->data->tx_queue_state and dev->data->rx_queue_state. The state is maintained by the driver. Use
net/null: fix Rx and Tx queue state
The DPDK framework reports the queue state, which is stored in dev->data->tx_queue_state and dev->data->rx_queue_state. The state is maintained by the driver. Users may determine whether a queue participates in packet forwarding based on the state. Therefore, the driver needs to modify the queue state in time according to the actual situation.
Fixes: 9ad9ff476cac ("ethdev: add queue state in queried queue information") Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
#
c8881bee |
| 06-Jun-2023 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
net/null: replace legacy atomics with GCC builtin atomics
Replace the use of rte_atomic.h types and functions, instead use GCC supplied C++11 memory model builtins.
Signed-off-by: Tyler Retzlaff <r
net/null: replace legacy atomics with GCC builtin atomics
Replace the use of rte_atomic.h types and functions, instead use GCC supplied C++11 memory model builtins.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
#
4851ef2b |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/vdev: make driver-only headers private
The vdev bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentat
bus/vdev: make driver-only headers private
The vdev bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentation, - remove unneeded reference to bus specific singleton object, - remove unneeded list head structure type, - reorder the definitions and macro manipulating the bus singleton object, - remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
show more ...
|
#
72b452c5 |
| 27-Aug-2022 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directl
eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directly from the files that need them.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
06c047b6 |
| 09-Feb-2022 |
Stephen Hemminger <stephen@networkplumber.org> |
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free functions found by nullfree.cocci
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to have 'rte_eth' prefix.
All internal components switched to using new names.
Syntax fixed on lines that this patch touches.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Wisam Jaddo <wisamm@nvidia.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
#
7483341a |
| 06-Oct-2021 |
Xueming Li <xuemingl@nvidia.com> |
ethdev: change queue release callback
Currently, most ethdev callback API use queue ID as parameter, but Rx and Tx queue release callback use queue object which is used by Rx and Tx burst data plane
ethdev: change queue release callback
Currently, most ethdev callback API use queue ID as parameter, but Rx and Tx queue release callback use queue object which is used by Rx and Tx burst data plane callback.
To align with other eth device queue configuration callbacks: - queue release callbacks are changed to use queue ID - all drivers are adapted
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
eeded204 |
| 26-Apr-2021 |
David Marchand <david.marchand@redhat.com> |
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype with their class reflected in it, and libraries use a lib. logtype.
Introduce two new
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype with their class reflected in it, and libraries use a lib. logtype.
Introduce two new macros: - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is used in a component. It is associated to the default name provided by the build system, - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used, and then the passed name is appended to the default name,
RTE_LOG_REGISTER is left untouched for existing external users and for components that do not comply with the convention.
There is a new Meson variable log_prefix to adapt the default name for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
Note: achieved with below commands + reverted change on net/bonding + edits on crypto/virtio, compress/mlx5, regex/mlx5
$ git grep -l RTE_LOG_REGISTER drivers/ | while read file; do pattern=${file##drivers/}; class=${pattern%%/*}; pattern=${pattern#$class/}; drv=${pattern%%/*}; case "$class" in baseband) pattern=pmd.bb.$drv;; bus) pattern=bus.$drv;; mempool) pattern=mempool.$drv;; *) pattern=pmd.$class.$drv;; esac sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done
$ git grep -l RTE_LOG_REGISTER lib/ | while read file; do pattern=${file##lib/}; pattern=lib.${pattern%%/*}; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done
Signed-off-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
df96fd0d |
| 29-Jan-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed.
Signed-off-by:
ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Steven Webster <steven.webster@windriver.com>
show more ...
|
#
f30e69b4 |
| 14-Oct-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: add device flag to bypass auto-filled queue xstats
Queue stats are stored in 'struct rte_eth_stats' as array and array size is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
As
ethdev: add device flag to bypass auto-filled queue xstats
Queue stats are stored in 'struct rte_eth_stats' as array and array size is defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
As a result of technical board discussion, decided to remove the queue statistics from 'struct rte_eth_stats' in the long term.
Instead PMDs should represent the queue statistics via xstats, this gives more flexibility on the number of the queues supported.
Currently queue stats in the xstats are filled by ethdev layer, using some basic stats, when queue stats removed from basic stats the responsibility to fill the relevant xstats will be pushed to the PMDs.
During the switch period, temporary 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' device flag is created. Initially all PMDs using xstats set this flag. The PMDs implemented queue stats in the xstats should clear the flag.
When all PMDs switch to the xstats for the queue stats, queue stats related fields from 'struct rte_eth_stats' will be removed, as well as 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag. Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be removed.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Xiao Wang <xiao.w.wang@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
62024eb8 |
| 15-Oct-2020 |
Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> |
ethdev: change stop operation callback to return int
Change eth_dev_stop_t return value from void to int. Make eth_dev_stop_t implementations across all drivers to return negative errno values if ca
ethdev: change stop operation callback to return int
Change eth_dev_stop_t return value from void to int. Make eth_dev_stop_t implementations across all drivers to return negative errno values if case of error conditions.
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
fbd19135 |
| 28-Sep-2020 |
Thomas Monjalon <thomas@monjalon.net> |
ethdev: remove old close behaviour
The temporary flag RTE_ETH_DEV_CLOSE_REMOVE is removed. It was introduced in DPDK 18.11 in order to give time for PMDs to migrate.
The old behaviour was to free o
ethdev: remove old close behaviour
The temporary flag RTE_ETH_DEV_CLOSE_REMOVE is removed. It was introduced in DPDK 18.11 in order to give time for PMDs to migrate.
The old behaviour was to free only queues when closing a port. The new behaviour is calling rte_eth_dev_release_port() which does three more tasks: - trigger event callback - reset state and few pointers - free all generic port resources
The private port resources must be released in the .dev_close callback.
The .remove callback should: - call .dev_close callback - call rte_eth_dev_release_port() - free multi-port device shared resources
Despite waiting two years, some drivers have not migrated, so they may hit issues with the incompatible new behaviour. After sending emails, adding logs, and announcing the deprecation, the only last solution is to declare these drivers as unmaintained: ionic, liquidio, nfp Below is a summary of what to implement in those drivers.
* The freeing of private port resources must be moved from the ".remove(device)" function to the ".dev_close(port)" function.
* If a generic resource (.mac_addrs or .hash_mac_addrs) cannot be freed, it must be set to NULL in ".dev_close" function to protect from subsequent rte_eth_dev_release_port() freeing.
* Note 1: The generic resources are freed in rte_eth_dev_release_port(), after ".dev_close" is called in rte_eth_dev_close(), but not when calling ".dev_close" directly from the ".remove" PMD function. That's why rte_eth_dev_release_port() must still be called explicitly from ".remove(device)" after calling the ".dev_close" PMD function.
* Note 2: If a device can have multiple ports, the common resources must be freed only in the ".remove(device)" function.
* Note 3: The port is supposed to be in a stopped state when it is closed. If it is not the case, it is free to the PMD implementation how to react when trying to close a non-stopped port: either try to stop it automatically or just return an error.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Liron Himi <lironh@marvell.com> Reviewed-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Jeff Guo <jia.guo@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
d2fb7164 |
| 28-Sep-2020 |
Thomas Monjalon <thomas@monjalon.net> |
net/null: release port upon close
The flag RTE_ETH_DEV_CLOSE_REMOVE is set so all port resources can be freed by rte_eth_dev_close().
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-b
net/null: release port upon close
The flag RTE_ETH_DEV_CLOSE_REMOVE is set so all port resources can be freed by rte_eth_dev_close().
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
9c99878a |
| 01-Jul-2020 |
Jerin Jacob <jerinj@marvell.com> |
log: introduce logtype register macro
Introduce the RTE_LOG_REGISTER macro to avoid the code duplication in the logtype registration process.
It is a wrapper macro for declaring the logtype, regist
log: introduce logtype register macro
Introduce the RTE_LOG_REGISTER macro to avoid the code duplication in the logtype registration process.
It is a wrapper macro for declaring the logtype, registering it and setting its level in the constructor context.
Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com> Acked-by: Sachin Saxena <sachin.saxena@nxp.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
show more ...
|
#
f51ecf2f |
| 02-Mar-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
net/null: add argument for no Rx
Add an new device argument 'no-rx', which will prevent PMD receiving packets.
This is useful for testing when a PMD is needed only to send packets to.
Signed-off-b
net/null: add argument for no Rx
Add an new device argument 'no-rx', which will prevent PMD receiving packets.
This is useful for testing when a PMD is needed only to send packets to.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
276bb4ce |
| 02-Mar-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
net/null: group device arguments
Group device argument to the struct, to increase code readability.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
#
4df90194 |
| 02-Mar-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
net/null: prefer unsigned int
Prefer 'unsigned int' storage type keyword against 'unsigned', this also silence the checkpatch warnings.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
#
c21a276b |
| 02-Mar-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
net/null: remove redundant check
There is no need to check if the argument exist or not, `rte_kvargs_process` returns success if the argument is not provided at all.
Fixes: c743e50c475f ("null: new
net/null: remove redundant check
There is no need to check if the argument exist or not, `rte_kvargs_process` returns success if the argument is not provided at all.
Fixes: c743e50c475f ("null: new poll mode driver") Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
e2f4b250 |
| 02-Mar-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
net/null: fix secondary burst function selection
Secondary process uses the primary process device and while setting the Rx/Tx functions it uses the device arguments from the secondary process inste
net/null: fix secondary burst function selection
Secondary process uses the primary process device and while setting the Rx/Tx functions it uses the device arguments from the secondary process instead of the primary ones.
This may cause primary and secondary process use different Rx/Tx functions unintentionally.
Fixes: bccc77a6a74a ("net/null: fix multi-process Rx and Tx") Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
f1652103 |
| 21-Oct-2019 |
Ciara Power <ciara.power@intel.com> |
drivers/net: enable promiscuous and multicast by default
The promiscuous and multicast fields are now initialised as enabled for some virtual PMDs. This allows the devices to be used when running ap
drivers/net: enable promiscuous and multicast by default
The promiscuous and multicast fields are now initialised as enabled for some virtual PMDs. This allows the devices to be used when running applications that attempt to enable promiscuous or multicast mode.
Signed-off-by: Ciara Power <ciara.power@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
show more ...
|
#
bccc77a6 |
| 29-Sep-2019 |
Yasufumi Ogawa <yasufum.o@gmail.com> |
net/null: fix multi-process Rx and Tx
Packet processing in secondary process cannot work because rx_pkt_burst and tx_pkt_burst in eth_dev are not initialized while probing device. This patch is to t
net/null: fix multi-process Rx and Tx
Packet processing in secondary process cannot work because rx_pkt_burst and tx_pkt_burst in eth_dev are not initialized while probing device. This patch is to the initialization.
Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process") Cc: stable@dpdk.org
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
9970a9ad |
| 06-Sep-2019 |
Igor Romanov <igor.romanov@oktetlabs.ru> |
ethdev: make stats and xstats reset callbacks return int
Change return value of the callbacks from void to int. Make implementations across all drivers return negative errno values in case of error
ethdev: make stats and xstats reset callbacks return int
Change return value of the callbacks from void to int. Make implementations across all drivers return negative errno values in case of error conditions.
Both callbacks are updated together because a large number of drivers assign the same function to both callbacks.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|