History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Two easily resolvable overlapping change conflicts, one in TCP and one in the eBPF verifier.

David S. Miller committed 7 years ago

Commit 375ca542 parents 58066ac 40e196a142 files · +1175 −735Browse files

Showing the changes to include/linux (8 of 142 files). Show all

Unified · Split

8 files
  1. include/linux/compiler_attributes.h +14 −0
  2. include/linux/efi.h +0 −7
  3. include/linux/memblock.h +0 −3
  4. include/linux/module.h +2 −2
  5. include/linux/netdev_features.h +22 −2
  6. include/linux/perf_event.h +5 −0
  7. include/linux/skbuff.h +7 −1
  8. include/linux/virtio_net.h +9 −0
include/linux/compiler_attributes.h+14−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
34#ifndef __has_attribute34#ifndef __has_attribute
35# define __has_attribute(x) __GCC4_has_attribute_##x35# define __has_attribute(x) __GCC4_has_attribute_##x
36# define __GCC4_has_attribute___assume_aligned__ (__GNUC_MINOR__ >= 9)36# define __GCC4_has_attribute___assume_aligned__ (__GNUC_MINOR__ >= 9)
37# define __GCC4_has_attribute___copy__ 0
37# define __GCC4_has_attribute___designated_init__ 038# define __GCC4_has_attribute___designated_init__ 0
38# define __GCC4_has_attribute___externally_visible__ 139# define __GCC4_has_attribute___externally_visible__ 1
39# define __GCC4_has_attribute___noclone__ 140# define __GCC4_has_attribute___noclone__ 1
@@ -100,6 +101,19 @@ · 60 unmodified lines
100 */101 */
101#define __attribute_const__ __attribute__((__const__))102#define __attribute_const__ __attribute__((__const__))
102 103
104/*
105 * Optional: only supported since gcc >= 9
106 * Optional: not supported by clang
107 * Optional: not supported by icc
108 *
109 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute
110 */
111#if __has_attribute(__copy__)
112# define __copy(symbol) __attribute__((__copy__(symbol)))
113#else
114# define __copy(symbol)
115#endif
116
103/*117/*
104 * Don't. Just don't. See commit 771c035372a0 ("deprecate the '__deprecated'118 * Don't. Just don't. See commit 771c035372a0 ("deprecate the '__deprecated'
105 * attribute warnings entirely and for good") for more information.119 * attribute warnings entirely and for good") for more information.
include/linux/efi.h+0−7
@@ -1198,8 +1198,6 @@ static inline bool efi_enabled(int feature) · 1197 unmodified lines
1198extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);1198extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
1199 1199
1200extern bool efi_is_table_address(unsigned long phys_addr);1200extern bool efi_is_table_address(unsigned long phys_addr);
1201
1202extern int efi_apply_persistent_mem_reservations(void);
1203#else1201#else
1204static inline bool efi_enabled(int feature)1202static inline bool efi_enabled(int feature)
1205{1203{
@@ -1218,11 +1216,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr) · 12 unmodified lines
1218{1216{
1219 return false;1217 return false;
1220}1218}
1221
1222static inline int efi_apply_persistent_mem_reservations(void)
1223{
1224 return 0;
1225}
1226#endif1219#endif
1227 1220
1228extern int efi_status_to_err(efi_status_t status);1221extern int efi_status_to_err(efi_status_t status);
include/linux/memblock.h+0−3
@@ -29,9 +29,6 @@ extern unsigned long max_pfn; · 28 unmodified lines
29 */29 */
30extern unsigned long long max_possible_pfn;30extern unsigned long long max_possible_pfn;
31 31
32#define INIT_MEMBLOCK_REGIONS 128
33#define INIT_PHYSMEM_REGIONS 4
34
35/**32/**
36 * enum memblock_flags - definition of memory region attributes33 * enum memblock_flags - definition of memory region attributes
37 * @MEMBLOCK_NONE: no special request34 * @MEMBLOCK_NONE: no special request
include/linux/module.h+2−2
@@ -129,13 +129,13 @@ extern void cleanup_module(void); · 128 unmodified lines
129#define module_init(initfn) \129#define module_init(initfn) \
130 static inline initcall_t __maybe_unused __inittest(void) \130 static inline initcall_t __maybe_unused __inittest(void) \
131 { return initfn; } \131 { return initfn; } \
132 int init_module(void) __attribute__((alias(#initfn)));132 int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
133 133
134/* This is only required if you want to be unloadable. */134/* This is only required if you want to be unloadable. */
135#define module_exit(exitfn) \135#define module_exit(exitfn) \
136 static inline exitcall_t __maybe_unused __exittest(void) \136 static inline exitcall_t __maybe_unused __exittest(void) \
137 { return exitfn; } \137 { return exitfn; } \
138 void cleanup_module(void) __attribute__((alias(#exitfn)));138 void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
139 139
140#endif140#endif
141 141
include/linux/netdev_features.h+22−2
@@ -11,6 +11,8 @@ · 10 unmodified lines
11#define _LINUX_NETDEV_FEATURES_H11#define _LINUX_NETDEV_FEATURES_H
12 12
13#include <linux/types.h>13#include <linux/types.h>
14#include <linux/bitops.h>
15#include <asm/byteorder.h>
14 16
15typedef u64 netdev_features_t;17typedef u64 netdev_features_t;
16 18
@@ -154,8 +156,26 @@ enum { · 137 unmodified lines
154#define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX)156#define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX)
155#define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX)157#define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX)
156 158
157#define for_each_netdev_feature(mask_addr, bit) \159/* Finds the next feature with the highest number of the range of start till 0.
158 for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT)160 */
161static inline int find_next_netdev_feature(u64 feature, unsigned long start)
162{
163 /* like BITMAP_LAST_WORD_MASK() for u64
164 * this sets the most significant 64 - start to 0.
165 */
166 feature &= ~0ULL >> (-start & ((sizeof(feature) * 8) - 1));
167
168 return fls64(feature) - 1;
169}
170
171/* This goes for the MSB to the LSB through the set feature bits,
172 * mask_addr should be a u64 and bit an int
173 */
174#define for_each_netdev_feature(mask_addr, bit) \
175 for ((bit) = find_next_netdev_feature((mask_addr), \
176 NETDEV_FEATURE_COUNT); \
177 (bit) >= 0; \
178 (bit) = find_next_netdev_feature((mask_addr), (bit) - 1))
159 179
160/* Features valid for ethtool to change */180/* Features valid for ethtool to change */
161/* = all defined minus driver/device-class-related */181/* = all defined minus driver/device-class-related */
include/linux/perf_event.h+5−0
@@ -447,6 +447,11 @@ struct pmu { · 446 unmodified lines
447 * Filter events for PMU-specific reasons.447 * Filter events for PMU-specific reasons.
448 */448 */
449 int (*filter_match) (struct perf_event *event); /* optional */449 int (*filter_match) (struct perf_event *event); /* optional */
450
451 /*
452 * Check period value for PERF_EVENT_IOC_PERIOD ioctl.
453 */
454 int (*check_period) (struct perf_event *event, u64 value); /* optional */
450};455};
451 456
452enum perf_addr_filter_action_t {457enum perf_addr_filter_action_t {
include/linux/skbuff.h+7−1
@@ -2439,7 +2439,7 @@ static inline void skb_probe_transport_header(struct sk_buff *skb, · 2438 unmodified lines
2439 2439
2440 if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0))2440 if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0))
2441 skb_set_transport_header(skb, keys.control.thoff);2441 skb_set_transport_header(skb, keys.control.thoff);
2442 else2442 else if (offset_hint >= 0)
2443 skb_set_transport_header(skb, offset_hint);2443 skb_set_transport_header(skb, offset_hint);
2444}2444}
2445 2445
@@ -4235,6 +4235,12 @@ static inline bool skb_is_gso_sctp(const struct sk_buff *skb) · 1789 unmodified lines
4235 return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP;4235 return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP;
4236}4236}
4237 4237
4238static inline bool skb_is_gso_tcp(const struct sk_buff *skb)
4239{
4240 return skb_is_gso(skb) &&
4241 skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6);
4242}
4243
4238static inline void skb_gso_reset(struct sk_buff *skb)4244static inline void skb_gso_reset(struct sk_buff *skb)
4239{4245{
4240 skb_shinfo(skb)->gso_size = 0;4246 skb_shinfo(skb)->gso_size = 0;
include/linux/virtio_net.h+9−0
@@ -57,6 +57,15 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, · 56 unmodified lines
57 57
58 if (!skb_partial_csum_set(skb, start, off))58 if (!skb_partial_csum_set(skb, start, off))
59 return -EINVAL;59 return -EINVAL;
60 } else {
61 /* gso packets without NEEDS_CSUM do not set transport_offset.
62 * probe and drop if does not match one of the above types.
63 */
64 if (gso_type) {
65 skb_probe_transport_header(skb, -1);
66 if (!skb_transport_header_was_set(skb))
67 return -EINVAL;
68 }
60 }69 }
61 70
62 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {71 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t