Article View: linux.kernel.netdev
Article #1967Re: [PATCH net 2/2] net/mlx5: HWS, fix modify header pool creation race
From: Alexandre Cassen
Date: Sun, 11 Oct 2026 17:35
Date: Sun, 11 Oct 2026 17:35
15 lines
6422 bytes
6422 bytes
Thanks for the review Moshe, On 10/11/26 09:57, Moshe Shemesh wrote: > Please keep the lookup out of the lock and re-check under it only on a > miss, roughly: Agreed, your approach is best, I will update and resend a v2 around it. I was also considering a lockless variant where xa_alloc() picks the index, but 2 callers racing on a new pattern then both create a pool... the spare pool still allocates a full bulk of 64k entries in the host and device memory for a single rule. Your suggestion is better here... -- Alexandre
Technical Details
Message-ID:
<ec7e506e-2aaf-47ac-a5fa-3ad2c09b6bec@corp.free.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344550-linux-kernel-netdev=dewy.ruReferences:
<20261008204230.3222198-1-acassen@corp.free.fr> <20261008204230.3222198-3-acassen@corp.free.fr> <22e85761-ba52-47c1-92bf-b4dd331fc069@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344550-linux-kernel-netdev=dewy.ru From: acassen@corp.free.fr (Alexandre Cassen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 2/2] net/mlx5: HWS, fix modify header pool creation race Date: Sun, 11 Oct 2026 19:35:13 +0200 Organization: Usenet Network Message-ID: <ec7e506e-2aaf-47ac-a5fa-3ad2c09b6bec@corp.free.fr> References: <20261008204230.3222198-1-acassen@corp.free.fr> <20261008204230.3222198-3-acassen@corp.free.fr> <22e85761-ba52-47c1-92bf-b4dd331fc069@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1585827"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:y38li5X7Z8O3zKA3w297rXG8oSk= sha256:gDZxVrTejpyyul/kmf+ecq+xIeM3Nmxjh/ytTEQ3O6w= sha1:1wdiIAT30qFm4IaKIWna+zVxlo8= sha256:OzQ15Zkl4JQJSnz6iiJskUElMdIU37RNuboZOcqajR0= Content-Language: en-US List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 17E8C10FA30; Sun, 11 Oct 2026 20:35:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.751 X-Spam-Status: No, score=-0.751 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=corp.free.fr X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7oxqu_JLOWTZ; Sun, 11 Oct 2026 20:35:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-344550-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=corp.free.fr X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id CDB7310FA2D; Sun, 11 Oct 2026 20:35:23 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 1FA5D251A0; Sun, 11 Oct 2026 17:35:20 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 941B737E5C5; Sun, 11 Oct 2026 17:35:18 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.b="NS7NGOuU" X-Received: from rcs.proxad.net (rcs.proxad.net [212.27.60.169]) (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 C2DF5344D9B; Sun, 11 Oct 2026 17:35:16 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.27.60.169 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791740118; cv=none; b=RwmAq03VSpsgVz6FcmqP5sWr0FbS1FPCkJDoXDLtzi72XzVX2hBiAm/jOsOyVTyqwCs2AogxV5s+JeP3cxq6GzDWex4f6Du1Aa/VmIexYE9GAIb00LqFrlequ9Jcbz+6zuTPhwj/pYoaMqIXV1z7x05gPq7+wJ96YnCWTj5vgrk= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791740118; c=relaxed/simple; bh=BUQSd1EazJ5jQDrnhwYrGmrQViXQaHfoRlGnBjmF7b0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WNOSzaaOx/RxWUK29hIp9I0NzOwjt1RpbZbSSIpnB9tQ1HT1esRN8ApDp1ybcUOXEjC/Pc4FdJQxMQ93UK64PRGsmvein6ZKWCev7TZDh1WG8HM9ftnYfWhyZnoJ80xldrpCg6oXAa/56GzAhQOcF6NkWKwxzwqdjhiVDDzs5Dw= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr; spf=pass smtp.mailfrom=corp.free.fr; dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.b=NS7NGOuU; arc=none smtp.client-ip=212.27.60.169 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=corp.free.fr X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=corp.free.fr; s=rcs; t=1791740114; bh=BUQSd1EazJ5jQDrnhwYrGmrQViXQaHfoRlGnBjmF7b0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NS7NGOuULhTUJ9dCzDJBdiMWdStScT4NJUA9ujQ4fBkGWhpyI29fEDZ9N0o6vHMDv yCIUnXaypbp4yYNmIV4D7yW57nK39MaQlIiB35GPGmmZARhZMAnmLjYzuxJKwcrl+C zm6DMH/07wM8HC2SJ7BS1o9CoJSp7LRQfYne/Cn+dH0lvcoen0bLpWKMoDMiTlBhFc B0kcMiZVrZIZj1i7pOUQm6jm/+bHeT4Y5O6akGxJ35gWy7nIRi3H7ZZ1bfHLCjiHzz ptwFEPbAbpt6kYdGxJb+PAbyCVzlaEpl+jI87Zie06ZYuWQgRZTzbQ0iBY8Xd7wQ80 ZsgPd3pImHNIQ== X-Received: from [0.0.0.0] (unknown [213.228.1.188]) by rcs.proxad.net (Postfix) with ESMTPSA id E13C844C117C; Sun, 11 Oct 2026 19:35:13 +0200 (CEST) X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-User-Agent: Mozilla Thunderbird X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Yevgeny Kliteynik <kliteyn@nvidia.com>, netdev@vger.kernel.org, linux-rdma@vger.kernel.org X-In-Reply-To: <22e85761-ba52-47c1-92bf-b4dd331fc069@nvidia.com>