2019-04-09 15:23:26

by Atul Gupta

[permalink] [raw]
Subject: [crypto 0/4] Inline TLS client and v6 support

Extends Inline TLS record processing to TLS client. connect
API is added to tls_context to setup hardware for TLS
connection and handshake. Functionality wise, this makes the solution
end-to-end Inline TLS capable. TLS server and client
can operate in Inline mode and leverage hardware for complete
TLS record offload.
[0004] Adds the IPv6 support for Inline TLS server/client.

RFC series for this patch was created against net-next and
submitted on 18 Jan'2019.
This series is created against Herbert branch.

Atul Gupta (4):
net/tls: connect routine for Inine TLS Client
crypto/chelsio/chtls: hardware connect API
crypto/chelsio/chtls: CPL for TLS client
IPv6 changes for Inline TLS

drivers/crypto/chelsio/chtls/chtls.h | 18 +-
drivers/crypto/chelsio/chtls/chtls_cm.c | 1263 ++++++++++++++++++++++---
drivers/crypto/chelsio/chtls/chtls_cm.h | 12 +-
drivers/crypto/chelsio/chtls/chtls_hw.c | 7 +-
drivers/crypto/chelsio/chtls/chtls_io.c | 51 +-
drivers/crypto/chelsio/chtls/chtls_main.c | 164 +++-
drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 18 +
drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 2 +
include/net/tls.h | 6 +
include/net/transp_v6.h | 7 +
net/core/secure_seq.c | 1 +
net/ipv6/tcp_ipv6.c | 26 +-
net/tls/tls_main.c | 23 +
13 files changed, 1442 insertions(+), 156 deletions(-)

--
1.8.3.1



2019-04-09 18:01:44

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support

On Tue, 9 Apr 2019 08:22:34 -0700, Atul Gupta wrote:
> Extends Inline TLS record processing to TLS client. connect
> API is added to tls_context to setup hardware for TLS
> connection and handshake. Functionality wise, this makes the solution
> end-to-end Inline TLS capable. TLS server and client
> can operate in Inline mode and leverage hardware for complete
> TLS record offload.
> [0004] Adds the IPv6 support for Inline TLS server/client.
>
> RFC series for this patch was created against net-next and
> submitted on 18 Jan'2019.
> This series is created against Herbert branch.

Sorry if someone already asked this, but is your HW doing full ToE
for all this TLS "record offload" stuff?

2019-04-10 05:27:05

by Atul Gupta

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support


On 4/9/2019 11:31 PM, Jakub Kicinski wrote:
> On Tue, 9 Apr 2019 08:22:34 -0700, Atul Gupta wrote:
>> Extends Inline TLS record processing to TLS client. connect
>> API is added to tls_context to setup hardware for TLS
>> connection and handshake. Functionality wise, this makes the solution
>> end-to-end Inline TLS capable. TLS server and client
>> can operate in Inline mode and leverage hardware for complete
>> TLS record offload.
>> [0004] Adds the IPv6 support for Inline TLS server/client.
>>
>> RFC series for this patch was created against net-next and
>> submitted on 18 Jan'2019.
>> This series is created against Herbert branch.
> Sorry if someone already asked this, but is your HW doing full ToE
> for all this TLS "record offload" stuff?

Yes Jakub

Thanks


2019-04-10 15:58:49

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support

On Wed, 10 Apr 2019 10:56:37 +0530, Atul Gupta wrote:
> On 4/9/2019 11:31 PM, Jakub Kicinski wrote:
> > On Tue, 9 Apr 2019 08:22:34 -0700, Atul Gupta wrote:
> >> Extends Inline TLS record processing to TLS client. connect
> >> API is added to tls_context to setup hardware for TLS
> >> connection and handshake. Functionality wise, this makes the solution
> >> end-to-end Inline TLS capable. TLS server and client
> >> can operate in Inline mode and leverage hardware for complete
> >> TLS record offload.
> >> [0004] Adds the IPv6 support for Inline TLS server/client.
> >>
> >> RFC series for this patch was created against net-next and
> >> submitted on 18 Jan'2019.
> >> This series is created against Herbert branch.
> > Sorry if someone already asked this, but is your HW doing full ToE
> > for all this TLS "record offload" stuff?
>
> Yes Jakub

So from what I grok you already feed all the data directly to the
socket completely bypassing the lower layers of the networking stack,
and with this patch set you'd also move 3WHS into the FW?

2019-04-11 04:18:00

by Atul Gupta

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support


On 4/10/2019 9:28 PM, Jakub Kicinski wrote:
> On Wed, 10 Apr 2019 10:56:37 +0530, Atul Gupta wrote:
>> On 4/9/2019 11:31 PM, Jakub Kicinski wrote:
>>> On Tue, 9 Apr 2019 08:22:34 -0700, Atul Gupta wrote:
>>>> Extends Inline TLS record processing to TLS client. connect
>>>> API is added to tls_context to setup hardware for TLS
>>>> connection and handshake. Functionality wise, this makes the solution
>>>> end-to-end Inline TLS capable. TLS server and client
>>>> can operate in Inline mode and leverage hardware for complete
>>>> TLS record offload.
>>>> [0004] Adds the IPv6 support for Inline TLS server/client.
>>>>
>>>> RFC series for this patch was created against net-next and
>>>> submitted on 18 Jan'2019.
>>>> This series is created against Herbert branch.
>>> Sorry if someone already asked this, but is your HW doing full ToE
>>> for all this TLS "record offload" stuff?
>> Yes Jakub
> So from what I grok you already feed all the data directly to the
> socket completely bypassing the lower layers of the networking stack,
> and with this patch set you'd also move 3WHS into the FW?
Yes, that's correct.

