| f956d3d4 | 06-Apr-2022 |
Rongwei Liu <[email protected]> |
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: [email protected]
Signed-off-by: Rongwei Liu <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 655c3c26 | 01-Mar-2022 |
Dmitry Kozlyuk <[email protected]> |
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: [email protected]
Signed-off-by: Dmitry Kozlyuk <[email protected]> Reviewed-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 17f95513 | 01-Mar-2022 |
Dmitry Kozlyuk <[email protected]> |
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: [email protected]
Signed-off-by: Dmitry Kozlyuk <[email protected]> Reviewed-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| be66461c | 01-Mar-2022 |
Dmitry Kozlyuk <[email protected]> |
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: [email protected]
Signed-off-by: Dmitry Kozlyuk <[email protected]> Reviewed-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 68eb9a19 | 25-Feb-2022 |
Stephen Hemminger <[email protected]> |
remove extra blank line at EOF
These source files all had unnecessary blank line at end of file.
Signed-off-by: Stephen Hemminger <[email protected]> |
| 80f872ee | 24-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 5c4d4917 | 25-Feb-2022 |
Sean Zhang <[email protected]> |
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 <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 3a2f674b | 24-Feb-2022 |
Suanming Mou <[email protected]> |
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 <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| d84c3cf7 | 24-Feb-2022 |
Suanming Mou <[email protected]> |
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 <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 2b679150 | 24-Feb-2022 |
Suanming Mou <[email protected]> |
net/mlx5: introduce hardware steering operation
The Connect-X steering is a lookup hardware mechanism that accesses flow tables, matches packets to the rules, and performs specified actions. Histori
net/mlx5: introduce hardware steering operation
The Connect-X steering is a lookup hardware mechanism that accesses flow tables, matches packets to the rules, and performs specified actions. Historically, mlx5 PMD implements several software engines to manage steering hardware facility:
- FW Steering - Verbs/Direct Verbs, uses FW calls to manage flows - SW Steering - DevX/mlx5dv, uses WQEs to access table memory directly
However, there are still some disadvantages:
- performance is limited, we should invoke firmware either to manage the entire flow, or to handle some internal steering objects
- organizing and preparing flow infrastructure (actions, matchers, groups, etc.) on the flow inserting is sure to cause slow flow insertion
- security, exposing the low-level steering entries directly to the userspace may cause security risks
A new hardware WQE based steering operation with codename "HW Steering" is going to be introduced to get rid of the security risks. And it will take advantage of the recently new introduced async queue-based rte_flow APIs to prepare everything in advance to achieve high insertion rate.
In this new HW steering engine, the original SW steering rte_flow API will not be supported in the first implementation, only the new async queue-based flow operations is going to be supported. A new steering mode parameter for dv_flow_en will be introduced and user will be able to engage the new steering engine.
This commit adds the basic driver operation.
Signed-off-by: Suanming Mou <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| 2f5122df | 24-Feb-2022 |
Viacheslav Ovsiienko <[email protected]> |
net/mlx5: configure Tx queue with send on time offload
The wait on time configuration flag is copied to the Tx queue structure due to performance considerations. Timestamp mask is prepared and store
net/mlx5: configure Tx queue with send on time offload
The wait on time configuration flag is copied to the Tx queue structure due to performance considerations. Timestamp mask is prepared and stored in queue structure as well.
Signed-off-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| a6b9d5a5 | 23-Feb-2022 |
Michael Baum <[email protected]> |
common/mlx5: update doorbell mapping parameter name
The "tx_db_nc" devarg forces doorbell register mapping to non-cached region eliminating the extra write memory barrier. This argument was used in
common/mlx5: update doorbell mapping parameter name
The "tx_db_nc" devarg forces doorbell register mapping to non-cached region eliminating the extra write memory barrier. This argument was used in creating the UAR for Tx and thus affected its performance.
Recently [1] its use has been extended to all UAR creation in all mlx5 drivers, and now its name is no longer so accurate.
This patch changes its name to "sq_db_nc" to suit any send queue that uses it. The old name will still work for backward compatibility.
[1] commit 5dfa003db53f ("common/mlx5: fix post doorbell barrier")
Signed-off-by: Michael Baum <[email protected]> Reviewed-by: Raslan Darawsheh <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| a729d2f0 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 45a6df80 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| c4b86201 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| a13ec19c | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 87af0d1e | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 91d1cfaf | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| cf004fd3 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| cf8971db | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| e3032e9c | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| c4c3e8af | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 8f464810 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 6dc0cbc6 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|
| 53820561 | 14-Feb-2022 |
Michael Baum <[email protected]> |
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 <[email protected]> Acked-by: Matan Azrad <[email protected]>
show more ...
|