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 41CE21D1F51 for ; Fri, 6 Sep 2024 14:56:29 +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=1725634589; cv=none; b=LkBlhtr3c6ovMnsBkC0l0ZonT/3Vrszsi5djn/JwVUeC6+4oPy9AHx3H17NRux3CnugAS05J+xf1FUbTDYsRfFMQ/P6L/p+wksxuNnDaEbJVmQgTugQx76rjwznsJbzsaEJf//oILI/p8pm8m4o3Z54w5QzENU1jApSXgD6dunY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725634589; c=relaxed/simple; bh=AkshHGJCwSA/c3f6URldN+OvwR5GGBWXTT+jVK+kycc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hmxkCLb2t7Tiqig1+dMIqUD3XeoGrfb3lsBaQ/XLS928+tUF9ghBdzdjk6D3b+NA/jrXtpILXkn9JaoES2SZezEOV0viWzhqt94Iidv/MQMjnERrBv1PnqBovn8lihmS7yU7IkYFx7wTWexFBtX4x1lT0fFj2zqtATLa3VqD4gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r2+VyV4Q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r2+VyV4Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CF60C4CEC4; Fri, 6 Sep 2024 14:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725634588; bh=AkshHGJCwSA/c3f6URldN+OvwR5GGBWXTT+jVK+kycc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r2+VyV4QvLvzv+zqnC5q3wVSimowr5/kOBnpkauhnl+91pyVjs3Kyzz6mCrnRsSCk I1wi5Gwg+zaYsbwSiRqUKpGAje6mXNbZtMb64ZJ1BWUGSrF1N0rsEpC/hNMbX9sk/j aKhRMItf4swfjXmZhbLjXdMhlxjKvrLNkSis/1Wr25Y4oIyJWaDGNpJXLVWLb43lho c8tSIIRnd1995ugMWHoxBQgga/xPDWJkxdHwTy6Oioc4WX4JH2vuiumeNlkCRyVFhT +cqNc2YfZ/LLPFmiSwRBe3J4+luHBXv16LqzrmKv3lbRNHsWrTjJjMDRko6/2oWe0n poIzdyw3JTa9w== Date: Fri, 6 Sep 2024 07:56:27 -0700 From: Jakub Kicinski To: Paolo Abeni Cc: netdev@vger.kernel.org, Jiri Pirko , Madhu Chittim , Sridhar Samudrala , Simon Horman , John Fastabend , Sunil Kovvuri Goutham , Jamal Hadi Salim , Donald Hunter , anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, intel-wired-lan@lists.osuosl.org, edumazet@google.com Subject: Re: [PATCH v6 net-next 07/15] net-shapers: implement shaper cleanup on queue deletion Message-ID: <20240906075627.523b66f9@kernel.org> In-Reply-To: <896b88ce-f86c-4f00-8404-cedc6a202729@redhat.com> References: <160421ccd6deedfd4d531f0239e80077f19db1d0.1725457317.git.pabeni@redhat.com> <20240904183329.5c186909@kernel.org> <8fba5626-f4e0-47c3-b022-a7ca9ca1a93f@redhat.com> <896b88ce-f86c-4f00-8404-cedc6a202729@redhat.com> 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 Fri, 6 Sep 2024 16:49:32 +0200 Paolo Abeni wrote: > I forgot to mention there is another, easier, alternative: keep the max > queue id check in the drivers. The driver will have to acquire and held > in the shaper callbacks the relevant driver-specific lock - 'crit_lock', > in the iavf case. > > Would you be ok with such 2nd option? I'd strongly prefer if you implemented what was suggested. > Side note: I think the iavf should have to acquire such lock in the > callbacks no matter what or access/write to the rings info could be racy.