* [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
@ 2019-03-07 10:34 Bernard Iremonger
2019-03-08 15:35 ` Ananyev, Konstantin
0 siblings, 1 reply; 6+ messages in thread
From: Bernard Iremonger @ 2019-03-07 10:34 UTC (permalink / raw)
To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger, stable
Improve debug code in esp.c, sa.c and ipsec-secgw.c
Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
examples/ipsec-secgw/esp.c | 5 +++--
examples/ipsec-secgw/ipsec-secgw.c | 6 ++++--
examples/ipsec-secgw/sa.c | 21 ++++++++++++++++++---
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c
index e33232c..faa84dd 100644
--- a/examples/ipsec-secgw/esp.c
+++ b/examples/ipsec-secgw/esp.c
@@ -162,7 +162,7 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa,
}
if (cop->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
- RTE_LOG(ERR, IPSEC_ESP, "failed crypto op\n");
+ RTE_LOG(ERR, IPSEC_ESP, "%s() failed crypto op\n", __func__);
return -1;
}
@@ -455,7 +455,8 @@ esp_outbound_post(struct rte_mbuf *m,
} else {
RTE_ASSERT(cop != NULL);
if (cop->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
- RTE_LOG(ERR, IPSEC_ESP, "Failed crypto op\n");
+ RTE_LOG(ERR, IPSEC_ESP, "%s() failed crypto op\n",
+ __func__);
return -1;
}
}
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8e7cd1b..b253eea 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -260,7 +260,8 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
pkt->l3_len = sizeof(struct ip6_hdr);
} else {
/* Unknown/Unsupported type, drop the packet */
- RTE_LOG(ERR, IPSEC, "Unsupported packet type\n");
+ RTE_LOG(ERR, IPSEC, "Unsupported packet type 0x%x\n",
+ rte_be_to_cpu_16(eth->ether_type));
rte_pktmbuf_free(pkt);
}
@@ -984,7 +985,8 @@ main_loop(__attribute__((unused)) void *dummy)
socket_ctx[socket_id].session_priv_pool;
if (qconf->nb_rx_queue == 0) {
- RTE_LOG(INFO, IPSEC, "lcore %u has nothing to do\n", lcore_id);
+ RTE_LOG(DEBUG, IPSEC, "lcore %u has nothing to do\n",
+ lcore_id);
return 0;
}
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 414fcd2..7812d98 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -688,7 +688,22 @@ print_one_sa_rule(const struct ipsec_sa *sa, int inbound)
}
break;
case TRANSPORT:
- printf("Transport");
+ printf("Transport ");
+ break;
+ }
+ printf(" type:");
+ switch (sa->type) {
+ case RTE_SECURITY_ACTION_TYPE_NONE:
+ printf("no-offload ");
+ break;
+ case RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO:
+ printf("inline-crypto-offload ");
+ break;
+ case RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL:
+ printf("inline-protocol-offload ");
+ break;
+ case RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL:
+ printf("lookaside-protocol-offload ");
break;
}
printf("\n");
@@ -716,8 +731,8 @@ sa_create(const char *name, int32_t socket_id)
snprintf(s, sizeof(s), "%s_%u", name, socket_id);
/* Create SA array table */
- printf("Creating SA context with %u maximum entries\n",
- IPSEC_SA_MAX_ENTRIES);
+ printf("Creating SA context with %u maximum entries on socket %d\n",
+ IPSEC_SA_MAX_ENTRIES, socket_id);
mz_size = sizeof(struct sa_ctx);
mz = rte_memzone_reserve(s, mz_size, socket_id,
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
2019-03-07 10:34 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app Bernard Iremonger
@ 2019-03-08 15:35 ` Ananyev, Konstantin
2019-03-19 13:43 ` Akhil Goyal
0 siblings, 1 reply; 6+ messages in thread
From: Ananyev, Konstantin @ 2019-03-08 15:35 UTC (permalink / raw)
To: Iremonger, Bernard, dev, akhil.goyal; +Cc: stable
> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Thursday, March 7, 2019 10:35 AM
> To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com
> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
> Subject: [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
>
> Improve debug code in esp.c, sa.c and ipsec-secgw.c
>
> Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
> Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
> Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
2019-03-08 15:35 ` Ananyev, Konstantin
@ 2019-03-19 13:43 ` Akhil Goyal
2019-03-19 13:43 ` Akhil Goyal
2019-03-19 14:06 ` Akhil Goyal
0 siblings, 2 replies; 6+ messages in thread
From: Akhil Goyal @ 2019-03-19 13:43 UTC (permalink / raw)
To: Ananyev, Konstantin, Iremonger, Bernard, dev; +Cc: stable
On 3/8/2019 9:05 PM, Ananyev, Konstantin wrote:
>
>> -----Original Message-----
>> From: Iremonger, Bernard
>> Sent: Thursday, March 7, 2019 10:35 AM
>> To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com
>> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
>> Subject: [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
>>
>> Improve debug code in esp.c, sa.c and ipsec-secgw.c
>>
>> Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
>> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
>> Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
>> Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
>> ---
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
>> 2.7.4
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
2019-03-19 13:43 ` Akhil Goyal
@ 2019-03-19 13:43 ` Akhil Goyal
2019-03-19 14:06 ` Akhil Goyal
1 sibling, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2019-03-19 13:43 UTC (permalink / raw)
To: Ananyev, Konstantin, Iremonger, Bernard, dev; +Cc: stable
On 3/8/2019 9:05 PM, Ananyev, Konstantin wrote:
>
>> -----Original Message-----
>> From: Iremonger, Bernard
>> Sent: Thursday, March 7, 2019 10:35 AM
>> To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com
>> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
>> Subject: [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
>>
>> Improve debug code in esp.c, sa.c and ipsec-secgw.c
>>
>> Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
>> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
>> Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
>> Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
>> ---
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
>> 2.7.4
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
2019-03-19 13:43 ` Akhil Goyal
2019-03-19 13:43 ` Akhil Goyal
@ 2019-03-19 14:06 ` Akhil Goyal
2019-03-19 14:06 ` Akhil Goyal
1 sibling, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2019-03-19 14:06 UTC (permalink / raw)
To: Ananyev, Konstantin, Iremonger, Bernard, dev; +Cc: stable
On 3/19/2019 7:13 PM, Akhil Goyal wrote:
>
> On 3/8/2019 9:05 PM, Ananyev, Konstantin wrote:
>>> -----Original Message-----
>>> From: Iremonger, Bernard
>>> Sent: Thursday, March 7, 2019 10:35 AM
>>> To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com
>>> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
>>> Subject: [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
>>>
>>> Improve debug code in esp.c, sa.c and ipsec-secgw.c
>>>
>>> Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
>>> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
>>> Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
>>> Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
>>> ---
>> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>>
>>> 2.7.4
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
2019-03-19 14:06 ` Akhil Goyal
@ 2019-03-19 14:06 ` Akhil Goyal
0 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2019-03-19 14:06 UTC (permalink / raw)
To: Ananyev, Konstantin, Iremonger, Bernard, dev; +Cc: stable
On 3/19/2019 7:13 PM, Akhil Goyal wrote:
>
> On 3/8/2019 9:05 PM, Ananyev, Konstantin wrote:
>>> -----Original Message-----
>>> From: Iremonger, Bernard
>>> Sent: Thursday, March 7, 2019 10:35 AM
>>> To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; akhil.goyal@nxp.com
>>> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
>>> Subject: [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app
>>>
>>> Improve debug code in esp.c, sa.c and ipsec-secgw.c
>>>
>>> Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
>>> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
>>> Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
>>> Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
>>> ---
>> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>>
>>> 2.7.4
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-19 14:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 10:34 [dpdk-dev] [PATCH] examples/ipsec-secgw: fix debug in ipsec-secgw app Bernard Iremonger
2019-03-08 15:35 ` Ananyev, Konstantin
2019-03-19 13:43 ` Akhil Goyal
2019-03-19 13:43 ` Akhil Goyal
2019-03-19 14:06 ` Akhil Goyal
2019-03-19 14:06 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).