From mboxrd@z Thu Jan 1 00:00:00 1970 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 7D1952110B for ; Wed, 4 Oct 2023 23:16:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rq8S6K15" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31A67C433C7; Wed, 4 Oct 2023 23:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696461413; bh=xXnSxNXCYKBj1DiiZx2Wh0o09iVv7ahfMtaZr6caxrE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Rq8S6K15/UijMAdnO95A0BYj8rZ64OJfE5O/kZMxQm1ogB0xPuMKUGljvGJQAf/o6 dkAysvjFr4CFszk5YcBNxsndYmdR5XbYFi//fg5XEaKPUI36iYsRyRG/DUXsNwyQ8T cNdxAfY3g4d6tXnCM+PJFigFtVHiyHCSyLFf3RmAFFdcwB1n3dPMuCL+bKibW092Y+ 8vQFhQF6J+vlvD0ug7qmDByBsWS3Je4m6SAeMTf/s2w3vCmWaF1tWWviGww2RbUOOA tzKmD/sWoUMQpLRHx85thmyFxIbRs3ZNrTSbTySJTZldy4wZAXHQGfijOhe8gHTd8o yGOkU/n4Spv2A== Date: Wed, 4 Oct 2023 16:16:51 -0700 From: Jakub Kicinski To: Cc: , , , , Edward Cree , , , , , , , , , , , , , Subject: Re: [PATCH v4 net-next 6/7] net: ethtool: add a mutex protecting RSS contexts Message-ID: <20231004161651.76f686f3@kernel.org> In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 27 Sep 2023 19:13:37 +0100 edward.cree@amd.com wrote: > While this is not needed to serialise the ethtool entry points (which > are all under RTNL), drivers may have cause to asynchronously access > dev->ethtool->rss_ctx; taking dev->ethtool->rss_lock allows them to > do this safely without needing to take the RTNL. Can we use a replay mechanism, like we do in TC offloads and VxLAN/UDP ports? The driver which lost config can ask for the rss contexts to be "replayed" and the core will issue a series of ->create calls for all existing entries? Regarding the lock itself - can we hide it under ethtool_rss_lock(dev) / ethtool_rss_unlock(dev) helpers?