Thread (10 messages) 10 messages, 5 authors, 2023-08-03

Re: [PATCH bpf-next v2 3/3] net: invert the netdevice.h vs xdp.h dependency

From: Jesper Dangaard Brouer <hawk@kernel.org>
Date: 2023-08-03 14:00:00
Also in: bpf


On 03/08/2023 03.02, Jakub Kicinski wrote:
xdp.h is far more specific and is included in only 67 other
files vs netdevice.h's 1538 include sites.
Make xdp.h include netdevice.h, instead of the other way around.
This decreases the incremental allmodconfig builds size when
xdp.h is touched from 5947 to 662 objects.

Move bpf_prog_run_xdp() to xdp.h, seems appropriate and filter.h
is a mega-header in its own right so it's nice to avoid xdp.h
getting included there as well.

The only unfortunate part is that the typedef for xdp_features_t
has to move to netdevice.h, since its embedded in struct netdevice.

Signed-off-by: Jakub Kicinski<kuba@kernel.org>
---
CC:ast@kernel.org
CC:daniel@iogearbox.net
CC:john.fastabend@gmail.com
CC:andrii@kernel.org
CC:martin.lau@linux.dev
CC:song@kernel.org
CC:yonghong.song@linux.dev
CC:kpsingh@kernel.org
CC:sdf@google.com
CC:haoluo@google.com
CC:jolsa@kernel.org
CC:hawk@kernel.org
CC:bpf@vger.kernel.org
---
  include/linux/filter.h           | 17 -----------------
  include/linux/netdevice.h        | 11 ++++-------
  include/net/busy_poll.h          |  1 +
  include/net/xdp.h                | 29 +++++++++++++++++++++++++----
  include/trace/events/xdp.h       |  1 +
  kernel/bpf/btf.c                 |  1 +
  kernel/bpf/offload.c             |  1 +
  kernel/bpf/verifier.c            |  1 +
  net/netfilter/nf_conntrack_bpf.c |  1 +
  9 files changed, 35 insertions(+), 28 deletions(-)
LGTM

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help