Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446047 > unrolled thread

[Patch-V2 0/3] crypto/chcr: Add Chelsio Crypto Driver

Started byYeshaswi M R Gowda <yeshaswi@chelsio.com>
First post2016-07-19 07:50 +0200
Last post2016-07-20 06:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [Patch-V2 0/3] crypto/chcr: Add Chelsio Crypto Driver Yeshaswi M R Gowda <yeshaswi@chelsio.com> - 2016-07-19 07:50 +0200
    [Patch-V2 3/3] crypto: Added Chelsio Menu to the Kconfig file Yeshaswi M R Gowda <yeshaswi@chelsio.com> - 2016-07-19 07:50 +0200
    Re: [Patch-V2 2/3] chcr: Support for Chelsio's Crypto Hardware David Miller <davem@davemloft.net> - 2016-07-20 06:20 +0200

#1446047 — [Patch-V2 0/3] crypto/chcr: Add Chelsio Crypto Driver

FromYeshaswi M R Gowda <yeshaswi@chelsio.com>
Date2016-07-19 07:50 +0200
Subject[Patch-V2 0/3] crypto/chcr: Add Chelsio Crypto Driver
Message-ID<rWw4O-8qp-5@gated-at.bofh.it>
Hi Herbert,

This patch series contains 3 patches that add support for Chelsio's
Crypto Hardware.

The patch series has been created against Herbert Xu's tree (crypto-2.6).
It includes patches for Chelsio Low Level Driver(cxgb4) and adds the new
crypto Upper Layer Driver(chcr) under a new directory drivers/crypto/chelsio.

The first of the patch series implements necessary changes in the Chelsio
LLD for queue allocation, deallocation and registration of the ULD.

The second patch implements the Chelsio crypto driver.

The third patch contains the changes to the driver/crypto/Kconfig and
drivers/crypto/Makefile to enable the Chelsio Crypto driver.

We have included all the maintainers of respective drivers. Kindly
review the changes and provide feedback on the same.

Thank you Joe Perches and Herbert Xu for your review, I have made appropriate
changes based on them.

[V1 -> V2]

1. Some residual code cleanup
2. Adds pr_fmt with chcr (KBUILD_MODNAME) added
3. Changes var name to accomodate them <80 columns in the chcr_register_alg
4. Support for printing the crypto queue stats
5. Fix compile warnings reported by kbuild bot for certain architectures
6. Dependency fix in Kconfig.
7. If the request has the MAY_BACKLOG bit set and hardware queue is full the request
   is queued up else -EBUSY is returned to throttle the user. The queue when executed
   and processed returns -EINPROGRESS in completion.

Yeshaswi M R Gowda (3):
  cxgb4: Add Chelsio LLD support Chelsio Crypto ULD
  chcr: Support for Chelsio's Crypto Hardware
  crypto: Added Chelsio Menu to the Kconfig file

 drivers/crypto/Kconfig                             |    2 +
 drivers/crypto/Makefile                            |    1 +
 drivers/crypto/chelsio/Kconfig                     |   21 +
 drivers/crypto/chelsio/Makefile                    |    4 +
 drivers/crypto/chelsio/chcr_algo.c                 | 1509 ++++++++++++++++++++
 drivers/crypto/chelsio/chcr_algo.h                 |  503 +++++++
 drivers/crypto/chelsio/chcr_core.c                 |  268 ++++
 drivers/crypto/chelsio/chcr_core.h                 |   80 ++
 drivers/crypto/chelsio/chcr_crypto.h               |  204 +++
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h         |   18 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |   41 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |   80 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h     |   10 +
 drivers/net/ethernet/chelsio/cxgb4/sge.c           |   64 +
 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h        |  437 ++++++
 drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h      |  131 +-
 16 files changed, 3362 insertions(+), 11 deletions(-)
 create mode 100644 drivers/crypto/chelsio/Kconfig
 create mode 100644 drivers/crypto/chelsio/Makefile
 create mode 100644 drivers/crypto/chelsio/chcr_algo.c
 create mode 100644 drivers/crypto/chelsio/chcr_algo.h
 create mode 100644 drivers/crypto/chelsio/chcr_core.c
 create mode 100644 drivers/crypto/chelsio/chcr_core.h
 create mode 100644 drivers/crypto/chelsio/chcr_crypto.h

-- 
1.7.10.1

[toc] | [next] | [standalone]


#1446048 — [Patch-V2 3/3] crypto: Added Chelsio Menu to the Kconfig file

FromYeshaswi M R Gowda <yeshaswi@chelsio.com>
Date2016-07-19 07:50 +0200
Subject[Patch-V2 3/3] crypto: Added Chelsio Menu to the Kconfig file
Message-ID<rWw4O-8qp-13@gated-at.bofh.it>
In reply to#1446047
Adds the config entry for the Chelsio Crypto Driver, Makefile changes
for the same.

Signed-off-by: Yeshaswi M R Gowda <yeshaswi@chelsio.com>
---
 drivers/crypto/Kconfig  |    2 ++
 drivers/crypto/Makefile |    1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index d77ba2f..b44faf0 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -537,4 +537,6 @@ config CRYPTO_DEV_ROCKCHIP
 	  This driver interfaces with the hardware crypto accelerator.
 	  Supporting cbc/ecb chainmode, and aes/des/des3_ede cipher mode.
 
+source "drivers/crypto/chelsio/Kconfig"
+
 endif # CRYPTO_HW
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 3c6432d..ad7250f 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -31,3 +31,4 @@ obj-$(CONFIG_CRYPTO_DEV_QCE) += qce/
 obj-$(CONFIG_CRYPTO_DEV_VMX) += vmx/
 obj-$(CONFIG_CRYPTO_DEV_SUN4I_SS) += sunxi-ss/
 obj-$(CONFIG_CRYPTO_DEV_ROCKCHIP) += rockchip/
+obj-$(CONFIG_CRYPTO_DEV_CHELSIO) += chelsio/
-- 
1.7.10.1

[toc] | [prev] | [next] | [standalone]


#1446942 — Re: [Patch-V2 2/3] chcr: Support for Chelsio's Crypto Hardware

FromDavid Miller <davem@davemloft.net>
Date2016-07-20 06:20 +0200
SubjectRe: [Patch-V2 2/3] chcr: Support for Chelsio's Crypto Hardware
Message-ID<rWR9f-4VD-5@gated-at.bofh.it>
In reply to#1446047
From: Yeshaswi M R Gowda <yeshaswi@chelsio.com>
Date: Mon, 18 Jul 2016 22:42:14 -0700

> +config CRYPTO_DEV_CHELSIO
> +	tristate "Chelsio Crypto Co-processor Driver"
> +	depends on PCI && NETDEVICES && ETHERNET
> +	select CRYPTO_SHA1
> +	select CRYPTO_SHA256
> +	select CRYPTO_SHA512
> +	select NET_VENDOR_CHELSIO
> +	select CHELSIO_T4

The user shouldn't have to know about the technical details about
how this chip is physically implemented.

It's therefore not reasonable to require an ethernet driver to be
enabled to use the crypto engine.

Also, selecting Kconfig symbol X does not recursively enable the
"select" statement(s) of symbol X nor does it check symbol X's
dependencies.

This is really one big huge dependency mess, and I think you have
to split out the core of the T4 driver into a driver subtype
agnostic library or similar to make this work properly.

Don't just shoehorn this stuff into the ethernet driver.  Round
peg, square hole.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web