[dpdk-users] Problem with ipsec-secgw on DPAA

2021-04-12 Thread Bartlomiej

Hello,

I have a couple of problems with the example apps.

The setup used for testing is a custom LS1046A-based board running QorIQ 
4.19 linux kernel. DPDK is built from the main branch with the DPAA 
driver, specifically commit 41e026c1b3fd07ee. One of the ethernet ports 
is under DPDK control and is plugged in directly into another board for 
inspection of egress traffic. The DPDK apps are spawned with a tap 
virtual device to insert some UDP packets for testing.


My goal is to run the ipsec-secgw app on it with hardware encryption.

I managed to run l2fwd successfully, but have a couple of problems with 
other example apps:
1) l2fwd-crypto crashes on `struct qm_portal` access, which after 
checking in gdb seems to consist of zeros.
2) ipsec-secgw - No matter what config I use, the only thing I managed 
so far is to forward the UDP packets from the tap device to the ethernet 
port. There is no ESP and the contents are unencrypted on the other 
device. The config used:


```
sp ipv4 in esp protect 5 pri 2 dst 10.0.3.0/24 sport 0:65535 dport 0:65535

sa in 5 \
cipher_algo aes-128-cbc \
cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
auth_algo sha1-hmac \
auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
mode ipv4-tunnel \
src 10.0.3.100 dst 100.0.3.101 \
port_id 0 type lookaside-protocol-offload

rt ipv4 dst 10.0.3.0/24 port 0
```

The UDP packets are generated according to this spec:
https://gist.github.com/bartlomiejn/2607847a3f70d543da92f5717b88fa4e

Is my config correct? Can anyone help with diagnosing this problem?

Best regards,
Bartlomiej Nowak
Software Engineer
Conclusive Engineering



Re: [dpdk-users] Problem with ipsec-secgw on DPAA

2021-04-12 Thread Hemant Agrawal

Hi Bartlomiej,

    I hope you are following the LSDK user guide w.r.t using right dtb 
file for userspace mode.



Regards,

Hemant

On 4/12/2021 9:33 PM, Bartlomiej wrote:

Hello,

I have a couple of problems with the example apps.

The setup used for testing is a custom LS1046A-based board running 
QorIQ 4.19 linux kernel. DPDK is built from the main branch with the 
DPAA driver, specifically commit 41e026c1b3fd07ee. One of the ethernet 
ports is under DPDK control and is plugged in directly into another 
board for inspection of egress traffic. The DPDK apps are spawned with 
a tap virtual device to insert some UDP packets for testing.


My goal is to run the ipsec-secgw app on it with hardware encryption.

I managed to run l2fwd successfully, but have a couple of problems 
with other example apps:
1) l2fwd-crypto crashes on `struct qm_portal` access, which after 
checking in gdb seems to consist of zeros.
2) ipsec-secgw - No matter what config I use, the only thing I managed 
so far is to forward the UDP packets from the tap device to the 
ethernet port. There is no ESP and the contents are unencrypted on the 
other device. The config used:


```
sp ipv4 in esp protect 5 pri 2 dst 10.0.3.0/24 sport 0:65535 dport 
0:65535


sa in 5 \
cipher_algo aes-128-cbc \
cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
auth_algo sha1-hmac \
auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
mode ipv4-tunnel \
src 10.0.3.100 dst 100.0.3.101 \
port_id 0 type lookaside-protocol-offload

rt ipv4 dst 10.0.3.0/24 port 0
```

The UDP packets are generated according to this spec:
https://gist.github.com/bartlomiejn/2607847a3f70d543da92f5717b88fa4e

Is my config correct? Can anyone help with diagnosing this problem?

Best regards,
Bartlomiej Nowak
Software Engineer
Conclusive Engineering