| fbd19135 | 28-Sep-2020 |
Thomas Monjalon <[email protected]> |
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 <[email protected]> Reviewed-by: Liron Himi <[email protected]> Reviewed-by: Haiyue Wang <[email protected]> Acked-by: Jeff Guo <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]> Acked-by: Stephen Hemminger <[email protected]>
show more ...
|
| f51ecf2f | 02-Mar-2020 |
Ferruh Yigit <[email protected]> |
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 <[email protected]>
show more ...
|
| c21a276b | 02-Mar-2020 |
Ferruh Yigit <[email protected]> |
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: [email protected]
Signed-off-by: Ferruh Yigit <[email protected]>
show more ...
|