From: Jakub Kicinski Subject: Re: [PATCH bpf-next v2 0/7] Add support for XDP_ATTACH Date: Mon, 17 Dec 2018 18:36:00 -0800 Message-ID: <20181217183600.2c91fd81@cakuba.netronome.com> References: <20181217102501.22019-1-bjorn.topel@gmail.com> <20181217135035.0d75aa32@redhat.com> <0e9c13f2-190a-18c0-efa6-a7fe0096f98f@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Jesper Dangaard Brouer , =?UTF-8?B?QmrDtnJuIFTDtnBl?= =?UTF-8?B?bA==?= , magnus.karlsson@intel.com, magnus.karlsson@gmail.com, ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org, u9012063@gmail.com, qi.z.zhang@intel.com, andrew@lunn.ch To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Return-path: Received: from mail-qt1-f196.google.com ([209.85.160.196]:40855 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbeLRCgH (ORCPT ); Mon, 17 Dec 2018 21:36:07 -0500 Received: by mail-qt1-f196.google.com with SMTP id k12so16575307qtf.7 for ; Mon, 17 Dec 2018 18:36:06 -0800 (PST) In-Reply-To: <0e9c13f2-190a-18c0-efa6-a7fe0096f98f@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 17 Dec 2018 14:39:57 +0100, Bj=C3=B6rn T=C3=B6pel wrote: > OTOH the implementation would probably look different if there was a > per-q program, because this would open up for more optimizations. One > could even imagine that the socket fd was part of the program (part of > relocation process) when loading the program. That could get rid of yet > another if-statement that check for socket existence. :-) Interesting thought, then we would have to teach the BPF subsystem to express program dependencies (this program can only be used on queue where given XSK is attached), and have the networking subsystem (drivers?) check those constraints when attaching. Did I get this right?