Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4829062iob; Mon, 9 May 2022 02:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz359spIRsEsroebPf7u0za6VoizneSLm5+1C3ST8BjdXvxVFpikEAkJy/PGd4YUnnu8yb3 X-Received: by 2002:a62:15c7:0:b0:50d:388d:916a with SMTP id 190-20020a6215c7000000b0050d388d916amr15198143pfv.8.1652088962121; Mon, 09 May 2022 02:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652088962; cv=none; d=google.com; s=arc-20160816; b=zNA4c0rIxAaGspTa7UbZL/lCCcYkyBbVJrfaFrtrfOZAVrDPtfWekIlouL+0ifrtpF QJOzrNA+O1+6K9+fM48JKCQaSNHwiPGH4uMDGNU3N490Nl6h7J2XYSHp5zpnGbso/NQs 9MM1ZaYW6SH6HHpQFMl72Y6BKms1kfcmmXU4rmySBX/V/gO91WHyFJ+qZq/zB+6xPcgy 6HLjw/FjYtl8abuW3yhny5qa2hXbz8uNod4haPZ5CrmRY9RZJbXhxu4u+f8shH8AfO5e lqDahOJN2J5B4pxrVZI4D+uL4y7I0OS2NtzP29rj4exS8fq9UMU84aqFVSYatRjIn4wo nO+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZyH1L7x1ISoLcbBOZnhrJJFTrrZkHDBcgbQNIf3/3oI=; b=A1mTjIYd4/voUb+95gme/cD1wfNvSJtErlOpFtYkLt2dfR3xg7OIh4ICoG8lxGB95a dfAeD43QMN2EVW7BSlBHUPl/GLb3YSSuxkGoeb0vX/cWJ9Aavv+Eu2Nm4jtRswkC8Cfd tAX+jp0jTkFnKyr7EOYwHWue7GhHNwgT1EKf4SoldkqjPwZokpNAR7g6191yg26q8xnY /7fV4xW/M9vMmhWTZTSllT5lBxwePuyvZ3bwk9sFB919KiCOoBkVDE/RoQUVrQwO++0Z 1mWq9pwZkstvNQLxvZdVqwBlW1ThUokqpK6DJua/Vf61YiiT1Vsx+mpn1LdWY8bFBZlV nUHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l+VS8OvS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c1-20020a056a00248100b0050e0a5aa240si14926829pfv.6.2022.05.09.02.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:36:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l+VS8OvS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D3DF21E5EDE; Mon, 9 May 2022 02:22:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbiEDR1E (ORCPT + 99 others); Wed, 4 May 2022 13:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346734AbiEDRF7 (ORCPT ); Wed, 4 May 2022 13:05:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A363A4755D; Wed, 4 May 2022 09:54:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8B55A618DF; Wed, 4 May 2022 16:54:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB661C385AF; Wed, 4 May 2022 16:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683259; bh=5Vle1qWJnQKV1VFtVFlv7ED24OJaCLIdTzacdmZoabs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l+VS8OvSkrC9ozjwHI4UATcUd4b71tIyPQ5zeuiiBcmW3JN3VxssE43oDb5ky974M BbO4Egfp1B4UAjXr7o7hEYX/tGlr6tgqO32zkSN6tNhmJsKOK8uQOLkigFqzvdWVK5 636zOZeQSW9BGek/1r06baWX3JyupMXJGvPhVoTc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raed Salem , Leon Romanovsky , Shannon Nelson , Konrad Jankowski , Tony Nguyen , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 124/177] ixgbe: ensure IPsec VF<->PF compatibility Date: Wed, 4 May 2022 18:45:17 +0200 Message-Id: <20220504153104.222961804@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Leon Romanovsky [ Upstream commit f049efc7f7cd2f3c419f55040928eaefb13b3636 ] 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 Reviewed-by: Shannon Nelson Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20220427173152.443102-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- 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; } -- 2.35.1