Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp715323lqp; Wed, 12 Jun 2024 14:09:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWhljnaGx3EaC+HM312ZcDDrdvFGFGlEyiyouZGKwAsgV1YtDJ9XGe8uqYZCDnlEMoChNMye1I/FvvHM+hX7MTJAbyXErvbMQ66Ad2Lg== X-Google-Smtp-Source: AGHT+IH9dyw3RPmDQxsHA3/VWOSNaUtAQssHGxbasxyH03PH1S1vEogE8v0aWwWX1w2D1+jE+PH8 X-Received: by 2002:a50:871a:0:b0:57c:7cff:17be with SMTP id 4fb4d7f45d1cf-57caa9bf69dmr1969774a12.28.1718226594301; Wed, 12 Jun 2024 14:09:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718226594; cv=pass; d=google.com; s=arc-20160816; b=HGcMZH98ZnDXjR5qbvAskwo0z3WDBYZXFvDslbXRb/lzermX3csxQ/YSlx99jejdk6 C2HBfBIWO/Zvw5AgnvTWoMVmnHpN65cFf7UEc3HxIBbantKoVEjHKziBgIAw34KPEd/m 78dFb9vvEV2Ng3H6aSK8kATjEmd8uMAr+oyWfeAYr/UGAIa9XjxPGLUOj8/G+KG+JlN4 CDFtpHjVrLfzbCxne21gjq/58i4/qm3LceiPqVYJT8Z4G0yX8euUiG0c/FcouaEBHIwu 0QJFvbm6XxkSCHTKZlnuy0wrZcK8so8HXbsKAEB05o2dvBCKGt2dCoRociian1CnWC4z 1Lyg== 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 :subject:cc:to:from:date:dkim-signature; bh=kh7se2gWuulaBsIutEyjxwWg50MN3CFzzOM60suOp0I=; fh=oZ+rlVdHKG0Kk+8rnlNPBGn3diZTzcuSYeCGlGydgZQ=; b=KbAHZotHt6QESs7fOavDrKScP73S3LKx7E6Z8dwm4mDY2yXX6mQLcAlB0pK9wtUK7A zGk4dw6qOYIjwGp/qa9RFYgMNyz8AJY0Xw4z6F3yQumcDjrtyx0EDAo+sofq6oBIA7M3 OlCmseNZnCwQDPfxJo+ILSP5DsIs5fQ8kgC0ndncyvsoNrodRWmT6nnBrI2FyxtKj4Nf gmOzMJopmlHgNLlzCRgo8EZPV1VLGHmzIH0JGQnMYkXaKgj4W0ag5UUGZ7UHQJGJ1aT8 b3bBSAoaItK+acrp303kx8VzkzTQNILkH+HU+9DhFLHJ19oMZTRk11sWcOeTpCKuv9g6 hQvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QlF6deoA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c6fadde99si5061620a12.533.2024.06.12.14.09.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 14:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QlF6deoA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212264-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EC4E01F22A50 for ; Wed, 12 Jun 2024 21:09:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBE7F86246; Wed, 12 Jun 2024 21:09:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QlF6deoA" 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 D949B4315D; Wed, 12 Jun 2024 21:09:36 +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=1718226577; cv=none; b=QxlVB06q7XksvluHV/x6CpHsIbJkxFUWA/778xEYiXxggu0QJu8600smtH/+K9ozxN9NRz7rFT8Xn9+1nZXXrSkwlT5HX5JudJ/2baHdAgXCCgZ1lGpecUKXE8j0gTgJpOC40jmLgo6+j33jrU4Pf2ogglAtR4ORdVQZ4skcXxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718226577; c=relaxed/simple; bh=p/mXOYAvIuYsfLPdV+2dCK5EknA6B/HSfkaHVfEQato=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=muwwGA8FEtadBYVxW2VrRWI7vK7mzJIsN+lroo823BAFKA8S/mP2Gu+taFT8Kie1Bm4ZV+FEqVDvg788CjsAneIEHPK6havDBhpyAJz2+2A51CQxyCETetCRbF8rCNOwRP9S8B5v8m+xqe3mkj3XDVyZTXB+N5I0bv1xJOAZ4V0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QlF6deoA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5B25C116B1; Wed, 12 Jun 2024 21:09:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718226576; bh=p/mXOYAvIuYsfLPdV+2dCK5EknA6B/HSfkaHVfEQato=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QlF6deoALi2EBQ2PTzXnxcW3NEVc0zVQd6HRY4xR0lmS9aEe8hLk2Ts1HsmpkWiU5 2QFRDPyjhEIsalGkDUptUPth0v0OAvQzUHgJ99JOUk43vxydLlE41GbbNm4skSYcrL cjx59AuIscyowaGkOG9fFfR8jdc+axYmC2qXLpfOqPj0aUBj32b6SyTpuP/rjzoYgR J3W3ba3cpScjDHqBVKeNdYx0jPkX7iFlhbQFOXJaokA7bLqjzyMqnE1vKpkRy4RXhB v/ZO5W/iA0H8239PHoU6jp2gn0zIkIYuKG7zHrOA2qJZ3Nje6po+zF0BIhic4FG577 oWuNO3YPD1ifQ== Date: Wed, 12 Jun 2024 14:09:35 -0700 From: Jakub Kicinski To: Larysa Zaremba Cc: , Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Paolo Abeni , Alexei Starovoitov , "Daniel Borkmann" , Jesper Dangaard Brouer , John Fastabend , Maciej Fijalkowski , , , , , Michal Kubiak Subject: Re: [PATCH iwl-net 0/3] ice: fix synchronization between .ndo_bpf() and reset Message-ID: <20240612140935.54981c49@kernel.org> In-Reply-To: References: <20240610153716.31493-1-larysa.zaremba@intel.com> <20240611193837.4ffb2401@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@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, 12 Jun 2024 08:56:38 +0200 Larysa Zaremba wrote: > On Tue, Jun 11, 2024 at 07:38:37PM -0700, Jakub Kicinski wrote: > > On Mon, 10 Jun 2024 17:37:12 +0200 Larysa Zaremba wrote: > > > Fix the problems that are triggered by tx_timeout and ice_xdp() calls, > > > including both pool and program operations. > > > > Is there really no way for ice to fix the locking? :( > > The busy loops and trylocks() are not great, and seem like duct tape. > > The locking mechanisms I use here do not look pretty, but if I am not missing > anything, the synchronization they provide must be robust. Robust as in they may be correct here, but you lose lockdep and all other infra normal mutex would give you. > A prettier way of protecting the same critical sections would be replacing > ICE_CFG_BUSY around ice_vsi_rebuild() with rtnl_lock(), this would eliminate > locking code from .ndo_bpf() altogether, ice_rebuild_pending() logic will have > to stay. > > At some point I have decided to avoid using rtnl_lock(), if I do not have to. I > think this is a goal worth pursuing? Is the reset for failure recovery, rather than reconfiguration? If so netif_device_detach() is generally the best way of avoiding getting called (I think I mentioned it to someone @intal recently).