From: Steffen Klassert Subject: [PATCH RFC 3/5] xfrm: Allow to use the layer2 IPsec GSO codepath for software crypto. Date: Mon, 20 Nov 2017 08:37:50 +0100 Message-ID: <20171120073752.29094-4-steffen.klassert@secunet.com> References: <20171120073752.29094-1-steffen.klassert@secunet.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Steffen Klassert To: Return-path: Received: from a.mx.secunet.com ([62.96.220.36]:50404 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbdKTHiQ (ORCPT ); Mon, 20 Nov 2017 02:38:16 -0500 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 73D4B201E2 for ; Mon, 20 Nov 2017 08:38:15 +0100 (CET) Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WBLNXGVu7z1M for ; Mon, 20 Nov 2017 08:38:15 +0100 (CET) Received: from mail-essen-01.secunet.de (mail-essen-01.secunet.de [10.53.40.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id BE778201E4 for ; Mon, 20 Nov 2017 08:38:14 +0100 (CET) In-Reply-To: <20171120073752.29094-1-steffen.klassert@secunet.com> Sender: netdev-owner@vger.kernel.org List-ID: We now have support for asynchronous crypto operations in the layer 2 TX path. This was the missing part to allow the GSO codepath for software crypto, so allow this codepath now. Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index ae00fda7a0dc..d04fd64b63f3 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -202,8 +202,8 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x) if (!x->type_offload || x->encap) return false; - if ((x->xso.offload_handle && (dev == dst->path->dev)) && - !dst->child->xfrm && x->type->get_mtu) { + if ((!dev || (x->xso.offload_handle && (dev == dst->path->dev))) && + (!dst->child->xfrm && x->type->get_mtu)) { mtu = x->type->get_mtu(x, xdst->child_mtu_cached); if (skb->len <= mtu) -- 2.14.1