aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-17 16:52:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-17 16:52:59 -0500
commit7f151f1d8abb7d5930b49d4796b463dca1673cb7 (patch)
treef995b6444729c105fe0a123b8240ef3dc3f1bf4a /include/linux/netdevice.h
parenta18ab2f6cb79eeccedea61b8c7bf71d24e087d42 (diff)
parente7523a497d48a9921983a80670f7a02dc4639d41 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix list tests in netfilter ingress support, from Florian Westphal. 2) Fix reversal of input and output interfaces in ingress hook invocation, from Pablo Neira Ayuso. 3) We have a use after free in r8169, caught by Dave Jones, fixed by Francois Romieu. 4) Splice use-after-free fix in AF_UNIX frmo Hannes Frederic Sowa. 5) Three ipv6 route handling bug fixes from Martin KaFai Lau: a) Don't create clone routes not managed by the fib6 tree b) Don't forget to check expiration of DST_NOCACHE routes. c) Handle rt->dst.from == NULL properly. 6) Several AF_PACKET fixes wrt transport header setting and SKB protocol setting, from Daniel Borkmann. 7) Fix thunder driver crash on shutdown, from Pavel Fedin. 8) Several Mellanox driver fixes (max MTU calculations, use of correct DMA unmap in TX path, etc.) from Saeed Mahameed, Tariq Toukan, Doron Tsur, Achiad Shochat, Eran Ben Elisha, and Noa Osherovich. 9) Several mv88e6060 DSA driver fixes (wrong bit definitions for certain registers, etc.) from Neil Armstrong. 10) Make sure to disable preemption while updating per-cpu stats of ip tunnels, from Jason A. Donenfeld. 11) Various ARM64 bpf JIT fixes, from Yang Shi. 12) Flush icache properly in ARM JITs, from Daniel Borkmann. 13) Fix masking of RX and TX interrupts in ravb driver, from Masaru Nagai. 14) Fix netdev feature propagation for devices not implementing ->ndo_set_features(). From Nikolay Aleksandrov. 15) Big endian fix in vmxnet3 driver, from Shrikrishna Khare. 16) RAW socket code increments incorrect SNMP counters, fix from Ben Cartwright-Cox. 17) IPv6 multicast SNMP counters are bumped twice, fix from Neil Horman. 18) Fix handling of VLAN headers on stacked devices when REORDER is disabled. From Vlad Yasevich. 19) Fix SKB leaks and use-after-free in ipvlan and macvlan drivers, from Sabrina Dubroca. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits) MAINTAINERS: Update Mellanox's Eth NIC driver entries net/core: revert "net: fix __netdev_update_features return.." and add comment af_unix: take receive queue lock while appending new skb rtnetlink: fix frame size warning in rtnl_fill_ifinfo net: use skb_clone to avoid alloc_pages failure. packet: Use PAGE_ALIGNED macro packet: Don't check frames_per_block against negative values net: phy: Use interrupts when available in NOLINK state phy: marvell: Add support for 88E1540 PHY arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS macvlan: fix leak in macvlan_handle_frame ipvlan: fix use after free of skb ipvlan: fix leak in ipvlan_rcv_frame vlan: Do not put vlan headers back on bridge and macvlan ports vlan: Fix untag operations of stacked vlans with REORDER_HEADER off via-velocity: unconditionally drop frames with bad l2 length ipg: Remove ipg driver dl2k: Add support for IP1000A-based cards snmp: Remove duplicate OUTMCAST stat increment net: thunder: Check for driver data in nicvf_remove() ...
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d20891465247..67bfac1abfc1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2068,20 +2068,23 @@ struct pcpu_sw_netstats {
2068 struct u64_stats_sync syncp; 2068 struct u64_stats_sync syncp;
2069}; 2069};
2070 2070
2071#define netdev_alloc_pcpu_stats(type) \ 2071#define __netdev_alloc_pcpu_stats(type, gfp) \
2072({ \ 2072({ \
2073 typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ 2073 typeof(type) __percpu *pcpu_stats = alloc_percpu_gfp(type, gfp);\
2074 if (pcpu_stats) { \ 2074 if (pcpu_stats) { \
2075 int __cpu; \ 2075 int __cpu; \
2076 for_each_possible_cpu(__cpu) { \ 2076 for_each_possible_cpu(__cpu) { \
2077 typeof(type) *stat; \ 2077 typeof(type) *stat; \
2078 stat = per_cpu_ptr(pcpu_stats, __cpu); \ 2078 stat = per_cpu_ptr(pcpu_stats, __cpu); \
2079 u64_stats_init(&stat->syncp); \ 2079 u64_stats_init(&stat->syncp); \
2080 } \ 2080 } \
2081 } \ 2081 } \
2082 pcpu_stats; \ 2082 pcpu_stats; \
2083}) 2083})
2084 2084
2085#define netdev_alloc_pcpu_stats(type) \
2086 __netdev_alloc_pcpu_stats(type, GFP_KERNEL);
2087
2085#include <linux/notifier.h> 2088#include <linux/notifier.h>
2086 2089
2087/* netdevice notifier chain. Please remember to update the rtnetlink 2090/* netdevice notifier chain. Please remember to update the rtnetlink
@@ -3854,6 +3857,11 @@ static inline bool netif_is_bridge_master(const struct net_device *dev)
3854 return dev->priv_flags & IFF_EBRIDGE; 3857 return dev->priv_flags & IFF_EBRIDGE;
3855} 3858}
3856 3859
3860static inline bool netif_is_bridge_port(const struct net_device *dev)
3861{
3862 return dev->priv_flags & IFF_BRIDGE_PORT;
3863}
3864
3857static inline bool netif_is_ovs_master(const struct net_device *dev) 3865static inline bool netif_is_ovs_master(const struct net_device *dev)
3858{ 3866{
3859 return dev->priv_flags & IFF_OPENVSWITCH; 3867 return dev->priv_flags & IFF_OPENVSWITCH;