DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] common/caamflib: move shared sec HW code
@ 2019-08-06  9:19 Hemant Agrawal
  2019-08-06  9:36 ` Akhil Goyal
  2019-08-13  7:20 ` [dpdk-dev] [PATCH v2] common/dpaax: move shared sec HW code to common Hemant Agrawal
  0 siblings, 2 replies; 4+ messages in thread
From: Hemant Agrawal @ 2019-08-06  9:19 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: Hemant Agrawal

The SEC HW code is being shared by multiple NXP based
drivers. It is better to place it at a common place.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/{crypto/dpaa2_sec/hw => common/caamflib}/compat.h | 0
 drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc.h   | 4 ++--
 .../{crypto/dpaa2_sec/hw => common/caamflib}/desc/algo.h  | 2 +-
 .../dpaa2_sec/hw => common/caamflib}/desc/common.h        | 2 +-
 .../{crypto/dpaa2_sec/hw => common/caamflib}/desc/ipsec.h | 2 +-
 .../{crypto/dpaa2_sec/hw => common/caamflib}/desc/pdcp.h  | 2 +-
 drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta.h    | 0
 .../hw => common/caamflib}/rta/fifo_load_store_cmd.h      | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/header_cmd.h     | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/jump_cmd.h       | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/key_cmd.h        | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/load_cmd.h       | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/math_cmd.h       | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/move_cmd.h       | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/nfifo_cmd.h      | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/operation_cmd.h  | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/protocol_cmd.h   | 0
 .../hw => common/caamflib}/rta/sec_run_time_asm.h         | 4 ++--
 .../hw => common/caamflib}/rta/seq_in_out_ptr_cmd.h       | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/signature_cmd.h  | 0
 .../dpaa2_sec/hw => common/caamflib}/rta/store_cmd.h      | 0
 drivers/crypto/caam_jr/Makefile                           | 3 +--
 drivers/crypto/caam_jr/caam_jr.c                          | 4 ++--
 drivers/crypto/caam_jr/caam_jr_hw.c                       | 5 -----
 drivers/crypto/caam_jr/caam_jr_pvt.h                      | 2 +-
 drivers/crypto/caam_jr/caam_jr_uio.c                      | 5 -----
 drivers/crypto/caam_jr/meson.build                        | 2 +-
 drivers/crypto/dpaa2_sec/Makefile                         | 1 +
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c               | 6 +++---
 drivers/crypto/dpaa2_sec/meson.build                      | 2 +-
 drivers/crypto/dpaa_sec/Makefile                          | 3 +--
 drivers/crypto/dpaa_sec/dpaa_sec.c                        | 8 ++++----
 drivers/crypto/dpaa_sec/meson.build                       | 3 ++-
 33 files changed, 25 insertions(+), 35 deletions(-)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/compat.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/algo.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/common.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/ipsec.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/pdcp.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/fifo_load_store_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/header_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/jump_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/key_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/load_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/math_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/move_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/nfifo_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/operation_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/protocol_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/sec_run_time_asm.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/seq_in_out_ptr_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/signature_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/store_cmd.h (100%)

diff --git a/drivers/crypto/dpaa2_sec/hw/compat.h b/drivers/common/caamflib/compat.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/compat.h
rename to drivers/common/caamflib/compat.h
diff --git a/drivers/crypto/dpaa2_sec/hw/desc.h b/drivers/common/caamflib/desc.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc.h
rename to drivers/common/caamflib/desc.h
index 5d99dd8af..5d3bd8ad1 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc.h
+++ b/drivers/common/caamflib/desc.h
@@ -13,9 +13,9 @@
 #ifndef __RTA_DESC_H__
 #define __RTA_DESC_H__
 
-/* hw/compat.h is not delivered in kernel */
+/* compat.h is not delivered in kernel */
 #ifndef __KERNEL__
