| a41f593f | 11-Feb-2022 |
Ferruh Yigit <[email protected]> |
ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.
These dummy functions are very simple, introduce a common function in the ethdev an
ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.
These dummy functions are very simple, introduce a common function in the ethdev and update drivers to use it instead of each driver having its own functions.
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| 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 ...
|
| ecb904cc | 20-Jan-2022 |
Bruce Richardson <[email protected]> |
build: fix warnings when running external commands
Meson 0.61.1 is giving warnings that the calls to run_command do not always explicitly specify if the result is to be checked or not, i.e. there is
build: fix warnings when running external commands
Meson 0.61.1 is giving warnings that the calls to run_command do not always explicitly specify if the result is to be checked or not, i.e. there is a missing "check" parameter. This is because the default behaviour without the parameter is due to change in the future.
We can fix these warnings by explicitly adding into each call whether the result should be checked by meson or not. This patch therefore adds in "check: false" to each run_command call where the result is being checked by the DPDK meson.build code afterwards, and adds in "check: true" to any calls where the result is currently unchecked.
Bugzilla ID: 921 Cc: [email protected]
Reported-by: Jerin Jacob <[email protected]> Signed-off-by: Bruce Richardson <[email protected]> Tested-by: Jerin Jacob <[email protected]>
show more ...
|
| 7be78d02 | 29-Nov-2021 |
Josh Soref <[email protected]> |
fix spelling in comments and strings
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]> |
| d564eea7 | 22-Nov-2021 |
Xiaoyu Min <[email protected]> |
net/mlx4: fix empty Ethernet spec with VLAN
When the ETH spec is empty MLX4 PMD doesn't allow match other criteria, which means the flow should be promisc one.
Currently, PMD validates this by sett
net/mlx4: fix empty Ethernet spec with VLAN
When the ETH spec is empty MLX4 PMD doesn't allow match other criteria, which means the flow should be promisc one.
Currently, PMD validates this by setting flow->promisc bit when ETH spec is empty and checking whether there is other rte_flow_item followed when flow->promisc is on.
However, commit [1] adds support to match traffic only on VLAN id, the above validation logic should be changed accordingly.
This patch changes the above validate logic by skipping flow->promisc check if this item is VLAN.
[1]: Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN") Cc: [email protected]
Signed-off-by: Xiaoyu Min <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 49fdb0ae | 01-Nov-2021 |
Harman Kalra <[email protected]> |
net/mlx4: fix crash on allocation failure
This patch fixes coverity issue by adding a NULL check.
Coverity issue: 373687 Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
S
net/mlx4: fix crash on allocation failure
This patch fixes coverity issue by adding a NULL check.
Coverity issue: 373687 Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Signed-off-by: Harman Kalra <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]> Acked-by: David Marchand <[email protected]>
show more ...
|
| d61138d4 | 22-Oct-2021 |
Harman Kalra <[email protected]> |
drivers: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the drivers acce
drivers: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the drivers access the interrupt handle fields.
Signed-off-by: Harman Kalra <[email protected]> Acked-by: Hyong Youb Kim <[email protected]> Signed-off-by: David Marchand <[email protected]> Tested-by: Raslan Darawsheh <[email protected]>
show more ...
|
| daa02b5c | 15-Oct-2021 |
Olivier Matz <[email protected]> |
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Sign
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]>
show more ...
|
| 295968d1 | 22-Oct-2021 |
Ferruh Yigit <[email protected]> |
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 <[email protected]> Acked-by: Tyler Retzlaff <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Jerin Jacob <[email protected]> Acked-by: Wisam Jaddo <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Chenbo Xia <[email protected]> Acked-by: Hemant Agrawal <[email protected]> Acked-by: Somnath Kotur <[email protected]>
show more ...
|
| b563c142 | 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.
Instead of drivers announce this capability, application can deduct the capability by checking reported 'dev_in
ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.
Instead of drivers announce this capability, application can deduct the capability by checking reported 'dev_info.max_mtu' or 'dev_info.max_rx_pktlen'.
And instead of application setting this flag explicitly to enable jumbo frames, this can be deduced by driver by comparing requested 'mtu' to 'RTE_ETHER_MTU'.
Removing this additional configuration for simplification.
Suggested-by: Konstantin Ananyev <[email protected]> Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Reviewed-by: Rosen Xu <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Hyong Youb Kim <[email protected]> Acked-by: Michal Krawczyk <[email protected]>
show more ...
|
| 1bb4a528 | 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_p
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_pkt_len' field of the config struct 'struct rte_eth_conf'.
Also 'rte_eth_dev_set_mtu()' API can be used to set the MTU, and result stored into '(struct rte_eth_dev)->data->mtu'.
These two APIs are related but they work in a disconnected way, they store the set values in different variables which makes hard to figure out which one to use, also having two different method for a related functionality is confusing for the users.
Other issues causing confusion is: * maximum transmission unit (MTU) is payload of the Ethernet frame. And 'max_rx_pkt_len' is the size of the Ethernet frame. Difference is Ethernet frame overhead, and this overhead may be different from device to device based on what device supports, like VLAN and QinQ. * 'max_rx_pkt_len' is only valid when application requested jumbo frame, which adds additional confusion and some APIs and PMDs already discards this documented behavior. * For the jumbo frame enabled case, 'max_rx_pkt_len' is an mandatory field, this adds configuration complexity for application.
As solution, both APIs gets MTU as parameter, and both saves the result in same variable '(struct rte_eth_dev)->data->mtu'. For this 'max_rx_pkt_len' updated as 'mtu', and it is always valid independent from jumbo frame.
For 'rte_eth_dev_configure()', 'dev->data->dev_conf.rxmode.mtu' is user request and it should be used only within configure function and result should be stored to '(struct rte_eth_dev)->data->mtu'. After that point both application and PMD uses MTU from this variable.
When application doesn't provide an MTU during 'rte_eth_dev_configure()' default 'RTE_ETHER_MTU' value is used.
Additional clarification done on scattered Rx configuration, in relation to MTU and Rx buffer size. MTU is used to configure the device for physical Rx/Tx size limitation, Rx buffer is where to store Rx packets, many PMDs use mbuf data buffer size as Rx buffer size. PMDs compare MTU against Rx buffer size to decide enabling scattered Rx or not. If scattered Rx is not supported by device, MTU bigger than Rx buffer size should fail.
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Hyong Youb Kim <[email protected]>
show more ...
|
| 7483341a | 06-Oct-2021 |
Xueming Li <[email protected]> |
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 <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Ferruh Yigit <[email protected]>
show more ...
|
| 70d2f421 | 15-Sep-2021 |
Thomas Monjalon <[email protected]> |
doc: remove references to the old build system
Some docs and comments in Meson files are still mentioning the old build system based on "make", removed in 20.11. After one year, such references are
doc: remove references to the old build system
Some docs and comments in Meson files are still mentioning the old build system based on "make", removed in 20.11. After one year, such references are better to be removed.
Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: David Marchand <[email protected]>
show more ...
|
| a7db3afc | 25-Aug-2021 |
Aman Deep Singh <[email protected]> |
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: A
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: Aman Deep Singh <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| c2c4f87b | 25-Aug-2021 |
Aman Deep Singh <[email protected]> |
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower ca
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower case MAC address, the user may need to make a change in such test case after this patch.
Signed-off-by: Aman Deep Singh <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| fdab8f2e | 08-Aug-2021 |
Thomas Monjalon <[email protected]> |
version: 21.11-rc0
Start a new release cycle with empty release notes.
The ABI version becomes 22.0. The map files are updated to the new ABI major number (22). The ABI exceptions are dropped and C
version: 21.11-rc0
Start a new release cycle with empty release notes.
The ABI version becomes 22.0. The map files are updated to the new ABI major number (22). The ABI exceptions are dropped and CI ABI checks are disabled because compatibility is not preserved.
Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Ferruh Yigit <[email protected]> Acked-by: David Marchand <[email protected]>
show more ...
|
| f0f7c557 | 18-May-2021 |
Feifei Wang <[email protected]> |
net/mlx4: remove barrier for memory region cache
'dev_gen' is a variable to trigger all cores to flush their local caches once the global MR cache has been rebuilt.
This is due to MR cache's R/W lo
net/mlx4: remove barrier for memory region cache
'dev_gen' is a variable to trigger all cores to flush their local caches once the global MR cache has been rebuilt.
This is due to MR cache's R/W lock can maintain synchronization between threads:
1. dev_gen and global cache updating ordering inside the lock protected section does not matter. Because other threads cannot take the lock until global cache has been updated. Thus, in out of order platform, even if other agents firstly observe updated dev_gen but global does not update, they still have to wait the lock. As a result, it is unnecessary to add a wmb between global cache rebuilding and updating the dev_gen to keep the memory store order.
2. Store-Release of unlock provides the implicit wmb at the level visible by software. This makes 'rebuilding global cache' and 'updating dev_gen' be observed before local_cache starts to be updated by other agents. Thus, wmb after 'updating dev_gen' can be removed.
Suggested-by: Ruifeng Wang <[email protected]> Signed-off-by: Feifei Wang <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 6f14d4d7 | 13-May-2021 |
Yunjian Wang <[email protected]> |
net/mlx4: fix leak when configured repeatedly
Currently, configuring a mlx device, it will allocate its own process private in mlx5_proc_priv_init() and only frees it when closing the device. This w
net/mlx4: fix leak when configured repeatedly
Currently, configuring a mlx device, it will allocate its own process private in mlx5_proc_priv_init() and only frees it when closing the device. This will lead to a memory leak, when a device is configured repeatedly.
For example: for(...) do rte_eth_dev_configure rte_eth_rx_queue_setup rte_eth_tx_queue_setup rte_eth_dev_start rte_eth_dev_stop done
Fixes: 97d37d2c1f6b ("net/mlx4: remove device register remap") Cc: [email protected]
Signed-off-by: Yunjian Wang <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| e5d94cf9 | 10-May-2021 |
Chengwen Feng <[email protected]> |
net/mlx4: fix secondary process initialization ordering
The memory barrier is used to ensure that the response is returned only after the Tx/Rx function is set, it should place after the Rx/Tx funct
net/mlx4: fix secondary process initialization ordering
The memory barrier is used to ensure that the response is returned only after the Tx/Rx function is set, it should place after the Rx/Tx function is set.
Fixes: 0203d33a1059 ("net/mlx4: support secondary process") Cc: [email protected]
Signed-off-by: Chengwen Feng <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 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 ...
|
| b014c6b7 | 17-Apr-2021 |
Viacheslav Ovsiienko <[email protected]> |
net/mlx4: fix buffer leakage on device close
The mlx4 PMD tracks the buffers (mbufs) for the packets being transmitted in the dedicated array named as "elts". The tx_burst routine frees the mbufs fr
net/mlx4: fix buffer leakage on device close
The mlx4 PMD tracks the buffers (mbufs) for the packets being transmitted in the dedicated array named as "elts". The tx_burst routine frees the mbufs from this array once it needs to rearm the hardware descriptor and store the new mbuf, so it looks like as replacement mbuf pointer in the elts array.
On the device stop mlx4 PMD freed only the part of elts according tail and head pointers, leaking the rest of buffers, remained in the elts array.
Fixes: a2ce2121c01c ("net/mlx4: separate Tx configuration functions") Cc: [email protected]
Signed-off-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 4ad4b20a | 20-Apr-2021 |
Bruce Richardson <[email protected]> |
drivers: change indentation in build files
Switch from using tabs to 4 spaces for meson.build indentation.
Signed-off-by: Bruce Richardson <[email protected]> |
| 4a750d29 | 07-Apr-2021 |
Viacheslav Ovsiienko <[email protected]> |
net/mlx4: fix RSS action with null hash key
If RSS action contains non zero hash key length and NULL key buffer pointer the default hash key should be used. The check for the NULL pointer this was m
net/mlx4: fix RSS action with null hash key
If RSS action contains non zero hash key length and NULL key buffer pointer the default hash key should be used. The check for the NULL pointer this was missing in the mlx4 PMD causing crash, for example, in testpmd with command:
flow validate 0 ingress group 0 pattern eth / ipv4 / end actions rss queues 0 end key_len 40 / end
Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API") Cc: [email protected]
Signed-off-by: Viacheslav Ovsiienko <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| fb7ad441 | 21-Mar-2021 |
Thomas Monjalon <[email protected]> |
ethdev: replace callback getting filter operations
Since rte_flow is the only API for filtering operations, the legacy driver interface filter_ctrl was too much complicated for the simple task of ge
ethdev: replace callback getting filter operations
Since rte_flow is the only API for filtering operations, the legacy driver interface filter_ctrl was too much complicated for the simple task of getting the struct rte_flow_ops.
The filter type RTE_ETH_FILTER_GENERIC and the filter operarion RTE_ETH_FILTER_GET are removed. The new driver callback flow_ops_get replaces filter_ctrl.
Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Haiyue Wang <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Hemant Agrawal <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| 7bc56bd0 | 09-Mar-2021 |
Thomas Monjalon <[email protected]> |
net/mlx4: enable debug logs dynamically
The macro DEBUG was doing nothing if not compiled with RTE_LIBRTE_MLX4_DEBUG.
As it is not used in the data path, it can be always enabled at compilation tim
net/mlx4: enable debug logs dynamically
The macro DEBUG was doing nothing if not compiled with RTE_LIBRTE_MLX4_DEBUG.
As it is not used in the data path, it can be always enabled at compilation time. Then it can be enabled at runtime with: --log-level pmd.net.mlx4:debug
Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|