Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp238983lqs; Thu, 13 Jun 2024 08:47:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGX+vEvWHOKYsrgXHqvceq+snT9fV1c0nw+f8b7P9vEczSkEUGxpd7n67uQy3GphDt2X1GGJtxf9HALx5cIzUIzxdOj7Rf8Q9EJRxfkA== X-Google-Smtp-Source: AGHT+IHQGD+3QF5XVfScFV8rLr4aw//9Ic0E9fa4jMVdMpueLXhwjh+u6bIIApcbm3OTv05Lmolg X-Received: by 2002:a17:906:2314:b0:a6d:fbed:7953 with SMTP id a640c23a62f3a-a6f5245cefdmr216924666b.27.1718293671476; Thu, 13 Jun 2024 08:47:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718293671; cv=pass; d=google.com; s=arc-20160816; b=JhaNcGM2mOgzPL1cVuxG6bPNVjGqWYuVJ/hyjS/J4jcpKY+kfKdKpcJFzft7G69M4V PenOKIqtro5GgZc8etHq/LQYz4QFb5T94yhwOrbDsHRyJILM2+zLpmG12SxqN2DLWhRk DdhZdJyakhIHPc6GNI156wvvJcxPishuLCpCSMNCvw/YvNZo8KDq0NTn+WNCQi/4gwj5 /q/UyOeJQIut1OhwutyIx5J+1hCsbcdEqTmF0dreDCFkS7HXKjsy5kdCrmdYMN/Qqcmg 120PjSsBXnhXUBrWAloaePno7uWA0JgZ9Sv7W4gzMM+JpCfgsHRoxJ/PQ5unfks3CWzx 6Vbg== 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=3EZYUMPFCVToZ2DiRjkM7PDXMmHlNZMJ4zaQ5v7io4E=; fh=oZ+rlVdHKG0Kk+8rnlNPBGn3diZTzcuSYeCGlGydgZQ=; b=usR44joA0Ep4mZNdfbzx2maKFdQWI7fSkiXsAi8eD4gdTR5TjkOivPLkvWXRHbv26o KYcmPEm4UrH1fwihZM4Ma4ZgXGYziJMykfexa8um7IxD/MdlR4ZJR/TuwUWm/nWameft c+kkw8o6/+jvaE1S+BoqStPrqIEJYo6IZvUtz+2uiHW9sb5Fr7fOsaS0oXC3DOlagHWB 1XDlw1QTfeSOz8X7cmFyWrBeR17rW22EwyfXKZcsWVHbOWhf1Nb7PC7yX/cQOPl89pPU U4MXfJgOkHvoKOziBKqJ72ZAfv0PVrQ/RT71T//AmtiuFm3u9T8ksd9sp2RVOTitgCOo GFdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WE9Z1NUn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213593-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213593-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 a640c23a62f3a-a6f56e3b4d7si80724166b.827.2024.06.13.08.47.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 08:47:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213593-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=WE9Z1NUn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213593-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213593-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 2C9E41F24698 for ; Thu, 13 Jun 2024 15:47:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82B5A149C61; Thu, 13 Jun 2024 15:40:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WE9Z1NUn" 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 96371149C4E; Thu, 13 Jun 2024 15:40:44 +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=1718293244; cv=none; b=r25PZ4uUh2tp2BBgjFeMWllVq6TyEIazQJyHIJYErpwVuXOp6wbWOmpYE6R+dpAZ8JEpQJBoOf9z+wj9dRxFkTxQW/jDySUqYXO1omzbM/IKsl3B/ULnqcMKDCHgHVtNE+CnbT3vfm6GaR3kWkBQgT22m2SUgJb6zgGl1JFc9lM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293244; c=relaxed/simple; bh=JcXvOUaKdlxs2Ht40iN7VRSX7BT4jA2+5PBP7oY41xc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FIGmdWiPLePVrw7cuTBlsfdh2wZvEKUWTTuJs4SFe24jWndCMb1vYO5rFApTtZU+Tlvyt4NwWEqbog1fuA3f46a32UNBFyjQ/LIPuVpqDwuuS10CEpjaoGDsfrESUbfQfDGjN8dyQgdWbBgozMBU7ICbd2zSXf4v20Mpx9m+N04= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WE9Z1NUn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63916C32786; Thu, 13 Jun 2024 15:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718293244; bh=JcXvOUaKdlxs2Ht40iN7VRSX7BT4jA2+5PBP7oY41xc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WE9Z1NUnN2yyAnjrE9nBV1RUF+SFyoifvSbOJ4sNgec7xO0QNAaq1qrB4mXpLPnaV vg3xdmR4KToKvfpGJrei1/MhoJRAv4FBSVh2MuqwZNT7D4GkaLZjR6hg9voDEMssbc /rka534WIOa/2wRcqXOwGowkNpjoMO+tsbYg6Gy3yIHifMR4KT9iLfuhkk2nLBjRRD l3TC7i5O+LyB5QuDBWq43PFyb96p6xXCL+V8wLKJODYBcLCiNOZEYOK6Y3e60PQKFX bQGD8wVrP183595n1vr/JN2azD2QmxcOXWSIz1eo8H/dwCKb5gpChjK7BB/rMmKtmR SUr0dTvhEoEMg== Date: Thu, 13 Jun 2024 08:40:42 -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: <20240613084042.7db4c410@kernel.org> In-Reply-To: References: <20240610153716.31493-1-larysa.zaremba@intel.com> <20240611193837.4ffb2401@kernel.org> <20240612140935.54981c49@kernel.org> <20240613071343.019e7dca@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 Thu, 13 Jun 2024 17:36:16 +0200 Larysa Zaremba wrote: > > > AFAIK, netif_device_detach() does not affect .ndo_bpf() calls. We were trying > > > such approach with idpf and it does work for ethtool, but not for XDP. > > > > I reckon that's an unintentional omission. In theory XDP is "pure > > software" but if the device is running driver will likely have to > > touch HW to reconfigure. So, if you're willing, do send a ndo_bpf > > patch to add a detached check. > > This does not seem that simple. In cases of program/pool detachment, > .ndo_bpf() does not accept 'no' as an answer, so there is no easy existing way > of handling !netif_device_present() either. And we have to notify the driver > that pool/program is no longer needed no matter what. So what is left is somehow > postpone pool/prog removal to after the netdev gets attached again. I see, thanks for investigating!