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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxxx>
---
CC:ast@xxxxxxxxxx
CC:daniel@xxxxxxxxxxxxx
CC:john.fastabend@xxxxxxxxx
CC:andrii@xxxxxxxxxx
CC:martin.lau@xxxxxxxxx
CC:song@xxxxxxxxxx
CC:yonghong.song@xxxxxxxxx
CC:kpsingh@xxxxxxxxxx
CC:sdf@xxxxxxxxxx
CC:haoluo@xxxxxxxxxx
CC:jolsa@xxxxxxxxxx
CC:hawk@xxxxxxxxxx
CC:bpf@xxxxxxxxxxxxxxx
---
  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@xxxxxxxxxx>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux