lkml.org 
[lkml]   [2021]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 038/168] ixgbe: fail to create xfrm offload of IPsec tunnel mode SA
    Date
    From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    From: Antony Antony <antony@phenome.org>

    commit d785e1fec60179f534fbe8d006c890e5ad186e51 upstream.

    Based on talks and indirect references ixgbe IPsec offlod do not
    support IPsec tunnel mode offload. It can only support IPsec transport
    mode offload. Now explicitly fail when creating non transport mode SA
    with offload to avoid false performance expectations.

    Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA")
    Signed-off-by: Antony Antony <antony@phenome.org>
    Acked-by: Shannon Nelson <snelson@pensando.io>
    Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 5 +++++
    drivers/net/ethernet/intel/ixgbevf/ipsec.c | 5 +++++
    2 files changed, 10 insertions(+)

    --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
    +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
    @@ -575,6 +575,11 @@ static int ixgbe_ipsec_add_sa(struct xfr
    return -EINVAL;
    }

    + if (xs->props.mode != XFRM_MODE_TRANSPORT) {
    + netdev_err(dev, "Unsupported mode for ipsec offload\n");
    + return -EINVAL;
    + }
    +
    if (ixgbe_ipsec_check_mgmt_ip(xs)) {
    netdev_err(dev, "IPsec IP addr clash with mgmt filters\n");
    return -EINVAL;
    --- a/drivers/net/ethernet/intel/ixgbevf/ipsec.c
    +++ b/drivers/net/ethernet/intel/ixgbevf/ipsec.c
    @@ -272,6 +272,11 @@ static int ixgbevf_ipsec_add_sa(struct x
    return -EINVAL;
    }

    + if (xs->props.mode != XFRM_MODE_TRANSPORT) {
    + netdev_err(dev, "Unsupported mode for ipsec offload\n");
    + return -EINVAL;
    + }
    +
    if (xs->xso.flags & XFRM_OFFLOAD_INBOUND) {
    struct rx_sa rsa;


    \
     
     \ /
      Last update: 2021-03-15 15:10    [W:3.086 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site