From nobody Wed Nov 1 18:08:31 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SLFPC57zvz4ymkW for ; Wed, 1 Nov 2023 18:08:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SLFPC3Lwtz3QB2 for ; Wed, 1 Nov 2023 18:08:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698862111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QR314hcLJiZKhmzqUXNDJlfQxX2pzDhRoWaPhbg59+c=; b=Xm2zIwkWUeOaDg6OQfHnsEm8mNLEhc/ZDdtDJN5VIShZd0BeYE4vu7x2k80w4eXJpEQK9Z C5byOFNcMiO2qa2x+5jSTFG2F18Yg2R94Bnq8muNHsMEA4qh17X9UW+49kDP53E/J3awnd +5HSMuNPrbPZaRIVozFRg6W9vCjcFY8eBzsaGCwRspUAyQJyYGWnHlbpHsSEv+0cjrsFxt LhxdP1j8+lcO/YOex+NBcCjvb/C9qytWSuZ4ZsYcUs/7DC/mY61lUjObghADDMZ8cFoznJ fySfmTUPICz1LP+oYiuQlLnTKMPqCkjHscEVW4CZd0mdJICocUCIfXDrKOLL5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698862111; a=rsa-sha256; cv=none; b=sBx+N4YcjY4FaIJaNm5Ln9tcSU4rluLVG5up1xbVsly3P7idFyaJDvokJjeXJrc6bmUvbZ gF98V/cSDZ8KEoQ/aBYJyPY3aqReFtRy/xZsxlziG4Q1WSwWwBCC33JNRKmo5vqDoGYNQv TRdPWTyH5JXCVMmm37QMyXNN47LIqccVLl8kxjMfKg0tzT6PPsRPSTTGtbOkzGKUYjDjLQ FDVnbgQIJ/CnbkMib2s84z3gbhXujKXgv7//PkpOvgSOnclB3S2ucY6gZ0X1Nb/o2VcYPM FsFDtQ8LoPvopM+07Pj6tpv33ak3aPWY9zRfb9K/NaAUV3WXNDn1u+qmkeMW6A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SLFPC2LmLzwC4 for ; Wed, 1 Nov 2023 18:08:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3A1I8V0m000518 for ; Wed, 1 Nov 2023 18:08:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A1I8Vjo000517 for bugs@FreeBSD.org; Wed, 1 Nov 2023 18:08:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269133] bnxt(4): BCM57416 - HWRM_CFA_L2_SET_RX_MASK command returned RESOURCE_ALLOC_ERROR error Date: Wed, 01 Nov 2023 18:08:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: chandrakanth.patil@broadcom.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269133 --- Comment #50 from Chandrakanth Patil -= -- (In reply to Kevin Bowling from comment #49) Hi Kevin, Warner,=20 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 !=3D -1) { device_printf(softc->dev, "Attempt to re-allocate l2 ctx " "filter (fid: 0x%jx)\n", (uintmax_t)*filter_id); return EDOOFUS; }=20=20=20=20 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. Consequentl= y, 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 =3D bnxt_hwrm_func_reset(softc); if (rc)=20 return; SLIST_FOREACH (tag, &vnic->vlan_tags, next) {=20=20=20=20 tag->filter_id =3D -1; }=20=20=20=20 } else if (softc->is_dev_init) { bnxt_stop(ctx); }=20=20=20=20 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? --=20 You are receiving this mail because: You are the assignee for the bug.=