From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 70B6422F389 for ; Fri, 28 Nov 2025 16:14:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764346487; cv=none; b=LmOow7ZlSKX/6oWlJnotAloM1mrBxR2F0KXRyfBdsz4IsGtzZmcV+GsrnPpcA6lFE15HUES+0AIrhrK1n0uo5nvuM9DFj0L7iQGkx7lLL4oxiJVznaO+wVr2tc9XepJqYrUesbuS1BHve44h/T1clTjcruflhmMNszWOtZpXTqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764346487; c=relaxed/simple; bh=TxBipie9Ud3lXjHMdugPgo/Lxop4PotVr4DLpbWwP0Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z4lT/cw0dphd+HQ5oxCC+wBMuh2BTejrifciftn8s8gU1mJMZatN0LpamMwAW2LjQ51VZqaQLiW9bCfqryZyYwINYtrpwEhqnGI/vX0/MDfeOy3lRwlR8XZFAEw1+E9HTy5KnSCOy7bL7LzXrpmghBAecwUn+AItenerX6RRbUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net; spf=pass smtp.mailfrom=queasysnail.net; dkim=pass (2048-bit key) header.d=queasysnail.net header.i=@queasysnail.net header.b=KPtDlWim; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=huEhCA3g; arc=none smtp.client-ip=202.12.124.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=queasysnail.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=queasysnail.net header.i=@queasysnail.net header.b="KPtDlWim"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="huEhCA3g" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5D3B57A0853; Fri, 28 Nov 2025 11:14:43 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Fri, 28 Nov 2025 11:14:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=queasysnail.net; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1764346483; x= 1764432883; bh=NWDdTy6GJqiUjaPU4nhovGWEgEL15+6E/4RuCvIGZwM=; b=K PtDlWim9lrmjyOLe8JPRPMI/Ge+exTF9seMxw4qkjFsQ4FQ2Fi3NNcyzX8yH5eja uK+tWtZ0Hl/Wy58JXQ5hoyxvmwbkg+BLvcsFdJOX78HBDlv+5MPV6qkntJIpMUyt yA4OiCPiDdm/TjyTTN5APEuCCYQmi1XYJtZ37XVJc0hwHwqATKKmr0vSUDKtjjXT OPwLV4MmJVhbSRriUdGEGGhSYzZeMbfUkIazly9fi143oS4VmAYDSr9ZPdM+KzPl bCs8E2z/naqFLZRCv5MaIbroo9n+zKDfM8wnhCm2HJFaKCB+/YhUlUb04s3MmDFO DZITXd5mhy8Y4ufQ+yAbg== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1764346483; x=1764432883; bh=NWDdTy6GJqiUjaPU4nhovGWEgEL15+6E/4R uCvIGZwM=; b=huEhCA3gV8D6QjRfGul/bHQ5pGyp6u4n8Vy9BoEQNV8nUCYmSqc kwL9FW8Jr/pIjRwD58QqsR01B+CT3sYW1cferu3CmwsB1pCbScJ4i+34x9pNIt3y Oo6GbmWn8hPr8dzMH7kZfPVED2aD3xu7iKq+c8ADKJjrPtH/R+d7Krn24uN8371S DEcDNoLZdlXFv6JNLdQRKhNgI5sxrlcKHwO/ljkMvx/WqbH2TZKSOODPArIFdKea 8ZV/S2VyDIG5OP7sNnTBA2sRjrPtBmPAk2trp0ig0qWwzT+PacQ+JmaRNvc/b8lA sgTqSx0pKVn1ykFbKxvLpNlgQwNfAV9t7eg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvhedtfedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtredttddtjeenucfhrhhomhepufgrsghrihhn rgcuffhusghrohgtrgcuoehsugesqhhuvggrshihshhnrghilhdrnhgvtheqnecuggftrf grthhtvghrnhepuefhhfffgfffhfefueeiudegtdefhfekgeetheegheeifffguedvueff fefgudffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgusehquhgvrghshihsnhgrihhlrdhnvghtpdhnsggprhgtphhtthhopeduuddpmhho uggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhirghnsgholhesnhhvihguihgrrdgtoh hmpdhrtghpthhtohepnhgvthguvghvsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghp thhtohepuggrvhgvmhesuggrvhgvmhhlohhfthdrnhgvthdprhgtphhtthhopehkuhgsrg eskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhtvghffhgvnhdrkhhlrghsshgvrhht sehsvggtuhhnvghtrdgtohhmpdhrtghpthhtoheptghrrghtihhusehnvhhiughirgdrtg homhdprhgtphhtthhopehhvghrsggvrhhtsehgohhnughorhdrrghprghnrgdrohhrghdr rghupdhrtghpthhtohepughsrghhvghrnheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoh epvgguuhhmrgiivghtsehgohhoghhlvgdrtghomh X-ME-Proxy: Feedback-ID: i934648bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Nov 2025 11:14:41 -0500 (EST) Date: Fri, 28 Nov 2025 17:14:39 +0100 From: Sabrina Dubroca To: Jianbo Liu Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, steffen.klassert@secunet.com, Cosmin Ratiu , Herbert Xu , David Ahern , Eric Dumazet , Paolo Abeni , Simon Horman Subject: Re: [PATCH ipsec-next v3] xfrm: Use xfrm_ip2inner_mode() unconditionally Message-ID: References: <20251128035014.3941-1-jianbol@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251128035014.3941-1-jianbol@nvidia.com> 2025-11-28, 05:48:04 +0200, Jianbo Liu wrote: > Commit c9500d7b7de8 ("xfrm: store xfrm_mode directly, not its > address") changed how the xfrm_mode is stored in the xfrm state. The > inner_mode NULL check is redundant as xfrm_ip2inner_mode() now returns > the address of an embedded structure, which cannot be NULL. > > Additionally, commit 61fafbee6cfe ("xfrm: Determine inner GSO type > from packet inner protocol") updated xfrm_ip2inner_mode() to > explicitly check x->sel.family. If the selector family is specified > (i.e., not AF_UNSPEC), the helper now correctly returns &x->inner_mode > directly. Note: that commit is not in ipsec-next yet, only in ipsec. This patch should only be applied to ipsec-next once the trees have been merged together. > This means the manual branching which checked for AF_UNSPEC before > deciding whether to call the helper or use the state's inner mode > directly is no longer necessary. > > This patch simplifies the code by calling xfrm_ip2inner_mode() > unconditionally and removing the NULL checking. > > Signed-off-by: Jianbo Liu > Reviewed-by: Cosmin Ratiu > --- > V3: > - Change the commit subject (was "xfrm: Remove redundant state inner mode check"). > - Call xfrm_ip2inner_mode() unconditionally and update the commit message accordingly. Other than the tree scheduling comment above, the patch looks ok, thanks. Reviewed-by: Sabrina Dubroca -- Sabrina