Skip to content

Commit 35580f9

Browse files
author
Alexei Starovoitov
committed
Merge branch 'lighten uapi/bpf.h rebuilds'
Jakub Kicinski says: ==================== Last change in the bpf headers - disentangling BPF uapi from netdevice.h. Both linux/bpf.h and uapi/bpf.h changes should now rebuild ~1k objects down from the original ~18k. There's probably more that can be done but it's diminishing returns. Split into two patches for ease of review. ==================== Signed-off-by: Alexei Starovoitov <[email protected]>
2 parents 1705c62 + aebb51e commit 35580f9

File tree

9 files changed

+18
-8
lines changed

9 files changed

+18
-8
lines changed

drivers/net/ethernet/amazon/ena/ena_netdev.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/interrupt.h>
1515
#include <linux/netdevice.h>
1616
#include <linux/skbuff.h>
17+
#include <uapi/linux/bpf.h>
1718

1819
#include "ena_com.h"
1920
#include "ena_eth_com.h"

drivers/net/ethernet/cavium/thunder/nicvf_queues.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/iommu.h>
1111
#include <net/ip.h>
1212
#include <net/tso.h>
13+
#include <uapi/linux/bpf.h>
1314

1415
#include "nic_reg.h"
1516
#include "nic.h"

drivers/net/ethernet/microsoft/mana/mana_en.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/* Copyright (c) 2021, Microsoft Corporation. */
33

4+
#include <uapi/linux/bpf.h>
5+
46
#include <linux/inetdevice.h>
57
#include <linux/etherdevice.h>
68
#include <linux/ethtool.h>

drivers/net/ethernet/stmicro/stmmac/stmmac.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/net_tstamp.h>
2323
#include <linux/reset.h>
2424
#include <net/page_pool.h>
25+
#include <uapi/linux/bpf.h>
2526

2627
struct stmmac_resources {
2728
void __iomem *addr;

drivers/net/ethernet/ti/cpsw_priv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#ifndef DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_
77
#define DRIVERS_NET_ETHERNET_TI_CPSW_PRIV_H_
88

9+
#include <uapi/linux/bpf.h>
10+
911
#include "davinci_cpdma.h"
1012

1113
#define CPSW_DEBUG (NETIF_MSG_HW | NETIF_MSG_WOL | \

include/linux/bpf-netns.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@
33
#define _BPF_NETNS_H
44

55
#include <linux/mutex.h>
6+
#include <net/netns/bpf.h>
67
#include <uapi/linux/bpf.h>
78

8-
enum netns_bpf_attach_type {
9-
NETNS_BPF_INVALID = -1,
10-
NETNS_BPF_FLOW_DISSECTOR = 0,
11-
NETNS_BPF_SK_LOOKUP,
12-
MAX_NETNS_BPF_ATTACH_TYPE
13-
};
14-
159
static inline enum netns_bpf_attach_type
1610
to_netns_bpf_attach_type(enum bpf_attach_type attach_type)
1711
{

include/net/ip6_fib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <net/inetpeer.h>
2121
#include <net/fib_notifier.h>
2222
#include <linux/indirect_call_wrapper.h>
23+
#include <uapi/linux/bpf.h>
2324

2425
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
2526
#define FIB6_TABLE_HASHSZ 256

include/net/netns/bpf.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@
66
#ifndef __NETNS_BPF_H__
77
#define __NETNS_BPF_H__
88

9-
#include <linux/bpf-netns.h>
9+
#include <linux/list.h>
1010

1111
struct bpf_prog;
1212
struct bpf_prog_array;
1313

14+
enum netns_bpf_attach_type {
15+
NETNS_BPF_INVALID = -1,
16+
NETNS_BPF_FLOW_DISSECTOR = 0,
17+
NETNS_BPF_SK_LOOKUP,
18+
MAX_NETNS_BPF_ATTACH_TYPE
19+
};
20+
1421
struct netns_bpf {
1522
/* Array of programs to run compiled from progs or links */
1623
struct bpf_prog_array __rcu *run_array[MAX_NETNS_BPF_ATTACH_TYPE];

kernel/bpf/net_namespace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22

33
#include <linux/bpf.h>
4+
#include <linux/bpf-netns.h>
45
#include <linux/filter.h>
56
#include <net/net_namespace.h>
67

0 commit comments

Comments
 (0)