[PATCH net-next] cxgb4: Allocate Tx queues dynamically

2016-11-18 Thread Atul Gupta
queues which are shared by ULD shall be allocated by first registering driver and un-allocated by last unregistering driver. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_algo.c | 16 +-- drivers/crypto/chelsio/chcr_core.c

[crypto] chcr: fix a type cast error

2017-12-05 Thread Atul Gupta
fix a type cast error for queue descriptor Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chcr_ipsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/chelsio/chc

[RFC crypto v3 1/9] chtls: structure and macro definiton

2017-12-20 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| 480 drivers/crypto/chelsio/chtls/chtls_cm.h | 203 ++ 2 files change

[RFC crypto v3 0/9] Chelsio Inline TLS

2017-12-20 Thread Atul Gupta
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 Gupta (9)

[RFC crypto v3 7/9] chtls: Inline crypto request Tx/Rx

2017-12-20 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request and post to FW. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- v3: made some functions static and initialized few variables --- drivers/crypto/chelsio/chtls/chtls_io.c | 1867

[RFC crypto v3 8/9] chtls: Register the ULP

2017-12-20 Thread Atul Gupta
Add new uld driver for Inline TLS support. Register ULP for chtls. Setsockopt to program key on chip. support AES GCM key size 128. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- v3: made some functions static --- drivers/crypto/chelsio/chtls/chtls_main.c

[RFC crypto v3 9/9] Makefile Kconfig

2017-12-20 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| 10 ++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[RFC crypto v3 6/9] chtls: CPL handler definition

2017-12-20 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- v3: made some functions static and removed un-needed semicolon --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2045 +++ net/ipv4/tcp_minis

[RFC crypto v3 2/9] cxgb4: Inline TLS FW Interface

2017-12-20 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

[RFC crypto v3 5/9] chtls: Key program

2017-12-20 Thread Atul Gupta
Program the tx and rx key on chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- v3: made some functions static --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode 100644 drivers/crypto/chelsio

[RFC crypto v3 3/9] cxgb4: LLD driver changes to enable TLS

2017-12-20 Thread Atul Gupta
Read FW capability. Read key area size. Dump the TLS record count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 18 +++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 32 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4

[RFC crypto v3 4/9] chcr: Key Macro

2017-12-20 Thread Atul Gupta
Define macro for 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(+), 1 deletion(-)

[crypto v3 2/2] chcr: Add support for Inline IPSec

2017-11-16 Thread Atul Gupta
register xfrmdev_ops callbacks, Send IPsec tunneled data to HW for inline processing. The driver use hardware crypto accelerator to encrypt and generate ICV for the transmitted packet in Inline mode. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Harsh Jain <ha...@ch

[crypto v3 1/2] cxgb4: Add support for Inline IPSec Tx

2017-11-16 Thread Atul Gupta
Added Tx routine for ULD - define interface for ULD Tx. Export routines used for Tx data - Routines common for data transmit are used by cxgb4 and chcr drivers. - EXPORT routines enable transmit from chcr driver. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Ganesh

[PATCH v2 2/2] chcr: Add support for Inline IPSec

2017-11-09 Thread Atul Gupta
register xfrmdev_ops callbacks, Send IPsec tunneled data to HW for inline processing. The driver use hardware crypto accelerator to encrypt and generate ICV for the transmitted packet in Inline mode. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Harsh Jain <ha...@ch

[PATCH v2 1/2] cxgb4: Add support for Inline IPSec Tx

2017-11-09 Thread Atul Gupta
Added Tx routine for ULD - define interface for ULD Tx. Export routines used for Tx data - Routines common for data transmit are used by cxgb4 and chcr drivers. - EXPORT routines enable transmit from chcr driver. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Harsh Ja

RE: [crypto 6/8] chtls: TCB and Key program

2017-12-07 Thread Atul Gupta
-Original Message- From: Stephan Mueller [mailto:smuel...@chronox.de] Sent: Tuesday, December 5, 2017 6:37 PM To: Atul Gupta <atul.gu...@chelsio.com> Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org; net...@vger.kernel.org; da...@davemloft.net; davejwat...@fb.com;

RE: [crypto 6/8] chtls: TCB and Key program

2017-12-07 Thread Atul Gupta
-Original Message- From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Stephan Mueller Sent: Thursday, December 7, 2017 8:13 PM To: Atul Gupta <atul.gu...@chelsio.com> Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org

RE: [crypto 4/8] chtls: CPL handler definition

2017-12-07 Thread Atul Gupta
-Original Message- From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Stefano Brivio Sent: Tuesday, December 5, 2017 8:54 PM To: Atul Gupta <atul.gu...@chelsio.com> Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org

[crypto 4/8] chtls: CPL handler definition

2017-12-05 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2048 +++ 1 file changed, 2048 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_cm.c

[crypto 7/8] chtls: structure and macro definiton

2017-12-05 Thread Atul Gupta
Inline TLS state, connection management. Support macros definition. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/Makefile | 4 + drivers/crypto/chelsio/chtls/chtls.h| 481 drivers/crypto/chelsio/chtls/chtl

[crypto 5/8] chtls: Inline crypto request for Tx.

2017-12-05 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1866 +++ 1 file changed, 1866 insertions(+) create mode 100644 drivers/crypto/chelsio

[crypto 6/8] chtls: TCB and Key program

2017-12-05 Thread Atul Gupta
program the tx and rx key on chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_hw.c diff --git a/drivers/

[crypto 8/8] Kconfig Makefile

2017-12-05 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 | 10 ++ drivers/crypto/chelsio/Makefile | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/crypto/chelsio/Kco

[crypto 0/8] Chelsio inline TLS

2017-12-05 Thread Atul Gupta
: -TLS record offload, add TLS header, encrypt data and transmit -TLS record receive and decrypt -TLS keys store -GCM crypto engine Atul Gupta (8): cxgb4: Inline TLS chcr: changes to chcr driver chtls: ulp for Inline TLS processing chtls: CPL handler definition

[crypto 1/8] cxgb4: Inline TLS

2017-12-05 Thread Atul Gupta
Add new uld driver for Inline TLS support. WR is defined to submit crypto request to firmware. Key area size is configured in hw-config file. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 18 ++- drivers/net/ethernet/chelsio

[crypto 2/8] chcr: changes to chcr driver

2017-12-05 Thread Atul Gupta
Define the Macro for 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 +- include/uapi/linux/tls.h | 1 + 3

[crypto 3/8] chtls: ulp for Inline TLS processing

2017-12-05 Thread Atul Gupta
Register chtls as another tcp ULP, Based on a similar infrastructure in tcp_cong. proto_ops are defined to handle CPL to send/receive crypto request to hw. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c | 585 +++

[RFC crypto v2 1/9] chtls: structure and macro definiton

2017-12-12 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| 480 drivers/crypto/chelsio/chtls/chtls_cm.h | 203 ++ 2 files change

[RFC crypto v2 2/9] cxgb4: Inline TLS FW Interface

2017-12-12 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

[RFC crypto v2 0/9] Chelsio Inline TLS

2017-12-12 Thread Atul Gupta
ails 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 (9): chtls: structure and macro definiton cxgb4: Inline TLS FW Interface cxgb4: LLD driver c

[RFC crypto v2 8/9] chtls: Register the ULP

2017-12-12 Thread Atul Gupta
Add new uld driver for Inline TLS support. Register ULP for chtls. Setsockopt to program key on chip. support AES GCM key size 128. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c | 584 ++ include/uapi/linux

[RFC crypto v2 9/9] Makefile Kconfig

2017-12-12 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| 10 ++ drivers/crypto/chelsio/Makefile | 1 + drivers/crypto/chelsio/chtls/Makefile | 4 3 files chang

[RFC crypto v2 7/9] chtls: Inline crypto request Tx/Rx

2017-12-12 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request and post to FW. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1866 +++ 1 file changed, 1866 insertions(+) create mode 100644 drivers/

[RFC crypto v2 5/9] chtls: Key program

2017-12-12 Thread Atul Gupta
Program the tx and rx key on chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- V2: using aes instead of aes-generic memset key after programming --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode

[RFC crypto v2 6/9] chtls: CPL handler definition

2017-12-12 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- V2: Excess Whitespace Reverse christmas tree format skb free in TCP_SYN_RECV removed !ret check export tcp_time_wait fix newsk leak in error case --- drivers/crypto/chelsio

[RFC crypto v2 4/9] chcr: Key Macro

