public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Gal Pressman <gal@nvidia•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: davem@davemloft•net, pabeni@redhat•com, netdev@vger•kernel.org,
	borisp@nvidia•com, john.fastabend@gmail•com,
	daniel@iogearbox•net, vfedorenko@novek•ru
Subject: Re: [PATCH net-next 08/10] tls: rx: use async as an in-out argument
Date: Tue, 26 Apr 2022 09:08:35 +0300	[thread overview]
Message-ID: <2c5bce16-eac4-a060-dbd8-62cc67df1bea@nvidia.com> (raw)
In-Reply-To: <20220425075438.6c87e969@kernel.org>

On 25/04/2022 17:54, Jakub Kicinski wrote:
> On Mon, 25 Apr 2022 10:19:45 +0300 Gal Pressman wrote:
>> On 11/04/2022 22:19, Jakub Kicinski wrote:
>>> Propagating EINPROGRESS thru multiple layers of functions is
>>> error prone. Use darg->async as an in/out argument, like we
>>> use darg->zc today. On input it tells the code if async is
>>> allowed, on output if it took place.
>>>
>>> Signed-off-by: Jakub Kicinski <kuba@kernel•org>  
>> I know this is not much to go on, but this patch broke our tls workflows
>> when device offload is enabled.
>> I'm still looking into it, but maybe you have an idea what might have
>> went wrong?
> Oof right, sorry. When packet is already decrypted by HW we'll skip 
> the decrypt completely and leave async to whatever it was at input.
>
> Something like this?
>
> --->8---------
>
> diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
> index ddbe05ec5489..80094528eadb 100644
> --- a/net/tls/tls_sw.c
> +++ b/net/tls/tls_sw.c
> @@ -1562,6 +1562,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
>  
>  	if (tlm->decrypted) {
>  		darg->zc = false;
> +		darg->async = false;
>  		return 0;
>  	}
>  
> @@ -1572,6 +1573,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
>  		if (err > 0) {
>  			tlm->decrypted = 1;
>  			darg->zc = false;
> +			darg->async = false;
>  			goto decrypt_done;
>  		}
>  	}

Thank you Jakub!
I will run the patch you sent through our testing.

  reply	other threads:[~2022-04-26  6:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 19:19 [PATCH net-next 00/10] tls: rx: random refactoring part 3 Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 01/10] tls: rx: consistently use unlocked accessors for rx_list Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 02/10] tls: rx: reuse leave_on_list label for psock Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 03/10] tls: rx: move counting TlsDecryptErrors for sync Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 04/10] tls: rx: don't handle TLS 1.3 in the async crypto callback Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 05/10] tls: rx: assume crypto always calls our callback Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 06/10] tls: rx: treat process_rx_list() errors as transient Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 07/10] tls: rx: return the already-copied data on crypto error Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 08/10] tls: rx: use async as an in-out argument Jakub Kicinski
2022-04-25  7:19   ` Gal Pressman
2022-04-25 14:54     ` Jakub Kicinski
2022-04-26  6:08       ` Gal Pressman [this message]
2022-04-11 19:19 ` [PATCH net-next 09/10] tls: rx: use MAX_IV_SIZE for allocations Jakub Kicinski
2022-04-11 19:19 ` [PATCH net-next 10/10] tls: rx: only copy IV from the packet for TLS 1.2 Jakub Kicinski
2022-04-13 11:00 ` [PATCH net-next 00/10] tls: rx: random refactoring part 3 patchwork-bot+netdevbpf

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=2c5bce16-eac4-a060-dbd8-62cc67df1bea@nvidia.com \
    --to=gal@nvidia$(echo .)com \
    --cc=borisp@nvidia$(echo .)com \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=vfedorenko@novek$(echo .)ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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