Re: [PATCH 2/2] crypto: qat - Enforce valid numa configuration.

2014-10-09 Thread Prarit Bhargava
[sorry ... accidentally hit reply instead of reply all ... resending to everyone] On 10/08/2014 03:25 PM, Tadeusz Struk wrote: On 10/08/2014 12:01 PM, Prarit Bhargava wrote: No that isn't correct. dev_to_node() will return the node the device is connected to. include/linux/device.h:

[PATCH 2/2] crypto: caam - add support for rfc4106(gcm(aes))

2014-10-09 Thread Tudor Ambarus
Add Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM) as an IPsec Encapsulating Security Payload (ESP) mechanism to provide confidentiality and data origin authentication. Signed-off-by: Tudor Ambarus tudor.amba...@freescale.com --- drivers/crypto/caam/caamalg.c | 430

[PATCH 1/2] crypto: caam - add support for gcm(aes)

2014-10-09 Thread Tudor Ambarus
Add support for AES working in Galois Counter Mode. There is a limitation related to IV size, similar to the one present in SW implementation (crypto/gcm.c): The only IV size allowed is 12 bytes. It will be padded by HW to the right with 0x_0001 (up to 16 bytes - AES block size), according to

Re: [PATCH 2/2] crypto: qat - Enforce valid numa configuration.

2014-10-09 Thread Tadeusz Struk
On 10/09/2014 04:23 AM, Prarit Bhargava wrote: int numa_node; /* NUMA node this device is close to */ ... That's just bad english. The numa node value (for pci devices) is read from the ACPI tables on the system and represents the node that the pci_dev is connected to. }; In case

Re: [PATCH 2/2] crypto: qat - Enforce valid numa configuration.

2014-10-09 Thread Prarit Bhargava
On 10/09/2014 12:14 PM, Tadeusz Struk wrote: On 10/09/2014 04:23 AM, Prarit Bhargava wrote: int numa_node; /* NUMA node this device is close to */ ... That's just bad english. The numa node value (for pci devices) is read from the ACPI tables on the system and represents the node that

Re: [PATCH 2/2] crypto: qat - Enforce valid numa configuration.

2014-10-09 Thread Tadeusz Struk
On 10/09/2014 10:32 AM, Prarit Bhargava wrote: This calculation is sole for multi-socket configuration. This is why is was introduced and what it was tested for. There is no point discussing NUMA for single-socket configuration. Single socket configurations are not NUMA. In this case

Re: [PATCH 2/2] crypto: qat - Enforce valid numa configuration.

2014-10-09 Thread Prarit Bhargava
On 10/09/2014 03:55 PM, Tadeusz Struk wrote: On 10/09/2014 10:32 AM, Prarit Bhargava wrote: This calculation is sole for multi-socket configuration. This is why is was introduced and what it was tested for. There is no point discussing NUMA for single-socket configuration. Single socket

Re: [PATCH 2/2] crypto: qat - Enforce valid numa configuration.

2014-10-09 Thread Tadeusz Struk
On 10/09/2014 02:42 PM, Prarit Bhargava wrote: I don't think cpu hotplug matters here. This is one (probe) time determination if the configuration is optimal or not and if it makes sense to use this accelerator or not. It absolutely matters. num_online_cpus() *changes* depending on the #

Re: [PATCH 1/2] crypto: caam - add support for gcm(aes)

2014-10-09 Thread Kim Phillips
On Thu, 9 Oct 2014 17:54:09 +0300 Tudor Ambarus tudor.amba...@freescale.com wrote: + /* + * Job Descriptor and Shared Descriptors + * must all fit into the 64-word Descriptor h/w Buffer + */ + if (DESC_GCM_DEC_LEN + DESC_JOB_IO_LEN + + ctx-enckeylen =

Re: [PATCH 2/2] crypto: caam - add support for rfc4106(gcm(aes))

2014-10-09 Thread Kim Phillips
On Thu, 9 Oct 2014 17:54:10 +0300 Tudor Ambarus tudor.amba...@freescale.com wrote: +static int rfc4106_set_sh_desc(struct crypto_aead *aead) ... + /* + * Job Descriptor and Shared Descriptors + * must all fit into the 64-word Descriptor h/w Buffer + */ + if