From patchwork Wed Jan 24 08:13:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 13528768 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 883FC17548 for ; Wed, 24 Jan 2024 08:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706084048; cv=none; b=kvf+IsZWSH4D4dgf1+qxmQm6Zq1MPxCqYCgp13XnrfJ0McbNVS9ypVZ3DdIMAA1NH4oxSyEJ9EdHMAgWIzJFTNPZLArc4uNJ1wWutkoGWK1l8lGYFfu1fBji/wZU3Y3U+wzRzAiaWEHWiSPrhWCq7xTBPNE294CQne/o7xGa7Uo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706084048; c=relaxed/simple; bh=w12lrpFQkQHQCQaZbaQFaqqpQ3ajIxCZJXt5mJB4e+M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pMDGdIhuFY3KSE1n9kUh0fSndMMuJ3GI3OGVtx/eolo37+n6LY5efHwQbHORAmIYNrJO4zU1f8N/llXSbp9n2VjY2CcRD65yvPwO7UNH84q5RQ1GwYfjEeOI9sChzN3NTK1fIuLYMyyIGM3hqLC6QMXsmuqzgSGvkyr3fZVpYJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h/HsZn5o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h/HsZn5o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C97ACC433C7; Wed, 24 Jan 2024 08:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706084048; bh=w12lrpFQkQHQCQaZbaQFaqqpQ3ajIxCZJXt5mJB4e+M=; h=From:To:Cc:Subject:Date:From; b=h/HsZn5oUKxg0DeaBU4dIfErfA7F6fXJeh3g9ex7GMe++S34P30bxz4P/gjCQU8NH XEO7RUmGZoK9wryx+VNpvaLq7uEB1tudQmITG5gdxG4PXW/gpdpVdKaMStHBq2z0dh 7U/7hppsRhES5cviXvsaTSTlSrGDCftVRWe0V2yug9TkoMjvxN0FTue9NX5PEKbNqW t2B1x9GkyHZhY7Q1DkRfNbFTr/YxWA9jfkChkOct1iuhdCx/ftAls3Qs8pVbl9dK2z R97f/U5fTwKosnKmtxf4itOmOefFkc+O7LzUEfAYsZJKDUjV1EiTjNt00mbVume26d horfcn9xHQZ4Q== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Leon Romanovsky , Steffen Klassert , Mike Yu Subject: [PATCH net] xfrm: Pass UDP encapsulation in TX packet offload Date: Wed, 24 Jan 2024 00:13:54 -0800 Message-ID: <20240124081354.111307-1-saeed@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky In addition to citied commit in Fixes line, allow UDP encapsulation in TX path too. Fixes: 89edf40220be ("xfrm: Support UDP encapsulation in packet offload mode") CC: Steffen Klassert Reported-by: Mike Yu Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed --- net/xfrm/xfrm_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index 3784534c9185..653e51ae3964 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -407,7 +407,7 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x) struct xfrm_dst *xdst = (struct xfrm_dst *)dst; struct net_device *dev = x->xso.dev; - if (!x->type_offload || x->encap) + if (!x->type_offload) return false; if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET ||