diff options
author | David S. Miller <davem@davemloft.net> | 2016-05-04 00:52:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-04 00:52:29 -0400 |
commit | cba653210056cf47cc1969f831f05ddfb99ee2bd (patch) | |
tree | 92d93a3eee5b12d77af3696b9da8026e71df5752 /include/linux | |
parent | 26879da58711aa604a1b866cbeedd7e0f78f90ad (diff) | |
parent | 7391daf2ffc780679d6ab3fad1db2619e5dd2c2a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/ipv4/ip_gre.c
Minor conflicts between tunnel bug fixes in net and
ipv6 tunnel cleanups in net-next.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bpf.h | 3 | ||||
-rw-r--r-- | include/linux/ceph/auth.h | 10 | ||||
-rw-r--r-- | include/linux/ceph/osd_client.h | 1 | ||||
-rw-r--r-- | include/linux/cgroup-defs.h | 1 | ||||
-rw-r--r-- | include/linux/cpuset.h | 6 | ||||
-rw-r--r-- | include/linux/hash.h | 20 | ||||
-rw-r--r-- | include/linux/huge_mm.h | 5 | ||||
-rw-r--r-- | include/linux/if_ether.h | 5 | ||||
-rw-r--r-- | include/linux/lockdep.h | 8 | ||||
-rw-r--r-- | include/linux/mlx5/device.h | 11 | ||||
-rw-r--r-- | include/linux/mm.h | 4 | ||||
-rw-r--r-- | include/linux/net.h | 10 | ||||
-rw-r--r-- | include/linux/netdevice.h | 2 |
13 files changed, 66 insertions, 20 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index f63afdc43bec..8ee27b8afe81 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
@@ -180,12 +180,13 @@ void bpf_register_prog_type(struct bpf_prog_type_list *tl); | |||
180 | void bpf_register_map_type(struct bpf_map_type_list *tl); | 180 | void bpf_register_map_type(struct bpf_map_type_list *tl); |
181 | 181 | ||
182 | struct bpf_prog *bpf_prog_get(u32 ufd); | 182 | struct bpf_prog *bpf_prog_get(u32 ufd); |
183 | struct bpf_prog *bpf_prog_inc(struct bpf_prog *prog); | ||
183 | void bpf_prog_put(struct bpf_prog *prog); | 184 | void bpf_prog_put(struct bpf_prog *prog); |
184 | void bpf_prog_put_rcu(struct bpf_prog *prog); | 185 | void bpf_prog_put_rcu(struct bpf_prog *prog); |
185 | 186 | ||
186 | struct bpf_map *bpf_map_get_with_uref(u32 ufd); | 187 | struct bpf_map *bpf_map_get_with_uref(u32 ufd); |
187 | struct bpf_map *__bpf_map_get(struct fd f); | 188 | struct bpf_map *__bpf_map_get(struct fd f); |
188 | void bpf_map_inc(struct bpf_map *map, bool uref); | 189 | struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref); |
189 | void bpf_map_put_with_uref(struct bpf_map *map); | 190 | void bpf_map_put_with_uref(struct bpf_map *map); |
190 | void bpf_map_put(struct bpf_map *map); | 191 | void bpf_map_put(struct bpf_map *map); |
191 | int bpf_map_precharge_memlock(u32 pages); | 192 | int bpf_map_precharge_memlock(u32 pages); |
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index 260d78b587c4..1563265d2097 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
@@ -12,9 +12,12 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | struct ceph_auth_client; | 14 | struct ceph_auth_client; |
15 | struct ceph_authorizer; | ||
16 | struct ceph_msg; | 15 | struct ceph_msg; |
17 | 16 | ||
17 | struct ceph_authorizer { | ||
18 | void (*destroy)(struct ceph_authorizer *); | ||
19 | }; | ||
20 | |||
18 | struct ceph_auth_handshake { | 21 | struct ceph_auth_handshake { |
19 | struct ceph_authorizer *authorizer; | 22 | struct ceph_authorizer *authorizer; |
20 | void *authorizer_buf; | 23 | void *authorizer_buf; |
@@ -62,8 +65,6 @@ struct ceph_auth_client_ops { | |||
62 | struct ceph_auth_handshake *auth); | 65 | struct ceph_auth_handshake *auth); |
63 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, | 66 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, |
64 | struct ceph_authorizer *a, size_t len); | 67 | struct ceph_authorizer *a, size_t len); |
65 | void (*destroy_authorizer)(struct ceph_auth_client *ac, | ||
66 | struct ceph_authorizer *a); | ||
67 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, | 68 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, |
68 | int peer_type); | 69 | int peer_type); |
69 | 70 | ||
@@ -112,8 +113,7 @@ extern int ceph_auth_is_authenticated(struct ceph_auth_client *ac); | |||
112 | extern int ceph_auth_create_authorizer(struct ceph_auth_client *ac, | 113 | extern int ceph_auth_create_authorizer(struct ceph_auth_client *ac, |
113 | int peer_type, | 114 | int peer_type, |
114 | struct ceph_auth_handshake *auth); | 115 | struct ceph_auth_handshake *auth); |
115 | extern void ceph_auth_destroy_authorizer(struct ceph_auth_client *ac, | 116 | void ceph_auth_destroy_authorizer(struct ceph_authorizer *a); |
116 | struct ceph_authorizer *a); | ||
117 | extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac, | 117 | extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac, |
118 | int peer_type, | 118 | int peer_type, |
119 | struct ceph_auth_handshake *a); | 119 | struct ceph_auth_handshake *a); |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 4343df806710..cbf460927c42 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
@@ -16,7 +16,6 @@ struct ceph_msg; | |||
16 | struct ceph_snap_context; | 16 | struct ceph_snap_context; |
17 | struct ceph_osd_request; | 17 | struct ceph_osd_request; |
18 | struct ceph_osd_client; | 18 | struct ceph_osd_client; |
19 | struct ceph_authorizer; | ||
20 | 19 | ||
21 | /* | 20 | /* |
22 | * completion callback for async writepages | 21 | * completion callback for async writepages |
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 3e39ae5bc799..5b17de62c962 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h | |||
@@ -444,6 +444,7 @@ struct cgroup_subsys { | |||
444 | int (*can_attach)(struct cgroup_taskset *tset); | 444 | int (*can_attach)(struct cgroup_taskset *tset); |
445 | void (*cancel_attach)(struct cgroup_taskset *tset); | 445 | void (*cancel_attach)(struct cgroup_taskset *tset); |
446 | void (*attach)(struct cgroup_taskset *tset); | 446 | void (*attach)(struct cgroup_taskset *tset); |
447 | void (*post_attach)(void); | ||
447 | int (*can_fork)(struct task_struct *task); | 448 | int (*can_fork)(struct task_struct *task); |
448 | void (*cancel_fork)(struct task_struct *task); | 449 | void (*cancel_fork)(struct task_struct *task); |
449 | void (*fork)(struct task_struct *task); | 450 | void (*fork)(struct task_struct *task); |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index fea160ee5803..85a868ccb493 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -137,8 +137,6 @@ static inline void set_mems_allowed(nodemask_t nodemask) | |||
137 | task_unlock(current); | 137 | task_unlock(current); |
138 | } | 138 | } |
139 | 139 | ||
140 | extern void cpuset_post_attach_flush(void); | ||
141 | |||
142 | #else /* !CONFIG_CPUSETS */ | 140 | #else /* !CONFIG_CPUSETS */ |
143 | 141 | ||
144 | static inline bool cpusets_enabled(void) { return false; } | 142 | static inline bool cpusets_enabled(void) { return false; } |
@@ -245,10 +243,6 @@ static inline bool read_mems_allowed_retry(unsigned int seq) | |||
245 | return false; | 243 | return false; |
246 | } | 244 | } |
247 | 245 | ||
248 | static inline void cpuset_post_attach_flush(void) | ||
249 | { | ||
250 | } | ||
251 | |||
252 | #endif /* !CONFIG_CPUSETS */ | 246 | #endif /* !CONFIG_CPUSETS */ |
253 | 247 | ||
254 | #endif /* _LINUX_CPUSET_H */ | 248 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/hash.h b/include/linux/hash.h index 1afde47e1528..79c52fa81cac 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
@@ -32,12 +32,28 @@ | |||
32 | #error Wordsize not 32 or 64 | 32 | #error Wordsize not 32 or 64 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | /* | ||
36 | * The above primes are actively bad for hashing, since they are | ||
37 | * too sparse. The 32-bit one is mostly ok, the 64-bit one causes | ||
38 | * real problems. Besides, the "prime" part is pointless for the | ||
39 | * multiplicative hash. | ||
40 | * | ||
41 | * Although a random odd number will do, it turns out that the golden | ||
42 | * ratio phi = (sqrt(5)-1)/2, or its negative, has particularly nice | ||
43 | * properties. | ||
44 | * | ||
45 | * These are the negative, (1 - phi) = (phi^2) = (3 - sqrt(5))/2. | ||
46 | * (See Knuth vol 3, section 6.4, exercise 9.) | ||
47 | */ | ||
48 | #define GOLDEN_RATIO_32 0x61C88647 | ||
49 | #define GOLDEN_RATIO_64 0x61C8864680B583EBull | ||
50 | |||
35 | static __always_inline u64 hash_64(u64 val, unsigned int bits) | 51 | static __always_inline u64 hash_64(u64 val, unsigned int bits) |
36 | { | 52 | { |
37 | u64 hash = val; | 53 | u64 hash = val; |
38 | 54 | ||
39 | #if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64 | 55 | #if BITS_PER_LONG == 64 |
40 | hash = hash * GOLDEN_RATIO_PRIME_64; | 56 | hash = hash * GOLDEN_RATIO_64; |
41 | #else | 57 | #else |
42 | /* Sigh, gcc can't optimise this alone like it does for 32 bits. */ | 58 | /* Sigh, gcc can't optimise this alone like it does for 32 bits. */ |
43 | u64 n = hash; | 59 | u64 n = hash; |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 7008623e24b1..d7b9e5346fba 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -152,6 +152,7 @@ static inline bool is_huge_zero_pmd(pmd_t pmd) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | struct page *get_huge_zero_page(void); | 154 | struct page *get_huge_zero_page(void); |
155 | void put_huge_zero_page(void); | ||
155 | 156 | ||
156 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ | 157 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ |
157 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) | 158 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) |
@@ -208,6 +209,10 @@ static inline bool is_huge_zero_page(struct page *page) | |||
208 | return false; | 209 | return false; |
209 | } | 210 | } |
210 | 211 | ||
212 | static inline void put_huge_zero_page(void) | ||
213 | { | ||
214 | BUILD_BUG(); | ||
215 | } | ||
211 | 216 | ||
212 | static inline struct page *follow_devmap_pmd(struct vm_area_struct *vma, | 217 | static inline struct page *follow_devmap_pmd(struct vm_area_struct *vma, |
213 | unsigned long addr, pmd_t *pmd, int flags) | 218 | unsigned long addr, pmd_t *pmd, int flags) |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index d5569734f672..548fd535fd02 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -28,6 +28,11 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) | |||
28 | return (struct ethhdr *)skb_mac_header(skb); | 28 | return (struct ethhdr *)skb_mac_header(skb); |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) | ||
32 | { | ||
33 | return (struct ethhdr *)skb_inner_mac_header(skb); | ||
34 | } | ||
35 | |||
31 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | 36 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); |
32 | 37 | ||
33 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 38 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index d026b190c530..d10ef06971b5 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -196,9 +196,11 @@ struct lock_list { | |||
196 | * We record lock dependency chains, so that we can cache them: | 196 | * We record lock dependency chains, so that we can cache them: |
197 | */ | 197 | */ |
198 | struct lock_chain { | 198 | struct lock_chain { |
199 | u8 irq_context; | 199 | /* see BUILD_BUG_ON()s in lookup_chain_cache() */ |
200 | u8 depth; | 200 | unsigned int irq_context : 2, |
201 | u16 base; | 201 | depth : 6, |
202 | base : 24; | ||
203 | /* 4 byte hole */ | ||
202 | struct hlist_node entry; | 204 | struct hlist_node entry; |
203 | u64 chain_key; | 205 | u64 chain_key; |
204 | }; | 206 | }; |
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 6bd429b53b77..8fecd6d6f814 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h | |||
@@ -393,6 +393,17 @@ enum { | |||
393 | MLX5_CAP_OFF_CMDIF_CSUM = 46, | 393 | MLX5_CAP_OFF_CMDIF_CSUM = 46, |
394 | }; | 394 | }; |
395 | 395 | ||
396 | enum { | ||
397 | /* | ||
398 | * Max wqe size for rdma read is 512 bytes, so this | ||
399 | * limits our max_sge_rd as the wqe needs to fit: | ||
400 | * - ctrl segment (16 bytes) | ||
401 | * - rdma segment (16 bytes) | ||
402 | * - scatter elements (16 bytes each) | ||
403 | */ | ||
404 | MLX5_MAX_SGE_RD = (512 - 16 - 16) / 16 | ||
405 | }; | ||
406 | |||
396 | struct mlx5_inbox_hdr { | 407 | struct mlx5_inbox_hdr { |
397 | __be16 opcode; | 408 | __be16 opcode; |
398 | u8 rsvd[4]; | 409 | u8 rsvd[4]; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a55e5be0894f..864d7221de84 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1031,6 +1031,8 @@ static inline bool page_mapped(struct page *page) | |||
1031 | page = compound_head(page); | 1031 | page = compound_head(page); |
1032 | if (atomic_read(compound_mapcount_ptr(page)) >= 0) | 1032 | if (atomic_read(compound_mapcount_ptr(page)) >= 0) |
1033 | return true; | 1033 | return true; |
1034 | if (PageHuge(page)) | ||
1035 | return false; | ||
1034 | for (i = 0; i < hpage_nr_pages(page); i++) { | 1036 | for (i = 0; i < hpage_nr_pages(page); i++) { |
1035 | if (atomic_read(&page[i]._mapcount) >= 0) | 1037 | if (atomic_read(&page[i]._mapcount) >= 0) |
1036 | return true; | 1038 | return true; |
@@ -1138,6 +1140,8 @@ struct zap_details { | |||
1138 | 1140 | ||
1139 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, | 1141 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, |
1140 | pte_t pte); | 1142 | pte_t pte); |
1143 | struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr, | ||
1144 | pmd_t pmd); | ||
1141 | 1145 | ||
1142 | int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, | 1146 | int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, |
1143 | unsigned long size); | 1147 | unsigned long size); |
diff --git a/include/linux/net.h b/include/linux/net.h index 72c1e0622ce2..9aa49a05fe38 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -245,7 +245,15 @@ do { \ | |||
245 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) | 245 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) |
246 | #define net_info_ratelimited(fmt, ...) \ | 246 | #define net_info_ratelimited(fmt, ...) \ |
247 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) | 247 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) |
248 | #if defined(DEBUG) | 248 | #if defined(CONFIG_DYNAMIC_DEBUG) |
249 | #define net_dbg_ratelimited(fmt, ...) \ | ||
250 | do { \ | ||
251 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | ||
252 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | ||
253 | net_ratelimit()) \ | ||
254 | __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ | ||
255 | } while (0) | ||
256 | #elif defined(DEBUG) | ||
249 | #define net_dbg_ratelimited(fmt, ...) \ | 257 | #define net_dbg_ratelimited(fmt, ...) \ |
250 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 258 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
251 | #else | 259 | #else |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f2182594160e..bcf012637d10 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3992,7 +3992,7 @@ netdev_features_t netif_skb_features(struct sk_buff *skb); | |||
3992 | 3992 | ||
3993 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) | 3993 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) |
3994 | { | 3994 | { |
3995 | netdev_features_t feature = gso_type << NETIF_F_GSO_SHIFT; | 3995 | netdev_features_t feature = (netdev_features_t)gso_type << NETIF_F_GSO_SHIFT; |
3996 | 3996 | ||
3997 | /* check flags correspondence */ | 3997 | /* check flags correspondence */ |
3998 | BUILD_BUG_ON(SKB_GSO_TCPV4 != (NETIF_F_TSO >> NETIF_F_GSO_SHIFT)); | 3998 | BUILD_BUG_ON(SKB_GSO_TCPV4 != (NETIF_F_TSO >> NETIF_F_GSO_SHIFT)); |