netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH 11/16] esp: Use a synchronous crypto algorithm on offloading.
Date: Fri, 21 Apr 2017 10:33:17 +0200	[thread overview]
Message-ID: <20170421083317.GN2649@secunet.com> (raw)
In-Reply-To: <20170421052934.GA12702@gondor.apana.org.au>

On Fri, Apr 21, 2017 at 01:29:34PM +0800, Herbert Xu wrote:
> On Thu, Apr 20, 2017 at 12:50:29PM +0200, Steffen Klassert wrote:
> > On Thu, Apr 20, 2017 at 05:52:35PM +0800, Herbert Xu wrote:
> > > On Thu, Apr 20, 2017 at 11:17:52AM +0200, Steffen Klassert wrote:
> > > >
> > > > I tried to use async algorithms but it lead to serveral problems.
> > > > The GSO layer can't handle async returns, we'd need callbacks
> > > > for all the GSO handlers. Also we need something where we can
> > > > requeue packets if the driver is busy etc.
> > > 
> > > Why would we need to requeue? As it is if you get an EBUSY on
> > > an IPsec packet it's simply dropped.
> > 
> > Yes we could do this, but the GSO problem remain.
> > 
> > We discussed this last year at netdevconf but could not come
> > up with an acceptable solutuion.
> 
> Why is it a problem exactly?

My solution for this added some extra code to the generic networking
path, this was seen as too intrusive for this very special usecase.

I still think we can get this to work, but it needs some extra care.

> 
> > For now this is just a fallback to make hardware offloading
> > possible at all, so this is slowpath anyway. Allowing async
> > algorithms can (and should) be done in a second step once we
> > found a not too intrusive solution.
> 
> OK, as long as nobody gets silently switched from async to sync
> then it's fine with me.

The user has to explicitely ask for a offloaded state, so
we don't hide anything here. In this case the user wants
to use the crypto engine of the NIC, we just need a software
fallback to catch some corner cases where the NIC can't
do the crypto operation.

  reply	other threads:[~2017-04-21  8:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20  8:54 pull request (net-next): ipsec-next 2017-04-20 Steffen Klassert
2017-04-20  8:55 ` [PATCH 01/16] net: Add ESP offload features Steffen Klassert
2017-04-20  8:55 ` [PATCH 02/16] xfrm: Add a xfrm type offload Steffen Klassert
2017-04-20  8:55 ` [PATCH 03/16] xfrm: Move device notifications to a sepatate file Steffen Klassert
2017-04-20  8:55 ` [PATCH 04/16] xfrm: Add mode handlers for IPsec on layer 2 Steffen Klassert
2017-04-20  8:55 ` [PATCH 05/16] xfrm: Add an IPsec hardware offloading API Steffen Klassert
2017-04-20  8:55 ` [PATCH 06/16] esp6: Remame esp_input_done2 Steffen Klassert
2017-04-20  8:55 ` [PATCH 07/16] esp4: Reorganize esp_output Steffen Klassert
2017-04-26 11:52   ` Ilan Tayari
2017-04-26 12:06     ` Steffen Klassert
2017-04-20  8:55 ` [PATCH 08/16] esp6: " Steffen Klassert
2017-04-20  8:55 ` [PATCH 09/16] esp: Add gso handlers for esp4 and esp6 Steffen Klassert
2017-04-20  8:55 ` [PATCH 10/16] xfrm: Add xfrm_replay_overflow functions for offloading Steffen Klassert
2017-04-20  8:55 ` [PATCH 11/16] esp: Use a synchronous crypto algorithm on offloading Steffen Klassert
2017-04-20  9:06   ` Herbert Xu
2017-04-20  9:17     ` Steffen Klassert
2017-04-20  9:52       ` Herbert Xu
2017-04-20 10:50         ` Steffen Klassert
2017-04-21  5:29           ` Herbert Xu
2017-04-21  8:33             ` Steffen Klassert [this message]
2017-04-20  8:55 ` [PATCH 12/16] net: Add a xfrm validate function to validate_xmit_skb Steffen Klassert
2017-04-20  8:55 ` [PATCH 13/16] xfrm: Add encapsulation header offsets while SKB is not encrypted Steffen Klassert
2017-04-20  8:55 ` [PATCH 14/16] xfrm: Prepare the GRO codepath for hardware offloading Steffen Klassert
2017-04-20  8:55 ` [PATCH 15/16] esp6: fix incorrect null pointer check on xo Steffen Klassert
2017-04-20  8:55 ` [PATCH 16/16] esp4/6: Fix GSO path for non-GSO SW-crypto packets Steffen Klassert
2017-04-21 19:14 ` pull request (net-next): ipsec-next 2017-04-20 David Miller

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=20170421083317.GN2649@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --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;
as well as URLs for NNTP newsgroup(s).