Requested my mripard for some misc patches that need this as a base.
Showing the changes to include/uapi (7 of 895 files). Show all
Unified · Split
| @@ -87,7 +87,9 @@ typedef struct { · 86 unmodified lines | ||
| 87 | 87 | typedef __kernel_long_t __kernel_off_t; |
| 88 | 88 | typedef long long __kernel_loff_t; |
| 89 | 89 | typedef __kernel_long_t __kernel_old_time_t; |
| 90 | +#ifndef __KERNEL__ | |
| 90 | 91 | typedef __kernel_long_t __kernel_time_t; |
| 92 | +#endif | |
| 91 | 93 | typedef long long __kernel_time64_t; |
| 92 | 94 | typedef __kernel_long_t __kernel_clock_t; |
| 93 | 95 | typedef int __kernel_timer_t; |
| @@ -1045,9 +1045,9 @@ union bpf_attr { · 1044 unmodified lines | ||
| 1045 | 1045 | * supports redirection to the egress interface, and accepts no |
| 1046 | 1046 | * flag at all. |
| 1047 | 1047 | * |
| 1048 | − * The same effect can be attained with the more generic | |
| 1049 | − * **bpf_redirect_map**\ (), which requires specific maps to be | |
| 1050 | − * used but offers better performance. | |
| 1048 | + * The same effect can also be attained with the more generic | |
| 1049 | + * **bpf_redirect_map**\ (), which uses a BPF map to store the | |
| 1050 | + * redirect target instead of providing it directly to the helper. | |
| 1051 | 1051 | * Return |
| 1052 | 1052 | * For XDP, the helper returns **XDP_REDIRECT** on success or |
| 1053 | 1053 | * **XDP_ABORTED** on error. For other program types, the values |
| @@ -1611,13 +1611,11 @@ union bpf_attr { · 557 unmodified lines | ||
| 1611 | 1611 | * the caller. Any higher bits in the *flags* argument must be |
| 1612 | 1612 | * unset. |
| 1613 | 1613 | * |
| 1614 | − * When used to redirect packets to net devices, this helper | |
| 1615 | − * provides a high performance increase over **bpf_redirect**\ (). | |
| 1616 | − * This is due to various implementation details of the underlying | |
| 1617 | − * mechanisms, one of which is the fact that **bpf_redirect_map**\ | |
| 1618 | − * () tries to send packet as a "bulk" to the device. | |
| 1614 | + * See also bpf_redirect(), which only supports redirecting to an | |
| 1615 | + * ifindex, but doesn't require a map to do so. | |
| 1619 | 1616 | * Return |
| 1620 | − * **XDP_REDIRECT** on success, or **XDP_ABORTED** on error. | |
| 1617 | + * **XDP_REDIRECT** on success, or the value of the two lower bits | |
| 1618 | + * of the **flags* argument on error. | |
| 1621 | 1619 | * |
| 1622 | 1620 | * int bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags) |
| 1623 | 1621 | * Description |
| @@ -272,9 +272,9 @@ enum { · 271 unmodified lines | ||
| 272 | 272 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 273 | 273 | |
| 274 | 274 | #define DM_VERSION_MAJOR 4 |
| 275 | −#define DM_VERSION_MINOR 41 | |
| 275 | +#define DM_VERSION_MINOR 42 | |
| 276 | 276 | #define DM_VERSION_PATCHLEVEL 0 |
| 277 | −#define DM_VERSION_EXTRA "-ioctl (2019-09-16)" | |
| 277 | +#define DM_VERSION_EXTRA "-ioctl (2020-02-27)" | |
| 278 | 278 | |
| 279 | 279 | /* Status bits */ |
| 280 | 280 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -97,6 +97,15 @@ enum ip_conntrack_status { · 96 unmodified lines | ||
| 97 | 97 | IPS_UNTRACKED_BIT = 12, |
| 98 | 98 | IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), |
| 99 | 99 | |
| 100 | +#ifdef __KERNEL__ | |
| 101 | + /* Re-purposed for in-kernel use: | |
| 102 | + * Tags a conntrack entry that clashed with an existing entry | |
| 103 | + * on insert. | |
| 104 | + */ | |
| 105 | + IPS_NAT_CLASH_BIT = IPS_UNTRACKED_BIT, | |
| 106 | + IPS_NAT_CLASH = IPS_UNTRACKED, | |
| 107 | +#endif | |
| 108 | + | |
| 100 | 109 | /* Conntrack got a helper explicitly attached via CT target. */ |
| 101 | 110 | IPS_HELPER_BIT = 13, |
| 102 | 111 | IPS_HELPER = (1 << IPS_HELPER_BIT), |
| @@ -110,7 +119,8 @@ enum ip_conntrack_status { · 7 unmodified lines | ||
| 110 | 119 | */ |
| 111 | 120 | IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK | |
| 112 | 121 | IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | |
| 113 | − IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD), | |
| 122 | + IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED | | |
| 123 | + IPS_OFFLOAD), | |
| 114 | 124 | |
| 115 | 125 | __IPS_MAX_BIT = 15, |
| 116 | 126 | }; |
| @@ -135,9 +135,9 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 134 unmodified lines | ||
| 135 | 135 | |
| 136 | 136 | static __always_inline unsigned long __swab(const unsigned long y) |
| 137 | 137 | { |
| 138 | −#if BITS_PER_LONG == 64 | |
| 138 | +#if __BITS_PER_LONG == 64 | |
| 139 | 139 | return __swab64(y); |
| 140 | −#else /* BITS_PER_LONG == 32 */ | |
| 140 | +#else /* __BITS_PER_LONG == 32 */ | |
| 141 | 141 | return __swab32(y); |
| 142 | 142 | #endif |
| 143 | 143 | } |
| @@ -5,6 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/time_types.h> |
| 7 | 7 | |
| 8 | +#ifndef __KERNEL__ | |
| 8 | 9 | #ifndef _STRUCT_TIMESPEC |
| 9 | 10 | #define _STRUCT_TIMESPEC |
| 10 | 11 | struct timespec { |
| @@ -18,6 +19,17 @@ struct timeval { · 7 unmodified lines | ||
| 18 | 19 | __kernel_suseconds_t tv_usec; /* microseconds */ |
| 19 | 20 | }; |
| 20 | 21 | |
| 22 | +struct itimerspec { | |
| 23 | + struct timespec it_interval;/* timer period */ | |
| 24 | + struct timespec it_value; /* timer expiration */ | |
| 25 | +}; | |
| 26 | + | |
| 27 | +struct itimerval { | |
| 28 | + struct timeval it_interval;/* timer interval */ | |
| 29 | + struct timeval it_value; /* current value */ | |
| 30 | +}; | |
| 31 | +#endif | |
| 32 | + | |
| 21 | 33 | struct timezone { |
| 22 | 34 | int tz_minuteswest; /* minutes west of Greenwich */ |
| 23 | 35 | int tz_dsttime; /* type of dst correction */ |
| @@ -31,16 +43,6 @@ struct timezone { · 7 unmodified lines | ||
| 31 | 43 | #define ITIMER_VIRTUAL 1 |
| 32 | 44 | #define ITIMER_PROF 2 |
| 33 | 45 | |
| 34 | −struct itimerspec { | |
| 35 | − struct timespec it_interval; /* timer period */ | |
| 36 | − struct timespec it_value; /* timer expiration */ | |
| 37 | −}; | |
| 38 | − | |
| 39 | −struct itimerval { | |
| 40 | − struct timeval it_interval; /* timer interval */ | |
| 41 | − struct timeval it_value; /* current value */ | |
| 42 | −}; | |
| 43 | − | |
| 44 | 46 | /* |
| 45 | 47 | * The IDs of the various system clocks (for POSIX.1b interval timers): |
| 46 | 48 | */ |
| @@ -14,18 +14,18 @@ · 13 unmodified lines | ||
| 14 | 14 | * ACA (Accessory Charger Adapters) |
| 15 | 15 | */ |
| 16 | 16 | enum usb_charger_type { |
| 17 | − UNKNOWN_TYPE, | |
| 18 | − SDP_TYPE, | |
| 19 | − DCP_TYPE, | |
| 20 | − CDP_TYPE, | |
| 21 | − ACA_TYPE, | |
| 17 | + UNKNOWN_TYPE = 0, | |
| 18 | + SDP_TYPE = 1, | |
| 19 | + DCP_TYPE = 2, | |
| 20 | + CDP_TYPE = 3, | |
| 21 | + ACA_TYPE = 4, | |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | 24 | /* USB charger state */ |
| 25 | 25 | enum usb_charger_state { |
| 26 | − USB_CHARGER_DEFAULT, | |
| 27 | − USB_CHARGER_PRESENT, | |
| 28 | − USB_CHARGER_ABSENT, | |
| 26 | + USB_CHARGER_DEFAULT = 0, | |
| 27 | + USB_CHARGER_PRESENT = 1, | |
| 28 | + USB_CHARGER_ABSENT = 2, | |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | 31 | #endif /* _UAPI__LINUX_USB_CHARGER_H */ |