From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mail.toke.dk (Postfix) with ESMTPS id 453659C8FB3 for ; Thu, 1 Dec 2022 04:56:40 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Ick5qQa+ Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 70DDF61D4F; Thu, 1 Dec 2022 03:56:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AF3BC433C1; Thu, 1 Dec 2022 03:56:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669866996; bh=VV92uaRYDINYSV3UwflHm34/qJcOJwiAWJaBhhy4tik=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ick5qQa+vLORvexfC6qT9YcoFJKv3QJoKjPHhXnH4eO//PRBna11pSkKGiN0FjNXc OTXDvACBOPTGfODabPCcI+e5zMalvL7ItI/G17Xy+pUkLIZjHsxH9XkRBoC4mlZBm6 1POTt1CJcHhf4Snizs5LUhS1kmVaophfb3nGBRZc1Ht16DBF0mTM8mzyRGfFrD+hWn xhvtzr0hA+RKOnuL4miEADBJITU9IDvOiHW8kDOTGavImgt84+48ZR8JgubEFygmfJ rl+lmft64hzaZ/XvmZhkIjcxJWdDde4iC7Tata2zzyEoLAUym7PECvsaw2sYwBOZ3C +pJNGSSG86TFQ== Date: Wed, 30 Nov 2022 19:56:35 -0800 From: Jakub Kicinski To: Stanislav Fomichev Message-ID: <20221130195635.2f018caf@kernel.org> In-Reply-To: References: <20221129193452.3448944-1-sdf@google.com> <8735a1zdrt.fsf@toke.dk> <87o7soxd1v.fsf@toke.dk> <07db58dd-0752-e148-8d89-e22b8d7769f0@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: D4TPZ5XFDW44QJFZELB76LKJSXYOOMP5 X-Message-ID-Hash: D4TPZ5XFDW44QJFZELB76LKJSXYOOMP5 X-MailFrom: kuba@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Martin KaFai Lau , bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, David Ahern , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org, Toke =?UTF-8?B?SMO4?= =?UTF-8?B?aWxhbmQtSsO4cmdlbnNlbg==?= X-Mailman-Version: 3.3.7 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v3 00/11] xdp: hints via kfuncs List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 30 Nov 2022 16:32:47 -0800 Stanislav Fomichev wrote: > Makes sense. Let me take a closer look. I glanced at it last week and > decided that maybe it's easier to not hold the device at all.. > > Maybe we should have something like this: > > - bpf_prog_is_dev_bound() - prog is dev bound but not offloaded > (currently bpf_prog_is_dev_bound == fully offloaded) > - bpf_prog_is_offloaded() - prog is dev bound and offloaded > > So hopefully I can leverage some/most existing bpf_prog_is_dev_bound > call sites (+ add some more to reject prog_run/etc). +1, FWIW, seems like it'd improve the code readability quite a bit.