Re: [PATCH v2 0/3] dmaengine: Add supports for APM X-Gene SoC CRC32C accerlerator driver

2015-12-09 Thread Rameshwar Sahu
On Wed, Dec 9, 2015 at 1:57 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote:
> On Wed, Dec 09, 2015 at 01:55:55PM +0530, Rameshwar Sahu wrote:
>>
>> Any comments on above patch ??
>
> My concern that there aren't going to be any in-kernel users remains.
Yes, we are not upstream in-kernel users right now, but later client
ma upstream there patches.

>
> Cheers,
> --
> Email: Herbert Xu <herb...@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] dmaengine: Add supports for APM X-Gene SoC CRC32C accerlerator driver

2015-12-09 Thread Rameshwar Sahu
Hi,

On Mon, Nov 16, 2015 at 2:42 PM,   wrote:
> From: Rameshwar Prasad Sahu 
>
> This patch implements support for APM X-Gene SoC CRC32C h/w accelerator driver
> and adds CRC32C computations support in dmaengine framework. APM X-Gene SoC 
> has
> DMA engine capable of performing CRC32C computations.
>
> v2 changes:
> 1. Added helper function in dmaengine framework
> 2. Documented CRC32C support in Documentations/dmaengine/provider.txt
> 3. Fixed algo name
> 4. Fixed coding style issues
>
> Signed-off-by: Rameshwar Prasad Sahu 
> ---
>
> Rameshwar Prasad Sahu (3):
>   dmaengine: Add support for new feature CRC32C computations
>   dmaengine: xgene-dma: Add support for CRC32C computations via DMA
> engine
>   Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver
>
>  Documentation/dmaengine/provider.txt |3 +
>  drivers/crypto/Kconfig   |8 +
>  drivers/crypto/Makefile  |1 +
>  drivers/crypto/xgene-crc32c.c|  234 +
>  drivers/dma/dmaengine.c  |2 +
>  drivers/dma/xgene-dma.c  |  314 
> --
>  include/linux/dmaengine.h|   13 ++
>  7 files changed, 560 insertions(+), 15 deletions(-)
>  create mode 100755 drivers/crypto/xgene-crc32c.c

Any comments on above patch ??
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] dmaengine: Add supports for APM X-Gene SoC CRC32C accerlerator driver

2015-11-30 Thread Rameshwar Sahu
Hi Herbert,

On Mon, Nov 30, 2015 at 2:20 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote:
> On Mon, Nov 30, 2015 at 02:19:33PM +0530, Rameshwar Sahu wrote:
>>
>> One of our client is using this layer for offloading the crc32c to our
>> dmaengine hw.
>
> Is this going to be merged into the kernel?
I am not sure about it, but as what I thought is Linux kernel supports
many algos in async mode and sync mode, later client has to take care
which one they are going to use.
Any way this offload implementation is specific to Applied Micro
X-Gene SoC, where we have such a dmaengine can do CRC32c.
>
> Cheers,
> --
> Email: Herbert Xu <herb...@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] dmaengine: Add supports for APM X-Gene SoC CRC32C accerlerator driver

2015-11-30 Thread Rameshwar Sahu
On Mon, Nov 16, 2015 at 2:42 PM,   wrote:
> From: Rameshwar Prasad Sahu 
>
> This patch implements support for APM X-Gene SoC CRC32C h/w accelerator driver
> and adds CRC32C computations support in dmaengine framework. APM X-Gene SoC 
> has
> DMA engine capable of performing CRC32C computations.
>
> v2 changes:
> 1. Added helper function in dmaengine framework
> 2. Documented CRC32C support in Documentations/dmaengine/provider.txt
> 3. Fixed algo name
> 4. Fixed coding style issues
>
> Signed-off-by: Rameshwar Prasad Sahu 
> ---
>
> Rameshwar Prasad Sahu (3):
>   dmaengine: Add support for new feature CRC32C computations
>   dmaengine: xgene-dma: Add support for CRC32C computations via DMA
> engine
>   Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver
>
>  Documentation/dmaengine/provider.txt |3 +
>  drivers/crypto/Kconfig   |8 +
>  drivers/crypto/Makefile  |1 +
>  drivers/crypto/xgene-crc32c.c|  234 +
>  drivers/dma/dmaengine.c  |2 +
>  drivers/dma/xgene-dma.c  |  314 
> --
>  include/linux/dmaengine.h|   13 ++
>  7 files changed, 560 insertions(+), 15 deletions(-)
>  create mode 100755 drivers/crypto/xgene-crc32c.c

Any Comments on above patchset ??
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] dmaengine: Add supports for APM X-Gene SoC CRC32C accerlerator driver

2015-11-30 Thread Rameshwar Sahu
Hi Herbert,

