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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9E01C76188 for ; Wed, 5 Apr 2023 11:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237576AbjDEL3W (ORCPT ); Wed, 5 Apr 2023 07:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237919AbjDEL3S (ORCPT ); Wed, 5 Apr 2023 07:29:18 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25D185BAB for ; Wed, 5 Apr 2023 04:29:11 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5D6945C01BC; Wed, 5 Apr 2023 07:29:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 05 Apr 2023 07:29:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikishkin.pw; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1680694148; x=1680780548; bh=KB cLYYmEXwWAHbj6ZFbS4JCjQBeFXBjB2zedfp7MWjc=; b=aU57HbcmEj70y81Yca fMWosph9gYkiGJK4Ukd1AuZ8lMoIiff2pWalotiMhCOb52HopuH5BFt+2op6/kFF 70otAUV34SMYnJHo+Ml1t/X2gUB06REQyoYQuraIQw+kA5XvhmJcvNHnGHIhGHAh E4TAIyhvqi/8JpMXF/IskBTqmSAXWM6JTuhx9GAtZH8klaxAcidVVFJIlY2m7OXw 7lIJrmGExNoi4a3Qr07apzzta5bPCHpCjyiPGLWjsNtj6EerTRqmcnpYPgh6iVTn YuW2uU0ZVwN7Pdt8ROKqKUJ24U089PF51YGcN25aVXSs6eLwWzyMp5TdrL+GbQ9A fGMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1680694148; x=1680780548; bh=KBcLYYmEXwWAH bj6ZFbS4JCjQBeFXBjB2zedfp7MWjc=; b=BkKTB7cyAUZZKdhVfOUB7d2cXNlkL tRrho7+5aJMp28GMJWHdB6VZo6BMaNAB6Xvv5XJtYPDhLcgoss/X30TGE31N9+vy Kc8uw6jkwANEpU9toDERzPz4Am4BD9DANr4kskmXXVALDC+Ey7q4IQcDSHSgST2L 7Qkto5X0nO0OEubShNncEwL05doY8L1aRXVjr2ks2jPVN/BUIeIP2D+AwelusY6a 81w/c+jSb9owGP/nxklF6QvpHCOFk2D8hWg4SUoaheqp/zMPwFcboeFWKI+vuqtj H4U2+24cileMebKUh63JYD8HmZxRtjbHGYS14L7O/49N73nxODDhE/rdA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpehffgfhvfevufffjgfkgggtsehttdertddt redtnecuhfhrohhmpegglhgrughimhhirhcupfhikhhishhhkhhinhcuoehvlhgrughimh hirhesnhhikhhishhhkhhinhdrphifqeenucggtffrrghtthgvrhhnpeeigfdvgeeiieel udehueeuueejieeiheegudevhffggeeguddvveduueehueefgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehvlhgrughimhhirhesnhhikhhi shhhkhhinhdrphif X-ME-Proxy: Feedback-ID: id3b446c5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Apr 2023 07:29:05 -0400 (EDT) References: <20230323042608.17573-1-vladimir@nikishkin.pw> <87o7o2vrd0.fsf@laptop.lockywolf.net> User-agent: mu4e 1.8.14; emacs 30.0.50 From: Vladimir Nikishkin To: Simon Horman Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, eng.alaamohamedsoliman.am@gmail.com, gnault@redhat.com, razor@blackwall.org Subject: Re: [PATCH net-next v5] vxlan: try to send a packet normally if local bypass fails Date: Wed, 05 Apr 2023 19:24:56 +0800 In-reply-to: Message-ID: <878rf6va81.fsf@laptop.lockywolf.net> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Simon Horman writes: > On Wed, Apr 05, 2023 at 01:05:02PM +0800, Vladimir Nikishkin wrote: >> >> Simon Horman writes: >> >> > I'm a bit unsure about the logic around dst_release(). >> > But assuming it is correct, perhaps this is a slightly >> >> Let me try to defend this logic. >> >> In the previous version, if the destination is local (the first "if"), >> then there is no need to keep the address in memory any more, hence the >> address was free()'d at the beginning of the "if" (and was not freed >> after the "if", because the address was still needed at the userspace >> part.) >> >> With this patch, the "localbypass" creates one more branch inside that >> "if", which is handing over the processing logic to the userspace (which >> has no free()). The older two branches _inside_ the "if" (vxlan >> found/vxlan not found) are still terminating, and therefore have one >> call to free() each. > > Hi Vladimir, > > thanks for your response. > > I do still feel that the code I proposed is slightly nicer > and in keeping with general kernel coding practices. > But I do also concede that is a highly subjective position. > > I do agree that your code is correct, within the scope of what the patch > seeks to achieve. And I do not object to you keeping it as is if that is > your preference. > > ... Hello, Simon I have integrated all of your suggestions in v6. This response was only to justify the correctness of the dst_release() call, which is not a self-evident thing. -- Your sincerely, Vladimir Nikishkin (MiEr, lockywolf) (Laptop) -- Fastmail.