summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-11-28 04:38:49 +0300
committerDavid S. Miller <davem@davemloft.net>2016-11-28 04:38:49 +0300
commit53c4ce02145be8987c2b5ca43d7fada9a9d3fd13 (patch)
tree7fae6065a59905fde41a77c01c968088e526d0c4 /include/linux
parente3739099270b238630368b1d8f547c1bb31ba6ad (diff)
parente00c7b216f34444252f3771f7d4ed48d4f032636 (diff)
downloadlinux-53c4ce02145be8987c2b5ca43d7fada9a9d3fd13.tar.xz
Merge branch 'bpf-misc-next'
Daniel Borkmann says: ==================== BPF cleanups and misc updates This patch set adds couple of cleanups in first few patches, exposes owner_prog_type for array maps as well as mlocked mem for maps in fdinfo, allows for mount permissions in fs and fixes various outstanding issues in selftests and samples. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/filter.h6
-rw-r--r--include/linux/if_arp.h16
2 files changed, 19 insertions, 3 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 1f09c521adfe..7f246a281435 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -408,8 +408,8 @@ struct bpf_prog {
enum bpf_prog_type type; /* Type of BPF program */
struct bpf_prog_aux *aux; /* Auxiliary fields */
struct sock_fprog_kern *orig_prog; /* Original BPF program */
- unsigned int (*bpf_func)(const struct sk_buff *skb,
- const struct bpf_insn *filter);
+ unsigned int (*bpf_func)(const void *ctx,
+ const struct bpf_insn *insn);
/* Instructions for interpreter */
union {
struct sock_filter insns[0];
@@ -504,7 +504,7 @@ static inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
u32 ret;
rcu_read_lock();
- ret = BPF_PROG_RUN(prog, (void *)xdp);
+ ret = BPF_PROG_RUN(prog, xdp);
rcu_read_unlock();
return ret;
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index f563907ed776..3355efc89781 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -44,4 +44,20 @@ static inline int arp_hdr_len(struct net_device *dev)
return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2;
}
}
+
+static inline bool dev_is_mac_header_xmit(const struct net_device *dev)
+{
+ switch (dev->type) {
+ case ARPHRD_TUNNEL:
+ case ARPHRD_TUNNEL6:
+ case ARPHRD_SIT:
+ case ARPHRD_IPGRE:
+ case ARPHRD_VOID:
+ case ARPHRD_NONE:
+ return false;
+ default:
+ return true;
+ }
+}
+
#endif /* _LINUX_IF_ARP_H */