examples/ipsec-secgw: add driver mode worker
authorLukasz Bartosik <lbartosik@marvell.com>
Thu, 27 Feb 2020 16:18:33 +0000 (17:18 +0100)
committerAkhil Goyal <akhil.goyal@oss.nxp.com>
Sun, 5 Apr 2020 16:26:04 +0000 (18:26 +0200)
commit4965dda045d372e5001a3a9dd8714032dab8f782
treeb8ae87beedbed7936474e6675e3e3b268b62a7dd
parent65e3a202ac6dd81acaa9623d7772e62043bbe28e
examples/ipsec-secgw: add driver mode worker

Add driver inbound and outbound worker thread for ipsec-secgw. In driver
mode application does as little as possible. It simply forwards packets
back to port from which traffic was received instructing HW to apply
inline security processing using first outbound SA configured for
a given port. If a port does not have SA configured outbound traffic
on that port will be silently dropped. The aim of this mode is to
measure HW capabilities. Driver mode is selected with single-sa option.
The single-sa option accepts SA index however in event mode the SA
index is ignored.

Example command to run ipsec-secgw in driver mode:
ipsec-secgw -w 0002:02:00.0,ipsec_in_max_spi=128
-w 0002:03:00.0,ipsec_in_max_spi=128 -w 0002:0e:00.0 -w 0002:10:00.1
--log-level=8 -c 0x1 -- -P -p 0x3 -u 0x1 -f aes-gcm.cfg
--transfer-mode event --event-schedule-type parallel --single-sa 0

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
examples/ipsec-secgw/Makefile
examples/ipsec-secgw/ipsec-secgw.c
examples/ipsec-secgw/ipsec-secgw.h [new file with mode: 0644]
examples/ipsec-secgw/ipsec.h
examples/ipsec-secgw/ipsec_worker.c [new file with mode: 0644]
examples/ipsec-secgw/meson.build