• Shannon Nelson's avatar
    xfrm: allow driver to quietly refuse offload · 4a132095
    Shannon Nelson authored
    If the "offload" attribute is used to create an IPsec SA
    and the .xdo_dev_state_add() fails, the SA creation fails.
    However, if the "offload" attribute is used on a device that
    doesn't offer it, the attribute is quietly ignored and the SA
    is created without an offload.
    Along the same line of that second case, it would be good to
    have a way for the device to refuse to offload an SA without
    failing the whole SA creation.  This patch adds that feature
    by allowing the driver to return -EOPNOTSUPP as a signal that
    the SA may be fine, it just can't be offloaded.
    This allows the user a little more flexibility in requesting
    offloads and not needing to know every detail at all times about
    each specific NIC when trying to create SAs.
    Signed-off-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
    Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
xfrm_device.txt 5.15 KB