From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 935FF946C for ; Wed, 31 Dec 2025 12:00:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767182441; cv=none; b=HdDBAteRVpDWNDOdFvYOBe2SCzARwahR0tgeibsV0vbn1yJboHRJPNviQAwIRDRb6vQn7jBNduH8CJW/GF1t06+I0nEvo8EsmjC0FFW1Qn/j4OPSbbTSmkjJRl6jyUloHFenpRF5tGkiYtVHkMThynTddz2mHJwADq+hXUIx+dU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767182441; c=relaxed/simple; bh=PsvHDaer44hhff3EAfiWWTw5gupPorWFshcTKMIFTP0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IelvnybYSwRIdB7CusuLmtwpI6CmOnLIvNnxh1HW05SsLcq7fz0c7Lz2AT3R8Rj3TSrHbNu17eSR8VX3MPqJ9EMzHOU+X0Wzx1J/d785N6A4Gf9RJzzUPYEH0MSqCyUAZ8j+FcqVnI27o/nrp3iTClXFnAijb3k1wMeBapx4KHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=wK6D9muq; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wK6D9muq" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1767182435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DtCdQuYkgOQVT9jCgzpaKlDsBG2MB3Ezb3H9D/CUgpc=; b=wK6D9muqP+ld2zl1UD8Zfq9vp08wEKcI7icXLQDYqzShApw60/csuWOJIYoPv1UaSre9gk 3ipBrdqoA+YC0Ku04C9w8jP0z/P3lzpc6v7auRR9PYd42iKPaYP81RWKDo8mrWbqbb7fpY dsaAb1oENGmF9eEE//6QY6c8R29oOcY= Date: Wed, 31 Dec 2025 11:59:55 +0000 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net v2] bnxt_en: Fix potential data corruption with HW GRO/LRO To: Michael Chan , davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch, pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com, leon@kernel.org, Srijit Bose , Ray Jui References: <20251231083625.3911652-1-michael.chan@broadcom.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20251231083625.3911652-1-michael.chan@broadcom.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 31/12/2025 08:36, Michael Chan wrote: > From: Srijit Bose > > Fix the max number of bits passed to find_first_zero_bit() in > bnxt_alloc_agg_idx(). We were incorrectly passing the number of > long words. find_first_zero_bit() may fail to find a zero bit and > cause a wrong ID to be used. If the wrong ID is already in use, this > can cause data corruption. Sometimes an error like this can also be > seen: > > bnxt_en 0000:83:00.0 enp131s0np0: TPA end agg_buf 2 != expected agg_bufs 1 > > Fix it by passing the correct number of bits MAX_TPA_P5. Use > DECLARE_BITMAP() to more cleanly define the bitmap. Add a sanity > check to warn if a bit cannot be found and reset the ring [MChan]. > > Fixes: ec4d8e7cf024 ("bnxt_en: Add TPA ID mapping logic for 57500 chips.") > Reviewed-by: Ray Jui > Signed-off-by: Srijit Bose > Signed-off-by: Michael Chan Reviewed-by: Vadim Fedorenko