2017-12-12 Thread Atul Gupta
Define macro for 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(+), 1 deletion(-)

[RFC crypto v2 3/9] cxgb4: LLD driver changes to enable TLS

2017-12-12 Thread Atul Gupta
Read FW capability. Read key area size. Dump the TLS record count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 18 +++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 32 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4

[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 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 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

[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 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] 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

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] crypto: chelsio: request to HW should wrap

2018-05-09 Thread Atul Gupta
-Tx request and data is copied to HW Q in 64B desc, check for end of queue and adjust the current position to start from beginning before passing the additional request info. -key context copy should check key length only -Few reverse christmas tree correction Signed-off-by: Atul Gupta <atul

RE: [PATCH v2 1/7] crypto: chtls: wait for memory sendmsg, sendpage

2018-05-11 Thread Atul Gupta
To: Atul Gupta <atul.gu...@chelsio.com> Cc: linux-crypto@vger.kernel.org; gust...@embeddedor.com Subject: Re: [PATCH v2 1/7] crypto: chtls: wait for memory sendmsg, sendpage On Wed, May 02, 2018 at 12:25:33AM +0530, Atul Gupta wrote: > Reported-by: Gustavo A. R. Silva <gust...@em

[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 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 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 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 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 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 7/7] crypto: chtls: HW supported socket opt

2018-05-01 Thread Atul Gupta
HW supported socket options are handled by HW while rest are handled by SW Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h | 10 ++ drivers/crypto/chelsio/chtls/chtls_cm.h | 12 ++ drivers/crypto/chelsio/chtls/chtls_hw.c | 2 +- d

[PATCH v2 1/7] crypto: chtls: wait for memory sendmsg, sendpage

2018-05-01 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 v2 3/7] crypto: chtls: dereference null variable

2018-05-01 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/7] crypto:chtls: key len correction

2018-05-01 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 4/7] crypto: chtls: kbuild warnings

2018-05-01 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/7] crypto: chtls: free beyond end rspq_skb_cache

2018-05-01 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 v2 6/7] crypto: chtls: generic handling of data and hdr

2018-05-01 Thread Atul Gupta
removed redundant check and made TLS PDU and header recv handling common as received from HW Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Harsh Jain <ha...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls.h| 10 ++ drivers/crypto/chelsio/chtls/cht

[PATCH net-next 2/2] chcr: Add support for Inline IPSec

2017-10-27 Thread Atul Gupta
register xfrmdev_ops callbacks, Send IPsec tunneled data to HW for inline processing. The driver use hardware crypto accelerator to encrypt and generate ICV for the transmitted packet in Inline mode. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Harsh Jain <ha...@ch

[PATCH net-next 1/2] cxgb4: Add support for Inline IPSec Tx

2017-10-27 Thread Atul Gupta
Added Tx routine for ULD - define interface for ULD Tx. Export routines used for Tx data - Routines common for data transmit are used by cxgb4 and chcr drivers. - EXPORT routines enable transmit from chcr driver. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Signed-off-by: Ganesh

RE: [RFC crypto v3 0/9] Chelsio Inline TLS

2018-01-10 Thread Atul Gupta
Would truly appreciate your feedback and make progress. Thanks and Regards Atul -Original Message- From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto-ow...@vger.kernel.org] On Behalf Of Atul Gupta Sent: Wednesday, January 3, 2018 12:36 PM To: herb...@gondor.apana.org.au

Re: [RFC crypto v3 0/9] Chelsio Inline TLS

2018-01-23 Thread Atul Gupta
On Monday 22 January 2018 03:46 AM, Sabrina Dubroca wrote: 2017-12-20, 17:03:02 +0530, Atul Gupta wrote: RFC series for Chelsio Inline TLS driver (chtls.ko) Driver use the ULP infrastructure to register chtls as Inline TLS ULP. I don't think drivers should be registering their own ULP. TLS

RE: [RFC crypto v3 8/9] chtls: Register the ULP

2018-01-27 Thread Atul Gupta
-Original Message- From: Dave Watson [mailto:davejwat...@fb.com] Sent: Friday, January 26, 2018 2:39 AM To: Atul Gupta <atul.gu...@chelsio.com> Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org; ganes...@chelsio.co; net...@vger.kernel.org; da...@davemloft.net;

RE: [RFC crypto v3 8/9] chtls: Register the ULP