-#include "hw/compat.h"
+#include "compat.h"
 #endif
 
 /* Max size of any SEC descriptor in 32-bit words, inclusive of header */
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/algo.h b/drivers/common/caamflib/desc/algo.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/algo.h
rename to drivers/common/caamflib/desc/algo.h
index b6cfa8704..093005335 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/algo.h
+++ b/drivers/common/caamflib/desc/algo.h
@@ -8,7 +8,7 @@
 #ifndef __DESC_ALGO_H__
 #define __DESC_ALGO_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 #include "common.h"
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/common.h b/drivers/common/caamflib/desc/common.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/common.h
rename to drivers/common/caamflib/desc/common.h
index 98425d8b2..816baacfd 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/common.h
+++ b/drivers/common/caamflib/desc/common.h
@@ -8,7 +8,7 @@
 #ifndef __DESC_COMMON_H__
 #define __DESC_COMMON_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 
 /**
  * DOC: Shared Descriptor Constructors - shared structures
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h b/drivers/common/caamflib/desc/ipsec.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/ipsec.h
rename to drivers/common/caamflib/desc/ipsec.h
index d071f46fd..fe23d5c0c 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h
+++ b/drivers/common/caamflib/desc/ipsec.h
@@ -8,7 +8,7 @@
 #ifndef __DESC_IPSEC_H__
 #define __DESC_IPSEC_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 #include "common.h"
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/pdcp.h b/drivers/common/caamflib/desc/pdcp.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/pdcp.h
rename to drivers/common/caamflib/desc/pdcp.h
index fee844100..668bc6e86 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/pdcp.h
+++ b/drivers/common/caamflib/desc/pdcp.h
@@ -5,7 +5,7 @@
 #ifndef __DESC_PDCP_H__
 #define __DESC_PDCP_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 #include "common.h"
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/rta.h b/drivers/common/caamflib/rta.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta.h
rename to drivers/common/caamflib/rta.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/fifo_load_store_cmd.h b/drivers/common/caamflib/rta/fifo_load_store_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/fifo_load_store_cmd.h
rename to drivers/common/caamflib/rta/fifo_load_store_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/header_cmd.h b/drivers/common/caamflib/rta/header_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/header_cmd.h
rename to drivers/common/caamflib/rta/header_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/jump_cmd.h b/drivers/common/caamflib/rta/jump_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/jump_cmd.h
rename to drivers/common/caamflib/rta/jump_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/key_cmd.h b/drivers/common/caamflib/rta/key_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/key_cmd.h
rename to drivers/common/caamflib/rta/key_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/load_cmd.h b/drivers/common/caamflib/rta/load_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/load_cmd.h
rename to drivers/common/caamflib/rta/load_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/math_cmd.h b/drivers/common/caamflib/rta/math_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/math_cmd.h
rename to drivers/common/caamflib/rta/math_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/move_cmd.h b/drivers/common/caamflib/rta/move_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/move_cmd.h
rename to drivers/common/caamflib/rta/move_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/nfifo_cmd.h b/drivers/common/caamflib/rta/nfifo_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/nfifo_cmd.h
rename to drivers/common/caamflib/rta/nfifo_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h b/drivers/common/caamflib/rta/operation_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h
rename to drivers/common/caamflib/rta/operation_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h b/drivers/common/caamflib/rta/protocol_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h
rename to drivers/common/caamflib/rta/protocol_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h b/drivers/common/caamflib/rta/sec_run_time_asm.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h
rename to drivers/common/caamflib/rta/sec_run_time_asm.h
index 5357187f8..0a4f673db 100644
--- a/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h
+++ b/drivers/common/caamflib/rta/sec_run_time_asm.h
@@ -8,11 +8,11 @@
 #ifndef __RTA_SEC_RUN_TIME_ASM_H__
 #define __RTA_SEC_RUN_TIME_ASM_H__
 
-#include "hw/desc.h"
+#include "desc.h"
 
 /* hw/compat.h is not delivered in kernel */
 #ifndef __KERNEL__
