[Bug 269133] bnxt(4): BCM57416 - HWRM_CFA_L2_SET_RX_MASK command returned RESOURCE_ALLOC_ERROR error
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 269133] bnxt(4): BCM57414 / BCM57416"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Nov 2023 18:08:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269133 --- Comment #50 from Chandrakanth Patil <chandrakanth.patil@broadcom.com> --- (In reply to Kevin Bowling from comment #49) Hi Kevin, Warner, An issue is with the below code execution that leads to VLAN failure. this problem is due to the driver is attempting to allocate an already allocated VLAN tag in the bnxt_hwrm_l2_filter_alloc function. Specifically, the code snippet below checks for a previously allocated filter ID: if (*filter_id != -1) { device_printf(softc->dev, "Attempt to re-allocate l2 ctx " "filter (fid: 0x%jx)\n", (uintmax_t)*filter_id); return EDOOFUS; } Here's the sequence of events: 1. When the first VLAN is created (vlan1), the correct filter ID (other than -1) is fetched from the firmware. 2. During the creation of the second VLAN (vlan2), the driver attempts to allocate vlan1. The target_id of vlan1 is a valid value, causing the above if condition to be true. Consequently, it returns after throwing the error "Attempt to re-allocate l2 ctx" without allocating vlan2. To resolve this issue, I suggest the following fix: Assign -1 to the target_id of all VLAN tags in the list in the bnxt_init function. Here's the relevant code snippet: if (!BNXT_CHIP_P5(softc)) { rc = bnxt_hwrm_func_reset(softc); if (rc) return; SLIST_FOREACH (tag, &vnic->vlan_tags, next) { tag->filter_id = -1; } } else if (softc->is_dev_init) { bnxt_stop(ctx); } I have applied this fix on BCM57416, and it has resolved the issue for me. I had provided this patch earlier(debug_patch_01), and I am surprised it did not fix the problem earlier. Could you please confirm if this patch resolves the issue? -- You are receiving this mail because: You are the assignee for the bug.