Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1232295pxb; Fri, 1 Apr 2022 08:02:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaXcvQeaomLx4fLls0nqqFb6TVA2lb3roQ4tAh+5glV5SukQCUElggvwVJkZq9vJ1vhr4m X-Received: by 2002:a17:907:8a25:b0:6d7:d59:6912 with SMTP id sc37-20020a1709078a2500b006d70d596912mr177196ejc.259.1648825352204; Fri, 01 Apr 2022 08:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825352; cv=none; d=google.com; s=arc-20160816; b=eBHe7LuDc0Zg7J5rpu1jfMJxkHQnKk4wts7HamiRGQtgz4xdA68WIgs/w3+OiZaZYg aV96oc/7ku4lQsKDcAf/Reuv5Pm5OdvG60/9y4xS26aYcK451Y2vOKBIVu8Pst9H0rsO VSEA4jeiJoFQ2kRXzvC4K+vwNM9yp8TRpjZ5f4rxGfXpQRbr9Mz+EDu2bIIHzgmHocfv oIWVHyq+vuooANoZtqF5Ok4SRey9FzBdyXSUgl0ZBhA2piXaZROn3pMngY9tTnxDQEJJ EOzLltanLM1t34ymFkJWV4OjjeLeS7zSTwB4pfrD7hyLZdMueqVEBagVT7owWI7fSpfm o0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nzdRKNhSadAGU2/1+9CJCIsH9iz4xNg93BLTCvdABBQ=; b=sKlm0Qc5RELahq/1pSi+6TUTllsDHyZRO2cjy/etS/a7+2z7iy2V2zC84803quvL2i w86j2PF5prTOwQg+th1pdDg18974bSg0AJYGWjuR2ublXAPO5EoK4BU9XOiXkrhnGykW 0Rnv0oWPxp5ggXQK/XCm8VTCbd4NXKNtjr+QIUfJhjPjAz7fCg2mDCvtB7yfrNQP/meC cRv3z7idOtnEnYwAIWBOdwrWvGXeVWMFSNQ+rZPlPH44X6qkwFsXgSJAqTKIN9NiZ9JD 6gmtRRNPHq33tF6lczIxU8A0V8Dnq641QrdOsODiu7n0WNN9OEgU4WhJiEeAwtSWoosH bORQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pensando.io header.s=google header.b=kwvMVzfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pensando.io Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h22-20020a17090619d600b006e4e56ed144si532679ejd.414.2022.04.01.08.01.57; Fri, 01 Apr 2022 08:02:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@pensando.io header.s=google header.b=kwvMVzfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pensando.io Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239712AbiCaQQj (ORCPT + 99 others); Thu, 31 Mar 2022 12:16:39 -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-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 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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; > }