From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70EB7C47258 for ; Thu, 1 Feb 2024 00:23:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.674195.1048976 (Exim 4.92) (envelope-from ) id 1rVKro-0003Ia-QD; Thu, 01 Feb 2024 00:23:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 674195.1048976; Thu, 01 Feb 2024 00:23:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rVKro-0003IT-NO; Thu, 01 Feb 2024 00:23:44 +0000 Received: by outflank-mailman (input) for mailman id 674195; Thu, 01 Feb 2024 00:23:43 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rVKrn-0003IN-OO for xen-devel@lists.xenproject.org; Thu, 01 Feb 2024 00:23:43 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 26d7b74d-c098-11ee-8a43-1f161083a0e0; Thu, 01 Feb 2024 01:23:42 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D31196190F; Thu, 1 Feb 2024 00:23:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 646C0C433F1; Thu, 1 Feb 2024 00:23:39 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 26d7b74d-c098-11ee-8a43-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706747020; bh=7gsKG6V5s1dopCQuysbsTz34HGC4+l+xc5j4okSwkgM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lk+5raA/Cc61dnv9T5cuz4gmbXaTbEiX742QUf0zqnvIfq3Fj3SYKTN/uoi3yP+g/ pLoelw6V1AJdY5MbbIOAYtjq2qesUk/3GIwLzdEFsN3PUAnwi+SxWwW3Lk9cgZsGoS qlbBbWMb45LrvVgTPSl5JJf+j443ewZ3jZ6m6+9GWMGFXHWIqsoJk6VP5mL+8net8k d2kwVXZdx5SbZTOwXM3ZVtzXTiOiHudjReNRanO2NxpAYRWNjdzws2AHMiA+mEOmcg c0zNjS8GO0+Zn4sPw2NrOEAj6LZ6IyjsmFrxzylSiyQWii7Fsps6xQ8mJ7fjWr3eN7 6nJN7zWOFch0g== Date: Wed, 31 Jan 2024 16:23:36 -0800 From: Jakub Kicinski To: Paul Durrant Cc: Jan Beulich , "netdev@vger.kernel.org" , Wei Liu , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH net] xen-netback: properly sync TX responses Message-ID: <20240131162336.7d3ba09e@kernel.org> In-Reply-To: <980c6c3d-e10e-4459-8565-e8fbde122f00@suse.com> References: <980c6c3d-e10e-4459-8565-e8fbde122f00@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 29 Jan 2024 14:03:08 +0100 Jan Beulich wrote: > Invoking the make_tx_response() / push_tx_responses() pair with no lock > held would be acceptable only if all such invocations happened from the > same context (NAPI instance or dealloc thread). Since this isn't the > case, and since the interface "spec" also doesn't demand that multicast > operations may only be performed with no in-flight transmits, > MCAST_{ADD,DEL} processing also needs to acquire the response lock > around the invocations. > > To prevent similar mistakes going forward, "downgrade" the present > functions to private helpers of just the two remaining ones using them > directly, with no forward declarations anymore. This involves renaming > what so far was make_tx_response(), for the new function of that name > to serve the new (wrapper) purpose. > > While there, > - constify the txp parameters, > - correct xenvif_idx_release()'s status parameter's type, > - rename {,_}make_tx_response()'s status parameters for consistency with > xenvif_idx_release()'s. Hi Paul, is this one on your TODO list to review or should we do our best? :) -- pw-bot: needs-ack