On Mon, Nov 30, 2015 at 2:09 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote:
> On Mon, Nov 30, 2015 at 02:06:03PM +0530, Rameshwar Sahu wrote:
>> On Mon, Nov 16, 2015 at 2:42 PM,  <rs...@apm.com> wrote:
>> > From: Rameshwar Prasad Sahu <rs...@apm.com>
>> >
>> > This patch implements support for APM X-Gene SoC CRC32C h/w accelerator 
>> > driver
>> > and adds CRC32C computations support in dmaengine framework. APM X-Gene 
>> > SoC has
>> > DMA engine capable of performing CRC32C computations.
>> >
>> > v2 changes:
>> > 1. Added helper function in dmaengine framework
>> > 2. Documented CRC32C support in 
>> > Documentations/dmaengine/provider.txt
>> > 3. Fixed algo name
>> > 4. Fixed coding style issues
>> >
>> > Signed-off-by: Rameshwar Prasad Sahu <rs...@apm.com>
>> > ---
>> >
>> > Rameshwar Prasad Sahu (3):
>> >   dmaengine: Add support for new feature CRC32C computations
>> >   dmaengine: xgene-dma: Add support for CRC32C computations via DMA
>> > engine
>> >   Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver
>> >
>> >  Documentation/dmaengine/provider.txt |3 +
>> >  drivers/crypto/Kconfig   |8 +
>> >  drivers/crypto/Makefile  |1 +
>> >  drivers/crypto/xgene-crc32c.c|  234 +
>> >  drivers/dma/dmaengine.c  |2 +
>> >  drivers/dma/xgene-dma.c  |  314 
>> > --
>> >  include/linux/dmaengine.h|   13 ++
>> >  7 files changed, 560 insertions(+), 15 deletions(-)
>> >  create mode 100755 drivers/crypto/xgene-crc32c.c
>>
>> Any Comments on above patchset ??
>
> The main user of crc32c is lib/libcrc32c.c.  Unfortunately it is
> entire synchronous so it won't be able to use your crc32c driver
> at all.

This is asynchronous implementation of the crc32c, mainly for
offloading the computations, So client (who want to use it) can call
it as like other async crypto algos available in linux/crypto, so they
have frame the layer on top of this.
>
> So who is going to be using this?
One of our client is using this layer for offloading the crc32c to our
dmaengine hw.

>
> Cheers,
> --
> Email: Herbert Xu <herb...@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 1/4] dmaengine: Add support for new feature CRC32C

2015-08-20 Thread Rameshwar Sahu
On Thu, Aug 20, 2015 at 12:38 PM, Vinod Koul vinod.k...@intel.com wrote:
 On Thu, Aug 20, 2015 at 11:59:07AM +0530, Rameshwar Sahu wrote:
 Hi Vinod,

 On Thu, Aug 20, 2015 at 10:56 AM, Vinod Koul vinod.k...@intel.com wrote:
  On Thu, Jul 30, 2015 at 05:41:05PM +0530, Rameshwar Prasad Sahu wrote:
  This patch adds support for new feature CRC32C calculation in
  dmaengine framework.
 
  Looks okay can you please update Documentation also

 Thanks, I will update Documentation.

 Also add a wrapper for new API
Okay

 --
 ~Vinod

--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 1/4] dmaengine: Add support for new feature CRC32C

2015-08-20 Thread Rameshwar Sahu
Hi Vinod,

On Thu, Aug 20, 2015 at 10:56 AM, Vinod Koul vinod.k...@intel.com wrote:
 On Thu, Jul 30, 2015 at 05:41:05PM +0530, Rameshwar Prasad Sahu wrote:
 This patch adds support for new feature CRC32C calculation in
 dmaengine framework.

 Looks okay can you please update Documentation also

Thanks, I will update Documentation.

 --
 ~Vinod

--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 3/4] Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver

2015-08-20 Thread Rameshwar Sahu
Hi Vinod,

On Thu, Aug 20, 2015 at 11:18 AM, Vinod Koul vinod.k...@intel.com wrote:
 On Thu, Jul 30, 2015 at 05:41:07PM +0530, Rameshwar Prasad Sahu wrote:
 + nents = sg_nents(req-src);
 + sg_count = dma_map_sg(dev, req-src, nents, DMA_TO_DEVICE);
 + if (!sg_count) {
 + dev_err(dev, Failed to map src sg);
 + return -ENOMEM;
 mapping error shouldn't be no mem error
Okay, I guess then -EIO will be fine here??

 + }
 +
 + if (sg_count  XGENE_DMA_MAX_FLYBY_SRC_CNT) {
 + dev_err(dev, Unsupported src sg len\n);
 would be worth printing length
Okay,

 + goto err;
 + }
 +
 + flags = DMA_CTRL_ACK;
 why ACK?
My understanding about DMA_CTRL_ACK is dma engine driver can
re-use/free this descriptor once operation completed in cleanup path.
Am I correct ??
But yes, I need to look on this because recently you have added one
more descriptor flag.


 +
 + tx = dchan-device-device_prep_dma_crc32c(dchan, req-src,
 +req-nbytes,
 +reqctx-seed,
 +req-result,
 +flags);
 We should add helper for this
Okay

 --
 ~Vinod

--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 2/4] dmaengine: xgene-dma: Add support for CRC32C calculation via DMA engine

