[dpdk-dev,2/3] net/ixgbe: implemented security session get size

Message ID 1513083027-11741-2-git-send-email-radu.nicolau@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Radu Nicolau Dec. 12, 2017, 12:50 p.m. UTC
  Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/ixgbe/ixgbe_ipsec.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

De Lara Guarch, Pablo Jan. 8, 2018, 10:15 a.m. UTC | #1
> -----Original Message-----
> From: Nicolau, Radu
> Sent: Tuesday, December 12, 2017 12:50 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Gonzalez Monroy, Sergio
> <sergio.gonzalez.monroy@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; akhil.goyal@nxp.com; Nicolau, Radu
> <radu.nicolau@intel.com>
> Subject: [PATCH 2/3] net/ixgbe: implemented security session get size

Use "implement" in infinitive.

> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ipsec.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c
> b/drivers/net/ixgbe/ixgbe_ipsec.c index 105da11..720d6a1 100644
> --- a/drivers/net/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ixgbe/ixgbe_ipsec.c
> @@ -446,6 +446,12 @@ ixgbe_crypto_create_session(void *device,  }
> 
>  static int


> +ixgbe_crypto_session_get_size(__rte_unused void *device) {

Do you think passing device to the function prototype is needed?
Are you expecting other drivers to use it?

Also, move the braces to a new line (both opening and ending).


> +	return sizeof(struct ixgbe_crypto_session); }
> +

Thanks,
Pablo
  
Radu Nicolau Jan. 15, 2018, 10:27 a.m. UTC | #2
On 1/8/2018 10:15 AM, De Lara Guarch, Pablo wrote:
>
>> -----Original Message-----
>> From: Nicolau, Radu
>> Sent: Tuesday, December 12, 2017 12:50 PM
>> To: dev@dpdk.org
>> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Yigit, Ferruh
>> <ferruh.yigit@intel.com>; Gonzalez Monroy, Sergio
>> <sergio.gonzalez.monroy@intel.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
>> <declan.doherty@intel.com>; akhil.goyal@nxp.com; Nicolau, Radu
>> <radu.nicolau@intel.com>
>> Subject: [PATCH 2/3] net/ixgbe: implemented security session get size
> Use "implement" in infinitive.
>
>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>> ---
>>   drivers/net/ixgbe/ixgbe_ipsec.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c
>> b/drivers/net/ixgbe/ixgbe_ipsec.c index 105da11..720d6a1 100644
>> --- a/drivers/net/ixgbe/ixgbe_ipsec.c
>> +++ b/drivers/net/ixgbe/ixgbe_ipsec.c
>> @@ -446,6 +446,12 @@ ixgbe_crypto_create_session(void *device,  }
>>
>>   static int
>
>> +ixgbe_crypto_session_get_size(__rte_unused void *device) {
> Do you think passing device to the function prototype is needed?
> Are you expecting other drivers to use it?
I added for consistency with cryptodev.
>
> Also, move the braces to a new line (both opening and ending).
They are correctly formatted on the patch itself.
>
>
>> +	return sizeof(struct ixgbe_crypto_session); }
>> +
> Thanks,
> Pablo
>
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c
index 105da11..720d6a1 100644
--- a/drivers/net/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ixgbe/ixgbe_ipsec.c
@@ -446,6 +446,12 @@  ixgbe_crypto_create_session(void *device,
 }
 
 static int
+ixgbe_crypto_session_get_size(__rte_unused void *device)
+{
+	return sizeof(struct ixgbe_crypto_session);
+}
+
+static int
 ixgbe_crypto_remove_session(void *device,
 		struct rte_security_session *session)
 {
@@ -717,6 +723,7 @@  ixgbe_crypto_add_ingress_sa_from_flow(const void *sess,
 static struct rte_security_ops ixgbe_security_ops = {
 	.session_create = ixgbe_crypto_create_session,
 	.session_update = NULL,
+	.session_get_size = ixgbe_crypto_session_get_size,
 	.session_stats_get = NULL,
 	.session_destroy = ixgbe_crypto_remove_session,
 	.set_pkt_metadata = ixgbe_crypto_update_mb,