Sure Fan. I will submit the patch. Thanks.

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Fan Zhang via 
lists.fd.io
Sent: Wednesday, February 9, 2022 6:09 AM
To: Govindarajan Mohandoss <govindarajan.mohand...@arm.com>; vpp-dev 
<vpp-dev@lists.fd.io>
Cc: Yoan Picchi <yoan.pic...@arm.com>; nd <n...@arm.com>; nd <n...@arm.com>
Subject: Re: [vpp-dev] IPSec/QAT offload config

Hi Govind,

Sorry for the late reply.
We managed to verify your fix proposal and it is valid.
Could you send a patch to gerrit and add me as reviewer?

Regards,
Fan

From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> 
<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 
<govindarajan.mohand...@arm.com<mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi <yoan.pic...@arm.com<mailto:yoan.pic...@arm.com>>; nd 
<n...@arm.com<mailto:n...@arm.com>>; nd <n...@arm.com<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 0000:af:00.0 #NIC
  dev 0000: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> 
<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 
<govindarajan.mohand...@arm.com<mailto:govindarajan.mohand...@arm.com>>; 
vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Cc: Yoan Picchi <yoan.pic...@arm.com<mailto:yoan.pic...@arm.com>>; nd 
<n...@arm.com<mailto:n...@arm.com>>; nd <n...@arm.com<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.

0x00007ffff73713c9 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> 
> <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 <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>

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

> <n...@arm.com<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 0000:af:00.0 #NIC

>   dev 0000: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.

> 0x00007ffff73713c9 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  0x00007ffff73713c9 in vnet_crypto_update_cm_dequeue_handlers () at

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

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

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

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

>     at

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

> 00

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

> rt=0x7ffef8176d00, f=0x0)

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

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

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

> #5  0x00007ffff6cefc38 in clib_calljmp () at

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

> #6  0x00007ffef4ddc8b0 in ?? ()

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

> p=0x7ffef8176d00, f=0x0)

>

> Thanks

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

Reply via email to