mlx5-next updates 2026-11-16
Subsystems (5)
Tariq Toukan
maintainercover mlx5-next updates 2026-11-16
Hi,
This series contains mlx5 shared updates as preparation for upcoming features.
Regards,
Tariq
Chris Mi (1):
net/mlx5: Add MLX5_PCI_PF_TYPE_QUERY_PF to mlx5_ifc
Moshe Shemesh (2):
net/mlx5: Extend nic_cap_reg layout to its full register size net/mlx5: Add IFC bits for SW RoCE monitor matched packets counter
include/linux/mlx5/mlx5_ifc.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
base-commit: 8049809206dcd95a122f1a49171e00833901f499
Signature · 1 line
2.44.0
Tariq Toukan
maintainerPATCH 1/3 net/mlx5: Extend nic_cap_reg layout to its full register size
From: Moshe Shemesh <[email protected]>
Struct mlx5_ifc_nic_cap_reg_bits describes only the first 4 dwords of NIC_CAP_REG, while the register itself is 32 dwords long. The driver reads the register through mlx5_core_access_reg(), which derives the access length from the struct size, so today it issues a partial read. Partial reads of a register using access reg command are accepted by the device, hence nothing is broken and no fix is needed.
It does mean, though, that naming any field deeper in the register changes the length requested on the wire as a side effect. Describe NIC_CAP_REG up to its full size, as is done for the other register layouts in mlx5_ifc.h, so that the access length is fixed and further fields can be added without altering it.
--- include/linux/mlx5/mlx5_ifc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mlx5/mlx5_ifc.h +1 -1
@@ -3448,7 +3448,7 @@ struct mlx5_ifc_nic_cap_reg_bits {u8 vhca_icm_ctrl[0x1 ];u8 reserved_at_1b[0x5 ]; -u8 reserved_at_20[0x60 ]; +u8 reserved_at_20[0x3e0 ]; };struct mlx5_ifc_default_timeout_bits {
Signature · 1 line
2.44.0
[email protected]
AI reviewRe: [PATCH mlx5-next 1/3] net/mlx5: Extend nic_cap_reg layout to its full register size
Sashiko has reviewed this patch and found no issues.
Quoted 15 lines
From: Moshe Shemesh <[email protected]>
Struct
mlx5_ifc_nic_cap_reg_bitsdescribes only the first 4 dwords ofNIC_CAP_REG, while the register itself is 32 dwords long. The driver reads the register throughmlx5_core_access_reg(), which derives the access length from the struct size, so today it issues a partial read. Partial reads of a register using access reg command are accepted by the device, hence nothing is broken and no fix is needed.It does mean, though, that naming any field deeper in the register changes the length requested on the wire as a side effect. Describe
NIC_CAP_REGup to its full size, as is done for the other register layouts inmlx5_ifc.h, so that the access length is fixed and further fields can be added without altering it.
Quoted 3 lines
Signed-off-by Moshe Shemesh <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Tariq Toukan
maintainerPATCH 2/3 net/mlx5: Add IFC bits for SW RoCE monitor matched packets counter
In reply to Tariq ToukanFrom: Moshe Shemesh <[email protected]>
Add the sw_roce_monitor_matched_packets counter to the query_vnic_env command output. The counter reports the number of packets generated by the Ethernet SQs of the vNIC that matched the configured SW RoCE monitor classifier. Additionally, add the NIC_CAP_REG capability field sw_roce_monitor_classifier. The field is a bitmask of the supported classifiers, of which only bit 0, RoCEv2, is currently defined.
--- include/linux/mlx5/mlx5_ifc.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
include/linux/mlx5/mlx5_ifc.h +12 -2
@@ -3448,7 +3448,13 @@ struct mlx5_ifc_nic_cap_reg_bits {u8 vhca_icm_ctrl[0x1 ];u8 reserved_at_1b[0x5 ]; -u8 reserved_at_20[0x3e0 ]; +u8 reserved_at_20[0x80 ]; + +u8 reserved_at_a0[0x4 ]; +u8 sw_roce_monitor_classifier[0x4 ]; +u8 reserved_at_a8[0x18 ]; + +u8 reserved_at_c0[0x340 ]; };struct mlx5_ifc_default_timeout_bits {
@@ -4077,7 +4083,11 @@ struct mlx5_ifc_vnic_diagnostic_statistics_bits {u8 odp_remote_triggered_page_fault[0x20 ]; -u8 reserved_at_3c0[0xc20 ]; +u8 reserved_at_3e0[0x20 ]; + +u8 sw_roce_monitor_matched_packets[0x20 ]; + +u8 reserved_at_420[0xbe0 ]; };struct mlx5_ifc_traffic_counter_bits {
Signature · 1 line
2.44.0
[email protected]
AI reviewRe: [PATCH mlx5-next 2/3] net/mlx5: Add IFC bits for SW RoCE monitor matched packets counter
Sashiko has reviewed this patch and found no issues.
Quoted 9 lines
From: Moshe Shemesh <[email protected]>
Add the
sw_roce_monitor_matched_packetscounter to thequery_vnic_envcommand output. The counter reports the number of packets generated by the Ethernet SQs of the vNIC that matched the configured SW RoCE monitor classifier. Additionally, add theNIC_CAP_REGcapability fieldsw_roce_monitor_classifier. The field is a bitmask of the supported classifiers, of which only bit 0, RoCEv2, is currently defined.
Quoted 3 lines
Signed-off-by Moshe Shemesh <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Tariq Toukan
maintainerPATCH 3/3 net/mlx5: Add MLX5_PCI_PF_TYPE_QUERY_PF to mlx5_ifc
In reply to Tariq ToukanFrom: Chris Mi <[email protected]>
FW exposes a new PCI PF type value (0x2) in QUERY_ESW_FUNCTIONS to identify the querying PF itself, allowing the driver to read its own host_number from the firmware response.
--- include/linux/mlx5/mlx5_ifc.h | 1 + 1 file changed, 1 insertion(+)
include/linux/mlx5/mlx5_ifc.h +1 -0
@@ -12913,6 +12913,7 @@ enum mlx5_ifc_vhca_state {enum {MLX5_PCI_PF_TYPE_EXTERNAL_HOST_PF =0x0 ,MLX5_PCI_PF_TYPE_SATELLITE_PF =0x1 , +MLX5_PCI_PF_TYPE_QUERY_PF =0x2 , };struct mlx5_ifc_network_function_params_bits {
Signature · 1 line
2.44.0
[email protected]
AI reviewRe: [PATCH mlx5-next 3/3] net/mlx5: Add MLX5_PCI_PF_TYPE_QUERY_PF to mlx5_ifc
Sashiko has reviewed this patch and found no issues.
Quoted 10 lines
From: Chris Mi <[email protected]>
FW exposes a new PCI PF type value (
0x2) inQUERY_ESW_FUNCTIONSto identify the querying PF itself, allowing the driver to read its ownhost_numberfrom the firmware response.Signed-off-by Chris Mi <[email protected]>Reviewed-by Shay Drori <[email protected]>Reviewed-by Parav Pandit <[email protected]>Signed-off-by Tariq Toukan <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Leon Romanovsky
AppliedQuoted 10 lines · Tariq Toukan
This series contains mlx5 shared updates as preparation for upcoming features.
Regards,
TariqChris Mi (1):
net/mlx5: AddMLX5_PCI_PF_TYPE_QUERY_PFtomlx5_ifc[...]
Applied, thanks!
[1/3] net/mlx5: Extend nic_cap_reg layout to its full register size
https://git.kernel.org/rdma/rdma/c/7ababe9e9414ac [2/3] net/mlx5: Add IFC bits for SW RoCE monitor matched packets counter https://git.kernel.org/rdma/rdma/c/97d5d1636d96ba [3/3] net/mlx5: Add MLX5_PCI_PF_TYPE_QUERY_PF to mlx5_ifc https://git.kernel.org/rdma/rdma/c/b77e82a6ebdf45
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>