#
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 ...
|
#
b142387b |
| 28-Sep-2020 |
Thomas Monjalon <thomas@monjalon.net> |
ethdev: allow drivers to return error on close
The device operation .dev_close was returning void. This driver interface is changed to return an int.
Note that the API rte_eth_dev_close() is still
ethdev: allow drivers to return error on close
The device operation .dev_close was returning void. This driver interface is changed to return an int.
Note that the API rte_eth_dev_close() is still returning void, although a deprecation notice is pending to change it as well.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Rosen Xu <rosen.xu@intel.com> Reviewed-by: Sachin Saxena <sachin.saxena@oss.nxp.com> Reviewed-by: Liron Himi <lironh@marvell.com> Reviewed-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Jeff Guo <jia.guo@intel.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
cbfc6111 |
| 09-Sep-2020 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: move inline device operations
This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev
ethdev: move inline device operations
This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.
Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.
To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.
The list of dev_ops moved: eth_rx_queue_count_t rx_queue_count; eth_rx_descriptor_done_t rx_descriptor_done; eth_rx_descriptor_status_t rx_descriptor_status; eth_tx_descriptor_status_t tx_descriptor_status;
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
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 ...
|
#
a4f53bec |
| 19-May-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: do not query VF link state
When the primary device link state is queried, there is no need to query the VF state as well. The application only sees the state of the synthetic device.
Fi
net/netvsc: do not query VF link state
When the primary device link state is queried, there is no need to query the VF state as well. The application only sees the state of the synthetic device.
Fixes: dc7680e8597c ("net/netvsc: support integrated VF") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
b757deb8 |
| 19-May-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: change datapath logging
The PMD_TX_LOG and PMD_RX_LOG can hide errors since this debug log is typically disabled. Change the code to use PMD_DRV_LOG for errors.
Under load, the ring buf
net/netvsc: change datapath logging
The PMD_TX_LOG and PMD_RX_LOG can hide errors since this debug log is typically disabled. Change the code to use PMD_DRV_LOG for errors.
Under load, the ring buffer to the host can fill. Add some statistics to estimate the impact and see other errors.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
a41ef8ee |
| 19-May-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: implement descriptor status
These functions are useful for applications and debugging. The netvsc PMD also transparently handles the rx/tx descriptor functions for underlying VF device.
net/netvsc: implement descriptor status
These functions are useful for applications and debugging. The netvsc PMD also transparently handles the rx/tx descriptor functions for underlying VF device.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
c7b82b14 |
| 19-May-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: support per-queue info requests
There is not a lot of info here from this driver. But worth supporting these additional info queries.
Signed-off-by: Stephen Hemminger <stephen@networkpl
net/netvsc: support per-queue info requests
There is not a lot of info here from this driver. But worth supporting these additional info queries.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
c6611b77 |
| 30-Apr-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: do not configure RSS if disabled
This fixes the problem where driver would not start if only have a single Rx queue and multiple Txq. In that case, RSS should stay disabled.
Fixes: 92d2
net/netvsc: do not configure RSS if disabled
This fixes the problem where driver would not start if only have a single Rx queue and multiple Txq. In that case, RSS should stay disabled.
Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
019a2891 |
| 30-Apr-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: do RSS across Rx queue only
If number of tx queues is greater than the number of rx queues; the driver ends up allocating more channels than rx queues. The problem is that the RSS indire
net/netvsc: do RSS across Rx queue only
If number of tx queues is greater than the number of rx queues; the driver ends up allocating more channels than rx queues. The problem is that the RSS indirection table is programmed such that some packets will end up on a channel that would never be polled. The fix is to limit the RSS indirection table by number of rx queues not channels.
Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
81938ebb |
| 30-Apr-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: manage VF port under read/write lock
With multiple channels, the primary channel may receive notification that VF has been added or removed while secondary channel is in process of doing
net/netvsc: manage VF port under read/write lock
With multiple channels, the primary channel may receive notification that VF has been added or removed while secondary channel is in process of doing receive or transmit. Resolve this race by converting existing vf_lock to a reader/writer lock.
Users of lock (tx/rx/stats) acquire for read, and actions like add/remove acquire it for write.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
672f4d12 |
| 30-Apr-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: fix comment spelling
No code change here.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
#
30408aab |
| 31-Mar-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: fix memory free on device close
The netvsc PMD was putting the mac address in private data but the core rte_ethdev doesn't allow that it. It has to be in rte_malloc'd memory or a message
net/netvsc: fix memory free on device close
The netvsc PMD was putting the mac address in private data but the core rte_ethdev doesn't allow that it. It has to be in rte_malloc'd memory or a message will be printed on shutdown/close. EAL: Invalid memory
Fixes: f8279f47dd89 ("net/netvsc: fix crash in secondary process") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
cc025181 |
| 31-Mar-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: split send buffers from Tx descriptors
The VMBus has reserved transmit area (per device) and transmit descriptors (per queue). The previous code was always having a 1:1 mapping between s
net/netvsc: split send buffers from Tx descriptors
The VMBus has reserved transmit area (per device) and transmit descriptors (per queue). The previous code was always having a 1:1 mapping between send buffers and descriptors. This can lead to one queue starving another and also buffer bloat.
Change to working more like FreeBSD where there is a pool of transmit descriptors per queue. If send buffer is not available then no aggregation happens but the queue can still drain.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
047ad378 |
| 07-Feb-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: initialize link state
If application is using link state interrupt, the correct link state needs to be filled in when device is started. This is similar to how virtio updates link inform
net/netvsc: initialize link state
If application is using link state interrupt, the correct link state needs to be filled in when device is started. This is similar to how virtio updates link information.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org
Reported-by: Mohammed Gamal <mgamal@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Tested-by: Mohammed Gamal <mgamal@redhat.com>
show more ...
|
#
f8279f47 |
| 13-Jan-2020 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: fix crash in secondary process
The secondary process would crash trying to get the offload capability of the device. Since the device capabilities were already set by the primary process
net/netvsc: fix crash in secondary process
The secondary process would crash trying to get the offload capability of the device. Since the device capabilities were already set by the primary process this was unnecessary.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
b604e806 |
| 06-Dec-2019 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: disable before changing RSS parameters
In order to change RSS parameters, the host requires that RSS is disable first.
Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS paramete
net/netvsc: disable before changing RSS parameters
In order to change RSS parameters, the host requires that RSS is disable first.
Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters") Cc: stable@dpdk.org
Signed-off-by: Donald Lee <donald_lee@trendmicro.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Tested-by: Dexuan Cui <decui@microsoft.com> Tested-by: Abhishek Marathe <abmarath@microsoft.com>
show more ...
|
#
b1cf08ae |
| 06-Dec-2019 |
Stephen Hemminger <stephen@networkplumber.org> |
net/netvsc: fix RSS offload flag
The change to add OFFLOAD_RSS_HASH broke use of netvsc PMD with testpmd. The netvsc driver fails during configure step:
Configuring Port 1 (socket 0) hn_dev_confi
net/netvsc: fix RSS offload flag
The change to add OFFLOAD_RSS_HASH broke use of netvsc PMD with testpmd. The netvsc driver fails during configure step:
Configuring Port 1 (socket 0) hn_dev_configure(): unsupported RX offload: 0x80000
Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
73fb89dd |
| 14-Nov-2019 |
Andrew Rybchenko <arybchenko@solarflare.com> |
drivers/net: fix RSS hash offload flag if no RSS
By default RSS hash delivery (offload) is bound to RSS mode and it is incorrect to advertise it as enabled if Rx multi-queue mode has no RSS.
Fixes:
drivers/net: fix RSS hash offload flag if no RSS
By default RSS hash delivery (offload) is bound to RSS mode and it is incorrect to advertise it as enabled if Rx multi-queue mode has no RSS.
Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
8b945a7f |
| 11-Nov-2019 |
Pavan Nikhilesh <pbhagavatula@marvell.com> |
drivers/net: update Rx RSS hash offload capabilities
Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash delivery.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Reviewed
drivers/net: update Rx RSS hash offload capabilities
Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash delivery.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
ca041cd4 |
| 24-Sep-2019 |
Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> |
ethdev: change allmulticast callbacks to return status
Enabling/disabling of allmulticast mode is not always successful and it should be taken into account to be able to handle it properly.
When co
ethdev: change allmulticast callbacks to return status
Enabling/disabling of allmulticast mode is not always successful and it should be taken into account to be able to handle it properly.
When correct return status is unclear from driver code, -EAGAIN is used.
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
show more ...
|
#
fd2d28fc |
| 10-Sep-2019 |
Igor Romanov <igor.romanov@oktetlabs.ru> |
ethdev: change owner delete function to return int
Change rte_eth_dev_owner_delete() return value from void to int and return negative errno values in case of error conditions.
Right now there is o
ethdev: change owner delete function to return int
Change rte_eth_dev_owner_delete() return value from void to int and return negative errno values in case of error conditions.
Right now there is only one error case for rte_eth_dev_owner_delete() - invalid owner, but it still makes sense to return error to catch bugs in the code which uses the function.
Also update the usage of the function in drivers/netvsc according to the new return type.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.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 ...
|
#
9039c812 |
| 14-Sep-2019 |
Andrew Rybchenko <arybchenko@solarflare.com> |
ethdev: change promiscuous callbacks to return status
Enabling/disabling of promiscuous mode is not always successful and it should be taken into account to be able to handle it properly.
When corr
ethdev: change promiscuous callbacks to return status
Enabling/disabling of promiscuous mode is not always successful and it should be taken into account to be able to handle it properly.
When correct return status is unclear from driver code, -EAGAIN is used.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Matan Azrad <matan@mellanox.com> Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
show more ...
|
#
bdad90d1 |
| 12-Sep-2019 |
Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> |
ethdev: change device info get callback to return int
Change eth_dev_infos_get_t return value from void to int. Make eth_dev_infos_get_t implementations across all drivers to return negative errno v
ethdev: change device info get callback to return int
Change eth_dev_infos_get_t return value from void to int. Make eth_dev_infos_get_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 ...
|