[PATCH v2 0/5] build warnings cleanup

2018-05-27 Thread Atul Gupta
Build warnings cleanup reported for - using only 128b key - wait for buffer in sendmsg/sendpage - check for null before using skb - free rspq_skb_cache in error path - indentation v2: Added bug report description for 0002 Incorported comments from Dan Carpenter Atul Gupta (5): crypto:chtls

[PATCH v2 1/5] crypto:chtls: key len correction

2018-05-27 Thread Atul Gupta
corrected the key length to copy 128b key. Removed 192b and 256b key as user input supports key of size 128b in gcm_ctx Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_hw.c | 6 +- 1

[PATCH v2 3/5] crypto: chtls: dereference null variable

2018-05-27 Thread Atul Gupta
skb dereferenced before check in sendpage Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/c

[PATCH v2 2/5] crypto: chtls: wait for memory sendmsg, sendpage

2018-05-27 Thread Atul Gupta
dent of goto do_nonblock replace out with do_rm_wq Reported-by: Gustavo A. R. Silva <gust...@embeddedor.com> Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h | 1 + driv

[PATCH v2 4/5] crypto: chtls: kbuild warnings

2018-05-27 Thread Atul Gupta
- unindented continue - check for null page - signed return Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --g

[PATCH v2 5/5] crypto: chtls: free beyond end rspq_skb_cache

2018-05-27 Thread Atul Gupta
Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c b/drivers/crypto/c

[PATCH] crypto: chtls: generic handling of data and hdr

2018-05-14 Thread Atul Gupta
removed redundant check and made TLS PDU and header recv handling common as received from HW. Ensure that only tls header is read in cpl_rx_tls_cmp read-ahead and skb is freed when entire data is processed. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Harsh Ja

[PATCH 5/5] crypto: chtls: free beyond end rspq_skb_cache

2018-05-14 Thread Atul Gupta
Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c b/drivers/crypto/c

[PATCH 1/5] crypto:chtls: key len correction

2018-05-14 Thread Atul Gupta
corrected the key length to copy 128b key. Removed 192b and 256b key as user input supports key of size 128b in gcm_ctx Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_hw.c | 6 +- 1

[PATCH 2/5] crypto: chtls: wait for memory sendmsg, sendpage

2018-05-14 Thread Atul Gupta
Reported-by: Gustavo A. R. Silva <gust...@embeddedor.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h | 1 + drivers/crypto/chelsio/chtls/chtls_io.c | 90 +-- drivers/crypto/chelsio/chtls/chtls_main

[PATCH 0/5] build warnings cleanup

2018-05-14 Thread Atul Gupta
Build warnings cleanup reported for - using only 128b key - wait for buffer in sendmsg/sendpage - check for null before using skb - free rspq_skb_cache in error path - indentation Atul Gupta (5): crypto:chtls: key len correction crypto: chtls: wait for memory sendmsg, sendpage crypto: chtls

[PATCH 4/5] crypto: chtls: kbuild warnings

2018-05-14 Thread Atul Gupta
- unindented continue - check for null page - signed return Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --g

[PATCH 3/5] crypto: chtls: dereference null variable

2018-05-14 Thread Atul Gupta
skb dereferenced before check in sendpage Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/c

Re: [PATCH v15 net-next 00/12] Chelsio Inline TLS

2018-05-09 Thread Atul Gupta
On 4/1/2018 6:27 PM, Boris Pismenny wrote: > Hi, > > On 4/1/2018 6:37 AM, David Miller wrote: >> From: Atul Gupta <atul.gu...@chelsio.com> >> Date: Sat, 31 Mar 2018 21:41:51 +0530 >> >>> Series for Chelsio Inline TLS driver (chtls) >> >>

[PATCH v15 net-next 12/12] crypto: chtls - Makefile Kconfig

2018-03-31 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[PATCH v15 net-next 10/12] crypto: chtls - Inline TLS record Rx

2018-03-31 Thread Atul Gupta
handler for record receive. plain text copied to user buffer Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 602 +- drivers/crypto/chelsio/chtls/chtls_

[PATCH v15 net-next 07/12] crypto: chtls - Register chtls with net tls

2018-03-31 Thread Atul Gupta
Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Casey Leedom <lee...@chelsio.com> Reviewed-by: Mi

