|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1 |
|
| #
06c047b6 |
| 09-Feb-2022 |
Stephen Hemminger <[email protected]> |
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 <[email protected]>
show more ...
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2 |
|
| #
eeded204 |
| 26-Apr-2021 |
David Marchand <[email protected]> |
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 <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
|
Revision tags: v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2 |
|
| #
702b27d3 |
| 22-Oct-2020 |
Long Li <[email protected]> |
net/vdev_netvsc: fix device probing error flow
If a device probe fails, the alarm is canceled and will no longer work for previously probed devices.
Fix this by checking if alarm is necessary at th
net/vdev_netvsc: fix device probing error flow
If a device probe fails, the alarm is canceled and will no longer work for previously probed devices.
Fix this by checking if alarm is necessary at the end of each device probe. Reset the alarm if there are vdev_netvsc_ctx created.
Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality") Cc: [email protected]
Signed-off-by: Long Li <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
|
Revision tags: v20.11-rc1, v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1 |
|
| #
9c99878a |
| 01-Jul-2020 |
Jerin Jacob <[email protected]> |
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 <[email protected]> Acked-by: Adam Dybkowski <[email protected]> Acked-by: Sachin Saxena <[email protected]> Acked-by: Akhil Goyal <[email protected]>
show more ...
|
|
Revision tags: v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3 |
|
| #
43e34a22 |
| 10-Feb-2020 |
Thomas Monjalon <[email protected]> |
build: remove redundant config include
The header file rte_config.h is always included by make or meson. If required in an exported API header file, it must be included in the public header file for
build: remove redundant config include
The header file rte_config.h is always included by make or meson. If required in an exported API header file, it must be included in the public header file for external applications. In the internal files, explicit include of rte_config.h is useless, and can be removed.
Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Matan Azrad <[email protected]> Acked-by: David Marchand <[email protected]> Acked-by: Neil Horman <[email protected]>
show more ...
|
|
Revision tags: v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1, v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1 |
|
| #
72505bf3 |
| 05-Jul-2019 |
Stephen Hemminger <[email protected]> |
net/vdev_netvsc: use new ethernet address parser
Use rte_ether_unformat_addr rather than sscanf.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Matan Azrad <matan@mellanox.
net/vdev_netvsc: use new ethernet address parser
Use rte_ether_unformat_addr rather than sscanf.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| #
75b66dec |
| 06-Jun-2019 |
Ilya Maximets <[email protected]> |
eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must return 0 or negative error code. Bus code returns positive values if device wasn't rec
eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must return 0 or negative error code. Bus code returns positive values if device wasn't recognized by any driver, so the result of 'bus->plug/unplug()' must be converted. 'local_dev_probe()' and 'local_dev_remove()' also has their internal API, so the conversion should be done there.
Positive on remove means that device not found by driver. Positive on probe means that there are no suitable buses/drivers, i.e. device is not supported.
Users of these API fixed to provide a good example by respecting DPDK API. This also will allow to catch such issues in the future.
Fixes: a3ee360f4440 ("eal: add hotplug add/remove device") Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: [email protected]
Signed-off-by: Ilya Maximets <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
|
Revision tags: v19.05 |
|
| #
f4be6a9a |
| 10-May-2019 |
Michael Santana <[email protected]> |
fix off-by-one errors in snprintf
snprintf guarantees to always correctly place a null terminator in the buffer string. So manually placing a null terminator in a buffer right after a call to snprin
fix off-by-one errors in snprintf
snprintf guarantees to always correctly place a null terminator in the buffer string. So manually placing a null terminator in a buffer right after a call to snprintf is redundant code.
Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this means we are not using the last character in the buffer. 'sizeof(buffer)' is enough.
Cc: [email protected]
Signed-off-by: Michael Santana <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Anatoly Burakov <[email protected]>
show more ...
|
| #
538da7a1 |
| 21-May-2019 |
Olivier Matz <[email protected]> |
net: add rte prefix to ether functions
Add 'rte_' prefix to functions: - rename is_same_ether_addr() as rte_is_same_ether_addr(). - rename is_zero_ether_addr() as rte_is_zero_ether_addr(). - rename
net: add rte prefix to ether functions
Add 'rte_' prefix to functions: - rename is_same_ether_addr() as rte_is_same_ether_addr(). - rename is_zero_ether_addr() as rte_is_zero_ether_addr(). - rename is_unicast_ether_addr() as rte_is_unicast_ether_addr(). - rename is_multicast_ether_addr() as rte_is_multicast_ether_addr(). - rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr(). - rename is_universal_ether_addr() as rte_is_universal_ether_addr(). - rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr(). - rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr(). - rename eth_random_addr() as rte_eth_random_addr(). - rename ether_addr_copy() as rte_ether_addr_copy(). - rename ether_format_addr() as rte_ether_format_addr().
Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
6d13ea8e |
| 21-May-2019 |
Olivier Matz <[email protected]> |
net: add rte prefix to ether structures
Add 'rte_' prefix to structures: - rename struct ether_addr as struct rte_ether_addr. - rename struct ether_hdr as struct rte_ether_hdr. - rename struct vlan_
net: add rte prefix to ether structures
Add 'rte_' prefix to structures: - rename struct ether_addr as struct rte_ether_addr. - rename struct ether_hdr as struct rte_ether_hdr. - rename struct vlan_hdr as struct rte_vlan_hdr. - rename struct vxlan_hdr as struct rte_vxlan_hdr. - rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.
Do not update the command line library to avoid adding a dependency to librte_net.
Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v19.05-rc4, v19.05-rc3, v19.05-rc2, v19.05-rc1 |
|
| #
cc7cd517 |
| 13-Mar-2019 |
Stephen Hemminger <[email protected]> |
net/vdev_netvsc: fix device cast
The return value from bus->find_device is a rte_device which is not safe to cast to a rte_vdev_device structure. It doesn't really matter since only being checked fo
net/vdev_netvsc: fix device cast
The return value from bus->find_device is a rte_device which is not safe to cast to a rte_vdev_device structure. It doesn't really matter since only being checked for NULL but static checkers might find a bug here.
Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing") Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
|
Revision tags: v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5 |
|
| #
08078fda |
| 20-Nov-2018 |
Stephen Hemminger <[email protected]> |
net/vdev_netvsc: get rid of unnecessary debug log message
If vdev_netvsc is run with debug logging enabled, then the log output will fill with: net_vdev_netvsc: interface lo is non-ethernet device
net/vdev_netvsc: get rid of unnecessary debug log message
If vdev_netvsc is run with debug logging enabled, then the log output will fill with: net_vdev_netvsc: interface lo is non-ethernet device
Remove the message since it is not useful.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
|
Revision tags: v18.11-rc4, v18.11-rc3, v18.11-rc2, v18.11-rc1 |
|
| #
9631253f |
| 09-Oct-2018 |
Ferruh Yigit <[email protected]> |
drivers/net: fix log type string
Syntax for log type string is "pmd.<subsystem>.<driver>[.<pmd_local>]"
Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type") Fixes: d7f4562ab10a ("net/bonding: con
drivers/net: fix log type string
Syntax for log type string is "pmd.<subsystem>.<driver>[.<pmd_local>]"
Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type") Fixes: d7f4562ab10a ("net/bonding: convert to dynamic logging") Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver") Fixes: 7db274b9ada2 ("doc: describe dynamic logging format") Fixes: a10a988a0ba6 ("net/dpaa2: support dynamic logging") Cc: [email protected]
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Stephen Hemminger <[email protected]>
show more ...
|
|
Revision tags: v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5 |
|
| #
83d63f09 |
| 21-May-2018 |
Matan Azrad <[email protected]> |
net/vdev_netvsc: fix automatic probing
The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems unless it was already specified by the EAL command line.
The detection of a specified N
net/vdev_netvsc: fix automatic probing
The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems unless it was already specified by the EAL command line.
The detection of a specified NetVSC device is wrongly done by comparing the vdev_netvsc driver name to all the vdev devices names, including the suffix device index. Thus, if the user specifies the vdev_netvsc device by adding an index to the device name, the comparison fails. Consequently, the vdev_netvsc driver may automatically probe NetVSC devices, despite the NetVSC device that was specified by the EAL command line.
Compare the vdev_netvsc driver name to the devices names without the index.
Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing") Cc: [email protected]
Signed-off-by: Matan Azrad <[email protected]>
show more ...
|
|
Revision tags: v18.05-rc4, v18.05-rc3 |
|
| #
d7a13d2d |
| 14-May-2018 |
Andy Green <[email protected]> |
net/vdev_netvsc: replace strncpy by strlcpy
Continue snprintf to strlcpy conversions started by commit c022cb400e92 ("convert snprintf to strlcpy").
Cc: [email protected]
Signed-off-by: Andy Green <
net/vdev_netvsc: replace strncpy by strlcpy
Continue snprintf to strlcpy conversions started by commit c022cb400e92 ("convert snprintf to strlcpy").
Cc: [email protected]
Signed-off-by: Andy Green <[email protected]> Acked-by: Pablo de Lara <[email protected]>
show more ...
|
| #
2e4d2e56 |
| 14-May-2018 |
Andy Green <[email protected]> |
net/vdev_netvsc: readlink inputs cannot be aliased
drivers/net/vdev_netvsc/vdev_netvsc.c:335:2:error: passing argument 2 to restrict-qualified parameter aliases with argument 1 ret = readlink(buf,
net/vdev_netvsc: readlink inputs cannot be aliased
drivers/net/vdev_netvsc/vdev_netvsc.c:335:2:error: passing argument 2 to restrict-qualified parameter aliases with argument 1 ret = readlink(buf, buf, size); ^~~
Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality") Cc: [email protected]
Signed-off-by: Andy Green <[email protected]> Acked-by: Pablo de Lara <[email protected]>
show more ...
|
|
Revision tags: v18.05-rc2, v18.05-rc1 |
|
| #
4205da3a |
| 10-Apr-2018 |
Matan Azrad <[email protected]> |
net/vdev_netvsc: prefer netvsc devices in scan
There is an option to run a non-netvsc device as a netvsc device only when the "force" parameter is set to 1 in the EAL command line. Consequently, mor
net/vdev_netvsc: prefer netvsc devices in scan
There is an option to run a non-netvsc device as a netvsc device only when the "force" parameter is set to 1 in the EAL command line. Consequently, more than one device may be found to be matching the "mac" parameter specifying the device.
Prefer netvsc devices to be scanned before any non-netvsc device, even when the "force" parameter is set.
Cc: [email protected]
Signed-off-by: Matan Azrad <[email protected]>
show more ...
|
| #
118d2f80 |
| 10-Apr-2018 |
Matan Azrad <[email protected]> |
net/vdev_netvsc: add check for specifying by 1 way
There are now 2 ways to specify a netvsc device by the EAL command line - either by the interface name or by the MAC address.
The user should not
net/vdev_netvsc: add check for specifying by 1 way
There are now 2 ways to specify a netvsc device by the EAL command line - either by the interface name or by the MAC address.
The user should not specify a netvsc device using more than 1 way, Thus, if a device is specified in more than 1 way, the driver stops to probe it.
Validate it in the driver initialization.
Cc: [email protected]
Signed-off-by: Matan Azrad <[email protected]>
show more ...
|
| #
0b39cc82 |
| 10-Apr-2018 |
Matan Azrad <[email protected]> |
net/vdev_netvsc: remove specified devices IP check
If the netvsc driver starts in blacklist mode, it does not automatically probe IP associated netvsc devices. Therefore, the only way to probe them
net/vdev_netvsc: remove specified devices IP check
If the netvsc driver starts in blacklist mode, it does not automatically probe IP associated netvsc devices. Therefore, the only way to probe them is to specify them by the EAL command line, using the "force" parameter to skip the IP check in the driver.
>From now on, the user does not need to add the "force" parameter if he specifies an IP associated netvsc device by the EAL command line, and the responsibility of the IP check is now in the user's hands.
However, in the absence of any specification, the driver still skips IP associated netvsc devices.
Cc: [email protected]
Signed-off-by: Matan Azrad <[email protected]>
show more ...
|
| #
519fb285 |
| 10-Apr-2018 |
Ophir Munk <[email protected]> |
net/vdev_netvsc: shorten devices names
Prior to this commit the vdev_netvsc PMD was creating tap and failsafe devices with long names, such as "net_tap_net_vdev_netvsc0" or "net_failsafe_net_vdev_ne
net/vdev_netvsc: shorten devices names
Prior to this commit the vdev_netvsc PMD was creating tap and failsafe devices with long names, such as "net_tap_net_vdev_netvsc0" or "net_failsafe_net_vdev_netvsc0". This commits creates tap and failsafe devices with short names such as "net_tap_netvsc0" or "net_failsafe_netvsc0".
Signed-off-by: Ophir Munk <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| #
b65ecf19 |
| 23-Apr-2018 |
Gaetan Rivet <[email protected]> |
devargs: rename legacy API
The previous symbols were deprecated for two releases. They are now marked as such and cannot be used anymore.
They are replaced by ones respecting the new namespace that
devargs: rename legacy API
The previous symbols were deprecated for two releases. They are now marked as such and cannot be used anymore.
They are replaced by ones respecting the new namespace that are marked experimental.
As a result, eth_dev attach and detach are slightly reworked to follow the changes.
Signed-off-by: Gaetan Rivet <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| #
efbeaee0 |
| 23-Apr-2018 |
Gaetan Rivet <[email protected]> |
net/vdev_netvsc: do not reference devargs list
This list should not be used by drivers. Use the public API instead.
Signed-off-by: Gaetan Rivet <[email protected]> Acked-by: Thomas Monjalon <t
net/vdev_netvsc: do not reference devargs list
This list should not be used by drivers. Use the public API instead.
Signed-off-by: Gaetan Rivet <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| #
5feecc57 |
| 20-Mar-2018 |
Shahaf Shuler <[email protected]> |
align SPDX Mellanox copyrights
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <[email protected]>
align SPDX Mellanox copyrights
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <[email protected]> Acked-by: Adrien Mazarguil <[email protected]>
show more ...
|
| #
b0c0efb4 |
| 27-Feb-2018 |
Matan Azrad <[email protected]> |
net/vdev_netvsc: fix routed devices probing
NetVSC netdevices which are already routed should not be probed because they are used for management purposes by the HyperV.
The corrupted code got the r
net/vdev_netvsc: fix routed devices probing
NetVSC netdevices which are already routed should not be probed because they are used for management purposes by the HyperV.
The corrupted code got the routed devices from the system file /proc/net/route and wrongly parsed only the odd lines, so devices which their routes were in even lines, were considered as unrouted devices and were probed.
Use linux netlink lib to detect the routed NetVSC devices instead of file parsing.
Fixes: 31182fadfb21 ("net/vdev_netvsc: skip routed netvsc probing") Cc: [email protected]
Suggested-by: Stephen Hemminger <[email protected]> Signed-off-by: Matan Azrad <[email protected]>
show more ...
|
|
Revision tags: v18.02, v18.02-rc4, v18.02-rc3 |
|
| #
f99b4b07 |
| 05-Feb-2018 |
Matan Azrad <[email protected]> |
net/vdev_netvsc: fix device detection error check
The vdev_netvsc driver does periodic detection of PCI devices matched to the netvsc existed interfaces.
When it finds a match, the PCI address is w
net/vdev_netvsc: fix device detection error check
The vdev_netvsc driver does periodic detection of PCI devices matched to the netvsc existed interfaces.
When it finds a match, the PCI address is written to the pipe of the associated fail-safe PMD instance and a positive value is returned to the periodic check which is wrongly considered as error.
Change the check to consider only a negative value as error.
Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality")
Signed-off-by: Matan Azrad <[email protected]>
show more ...
|