Skip to content

Conversation

@ovsrobot
Copy link
Owner

@ovsrobot ovsrobot commented Nov 2, 2025

Auto-submission for "http://patchwork.dpdk.org/project/dpdk/list/?series=36543"

Summary by CodeRabbit

Release Notes

  • Chores
    • Removed unused internal configuration constants and macros from the MLX5 driver suite to reduce codebase complexity and streamline driver implementation across networking, cryptography, regex, and vDPA components.

The constant MLX5_VDPA_DEFAULT_TIMER_DELAY_US is not used anymore.

Fixes: 99f9d79 ("vdpa/mlx5: improve interrupt management")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: 0-day Robot <robot@bytheb.org>
The constant MLX5_CRYPTO_LOG_NAME was never used.
The constant MLX5_CRYPTO_MAX_SEGS was not used after the fix below.

Fixes: ba707cd ("crypto/mlx5: fix queue size configuration")
Fixes: a7c8688 ("crypto/mlx5: introduce Mellanox crypto driver")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: 0-day Robot <robot@bytheb.org>
All these constants were unused since their introduction:

- MLX5_REGEX_WQE_CTRL_OFFSET
- MLX5_REGEX_RXP_ROF2_LINE_LEN
- MLX5_RXP_BF4_ROF_VERSION_STRING
- MLX5_RXP_CTRL_TYPE_*
- MLX5_RXP_CTRL_JOB_DESC_FLAGS
- MLX5_RXP_CTRL_VALID
- MLX5_RXP_INITIALIZATION_TIMEOUT

This constant became unused after supporting combined rule file:

- MLX5_RXP_POLL_CSR_FOR_VALUE_TIMEOUT

All these constants became unused after removing DB and register R/W:

- MLX5_RXP_MAX_ENGINES
- MLX5_RXP_EM_COUNT
- MLX5_RXP_DB_NOT_ASSIGNED
- MLX5_RXP_CSR_NUM_ENTRIES
- MLX5_RXP_CSR_CTRL_DISABLE_L2C

Fixes: 4d4e245 ("regex/mlx5: support enqueue")
Fixes: f324162 ("regex/mlx5: support combined rule file")
Fixes: ab74680 ("regex/mlx5: support combined ROF file")
Fixes: b34d816 ("regex/mlx5: support rules import")
Fixes: ab2e0b0 ("regex/mlx5: remove register read/write")
Fixes: 9fa82d2 ("regex/mlx5: move RXP to CrSpace")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: 0-day Robot <robot@bytheb.org>
All these constants were unused since their introduction:

- MLX5_DRV_PROBE_AGAIN
- MLX5_NL_BUF_SIZE
- MLX5DV_FLOW_TABLE_TYPE_RDMA_RX
- IB_QPT_RAW_PACKET

Fixes: ad435d3 ("common/mlx5: add bus-agnostic layer")
Fixes: ccdcba5 ("net/mlx5: use Netlink to add/remove MAC addresses")
Fixes: 03e1f7f ("net/mlx5: create flow matcher object on Windows")
Fixes: 358fbb0 ("net/mlx5: support multi-packet Rx queue on Windows")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: 0-day Robot <robot@bytheb.org>
- MLX5_VEC_TX_CKSUM_OFFLOAD_CAP became unused when Tx metadata moved
  to a dynamic field.
- MLX5_ALARM_TIMEOUT_US became unused when reworking link status wait.
- MLX5_FLOW_SFT_HLIST_ARRAY_SIZE was never used in hash list handling.
- MLX5_FLOW_MIN_ID_POOL_SIZE and MLX5_ID_GENERATION_ARRAY_FACTOR became
  unused when the flow ID generator was replaced by ipool.
- IS_BATCH_CNT became unused when removing a flow counter container.
- MLX5_RSSQ_DEFAULT_NUM was used in the old per-thread flow workspace.
- MLX5_FLOW_TABLE_HWS_POLICY became unused because meter is not supported
  in HWS.
- IPPROTO_MPLS became unused because MPLS over IP is not supported.
- MLX5_L4_RSS_TYPES has never been used.
- MLX5_ETHER_TYPE_FROM_HEADER was used in the first integrity item check.
- ETH_TYPE_IPV4/V6_VXLAN were never used in HWS.
- PCI_DRV_FLAGS became unused when migrating to bus-agnostic probing.
- ERRNO_SAFE was used in the old logging macros.