[PATCH v15 net-next 00/12] Chelsio Inline TLS

2018-03-31 Thread Atul Gupta
ueller, Stefano Brivio and Hannes Frederic -Added more details in cover letter -Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reordered the patch sequence Atul Gupta (12): tls: support for Inline tl

[PATCH v15 net-next 11/12] crypto: chtls - Program the TLS session Key

2018-03-31 Thread Atul Gupta
Initialize the space reserved for storing the TLS keys, get and free the location where key is stored for the TLS connection. Program the Tx and Rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. added socket option TLS_RX Signed-off-by: Atul Gupta

[PATCH v15 net-next 09/12] crypto: chtls - Inline TLS record Tx

2018-03-31 Thread Atul Gupta
TLS handler for record transmit. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_i

[PATCH v15 net-next 05/12] crypto: chcr - Inline TLS Key Macros

2018-03-31 Thread Atul Gupta
Define macro for programming the TLS Key context Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions

[PATCH v15 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-31 Thread Atul Gupta
Exchange messages with hardware to program the TLS session CPL handlers for messages received from chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2126

[PATCH v15 net-next 02/12] ethtool: enable Inline TLS in HW

2018-03-31 Thread Atul Gupta
Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/eth

[PATCH v15 net-next 06/12] crypto: chtls - structure and macro for Inline TLS

2018-03-31 Thread Atul Gupta
Define Inline TLS state, connection management info. Supporting macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h| 482 drivers/crypto/c

[PATCH v15 net-next 04/12] cxgb4: LLD driver changes to support TLS

2018-03-31 Thread Atul Gupta
Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Michael Werner <wer...@chelsio.com> Reviewed-by: Casey Leedom <lee

[PATCH v15 net-next 03/12] cxgb4: Inline TLS FW Interface

2018-03-31 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Casey Leedom <lee...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 122 ++-

[PATCH v15 net-next 01/12] tls: support for Inline tls record

2018-03-31 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- include/net/tls.h | 32 ++- net/tls/tls_main.c | 114 +++-- 2 files changed, 142 insertions(+), 4 deletions(-)

Re: [PATCH v14 net-next 09/12] crypto: chtls - Inline TLS record Tx

2018-03-29 Thread Atul Gupta
On 3/29/2018 9:56 PM, Sabrina Dubroca wrote: > 2018-03-29, 21:27:51 +0530, Atul Gupta wrote: >> TLS handler for record transmit. >> Create Inline TLS work request and post to FW. >> Create Inline TLS record CPLs for hardware >> >> Signed-off-by: Atul Gupta <a

Re: [PATCH v14 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-29 Thread Atul Gupta
On 3/29/2018 9:56 PM, Sabrina Dubroca wrote: > 2018-03-29, 21:27:50 +0530, Atul Gupta wrote: > ... >> +static void chtls_pass_accept_request(struct sock *sk, >> + struct sk_buff *skb) >> +{ > ... >> +if (chtls_get_module(ne

[PATCH v14 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-29 Thread Atul Gupta
Exchange messages with hardware to program the TLS session CPL handlers for messages received from chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2145

[PATCH v14 net-next 12/12] crypto: chtls - Makefile Kconfig

2018-03-29 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[PATCH v14 net-next 11/12] crypto: chtls - Register chtls with net tls

2018-03-29 Thread Atul Gupta
Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Casey Leedom <lee...@chelsio.com> Reviewed-by: Mi

[PATCH v14 net-next 10/12] crypto: chtls - Inline TLS record Rx

2018-03-29 Thread Atul Gupta
handler for record receive. plain text copied to user buffer Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 604 +++- 1 file changed, 603 insertions(+)

[PATCH v14 net-next 09/12] crypto: chtls - Inline TLS record Tx

2018-03-29 Thread Atul Gupta
TLS handler for record transmit. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls

[PATCH v14 net-next 07/12] crypto: chtls - Program the TLS session Key

2018-03-29 Thread Atul Gupta
Initialize the space reserved for storing the TLS keys, get and free the location where key is stored for the TLS connection. Program the Tx and Rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. added socket option TLS_RX Signed-off-by: Atul Gupta

[PATCH v14 net-next 06/12] crypto: chtls - structure and macro for Inline TLS

2018-03-29 Thread Atul Gupta
Define Inline TLS state, connection management info. Supporting macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h| 483 drivers/crypto/c

[PATCH v14 net-next 05/12] crypto: chcr - Inline TLS Key Macros

2018-03-29 Thread Atul Gupta
Define macro for programming the TLS Key context Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions

[PATCH v14 net-next 03/12] cxgb4: Inline TLS FW Interface

2018-03-29 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Casey Leedom <lee...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 122 ++-

[PATCH v14 net-next 04/12] cxgb4: LLD driver changes to support TLS

2018-03-29 Thread Atul Gupta
Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Michael Werner <wer...@chelsio.com> Reviewed-by: Casey Leedom <lee

[PATCH v14 net-next 02/12] ethtool: enable Inline TLS in HW

2018-03-29 Thread Atul Gupta
Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/eth

[PATCH v14 net-next 01/12] tls: support for Inline tls record

2018-03-29 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- include/net/tls.h | 32 ++- net/tls/tls_main.c | 114 +++-- 2 files changed, 142 insertions(+), 4 deletions(-)

[PATCH v14 net-next 00/12] Chelsio Inline TLS

2018-03-29 Thread Atul Gupta
iables v2: fixed the following based on the review comments of Stephan Mueller, Stefano Brivio and Hannes Frederic -Added more details in cover letter -Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reorder

Re: [PATCH v13 net-next 01/12] tls: support for Inline tls record

2018-03-27 Thread Atul Gupta
On 3/27/2018 11:53 PM, Stefano Brivio wrote: > On Tue, 27 Mar 2018 23:06:30 +0530 > Atul Gupta <atul.gu...@chelsio.com> wrote: > >> +static struct tls_context *create_ctx(struct sock *sk) >> +{ >> +struct inet_connection_sock *icsk = inet_csk(sk)

Re: [PATCH v13 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-27 Thread Atul Gupta
On 3/27/2018 11:12 PM, Stefano Brivio wrote: > On Tue, 27 Mar 2018 23:06:37 +0530 > Atul Gupta <atul.gu...@chelsio.com> wrote: > >> Exchange messages with hardware to program the TLS session >> CPL handlers for messages received from chip. >> >> Signed-off

Re: [SPAMMY (6.9)]Re: [PATCH v13 net-next 02/12] ethtool: enable Inline TLS in HW

2018-03-27 Thread Atul Gupta
On 3/28/2018 2:14 AM, Sabrina Dubroca wrote: > 2018-03-27, 23:06:31 +0530, Atul Gupta wrote: >> Ethtool option enables TLS record offload on HW, user >> configures the feature for netdev capable of Inline TLS. >> This allows user to define custom sk_prot for Inline TLS

[PATCH v13 net-next 11/12] crypto: chtls - Register chtls with net tls

2018-03-27 Thread Atul Gupta
Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Casey Leedom <lee...@chelsio.com> Reviewed-by: Mi

[PATCH v13 net-next 12/12] crypto: chtls - Makefile Kconfig

2018-03-27 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[PATCH v13 net-next 09/12] crypto: chtls - Inline TLS record Tx

2018-03-27 Thread Atul Gupta
TLS handler for record transmit. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> Reviewed-by: Stefano Brivio <sbri...@redhat.com> -

[PATCH v13 net-next 10/12] crypto: chtls - Inline TLS record Rx

2018-03-27 Thread Atul Gupta
handler for record receive. plain text copied to user buffer Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 592 1 file changed, 592 insertions(+)

[PATCH v13 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-27 Thread Atul Gupta
Exchange messages with hardware to program the TLS session CPL handlers for messages received from chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Michael Werner <wer...@chelsio.com> Reviewed-by: Sabrina Dubroca <sdubr...@redhat.com> Reviewed-by: St

[PATCH v13 net-next 07/12] crypto: chtls - Program the TLS session Key

2018-03-27 Thread Atul Gupta
Initialize the space reserved for storing the TLS keys, get and free the location where key is stored for the TLS connection. Program the Tx and Rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. added socket option TLS_RX Signed-off-by: Atul Gupta

[PATCH v13 net-next 02/12] ethtool: enable Inline TLS in HW

2018-03-27 Thread Atul Gupta
Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Sabrina Dubroca <sdubr...@redhat.com> --- i

[PATCH v13 net-next 03/12] cxgb4: Inline TLS FW Interface

2018-03-27 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Casey Leedom <lee...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 122 ++-

[PATCH v13 net-next 06/12] crypto: chtls - structure and macro for Inline TLS

2018-03-27 Thread Atul Gupta
Define Inline TLS state, connection management info. Supporting macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Sabrina Dubroca <sdubr...@redhat.com> Reviewed-by: Michael Werner <wer...@chelsio.com> --- drivers/crypto/chelsio/chtl

[PATCH v13 net-next 05/12] crypto: chcr - Inline TLS Key Macros

2018-03-27 Thread Atul Gupta
Define macro for programming the TLS Key context Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions

[PATCH v13 net-next 04/12] cxgb4: LLD driver changes to support TLS

2018-03-27 Thread Atul Gupta
Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Michael Werner <wer...@chelsio.com> Reviewed-by: Casey Leedom <lee

[PATCH v13 net-next 01/12] tls: support for Inline tls record

2018-03-27 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Reviewed-by: Dave Watson <davejwat...@fb.com> Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- include/net/tls.h | 32 ++- net/tls/tls_main.c | 115 +++-- 2

[PATCH v13 net-next 00/12] Chelsio Inline TLS

2018-03-27 Thread Atul Gupta
vio and Hannes Frederic -Added more details in cover letter -Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reordered the patch sequence Atul Gupta (12): tls: support for Inline tls record ethtool:

[PATCH v12 net-next 12/12] crypto: chtls - Makefile Kconfig

2018-03-19 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[PATCH v12 net-next 09/12] crypto: chtls - Inline TLS record Tx

2018-03-19 Thread Atul Gupta
TLS handler for record transmit. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1252 +++ 1 file changed, 1252 inse

[PATCH v12 net-next 11/12] crypto: chtls - Register chtls with net tls

2018-03-19 Thread Atul Gupta
Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c

[PATCH v12 net-next 10/12] crypto: chtls - Inline TLS record Rx

2018-03-19 Thread Atul Gupta
handler for record receive. plain text copied to user buffer Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 600 1 file changed, 600 insertions(+) diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/d

[PATCH v12 net-next 06/12] crypto: chtls - structure and macro for Inline TLS

2018-03-19 Thread Atul Gupta
Define Inline TLS state, connection management info. Supporting macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h| 485 drivers/crypto/chelsio/chtls/chtls_cm.h | 202 + 2 files c

[PATCH v12 net-next 07/12] crypto: chtls - Program the TLS session Key

2018-03-19 Thread Atul Gupta
Initialize the space reserved for storing the TLS keys, get and free the location where key is stored for the TLS connection. Program the Tx and Rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. added socket option TLS_RX Signed-off-by: Atul Gupta

[PATCH v12 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-19 Thread Atul Gupta
Exchange messages with hardware to program the TLS session CPL handlers for messages received from chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2056 +++ net/ipv4/tcp_minisocks.c|

[PATCH v12 net-next 04/12] cxgb4: LLD driver changes to support TLS

2018-03-19 Thread Atul Gupta
Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 32 +--- drivers/net/ethernet/chelsio

[PATCH v12 net-next 05/12] crypto: chcr - Inline TLS Key Macros

2018-03-19 Thread Atul Gupta
Define macro for programming the TLS Key context Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions

[PATCH v12 net-next 02/12] ethtool: enable Inline TLS in HW

2018-03-19 Thread Atul Gupta
Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/eth

[PATCH v12 net-next 01/12] tls: support for Inline tls record

2018-03-19 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/net/tls.h | 45 net/tls/tls_main.c | 123 + 2 files changed, 151 insertions(+), 17 deletions(-) diff --git a/include/net/tls.h b/include/net/tls.h index 4

[PATCH v12 net-next 03/12] cxgb4: Inline TLS FW Interface

2018-03-19 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 121 ++- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + d

[PATCH v12 net-next 00/12] Chelsio Inline TLS

2018-03-19 Thread Atul Gupta
xed the following based on the review comments of Stephan Mueller, Stefano Brivio and Hannes Frederic -Added more details in cover letter -Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reordered t

Re: [PATCH v11 crypto 00/12] Chelsio Inline TLS

2018-03-19 Thread Atul Gupta
On 3/19/2018 2:52 PM, Herbert Xu wrote: > On Sun, Mar 18, 2018 at 10:36:02AM -0400, David Miller wrote: >> Herbert, is it OK for this entire series to go via net-next? > Sure, although there could be conflicts since the chelsio driver > seems to be changing quite fast. I applied chcr patches

Re: [PATCH v11 crypto 00/12] Chelsio Inline TLS

2018-03-18 Thread Atul Gupta
On 3/18/2018 8:06 PM, David Miller wrote: > From: Atul Gupta <atul.gu...@chelsio.com> > Date: Sun, 18 Mar 2018 14:30:30 + > >> Hi Dave/Herbert, >> >> This series is against crypto tree, should I submit two patch series: >> 1. netdev specific chan

Re: [PATCH v11 crypto 06/12] crypto: chtls - structure and macro for Inline TLS

2018-03-18 Thread Atul Gupta
On 3/19/2018 4:23 AM, Sabrina Dubroca wrote: > 2018-03-16, 21:07:35 +0530, Atul Gupta wrote: > [...] >> +#define SOCK_INLINE (31) > [...] > >> +static inline int csk_flag(const struct sock *sk, enum csk_flags flag) >> +{ >> +struct chtls_sock *c

RE: [PATCH v11 crypto 00/12] Chelsio Inline TLS

2018-03-18 Thread Atul Gupta
:33 AM To: Atul Gupta <atul.gu...@chelsio.com> Cc: davejwat...@fb.com; herb...@gondor.apana.org.au; s...@queasysnail.net; sbri...@redhat.com; linux-cry...@vger.kernel.org; netdev@vger.kernel.org; Ganesh GR <ganes...@chelsio.com> Subject: Re: [PATCH v11 crypto 00/12] Chelsio Inline TLS

[PATCH v11 crypto 00/12] Chelsio Inline TLS

2018-03-16 Thread Atul Gupta
-Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reordered the patch sequence Atul Gupta (12): tls: support for Inline tls record ethtool: enable Inline TLS in HW cxgb4: Inline TLS FW Interface cx

[PATCH v11 crypto 01/12] tls: support for Inline tls record

2018-03-16 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/net/tls.h | 39 ++ net/tls/tls_main.c | 116 - 2 files changed, 145 insertions(+), 10 deletions(-) diff --git a/include/net/tls.h b/include/net/tls.h index 4

[PATCH v11 crypto 02/12] ethtool: enable Inline TLS in HW

2018-03-16 Thread Atul Gupta
Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/eth

[PATCH v11 crypto 03/12] cxgb4: Inline TLS FW Interface

2018-03-16 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 121 ++- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + d

[PATCH v11 crypto 04/12] cxgb4: LLD driver changes to support TLS

2018-03-16 Thread Atul Gupta
Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 32 +--- drivers/net/ethernet/chelsio

[PATCH v11 crypto 05/12] crypto: chcr - Inline TLS Key Macros

2018-03-16 Thread Atul Gupta
Define macro for programming the TLS Key context Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions

[PATCH v11 crypto 07/12] crypto: chtls - Program the TLS session Key

2018-03-16 Thread Atul Gupta
Initialize the space reserved for storing the TLS keys, get and free the location where key is stored for the TLS connection. Program the Tx and Rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. added socket option TLS_RX Signed-off-by: Atul Gupta

[PATCH v11 crypto 08/12] crypto : chtls - CPL handler definition

2018-03-16 Thread Atul Gupta
Exchange messages with hardware to program the TLS session CPL handlers for messages received from chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2056 +++ net/ipv4/tcp_minisocks.c|

[PATCH v11 crypto 10/12] crypto: chtls - Inline TLS record Rx

2018-03-16 Thread Atul Gupta
handler for record receive. plain text copied to user buffer Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 599 1 file changed, 599 insertions(+) diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/d

[PATCH v11 crypto 09/12] crypto: chtls - Inline TLS record Tx

2018-03-16 Thread Atul Gupta
TLS handler for record transmit. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1251 +++ 1 file changed, 1251 inse

[PATCH v11 crypto 12/12] crypto: chtls - Makefile Kconfig

2018-03-16 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[PATCH v11 crypto 11/12] crypto: chtls - Register chtls with net tls

2018-03-16 Thread Atul Gupta
Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c

[PATCH v11 crypto 06/12] crypto: chtls - structure and macro for Inline TLS

2018-03-16 Thread Atul Gupta
Define Inline TLS state, connection management info. Supporting macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h| 491 drivers/crypto/chelsio/chtls/chtls_cm.h | 202 + 2 files c

[PATCH v10 crypto 09/11] chtls: Inline TLS request Tx/Rx

2018-03-09 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request and post to FW. Create Inline TLS record CPLs for hardware Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1863 +++ 1 file changed

[PATCH v10 crypto 10/11] chtls: Register chtls Inline TLS with net tls

2018-03-09 Thread Atul Gupta
Register chtls as Inline TLS driver, chtls is ULD to cxgb4. Setsockopt to program (tx/rx) keys on chip. Support AES GCM of key size 128. Support both Inline Rx and Tx. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c

[PATCH v10 crypto 11/11] Makefile Kconfig

2018-03-09 Thread Atul Gupta
Entry for Inline TLS as another driver dependent on cxgb4 and chcr Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/Kconfig| 11 +++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[PATCH v10 crypto 08/11] chtls: CPL handler definition

2018-03-09 Thread Atul Gupta
Exchange CPL messages with hardware to program the TLS session CPL handlers defined to process messages received from chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2041 +++ net/ipv4/tcp_minis

[PATCH v10 crypto 06/11] chcr: Inline TLS Key Macros

2018-03-09 Thread Atul Gupta
Define macro for programming the TLS Key context Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.h | 42 + drivers/crypto/chelsio/chcr_core.h | 55 +- 2 files changed, 96 insertions

[PATCH v10 crypto 03/11] cxgb4: Inline TLS FW Interface

2018-03-09 Thread Atul Gupta
Key area size in hw-config file. CPL struct for TLS request and response. Work request for Inline TLS. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 121 ++- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + d

[PATCH v10 crypto 07/11] chtls: Program the TLS Key

2018-03-09 Thread Atul Gupta
Initialize the space reserved for storing the TLS keys get and free the location where key is stored for the TLS connection Program the tx and rx key as received from user in struct tls12_crypto_info_aes_gcm_128 and understood by hardware. Signed-off-by: Atul Gupta <atul.gu...@chelsio.

[PATCH v10 crypto 02/11] ethtool: enable Inline TLS in HW

2018-03-09 Thread Atul Gupta
Ethtool option enables TLS record offload on HW, user configures the feature for netdev capable of Inline TLS. This allows user to define custom sk_prot for Inline TLS sock Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/eth

[PATCH v10 crypto 04/11] chtls: structure and macro definiton

2018-03-09 Thread Atul Gupta
Inline TLS state, connection management. Supporting macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h| 487 drivers/crypto/chelsio/chtls/chtls_cm.h | 202 + 2 files change

[PATCH v10 crypto 05/11] cxgb4: LLD driver changes to enable TLS

2018-03-09 Thread Atul Gupta
Read the Inline TLS capability from firmware. Determine the area reserved for storing the keys Dump the Inline TLS tx and rx records count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 32 +--- drivers/net/ethernet/chelsio

[PATCH v10 crypto 00/11] Chelsio Inline TLS

2018-03-09 Thread Atul Gupta
on the review comments of Stephan Mueller, Stefano Brivio and Hannes Frederic -Added more details in cover letter -Fixed indentation and formating issues -Using aes instead of aes-generic -memset key info after programing the key on chip -reordered the patch sequence Atul Gup

[PATCH v10 crypto 01/11] tls: support for Inline tls record

2018-03-09 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/net/tls.h | 39 ++ net/tls/tls_main.c | 116 - 2 files changed, 144 insertions(+), 11 deletions(-) diff --git a/include/net/tls.h b/include/net/tls.h index 4

  1   2   3   >