2018-01-31 Thread Atul Gupta
-Original Message- From: Dave Watson [mailto:davejwat...@fb.com] Sent: Wednesday, January 31, 2018 10:14 PM To: Atul Gupta <atul.gu...@chelsio.com> Cc: s...@queasysnail.net; herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org; ganes...@chelsio.co; net...@vger.kernel.or

Re: [RFC crypto v3 8/9] chtls: Register the ULP

2018-01-31 Thread Atul Gupta
On Tuesday 30 January 2018 10:41 PM, Dave Watson wrote: On 01/30/18 06:51 AM, Atul Gupta wrote: What I was referring is that passing "tls" ulp type in setsockopt may be insufficient to make the decision when multi HW assist Inline TLS solution exists. Setting the ULP doesn't choos

RE: [RFC crypto v3 8/9] chtls: Register the ULP

2018-01-29 Thread Atul Gupta
al Message----- From: Atul Gupta Sent: Sunday, January 28, 2018 11:26 AM To: 'Dave Watson' <davejwat...@fb.com> Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org; ganes...@chelsio.co; net...@vger.kernel.org; da...@davemloft.net; Boris Pismenny <bor...@mellanox.com>; Ilya Lesokh

RE: [RFC crypto v3 8/9] chtls: Register the ULP

2018-02-08 Thread Atul Gupta
cord offload to HW, which does tx/rx and record creation Inline. enum { TLS_BASE_TX, TLS_SW_TX, TLS_RECORD_HW, /* TLS record processed Inline */ TLS_NUM_CONFIG, }; -Original Message- From: Dave Watson [mailto:davejwat...@fb.com] Sent: Wednesday, January

[Crypto v4 10/12] chtls: Inline crypto request Tx/Rx

2018-02-12 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request and post to FW. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1867 +++ 1 file changed, 1867 insertions(+) create mode 100644 drivers/

[Crypto v4 09/12] chtls: CPL handler definition

2018-02-12 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2045 +++ net/ipv4/tcp_minisocks.c|1 + 2 files changed, 2046 insertions(+) creat

[Crypto v4 12/12] Makefile Kconfig

2018-02-12 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

[Crypto v4 11/12] chtls: Register the chtls Inline TLS with net tls

2018-02-12 Thread Atul Gupta
Add new uld driver for Inline TLS support. Register ULP for chtls. Setsockopt to program key on chip. support AES GCM key size 128. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c | 619 ++ include/uapi/linux

[Crypto v4 01/12] tls: tls_device struct to register TLS drivers

2018-02-12 Thread Atul Gupta
added tls_device structure to register Inline TLS drivers with net/tls Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/net/tls.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/net/tls.h b/include/net/tls.h index 936cfc5..2a9f392

[Crypto v4 02/12] ethtool: feature for Inline TLS in HW

2018-02-12 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/ethtool.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index b1b0ca7..e1a33b7 100644 --- a/include

[Crypto v4 04/12] chtls: structure and macro definiton

2018-02-12 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 | 203 + 2 files change

[Crypto v4 03/12] support for inline tls

2018-02-12 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- net/tls/tls_main.c | 113 + 1 file changed, 113 insertions(+) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index e07ee3a..10a6d5d 100644 --- a/net/tls/tls_main.c +++ b/n

[Crypto v4 08/12] chtls: Key program

2018-02-12 Thread Atul Gupta
Program the tx and rx key on chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_hw.c diff --git a/drivers/

[Crypto v4 06/12] cxgb4: LLD driver changes to enable TLS

2018-02-12 Thread Atul Gupta
Read FW capability. Read key area size. Dump the TLS record count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 18 +++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 32 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4

[Crypto v4 07/12] chcr: Key Macro

2018-02-12 Thread Atul Gupta
Define macro for 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(+), 1 deletion(-)

RE: [Crypto v4 03/12] support for inline tls

2018-02-13 Thread Atul Gupta
-Original Message- From: David Miller [mailto:da...@davemloft.net] Sent: Tuesday, February 13, 2018 1:19 AM To: Atul Gupta <atul.gu...@chelsio.com> Cc: davejwat...@fb.com; herb...@gondor.apana.org.au; s...@queasysnail.net; linux-crypto@vger.kernel.org; net...@vger.kernel.org; Gan

[Crypto v5 09/12] chtls: CPL handler definition

2018-02-14 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2046 +++ net/ipv4/tcp_minisocks.c|1 + 2 files changed, 2047 insertions(+) creat

[Crypto v5 00/12] Chelsio Inline TLS

2018-02-14 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: tls_device struct to register TLS drivers ethtool: feature for Inline TLS in HW support for inline tls chtls:

[Crypto v5 04/12] chtls: structure and macro definiton

2018-02-14 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 | 203 + 2 files change

[Crypto v5 02/12] ethtool: feature for Inline TLS in HW

2018-02-14 Thread Atul Gupta
Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/linux/netdev_features.h | 2 ++ net/core/ethtool.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index b1b0ca7..e1a33b7 100644 --- a/include

[Crypto v5 03/12] support for inline tls

2018-02-14 Thread Atul Gupta
. default mode TLS_SW_TX continues Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- net/tls/tls_main.c | 124 ++--- 1 file changed, 117 insertions(+), 7 deletions(-) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index e07ee3a..8

[Crypto v5 01/12] tls: tls_device struct to register TLS drivers

2018-02-14 Thread Atul Gupta
tls_device structure to register Inline TLS drivers with net/tls Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- include/net/tls.h | 24 1 file changed, 24 insertions(+) diff --git a/include/net/tls.h b/include/net/tls.h index 936cfc5..6b64510

[Crypto v5 06/12] cxgb4: LLD driver changes to enable TLS

2018-02-14 Thread Atul Gupta
Read FW capability. Read key area size. Dump the TLS record count. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 18 +++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 32 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4

[Crypto v5 11/12] chtls: Register the chtls Inline TLS with net tls

2018-02-14 Thread Atul Gupta
Add new uld driver for Inline TLS support. Register ULP for chtls. Setsockopt to program key on chip. support AES GCM key size 128. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_main.c | 574 ++ include/uapi/linux

[Crypto v5 07/12] chcr: Key Macro

2018-02-14 Thread Atul Gupta
Define macro for 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(+), 1 deletion(-)

[Crypto v5 10/12] chtls: Inline crypto request Tx/Rx

2018-02-14 Thread Atul Gupta
TLS handler for record transmit and receive. Create Inline TLS work request and post to FW. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_io.c | 1867 +++ 1 file changed, 1867 insertions(+) create mode 100644 drivers/

[Crypto v5 05/12] cxgb4: Inline TLS FW Interface

2018-02-14 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

[Crypto v5 12/12] Makefile Kconfig

2018-02-14 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

[Crypto v5 08/12] chtls: Key program

2018-02-14 Thread Atul Gupta
Program the tx and rx key on chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_hw.c diff --git a/drivers/

RE: [Crypto v5 03/12] support for inline tls

2018-02-15 Thread Atul Gupta
-Original Message- From: Dave Watson [mailto:davejwat...@fb.com] Sent: Thursday, February 15, 2018 9:22 PM To: Atul Gupta <atul.gu...@chelsio.com> Cc: da...@davemloft.net; herb...@gondor.apana.org.au; s...@queasysnail.net; linux-crypto@vger.kernel.org; net...@vger.kernel.org; Gan

RE: [Crypto v5 03/12] support for inline tls

2018-02-15 Thread Atul Gupta
> > > @@ -401,6 +430,15 @@ static int do_tls_setsockopt_tx(struct sock *sk, > > > char __user *optval, > > > goto out; > > > } > > > > > > + rc = get_tls_offload_dev(sk); > > > + if (rc) { > > > + goto out; > > > + } else { > > > + /* Retain HW unhash for cleanup and

[Crypto v6 08/12] chtls: Key program

2018-02-18 Thread Atul Gupta
Program the tx and rx key on chip. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_hw.c | 394 1 file changed, 394 insertions(+) create mode 100644 drivers/crypto/chelsio/chtls/chtls_hw.c diff --git a/drivers/

[Crypto v6 09/12] chtls: CPL handler definition

2018-02-18 Thread Atul Gupta
CPL handlers for TLS session, record transmit and receive. Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 2041 +++ net/ipv4/tcp_minisocks.c|1 + 2 files changed, 2042 insertions(+) creat

[Crypto v6 12/12] Makefile Kconfig

2018-02-18 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

  1   2   3   >