Fixes: 9bf26e1 ("ethdev: move egress metadata to dynamic field")
Fixes: cfee947 ("net/mlx5: fix link status to use wait to complete")
Fixes: f3020a3 ("net/mlx5: optimize hash list table allocate on demand")
Fixes: 4ae8825 ("net/mlx5: use indexed pool as id generator")
Fixes: 994829e ("net/mlx5: remove single counter container")
Fixes: dc7c5e0 ("net/mlx5: fix flow workspace destruction")
Fixes: 645f240 ("net/mlx5: remove unsupported flow meter action in HWS")
Fixes: 14ad99d ("net/mlx5: remove unsupported flow item MPLS over IP")
Fixes: ae67e3c ("net/mlx5: support RSS expansion in non-template HWS setup")
Fixes: 23b0a8b ("net/mlx5: fix integrity item validation and translation")
Fixes: c55c2bf ("net/mlx5/hws: add definer layer")
Fixes: a7f3498 ("net/mlx5: migrate to bus-agnostic common interface")
Fixes: a170a30 ("net/mlx5: use dynamic logging")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: 0-day Robot <robot@bytheb.org>
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @ovsrobot, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Walkthrough

This pull request removes multiple unused macro definitions across MLX5 driver files spanning common, network, crypto, regex, and vdpa subsystems. No new functionality is introduced; the changes consist entirely of macro deletions including flow table constants, timeout values, checksum offload capabilities, and various configuration flags.

Changes

Cohort / File(s) Summary
Common MLX5 Driver Macros
drivers/common/mlx5/linux/mlx5_nl.c, drivers/common/mlx5/mlx5_common.h, drivers/common/mlx5/windows/mlx5_win_defs.h
Removed buffer size constant (MLX5_NL_BUF_SIZE), probe re-attempt flag (MLX5_DRV_PROBE_AGAIN), flow table type definition (MLX5DV_FLOW_TABLE_TYPE_RDMA_RX), and raw packet type macro (IB_QPT_RAW_PACKET)
Net MLX5 Core Macros
drivers/net/mlx5/mlx5.c, drivers/net/mlx5/mlx5.h, drivers/net/mlx5/mlx5_defs.h
Removed ID pool sizing constants (MLX5_FLOW_MIN_ID_POOL_SIZE, MLX5_ID_GENERATION_ARRAY_FACTOR), counter batching helper (IS_BATCH_CNT), HWS policy table level (MLX5_FLOW_TABLE_HWS_POLICY), alarm timeout, and SFT hash table size macros
Net MLX5 Flow/RX/TX Macros
drivers/net/mlx5/mlx5_flow.h, drivers/net/mlx5/mlx5_rxtx_vec.h
Removed RSS queue default (MLX5_RSSQ_DEFAULT_NUM), MPLS protocol definition, L4 RSS types mask (MLX5_L4_RSS_TYPES), Ethernet type header extraction helper (MLX5_ETHER_TYPE_FROM_HEADER), and TX checksum offload capability mask (MLX5_VEC_TX_CKSUM_OFFLOAD_CAP)
Net MLX5 HWS/Utils/Platform Macros
drivers/net/mlx5/hws/mlx5dr_definer.c, drivers/net/mlx5/mlx5_utils.h, drivers/net/mlx5/windows/mlx5_os.h
Removed VXLAN Ethernet type constants (ETH_TYPE_IPV4_VXLAN, ETH_TYPE_IPV6_VXLAN), errno safety wrapper (ERRNO_SAFE), and Windows PCI driver flags macro (PCI_DRV_FLAGS)
Crypto MLX5 Macros
drivers/crypto/mlx5/mlx5_crypto.c
Removed logging name (MLX5_CRYPTO_LOG_NAME) and maximum segments constant (MLX5_CRYPTO_MAX_SEGS)
Regex MLX5 Macros
drivers/regex/mlx5/mlx5_fastpath.c, drivers/regex/mlx5/mlx5_rxp.c, drivers/regex/mlx5/mlx5_rxp.h
Removed WQE control offset, ROF line length, and 14 RXP-related constants including CSR entries, control type definitions, timeout values, engine counts, and memory management flags
VDPA MLX5 Macros
drivers/vdpa/mlx5/mlx5_vdpa.h
Removed default timer delay constant (MLX5_VDPA_DEFAULT_TIMER_DELAY_US)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Primary concern: Verify that no active code paths reference the removed macros, particularly the public definitions like MLX5_DRV_PROBE_AGAIN and the 14 regex RXP macros in mlx5_rxp.h
  • Cross-subsystem impact: Changes span five driver subsystems (common, net, crypto, regex, vdpa); verify each removal independently
  • High-risk removal: MLX5_DRV_PROBE_AGAIN in mlx5_common.h flagged as public API—confirm no external callers depend on this constant

