Skip to contentSkip to conversation

fix alphabetical ordering of headers

PATCH In review Ayuj Verma 5 participants 8 messages Apr 12, 2019 – Apr 23, 2019

lore
Share & tools
lore

Ayuj Verma

author
#0 lore raw

PATCH 1/1 fix alphabetical ordering of headers

rte_crypto_sym.h is included prior to rte_crypto_asym.h in rte_crypto.h, which breaks alphabetical order.

include rte_crypto_sym.h in rte_crypto_asym.h fixes this.

Ayuj Verma (1):
lib/crypto: fix alphabetical ordering of headers

 lib/librte_cryptodev/rte_crypto.h      | 1 -
 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 1/1 lib/crypto: fix alphabetical ordering of headers

include rte_crypto_sym.h in rte_crypto_asym.h in place of including it in rte_crypto.h.

---
 lib/librte_cryptodev/rte_crypto.h      | 1 -
 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
lib/librte_cryptodev/rte_crypto.h +0 -1
index fd5ef3a..17dccdf 100644
@@ -22,7 +22,6 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
-#include "rte_crypto_sym.h"
 #include "rte_crypto_asym.h"
 
 /** Crypto operation types */
lib/librte_cryptodev/rte_crypto_asym.h +2 -0
index 5e43620..a55923a 100644
@@ -25,6 +25,8 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
+#include "rte_crypto_sym.h"
+
 typedef struct rte_crypto_param_t {
 	uint8_t *data;
 	/**< pointer to buffer holding data */
Signature · 1 line
1.8.3.1
#2 lore raw

Re: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Hi Ayuj, Akhil, Fiona, Shally,

I think there are couple of issues with this patch. The real issue here is the dependency of rte_crypto_asym.h on rte_crypto_sym.h. If rte_crypto_asym.h doesn't include all the headers it uses, every file which includes rte_crypto_asym.h will have to include rte_crypto_asym.h's dependencies, which is not the right practice. Keeping it alphabetical etc comes later.

So the patch has to be rephrased to better reflect the purpose.

Also please see inline.

Thanks,
Anoob

Quoted 29 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Ayuj Verma
Sent: Friday, April 12, 2019 12:33 PM
To: [email protected]; [email protected]; [email protected]
Cc: Shally Verma <[email protected]>; Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

include rte_crypto_sym.h in rte_crypto_asym.h in place of including it in rte_crypto.h.

---
 lib/librte_cryptodev/rte_crypto.h      | 1 -
 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
lib/librte_cryptodev/rte_crypto.h +0 -0
index fd5ef3a..17dccdf 100644

lib/librte_cryptodev/rte_crypto.h line 25

Quoted 5 lines
lib/librte_cryptodev/rte_crypto.h +0 -1
@@ -22,7 +22,6 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
-#include "rte_crypto_sym.h"
 #include "rte_crypto_asym.h"

[Anoob] If rte_crypto.h uses anything defined in rte_crypto_sym.h, then you cannot remove the include. You can make it alphabetical, but the include has to be retained.

Quoted 18 lines
lib/librte_cryptodev/rte_crypto.h +0 -0
 /** Crypto operation types */
lib/librte_cryptodev/rte_crypto_asym.h +2 -1
index 5e43620..a55923a 100644
@@ -25,6 +25,8 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
+#include "rte_crypto_sym.h"
+
 typedef struct rte_crypto_param_t {
 	uint8_t *data;
 	/**< pointer to buffer holding data */
--

1.8.3.1

#3 lore raw

Re: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Hi Anoob

Quoted 12 lines

-----Original Message-----
From: Anoob Joseph
Sent: Thursday, April 18, 2019 9:28 AM
To: Ayuj Verma <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: Shally Verma <[email protected]>; Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Quoted 8 lines

Hi Ayuj, Akhil, Fiona, Shally,

I think there are couple of issues with this patch. The real issue here is the dependency of rte_crypto_asym.h on rte_crypto_sym.h. If rte_crypto_asym.h doesn't include all the headers it uses, every file which includes rte_crypto_asym.h will have to include rte_crypto_asym.h's dependencies, which is not the right practice. Keeping it alphabetical etc comes later.

[Shally] We can change title something to "include dependencies into asym header files" , but then should I assume that You agree to this patch?

Quoted 40 lines

So the patch has to be rephrased to better reflect the purpose.

Also please see inline.

Thanks,
Anoob

Quoted 32 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Ayuj Verma
Sent: Friday, April 12, 2019 12:33 PM
To: [email protected]; [email protected]; [email protected]
Cc: Shally Verma <[email protected]>; Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

include rte_crypto_sym.h in rte_crypto_asym.h in place of including it in rte_crypto.h.

---
 lib/librte_cryptodev/rte_crypto.h      | 1 -
 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
lib/librte_cryptodev/rte_crypto.h +0 -0
index fd5ef3a..17dccdf 100644
@@ -22,7 +22,6 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
Quoted 5 lines

lib/librte_cryptodev/rte_crypto.h line 25

Quoted 2 lines
lib/librte_cryptodev/rte_crypto.h +0 -1
-#include "rte_crypto_sym.h"
 #include "rte_crypto_asym.h"

[Anoob] If rte_crypto.h uses anything defined in rte_crypto_sym.h, then you cannot remove the include.

[Shally] so you mean we should do #include of sym.h in both, this and rte_crypto_asym.h file?

Quoted 1 line

You can make it alphabetical, but the include has to be retained.

[Shally] Sorry didn't get what you exactly mean by this?

Thanks
Shally

Quoted 20 lines
Quoted 20 lines
lib/librte_cryptodev/rte_crypto.h +0 -0
 /** Crypto operation types */
lib/librte_cryptodev/rte_crypto_asym.h +2 -1
index 5e43620..a55923a 100644
@@ -25,6 +25,8 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
+#include "rte_crypto_sym.h"
+
 typedef struct rte_crypto_param_t {
 	uint8_t *data;
 	/**< pointer to buffer holding data */
--

1.8.3.1

#4 lore raw

Re: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Hi Shally,

Please see inline.

Thanks,
Anoob

Quoted 35 lines

-----Original Message-----
From: Shally Verma
Sent: Monday, April 22, 2019 6:23 PM
To: Anoob Joseph <[email protected]>; Ayuj Verma <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Hi Anoob

Quoted 12 lines

-----Original Message-----
From: Anoob Joseph
Sent: Thursday, April 18, 2019 9:28 AM
To: Ayuj Verma <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: Shally Verma <[email protected]>; Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Quoted 8 lines

Hi Ayuj, Akhil, Fiona, Shally,

I think there are couple of issues with this patch. The real issue here is the dependency of rte_crypto_asym.h on rte_crypto_sym.h. If rte_crypto_asym.h doesn't include all the headers it uses, every file which includes rte_crypto_asym.h will have to include rte_crypto_asym.h's dependencies, which is not the right practice. Keeping it alphabetical etc comes later.

Quoted 2 lines

[Shally] We can change title something to "include dependencies into asym header files" , but then should I assume that You agree to this patch?

[Anoob] Yes. The title and description has to be changed to better reflect what we are trying to solve. I'm in agreement with what the patch is trying to achieve.

Quoted 41 lines
Quoted 41 lines

So the patch has to be rephrased to better reflect the purpose.

Also please see inline.

Thanks,
Anoob

Quoted 32 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Ayuj Verma
Sent: Friday, April 12, 2019 12:33 PM
To: [email protected]; [email protected]; [email protected]
Cc: Shally Verma <[email protected]>; Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

include rte_crypto_sym.h in rte_crypto_asym.h in place of including it in rte_crypto.h.

---
 lib/librte_cryptodev/rte_crypto.h      | 1 -
 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
lib/librte_cryptodev/rte_crypto.h +0 -0
index fd5ef3a..17dccdf 100644
@@ -22,7 +22,6 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
Quoted 8 lines
Quoted 5 lines

lib/librte_cryptodev/rte_crypto.h line 25

Quoted 2 lines
lib/librte_cryptodev/rte_crypto.h +0 -1
-#include "rte_crypto_sym.h"
 #include "rte_crypto_asym.h"

[Anoob] If rte_crypto.h uses anything defined in rte_crypto_sym.h, then you cannot remove the include.

[Shally] so you mean we should do #include of sym.h in both, this and rte_crypto_asym.h file?

[Anoob] If this file uses anything from rte_crypto_sym.h, then ' #include "rte_crypto_sym.h" ' has to be retained. Here the patch is removing the include.

Instead may be the includes can be rearranged to make it follow alphabetical order. Again, that need not be part of this patch. If Akhil is okay with having includes violating the alphabetical sequence, this change can be deferred.

Quoted 11 lines
Quoted 2 lines

You can make it alphabetical, but the include has to be retained.

[Shally] Sorry didn't get what you exactly mean by this?

Thanks
Shally

Quoted 4 lines
Quoted 4 lines
lib/librte_cryptodev/rte_crypto.h +0 -0
 /** Crypto operation types */

[Anoob] IMO, only the following change is needed.

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
lib/librte_cryptodev/rte_crypto_asym.h +2 -1
index 5e43620..a55923a 100644
@@ -25,6 +25,8 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
+#include "rte_crypto_sym.h"
+
 typedef struct rte_crypto_param_t {
 	uint8_t *data;
 	/**< pointer to buffer holding data */
--

1.8.3.1

#5 lore raw

Re: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

Hi Anoob,

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

Hi Ayuj, Akhil, Fiona, Shally,

I think there are couple of issues with this patch. The real issue here is the dependency of rte_crypto_asym.h on rte_crypto_sym.h. If rte_crypto_asym.h doesn't include all the headers it uses, every file which includes rte_crypto_asym.h will have to include rte_crypto_asym.h's dependencies, which is not the right practice. Keeping it alphabetical etc comes later.

Quoted 6 lines
Quoted 2 lines

[Shally] We can change title something to "include dependencies into asym header files" , but then should I assume that You agree to this patch?

[Anoob] Yes. The title and description has to be changed to better reflect what we are trying to solve. I'm in agreement with what the patch is trying to achieve.

Agreed

Quoted 47 lines
Quoted 47 lines
Quoted 46 lines

So the patch has to be rephrased to better reflect the purpose.

Also please see inline.

Thanks,
Anoob

Quoted 29 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Ayuj Verma
Sent: Friday, April 12, 2019 12:33 PM
To: [email protected]; [email protected]; [email protected]
Cc: Shally Verma <[email protected]>; Sunila Sahu <[email protected]>; Kanaka Durga Kotamarthy <[email protected]>; Arvind Desai <[email protected]>; [email protected]; Ayuj Verma <[email protected]>
Subject: [dpdk-dev] [PATCH v1] lib/crypto: fix alphabetical ordering of headers

include rte_crypto_sym.h in rte_crypto_asym.h in place of including it in rte_crypto.h.

---
 lib/librte_cryptodev/rte_crypto.h      | 1 -
 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
lib/librte_cryptodev/rte_crypto.h +0 -0
index fd5ef3a..17dccdf 100644

lib/librte_cryptodev/rte_crypto.h line 25

Quoted 5 lines
lib/librte_cryptodev/rte_crypto.h +0 -1
@@ -22,7 +22,6 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
-#include "rte_crypto_sym.h"
 #include "rte_crypto_asym.h"

[Anoob] If rte_crypto.h uses anything defined in rte_crypto_sym.h, then you cannot remove the include.

Quoted 5 lines
Quoted 2 lines

[Shally] so you mean we should do #include of sym.h in both, this and rte_crypto_asym.h file?

[Anoob] If this file uses anything from rte_crypto_sym.h, then ' #include "rte_crypto_sym.h" ' has to be retained. Here the patch is removing the include.

Agreed.

Quoted 4 lines

Instead may be the includes can be rearranged to make it follow alphabetical order. Again, that need not be part of this patch. If Akhil is okay with having includes violating the alphabetical sequence, this change can be deferred.

I am ok with this.

Quoted 11 lines
Quoted 11 lines
Quoted 3 lines

You can make it alphabetical, but the include has to be retained.

[Shally] Sorry didn't get what you exactly mean by this?

Thanks
Shally

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

/** Crypto operation types */

[Anoob] IMO, only the following change is needed.

Agreed.

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
lib/librte_cryptodev/rte_crypto_asym.h +2 -1
index 5e43620..a55923a 100644
@@ -25,6 +25,8 @@
 #include <rte_mempool.h>
 #include <rte_common.h>
 
+#include "rte_crypto_sym.h"
+
 typedef struct rte_crypto_param_t {
 	uint8_t *data;
 	/**< pointer to buffer holding data */
--

1.8.3.1

#6 lore raw
In reply to Ayuj Verma

Hi Ayuj,

Quoted 9 lines

-----Original Message-----
From: Ayuj Verma [mailto:[email protected]]
Sent: Friday, April 12, 2019 8:03 AM
To: [email protected]; Kusztal, ArkadiuszX <[email protected]>; Trahe, Fiona <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Ayuj Verma <[email protected]>
Subject: [PATCH v1] fix alphabetical ordering of headers

Quoted 4 lines

rte_crypto_sym.h is included prior to rte_crypto_asym.h in rte_crypto.h, which breaks alphabetical order.

include rte_crypto_sym.h in rte_crypto_asym.h fixes this.

[Fiona] I presume you tried just swapping the order and it broke?
If something in rte_crypto_asym.h depends on something from rte_crypto_sym.h, it probably shouldn't. What's the dependency and can/should it be moved to rte_crypto.h?

author
#7 lore raw

Hi Fiona,

Sorry for delay in response.

Please see inline.

Thanks and regards

Ayuj Verma

________________________________
From: Trahe, Fiona <[email protected]>
Sent: 12 April 2019 20:47
To: Ayuj Verma; [email protected]; Kusztal, ArkadiuszX
Cc: Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; [email protected]; Trahe, Fiona
Subject: RE: [PATCH v1] fix alphabetical ordering of headers

Hi Ayuj,

Quoted 9 lines

-----Original Message-----
From: Ayuj Verma [mailto:[email protected]]
Sent: Friday, April 12, 2019 8:03 AM
To: [email protected]; Kusztal, ArkadiuszX <[email protected]>; Trahe, Fiona <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Ayuj Verma <[email protected]>
Subject: [PATCH v1] fix alphabetical ordering of headers

Quoted 4 lines

rte_crypto_sym.h is included prior to rte_crypto_asym.h in rte_crypto.h, which breaks alphabetical order.

include rte_crypto_sym.h in rte_crypto_asym.h fixes this.

[Fiona] I presume you tried just swapping the order and it broke?
If something in rte_crypto_asym.h depends on something from rte_crypto_sym.h, it
probably shouldn't. What's the dependency and can/should it be moved to rte_crypto.h?
[Ayuj] it is enum rte_crypto_auth_algorithm which it import from sym.h. So do you suggest to move it to rte_crypto.h?