Re: [vpp-dev] IPSec/QAT offload config

2022-01-26 Thread Govindarajan Mohandoss
Sure Fan. Please find the CLI, Startup conf attached.

From: Zhang, Roy Fan 
Sent: Wednesday, January 26, 2022 8:50 AM
To: Govindarajan Mohandoss ; vpp-dev 

Cc: Yoan Picchi ; nd ; nd ; nd 

Subject: RE: [vpp-dev] IPSec/QAT offload config

Hi Govind,

We only tested the algorithm that is supported - and in our test env all 
plugins are enabled.
Could you share your CLI command instead? Maybe there is something we missed.
We will try to reproduce the problem with your CLI and with only the plugin you 
mentioned.

Regards,
Fan

From: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>
Sent: Wednesday, January 26, 2022 2:45 PM
To: Zhang, Roy Fan mailto:roy.fan.zh...@intel.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>; nd 
mailto:n...@arm.com>>
Subject: RE: [vpp-dev] IPSec/QAT offload config

Hi Fan,
  Thanks for your response.
  We are observing the crash in master.
  Can you please share your startup and IPSec CLI conf ?

Thanks
Govind

From: Zhang, Roy Fan mailto:roy.fan.zh...@intel.com>>
Sent: Wednesday, January 26, 2022 4:22 AM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: RE: [vpp-dev] IPSec/QAT offload config

Hi Govind,

I suppose you were not using Master?
The problem is addressed recently. You shall see no failure if running on 
master. If there is still problem please let me know.

Regards,
Fan

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss
Sent: Monday, January 24, 2022 1:38 AM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config

Hi Experts,
It worked after making the following changes. I enabled "crypto_native_plugin" 
& qat in startup.  If this is a real issue and if my Crypto/QAT config is 
correct, I can submit this fix for review. Please let me know.

diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c
index 9f437cfcd..ed9a9d1be 100644
--- a/src/vnet/crypto/crypto.c
+++ b/src/vnet/crypto/crypto.c
@@ -333,6 +333,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
   for (i = 0; i < VNET_CRYPTO_ASYNC_OP_N_IDS; i++)
 {
   otd = cm->async_opt_data + i;
+  if (otd->active_engine_index_async == ~0)
+   continue;
   e = cm->engines + otd->active_engine_index_async;
   if (!e->dequeue_handler)
continue;
@@ -345,6 +347,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
 {
   if (ei[0] == last_ei)
continue;
+  if (ei[0] == ~0)
+   continue;

   e = cm->engines + ei[0];
   vec_add1 (cm->dequeue_handlers, e->dequeue_handler);


Startup conf:
-
plugins
{
...
plugin crypto_native_plugin.so
  {
enable
  }
}

cpu
{
 corelist-workers 9  /* Single worker */
  main-core 0
}

dpdk
{
  dev :af:00.0 #NIC
  dev :39:01.0 #QAT
  log-level debug
  dev default
  {
num-rx-desc 256
num-tx-desc 256
  }

Thanks
Govind

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss via lists.fd.io
Sent: Friday, January 21, 2022 1:19 PM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config


Once more than 1 worker core is added in startup conf, crash is not observed 
during init phase.  But when I set the async mode on, it crashes in same place. 
Do I need to set async mode on to use QAT ? Do I need to enable any specific 
plugin ?



cpu

{

 corelist-workers 9-12

  main-core 13

}



DBGvpp# set ipsec async mode on



Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at 
/home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

337   if (!e->dequeue_handler)

(gdb)





> -Original Message-

> From: vpp-dev@lists.fd.io 
> mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan

> Mohandoss via lists.fd.io

> Sent: Friday, January 21, 2022 12:24 PM

> To: vpp-dev mailto:vpp-dev@lists.fd.io>>

> Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
> mailto:n...@arm.com>>; nd

> mailto:n...@arm.com>>

> Subject: [vpp-dev] IPSec/QAT offload config

>

> Hi Experts,

>   We are trying to run IPSec with QAT offload and did the following dpdk

> config in startup conf. When we run VPP, it crashes in the init phase (Before

> reaching out to VPP shell). Can you please help us with proper config to

> enable 

Re: [vpp-dev] IPSec/QAT offload config

2022-01-26 Thread Fan Zhang
Hi Govind,

We only tested the algorithm that is supported – and in our test env all 
plugins are enabled.
Could you share your CLI command instead? Maybe there is something we missed.
We will try to reproduce the problem with your CLI and with only the plugin you 
mentioned.

Regards,
Fan

From: Govindarajan Mohandoss 
Sent: Wednesday, January 26, 2022 2:45 PM
To: Zhang, Roy Fan ; vpp-dev 
Cc: Yoan Picchi ; nd ; nd ; nd 

Subject: RE: [vpp-dev] IPSec/QAT offload config

Hi Fan,
  Thanks for your response.
  We are observing the crash in master.
  Can you please share your startup and IPSec CLI conf ?

Thanks
Govind

From: Zhang, Roy Fan mailto:roy.fan.zh...@intel.com>>
Sent: Wednesday, January 26, 2022 4:22 AM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: RE: [vpp-dev] IPSec/QAT offload config

Hi Govind,

I suppose you were not using Master?
The problem is addressed recently. You shall see no failure if running on 
master. If there is still problem please let me know.

Regards,
Fan

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss
Sent: Monday, January 24, 2022 1:38 AM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config

Hi Experts,
It worked after making the following changes. I enabled “crypto_native_plugin” 
& qat in startup.  If this is a real issue and if my Crypto/QAT config is 
correct, I can submit this fix for review. Please let me know.

diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c
index 9f437cfcd..ed9a9d1be 100644
--- a/src/vnet/crypto/crypto.c
+++ b/src/vnet/crypto/crypto.c
@@ -333,6 +333,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
   for (i = 0; i < VNET_CRYPTO_ASYNC_OP_N_IDS; i++)
 {
   otd = cm->async_opt_data + i;
+  if (otd->active_engine_index_async == ~0)
+   continue;
   e = cm->engines + otd->active_engine_index_async;
   if (!e->dequeue_handler)
continue;
@@ -345,6 +347,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
 {
   if (ei[0] == last_ei)
continue;
+  if (ei[0] == ~0)
+   continue;

   e = cm->engines + ei[0];
   vec_add1 (cm->dequeue_handlers, e->dequeue_handler);


Startup conf:
-
plugins
{
…
plugin crypto_native_plugin.so
  {
enable
  }
}

cpu
{
 corelist-workers 9  /* Single worker */
  main-core 0
}

dpdk
{
  dev :af:00.0 #NIC
  dev :39:01.0 #QAT
  log-level debug
  dev default
  {
num-rx-desc 256
num-tx-desc 256
  }

Thanks
Govind

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss via lists.fd.io
Sent: Friday, January 21, 2022 1:19 PM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config


Once more than 1 worker core is added in startup conf, crash is not observed 
during init phase.  But when I set the async mode on, it crashes in same place. 
Do I need to set async mode on to use QAT ? Do I need to enable any specific 
plugin ?



cpu

{

 corelist-workers 9-12

  main-core 13

}



DBGvpp# set ipsec async mode on



Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at 
/home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

337   if (!e->dequeue_handler)

(gdb)





> -Original Message-

> From: vpp-dev@lists.fd.io 
> mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan

> Mohandoss via lists.fd.io

> Sent: Friday, January 21, 2022 12:24 PM

> To: vpp-dev mailto:vpp-dev@lists.fd.io>>

> Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
> mailto:n...@arm.com>>; nd

> mailto:n...@arm.com>>

> Subject: [vpp-dev] IPSec/QAT offload config

>

> Hi Experts,

>   We are trying to run IPSec with QAT offload and did the following dpdk

> config in startup conf. When we run VPP, it crashes in the init phase (Before

> reaching out to VPP shell). Can you please help us with proper config to

> enable QAT ?

> We did a sanity test with standalone DPDK IPSec application and it works fine

> with QAT card.

>

> dpdk

> {

>   dev :af:00.0 #NIC

>   dev :39:01.0 #QAT

>   log-level debug

>   dev default

>   {

> num-rx-desc 1024

> num-tx-desc 1024

>   }

> }

>

>

> Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

> 0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at

> 

Re: [vpp-dev] IPSec/QAT offload config

2022-01-26 Thread Govindarajan Mohandoss
Hi Fan,
  Thanks for your response.
  We are observing the crash in master.
  Can you please share your startup and IPSec CLI conf ?

Thanks
Govind

From: Zhang, Roy Fan 
Sent: Wednesday, January 26, 2022 4:22 AM
To: Govindarajan Mohandoss ; vpp-dev 

Cc: Yoan Picchi ; nd ; nd 
Subject: RE: [vpp-dev] IPSec/QAT offload config

Hi Govind,

I suppose you were not using Master?
The problem is addressed recently. You shall see no failure if running on 
master. If there is still problem please let me know.

Regards,
Fan

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss
Sent: Monday, January 24, 2022 1:38 AM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config

Hi Experts,
It worked after making the following changes. I enabled "crypto_native_plugin" 
& qat in startup.  If this is a real issue and if my Crypto/QAT config is 
correct, I can submit this fix for review. Please let me know.

diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c
index 9f437cfcd..ed9a9d1be 100644
--- a/src/vnet/crypto/crypto.c
+++ b/src/vnet/crypto/crypto.c
@@ -333,6 +333,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
   for (i = 0; i < VNET_CRYPTO_ASYNC_OP_N_IDS; i++)
 {
   otd = cm->async_opt_data + i;
+  if (otd->active_engine_index_async == ~0)
+   continue;
   e = cm->engines + otd->active_engine_index_async;
   if (!e->dequeue_handler)
continue;
@@ -345,6 +347,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
 {
   if (ei[0] == last_ei)
continue;
+  if (ei[0] == ~0)
+   continue;

   e = cm->engines + ei[0];
   vec_add1 (cm->dequeue_handlers, e->dequeue_handler);


Startup conf:
-
plugins
{
...
plugin crypto_native_plugin.so
  {
enable
  }
}

cpu
{
 corelist-workers 9  /* Single worker */
  main-core 0
}

dpdk
{
  dev :af:00.0 #NIC
  dev :39:01.0 #QAT
  log-level debug
  dev default
  {
num-rx-desc 256
num-tx-desc 256
  }

Thanks
Govind

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss via lists.fd.io
Sent: Friday, January 21, 2022 1:19 PM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config


Once more than 1 worker core is added in startup conf, crash is not observed 
during init phase.  But when I set the async mode on, it crashes in same place. 
Do I need to set async mode on to use QAT ? Do I need to enable any specific 
plugin ?



cpu

{

 corelist-workers 9-12

  main-core 13

}



DBGvpp# set ipsec async mode on



Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at 
/home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

337   if (!e->dequeue_handler)

(gdb)





> -Original Message-

> From: vpp-dev@lists.fd.io 
> mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan

> Mohandoss via lists.fd.io

> Sent: Friday, January 21, 2022 12:24 PM

> To: vpp-dev mailto:vpp-dev@lists.fd.io>>

> Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
> mailto:n...@arm.com>>; nd

> mailto:n...@arm.com>>

> Subject: [vpp-dev] IPSec/QAT offload config

>

> Hi Experts,

>   We are trying to run IPSec with QAT offload and did the following dpdk

> config in startup conf. When we run VPP, it crashes in the init phase (Before

> reaching out to VPP shell). Can you please help us with proper config to

> enable QAT ?

> We did a sanity test with standalone DPDK IPSec application and it works fine

> with QAT card.

>

> dpdk

> {

>   dev :af:00.0 #NIC

>   dev :39:01.0 #QAT

>   log-level debug

>   dev default

>   {

> num-rx-desc 1024

> num-tx-desc 1024

>   }

> }

>

>

> Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

> 0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at

> /home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

> 337   if (!e->dequeue_handler)

> (gdb) bt

> #0  0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at

> /home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

> #1  0x77371d69 in vnet_crypto_request_async_mode (is_enable=1)

> at /home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:678

> #2  0x7ffef5b0e4ff in dpdk_cryptodev_init (vm=0x7ffef685a680)

> at

> /home/govmoh01/vpp_qat/vpp/src/plugins/dpdk/cryptodev/cryptodev.c:12

> 00

> #3  0x7ffef5af1608 in dpdk_process (vm=0x7ffef685a680,

> rt=0x7ffef8176d00, f=0x0)

> at 

Re: [External] : Re: [vpp-dev] ip4 getting disabled when using worker threads

2022-01-26 Thread Stanislav Zaikin
Hi Scott,

How are you configuring vpp? Through binary API or with commands?

Anyway, when you have only 1 thread (without workers) - it's responsible
for API, CLI and packet processing. But with workers - they do the packet
processing. So, simultaneously you can send commands and vpp will be
processing incoming packets (in case of mt-safe API call). With just one
thread vpp is probably busy with API requests.

Another option that you have is to configure IP settings and only then set
state up.

On Wed, 26 Jan 2022 at 14:21, Scott McMillan 
wrote:

> Hi Stanislav,
>
>
>
> Thanks very much for your answer.  It was helpful.
>
>
>
> My issue remains, but I was on the wrong path in where the problem
> resided.  I'll lay out what I'm seeing and please let me know if you have
> any other suggestions on debugging it
>
>
>
> After your email, I realize now that I was getting ip4 packets after
> adding the interface but before the interface got enabled/configured.  I
> had the one connected node pinging it continuously.   I assumed that the
> interface continued with ip4 disablement always "on", but I can  see with
> your suggestions and in GDB that the interface did eventually get enabled
> properly.   Just not until after it received a few of the ICMP requests.
>
>
>
> I was stuck on the ip4-not-enabled because I didn’t see those ip4 not
> enabled calls in the cases it works without worker threads.   I think
> that’s simply because the timing is different on how quickly the interface
> gets enabled after the threads get started up.  Traces are below for both
> cases.
>
>
>
> As I mentioned, I'm still having issues with getting my setup working with
> worker threads (main symptom is that once things startup and are configured
> I no longer receive packets).  Here is some of what I'm seeing with worker
> threads enabled:
>
> · When pinging the vpp node from a node on the tn-eth2 interface
> I get no ICMP reply from the vpp node.
>
> · When pinging from vpp node (in vppctl), I can see the ICMP
> requests from the vpp node in tcpdump on the tn-eth2 non-vpp node, and I
> can see the non-vpp nodes ICMP reply, but the vpp node does not see this
> reply (don't see it in the dpdk-input trace shown later).
>
>
>
> When I run the trace at startup in the case with 1 worker thread enabled
> (corelist-workers 2):
>
> clear trace
>
> trace add dpdk-input 10
>
>
>
> I get the trace below (I'm pinging from a node on tn-eth2 continuously).
> This “show trace” command was executed well after starting up and well
> after getting dozens of pings.  And I only see the two pings in the trace
> on tn-eth2 and they properly gets thrown out because ip4 is disabled (not
> configured/enabled yet).  But, after everything starts up, and ip4 is
> enabled, I no longer see the packets in dpdk-input.  Here is the trace (I
> only get 4 out of the 10 max packets in the trace even though I'm
> continuously pinging).
>
>
>
> (I show the working case after this trace where I have the exact same
> setup, but I don't use worker threads)
>
>
>
>
> -
>
>
>
> vpp# show trace
>
> --- Start of thread 0 vpp_main ---
>
> No packets in trace buffer
>
> --- Start of thread 1 vpp_wk_0 ---
>
> Packet 1
>
>
>
> 00:00:02:094182: dpdk-input
>
>   tn-eth2 rx queue 0
>
>   buffer 0x9fb1b: current data 0, length 98, buffer-pool 0, ref-count 1,
> totlen-nifb 0, trace handle 0x100
>
>   ext-hdr-valid
>
>   l4-cksum-computed l4-cksum-correct
>
>   PKT MBUF: port 2, nb_segs 1, pkt_len 98
>
> buf_len 2176, data_len 98, ol_flags 0x0, data_off 128, phys_addr
> 0xc23ec740
>
> packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
>
> rss 0x0 fdir.hi 0x0 fdir.lo 0x0
>
>   IP4: 02:00:17:05:b7:59 -> 02:00:17:05:9f:bd
>
>   ICMP: 192.168.100.20 -> 192.168.100.5
>
> tos 0x00, ttl 64, length 84, checksum 0x11fd dscp CS0 ecn NON_ECN
>
> fragment id 0xdf41, flags DONT_FRAGMENT
>
>   ICMP echo_request checksum 0xa4d1 id 21172
>
> 00:00:02:094233: ethernet-input
>
>   frame: flags 0x1, hw-if-index 3, sw-if-index 3
>
>   IP4: 02:00:17:05:b7:59 -> 02:00:17:05:9f:bd
>
> 00:00:02:094260: ip4-input
>
>   ICMP: 192.168.100.20 -> 192.168.100.5
>
> tos 0x00, ttl 64, length 84, checksum 0x11fd dscp CS0 ecn NON_ECN
>
> fragment id 0xdf41, flags DONT_FRAGMENT
>
>   ICMP echo_request checksum 0xa4d1 id 21172
>
> 00:00:02:094268: ip4-not-enabled
>
> ICMP: 192.168.100.20 -> 192.168.100.5
>
>   tos 0x00, ttl 64, length 84, checksum 0x11fd dscp CS0 ecn NON_ECN
>
>   fragment id 0xdf41, flags DONT_FRAGMENT
>
> ICMP echo_request checksum 0xa4d1 id 21172
>
> 00:00:02:094275: error-drop
>
>   rx:tn-eth2
>
> 00:00:02:094277: drop
>
>   dpdk-input: no error
>
>
>
> Packet 2
>
>
>
> 00:00:02:094182: dpdk-input
>
>   tn-eth2 rx 

[vpp-dev] experimental script to get the names of the reviewers for a change

2022-01-26 Thread Andrew Yourtchenko
Hi all,

I've had this little script sitting in my gerrit for a while, but keep
forgetting to send an email about it, so finally here we are...

If you run it on top of a change, it will look at the files that it
modifies, and scout the MAINTAINERS file based on the file paths, and
point out the components your change touches and the names of the
people who should review your change.

I am guessing something along these lines can be bolted on to JJB to
automatically add the reviewers when the change is submitted...

Thoughts ?

https://gerrit.fd.io/r/c/vpp/+/33139

--a

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20789): https://lists.fd.io/g/vpp-dev/message/20789
Mute This Topic: https://lists.fd.io/mt/88694893/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] IPSec/QAT offload config

2022-01-26 Thread Fan Zhang
Hi Govind,

I suppose you were not using Master?
The problem is addressed recently. You shall see no failure if running on 
master. If there is still problem please let me know.

Regards,
Fan

From: vpp-dev@lists.fd.io  On Behalf Of Govindarajan 
Mohandoss
Sent: Monday, January 24, 2022 1:38 AM
To: Govindarajan Mohandoss ; vpp-dev 

Cc: Yoan Picchi ; nd ; nd 
Subject: Re: [vpp-dev] IPSec/QAT offload config

Hi Experts,
It worked after making the following changes. I enabled “crypto_native_plugin” 
& qat in startup.  If this is a real issue and if my Crypto/QAT config is 
correct, I can submit this fix for review. Please let me know.

diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c
index 9f437cfcd..ed9a9d1be 100644
--- a/src/vnet/crypto/crypto.c
+++ b/src/vnet/crypto/crypto.c
@@ -333,6 +333,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
   for (i = 0; i < VNET_CRYPTO_ASYNC_OP_N_IDS; i++)
 {
   otd = cm->async_opt_data + i;
+  if (otd->active_engine_index_async == ~0)
+   continue;
   e = cm->engines + otd->active_engine_index_async;
   if (!e->dequeue_handler)
continue;
@@ -345,6 +347,8 @@ vnet_crypto_update_cm_dequeue_handlers (void)
 {
   if (ei[0] == last_ei)
continue;
+  if (ei[0] == ~0)
+   continue;

   e = cm->engines + ei[0];
   vec_add1 (cm->dequeue_handlers, e->dequeue_handler);


Startup conf:
-
plugins
{
…
plugin crypto_native_plugin.so
  {
enable
  }
}

cpu
{
 corelist-workers 9  /* Single worker */
  main-core 0
}

dpdk
{
  dev :af:00.0 #NIC
  dev :39:01.0 #QAT
  log-level debug
  dev default
  {
num-rx-desc 256
num-tx-desc 256
  }

Thanks
Govind

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan 
Mohandoss via lists.fd.io
Sent: Friday, January 21, 2022 1:19 PM
To: Govindarajan Mohandoss 
mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
mailto:n...@arm.com>>; nd mailto:n...@arm.com>>
Subject: Re: [vpp-dev] IPSec/QAT offload config


Once more than 1 worker core is added in startup conf, crash is not observed 
during init phase.  But when I set the async mode on, it crashes in same place. 
Do I need to set async mode on to use QAT ? Do I need to enable any specific 
plugin ?



cpu

{

 corelist-workers 9-12

  main-core 13

}



DBGvpp# set ipsec async mode on



Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at 
/home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

337   if (!e->dequeue_handler)

(gdb)





> -Original Message-

> From: vpp-dev@lists.fd.io 
> mailto:vpp-dev@lists.fd.io>> On Behalf Of Govindarajan

> Mohandoss via lists.fd.io

> Sent: Friday, January 21, 2022 12:24 PM

> To: vpp-dev mailto:vpp-dev@lists.fd.io>>

> Cc: Yoan Picchi mailto:yoan.pic...@arm.com>>; nd 
> mailto:n...@arm.com>>; nd

> mailto:n...@arm.com>>

> Subject: [vpp-dev] IPSec/QAT offload config

>

> Hi Experts,

>   We are trying to run IPSec with QAT offload and did the following dpdk

> config in startup conf. When we run VPP, it crashes in the init phase (Before

> reaching out to VPP shell). Can you please help us with proper config to

> enable QAT ?

> We did a sanity test with standalone DPDK IPSec application and it works fine

> with QAT card.

>

> dpdk

> {

>   dev :af:00.0 #NIC

>   dev :39:01.0 #QAT

>   log-level debug

>   dev default

>   {

> num-rx-desc 1024

> num-tx-desc 1024

>   }

> }

>

>

> Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

> 0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at

> /home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

> 337   if (!e->dequeue_handler)

> (gdb) bt

> #0  0x773713c9 in vnet_crypto_update_cm_dequeue_handlers () at

> /home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:337

> #1  0x77371d69 in vnet_crypto_request_async_mode (is_enable=1)

> at /home/govmoh01/vpp_qat/vpp/src/vnet/crypto/crypto.c:678

> #2  0x7ffef5b0e4ff in dpdk_cryptodev_init (vm=0x7ffef685a680)

> at

> /home/govmoh01/vpp_qat/vpp/src/plugins/dpdk/cryptodev/cryptodev.c:12

> 00

> #3  0x7ffef5af1608 in dpdk_process (vm=0x7ffef685a680,

> rt=0x7ffef8176d00, f=0x0)

> at /home/govmoh01/vpp_qat/vpp/src/plugins/dpdk/device/init.c:1417

> #4  0x76e513ed in vlib_process_bootstrap (_a=140733006596280) at

> /home/govmoh01/vpp_qat/vpp/src/vlib/main.c:1235

> #5  0x76cefc38 in clib_calljmp () at

> /home/govmoh01/vpp_qat/vpp/src/vppinfra/longjmp.S:123

> #6  0x7ffef4ddc8b0 in ?? ()

> #7  0x76e50e0f in vlib_process_startup (vm=0x7ffef685a680,

> p=0x7ffef8176d00, f=0x0)

>

> Thanks

> Govind

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply