#
1f37cb2b |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/pci: make driver-only headers private
The pci 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 indentatio
bus/pci: make driver-only headers private
The pci 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: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
b3f89090 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/auxiliary: make driver-only headers private
The auxiliary bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fi
bus/auxiliary: make driver-only headers private
The auxiliary 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>
show more ...
|
#
72d7efe4 |
| 16-Jun-2022 |
Spike Du <spiked@nvidia.com> |
common/mlx5: share interrupt management
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API.
Sig
common/mlx5: share interrupt management
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API.
Signed-off-by: Spike Du <spiked@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
f956d3d4 |
| 06-Apr-2022 |
Rongwei Liu <rongweil@nvidia.com> |
net/mlx5: fix probing with secondary bonding member
Users can probe primary or secondary PCIe id when bonding is configured. 1. -a 0a:00.0,representor=pf[0-1]vf[0-1], PMD probes 5 ports totally: bon
net/mlx5: fix probing with secondary bonding member
Users can probe primary or secondary PCIe id when bonding is configured. 1. -a 0a:00.0,representor=pf[0-1]vf[0-1], PMD probes 5 ports totally: bonding device plus 4 representor ports. 2. -a 0a:00.1,representor=pf[0-1]vf[0-1], PMD only probes 2 representor ports.
Under the 2nd condition, bonding IB device doesn't have the same PCIe id and PMD needs to check bonding relationship otherwise probe failure.
Fixes: 6856efa54eea ("net/mlx5: fix PF leak on PCI probing failure") Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
655c3c26 |
| 01-Mar-2022 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
net/mlx5: fix initial link status detection
Link status change takes time that depends on the HW and the kernel. It was checked immediately after the change was issued at probing. If the port had be
net/mlx5: fix initial link status detection
Link status change takes time that depends on the HW and the kernel. It was checked immediately after the change was issued at probing. If the port had been down before probing, a "down" state may be read, while the port would be "up" imminently. After that, DPDK reported the port as "down" mistakenly and "ifconfig $DEV up" did not trigger an LSC event, because from the system's perspective the port was "up" already.
Install Netlink event handler at port probe before requesting the port to come up in order to receive LSC event even if it comes up between probe and start.
Fixes: a85a606ca501 ("net/mlx5: fix link status initialization") Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
17f95513 |
| 01-Mar-2022 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
net/mlx5: fix link status change detection
Sometimes net/mlx5 devices did not detect link status change to "up".
Each shared device was monitoring IBV_EVENT_PORT_{ACTIVE,ERR} and queried the link s
net/mlx5: fix link status change detection
Sometimes net/mlx5 devices did not detect link status change to "up".
Each shared device was monitoring IBV_EVENT_PORT_{ACTIVE,ERR} and queried the link status upon receiving the event. IBV_EVENT_PORT_ACTIVE is delivered when the logical link status (UP flag) is set, but the physical link status (RUNNING flag) may be down at that time, in which case the new link status would be erroneously considered down.
IBV interface is insufficient for the task. Monitor interface events using Netlink.
Fixes: 198a3c339a8f ("mlx5: handle link status interrupts") Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
be66461c |
| 01-Mar-2022 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
common/mlx5: add Netlink event helpers
Introduce mlx5_nl_read_events() to read Netlink events (technically, messages) from a socket that was configured to listen for them via a new mlx5_nl_init() pa
common/mlx5: add Netlink event helpers
Introduce mlx5_nl_read_events() to read Netlink events (technically, messages) from a socket that was configured to listen for them via a new mlx5_nl_init() parameter. Add mlx5_nl_parse_link_status_update() helper to extract information from link-related events. This patch is a shared base for later fixes.
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
80f872ee |
| 24-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: add external Rx queue mapping API
External queue is a queue that has been created and managed outside the PMD. The queues owner might use PMD to generate flow rules using these external qu
net/mlx5: add external Rx queue mapping API
External queue is a queue that has been created and managed outside the PMD. The queues owner might use PMD to generate flow rules using these external queues.
When the queue is created in hardware it is given an ID represented by 32 bits. In contrast, the index of the queues in PMD is represented by 16 bits. To enable the use of PMD to generate flow rules, the queue owner must provide a mapping between the HW index and a 16-bit index corresponding to the ethdev API.
This patch adds an API enabling to insert/cancel a mapping between HW queue id and ethdev queue id.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
5c4d4917 |
| 25-Feb-2022 |
Sean Zhang <xiazhang@nvidia.com> |
net/mlx5: support matching GRE optional fields
This patch adds matching on the optional fields (checksum/key/sequence) of GRE header. The matching on checksum and sequence fields requests support fr
net/mlx5: support matching GRE optional fields
This patch adds matching on the optional fields (checksum/key/sequence) of GRE header. The matching on checksum and sequence fields requests support from rdma-core with the capability of misc5 and tunnel_header 0-3.
For patterns without checksum and sequence specified, keep using misc for matching as before, but for patterns with checksum or sequence, validate capability first and then use misc5 for the matching.
Signed-off-by: Sean Zhang <xiazhang@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
3a2f674b |
| 24-Feb-2022 |
Suanming Mou <suanmingm@nvidia.com> |
net/mlx5: add queue and RSS HW steering action
This commit adds the queue and RSS action. Similar to the jump action, dynamic ones will be added to the action construct list.
Due to the queue and R
net/mlx5: add queue and RSS HW steering action
This commit adds the queue and RSS action. Similar to the jump action, dynamic ones will be added to the action construct list.
Due to the queue and RSS action in template should not be destroyed during port restart, the actions are created with standalone indirect table as indirect action does. When port stops, detaches the indirect table from action, when port starts, attaches the indirect table back to the action.
One more change is made to accelerate the action creation. Currently the mlx5_hrxq_get() function returns the object index instead of object pointer. This introduced an extra converting the index to the object by calling mlx5_ipool_get() in most of the case. And that extra converting hurts multi-thread performance since mlx5_ipool_get() uses the global lock inside. As the hash Rx queue object itself also contains the index, returns the object directly will achieve better performance without the global lock.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
d84c3cf7 |
| 24-Feb-2022 |
Suanming Mou <suanmingm@nvidia.com> |
net/mlx5: introduce hardware steering enable routine
The new hardware steering engine relies on using dedicated steering WQEs instead of writing to the low-level steering table entries directly. In
net/mlx5: introduce hardware steering enable routine
The new hardware steering engine relies on using dedicated steering WQEs instead of writing to the low-level steering table entries directly. In the first implementation the hardware steering engine supports the new queue based Flow API, the existing synchronous non-queue based Flow API is not supported.
A new dv_flow_en value 2 is added to manage mlx5 PMD steering engine:
dv_flow_en rte_flow API rte_flow_async API ------------------------------------------------ 0 support not support 1 support not support 2 not support support
This commit introduces the extra dv_flow_en = 2 to specify the new flow initialize and manage operation routine.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
a729d2f0 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: refactor devargs management
Improve the devargs handling in two aspects: - Parse the devargs string only once. - Return error and report for unknown keys.
The common driver parses on
common/mlx5: refactor devargs management
Improve the devargs handling in two aspects: - Parse the devargs string only once. - Return error and report for unknown keys.
The common driver parses once the devargs string into a dictionary, then provides it to all the drivers' probe. Each driver updates within it which keys it has used, then common driver receives the updated dictionary and reports about unknown devargs.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
45a6df80 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: separate per port configuration
Add configuration structure for port (ethdev). This structure contains all configurations coming from devargs which oriented to port. It is a field of mlx5_
net/mlx5: separate per port configuration
Add configuration structure for port (ethdev). This structure contains all configurations coming from devargs which oriented to port. It is a field of mlx5_priv structure, and is updated in spawn function for each port.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
c4b86201 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: refactor to detect operation by DevX
Add inline function indicating whether HW objects operations can be created by DevX. It makes the code more readable.
Signed-off-by: Michael Baum <mic
net/mlx5: refactor to detect operation by DevX
Add inline function indicating whether HW objects operations can be created by DevX. It makes the code more readable.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
a13ec19c |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: add shared device context config structure
Add configuration structure for shared device context. This structure contains all configurations coming from devargs which oriented to device. I
net/mlx5: add shared device context config structure
Add configuration structure for shared device context. This structure contains all configurations coming from devargs which oriented to device. It is a field of shared device context (SH) structure, and is updated once in mlx5_alloc_shared_dev_ctx() function. This structure cannot be changed when probing again, so add function to prevent it. The mlx5_probe_again_args_validate() function creates a temporary IB context configure structure according to new devargs attached in probing again, then checks the match between the temporary structure and the existing IB context configure structure.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
87af0d1e |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: concentrate all device configurations
Move all device configure to be performed by mlx5_os_cap_config() function instead of the spawn function. In addition move all relevant fields from ml
net/mlx5: concentrate all device configurations
Move all device configure to be performed by mlx5_os_cap_config() function instead of the spawn function. In addition move all relevant fields from mlx5_dev_config structure to mlx5_dev_cap.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
91d1cfaf |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: rearrange device attribute structure
Rearrange the mlx5_os_get_dev_attr() function in such a way that it first executes the queries and only then updates the fields. In addition, it change
net/mlx5: rearrange device attribute structure
Rearrange the mlx5_os_get_dev_attr() function in such a way that it first executes the queries and only then updates the fields. In addition, it changed its name in preparation for expanding its operations to configure the capabilities inside it.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
cf004fd3 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: add E-Switch mode flag
This patch adds in SH structure a flag which indicates whether is E-Switch mode. When configure "dv_esw_en" from devargs, it is enabled only when is E-switch mode. S
net/mlx5: add E-Switch mode flag
This patch adds in SH structure a flag which indicates whether is E-Switch mode. When configure "dv_esw_en" from devargs, it is enabled only when is E-switch mode. So, since dv_esw_en has been configure, it is enough to check if "dv_esw_en" is valid. This patch also removes E-Switch mode check when "dv_esw_en" is checked too.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
cf8971db |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: share counter config function
The mlx5_flow_counter_mode_config function exists for both Linux and Windows with the same name and content. This patch moves its implementation to the folder
net/mlx5: share counter config function
The mlx5_flow_counter_mode_config function exists for both Linux and Windows with the same name and content. This patch moves its implementation to the folder shared between the operating systems, removing the duplication.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
e3032e9c |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: share realtime timestamp configure
The realtime timestamp configure work for Linux as same as Windows. This patch removes it to the function implemented in the folder shared between the op
net/mlx5: share realtime timestamp configure
The realtime timestamp configure work for Linux as same as Windows. This patch removes it to the function implemented in the folder shared between the operating systems, removing the duplication.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
c4c3e8af |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share VF check function
The check if device is VF work for Linux as same as Windows. This patch removes it to the function implemented in the folder shared between the operating systems
common/mlx5: share VF check function
The check if device is VF work for Linux as same as Windows. This patch removes it to the function implemented in the folder shared between the operating systems, removing the duplication.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
8f464810 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: remove Verbs query device duplication
The sharing device context structure has a field named "device_attr" which is filled by mlx5_os_get_dev_attr() function. The spawn function calls mlx5
net/mlx5: remove Verbs query device duplication
The sharing device context structure has a field named "device_attr" which is filled by mlx5_os_get_dev_attr() function. The spawn function calls mlx5_os_get_dev_attr() again and save it to local variable identical to "device_attr" field.
There is no need for this duplication, because there is a reference to the sharing device context structure from spawn function.
This patch removes the local "device_attr" from spawn function, and uses the context's field instead.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
6dc0cbc6 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: remove DevX flag duplication
The sharing device context structure has a field named "devx" which indicates if DevX is supported. The common configure structure has also field named "devx"
net/mlx5: remove DevX flag duplication
The sharing device context structure has a field named "devx" which indicates if DevX is supported. The common configure structure has also field named "devx" with the same meaning.
There is no need for this duplication, because there is a reference to the common structure from within the sharing device context structure.
This patch removes it from sharing device context structure and uses the common config structure instead.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
53820561 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: remove HCA attribute structure duplication
The HCA attribute structure is field of net configure structure. It is also field of common configure structure.
There is no need for this dupli
net/mlx5: remove HCA attribute structure duplication
The HCA attribute structure is field of net configure structure. It is also field of common configure structure.
There is no need for this duplication, because there is a reference to the common structure from within the net structures.
This patch removes it from net configure structure and uses the common config structure instead.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
cfe0639b |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: remove redundant check of devargs
The device arguments are parsed and updated twice during spawning. First time before creating the share device context, and again later after updating a d
net/mlx5: remove redundant check of devargs
The device arguments are parsed and updated twice during spawning. First time before creating the share device context, and again later after updating a default value to one of the arguments.
This patch consolidates them into one parsing and updates the default values before it.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|