Netdev List
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: <netdev@vger.kernel.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Subject: [PATCH RFC v2 3/5] xfrm: Allow to use the layer2 IPsec GSO codepath for software crypto.
Date: Fri, 15 Dec 2017 10:13:06 +0100	[thread overview]
Message-ID: <20171215091308.23626-4-steffen.klassert@secunet.com> (raw)
In-Reply-To: <20171215091308.23626-1-steffen.klassert@secunet.com>

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 <steffen.klassert@secunet.com>
---
 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 3f91ccffbcc8..03f2bc61f1fc 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 == xfrm_dst_path(dst)->dev)) &&
-	     !xdst->child->xfrm && x->type->get_mtu) {
+	if ((!dev || (x->xso.offload_handle && (dev == xfrm_dst_path(dst)->dev))) &&
+	     (!xdst->child->xfrm && x->type->get_mtu)) {
 		mtu = x->type->get_mtu(x, xdst->child_mtu_cached);
 
 		if (skb->len <= mtu)
-- 
2.14.1

  parent reply	other threads:[~2017-12-15  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  9:13 [PATCH RFC v2 0/5] Support asynchronous crypto for IPsec GSO Steffen Klassert
2017-12-15  9:13 ` [PATCH RFC v2 1/5] xfrm: Separate ESP handling from segmentation for GRO packets Steffen Klassert
2017-12-15  9:13 ` [PATCH RFC v2 2/5] net: Add asynchronous callbacks for xfrm on layer 2 Steffen Klassert
2017-12-15  9:13 ` Steffen Klassert [this message]
2017-12-15  9:13 ` [PATCH RFC v2 4/5] xfrm: Allow IPsec GSO with software crypto for local sockets Steffen Klassert
2017-12-15  9:13 ` [PATCH RFC v2 5/5] esp: Don't require synchronous crypto fallback on offloading anymore Steffen Klassert
2017-12-21  6:39 ` [PATCH RFC v2 0/5] Support asynchronous crypto for IPsec GSO Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171215091308.23626-4-steffen.klassert@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox