From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3A41C433EF for ; Thu, 31 Mar 2022 16:14:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239703AbiCaQQl (ORCPT ); Thu, 31 Mar 2022 12:16:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239681AbiCaQQh (ORCPT ); Thu, 31 Mar 2022 12:16:37 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7D3B54BDD for ; Thu, 31 Mar 2022 09:14:50 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id b15so34993pfm.5 for ; Thu, 31 Mar 2022 09:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=nzdRKNhSadAGU2/1+9CJCIsH9iz4xNg93BLTCvdABBQ=; b=kwvMVzfuXIcvvzsQ/j5YgQYI3vhnY5RbNuMVIycbxZO4sjXpzZJouBZuCvbw4DeauP K7Q5Aqxhf1nkdiGW4OKzEmdc6mjnqw9vNNc9z1wnxpGnRMbC6BkFvRSwC7bM203EX+Oj Q0Nr/zawkq2K+Ido40uBOgDhiPJRfoukYC1EHWwPTXOFg1o7dHzYJBbpp5B3RhqBd8LS yC+P5kAlRxsAWWCN4qfzD7OnSa/V1o3zhQ5KciZnlXMp5LuD+VRML3bul4UH20JxzSnq CvhVLb1Z2jfAlNt4eStGNyG38Q3m76jUjBgkphuY/5mZOOVKTp2RAVw3Wx1kMUfF6h/Z d0ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=nzdRKNhSadAGU2/1+9CJCIsH9iz4xNg93BLTCvdABBQ=; b=3DmW6Fssin4rSDuCmahLI3OHc1qd7m2WQm04MtyDVNIj/ijqEs6AruP5jJInaU2kMf WBuxyKm0y11lixRGD8Pbl4dOSatmWzGWDD4U+YhRdfrVygAHRcLC5ZaOjL0CgmJ6SZhz qGDNmNRapT+mVfMubbwDpIwShVV5t5pOjIoeXeD0Iy7kmYeqhf/XFoCm+IXPXkFjaF6H 7Qp/6/V897TJ36SS/SENs3T3gQYAtIesSKyYYtkz1kdffiMtxL4DrxP9HbrFddY41aHn 1Zu9BKNnxk8aAAeUYxvYVDnjn3GmWuVUNvWKcLklMIB5oAjke20PUFtfK3c/8rnV3Sns Jl4g== X-Gm-Message-State: AOAM533S7gKv20oHhclZkjJ2RBJFyXNpmL/5ewIgJlc44OKz1Mv/D9LE klCMrhfLajFvTZIh/fLsT23RcA== X-Google-Smtp-Source: ABdhPJyNOuupobAksijWayq6Ffs/N+B1zxVK8M2fdvImwOFpb2TCmYL3X8fCPVrhWr8LX0wNMT9cNw== X-Received: by 2002:a05:6a00:440c:b0:4fa:da3f:251c with SMTP id br12-20020a056a00440c00b004fada3f251cmr6303682pfb.73.1648743290114; Thu, 31 Mar 2022 09:14:50 -0700 (PDT) Received: from [192.168.0.2] ([50.53.169.105]) by smtp.gmail.com with ESMTPSA id 124-20020a621682000000b004f6a2e59a4dsm27306697pfw.121.2022.03.31.09.14.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 09:14:49 -0700 (PDT) Message-ID: Date: Thu, 31 Mar 2022 09:14:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH net v1] ixgbe: ensure IPsec VF<->PF compatibility Content-Language: en-US To: Leon Romanovsky , "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , intel-wired-lan@lists.osuosl.org, Jeff Kirsher , Jesse Brandeburg , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , Raed Salem , Shannon Nelson , Tony Nguyen , Steffen Klassert References: <737616899df2a482e4ec35aa4056c9ac608d2f50.1648714609.git.leonro@nvidia.com> From: Shannon Nelson In-Reply-To: <737616899df2a482e4ec35aa4056c9ac608d2f50.1648714609.git.leonro@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/31/22 1:20 AM, Leon Romanovsky wrote: > From: Leon Romanovsky > > The VF driver can forward any IPsec flags and such makes the function > is not extendable and prone to backward/forward incompatibility. > > If new software runs on VF, it won't know that PF configured something > completely different as it "knows" only XFRM_OFFLOAD_INBOUND flag. > > Fixes: eda0333ac293 ("ixgbe: add VF IPsec management") > Reviewed-by: Raed Salem > Signed-off-by: Leon Romanovsky a Thanks! Reviewed-by: Shannon Nelson > --- > Chaagelog: > v1: > * Replaced bits arithmetic with more simple expression > v0: https://lore.kernel.org/all/3702fad8a016170947da5f3c521a9251cf0f4a22.1648637865.git.leonro@nvidia.com > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c > index e596e1a9fc75..69d11ff7677d 100644 > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c > @@ -903,7 +903,8 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf) > /* Tx IPsec offload doesn't seem to work on this > * device, so block these requests for now. > */ > - if (!(sam->flags & XFRM_OFFLOAD_INBOUND)) { > + sam->flags = sam->flags & ~XFRM_OFFLOAD_IPV6; > + if (sam->flags != XFRM_OFFLOAD_INBOUND) { > err = -EOPNOTSUPP; > goto err_out; > }