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

2014-10-10 Thread Prarit Bhargava
On 10/10/2014 09:25 AM, Tadeusz Struk wrote: > On 10/10/2014 04:23 AM, Prarit Bhargava wrote: >>> Sure, but I still think that we are safe here. >> No, you're not. Dropping a single CPU changes num_online_cpus(), which >> results in >> >> static uint8_t adf_get_dev_node_id(struct pci_dev *

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

2014-10-10 Thread Kim Phillips
On Fri, 10 Oct 2014 03:47:18 -0500 Ambarus Tudor-Dan-B38632 wrote: > On Thu, 9 Oct 2014 17:54:09 +0300 > Tudor Ambarus wrote: > > + /* Galois Counter Mode */ > > + { > > + .name = "gcm(aes)", > > + .driver_name = "gcm-aes-caam", > > + .blocksize = 1, > > +

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

2014-10-10 Thread Kim Phillips
On Fri, 10 Oct 2014 05:10:55 -0500 Ambarus Tudor-Dan-B38632 wrote: > On Thu, 9 Oct 2014 17:54:10 +0300 > Tudor Ambarus wrote: > > +static int rfc4106_setauthsize(struct crypto_aead *authenc, > > + unsigned int authsize) > > +{ > > + struct caam_ctx *ctx = crypto_aead_c

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

2014-10-10 Thread Tadeusz Struk
On 10/10/2014 04:23 AM, Prarit Bhargava wrote: >> Sure, but I still think that we are safe here. >> > > No, you're not. Dropping a single CPU changes num_online_cpus(), which > results in > > static uint8_t adf_get_dev_node_id(struct pci_dev *pdev) > { > unsigned int bus_per_cpu = 0; >

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

2014-10-10 Thread Prarit Bhargava
On 10/09/2014 07:12 PM, Tadeusz Struk wrote: > 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

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

2014-10-10 Thread tudor.amba...@freescale.com
On Thu, 9 Oct 2014 17:54:10 +0300 Tudor Ambarus 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 (DESC_RFC4106_DEC_LEN + DESC_JO

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

2014-10-10 Thread tudor.amba...@freescale.com
On Thu, 9 Oct 2014 17:54:09 +0300 Tudor Ambarus 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 <= CAAM_DESC_BYTES_MAX) > +