-#include "hw/compat.h"
+#include "compat.h"
 #endif
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/seq_in_out_ptr_cmd.h b/drivers/common/caamflib/rta/seq_in_out_ptr_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/seq_in_out_ptr_cmd.h
rename to drivers/common/caamflib/rta/seq_in_out_ptr_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/signature_cmd.h b/drivers/common/caamflib/rta/signature_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/signature_cmd.h
rename to drivers/common/caamflib/rta/signature_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/store_cmd.h b/drivers/common/caamflib/rta/store_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/store_cmd.h
rename to drivers/common/caamflib/rta/store_cmd.h
diff --git a/drivers/crypto/caam_jr/Makefile b/drivers/crypto/caam_jr/Makefile
index cecfbbdc8..09fce29aa 100644
--- a/drivers/crypto/caam_jr/Makefile
+++ b/drivers/crypto/caam_jr/Makefile
@@ -17,9 +17,8 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
+CFLAGS += -I$(RTE_SDK)/drivers/common/caamflib/
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/caam_jr
-#sharing the hw flib headers from dpaa2_sec pmd
-CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
 
 # versioning export map
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 77c030347..6c5fbf2a3 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -25,8 +25,8 @@
 #include <caam_jr_log.h>
 
 /* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
+#include <desc/common.h>
+#include <desc/algo.h>
 #include <of.h>
 
 #define CAAM_JR_DBG	0
diff --git a/drivers/crypto/caam_jr/caam_jr_hw.c b/drivers/crypto/caam_jr/caam_jr_hw.c
index 4a2b08995..4dc708994 100644
--- a/drivers/crypto/caam_jr/caam_jr_hw.c
+++ b/drivers/crypto/caam_jr/caam_jr_hw.c
@@ -16,11 +16,6 @@
 #include <caam_jr_pvt.h>
 #include <caam_jr_log.h>
 
-/* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
-#include <hw/desc/ipsec.h>
-
 /* Used to retry resetting a job ring in SEC hardware. */
 #define SEC_TIMEOUT 100000
 
diff --git a/drivers/crypto/caam_jr/caam_jr_pvt.h b/drivers/crypto/caam_jr/caam_jr_pvt.h
index 9f1adabc7..d98304dc3 100644
--- a/drivers/crypto/caam_jr/caam_jr_pvt.h
+++ b/drivers/crypto/caam_jr/caam_jr_pvt.h
@@ -5,7 +5,7 @@
 #ifndef CAAM_JR_PVT_H
 #define CAAM_JR_PVT_H
 
-#include <hw/desc/ipsec.h>
+#include <desc/ipsec.h>
 
 /* NXP CAAM JR PMD device name */
 
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index afd75c9a6..b1bb44ca4 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -23,11 +23,6 @@
 #include <caam_jr_pvt.h>
 #include <caam_jr_log.h>
 
-/* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
-#include <hw/desc/ipsec.h>
-
 /* Prefix path to sysfs directory where UIO device attributes are exported.
  * Path for UIO device X is /sys/class/uio/uioX
  */
