From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (unknown [198.145.29.99]) by mail.toke.dk (Postfix) with ESMTPS id 8D9DF854D67 for ; Wed, 2 Jun 2021 18:18:44 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r8L+a4Y6 Received: by mail.kernel.org (Postfix) with ESMTPSA id 10B1761947; Wed, 2 Jun 2021 16:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622650719; bh=sWkOcXyNxln8ni5dnbEU7OELUj1tqJ+xyc/ErmXbC/k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r8L+a4Y61R0vbecDGRbpLPttsNygM/jWwWdpug9hNCB1Ctx5QgydLdvE6oIg31T/D yQ++4k8iYAJvDC1NWesbSr87mPuKQncMkQvGt/bTCcx8XLNoAodkeGVB4MHePbiOkI 01+ZT4ieaJj3pEQyS0uLYEVzetI7V46ai5vp3Mmjvx0hxx0CWY9d34xLgazEh8e3SC 2CFBXyALBtgkCbFR5hCzmL610nFyKQA0OT+9YRDStu2sDo4TkV0//L8vwHA3lLGfwE YvGjZ0SpWVhUyZl9J3TbiYvKy7xZlpNbatJL+sYJ6RtLh2yV3M+F/7hVpnormmp3EG kE//BbQq5zmtw== Date: Wed, 2 Jun 2021 09:18:37 -0700 From: Jakub Kicinski To: John Fastabend Subject: Re: XDP-hints: Howto support multiple BTF types per packet basis? Message-ID: <20210602091837.65ec197a@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <60b6cf5b6505e_38d6d208d8@john-XPS-13-9370.notmuch> References: <20210526125848.1c7adbb0@carbon> <60aeb01ebcd10_fe49208b8@john-XPS-13-9370.notmuch> <60aeeb5252147_19a622085a@john-XPS-13-9370.notmuch> <60b08442b18d5_1cf8208a0@john-XPS-13-9370.notmuch> <87fsy7gqv7.fsf@toke.dk> <60b0ffb63a21a_1cf82089e@john-XPS-13-9370.notmuch> <20210528180214.3b427837@carbon> <60b12897d2e3f_1cf820896@john-XPS-13-9370.notmuch> <8735u3dv2l.fsf@toke.dk> <60b6cf5b6505e_38d6d208d8@john-XPS-13-9370.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: CHB5ESY2BWKIEJXGJJOIV6LBA6MLSPVB X-Message-ID-Hash: CHB5ESY2BWKIEJXGJJOIV6LBA6MLSPVB 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: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Jesper Dangaard Brouer , Andrii Nakryiko , BPF-dev-list , Magnus Karlsson , William Tu , xdp-hints@xdp-project.net X-Mailman-Version: 3.3.4 Precedence: list List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 01 Jun 2021 17:22:51 -0700 John Fastabend wrote: > > If we do this, the BPF program obviously needs to know which fields are > > valid and which are not. AFAICT you're proposing that this should be > > done out-of-band (i.e., by the system administrator manually ensuring > > BPF program config fits system config)? I think there are a couple of > > problems with this: > > > > - It requires the system admin to coordinate device config with all of > > their installed XDP applications. This is error-prone, especially as > > the number of applications grows (say if different containers have > > different XDP programs installed on their virtual devices). > > A complete "system" will need to be choerent. If I forward into a veth > device the orchestration component needs to ensure program sending > bits there is using the same format the program installed there expects. > > If I tailcall/fentry into another program that program the callee and > caller need to agree on the metadata protocol. > > I don't see any way around this. Someone has to manage the network. FWIW I'd like to +1 Toke's concerns. In large deployments there won't be a single arbiter. Saying there is seems to contradict BPF maintainers' previous stand which lead to addition of bpf_links for XDP. In practical terms person rolling out an NTP config change may not be aware that in some part of the network some BPF program expects descriptor not to contain time stamps. Besides features may depend or conflict so the effects of feature changes may not be obvious across multiple drivers in a heterogeneous environment. IMO guarding from obvious mis-configuration provides obvious value.