-
Notifications
You must be signed in to change notification settings - Fork 4
[PWCI] "net/bnxt: fix a segmentation fault" #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Starting with NVIDIA ConnectX-9, the future devices will support only hardware steering (HWS) flow engine. The software steering options (legacy Verbs and Direct Verbs) have lower performances, and won't be available for new devices. Both flow APIs (sync and async template) will still be supported with the hardware steering flow engine. Fixes: 1b55eeb ("common/mlx5: add ConnectX-9 SuperNIC") Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The tool ripgrep allows to find files not ending with a line break: rg -Ul '[^\n]\z' The files with a trailing blank lines are shown with this command: rg -Ul '\n\n\z' Files are fixed to end with a single line break. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Start a new release cycle with empty release notes. Bump version and ABI minor. Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Within GitHub actions, with MSVC 19.44.35219, the following error can be reported: ...\rte_rcu_qsbr.h(566): error C2220: the following warning is treated as an error ...\rte_rcu_qsbr.h(566): warning C4319: '~': zero extending 'unsigned long' to 'uint64_t' of greater size To fix this, replace the "1UL" with RTE_BIT64 to force a 64-bit value on all platforms. Fixes: 64994b5 ("rcu: add RCU library supporting QSBR mechanism") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Disable warning about "zero extending 'unsigned long' to 'u64' of greater size" in base code builds. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Fix a segmentation fault root-caused to the following 1. bnxt testpmd queries the THOR2 capabilities using an HWRM. 2. Another HWRM is made that overwrites the capabilities context, which results in the MPC context not being created. 3. Initializing TruFlow (which depends on the MPC context), results in a SEGV. The fix moves the 2nd HWRM after the capabilities have been consumed. Fixes: 80317ff ("net/bnxt/tf_core: support Thor2") Signed-off-by: Manish Kurup <manish.kurup@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMoves the bnxt PTP capability handling to the end of the HWRM func_qcaps routine to avoid a crash when issuing a follow‑up HWRM command, refreshes CI to track the v25.11 DPDK reference (including ABI checks), fixes a QSBR bitmask operation, adjusts an MSVC warning suppression for ICE, and performs assorted formatting/doc/release‑note updates and version bumps. Sequence diagram for updated bnxt HWRM func_qcaps PTP handlingsequenceDiagram
actor App
participant bnxt_driver
participant __bnxt_hwrm_func_qcaps
participant HWRM_firmware
participant bnxt_hwrm_ptp_qcfg
App->>bnxt_driver: device_init
bnxt_driver->>__bnxt_hwrm_func_qcaps: query_function_capabilities(bp)
__bnxt_hwrm_func_qcaps->>HWRM_firmware: send HWRM_FUNC_QCAPS
HWRM_firmware-->>__bnxt_hwrm_func_qcaps: capabilities_response(flags, flags_ext, flags_ext2, flags_ext3)
note over __bnxt_hwrm_func_qcaps: Process all capability flags
__bnxt_hwrm_func_qcaps->>__bnxt_hwrm_func_qcaps: update_pf_total_vnics
__bnxt_hwrm_func_qcaps->>__bnxt_hwrm_func_qcaps: update_ext_stats_support
__bnxt_hwrm_func_qcaps->>__bnxt_hwrm_func_qcaps: update_all_other_fw_caps
note over __bnxt_hwrm_func_qcaps: At end, issue follow up PTP query if supported
alt PTP_supported_and_P5_or_PF
__bnxt_hwrm_func_qcaps->>__bnxt_hwrm_func_qcaps: set_flag_PTP_SUPPORTED
__bnxt_hwrm_func_qcaps->>HWRM_firmware: HWRM_UNLOCK
__bnxt_hwrm_func_qcaps->>bnxt_hwrm_ptp_qcfg: bnxt_hwrm_ptp_qcfg(bp)
bnxt_hwrm_ptp_qcfg->>HWRM_firmware: send HWRM_PTP_QCFG
HWRM_firmware-->>bnxt_hwrm_ptp_qcfg: ptp_config_response
end
__bnxt_hwrm_func_qcaps->>HWRM_firmware: HWRM_UNLOCK (final)
__bnxt_hwrm_func_qcaps-->>bnxt_driver: return status
bnxt_driver-->>App: init_complete
Flow diagram for CI build workflow changes (v25_11 reference and ABI checks)flowchart TD
A[Start CI workflow] --> B[Set env REF_GIT_BRANCH = main]
B --> C[Set env REF_GIT_REPO = https://github.com/DPDK/dpdk]
C --> D[Set env REF_GIT_TAG = v25.11]
D --> E[Checkout reference DPDK at v25.11]
E --> F[Job matrix: ubuntu-22.04 + gcc]
E --> G[Other OS/compiler combinations]
F --> H[Run checks: abi + debug + doc + examples + tests]
G --> I["Run configured checks (asan, stdatomic, doc, tests, etc.)"]
H --> J[Aggregate results]
I --> J
J --> K[Report CI status]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughThis pull request performs a version bump to 26.03 (from 25.11/26.0), updates build configuration to include ABI testing, normalizes end-of-file newlines across numerous test data and driver files, refactors documentation for mlx5 and other NICs, removes a public function declaration, and refactors bit manipulation and lock handling in bnxt and RCU code. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and found some issues that need to be addressed.
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `drivers/net/bnxt/bnxt_hwrm.c:1201-1203` </location>
<code_context>
if (BNXT_PF(bp))
bp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);
- if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
- if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) {
- bp->flags |= BNXT_FLAG_PTP_SUPPORTED;
- PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED");
- HWRM_UNLOCK();
- bnxt_hwrm_ptp_qcfg(bp);
- }
- }
</code_context>
<issue_to_address>
**issue (bug_risk):** Potential double-unlock of HWRM lock in PTP-supported path.
Here `HWRM_UNLOCK()` is called, then `bnxt_hwrm_ptp_qcfg(bp)` executes, and control later reaches the `unlock:` label where `HWRM_UNLOCK()` is called again. Unless `HWRM_UNLOCK()` is explicitly safe to call without a matching lock, this is a double-unlock risk. Consider either jumping to `unlock:` after `bnxt_hwrm_ptp_qcfg(bp)` or removing this explicit unlock and letting the common `unlock:` path handle it once.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
doc/guides/nics/mlx5.rst (1)
691-696: Clarify defaultdv_flow_enbehavior for ConnectX-9 devices.The updated text correctly specifies device availability for modes 0 and 1, but the interaction with line 701's default behavior ("configured by default to 1") could be clearer for ConnectX-9 and newer devices that only support mode 2. Consider adding a note or cross-reference to clarify that ConnectX-9+ defaults to mode 2 (HWS) instead of mode 1.
Consider updating line 701 or adding a clarifying note such as:
"For devices ConnectX-9 and later, the default is 2 (HWS). For older devices, it defaults to 1 (DV flow steering) if supported, otherwise 0 (legacy Verbs)."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (17)
doc/guides/contributing/img/abi_stability_policy.svgis excluded by!**/*.svgdoc/guides/contributing/img/what_is_an_abi.svgis excluded by!**/*.svgdoc/guides/howto/img/flow_bifurcation_overview.svgis excluded by!**/*.svgdoc/guides/howto/img/virtio_user_for_container_networking.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/bond-mode-0.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/bond-mode-1.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/bond-mode-2.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/bond-mode-3.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/bond-mode-4.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/bond-mode-5.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/lcore_var_mem_layout.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/pdcp_functional_overview.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/predictable_snat_1.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/predictable_snat_2.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/rss_queue_assign.svgis excluded by!**/*.svgdoc/guides/prog_guide/img/static_array_mem_layout.svgis excluded by!**/*.svgdoc/guides/sample_app_ug/img/overlay_networking.svgis excluded by!**/*.svg
📒 Files selected for processing (56)
.github/workflows/build.yml(2 hunks)ABI_VERSION(1 hunks)VERSION(1 hunks)app/test-bbdev/test_vectors/bbdev_null.data(1 hunks)app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data(1 hunks)app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data(1 hunks)app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data(1 hunks)app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data(1 hunks)app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e18448_crc24a.data(1 hunks)app/test-bbdev/test_vectors/turbo_enc_c3_k4800_r2_e14412_crc24b.data(1 hunks)doc/guides/nics/cxgbe.rst(0 hunks)doc/guides/nics/ipn3ke.rst(0 hunks)doc/guides/nics/mlx5.rst(2 hunks)doc/guides/rel_notes/index.rst(1 hunks)doc/guides/rel_notes/release_26_03.rst(1 hunks)drivers/event/dlb2/dlb2_iface.c(0 hunks)drivers/net/bnxt/bnxt_hwrm.c(1 hunks)drivers/net/bnxt/tf_core/tf_em_common.c(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_act.c(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_class.c(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_defs.h(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c(0 hunks)drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_class.c(0 hunks)drivers/net/gve/base/gve_adminq.c(0 hunks)drivers/net/gve/gve_rss.c(0 hunks)drivers/net/gve/gve_rss.h(0 hunks)drivers/net/hinic/base/hinic_pmd_mbox.c(0 hunks)drivers/net/hinic/base/hinic_pmd_niccfg.c(0 hunks)drivers/net/hinic/base/meson.build(0 hunks)drivers/net/intel/e1000/base/e1000_82575.c(0 hunks)drivers/net/intel/e1000/base/e1000_mbx.c(0 hunks)drivers/net/intel/e1000/base/e1000_vf.c(0 hunks)drivers/net/intel/i40e/base/i40e_adminq.c(0 hunks)drivers/net/intel/ice/base/ice_flex_pipe.c(0 hunks)drivers/net/intel/ice/base/ice_hw_autogen.h(0 hunks)drivers/net/intel/ice/base/meson.build(1 hunks)drivers/net/intel/ixgbe/base/ixgbe_dcb_82599.c(0 hunks)drivers/net/intel/ixgbe/base/ixgbe_x540.h(0 hunks)drivers/net/mlx5/hws/mlx5dr_buddy.c(0 hunks)drivers/net/nfp/nfp_ipsec.c(0 hunks)drivers/net/nfp/nfpcore/nfp_elf.c(0 hunks)drivers/net/ngbe/base/ngbe_dummy.h(0 hunks)drivers/net/ngbe/base/ngbe_phy.c(0 hunks)drivers/net/octeontx/base/octeontx_bgx.h(0 hunks)drivers/net/txgbe/base/txgbe_dcb.c(0 hunks)drivers/net/txgbe/base/txgbe_dcb_hw.c(0 hunks)drivers/net/txgbe/base/txgbe_dummy.h(0 hunks)drivers/net/txgbe/base/txgbe_eeprom.c(0 hunks)drivers/net/virtio/virtio_cvq.c(0 hunks)drivers/raw/cnxk_rvu_lf/cnxk_rvu_lf_selftest.c(0 hunks)drivers/vdpa/mlx5/mlx5_vdpa_event.c(0 hunks)dts/configurations/tests_config.example.yaml(1 hunks)lib/rcu/rte_rcu_qsbr.h(1 hunks)license/Linux-syscall-note(0 hunks)
💤 Files with no reviewable changes (39)
- drivers/net/txgbe/base/txgbe_dcb_hw.c
- drivers/net/nfp/nfpcore/nfp_elf.c
- drivers/net/intel/e1000/base/e1000_mbx.c
- drivers/net/intel/e1000/base/e1000_vf.c
- drivers/net/ngbe/base/ngbe_dummy.h
- drivers/net/intel/i40e/base/i40e_adminq.c
- drivers/net/intel/ixgbe/base/ixgbe_dcb_82599.c
- drivers/net/hinic/base/hinic_pmd_mbox.c
- drivers/net/intel/ice/base/ice_flex_pipe.c
- doc/guides/nics/ipn3ke.rst
- drivers/net/octeontx/base/octeontx_bgx.h
- drivers/net/intel/e1000/base/e1000_82575.c
- drivers/net/gve/gve_rss.h
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_class.c
- drivers/net/mlx5/hws/mlx5dr_buddy.c
- drivers/net/txgbe/base/txgbe_dcb.c
- drivers/net/hinic/base/meson.build
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_defs.h
- drivers/net/txgbe/base/txgbe_dummy.h
- drivers/raw/cnxk_rvu_lf/cnxk_rvu_lf_selftest.c
- doc/guides/nics/cxgbe.rst
- drivers/net/ngbe/base/ngbe_phy.c
- drivers/net/virtio/virtio_cvq.c
- drivers/event/dlb2/dlb2_iface.c
- drivers/net/nfp/nfp_ipsec.c
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
- drivers/net/gve/gve_rss.c
- drivers/net/hinic/base/hinic_pmd_niccfg.c
- drivers/net/txgbe/base/txgbe_eeprom.c
- drivers/net/gve/base/gve_adminq.c
- license/Linux-syscall-note
- drivers/net/intel/ixgbe/base/ixgbe_x540.h
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_act.c
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
- drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_class.c
- drivers/net/intel/ice/base/ice_hw_autogen.h
- drivers/vdpa/mlx5/mlx5_vdpa_event.c
- drivers/net/bnxt/tf_core/tf_em_common.c
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Sourcery review
🔇 Additional comments (16)
app/test-bbdev/test_vectors/bbdev_null.data (1)
4-5: EOL normalization approved.This change adds a trailing newline to normalize end-of-file formatting, consistent with the broader effort across the test data files in this directory. No functional changes.
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data (1)
640-640: Formatting normalization looks good.This purely cosmetic end-of-file newline addition is part of the broader test vector normalization across the PR and has no functional impact on the test data or execution.
app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data (1)
677-677: Formatting-only change; approved.End-of-file newline normalization with no impact on test vector semantics or functionality.
dts/configurations/tests_config.example.yaml (1)
17-17: Trailing newline addition—approved.Adding a trailing newline to the example configuration file aligns with POSIX standards and the broader EOF normalization cleanup across the PR. No functional changes.
app/test-bbdev/test_vectors/turbo_enc_c3_k4800_r2_e14412_crc24b.data (1)
153-153: End-of-file newline normalization looks good.This formatting-only change aligns with the PR's objective to normalize trailing newlines across test data files, and the test vector content remains semantically intact.
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data (1)
1222-1222: EOF newline normalization is fine
expected_status = OKis unchanged semantically; adding a trailing newline at EOF simply aligns this data file with standard formatting and has no functional impact on the tests.app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data (1)
639-640: End-of-file formatting normalized.The trailing newline normalization at the end of the file is consistent with project conventions and aligns with similar changes across the test vector data files in this PR. No functional impact.
app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e18448_crc24a.data (1)
159-159: No changes to review.This is a formatting-only change (EOF newline normalization) with no impact on test data or semantics.
doc/guides/nics/mlx5.rst (1)
1343-1344: Well-placed clarifications on HWS capabilities and device support.The additions clearly state that (a) HWS is required for async template API, and (b) ConnectX-9+ exclusively uses HWS. These clarifications are accurate, well-positioned, and consistent with earlier sections (lines 1100-1101, 134). They help readers quickly understand the architectural constraints for newer devices.
ABI_VERSION (1)
1-1: ABI version bump looks consistent with new release.Single-line metadata update only; no issues.
VERSION (1)
1-1: Version string update is straightforward and consistent.Pure metadata change to 26.03.0-rc0; no concerns.
.github/workflows/build.yml (1)
15-15: ABI reference tag and matrix ABI checks look wired correctly.Using
REF_GIT_TAG: v25.11for ABI cache keys and addingabito the gcc checks string cleanly enables ABI checks for that job; env wiring viacontains(matrix.config.checks, 'abi')will work as intended. Just confirm thatv25.11is the desired reference tag for 26.03 ABI comparison.Also applies to: 99-99
drivers/net/intel/ice/base/meson.build (1)
34-39: Additional MSVC warning suppression is reasonable.Adding
/wd4319alongside existing warning disables is consistent and limited to MSVC builds; no functional impact.lib/rcu/rte_rcu_qsbr.h (1)
563-567: Switch toRTE_BIT64improves consistency of 64-bit bitmap handling.Replacing the manual
1UL << jmask withRTE_BIT64(j)keeps the same logic while matching the standard 64‑bit bit macro used elsewhere and avoiding potential type-width surprises on platforms whereunsigned longis not 64-bit.doc/guides/rel_notes/index.rst (1)
11-11: Release 26.03 entry is correctly added to the toctree.Placement before 25.11 keeps release notes ordered from newest to oldest; looks good.
doc/guides/rel_notes/release_26_03.rst (1)
1-138: Release 26.03 notes template and ABI statement look correct.Document structure matches existing release note patterns, and the explicit line about no ABI break vs 25.11 is clear; just ensure this ABI note is revisited if any breaking ABI change is introduced before final 26.03.
| /* This block should be kept at the end of this function because it | ||
| * sends another hwrm msg. | ||
| */ | ||
| if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) { | ||
| if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) { | ||
| bp->flags |= BNXT_FLAG_PTP_SUPPORTED; | ||
| PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED"); | ||
| HWRM_UNLOCK(); | ||
| bnxt_hwrm_ptp_qcfg(bp); | ||
| } | ||
| } | ||
|
|
||
| unlock: | ||
| HWRM_UNLOCK(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Double-unlock of bp->hwrm_lock spinlock causes undefined behavior.
When PTP is supported and the chip is P5 or PF, the code:
- Unlocks at line 1264
- Calls
bnxt_hwrm_ptp_qcfg(bp)at line 1265 - Falls through to line 1270 which unlocks again
This double-unlock can cause segmentation faults, lock corruption, or data races.
Add a return statement after calling bnxt_hwrm_ptp_qcfg(bp) to prevent falling through to the duplicate unlock:
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) {
bp->flags |= BNXT_FLAG_PTP_SUPPORTED;
PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED");
HWRM_UNLOCK();
bnxt_hwrm_ptp_qcfg(bp);
+ return rc;
}
}
unlock:
HWRM_UNLOCK();📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /* This block should be kept at the end of this function because it | |
| * sends another hwrm msg. | |
| */ | |
| if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) { | |
| if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) { | |
| bp->flags |= BNXT_FLAG_PTP_SUPPORTED; | |
| PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED"); | |
| HWRM_UNLOCK(); | |
| bnxt_hwrm_ptp_qcfg(bp); | |
| } | |
| } | |
| unlock: | |
| HWRM_UNLOCK(); | |
| /* This block should be kept at the end of this function because it | |
| * sends another hwrm msg. | |
| */ | |
| if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) { | |
| if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) { | |
| bp->flags |= BNXT_FLAG_PTP_SUPPORTED; | |
| PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED"); | |
| HWRM_UNLOCK(); | |
| bnxt_hwrm_ptp_qcfg(bp); | |
| return rc; | |
| } | |
| } | |
| unlock: | |
| HWRM_UNLOCK(); |
🤖 Prompt for AI Agents
In drivers/net/bnxt/bnxt_hwrm.c around lines 1257 to 1270, the spinlock is
unlocked twice when PTP is supported because HWRM_UNLOCK() is called before
bnxt_hwrm_ptp_qcfg(bp) and the function then falls through to the unlock at the
end; to fix this, after calling bnxt_hwrm_ptp_qcfg(bp) add a return to exit the
function immediately (keeping the early HWRM_UNLOCK() and the PTP code block
order intact) so the final unlock at the function end is not executed a second
time.
NOTE: This is an auto submission for "net/bnxt: fix a segmentation fault".
See "http://patchwork.dpdk.org/project/dpdk/list/?series=36844" for details.
Summary by Sourcery
Fix bnxt driver segmentation fault related to PTP capability handling and align the tree with the 26.03 release baseline, including CI, build, and documentation updates.
Bug Fixes:
Build:
Documentation:
Tests:
Chores:
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.