2019-04-11 16:40:17

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support

On Thu, 11 Apr 2019 09:47:09 +0530, Atul Gupta wrote:
> On 4/10/2019 9:28 PM, Jakub Kicinski wrote:
> > On Wed, 10 Apr 2019 10:56:37 +0530, Atul Gupta wrote:
> >> On 4/9/2019 11:31 PM, Jakub Kicinski wrote:
> >>> On Tue, 9 Apr 2019 08:22:34 -0700, Atul Gupta wrote:
> >>>> Extends Inline TLS record processing to TLS client. connect
> >>>> API is added to tls_context to setup hardware for TLS
> >>>> connection and handshake. Functionality wise, this makes the solution
> >>>> end-to-end Inline TLS capable. TLS server and client
> >>>> can operate in Inline mode and leverage hardware for complete
> >>>> TLS record offload.
> >>>> [0004] Adds the IPv6 support for Inline TLS server/client.
> >>>>
> >>>> RFC series for this patch was created against net-next and
> >>>> submitted on 18 Jan'2019.
> >>>> This series is created against Herbert branch.
> >>> Sorry if someone already asked this, but is your HW doing full ToE
> >>> for all this TLS "record offload" stuff?
> >> Yes Jakub
> > So from what I grok you already feed all the data directly to the
> > socket completely bypassing the lower layers of the networking stack,
> > and with this patch set you'd also move 3WHS into the FW?
> Yes, that's correct.

I believe then it's a no-go from netdev perspective.

2019-04-11 18:45:19

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support

On Thu, 11 Apr 2019 23:13:08 +0530, Atul Gupta wrote:
> On 4/11/2019 10:10 PM, Jakub Kicinski wrote:
> > On Thu, 11 Apr 2019 09:47:09 +0530, Atul Gupta wrote:
> >> On 4/10/2019 9:28 PM, Jakub Kicinski wrote:
> >>> On Wed, 10 Apr 2019 10:56:37 +0530, Atul Gupta wrote:
> >>>> On 4/9/2019 11:31 PM, Jakub Kicinski wrote:
> >>>>> On Tue, 9 Apr 2019 08:22:34 -0700, Atul Gupta wrote:
> >>>>>> Extends Inline TLS record processing to TLS client. connect
> >>>>>> API is added to tls_context to setup hardware for TLS
> >>>>>> connection and handshake. Functionality wise, this makes the solution
> >>>>>> end-to-end Inline TLS capable. TLS server and client
> >>>>>> can operate in Inline mode and leverage hardware for complete
> >>>>>> TLS record offload.
> >>>>>> [0004] Adds the IPv6 support for Inline TLS server/client.
> >>>>>>
> >>>>>> RFC series for this patch was created against net-next and
> >>>>>> submitted on 18 Jan'2019.
> >>>>>> This series is created against Herbert branch.
> >>>>> Sorry if someone already asked this, but is your HW doing full ToE
> >>>>> for all this TLS "record offload" stuff?
> >>>> Yes Jakub
> >>> So from what I grok you already feed all the data directly to the
> >>> socket completely bypassing the lower layers of the networking stack,
> >>> and with this patch set you'd also move 3WHS into the FW?
> >> Yes, that's correct.
> > I believe then it's a no-go from netdev perspective.
>
> Inline TLS record offload path is kept out of netdev and leverages
> offload capabilities for crypto

Inline TLS record offload path bypasses the networking stack and feeds
data directly into the socket. If we also allow offloading 3WHS the
connection will become invisible to the stack, queueing, packet
filtering etc.

I think the "netdev community" feels pretty strongly about preventing
protocol ossification and bypassing crucial parts of the infrastructure.

2019-04-11 18:52:32

by David Miller

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support

From: Jakub Kicinski <[email protected]>
Date: Thu, 11 Apr 2019 11:45:06 -0700

> I think the "netdev community" feels pretty strongly about preventing
> protocol ossification and bypassing crucial parts of the infrastructure.

Correct.

2019-04-15 09:10:16

by Atul Gupta

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support


On 4/12/2019 12:22 AM, David Miller wrote:
> From: Jakub Kicinski <[email protected]>
> Date: Thu, 11 Apr 2019 11:45:06 -0700
>
>> I think the "netdev community" feels pretty strongly about preventing
>> protocol ossification and bypassing crucial parts of the infrastructure.
> Correct.

I understand the concern, the objective of complete offload of TLS record is an option to kTLS and other solutions. Have taken care to keep code out of netdev into crypto driver and allow user to choose record offload capability. Application buffer from socket is posted to HW for encryption, Segmentation and Tx on wire. The path provides near line-rate [100Gbps] Inline encrypt/decrypt b/w. If community feels this path adds value and can sit in crypto driver then I will work on build comments and resend v1?

Regards

Atul


2019-04-15 09:36:42

by Herbert Xu

[permalink] [raw]
Subject: Re: [crypto 0/4] Inline TLS client and v6 support

On Mon, Apr 15, 2019 at 02:40:03PM +0530, Atul Gupta wrote:
>
> Have taken care to keep code out of netdev into crypto driver
> and allow user to choose record offload capability.

Excuse me but the crypto driver is not a dumping ground for code
that is unacceptable for the network stack. If it's unacceptable
for netdev then it's unacceptable to include them in your crypto
driver.

Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt