Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-22 Thread Kirill Tkhai
On 22.03.2018 15:38, Boris Pismenny wrote: > ... Can't we move this check in tls_dev_event() and use it for all types of events? Then we avoid duplicate code. >>> >>> No. Not all events require this check. Also, the result is different for >>> different events. >> >> No.

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-22 Thread Boris Pismenny
... Can't we move this check in tls_dev_event() and use it for all types of events? Then we avoid duplicate code. No. Not all events require this check. Also, the result is different for different events. No. You always return NOTIFY_DONE, in case of !(netdev->features & NETIF_F_HW_TLS_TX

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-21 Thread Saeed Mahameed
On Wed, 2018-03-21 at 19:31 +0300, Kirill Tkhai wrote: > On 21.03.2018 18:53, Boris Pismenny wrote: > > ... > > > > > > Other patches have two licenses in header. Can I distribute this > > > file under GPL license terms? > > > > > > > Sure, I'll update the license to match other files under net/

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-21 Thread Kirill Tkhai
On 21.03.2018 18:53, Boris Pismenny wrote: > ... >> >> Other patches have two licenses in header. Can I distribute this file under >> GPL license terms? >> > > Sure, I'll update the license to match other files under net/tls. > >>> +#include >>> +#include >>> +#include >>> +#include >>> +#in

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-21 Thread Boris Pismenny
... Other patches have two licenses in header. Can I distribute this file under GPL license terms? Sure, I'll update the license to match other files under net/tls. +#include +#include +#include +#include +#include + +#include +#include + +/* device_offload_lock is used to synchroni

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-21 Thread Boris Pismenny
On 3/21/2018 5:08 PM, Dave Watson wrote: On 03/19/18 07:45 PM, Saeed Mahameed wrote: +#define TLS_OFFLOAD_CONTEXT_SIZE \ + (ALIGN(sizeof(struct tls_offload_context), sizeof(void *)) + \ +TLS_DRIVER_STATE_SIZE) + + pfr

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-21 Thread Dave Watson
On 03/19/18 07:45 PM, Saeed Mahameed wrote: > +#define TLS_OFFLOAD_CONTEXT_SIZE > \ > + (ALIGN(sizeof(struct tls_offload_context), sizeof(void *)) + \ > + TLS_DRIVER_STATE_SIZE) > + > + pfrag = sk_page_frag(sk); > + > + /* KT

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-21 Thread Kirill Tkhai
On 20.03.2018 05:45, Saeed Mahameed wrote: > From: Ilya Lesokhin > > This patch adds a generic infrastructure to offload TLS crypto to a > network devices. It enables the kernel TLS socket to skip encryption > and authentication operations on the transmit side of the data path. > Leaving those co

[PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-19 Thread Saeed Mahameed
From: Ilya Lesokhin This patch adds a generic infrastructure to offload TLS crypto to a network devices. It enables the kernel TLS socket to skip encryption and authentication operations on the transmit side of the data path. Leaving those computationally expensive operations to the NIC. The NIC