Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1845679lql; Wed, 13 Mar 2024 09:39:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpBg63AbLDU6IP6c781Ha52f5yqYw4aCzX8bsZAHjHHNO+1YQOeMd18p272jvh6RF8p211SslpdsuhGGiZX/D0GgY54HrFcoMOSqb3SQ== X-Google-Smtp-Source: AGHT+IEAGAQtkv37+tnkdqpffoid0WJJg9JrljsURJ9T6mLuhnKGLGYuSd5XmX0ZuNdsZdMhRoZN X-Received: by 2002:a05:6122:3113:b0:4d3:3952:1d1a with SMTP id cg19-20020a056122311300b004d339521d1amr588548vkb.4.1710347965959; Wed, 13 Mar 2024 09:39:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710347965; cv=pass; d=google.com; s=arc-20160816; b=Kq/DoO/UB4q2aQ3KoaUqa+fsAeY0mdXgtNxrv+FQr8eip8g6fZxoHSfjmVxll21XyK rqWtndMIcQ83w7MgZketksJrLVnV2T84+yg9EQAauocn46opa2Bb5CwF/wphC131r3sv JIE9beMZIXeSf9pELQr9Dx8ThujGOtM+Fk11N8Pw7HH+oDZ7EGwHYqo5xJqYPKROI+NA yd8rzNbTEA6KEFWAz/7o7NLjL3oJkQKZBZ/5CmjFVrh2SdTQ/+AMt1C+kUw2mvmmaZDj 3qV7w1hpYd13is6OkNm0ADKZKYB0G5JCANLV4RL9b6Zk0kj17/vXW/yEdKSkOzODpyeM zYTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tFbsIvB58vMA3dmCopTgEDDJbOyTKyY8IQf5NdgwMVE=; fh=qNLzHJNukNe+MTf51H9rfFMNWzkTt3eYQk4n85+iqsI=; b=VqLuYuD0tlhzDC217a6Qu/iyhHWGfh2qW4to7vhAbFRH1JCyZxjlCreHSeUjdsUCsw 5s6QKf1/AxTaDj5u+qrOMVW4Crw0IGsv8GsLRfvpo4A3UAAwXOCT77gOKP2abwoHUMpl cSxMNqfRC64nLRdFGVv6+Efv04uOUNP0DWlF9HQsudhLGCLqNPiRDdFJfLjHrb6vxz5t t1m2AudIC8VeLceaFFNwzk5jtEvcG7wjpuliZZXEWcpS3gOYkVk5aD3kW7EwXSVC0xPu vwJnvo49Bh/+Rbp6RztvOTPq8CBOnP4EJqPf4ZcP/1O4+ewMCXWkyAYDsiHq4borT2c0 0wHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="iictL/W7"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101768-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101768-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id qo8-20020a056214590800b006902dd148dasi9966058qvb.317.2024.03.13.09.39.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:39:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101768-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="iictL/W7"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101768-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101768-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A8C331C21A13 for ; Wed, 13 Mar 2024 16:39:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A150F60DCF; Wed, 13 Mar 2024 16:33:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iictL/W7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B396160BBB; Wed, 13 Mar 2024 16:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347594; cv=none; b=TUewYAW3H4bhIdsTeklhLqQnZqnmwMIcOOSBfttg6eHDLHVnAWAj11NZ+vjQt5kXGaqdGBrecf5gFSr444BogjzDvbPF95mchLC+2d3apwoiXvPB3Vx90RWN834d7HX4TYiHTZqhSpNL9lNlCtTKN+WN/LLpG6VQK8OFYvaiiwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347594; c=relaxed/simple; bh=acZBYzTvtkIkUQDMTQnwQfma+JP6bzgHLEAjC9VZXVY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hzbi7bSpvdmqe2WQnhuLcHIbL6Q8/qRA8wJxdD9bYXwMzrzS8pbW8EmdCczDcJ/17BsNllnpCukjNWFveaT3hy3hEx+2oqqxcwEKrTbgBWs7ffHE8x9Clxyu1H+f2UaWgwRPON9EQ7FS2Cit5XkG8uihPCJyw2jkCBjsrRDoHDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iictL/W7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C918C433A6; Wed, 13 Mar 2024 16:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347594; bh=acZBYzTvtkIkUQDMTQnwQfma+JP6bzgHLEAjC9VZXVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iictL/W7x7feLDK89u4By3cSUNb3NvFTjNsTfrXG9b5JNM/dR6Sm0Ro1c/MhDeITc TzK9SqWoEJGbBNWDM/DtiL6531IRAQDJMezTUzII48ujb9Dr44xzsoJVlGsfRoKO69 WFAeykTUy9UtwwV4zgft7p9eagQcTi8d/0M27BIo4VeYPvH+n7Tbzu+XWM3lmeQmLY /6zPVBcVdpaDVjo0xd6aUScJesiZk4CDFF84CdMWJaJ4Em3B+Iw9hSpAn/L6za5Q0D JxO+nwzish6XwCwHcNutWZ7N75F2hJLPl/SaDpMF4gUXip2S/WN+UPg4P0h7f9zmbr dbmF/BBdFJYQw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jacob Keller , Alan Brady , Rafal Romanowski , Tony Nguyen , Sasha Levin Subject: [PATCH 6.7 29/61] ice: virtchnl: stop pretending to support RSS over AQ or registers Date: Wed, 13 Mar 2024 12:32:04 -0400 Message-ID: <20240313163236.613880-30-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163236.613880-1-sashal@kernel.org> References: <20240313163236.613880-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.7.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.7.10-rc1 X-KernelTest-Deadline: 2024-03-15T16:32+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jacob Keller [ Upstream commit 2652b99e43403dc464f3648483ffb38e48872fe4 ] The E800 series hardware uses the same iAVF driver as older devices, including the virtchnl negotiation scheme. This negotiation scheme includes a mechanism to determine what type of RSS should be supported, including RSS over PF virtchnl messages, RSS over firmware AdminQ messages, and RSS via direct register access. The PF driver will always prefer VIRTCHNL_VF_OFFLOAD_RSS_PF if its supported by the VF driver. However, if an older VF driver is loaded, it may request only VIRTCHNL_VF_OFFLOAD_RSS_REG or VIRTCHNL_VF_OFFLOAD_RSS_AQ. The ice driver happily agrees to support these methods. Unfortunately, the underlying hardware does not support these mechanisms. The E800 series VFs don't have the appropriate registers for RSS_REG. The mailbox queue used by VFs for VF to PF communication blocks messages which do not have the VF-to-PF opcode. Stop lying to the VF that it could support RSS over AdminQ or registers, as these interfaces do not work when the hardware is operating on an E800 series device. In practice this is unlikely to be hit by any normal user. The iAVF driver has supported RSS over PF virtchnl commands since 2016, and always defaults to using RSS_PF if possible. In principle, nothing actually stops the existing VF from attempting to access the registers or send an AQ command. However a properly coded VF will check the capability flags and will report a more useful error if it detects a case where the driver does not support the RSS offloads that it does. Fixes: 1071a8358a28 ("ice: Implement virtchnl commands for AVF support") Signed-off-by: Jacob Keller Reviewed-by: Alan Brady Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 9 +-------- drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c index 8872f7a4f4320..d6348f20822e8 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c @@ -440,7 +440,6 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg) vf->driver_caps = *(u32 *)msg; else vf->driver_caps = VIRTCHNL_VF_OFFLOAD_L2 | - VIRTCHNL_VF_OFFLOAD_RSS_REG | VIRTCHNL_VF_OFFLOAD_VLAN; vfres->vf_cap_flags = VIRTCHNL_VF_OFFLOAD_L2; @@ -453,14 +452,8 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg) vfres->vf_cap_flags |= ice_vc_get_vlan_caps(hw, vf, vsi, vf->driver_caps); - if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) { + if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_PF; - } else { - if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_AQ) - vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_AQ; - else - vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RSS_REG; - } if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC; diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c index 7d547fa616fa6..588b77f1a4bf6 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c @@ -13,8 +13,6 @@ * - opcodes needed by VF when caps are activated * * Caps that don't use new opcodes (no opcodes should be allowed): - * - VIRTCHNL_VF_OFFLOAD_RSS_AQ - * - VIRTCHNL_VF_OFFLOAD_RSS_REG * - VIRTCHNL_VF_OFFLOAD_WB_ON_ITR * - VIRTCHNL_VF_OFFLOAD_CRC * - VIRTCHNL_VF_OFFLOAD_RX_POLLING -- 2.43.0