From nobody Fri Jun 12 15:59:58 2026 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBC09EEB3 for ; Thu, 14 May 2026 00:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.36.163.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778716985; cv=none; b=o/rpwMS/to85W09B3VDiEp8TkkLjHOtrAPS9BO8Y6IWXwiHFLMUMfagSU19zQ6T0tj2sHyL036riRGYg/43VrkSPb12RF7zUbgWhz3qWJs4YNoEXkcAaNPthz0Ujd23Z329XbR2WWAYTyjT9Yz/Rqt/Ve82K1mjKZn70tjWQSV8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778716985; c=relaxed/simple; bh=wfBUAvKzMoZF7tRtDmDy0471aBexbL8hFFmJ8G5qYXc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gE4MREWepiAITNuc6wjnevuSS1u7skWdV+rkCD81weFDpcyH9Usa3n3FRPyWOFkkw+ruRqYfOLug4hG5rt1+crJDZffj+eyEGu9F4+yqaQUkp1bJT2yCji2uJMbuau6VnmBxsUn8dY83tlf0cUfmRKqtVkRSGXctrYCOoJflTQQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz; spf=pass smtp.mailfrom=alliedtelesis.co.nz; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b=uBLw5Gt+; arc=none smtp.client-ip=202.36.163.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="uBLw5Gt+" Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (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 gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 83C5E2C0613; Thu, 14 May 2026 12:03:00 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1778716980; bh=XSoiNOSqRK5xwY5RdOy67y6sVw9Et2wfcOv6CmJq/6k=; h=From:To:Cc:Subject:Date:From; b=uBLw5Gt+rqvJbJrm8kMCNXWyIZAXmwZYV+VqHTpFv46P6HtA55pQkJTFfa45piVnF QWKyUp+6L8wmDStMY/s0V3mzsfCoJ0dvYveuRn3NgLH43j7LGy5nX0QnP/nKw5lKMm 95CE4vJZH+zUdbH8QV5aGfinc/BO3h8JeWf/Pq5c/ot14AVomSworc4g574tBuje5d DMQEakplO3WZXfa0FLFEDqzDZmnPwniyVfDRXu8oJ0Qrjum6ViaqbT+vcwG33d98EP TnTBEJsrbjhe+Ofuuu4Pgud+GUVnUHziQ+xzIxVOrqASm45m7O219tJCDnVAWSxWnb N/uYQreCt4AKw== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Thu, 14 May 2026 12:03:00 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.12]) by pat.atlnz.lc (Postfix) with ESMTP id 4F7FF13ED2A; Thu, 14 May 2026 12:03:00 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 4D97A90022E; Thu, 14 May 2026 12:03:00 +1200 (NZST) From: Chris Packham To: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, aleksander.lobakin@intel.com Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Blair Steven , Carl Smith , Chris Packham Subject: [PATCH] i40e: Avoid repeating RX filter warning Date: Thu, 14 May 2026 12:02:58 +1200 Message-ID: <20260514000258.1704618-1-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.4 cv=Es1xrjcA c=1 sm=1 tr=0 ts=6a051134 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=NGcC8JguVDcA:10 a=ngL9nt1HdWMmO1MQNKYA:9 a=3ZKOabzyN94A:10 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Content-Type: text/plain; charset="utf-8" When the i40e runs out of space for RX filters the driver switches to promiscuous mode and warns that it has done so. In scenarios with a large number of these filters this can generate a lot of warnings. For example: $ dmesg -c > /dev/null $ ip link add dev br0 type bridge vlan_filtering 1 vlan_default_pvid 1 $ ip link set dev eth7 master br0 $ bridge vlan add vid 1 dev eth7 pvid untagged self $ bridge vlan add vid 2-4094 dev eth7 tagged $ dmesg [ 25.601705] i40e 0000:01:00.1: Error LIBIE_AQ_RC_ENOSPC, forcing overf= low promiscuous on PF [ 25.601833] i40e 0000:01:00.1: Error LIBIE_AQ_RC_ENOSPC, forcing overf= low promiscuous on PF [ 25.601961] i40e 0000:01:00.1: Error LIBIE_AQ_RC_ENOSPC, forcing overf= low promiscuous on PF [ 25.602088] i40e 0000:01:00.1: Error LIBIE_AQ_RC_ENOSPC, forcing overf= low promiscuous on PF [ 25.602216] i40e 0000:01:00.1: Error LIBIE_AQ_RC_ENOSPC, forcing overf= low promiscuous on PF [ 25.602344] i40e 0000:01:00.1: Error LIBIE_AQ_RC_ENOSPC, forcing overf= low promiscuous on PF ... Use test_and_set_bit() so that the warning is only issued when the driver enables promiscuous mode and not on the addition of subsequent RX filters. Signed-off-by: Chris Packham --- drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethe= rnet/intel/i40e/i40e_main.c index 926d001b2150..8741990b5a5e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -2408,10 +2408,11 @@ void i40e_aqc_add_filters(struct i40e_vsi *vsi, con= st char *vsi_name, =20 if (fcnt !=3D num_add) { if (vsi->type =3D=3D I40E_VSI_MAIN) { - set_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state); - dev_warn(&vsi->back->pdev->dev, - "Error %s adding RX filters on %s, promiscuous mode forced on\n", - libie_aq_str(aq_status), vsi_name); + if (!test_and_set_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state)) { + dev_warn(&vsi->back->pdev->dev, + "Error %s adding RX filters on %s, promiscuous mode forced on\n", + libie_aq_str(aq_status), vsi_name); + } } else if (vsi->type =3D=3D I40E_VSI_SRIOV || vsi->type =3D=3D I40E_VSI_VMDQ1 || vsi->type =3D=3D I40E_VSI_VMDQ2) { @@ -2461,10 +2462,11 @@ i40e_aqc_broadcast_filter(struct i40e_vsi *vsi, con= st char *vsi_name, } =20 if (aq_ret) { - set_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state); - dev_warn(&vsi->back->pdev->dev, - "Error %s, forcing overflow promiscuous on %s\n", - libie_aq_str(hw->aq.asq_last_status), vsi_name); + if (!test_and_set_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state)) { + dev_warn(&vsi->back->pdev->dev, + "Error %s, forcing overflow promiscuous on %s\n", + libie_aq_str(hw->aq.asq_last_status), vsi_name); + } } =20 return aq_ret; --=20 2.54.0