2015-08-20 Thread Rameshwar Sahu
Hi Vinod,

On Thu, Aug 20, 2015 at 11:10 AM, Vinod Koul vinod.k...@intel.com wrote:
 On Thu, Jul 30, 2015 at 05:41:06PM +0530, Rameshwar Prasad Sahu wrote:
 + /* Invalidate unused source address field */
 + for (; i  4; i++)
 + xgene_dma_invalidate_buffer(xgene_dma_lookup_ext8(desc2, i));
 +
 + /* Check whether requested buffer processed */
 + if (nbytes) {
 + chan_err(chan, Src count crossed maximum limit\n);
 + return -EINVAL;
 no cleanup ?
Here not required, cleanup I am doing in parent function from where
this function is getting called in case of failure.

 +struct dma_async_tx_descriptor *xgene_dma_prep_flyby(
 + struct xgene_dma_chan *chan, struct scatterlist *src_sg,
 + size_t len, u32 seed, u8 *result, unsigned long flags, u8 opcode)
 please fix style here

Could you explain me What kind of coding style you would like here ??

 +struct dma_async_tx_descriptor *xgene_dma_prep_crc32c(
 + struct dma_chan *dchan, struct scatterlist *src_sg,
 + size_t len, u32 seed, u8 *result, unsigned long flags)
 here too

 @@ -1309,8 +1512,13 @@ static void xgene_dma_setup_ring(struct 
 xgene_dma_ring *ring)
 ring-pdma-csr_ring + XGENE_DMA_RING_ID);

   /* Set DMA ring buffer */
 - iowrite32(XGENE_DMA_RING_ID_BUF_SETUP(ring-num),
 -   ring-pdma-csr_ring + XGENE_DMA_RING_ID_BUF);
 + ring_id_buf = XGENE_DMA_RING_ID_BUF_SETUP(ring-num);
 +
 + if (ring-is_bufpool)
 + ring_id_buf |= XGENE_DMA_RING_IS_BUFPOOL;
 +
 + iowrite32(ring_id_buf, ring-pdma-csr_ring +
 +   XGENE_DMA_RING_ID_BUF);
 pls fix style here
I didn't see any alignment issue here, just follow checkpatch that
argument should start just after function( in next line also.

 --
 ~Vinod
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 3/4] Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver

2015-07-31 Thread Rameshwar Sahu
On Fri, Jul 31, 2015 at 12:43 PM, Herbert Xu
herb...@gondor.apana.org.au wrote:
 On Thu, Jul 30, 2015 at 05:41:07PM +0530, Rameshwar Prasad Sahu wrote:

 + .cra_name   = xgene(crc32c),
 + .cra_driver_name= crc32c-xgene,

 This looks wrong.  If you're implementing crc32c then cra_name
 should be just crc32c, i.e., the name of the algorithm that you
 are providing.

Okay, I will change it to crc32c only.

 +MODULE_DESCRIPTION(APM X-Gene SoC CRC32C HW accelerator driver);
 +MODULE_AUTHOR(Rameshwar Prasad Sahu rs...@apm.com);
 +MODULE_LICENSE(GPL);
 +MODULE_VERSION(1.0);

 You should add a MODULE_ALIAS_CRYPTO too.
Okay

 Cheers,
 --
 Email: Herbert Xu herb...@gondor.apana.org.au
 Home Page: http://gondor.apana.org.au/~herbert/
 PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
 --
 To unsubscribe from this list: send the line unsubscribe dmaengine in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 0/4] Crypto: tcrypt: Add test case for APM X-Gene SoC CRC32C algo

2015-07-30 Thread Rameshwar Sahu
Hi All,

On Thu, Jul 30, 2015 at 5:41 PM, Rameshwar Prasad Sahu rs...@apm.com wrote:
 This patch adds test case for APM X-Gene SoC CRC32C algorithm.

Please discard this patch description and subject line in this cover
letter, I have resent it again.

Thanks,
Ram


 Signed-off-by: Rameshwar Prasad Sahu rs...@apm.com
 ---

 Rameshwar Prasad Sahu (4):
   dmaengine: Add support for new feature CRC32C
   dmaengine: xgene-dma: Add support for CRC32C calculation via DMA
 engine
   Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver
   Crypto: tcrypt: Add test case for APM X-Gene SoC CRC32C algo

  crypto/tcrypt.c   |   4 +
  crypto/testmgr.c  |   9 ++
  drivers/crypto/Kconfig|   8 ++
  drivers/crypto/Makefile   |   1 +
  drivers/crypto/xgene-crc32c.c | 244 
  drivers/dma/dmaengine.c   |   2 +
  drivers/dma/xgene-dma.c   | 317 
 --
  include/linux/dmaengine.h |   5 +
  8 files changed, 575 insertions(+), 15 deletions(-)
  create mode 100755 drivers/crypto/xgene-crc32c.c

 --
 1.8.2.1
--
To unsubscribe from this list: send the line unsubscribe linux-crypto in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html