Poem

🐰 Macros deprecated, constants cast away,
Unused definitions fade to gray,
Cleaner headers bloom today,
Constants hopping far away,
Less to define, less to say!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "[PWCI] mlx5: remove useless constants" is directly aligned with the main changes in the changeset. The raw summary shows that the PR removes numerous macro and constant definitions across multiple MLX5 driver files—from nlx5_nl.c, mlx5_common.h, mlx5_win_defs.h, mlx5_crypto.c, mlx5dr_definer.c, mlx5.c, mlx5.h, mlx5_defs.h, mlx5_flow.h, mlx5_rxtx_vec.h, mlx5_utils.h, mlx5_os.h, mlx5_regex_fastpath.c, mlx5_rxp.c, mlx5_rxp.h, and mlx5_vdpa.h. The title accurately and clearly summarizes this primary action without being vague or overly broad. The [PWCI] prefix appears to be a process indicator common in automated submissions and does not detract from the clarity of the core message.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch series_36543

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c4861d and abe2f0b.

📒 Files selected for processing (16)
  • drivers/common/mlx5/linux/mlx5_nl.c (0 hunks)
  • drivers/common/mlx5/mlx5_common.h (0 hunks)
  • drivers/common/mlx5/windows/mlx5_win_defs.h (0 hunks)
  • drivers/crypto/mlx5/mlx5_crypto.c (0 hunks)
  • drivers/net/mlx5/hws/mlx5dr_definer.c (0 hunks)
  • drivers/net/mlx5/mlx5.c (0 hunks)
  • drivers/net/mlx5/mlx5.h (0 hunks)
  • drivers/net/mlx5/mlx5_defs.h (0 hunks)
  • drivers/net/mlx5/mlx5_flow.h (0 hunks)
  • drivers/net/mlx5/mlx5_rxtx_vec.h (0 hunks)
  • drivers/net/mlx5/mlx5_utils.h (0 hunks)
  • drivers/net/mlx5/windows/mlx5_os.h (0 hunks)
  • drivers/regex/mlx5/mlx5_regex_fastpath.c (0 hunks)
  • drivers/regex/mlx5/mlx5_rxp.c (0 hunks)
  • drivers/regex/mlx5/mlx5_rxp.h (0 hunks)
  • drivers/vdpa/mlx5/mlx5_vdpa.h (0 hunks)
💤 Files with no reviewable changes (16)
  • drivers/regex/mlx5/mlx5_rxp.c
  • drivers/vdpa/mlx5/mlx5_vdpa.h
  • drivers/common/mlx5/mlx5_common.h
  • drivers/regex/mlx5/mlx5_regex_fastpath.c
  • drivers/crypto/mlx5/mlx5_crypto.c
  • drivers/net/mlx5/windows/mlx5_os.h
  • drivers/common/mlx5/linux/mlx5_nl.c
  • drivers/net/mlx5/mlx5_flow.h
  • drivers/net/mlx5/mlx5_defs.h
  • drivers/net/mlx5/mlx5_utils.h
  • drivers/net/mlx5/mlx5_rxtx_vec.h
  • drivers/net/mlx5/hws/mlx5dr_definer.c
  • drivers/net/mlx5/mlx5.h
  • drivers/regex/mlx5/mlx5_rxp.h
  • drivers/net/mlx5/mlx5.c
  • drivers/common/mlx5/windows/mlx5_win_defs.h

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants