kernel-netlink: Add new automatic hw_offload mode
authorAdi Nissim <adin@mellanox.com>
Mon, 12 Mar 2018 14:34:20 +0000 (16:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Mar 2018 09:28:44 +0000 (10:28 +0100)
commit338cc5812eb7a9bb2550ea2420f6d9dbb017fb8b
tree1efcd412fcae09e752c8dd61c827e119e407bf25
parentaad9bd361315b4cad98d9a718903bfab0c4a6ac1
kernel-netlink: Add new automatic hw_offload mode

Until now there were 2 hw_offload modes: no/yes
* hw_offload = no  : Configure the SA without HW offload.
* hw_offload = yes : Configure the SA with HW offload.
                     In this case, if the device does not support
                     offloading, SA creation will fail.

This commit introduces a new mode: hw_offload = auto
----------------------------------------------------
If the device and kernel support HW offload, configure
the SA with HW offload, but do not fail SA creation otherwise.

Signed-off-by: Adi Nissim <adin@mellanox.com>
Reviewed-by: Aviv Heller <avivh@mellanox.com>
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c