diff --git a/drivers/crypto/caam_jr/meson.build b/drivers/crypto/caam_jr/meson.build
index 4c66dd844..16ead5e1b 100644
--- a/drivers/crypto/caam_jr/meson.build
+++ b/drivers/crypto/caam_jr/meson.build
@@ -14,5 +14,5 @@ sources = files('caam_jr_capabilities.c',
 
 allow_experimental_apis = true
 
-includes += include_directories('../dpaa2_sec/')
 includes += include_directories('../../bus/dpaa/include/')
+includes += include_directories('../../common/caamflib/')
diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile
index 9c6657e52..75d2d4b27 100644
--- a/drivers/crypto/dpaa2_sec/Makefile
+++ b/drivers/crypto/dpaa2_sec/Makefile
@@ -20,6 +20,7 @@ CFLAGS += -Wno-implicit-fallthrough
 endif
 endif
 
+CFLAGS += -I$(RTE_SDK)/drivers/common/caamflib
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/mc
 CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 26458e5d1..c9a6b3119 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -36,9 +36,9 @@
 typedef uint64_t	dma_addr_t;
 
 /* RTA header files */
-#include <hw/desc/ipsec.h>
-#include <hw/desc/pdcp.h>
-#include <hw/desc/algo.h>
+#include <desc/ipsec.h>
+#include <desc/pdcp.h>
+#include <desc/algo.h>
 
 /* Minimum job descriptor consists of a oneword job descriptor HEADER and
  * a pointer to the shared descriptor
diff --git a/drivers/crypto/dpaa2_sec/meson.build b/drivers/crypto/dpaa2_sec/meson.build
index 23affa8a6..e296b4795 100644
--- a/drivers/crypto/dpaa2_sec/meson.build
+++ b/drivers/crypto/dpaa2_sec/meson.build
@@ -14,4 +14,4 @@ sources = files('dpaa2_sec_dpseci.c',
 
 allow_experimental_apis = true
 
-includes += include_directories('mc', 'hw')
+includes += include_directories('mc', '../../common/caamflib')
diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile
index 1d8b7bec1..b839b55e8 100644
--- a/drivers/crypto/dpaa_sec/Makefile
+++ b/drivers/crypto/dpaa_sec/Makefile
@@ -17,8 +17,7 @@ CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa_sec/
-#sharing the hw flib headers from dpaa2_sec pmd
-CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
+CFLAGS += -I$(RTE_SDK)/drivers/common/caamflib/
 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 122c80a07..bd53712eb 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -30,10 +30,10 @@
 #include <of.h>
 
 /* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
-#include <hw/desc/ipsec.h>
-#include <hw/desc/pdcp.h>
+#include <desc/common.h>
+#include <desc/algo.h>
+#include <desc/ipsec.h>
+#include <desc/pdcp.h>
 
 #include <rte_dpaa_bus.h>
 #include <dpaa_sec.h>
diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
index 7b9a019b9..00cbad4be 100644
--- a/drivers/crypto/dpaa_sec/meson.build
+++ b/drivers/crypto/dpaa_sec/meson.build
@@ -11,4 +11,5 @@ sources = files('dpaa_sec.c')
 
 allow_experimental_apis = true
 
-includes += include_directories('../dpaa2_sec/')
+includes += include_directories('../../bus/dpaa/include')
+includes += include_directories('../../common/caamflib/')
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] common/caamflib: move shared sec HW code
  2019-08-06  9:19 [dpdk-dev] [PATCH] common/caamflib: move shared sec HW code Hemant Agrawal
@ 2019-08-06  9:36 ` Akhil Goyal
  2019-08-06  9:53   ` Hemant Agrawal
  2019-08-13  7:20 ` [dpdk-dev] [PATCH v2] common/dpaax: move shared sec HW code to common Hemant Agrawal
  1 sibling, 1 reply; 4+ messages in thread
From: Akhil Goyal @ 2019-08-06  9:36 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: Hemant Agrawal



> The SEC HW code is being shared by multiple NXP based
> drivers. It is better to place it at a common place.
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  drivers/{crypto/dpaa2_sec/hw => common/caamflib}/compat.h | 0
>  drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc.h   | 4 ++--
>  .../{crypto/dpaa2_sec/hw => common/caamflib}/desc/algo.h  | 2 +-
>  .../dpaa2_sec/hw => common/caamflib}/desc/common.h        | 2 +-
>  .../{crypto/dpaa2_sec/hw => common/caamflib}/desc/ipsec.h | 2 +-
>  .../{crypto/dpaa2_sec/hw => common/caamflib}/desc/pdcp.h  | 2 +-
>  drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta.h    | 0
>  .../hw => common/caamflib}/rta/fifo_load_store_cmd.h      | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/header_cmd.h     | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/jump_cmd.h       | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/key_cmd.h        | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/load_cmd.h       | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/math_cmd.h       | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/move_cmd.h       | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/nfifo_cmd.h      | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/operation_cmd.h  | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/protocol_cmd.h   | 0
>  .../hw => common/caamflib}/rta/sec_run_time_asm.h         | 4 ++--
>  .../hw => common/caamflib}/rta/seq_in_out_ptr_cmd.h       | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/signature_cmd.h  | 0
>  .../dpaa2_sec/hw => common/caamflib}/rta/store_cmd.h      | 0
>  drivers/crypto/caam_jr/Makefile                           | 3 +--
>  drivers/crypto/caam_jr/caam_jr.c                          | 4 ++--
>  drivers/crypto/caam_jr/caam_jr_hw.c                       | 5 -----
>  drivers/crypto/caam_jr/caam_jr_pvt.h                      | 2 +-
>  drivers/crypto/caam_jr/caam_jr_uio.c                      | 5 -----
>  drivers/crypto/caam_jr/meson.build                        | 2 +-
>  drivers/crypto/dpaa2_sec/Makefile                         | 1 +
>  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c               | 6 +++---
>  drivers/crypto/dpaa2_sec/meson.build                      | 2 +-
>  drivers/crypto/dpaa_sec/Makefile                          | 3 +--
>  drivers/crypto/dpaa_sec/dpaa_sec.c                        | 8 ++++----
>  drivers/crypto/dpaa_sec/meson.build                       | 3 ++-
>  33 files changed, 25 insertions(+), 35 deletions(-)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/compat.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc.h (99%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/algo.h (99%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/common.h
> (99%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/ipsec.h
> (99%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/desc/pdcp.h
> (99%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/fifo_load_store_cmd.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/header_cmd.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/jump_cmd.h
> (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/key_cmd.h
> (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/load_cmd.h
> (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/math_cmd.h
> (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/move_cmd.h
> (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/nfifo_cmd.h
> (100%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/operation_cmd.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/protocol_cmd.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/sec_run_time_asm.h (99%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/seq_in_out_ptr_cmd.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw =>
> common/caamflib}/rta/signature_cmd.h (100%)
>  rename drivers/{crypto/dpaa2_sec/hw => common/caamflib}/rta/store_cmd.h
> (100%)
> 

Can we move this in dpaax instead of having a separate directory for NXP specific code.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] common/caamflib: move shared sec HW code
  2019-08-06  9:36 ` Akhil Goyal
@ 2019-08-06  9:53   ` Hemant Agrawal
  0 siblings, 0 replies; 4+ messages in thread
From: Hemant Agrawal @ 2019-08-06  9:53 UTC (permalink / raw)
  To: Akhil Goyal, dev

> > common/caamflib}/rta/store_cmd.h
> > (100%)
> >
> 
> Can we move this in dpaax instead of having a separate directory for NXP
> specific code.

 [Hemant] Yes, We can.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] common/dpaax: move shared sec HW code to common
  2019-08-06  9:19 [dpdk-dev] [PATCH] common/caamflib: move shared sec HW code Hemant Agrawal
  2019-08-06  9:36 ` Akhil Goyal
@ 2019-08-13  7:20 ` Hemant Agrawal
  1 sibling, 0 replies; 4+ messages in thread
From: Hemant Agrawal @ 2019-08-13  7:20 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: Hemant Agrawal

The SEC HW code is being shared by multiple NXP based
drivers. It is better to place it at a common place.
the current users are:
1. DPAA2_SEC
2. DPAA_SEC
3. CAAM_JR


Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 .../dpaa2_sec/hw => common/dpaax/caamflib}/compat.h       | 0
 .../{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/desc.h | 4 ++--
 .../dpaa2_sec/hw => common/dpaax/caamflib}/desc/algo.h    | 2 +-
 .../dpaa2_sec/hw => common/dpaax/caamflib}/desc/common.h  | 2 +-
 .../dpaa2_sec/hw => common/dpaax/caamflib}/desc/ipsec.h   | 2 +-
 .../dpaa2_sec/hw => common/dpaax/caamflib}/desc/pdcp.h    | 2 +-
 .../{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta.h  | 0
 .../dpaax/caamflib}/rta/fifo_load_store_cmd.h             | 0
 .../hw => common/dpaax/caamflib}/rta/header_cmd.h         | 0
 .../dpaa2_sec/hw => common/dpaax/caamflib}/rta/jump_cmd.h | 0
 .../dpaa2_sec/hw => common/dpaax/caamflib}/rta/key_cmd.h  | 0
 .../dpaa2_sec/hw => common/dpaax/caamflib}/rta/load_cmd.h | 0
 .../dpaa2_sec/hw => common/dpaax/caamflib}/rta/math_cmd.h | 0
 .../dpaa2_sec/hw => common/dpaax/caamflib}/rta/move_cmd.h | 0
 .../hw => common/dpaax/caamflib}/rta/nfifo_cmd.h          | 0
 .../hw => common/dpaax/caamflib}/rta/operation_cmd.h      | 0
 .../hw => common/dpaax/caamflib}/rta/protocol_cmd.h       | 0
 .../hw => common/dpaax/caamflib}/rta/sec_run_time_asm.h   | 4 ++--
 .../hw => common/dpaax/caamflib}/rta/seq_in_out_ptr_cmd.h | 0
 .../hw => common/dpaax/caamflib}/rta/signature_cmd.h      | 0
 .../hw => common/dpaax/caamflib}/rta/store_cmd.h          | 0
 drivers/crypto/caam_jr/Makefile                           | 3 +--
 drivers/crypto/caam_jr/caam_jr.c                          | 4 ++--
 drivers/crypto/caam_jr/caam_jr_hw.c                       | 5 -----
 drivers/crypto/caam_jr/caam_jr_pvt.h                      | 2 +-
 drivers/crypto/caam_jr/caam_jr_uio.c                      | 5 -----
 drivers/crypto/caam_jr/meson.build                        | 2 +-
 drivers/crypto/dpaa2_sec/Makefile                         | 1 +
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c               | 6 +++---
 drivers/crypto/dpaa2_sec/meson.build                      | 2 +-
 drivers/crypto/dpaa_sec/Makefile                          | 3 +--
 drivers/crypto/dpaa_sec/dpaa_sec.c                        | 8 ++++----
 drivers/crypto/dpaa_sec/meson.build                       | 3 ++-
 33 files changed, 25 insertions(+), 35 deletions(-)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/compat.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/desc.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/desc/algo.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/desc/common.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/desc/ipsec.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/desc/pdcp.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/fifo_load_store_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/header_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/jump_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/key_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/load_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/math_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/move_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/nfifo_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/operation_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/protocol_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/sec_run_time_asm.h (99%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/seq_in_out_ptr_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/signature_cmd.h (100%)
 rename drivers/{crypto/dpaa2_sec/hw => common/dpaax/caamflib}/rta/store_cmd.h (100%)

diff --git a/drivers/crypto/dpaa2_sec/hw/compat.h b/drivers/common/dpaax/caamflib/compat.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/compat.h
rename to drivers/common/dpaax/caamflib/compat.h
diff --git a/drivers/crypto/dpaa2_sec/hw/desc.h b/drivers/common/dpaax/caamflib/desc.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc.h
rename to drivers/common/dpaax/caamflib/desc.h
index 5d99dd8af..5d3bd8ad1 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc.h
+++ b/drivers/common/dpaax/caamflib/desc.h
@@ -13,9 +13,9 @@
 #ifndef __RTA_DESC_H__
 #define __RTA_DESC_H__
 
-/* hw/compat.h is not delivered in kernel */
+/* compat.h is not delivered in kernel */
 #ifndef __KERNEL__
-#include "hw/compat.h"
+#include "compat.h"
 #endif
 
 /* Max size of any SEC descriptor in 32-bit words, inclusive of header */
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/algo.h b/drivers/common/dpaax/caamflib/desc/algo.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/algo.h
rename to drivers/common/dpaax/caamflib/desc/algo.h
index b6cfa8704..093005335 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/algo.h
+++ b/drivers/common/dpaax/caamflib/desc/algo.h
@@ -8,7 +8,7 @@
 #ifndef __DESC_ALGO_H__
 #define __DESC_ALGO_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 #include "common.h"
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/common.h b/drivers/common/dpaax/caamflib/desc/common.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/common.h
rename to drivers/common/dpaax/caamflib/desc/common.h
index 98425d8b2..816baacfd 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/common.h
+++ b/drivers/common/dpaax/caamflib/desc/common.h
@@ -8,7 +8,7 @@
 #ifndef __DESC_COMMON_H__
 #define __DESC_COMMON_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 
 /**
  * DOC: Shared Descriptor Constructors - shared structures
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/ipsec.h
rename to drivers/common/dpaax/caamflib/desc/ipsec.h
index d071f46fd..fe23d5c0c 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h
+++ b/drivers/common/dpaax/caamflib/desc/ipsec.h
@@ -8,7 +8,7 @@
 #ifndef __DESC_IPSEC_H__
 #define __DESC_IPSEC_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 #include "common.h"
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/desc/pdcp.h
rename to drivers/common/dpaax/caamflib/desc/pdcp.h
index fee844100..668bc6e86 100644
--- a/drivers/crypto/dpaa2_sec/hw/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -5,7 +5,7 @@
 #ifndef __DESC_PDCP_H__
 #define __DESC_PDCP_H__
 
-#include "hw/rta.h"
+#include "rta.h"
 #include "common.h"
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/rta.h b/drivers/common/dpaax/caamflib/rta.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta.h
rename to drivers/common/dpaax/caamflib/rta.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/fifo_load_store_cmd.h b/drivers/common/dpaax/caamflib/rta/fifo_load_store_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/fifo_load_store_cmd.h
rename to drivers/common/dpaax/caamflib/rta/fifo_load_store_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/header_cmd.h b/drivers/common/dpaax/caamflib/rta/header_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/header_cmd.h
rename to drivers/common/dpaax/caamflib/rta/header_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/jump_cmd.h b/drivers/common/dpaax/caamflib/rta/jump_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/jump_cmd.h
rename to drivers/common/dpaax/caamflib/rta/jump_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/key_cmd.h b/drivers/common/dpaax/caamflib/rta/key_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/key_cmd.h
rename to drivers/common/dpaax/caamflib/rta/key_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/load_cmd.h b/drivers/common/dpaax/caamflib/rta/load_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/load_cmd.h
rename to drivers/common/dpaax/caamflib/rta/load_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/math_cmd.h b/drivers/common/dpaax/caamflib/rta/math_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/math_cmd.h
rename to drivers/common/dpaax/caamflib/rta/math_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/move_cmd.h b/drivers/common/dpaax/caamflib/rta/move_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/move_cmd.h
rename to drivers/common/dpaax/caamflib/rta/move_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/nfifo_cmd.h b/drivers/common/dpaax/caamflib/rta/nfifo_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/nfifo_cmd.h
rename to drivers/common/dpaax/caamflib/rta/nfifo_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h b/drivers/common/dpaax/caamflib/rta/operation_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/operation_cmd.h
rename to drivers/common/dpaax/caamflib/rta/operation_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h b/drivers/common/dpaax/caamflib/rta/protocol_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h
rename to drivers/common/dpaax/caamflib/rta/protocol_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h b/drivers/common/dpaax/caamflib/rta/sec_run_time_asm.h
similarity index 99%
rename from drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h
rename to drivers/common/dpaax/caamflib/rta/sec_run_time_asm.h
index 5357187f8..0a4f673db 100644
--- a/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h
+++ b/drivers/common/dpaax/caamflib/rta/sec_run_time_asm.h
@@ -8,11 +8,11 @@
 #ifndef __RTA_SEC_RUN_TIME_ASM_H__
 #define __RTA_SEC_RUN_TIME_ASM_H__
 
-#include "hw/desc.h"
+#include "desc.h"
 
 /* hw/compat.h is not delivered in kernel */
 #ifndef __KERNEL__
-#include "hw/compat.h"
+#include "compat.h"
 #endif
 
 /**
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/seq_in_out_ptr_cmd.h b/drivers/common/dpaax/caamflib/rta/seq_in_out_ptr_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/seq_in_out_ptr_cmd.h
rename to drivers/common/dpaax/caamflib/rta/seq_in_out_ptr_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/signature_cmd.h b/drivers/common/dpaax/caamflib/rta/signature_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/signature_cmd.h
rename to drivers/common/dpaax/caamflib/rta/signature_cmd.h
diff --git a/drivers/crypto/dpaa2_sec/hw/rta/store_cmd.h b/drivers/common/dpaax/caamflib/rta/store_cmd.h
similarity index 100%
rename from drivers/crypto/dpaa2_sec/hw/rta/store_cmd.h
rename to drivers/common/dpaax/caamflib/rta/store_cmd.h
diff --git a/drivers/crypto/caam_jr/Makefile b/drivers/crypto/caam_jr/Makefile
index cecfbbdc8..029190c08 100644
--- a/drivers/crypto/caam_jr/Makefile
+++ b/drivers/crypto/caam_jr/Makefile
@@ -17,9 +17,8 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
+CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/caam_jr
-#sharing the hw flib headers from dpaa2_sec pmd
-CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
 
 # versioning export map
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 77c030347..6c5fbf2a3 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -25,8 +25,8 @@
 #include <caam_jr_log.h>
 
 /* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
+#include <desc/common.h>
+#include <desc/algo.h>
 #include <of.h>
 
 #define CAAM_JR_DBG	0
diff --git a/drivers/crypto/caam_jr/caam_jr_hw.c b/drivers/crypto/caam_jr/caam_jr_hw.c
index 4a2b08995..4dc708994 100644
--- a/drivers/crypto/caam_jr/caam_jr_hw.c
+++ b/drivers/crypto/caam_jr/caam_jr_hw.c
@@ -16,11 +16,6 @@
 #include <caam_jr_pvt.h>
 #include <caam_jr_log.h>
 
-/* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
-#include <hw/desc/ipsec.h>
-
 /* Used to retry resetting a job ring in SEC hardware. */
 #define SEC_TIMEOUT 100000
 
diff --git a/drivers/crypto/caam_jr/caam_jr_pvt.h b/drivers/crypto/caam_jr/caam_jr_pvt.h
index 9f1adabc7..d98304dc3 100644
--- a/drivers/crypto/caam_jr/caam_jr_pvt.h
+++ b/drivers/crypto/caam_jr/caam_jr_pvt.h
@@ -5,7 +5,7 @@
 #ifndef CAAM_JR_PVT_H
 #define CAAM_JR_PVT_H
 
-#include <hw/desc/ipsec.h>
+#include <desc/ipsec.h>
 
 /* NXP CAAM JR PMD device name */
 
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index afd75c9a6..b1bb44ca4 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -23,11 +23,6 @@
 #include <caam_jr_pvt.h>
 #include <caam_jr_log.h>
 
-/* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
-#include <hw/desc/ipsec.h>
-
 /* Prefix path to sysfs directory where UIO device attributes are exported.
  * Path for UIO device X is /sys/class/uio/uioX
  */
diff --git a/drivers/crypto/caam_jr/meson.build b/drivers/crypto/caam_jr/meson.build
index 4c66dd844..825fefd75 100644
--- a/drivers/crypto/caam_jr/meson.build
+++ b/drivers/crypto/caam_jr/meson.build
@@ -14,5 +14,5 @@ sources = files('caam_jr_capabilities.c',
 
 allow_experimental_apis = true
 
-includes += include_directories('../dpaa2_sec/')
 includes += include_directories('../../bus/dpaa/include/')
+includes += include_directories('../../common/dpaax/caamflib/')
diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile
index 9c6657e52..1f288116e 100644
--- a/drivers/crypto/dpaa2_sec/Makefile
+++ b/drivers/crypto/dpaa2_sec/Makefile
@@ -20,6 +20,7 @@ CFLAGS += -Wno-implicit-fallthrough
 endif
 endif
 
+CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/mc
 CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 26458e5d1..c9a6b3119 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -36,9 +36,9 @@
 typedef uint64_t	dma_addr_t;
 
 /* RTA header files */
-#include <hw/desc/ipsec.h>
-#include <hw/desc/pdcp.h>
-#include <hw/desc/algo.h>
+#include <desc/ipsec.h>
+#include <desc/pdcp.h>
+#include <desc/algo.h>
 
 /* Minimum job descriptor consists of a oneword job descriptor HEADER and
  * a pointer to the shared descriptor
diff --git a/drivers/crypto/dpaa2_sec/meson.build b/drivers/crypto/dpaa2_sec/meson.build
index 23affa8a6..1b749186c 100644
--- a/drivers/crypto/dpaa2_sec/meson.build
+++ b/drivers/crypto/dpaa2_sec/meson.build
@@ -14,4 +14,4 @@ sources = files('dpaa2_sec_dpseci.c',
 
 allow_experimental_apis = true
 
-includes += include_directories('mc', 'hw')
+includes += include_directories('mc', '../../common/dpaax/caamflib')
diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile
index 1d8b7bec1..f357d3ff1 100644
--- a/drivers/crypto/dpaa_sec/Makefile
+++ b/drivers/crypto/dpaa_sec/Makefile
@@ -17,8 +17,7 @@ CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa_sec/
-#sharing the hw flib headers from dpaa2_sec pmd
-CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
+CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 122c80a07..bd53712eb 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -30,10 +30,10 @@
 #include <of.h>
 
 /* RTA header files */
-#include <hw/desc/common.h>
-#include <hw/desc/algo.h>
-#include <hw/desc/ipsec.h>
-#include <hw/desc/pdcp.h>
+#include <desc/common.h>
+#include <desc/algo.h>
+#include <desc/ipsec.h>
+#include <desc/pdcp.h>
 
 #include <rte_dpaa_bus.h>
 #include <dpaa_sec.h>
diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
index 7b9a019b9..8744a05f0 100644
--- a/drivers/crypto/dpaa_sec/meson.build
+++ b/drivers/crypto/dpaa_sec/meson.build
@@ -11,4 +11,5 @@ sources = files('dpaa_sec.c')
 
 allow_experimental_apis = true
 
-includes += include_directories('../dpaa2_sec/')
+includes += include_directories('../../bus/dpaa/include')
+includes += include_directories('../../common/dpaax/caamflib/')
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06  9:19 [dpdk-dev] [PATCH] common/caamflib: move shared sec HW code Hemant Agrawal
2019-08-06  9:36 ` Akhil Goyal
2019-08-06  9:53   ` Hemant Agrawal
2019-08-13  7:20 ` [dpdk-dev] [PATCH v2] common/dpaax: move shared sec HW code to common Hemant Agrawal

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox