History

Merge tag 'v4.6-rc3' into perf/core, to refresh the tree

Ingo Molnar committed 10 years ago

Commit 889fac62 parents dad38ca bf162009164 files · +484380 −238097Browse files

Showing the changes to include/uapi (72 of 9164 files). Show all

Unified · Split

72 files
  1. include/uapi/asm-generic/siginfo.h +12 −5
  2. include/uapi/asm-generic/socket.h +2 −0
  3. include/uapi/drm/drm.h +1 −0
  4. include/uapi/drm/drm_mode.h +15 −0
  5. include/uapi/drm/exynos_drm.h +29 −14
  6. include/uapi/drm/i915_drm.h +35 −8
  7. include/uapi/drm/msm_drm.h +2 −0
  8. include/uapi/linux/Kbuild +3 −0
  9. include/uapi/linux/audit.h +1 −0
  10. include/uapi/linux/auto_fs.h +9 −12
  11. include/uapi/linux/auto_fs4.h +5 −12
  12. include/uapi/linux/bpf.h +53 −0
  13. include/uapi/linux/byteorder/big_endian.h +12 −12
  14. include/uapi/linux/byteorder/little_endian.h +12 −12
  15. include/uapi/linux/devlink.h +72 −0
  16. include/uapi/linux/dma-buf.h +40 −0
  17. include/uapi/linux/dqblk_xfs.h +1 −0
  18. include/uapi/linux/elf-em.h +0 −3
  19. include/uapi/linux/ethtool.h +362 −75
  20. include/uapi/linux/fs.h +21 −0
  21. include/uapi/linux/genetlink.h +1 −0
  22. include/uapi/linux/gpio.h +58 −0
  23. include/uapi/linux/if.h +1 −1
  24. include/uapi/linux/if_bridge.h +35 −2
  25. include/uapi/linux/if_ether.h +1 −0
  26. include/uapi/linux/if_link.h +52 −0
  27. include/uapi/linux/if_macsec.h +161 −0
  28. include/uapi/linux/iio/types.h +1 −0
  29. include/uapi/linux/input.h +1 −0
  30. include/uapi/linux/ip.h +2 −0
  31. include/uapi/linux/ipv6.h +3 −0
  32. include/uapi/linux/kcm.h +40 −0
  33. include/uapi/linux/kcov.h +10 −0
  34. include/uapi/linux/kernel.h +1 −0
  35. include/uapi/linux/kvm.h +18 −1
  36. include/uapi/linux/media.h +33 −12
  37. include/uapi/linux/mroute6.h +2 −7
  38. include/uapi/linux/ndctl.h +13 −0
  39. include/uapi/linux/netconf.h +1 −0
  40. include/uapi/linux/netfilter/nf_conntrack_common.h +9 −3
  41. include/uapi/linux/netfilter/nf_tables.h +6 −0
  42. include/uapi/linux/netlink.h +4 −0
  43. include/uapi/linux/netlink_diag.h +2 −0
  44. include/uapi/linux/nl80211.h +14 −0
  45. include/uapi/linux/openvswitch.h +49 −0
  46. include/uapi/linux/pkt_cls.h +3 −0
  47. include/uapi/linux/quota.h +14 −0
  48. include/uapi/linux/rfkill.h +2 −0
  49. include/uapi/linux/sched.h +1 −2
  50. include/uapi/linux/serial_core.h +3 −0
  51. include/uapi/linux/stddef.h +4 −0
  52. include/uapi/linux/swab.h +5 −5
  53. include/uapi/linux/target_core_user.h +1 −0
  54. include/uapi/linux/tc_act/tc_ife.h +38 −0
  55. include/uapi/linux/tcp.h +5 −0
  56. include/uapi/linux/usb/ch11.h +21 −0
  57. include/uapi/linux/usb/ch9.h +37 −1
  58. include/uapi/linux/usb/tmc.h +26 −3
  59. include/uapi/linux/usbdevice_fs.h +3 −0
  60. include/uapi/linux/v4l2-common.h +35 −11
  61. include/uapi/linux/v4l2-controls.h +11 −0
  62. include/uapi/linux/vfio.h +90 −2
  63. include/uapi/linux/vhost.h +6 −0
  64. include/uapi/linux/videodev2.h +7 −0
  65. include/uapi/linux/virtio_balloon.h +2 −1
  66. include/uapi/linux/virtio_blk.h +3 −3
  67. include/uapi/linux/virtio_config.h +2 −0
  68. include/uapi/misc/cxl.h +24 −0
  69. include/uapi/rdma/hfi/hfi1_user.h +6 −8
  70. include/uapi/rdma/rdma_netlink.h +3 −2
  71. include/uapi/sound/asequencer.h +4 −8
  72. include/uapi/sound/asound.h +4 −0
include/uapi/asm-generic/siginfo.h+12−5
@@ -91,10 +91,15 @@ typedef struct siginfo { · 90 unmodified lines
9191 int _trapno; /* TRAP # which caused the signal */
9292 #endif
9393 short _addr_lsb; /* LSB of the reported address */
94− struct {
95− void __user *_lower;
96− void __user *_upper;
97− } _addr_bnd;
94+ union {
95+ /* used when si_code=SEGV_BNDERR */
96+ struct {
97+ void __user *_lower;
98+ void __user *_upper;
99+ } _addr_bnd;
100+ /* used when si_code=SEGV_PKUERR */
101+ __u32 _pkey;
102+ };
98103 } _sigfault;
99104
100105 /* SIGPOLL */
@@ -137,6 +142,7 @@ typedef struct siginfo { · 36 unmodified lines
137142 #define si_addr_lsb _sifields._sigfault._addr_lsb
138143 #define si_lower _sifields._sigfault._addr_bnd._lower
139144 #define si_upper _sifields._sigfault._addr_bnd._upper
145+#define si_pkey _sifields._sigfault._pkey
140146 #define si_band _sifields._sigpoll._band
141147 #define si_fd _sifields._sigpoll._fd
142148 #ifdef __ARCH_SIGSYS
@@ -206,7 +212,8 @@ typedef struct siginfo { · 63 unmodified lines
206212 #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
207213 #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
208214 #define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */
209−#define NSIGSEGV 3
215+#define SEGV_PKUERR (__SI_FAULT|4) /* failed protection key checks */
216+#define NSIGSEGV 4
210217
211218 /*
212219 * SIGBUS si_codes
include/uapi/asm-generic/socket.h+2−0
@@ -90,4 +90,6 @@ · 89 unmodified lines
9090 #define SO_ATTACH_REUSEPORT_CBPF 51
9191 #define SO_ATTACH_REUSEPORT_EBPF 52
9292
93+#define SO_CNX_ADVICE 53
94+
9395 #endif /* __ASM_GENERIC_SOCKET_H */
include/uapi/drm/drm.h+1−0
@@ -669,6 +669,7 @@ struct drm_set_client_cap { · 668 unmodified lines
669669 __u64 value;
670670 };
671671
672+#define DRM_RDWR O_RDWR
672673 #define DRM_CLOEXEC O_CLOEXEC
673674 struct drm_prime_handle {
674675 __u32 handle;
include/uapi/drm/drm_mode.h+15−0
@@ -487,6 +487,21 @@ struct drm_mode_crtc_lut { · 486 unmodified lines
487487 __u64 blue;
488488 };
489489
490+struct drm_color_ctm {
491+ /* Conversion matrix in S31.32 format. */
492+ __s64 matrix[9];
493+};
494+
495+struct drm_color_lut {
496+ /*
497+ * Data is U0.16 fixed point format.
498+ */
499+ __u16 red;
500+ __u16 green;
501+ __u16 blue;
502+ __u16 reserved;
503+};
504+
490505 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
491506 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
492507 #define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC)
include/uapi/drm/exynos_drm.h+29−14
@@ -28,8 +28,21 @@ · 27 unmodified lines
2828 */
2929 struct drm_exynos_gem_create {
3030 __u64 size;
31− unsigned int flags;
32− unsigned int handle;
31+ __u32 flags;
32+ __u32 handle;
33+};
34+
35+/**
36+ * A structure for getting a fake-offset that can be used with mmap.
37+ *
38+ * @handle: handle of gem object.
39+ * @reserved: just padding to be 64-bit aligned.
40+ * @offset: a fake-offset of gem object.
41+ */
42+struct drm_exynos_gem_map {
43+ __u32 handle;
44+ __u32 reserved;
45+ __u64 offset;
3346 };
3447
3548 /**
@@ -42,8 +55,8 @@ struct drm_exynos_gem_create { · 6 unmodified lines
4255 * be set by driver.
4356 */
4457 struct drm_exynos_gem_info {
45− unsigned int handle;
46− unsigned int flags;
58+ __u32 handle;
59+ __u32 flags;
4760 __u64 size;
4861 };
4962
@@ -56,8 +69,8 @@ struct drm_exynos_gem_info { · 6 unmodified lines
5669 * @edid: the edid data pointer from user side.
5770 */
5871 struct drm_exynos_vidi_connection {
59− unsigned int connection;
60− unsigned int extensions;
72+ __u32 connection;
73+ __u32 extensions;
6174 __u64 edid;
6275 };
6376
@@ -206,9 +219,9 @@ struct drm_exynos_ipp_prop_list { · 142 unmodified lines
206219 * @pos: property of image position(src-cropped,dst-scaler).
207220 */
208221 struct drm_exynos_ipp_config {
209− enum drm_exynos_ops_id ops_id;
210− enum drm_exynos_flip flip;
211− enum drm_exynos_degree degree;
222+ __u32 ops_id;
223+ __u32 flip;
224+ __u32 degree;
212225 __u32 fmt;
213226 struct drm_exynos_sz sz;
214227 struct drm_exynos_pos pos;
@@ -233,7 +246,7 @@ enum drm_exynos_ipp_cmd { · 18 unmodified lines
233246 */
234247 struct drm_exynos_ipp_property {
235248 struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX];
236− enum drm_exynos_ipp_cmd cmd;
249+ __u32 cmd;
237250 __u32 ipp_id;
238251 __u32 prop_id;
239252 __u32 refresh_rate;
@@ -255,8 +268,8 @@ enum drm_exynos_ipp_buf_type { · 15 unmodified lines
255268 * @user_data: user data.
256269 */
257270 struct drm_exynos_ipp_queue_buf {
258− enum drm_exynos_ops_id ops_id;
259− enum drm_exynos_ipp_buf_type buf_type;
271+ __u32 ops_id;
272+ __u32 buf_type;
260273 __u32 prop_id;
261274 __u32 buf_id;
262275 __u32 handle[EXYNOS_DRM_PLANAR_MAX];
@@ -280,10 +293,11 @@ enum drm_exynos_ipp_ctrl { · 17 unmodified lines
280293 */
281294 struct drm_exynos_ipp_cmd_ctrl {
282295 __u32 prop_id;
283− enum drm_exynos_ipp_ctrl ctrl;
296+ __u32 ctrl;
284297 };
285298
286299 #define DRM_EXYNOS_GEM_CREATE 0x00
300+#define DRM_EXYNOS_GEM_MAP 0x01
287301 /* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
288302 #define DRM_EXYNOS_GEM_GET 0x04
289303 #define DRM_EXYNOS_VIDI_CONNECTION 0x07
@@ -301,7 +315,8 @@ struct drm_exynos_ipp_cmd_ctrl { · 11 unmodified lines
301315
302316 #define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
303317 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
304−
318+#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \
319+ DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
305320 #define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
306321 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
307322
include/uapi/drm/i915_drm.h+35−8
@@ -772,10 +772,12 @@ struct drm_i915_gem_execbuffer2 { · 771 unmodified lines
772772 #define I915_EXEC_HANDLE_LUT (1<<12)
773773
774774 /** Used for switching BSD rings on the platforms with two BSD rings */
775−#define I915_EXEC_BSD_MASK (3<<13)
776−#define I915_EXEC_BSD_DEFAULT (0<<13) /* default ping-pong mode */
777−#define I915_EXEC_BSD_RING1 (1<<13)
778−#define I915_EXEC_BSD_RING2 (2<<13)
775+#define I915_EXEC_BSD_SHIFT (13)
776+#define I915_EXEC_BSD_MASK (3 << I915_EXEC_BSD_SHIFT)
777+/* default ping-pong mode */
778+#define I915_EXEC_BSD_DEFAULT (0 << I915_EXEC_BSD_SHIFT)
779+#define I915_EXEC_BSD_RING1 (1 << I915_EXEC_BSD_SHIFT)
780+#define I915_EXEC_BSD_RING2 (2 << I915_EXEC_BSD_SHIFT)
779781
780782 /** Tell the kernel that the batchbuffer is processed by
781783 * the resource streamer.
@@ -812,10 +814,35 @@ struct drm_i915_gem_busy { · 30 unmodified lines
812814 /** Handle of the buffer to check for busy */
813815 __u32 handle;
814816
815− /** Return busy status (1 if busy, 0 if idle).
816− * The high word is used to indicate on which rings the object
817− * currently resides:
818− * 16:31 - busy (r or r/w) rings (16 render, 17 bsd, 18 blt, etc)
817+ /** Return busy status
818+ *
819+ * A return of 0 implies that the object is idle (after
820+ * having flushed any pending activity), and a non-zero return that
821+ * the object is still in-flight on the GPU. (The GPU has not yet
822+ * signaled completion for all pending requests that reference the
823+ * object.)
824+ *
825+ * The returned dword is split into two fields to indicate both
826+ * the engines on which the object is being read, and the
827+ * engine on which it is currently being written (if any).
828+ *
829+ * The low word (bits 0:15) indicate if the object is being written
830+ * to by any engine (there can only be one, as the GEM implicit
831+ * synchronisation rules force writes to be serialised). Only the
832+ * engine for the last write is reported.
833+ *
834+ * The high word (bits 16:31) are a bitmask of which engines are
835+ * currently reading from the object. Multiple engines may be
836+ * reading from the object simultaneously.
837+ *
838+ * The value of each engine is the same as specified in the
839+ * EXECBUFFER2 ioctl, i.e. I915_EXEC_RENDER, I915_EXEC_BSD etc.
840+ * Note I915_EXEC_DEFAULT is a symbolic value and is mapped to
841+ * the I915_EXEC_RENDER engine for execution, and so it is never
842+ * reported as active itself. Some hardware may have parallel
843+ * execution engines, e.g. multiple media engines, which are
844+ * mapped to the same identifier in the EXECBUFFER2 ioctl and
845+ * so are not separately reported for busyness.
819846 */
820847 __u32 busy;
821848 };
include/uapi/drm/msm_drm.h+2−0
@@ -50,6 +50,8 @@ struct drm_msm_timespec { · 49 unmodified lines
5050 #define MSM_PARAM_GPU_ID 0x01
5151 #define MSM_PARAM_GMEM_SIZE 0x02
5252 #define MSM_PARAM_CHIP_ID 0x03
53+#define MSM_PARAM_MAX_FREQ 0x04
54+#define MSM_PARAM_TIMESTAMP 0x05
5355
5456 struct drm_msm_param {
5557 __u32 pipe; /* in, MSM_PIPE_x */
include/uapi/linux/Kbuild+3−0
@@ -138,6 +138,7 @@ header-y += genetlink.h · 137 unmodified lines
138138 header-y += gen_stats.h
139139 header-y += gfs2_ondisk.h
140140 header-y += gigaset_dev.h
141+header-y += gpio.h
141142 header-y += gsmmux.h
142143 header-y += hdlcdrv.h
143144 header-y += hdlc.h
@@ -173,6 +174,7 @@ header-y += if_hippi.h · 29 unmodified lines
173174 header-y += if_infiniband.h
174175 header-y += if_link.h
175176 header-y += if_ltalk.h
177+header-y += if_macsec.h
176178 header-y += if_packet.h
177179 header-y += if_phonet.h
178180 header-y += if_plip.h
@@ -352,6 +354,7 @@ header-y += reiserfs_fs.h · 173 unmodified lines
352354 header-y += reiserfs_xattr.h
353355 header-y += resource.h
354356 header-y += rfkill.h
357+header-y += rio_mport_cdev.h
355358 header-y += romfs_fs.h
356359 header-y += rose.h
357360 header-y += route.h
include/uapi/linux/audit.h+1−0
@@ -110,6 +110,7 @@ · 109 unmodified lines
110110 #define AUDIT_SECCOMP 1326 /* Secure Computing event */
111111 #define AUDIT_PROCTITLE 1327 /* Proctitle emit event */
112112 #define AUDIT_FEATURE_CHANGE 1328 /* audit log listing feature changes */
113+#define AUDIT_REPLACE 1329 /* Replace auditd if this packet unanswerd */
113114
114115 #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
115116 #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
include/uapi/linux/auto_fs.h+9−12
@@ -1,7 +1,4 @@
1−/* -*- linux-c -*- ------------------------------------------------------- *
2− *
3− * linux/include/linux/auto_fs.h
4− *
1+/*
52 * Copyright 1997 Transmeta Corporation - All Rights Reserved
63 *
74 * This file is part of the Linux kernel and is made available under
@@ -51,7 +48,7 @@ struct autofs_packet_hdr { · 43 unmodified lines
5148
5249 struct autofs_packet_missing {
5350 struct autofs_packet_hdr hdr;
54− autofs_wqt_t wait_queue_token;
51+ autofs_wqt_t wait_queue_token;
5552 int len;
5653 char name[NAME_MAX+1];
5754 };
@@ -63,12 +60,12 @@ struct autofs_packet_expire { · 5 unmodified lines
6360 char name[NAME_MAX+1];
6461 };
6562
66−#define AUTOFS_IOC_READY _IO(0x93,0x60)
67−#define AUTOFS_IOC_FAIL _IO(0x93,0x61)
68−#define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
69−#define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
70−#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t)
71−#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
72−#define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
63+#define AUTOFS_IOC_READY _IO(0x93, 0x60)
64+#define AUTOFS_IOC_FAIL _IO(0x93, 0x61)
65+#define AUTOFS_IOC_CATATONIC _IO(0x93, 0x62)
66+#define AUTOFS_IOC_PROTOVER _IOR(0x93, 0x63, int)
67+#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93, 0x64, compat_ulong_t)
68+#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93, 0x64, unsigned long)
69+#define AUTOFS_IOC_EXPIRE _IOR(0x93, 0x65, struct autofs_packet_expire)
7370
7471 #endif /* _UAPI_LINUX_AUTO_FS_H */
include/uapi/linux/auto_fs4.h+5−12
@@ -1,6 +1,4 @@
1−/* -*- c -*-
2− * linux/include/linux/auto_fs4.h
3− *
1+/*
42 * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy@goop.org>
53 *
64 * This file is part of the Linux kernel and is made available under
@@ -38,7 +36,6 @@ · 31 unmodified lines
3836 static inline void set_autofs_type_indirect(unsigned int *type)
3937 {
4038 *type = AUTOFS_TYPE_INDIRECT;
41− return;
4239 }
4340
4441 static inline unsigned int autofs_type_indirect(unsigned int type)
@@ -49,7 +46,6 @@ static inline unsigned int autofs_type_indirect(unsigned int type) · 4 unmodified lines
4946 static inline void set_autofs_type_direct(unsigned int *type)
5047 {
5148 *type = AUTOFS_TYPE_DIRECT;
52− return;
5349 }
5450
5551 static inline unsigned int autofs_type_direct(unsigned int type)
@@ -60,7 +56,6 @@ static inline unsigned int autofs_type_direct(unsigned int type) · 4 unmodified lines
6056 static inline void set_autofs_type_offset(unsigned int *type)
6157 {
6258 *type = AUTOFS_TYPE_OFFSET;
63− return;
6459 }
6560
6661 static inline unsigned int autofs_type_offset(unsigned int type)
@@ -81,7 +76,6 @@ static inline unsigned int autofs_type_trigger(unsigned int type) · 14 unmodified lines
8176 static inline void set_autofs_type_any(unsigned int *type)
8277 {
8378 *type = AUTOFS_TYPE_ANY;
84− return;
8579 }
8680
8781 static inline unsigned int autofs_type_any(unsigned int type)
@@ -114,7 +108,7 @@ enum autofs_notify { · 26 unmodified lines
114108 /* v4 multi expire (via pipe) */
115109 struct autofs_packet_expire_multi {
116110 struct autofs_packet_hdr hdr;
117− autofs_wqt_t wait_queue_token;
111+ autofs_wqt_t wait_queue_token;
118112 int len;
119113 char name[NAME_MAX+1];
120114 };
@@ -154,11 +148,10 @@ union autofs_v5_packet_union { · 33 unmodified lines
154148 autofs_packet_expire_direct_t expire_direct;
155149 };
156150
157−#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int)
151+#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93, 0x66, int)
158152 #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI
159153 #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI
160−#define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int)
161−#define AUTOFS_IOC_ASKUMOUNT _IOR(0x93,0x70,int)
162−
154+#define AUTOFS_IOC_PROTOSUBVER _IOR(0x93, 0x67, int)
155+#define AUTOFS_IOC_ASKUMOUNT _IOR(0x93, 0x70, int)
163156
164157 #endif /* _LINUX_AUTO_FS4_H */
include/uapi/linux/bpf.h+53−0
@@ -81,6 +81,9 @@ enum bpf_map_type { · 80 unmodified lines
8181 BPF_MAP_TYPE_ARRAY,
8282 BPF_MAP_TYPE_PROG_ARRAY,
8383 BPF_MAP_TYPE_PERF_EVENT_ARRAY,
84+ BPF_MAP_TYPE_PERCPU_HASH,
85+ BPF_MAP_TYPE_PERCPU_ARRAY,
86+ BPF_MAP_TYPE_STACK_TRACE,
8487 };
8588
8689 enum bpf_prog_type {
@@ -98,12 +101,15 @@ enum bpf_prog_type { · 11 unmodified lines
98101 #define BPF_NOEXIST 1 /* create new element if it didn't exist */
99102 #define BPF_EXIST 2 /* update existing element */
100103
104+#define BPF_F_NO_PREALLOC (1U << 0)
105+
101106 union bpf_attr {
102107 struct { /* anonymous struct used by BPF_MAP_CREATE command */
103108 __u32 map_type; /* one of enum bpf_map_type */
104109 __u32 key_size; /* size of key in bytes */
105110 __u32 value_size; /* size of value in bytes */
106111 __u32 max_entries; /* max number of entries in a map */
112+ __u32 map_flags; /* prealloc or not */
107113 };
108114
109115 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -270,6 +276,42 @@ enum bpf_func_id { · 160 unmodified lines
270276 */
271277 BPF_FUNC_perf_event_output,
272278 BPF_FUNC_skb_load_bytes,
279+
280+ /**
281+ * bpf_get_stackid(ctx, map, flags) - walk user or kernel stack and return id
282+ * @ctx: struct pt_regs*
283+ * @map: pointer to stack_trace map
284+ * @flags: bits 0-7 - numer of stack frames to skip
285+ * bit 8 - collect user stack instead of kernel
286+ * bit 9 - compare stacks by hash only
287+ * bit 10 - if two different stacks hash into the same stackid
288+ * discard old
289+ * other bits - reserved
290+ * Return: >= 0 stackid on success or negative error
291+ */
292+ BPF_FUNC_get_stackid,
293+
294+ /**
295+ * bpf_csum_diff(from, from_size, to, to_size, seed) - calculate csum diff
296+ * @from: raw from buffer
297+ * @from_size: length of from buffer
298+ * @to: raw to buffer
299+ * @to_size: length of to buffer
300+ * @seed: optional seed
301+ * Return: csum result
302+ */
303+ BPF_FUNC_csum_diff,
304+
305+ /**
306+ * bpf_skb_[gs]et_tunnel_opt(skb, opt, size)
307+ * retrieve or populate tunnel options metadata
308+ * @skb: pointer to skb
309+ * @opt: pointer to raw tunnel option data
310+ * @size: size of @opt
311+ * Return: 0 on success for set, option size for get
312+ */
313+ BPF_FUNC_skb_get_tunnel_opt,
314+ BPF_FUNC_skb_set_tunnel_opt,
273315 __BPF_FUNC_MAX_ID,
274316 };
275317
@@ -277,6 +319,7 @@ enum bpf_func_id { · 1 unmodified line
277319
278320 /* BPF_FUNC_skb_store_bytes flags. */
279321 #define BPF_F_RECOMPUTE_CSUM (1ULL << 0)
322+#define BPF_F_INVALIDATE_HASH (1ULL << 1)
280323
281324 /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.
282325 * First 4 bits are for passing the header field size.
@@ -285,6 +328,7 @@ enum bpf_func_id { · 2 unmodified lines
285328
286329 /* BPF_FUNC_l4_csum_replace flags. */
287330 #define BPF_F_PSEUDO_HDR (1ULL << 4)
331+#define BPF_F_MARK_MANGLED_0 (1ULL << 5)
288332
289333 /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
290334 #define BPF_F_INGRESS (1ULL << 0)
@@ -292,8 +336,15 @@ enum bpf_func_id { · 1 unmodified line
292336 /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
293337 #define BPF_F_TUNINFO_IPV6 (1ULL << 0)
294338
339+/* BPF_FUNC_get_stackid flags. */
340+#define BPF_F_SKIP_FIELD_MASK 0xffULL
341+#define BPF_F_USER_STACK (1ULL << 8)
342+#define BPF_F_FAST_STACK_CMP (1ULL << 9)
343+#define BPF_F_REUSE_STACKID (1ULL << 10)
344+
295345 /* BPF_FUNC_skb_set_tunnel_key flags. */
296346 #define BPF_F_ZERO_CSUM_TX (1ULL << 1)
347+#define BPF_F_DONT_FRAGMENT (1ULL << 2)
297348
298349 /* user accessible mirror of in-kernel sk_buff.
299350 * new fields can only be added to the end of this structure
@@ -324,6 +375,8 @@ struct bpf_tunnel_key { · 24 unmodified lines
324375 };
325376 __u8 tunnel_tos;
326377 __u8 tunnel_ttl;
378+ __u16 tunnel_ext;
379+ __u32 tunnel_label;
327380 };
328381
329382 #endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/byteorder/big_endian.h+12−12
@@ -40,51 +40,51 @@ · 39 unmodified lines
4040 #define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
4141 #define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
4242
43−static inline __le64 __cpu_to_le64p(const __u64 *p)
43+static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
4444 {
4545 return (__force __le64)__swab64p(p);
4646 }
47−static inline __u64 __le64_to_cpup(const __le64 *p)
47+static __always_inline __u64 __le64_to_cpup(const __le64 *p)
4848 {
4949 return __swab64p((__u64 *)p);
5050 }
51−static inline __le32 __cpu_to_le32p(const __u32 *p)
51+static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
5252 {
5353 return (__force __le32)__swab32p(p);
5454 }
55−static inline __u32 __le32_to_cpup(const __le32 *p)
55+static __always_inline __u32 __le32_to_cpup(const __le32 *p)
5656 {
5757 return __swab32p((__u32 *)p);
5858 }
59−static inline __le16 __cpu_to_le16p(const __u16 *p)
59+static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
6060 {
6161 return (__force __le16)__swab16p(p);
6262 }
63−static inline __u16 __le16_to_cpup(const __le16 *p)
63+static __always_inline __u16 __le16_to_cpup(const __le16 *p)
6464 {
6565 return __swab16p((__u16 *)p);
6666 }
67−static inline __be64 __cpu_to_be64p(const __u64 *p)
67+static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
6868 {
6969 return (__force __be64)*p;
7070 }
71−static inline __u64 __be64_to_cpup(const __be64 *p)
71+static __always_inline __u64 __be64_to_cpup(const __be64 *p)
7272 {
7373 return (__force __u64)*p;
7474 }
75−static inline __be32 __cpu_to_be32p(const __u32 *p)
75+static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
7676 {
7777 return (__force __be32)*p;
7878 }
79−static inline __u32 __be32_to_cpup(const __be32 *p)
79+static __always_inline __u32 __be32_to_cpup(const __be32 *p)
8080 {
8181 return (__force __u32)*p;
8282 }
83−static inline __be16 __cpu_to_be16p(const __u16 *p)
83+static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
8484 {
8585 return (__force __be16)*p;
8686 }
87−static inline __u16 __be16_to_cpup(const __be16 *p)
87+static __always_inline __u16 __be16_to_cpup(const __be16 *p)
8888 {
8989 return (__force __u16)*p;
9090 }
include/uapi/linux/byteorder/little_endian.h+12−12
@@ -40,51 +40,51 @@ · 39 unmodified lines
4040 #define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
4141 #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
4242
43−static inline __le64 __cpu_to_le64p(const __u64 *p)
43+static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
4444 {
4545 return (__force __le64)*p;
4646 }
47−static inline __u64 __le64_to_cpup(const __le64 *p)
47+static __always_inline __u64 __le64_to_cpup(const __le64 *p)
4848 {
4949 return (__force __u64)*p;
5050 }
51−static inline __le32 __cpu_to_le32p(const __u32 *p)
51+static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
5252 {
5353 return (__force __le32)*p;
5454 }
55−static inline __u32 __le32_to_cpup(const __le32 *p)
55+static __always_inline __u32 __le32_to_cpup(const __le32 *p)
5656 {
5757 return (__force __u32)*p;
5858 }
59−static inline __le16 __cpu_to_le16p(const __u16 *p)
59+static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
6060 {
6161 return (__force __le16)*p;
6262 }
63−static inline __u16 __le16_to_cpup(const __le16 *p)
63+static __always_inline __u16 __le16_to_cpup(const __le16 *p)
6464 {
6565 return (__force __u16)*p;
6666 }
67−static inline __be64 __cpu_to_be64p(const __u64 *p)
67+static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
6868 {
6969 return (__force __be64)__swab64p(p);
7070 }
71−static inline __u64 __be64_to_cpup(const __be64 *p)
71+static __always_inline __u64 __be64_to_cpup(const __be64 *p)
7272 {
7373 return __swab64p((__u64 *)p);
7474 }
75−static inline __be32 __cpu_to_be32p(const __u32 *p)
75+static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
7676 {
7777 return (__force __be32)__swab32p(p);
7878 }
79−static inline __u32 __be32_to_cpup(const __be32 *p)
79+static __always_inline __u32 __be32_to_cpup(const __be32 *p)
8080 {
8181 return __swab32p((__u32 *)p);
8282 }
83−static inline __be16 __cpu_to_be16p(const __u16 *p)
83+static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
8484 {
8585 return (__force __be16)__swab16p(p);
8686 }
87−static inline __u16 __be16_to_cpup(const __be16 *p)
87+static __always_inline __u16 __be16_to_cpup(const __be16 *p)
8888 {
8989 return __swab16p((__u16 *)p);
9090 }
include/uapi/linux/devlink.h+72−0
@@ -0,0 +1,72 @@
1+/*
2+ * include/uapi/linux/devlink.h - Network physical device Netlink interface
3+ * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
4+ * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com>
5+ *
6+ * This program is free software; you can redistribute it and/or modify
7+ * it under the terms of the GNU General Public License as published by
8+ * the Free Software Foundation; either version 2 of the License, or
9+ * (at your option) any later version.
10+ */
11+
12+#ifndef _UAPI_LINUX_DEVLINK_H_
13+#define _UAPI_LINUX_DEVLINK_H_
14+
15+#define DEVLINK_GENL_NAME "devlink"
16+#define DEVLINK_GENL_VERSION 0x1
17+#define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
18+
19+enum devlink_command {
20+ /* don't change the order or add anything between, this is ABI! */
21+ DEVLINK_CMD_UNSPEC,
22+
23+ DEVLINK_CMD_GET, /* can dump */
24+ DEVLINK_CMD_SET,
25+ DEVLINK_CMD_NEW,
26+ DEVLINK_CMD_DEL,
27+
28+ DEVLINK_CMD_PORT_GET, /* can dump */
29+ DEVLINK_CMD_PORT_SET,
30+ DEVLINK_CMD_PORT_NEW,
31+ DEVLINK_CMD_PORT_DEL,
32+
33+ DEVLINK_CMD_PORT_SPLIT,
34+ DEVLINK_CMD_PORT_UNSPLIT,
35+
36+ /* add new commands above here */
37+
38+ __DEVLINK_CMD_MAX,
39+ DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
40+};
41+
42+enum devlink_port_type {
43+ DEVLINK_PORT_TYPE_NOTSET,
44+ DEVLINK_PORT_TYPE_AUTO,
45+ DEVLINK_PORT_TYPE_ETH,
46+ DEVLINK_PORT_TYPE_IB,
47+};
48+
49+enum devlink_attr {
50+ /* don't change the order or add anything between, this is ABI! */
51+ DEVLINK_ATTR_UNSPEC,
52+
53+ /* bus name + dev name together are a handle for devlink entity */
54+ DEVLINK_ATTR_BUS_NAME, /* string */
55+ DEVLINK_ATTR_DEV_NAME, /* string */
56+
57+ DEVLINK_ATTR_PORT_INDEX, /* u32 */
58+ DEVLINK_ATTR_PORT_TYPE, /* u16 */
59+ DEVLINK_ATTR_PORT_DESIRED_TYPE, /* u16 */
60+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX, /* u32 */
61+ DEVLINK_ATTR_PORT_NETDEV_NAME, /* string */
62+ DEVLINK_ATTR_PORT_IBDEV_NAME, /* string */
63+ DEVLINK_ATTR_PORT_SPLIT_COUNT, /* u32 */
64+ DEVLINK_ATTR_PORT_SPLIT_GROUP, /* u32 */
65+
66+ /* add new attributes above here, update the policy in devlink.c */
67+
68+ __DEVLINK_ATTR_MAX,
69+ DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1
70+};
71+
72+#endif /* _UAPI_LINUX_DEVLINK_H_ */
include/uapi/linux/dma-buf.h+40−0
@@ -0,0 +1,40 @@
1+/*
2+ * Framework for buffer objects that can be shared across devices/subsystems.
3+ *
4+ * Copyright(C) 2015 Intel Ltd
5+ *
6+ * This program is free software; you can redistribute it and/or modify it
7+ * under the terms of the GNU General Public License version 2 as published by
8+ * the Free Software Foundation.
9+ *
10+ * This program is distributed in the hope that it will be useful, but WITHOUT
11+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13+ * more details.
14+ *
15+ * You should have received a copy of the GNU General Public License along with
16+ * this program. If not, see <http://www.gnu.org/licenses/>.
17+ */
18+
19+#ifndef _DMA_BUF_UAPI_H_
20+#define _DMA_BUF_UAPI_H_
21+
22+#include <linux/types.h>
23+
24+/* begin/end dma-buf functions used for userspace mmap. */
25+struct dma_buf_sync {
26+ __u64 flags;
27+};
28+
29+#define DMA_BUF_SYNC_READ (1 << 0)
30+#define DMA_BUF_SYNC_WRITE (2 << 0)
31+#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
32+#define DMA_BUF_SYNC_START (0 << 2)
33+#define DMA_BUF_SYNC_END (1 << 2)
34+#define DMA_BUF_SYNC_VALID_FLAGS_MASK \
35+ (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END)
36+
37+#define DMA_BUF_BASE 'b'
38+#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
39+
40+#endif
include/uapi/linux/dqblk_xfs.h+1−0
@@ -39,6 +39,7 @@ · 38 unmodified lines
3939 #define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */
4040 #define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */
4141 #define Q_XGETQSTATV XQM_CMD(8) /* newer version of get quota */
42+#define Q_XGETNEXTQUOTA XQM_CMD(9) /* get disk limits and usage >= ID */
4243
4344 /*
4445 * fs_disk_quota structure:
include/uapi/linux/elf-em.h+0−3
@@ -30,7 +30,6 @@ · 29 unmodified lines
3030 #define EM_X86_64 62 /* AMD x86-64 */
3131 #define EM_S390 22 /* IBM S/390 */
3232 #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
33−#define EM_V850 87 /* NEC v850 */
3433 #define EM_M32R 88 /* Renesas M32R */
3534 #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */
3635 #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
@@ -50,8 +49,6 @@ · 13 unmodified lines
5049 */
5150 #define EM_ALPHA 0x9026
5251
53−/* Bogus old v850 magic number, used by old tools. */
54−#define EM_CYGNUS_V850 0x9080
5552 /* Bogus old m32r magic number, used by old tools. */
5653 #define EM_CYGNUS_M32R 0x9041
5754 /* This is the old interim value for S/390 architecture */
include/uapi/linux/ethtool.h+362−75
@@ -13,15 +13,21 @@ · 12 unmodified lines
1313 #ifndef _UAPI_LINUX_ETHTOOL_H
1414 #define _UAPI_LINUX_ETHTOOL_H
1515
16+#include <linux/kernel.h>
1617 #include <linux/types.h>
1718 #include <linux/if_ether.h>
1819
20+#ifndef __KERNEL__
21+#include <limits.h> /* for INT_MAX */
22+#endif
23+
1924 /* All structures exposed to userland should be defined such that they
2025 * have the same layout for 32-bit and 64-bit userland.
2126 */
2227
2328 /**
24− * struct ethtool_cmd - link control and status
29+ * struct ethtool_cmd - DEPRECATED, link control and status
30+ * This structure is DEPRECATED, please use struct ethtool_link_settings.
2531 * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET
2632 * @supported: Bitmask of %SUPPORTED_* flags for the link modes,
2733 * physical connectors and other link features for which the
@@ -31,7 +37,7 @@ · 3 unmodified lines
3137 * physical connectors and other link features that are
3238 * advertised through autonegotiation or enabled for
3339 * auto-detection.
34− * @speed: Low bits of the speed
40+ * @speed: Low bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
3541 * @duplex: Duplex mode; one of %DUPLEX_*
3642 * @port: Physical connector type; one of %PORT_*
3743 * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
@@ -47,7 +53,7 @@ · 9 unmodified lines
4753 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
4854 * @maxrxpkt: Historically used to report RX IRQ coalescing; now
4955 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
50− * @speed_hi: High bits of the speed
56+ * @speed_hi: High bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
5157 * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
5258 * %ETH_TP_MDI_*. If the status is unknown or not applicable, the
5359 * value will be %ETH_TP_MDI_INVALID. Read-only.
@@ -748,6 +754,56 @@ struct ethtool_usrip4_spec { · 694 unmodified lines
748754 __u8 proto;
749755 };
750756
757+/**
758+ * struct ethtool_tcpip6_spec - flow specification for TCP/IPv6 etc.
759+ * @ip6src: Source host
760+ * @ip6dst: Destination host
761+ * @psrc: Source port
762+ * @pdst: Destination port
763+ * @tclass: Traffic Class
764+ *
765+ * This can be used to specify a TCP/IPv6, UDP/IPv6 or SCTP/IPv6 flow.
766+ */
767+struct ethtool_tcpip6_spec {
768+ __be32 ip6src[4];
769+ __be32 ip6dst[4];
770+ __be16 psrc;
771+ __be16 pdst;
772+ __u8 tclass;
773+};
774+
775+/**
776+ * struct ethtool_ah_espip6_spec - flow specification for IPsec/IPv6
777+ * @ip6src: Source host
778+ * @ip6dst: Destination host
779+ * @spi: Security parameters index
780+ * @tclass: Traffic Class
781+ *
782+ * This can be used to specify an IPsec transport or tunnel over IPv6.
783+ */
784+struct ethtool_ah_espip6_spec {
785+ __be32 ip6src[4];
786+ __be32 ip6dst[4];
787+ __be32 spi;
788+ __u8 tclass;
789+};
790+
791+/**
792+ * struct ethtool_usrip6_spec - general flow specification for IPv6
793+ * @ip6src: Source host
794+ * @ip6dst: Destination host
795+ * @l4_4_bytes: First 4 bytes of transport (layer 4) header
796+ * @tclass: Traffic Class
797+ * @l4_proto: Transport protocol number (nexthdr after any Extension Headers)
798+ */
799+struct ethtool_usrip6_spec {
800+ __be32 ip6src[4];
801+ __be32 ip6dst[4];
802+ __be32 l4_4_bytes;
803+ __u8 tclass;
804+ __u8 l4_proto;
805+};
806+
751807 union ethtool_flow_union {
752808 struct ethtool_tcpip4_spec tcp_ip4_spec;
753809 struct ethtool_tcpip4_spec udp_ip4_spec;
@@ -755,6 +811,12 @@ union ethtool_flow_union { · 1 unmodified line
755811 struct ethtool_ah_espip4_spec ah_ip4_spec;
756812 struct ethtool_ah_espip4_spec esp_ip4_spec;
757813 struct ethtool_usrip4_spec usr_ip4_spec;
814+ struct ethtool_tcpip6_spec tcp_ip6_spec;
815+ struct ethtool_tcpip6_spec udp_ip6_spec;
816+ struct ethtool_tcpip6_spec sctp_ip6_spec;
817+ struct ethtool_ah_espip6_spec ah_ip6_spec;
818+ struct ethtool_ah_espip6_spec esp_ip6_spec;
819+ struct ethtool_usrip6_spec usr_ip6_spec;
758820 struct ethhdr ether_spec;
759821 __u8 hdata[52];
760822 };
@@ -1146,10 +1208,29 @@ enum ethtool_sfeatures_retval_bits { · 385 unmodified lines
11461208 #define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)
11471209 #define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)
11481210
1211+#define MAX_NUM_QUEUE 4096
1212+
1213+/**
1214+ * struct ethtool_per_queue_op - apply sub command to the queues in mask.
1215+ * @cmd: ETHTOOL_PERQUEUE
1216+ * @sub_command: the sub command which apply to each queues
1217+ * @queue_mask: Bitmap of the queues which sub command apply to
1218+ * @data: A complete command structure following for each of the queues addressed
1219+ */
1220+struct ethtool_per_queue_op {
1221+ __u32 cmd;
1222+ __u32 sub_command;
1223+ __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
1224+ char data[];
1225+};
11491226
11501227 /* CMDs currently supported */
1151−#define ETHTOOL_GSET 0x00000001 /* Get settings. */
1152−#define ETHTOOL_SSET 0x00000002 /* Set settings. */
1228+#define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings.
1229+ * Please use ETHTOOL_GLINKSETTINGS
1230+ */
1231+#define ETHTOOL_SSET 0x00000002 /* DEPRECATED, Set settings.
1232+ * Please use ETHTOOL_SLINKSETTINGS
1233+ */
11531234 #define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
11541235 #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */
11551236 #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */
@@ -1229,73 +1310,141 @@ enum ethtool_sfeatures_retval_bits { · 73 unmodified lines
12291310 #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */
12301311 #define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */
12311312
1313+#define ETHTOOL_PERQUEUE 0x0000004b /* Set per queue options */
1314+
1315+#define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */
1316+#define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */
1317+
1318+
12321319 /* compatibility with older code */
12331320 #define SPARC_ETH_GSET ETHTOOL_GSET
12341321 #define SPARC_ETH_SSET ETHTOOL_SSET
12351322
1236−#define SUPPORTED_10baseT_Half (1 << 0)
1237−#define SUPPORTED_10baseT_Full (1 << 1)
1238−#define SUPPORTED_100baseT_Half (1 << 2)
1239−#define SUPPORTED_100baseT_Full (1 << 3)
1240−#define SUPPORTED_1000baseT_Half (1 << 4)
1241−#define SUPPORTED_1000baseT_Full (1 << 5)
1242−#define SUPPORTED_Autoneg (1 << 6)
1243−#define SUPPORTED_TP (1 << 7)
1244−#define SUPPORTED_AUI (1 << 8)
1245−#define SUPPORTED_MII (1 << 9)
1246−#define SUPPORTED_FIBRE (1 << 10)
1247−#define SUPPORTED_BNC (1 << 11)
1248−#define SUPPORTED_10000baseT_Full (1 << 12)
1249−#define SUPPORTED_Pause (1 << 13)
1250−#define SUPPORTED_Asym_Pause (1 << 14)
1251−#define SUPPORTED_2500baseX_Full (1 << 15)
1252−#define SUPPORTED_Backplane (1 << 16)
1253−#define SUPPORTED_1000baseKX_Full (1 << 17)
1254−#define SUPPORTED_10000baseKX4_Full (1 << 18)
1255−#define SUPPORTED_10000baseKR_Full (1 << 19)
1256−#define SUPPORTED_10000baseR_FEC (1 << 20)
1257−#define SUPPORTED_20000baseMLD2_Full (1 << 21)
1258−#define SUPPORTED_20000baseKR2_Full (1 << 22)
1259−#define SUPPORTED_40000baseKR4_Full (1 << 23)
1260−#define SUPPORTED_40000baseCR4_Full (1 << 24)
1261−#define SUPPORTED_40000baseSR4_Full (1 << 25)
1262−#define SUPPORTED_40000baseLR4_Full (1 << 26)
1263−#define SUPPORTED_56000baseKR4_Full (1 << 27)
1264−#define SUPPORTED_56000baseCR4_Full (1 << 28)
1265−#define SUPPORTED_56000baseSR4_Full (1 << 29)
1266−#define SUPPORTED_56000baseLR4_Full (1 << 30)
1267−
1268−#define ADVERTISED_10baseT_Half (1 << 0)
1269−#define ADVERTISED_10baseT_Full (1 << 1)
1270−#define ADVERTISED_100baseT_Half (1 << 2)
1271−#define ADVERTISED_100baseT_Full (1 << 3)
1272−#define ADVERTISED_1000baseT_Half (1 << 4)
1273−#define ADVERTISED_1000baseT_Full (1 << 5)
1274−#define ADVERTISED_Autoneg (1 << 6)
1275−#define ADVERTISED_TP (1 << 7)
1276−#define ADVERTISED_AUI (1 << 8)
1277−#define ADVERTISED_MII (1 << 9)
1278−#define ADVERTISED_FIBRE (1 << 10)
1279−#define ADVERTISED_BNC (1 << 11)
1280−#define ADVERTISED_10000baseT_Full (1 << 12)
1281−#define ADVERTISED_Pause (1 << 13)
1282−#define ADVERTISED_Asym_Pause (1 << 14)
1283−#define ADVERTISED_2500baseX_Full (1 << 15)
1284−#define ADVERTISED_Backplane (1 << 16)
1285−#define ADVERTISED_1000baseKX_Full (1 << 17)
1286−#define ADVERTISED_10000baseKX4_Full (1 << 18)
1287−#define ADVERTISED_10000baseKR_Full (1 << 19)
1288−#define ADVERTISED_10000baseR_FEC (1 << 20)
1289−#define ADVERTISED_20000baseMLD2_Full (1 << 21)
1290−#define ADVERTISED_20000baseKR2_Full (1 << 22)
1291−#define ADVERTISED_40000baseKR4_Full (1 << 23)
1292−#define ADVERTISED_40000baseCR4_Full (1 << 24)
1293−#define ADVERTISED_40000baseSR4_Full (1 << 25)
1294−#define ADVERTISED_40000baseLR4_Full (1 << 26)
1295−#define ADVERTISED_56000baseKR4_Full (1 << 27)
1296−#define ADVERTISED_56000baseCR4_Full (1 << 28)
1297−#define ADVERTISED_56000baseSR4_Full (1 << 29)
1298−#define ADVERTISED_56000baseLR4_Full (1 << 30)
1323+/* Link mode bit indices */
1324+enum ethtool_link_mode_bit_indices {
1325+ ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0,
1326+ ETHTOOL_LINK_MODE_10baseT_Full_BIT = 1,
1327+ ETHTOOL_LINK_MODE_100baseT_Half_BIT = 2,
1328+ ETHTOOL_LINK_MODE_100baseT_Full_BIT = 3,
1329+ ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 4,
1330+ ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 5,
1331+ ETHTOOL_LINK_MODE_Autoneg_BIT = 6,
1332+ ETHTOOL_LINK_MODE_TP_BIT = 7,
1333+ ETHTOOL_LINK_MODE_AUI_BIT = 8,
1334+ ETHTOOL_LINK_MODE_MII_BIT = 9,
1335+ ETHTOOL_LINK_MODE_FIBRE_BIT = 10,
1336+ ETHTOOL_LINK_MODE_BNC_BIT = 11,
1337+ ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 12,
1338+ ETHTOOL_LINK_MODE_Pause_BIT = 13,
1339+ ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14,
1340+ ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 15,
1341+ ETHTOOL_LINK_MODE_Backplane_BIT = 16,
1342+ ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 17,
1343+ ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18,
1344+ ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 19,
1345+ ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 20,
1346+ ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21,
1347+ ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22,
1348+ ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23,
1349+ ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24,
1350+ ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25,
1351+ ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26,
1352+ ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27,
1353+ ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28,
1354+ ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29,
1355+ ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30,
1356+
1357+ /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
1358+ * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
1359+ * macro for bits > 31. The only way to use indices > 31 is to
1360+ * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API.
1361+ */
1362+
1363+ __ETHTOOL_LINK_MODE_LAST
1364+ = ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
1365+};
1366+
1367+#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \
1368+ (1UL << (ETHTOOL_LINK_MODE_ ## base_name ## _BIT))
1369+
1370+/* DEPRECATED macros. Please migrate to
1371+ * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT
1372+ * define any new SUPPORTED_* macro for bits > 31.
1373+ */
1374+#define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
1375+#define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
1376+#define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
1377+#define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
1378+#define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
1379+#define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
1380+#define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
1381+#define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
1382+#define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
1383+#define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
1384+#define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
1385+#define SUPPORTED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)
1386+#define SUPPORTED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)
1387+#define SUPPORTED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)
1388+#define SUPPORTED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)
1389+#define SUPPORTED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)
1390+#define SUPPORTED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)
1391+#define SUPPORTED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)
1392+#define SUPPORTED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)
1393+#define SUPPORTED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)
1394+#define SUPPORTED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)
1395+#define SUPPORTED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)
1396+#define SUPPORTED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)
1397+#define SUPPORTED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)
1398+#define SUPPORTED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)
1399+#define SUPPORTED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)
1400+#define SUPPORTED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)
1401+#define SUPPORTED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)
1402+#define SUPPORTED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)
1403+#define SUPPORTED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)
1404+#define SUPPORTED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)
1405+/* Please do not define any new SUPPORTED_* macro for bits > 31, see
1406+ * notice above.
1407+ */
1408+
1409+/*
1410+ * DEPRECATED macros. Please migrate to
1411+ * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT
1412+ * define any new ADERTISE_* macro for bits > 31.
1413+ */
1414+#define ADVERTISED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
1415+#define ADVERTISED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
1416+#define ADVERTISED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
1417+#define ADVERTISED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
1418+#define ADVERTISED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
1419+#define ADVERTISED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
1420+#define ADVERTISED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
1421+#define ADVERTISED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
1422+#define ADVERTISED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
1423+#define ADVERTISED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
1424+#define ADVERTISED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
1425+#define ADVERTISED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)
1426+#define ADVERTISED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)
1427+#define ADVERTISED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)
1428+#define ADVERTISED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)
1429+#define ADVERTISED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)
1430+#define ADVERTISED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)
1431+#define ADVERTISED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)
1432+#define ADVERTISED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)
1433+#define ADVERTISED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)
1434+#define ADVERTISED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)
1435+#define ADVERTISED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)
1436+#define ADVERTISED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)
1437+#define ADVERTISED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)
1438+#define ADVERTISED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)
1439+#define ADVERTISED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)
1440+#define ADVERTISED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)
1441+#define ADVERTISED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)
1442+#define ADVERTISED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)
1443+#define ADVERTISED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)
1444+#define ADVERTISED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)
1445+/* Please do not define any new ADVERTISED_* macro for bits > 31, see
1446+ * notice above.
1447+ */
12991448
13001449 /* The following are all involved in forcing a particular link
13011450 * mode for the device for setting things. When getting the
@@ -1303,7 +1452,7 @@ enum ethtool_sfeatures_retval_bits { · 1 unmodified line
13031452 * it was forced up into this mode or autonegotiated.
13041453 */
13051454
1306−/* The forced speed, 10Mb, 100Mb, gigabit, [2.5|5|10|20|25|40|50|56|100]GbE. */
1455+/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal. */
13071456 #define SPEED_10 10
13081457 #define SPEED_100 100
13091458 #define SPEED_1000 1000
@@ -1319,11 +1468,28 @@ enum ethtool_sfeatures_retval_bits { · 9 unmodified lines
13191468
13201469 #define SPEED_UNKNOWN -1
13211470
1471+static inline int ethtool_validate_speed(__u32 speed)
1472+{
1473+ return speed <= INT_MAX || speed == SPEED_UNKNOWN;
1474+}
1475+
13221476 /* Duplex, half or full. */
13231477 #define DUPLEX_HALF 0x00
13241478 #define DUPLEX_FULL 0x01
13251479 #define DUPLEX_UNKNOWN 0xff
13261480
1481+static inline int ethtool_validate_duplex(__u8 duplex)
1482+{
1483+ switch (duplex) {
1484+ case DUPLEX_HALF:
1485+ case DUPLEX_FULL:
1486+ case DUPLEX_UNKNOWN:
1487+ return 1;
1488+ }
1489+
1490+ return 0;
1491+}
1492+
13271493 /* Which connector port. */
13281494 #define PORT_TP 0x00
13291495 #define PORT_AUI 0x01
@@ -1367,15 +1533,17 @@ enum ethtool_sfeatures_retval_bits { · 37 unmodified lines
13671533 #define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */
13681534 #define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */
13691535 #define AH_ESP_V4_FLOW 0x04 /* hash only */
1370−#define TCP_V6_FLOW 0x05 /* hash only */
1371−#define UDP_V6_FLOW 0x06 /* hash only */
1372−#define SCTP_V6_FLOW 0x07 /* hash only */
1536+#define TCP_V6_FLOW 0x05 /* hash or spec (tcp_ip6_spec; nfc only) */
1537+#define UDP_V6_FLOW 0x06 /* hash or spec (udp_ip6_spec; nfc only) */
1538+#define SCTP_V6_FLOW 0x07 /* hash or spec (sctp_ip6_spec; nfc only) */
13731539 #define AH_ESP_V6_FLOW 0x08 /* hash only */
13741540 #define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */
13751541 #define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */
1376−#define AH_V6_FLOW 0x0b /* hash only */
1377−#define ESP_V6_FLOW 0x0c /* hash only */
1378−#define IP_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */
1542+#define AH_V6_FLOW 0x0b /* hash or spec (ah_ip6_spec; nfc only) */
1543+#define ESP_V6_FLOW 0x0c /* hash or spec (esp_ip6_spec; nfc only) */
1544+#define IPV4_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */
1545+#define IP_USER_FLOW IPV4_USER_FLOW
1546+#define IPV6_USER_FLOW 0x0e /* spec only (usr_ip6_spec; nfc only) */
13791547 #define IPV4_FLOW 0x10 /* hash only */
13801548 #define IPV6_FLOW 0x11 /* hash only */
13811549 #define ETHER_FLOW 0x12 /* spec only (ether_spec) */
@@ -1441,4 +1609,123 @@ enum ethtool_reset_flags { · 59 unmodified lines
14411609 };
14421610 #define ETH_RESET_SHARED_SHIFT 16
14431611
1612+
1613+/**
1614+ * struct ethtool_link_settings - link control and status
1615+ *
1616+ * IMPORTANT, Backward compatibility notice: When implementing new
1617+ * user-space tools, please first try %ETHTOOL_GLINKSETTINGS, and
1618+ * if it succeeds use %ETHTOOL_SLINKSETTINGS to change link
1619+ * settings; do not use %ETHTOOL_SSET if %ETHTOOL_GLINKSETTINGS
1620+ * succeeded: stick to %ETHTOOL_GLINKSETTINGS/%SLINKSETTINGS in
1621+ * that case. Conversely, if %ETHTOOL_GLINKSETTINGS fails, use
1622+ * %ETHTOOL_GSET to query and %ETHTOOL_SSET to change link
1623+ * settings; do not use %ETHTOOL_SLINKSETTINGS if
1624+ * %ETHTOOL_GLINKSETTINGS failed: stick to
1625+ * %ETHTOOL_GSET/%ETHTOOL_SSET in that case.
1626+ *
1627+ * @cmd: Command number = %ETHTOOL_GLINKSETTINGS or %ETHTOOL_SLINKSETTINGS
1628+ * @speed: Link speed (Mbps)
1629+ * @duplex: Duplex mode; one of %DUPLEX_*
1630+ * @port: Physical connector type; one of %PORT_*
1631+ * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
1632+ * applicable. For clause 45 PHYs this is the PRTAD.
1633+ * @autoneg: Enable/disable autonegotiation and auto-detection;
1634+ * either %AUTONEG_DISABLE or %AUTONEG_ENABLE
1635+ * @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO
1636+ * protocols supported by the interface; 0 if unknown.
1637+ * Read-only.
1638+ * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
1639+ * %ETH_TP_MDI_*. If the status is unknown or not applicable, the
1640+ * value will be %ETH_TP_MDI_INVALID. Read-only.
1641+ * @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of
1642+ * %ETH_TP_MDI_*. If MDI(-X) control is not implemented, reads
1643+ * yield %ETH_TP_MDI_INVALID and writes may be ignored or rejected.
1644+ * When written successfully, the link should be renegotiated if
1645+ * necessary.
1646+ * @link_mode_masks_nwords: Number of 32-bit words for each of the
1647+ * supported, advertising, lp_advertising link mode bitmaps. For
1648+ * %ETHTOOL_GLINKSETTINGS: on entry, number of words passed by user
1649+ * (>= 0); on return, if handshake in progress, negative if
1650+ * request size unsupported by kernel: absolute value indicates
1651+ * kernel expected size and all the other fields but cmd
1652+ * are 0; otherwise (handshake completed), strictly positive
1653+ * to indicate size used by kernel and cmd field stays
1654+ * %ETHTOOL_GLINKSETTINGS, all other fields populated by driver. For
1655+ * %ETHTOOL_SLINKSETTINGS: must be valid on entry, ie. a positive
1656+ * value returned previously by %ETHTOOL_GLINKSETTINGS, otherwise
1657+ * refused. For drivers: ignore this field (use kernel's
1658+ * __ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will
1659+ * be overwritten by kernel.
1660+ * @supported: Bitmap with each bit meaning given by
1661+ * %ethtool_link_mode_bit_indices for the link modes, physical
1662+ * connectors and other link features for which the interface
1663+ * supports autonegotiation or auto-detection. Read-only.
1664+ * @advertising: Bitmap with each bit meaning given by
1665+ * %ethtool_link_mode_bit_indices for the link modes, physical
1666+ * connectors and other link features that are advertised through
1667+ * autonegotiation or enabled for auto-detection.
1668+ * @lp_advertising: Bitmap with each bit meaning given by
1669+ * %ethtool_link_mode_bit_indices for the link modes, and other
1670+ * link features that the link partner advertised through
1671+ * autonegotiation; 0 if unknown or not applicable. Read-only.
1672+ *
1673+ * If autonegotiation is disabled, the speed and @duplex represent the
1674+ * fixed link mode and are writable if the driver supports multiple
1675+ * link modes. If it is enabled then they are read-only; if the link
1676+ * is up they represent the negotiated link mode; if the link is down,
1677+ * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and
1678+ * @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.
1679+ *
1680+ * Some hardware interfaces may have multiple PHYs and/or physical
1681+ * connectors fitted or do not allow the driver to detect which are
1682+ * fitted. For these interfaces @port and/or @phy_address may be
1683+ * writable, possibly dependent on @autoneg being %AUTONEG_DISABLE.
1684+ * Otherwise, attempts to write different values may be ignored or
1685+ * rejected.
1686+ *
1687+ * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt
1688+ * are not available in %ethtool_link_settings. Until all drivers are
1689+ * converted to ignore them or to the new %ethtool_link_settings API,
1690+ * for both queries and changes, users should always try
1691+ * %ETHTOOL_GLINKSETTINGS first, and if it fails with -ENOTSUPP stick
1692+ * only to %ETHTOOL_GSET and %ETHTOOL_SSET consistently. If it
1693+ * succeeds, then users should stick to %ETHTOOL_GLINKSETTINGS and
1694+ * %ETHTOOL_SLINKSETTINGS (which would support drivers implementing
1695+ * either %ethtool_cmd or %ethtool_link_settings).
1696+ *
1697+ * Users should assume that all fields not marked read-only are
1698+ * writable and subject to validation by the driver. They should use
1699+ * %ETHTOOL_GLINKSETTINGS to get the current values before making specific
1700+ * changes and then applying them with %ETHTOOL_SLINKSETTINGS.
1701+ *
1702+ * Drivers that implement %get_link_ksettings and/or
1703+ * %set_link_ksettings should ignore the @cmd
1704+ * and @link_mode_masks_nwords fields (any change to them overwritten
1705+ * by kernel), and rely only on kernel's internal
1706+ * %__ETHTOOL_LINK_MODE_MASK_NBITS and
1707+ * %ethtool_link_mode_mask_t. Drivers that implement
1708+ * %set_link_ksettings() should validate all fields other than @cmd
1709+ * and @link_mode_masks_nwords that are not described as read-only or
1710+ * deprecated, and must ignore all fields described as read-only.
1711+ */
1712+struct ethtool_link_settings {
1713+ __u32 cmd;
1714+ __u32 speed;
1715+ __u8 duplex;
1716+ __u8 port;
1717+ __u8 phy_address;
1718+ __u8 autoneg;
1719+ __u8 mdio_support;
1720+ __u8 eth_tp_mdix;
1721+ __u8 eth_tp_mdix_ctrl;
1722+ __s8 link_mode_masks_nwords;
1723+ __u32 reserved[8];
1724+ __u32 link_mode_masks[0];
1725+ /* layout of link_mode_masks fields:
1726+ * __u32 map_supported[link_mode_masks_nwords];
1727+ * __u32 map_advertising[link_mode_masks_nwords];
1728+ * __u32 map_lp_advertising[link_mode_masks_nwords];
1729+ */
1730+};
14441731 #endif /* _UAPI_LINUX_ETHTOOL_H */
include/uapi/linux/fs.h+21−0
@@ -246,6 +246,24 @@ struct fsxattr { · 245 unmodified lines
246246 #define FS_IOC_FSGETXATTR _IOR ('X', 31, struct fsxattr)
247247 #define FS_IOC_FSSETXATTR _IOW ('X', 32, struct fsxattr)
248248
249+/*
250+ * File system encryption support
251+ */
252+/* Policy provided via an ioctl on the topmost directory */
253+#define FS_KEY_DESCRIPTOR_SIZE 8
254+
255+struct fscrypt_policy {
256+ __u8 version;
257+ __u8 contents_encryption_mode;
258+ __u8 filenames_encryption_mode;
259+ __u8 flags;
260+ __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE];
261+} __packed;
262+
263+#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy)
264+#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16])
265+#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy)
266+
249267 /*
250268 * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
251269 *
@@ -304,4 +322,7 @@ struct fsxattr { · 52 unmodified lines
304322 #define SYNC_FILE_RANGE_WRITE 2
305323 #define SYNC_FILE_RANGE_WAIT_AFTER 4
306324
325+/* flags for preadv2/pwritev2: */
326+#define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */
327+
307328 #endif /* _UAPI_LINUX_FS_H */
include/uapi/linux/genetlink.h+1−0
@@ -21,6 +21,7 @@ struct genlmsghdr { · 20 unmodified lines
2121 #define GENL_CMD_CAP_DO 0x02
2222 #define GENL_CMD_CAP_DUMP 0x04
2323 #define GENL_CMD_CAP_HASPOL 0x08
24+#define GENL_UNS_ADMIN_PERM 0x10
2425
2526 /*
2627 * List of reserved static generic netlink identifiers:
include/uapi/linux/gpio.h+58−0
@@ -0,0 +1,58 @@
1+/*
2+ * <linux/gpio.h> - userspace ABI for the GPIO character devices
3+ *
4+ * Copyright (C) 2015 Linus Walleij
5+ *
6+ * This program is free software; you can redistribute it and/or modify it
7+ * under the terms of the GNU General Public License version 2 as published by
8+ * the Free Software Foundation.
9+ */
10+#ifndef _UAPI_GPIO_H_
11+#define _UAPI_GPIO_H_
12+
13+#include <linux/ioctl.h>
14+#include <linux/types.h>
15+
16+/**
17+ * struct gpiochip_info - Information about a certain GPIO chip
18+ * @name: the Linux kernel name of this GPIO chip
19+ * @label: a functional name for this GPIO chip, such as a product
20+ * number, may be NULL
21+ * @lines: number of GPIO lines on this chip
22+ */
23+struct gpiochip_info {
24+ char name[32];
25+ char label[32];
26+ __u32 lines;
27+};
28+
29+/* Line is in use by the kernel */
30+#define GPIOLINE_FLAG_KERNEL (1UL << 0)
31+#define GPIOLINE_FLAG_IS_OUT (1UL << 1)
32+#define GPIOLINE_FLAG_ACTIVE_LOW (1UL << 2)
33+#define GPIOLINE_FLAG_OPEN_DRAIN (1UL << 3)
34+#define GPIOLINE_FLAG_OPEN_SOURCE (1UL << 4)
35+
36+/**
37+ * struct gpioline_info - Information about a certain GPIO line
38+ * @line_offset: the local offset on this GPIO device, fill this in when
39+ * requesting the line information from the kernel
40+ * @flags: various flags for this line
41+ * @name: the name of this GPIO line, such as the output pin of the line on the
42+ * chip, a rail or a pin header name on a board, as specified by the gpio
43+ * chip, may be NULL
44+ * @consumer: a functional name for the consumer of this GPIO line as set by
45+ * whatever is using it, will be NULL if there is no current user but may
46+ * also be NULL if the consumer doesn't set this up
47+ */
48+struct gpioline_info {
49+ __u32 line_offset;
50+ __u32 flags;
51+ char name[32];
52+ char consumer[32];
53+};
54+
55+#define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info)
56+#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)
57+
58+#endif /* _UAPI_GPIO_H_ */
include/uapi/linux/if.h+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 * are shared for all types of net_devices. The sysfs entries are available
3838 * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs
3939 * are annotated below, note that only a few flags can be toggled and some
40− * other flags are always always preserved from the original net_device flags
40+ * other flags are always preserved from the original net_device flags
4141 * even if you try to set them via sysfs. Flags which are always preserved
4242 * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile
4343 * are annotated below as such.
include/uapi/linux/if_bridge.h+35−2
@@ -137,11 +137,17 @@ struct bridge_vlan_info { · 136 unmodified lines
137137 /* Bridge multicast database attributes
138138 * [MDBA_MDB] = {
139139 * [MDBA_MDB_ENTRY] = {
140− * [MDBA_MDB_ENTRY_INFO]
140+ * [MDBA_MDB_ENTRY_INFO] {
141+ * struct br_mdb_entry
142+ * [MDBA_MDB_EATTR attributes]
143+ * }
141144 * }
142145 * }
143146 * [MDBA_ROUTER] = {
144− * [MDBA_ROUTER_PORT]
147+ * [MDBA_ROUTER_PORT] = {
148+ * u32 ifindex
149+ * [MDBA_ROUTER_PATTR attributes]
150+ * }
145151 * }
146152 */
147153 enum {
@@ -166,6 +172,22 @@ enum { · 18 unmodified lines
166172 };
167173 #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
168174
175+/* per mdb entry additional attributes */
176+enum {
177+ MDBA_MDB_EATTR_UNSPEC,
178+ MDBA_MDB_EATTR_TIMER,
179+ __MDBA_MDB_EATTR_MAX
180+};
181+#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
182+
183+/* multicast router types */
184+enum {
185+ MDB_RTR_TYPE_DISABLED,
186+ MDB_RTR_TYPE_TEMP_QUERY,
187+ MDB_RTR_TYPE_PERM,
188+ MDB_RTR_TYPE_TEMP
189+};
190+
169191 enum {
170192 MDBA_ROUTER_UNSPEC,
171193 MDBA_ROUTER_PORT,
@@ -173,6 +195,15 @@ enum { · 1 unmodified line
173195 };
174196 #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
175197
198+/* router port attributes */
199+enum {
200+ MDBA_ROUTER_PATTR_UNSPEC,
201+ MDBA_ROUTER_PATTR_TIMER,
202+ MDBA_ROUTER_PATTR_TYPE,
203+ __MDBA_ROUTER_PATTR_MAX
204+};
205+#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
206+
176207 struct br_port_msg {
177208 __u8 family;
178209 __u32 ifindex;
@@ -183,6 +214,8 @@ struct br_mdb_entry { · 4 unmodified lines
183214 #define MDB_TEMPORARY 0
184215 #define MDB_PERMANENT 1
185216 __u8 state;
217+#define MDB_FLAGS_OFFLOAD (1 << 0)
218+ __u8 flags;
186219 __u16 vid;
187220 struct {
188221 union {
include/uapi/linux/if_ether.h+1−0
@@ -83,6 +83,7 @@ · 82 unmodified lines
8383 #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */
8484 #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */
8585 #define ETH_P_TIPC 0x88CA /* TIPC */
86+#define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */
8687 #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
8788 #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
8889 #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
include/uapi/linux/if_link.h+52−0
@@ -35,6 +35,8 @@ struct rtnl_link_stats { · 34 unmodified lines
3535 /* for cslip etc */
3636 __u32 rx_compressed;
3737 __u32 tx_compressed;
38+
39+ __u32 rx_nohandler; /* dropped, no handler found */
3840 };
3941
4042 /* The main device statistics structure */
@@ -68,6 +70,8 @@ struct rtnl_link_stats64 { · 27 unmodified lines
6870 /* for cslip etc */
6971 __u64 rx_compressed;
7072 __u64 tx_compressed;
73+
74+ __u64 rx_nohandler; /* dropped, no handler found */
7175 };
7276
7377 /* The struct should be in sync with struct ifmap */
@@ -149,6 +153,8 @@ enum { · 75 unmodified lines
149153 IFLA_LINK_NETNSID,
150154 IFLA_PHYS_PORT_NAME,
151155 IFLA_PROTO_DOWN,
156+ IFLA_GSO_MAX_SEGS,
157+ IFLA_GSO_MAX_SIZE,
152158 __IFLA_MAX
153159 };
154160
@@ -401,6 +407,43 @@ enum { · 246 unmodified lines
401407
402408 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
403409
410+enum {
411+ IFLA_VRF_PORT_UNSPEC,
412+ IFLA_VRF_PORT_TABLE,
413+ __IFLA_VRF_PORT_MAX
414+};
415+
416+#define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
417+
418+/* MACSEC section */
419+enum {
420+ IFLA_MACSEC_UNSPEC,
421+ IFLA_MACSEC_SCI,
422+ IFLA_MACSEC_PORT,
423+ IFLA_MACSEC_ICV_LEN,
424+ IFLA_MACSEC_CIPHER_SUITE,
425+ IFLA_MACSEC_WINDOW,
426+ IFLA_MACSEC_ENCODING_SA,
427+ IFLA_MACSEC_ENCRYPT,
428+ IFLA_MACSEC_PROTECT,
429+ IFLA_MACSEC_INC_SCI,
430+ IFLA_MACSEC_ES,
431+ IFLA_MACSEC_SCB,
432+ IFLA_MACSEC_REPLAY_PROTECT,
433+ IFLA_MACSEC_VALIDATION,
434+ __IFLA_MACSEC_MAX,
435+};
436+
437+#define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
438+
439+enum macsec_validation_type {
440+ MACSEC_VALIDATE_DISABLED = 0,
441+ MACSEC_VALIDATE_CHECK = 1,
442+ MACSEC_VALIDATE_STRICT = 2,
443+ __MACSEC_VALIDATE_END,
444+ MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
445+};
446+
404447 /* IPVLAN section */
405448 enum {
406449 IFLA_IPVLAN_UNSPEC,
@@ -444,6 +487,7 @@ enum { · 37 unmodified lines
444487 IFLA_VXLAN_GBP,
445488 IFLA_VXLAN_REMCSUM_NOPARTIAL,
446489 IFLA_VXLAN_COLLECT_METADATA,
490+ IFLA_VXLAN_LABEL,
447491 __IFLA_VXLAN_MAX
448492 };
449493 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
@@ -466,6 +510,7 @@ enum { · 16 unmodified lines
466510 IFLA_GENEVE_UDP_CSUM,
467511 IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
468512 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
513+ IFLA_GENEVE_LABEL,
469514 __IFLA_GENEVE_MAX
470515 };
471516 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
@@ -556,6 +601,8 @@ enum { · 84 unmodified lines
556601 */
557602 IFLA_VF_STATS, /* network device statistics */
558603 IFLA_VF_TRUST, /* Trust VF */
604+ IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */
605+ IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */
559606 __IFLA_VF_MAX,
560607 };
561608
@@ -588,6 +635,11 @@ struct ifla_vf_spoofchk { · 26 unmodified lines
588635 __u32 setting;
589636 };
590637
638+struct ifla_vf_guid {
639+ __u32 vf;
640+ __u64 guid;
641+};
642+
591643 enum {
592644 IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */
593645 IFLA_VF_LINK_STATE_ENABLE, /* link always up */
include/uapi/linux/if_macsec.h+161−0
@@ -0,0 +1,161 @@
1+/*
2+ * include/uapi/linux/if_macsec.h - MACsec device
3+ *
4+ * Copyright (c) 2015 Sabrina Dubroca <sd@queasysnail.net>
5+ *
6+ * This program is free software; you can redistribute it and/or modify
7+ * it under the terms of the GNU General Public License as published by
8+ * the Free Software Foundation; either version 2 of the License, or
9+ * (at your option) any later version.
10+ */
11+
12+#ifndef _UAPI_MACSEC_H
13+#define _UAPI_MACSEC_H
14+
15+#include <linux/types.h>
16+
17+#define MACSEC_GENL_NAME "macsec"
18+#define MACSEC_GENL_VERSION 1
19+
20+#define MACSEC_MAX_KEY_LEN 128
21+
22+#define DEFAULT_CIPHER_ID 0x0080020001000001ULL
23+#define DEFAULT_CIPHER_ALT 0x0080C20001000001ULL
24+
25+#define MACSEC_MIN_ICV_LEN 8
26+#define MACSEC_MAX_ICV_LEN 32
27+
28+enum macsec_attrs {
29+ MACSEC_ATTR_UNSPEC,
30+ MACSEC_ATTR_IFINDEX, /* u32, ifindex of the MACsec netdevice */
31+ MACSEC_ATTR_RXSC_CONFIG, /* config, nested macsec_rxsc_attrs */
32+ MACSEC_ATTR_SA_CONFIG, /* config, nested macsec_sa_attrs */
33+ MACSEC_ATTR_SECY, /* dump, nested macsec_secy_attrs */
34+ MACSEC_ATTR_TXSA_LIST, /* dump, nested, macsec_sa_attrs for each TXSA */
35+ MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */
36+ MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */
37+ MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */
38+ __MACSEC_ATTR_END,
39+ NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
40+ MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
41+};
42+
43+enum macsec_secy_attrs {
44+ MACSEC_SECY_ATTR_UNSPEC,
45+ MACSEC_SECY_ATTR_SCI,
46+ MACSEC_SECY_ATTR_ENCODING_SA,
47+ MACSEC_SECY_ATTR_WINDOW,
48+ MACSEC_SECY_ATTR_CIPHER_SUITE,
49+ MACSEC_SECY_ATTR_ICV_LEN,
50+ MACSEC_SECY_ATTR_PROTECT,
51+ MACSEC_SECY_ATTR_REPLAY,
52+ MACSEC_SECY_ATTR_OPER,
53+ MACSEC_SECY_ATTR_VALIDATE,
54+ MACSEC_SECY_ATTR_ENCRYPT,
55+ MACSEC_SECY_ATTR_INC_SCI,
56+ MACSEC_SECY_ATTR_ES,
57+ MACSEC_SECY_ATTR_SCB,
58+ __MACSEC_SECY_ATTR_END,
59+ NUM_MACSEC_SECY_ATTR = __MACSEC_SECY_ATTR_END,
60+ MACSEC_SECY_ATTR_MAX = __MACSEC_SECY_ATTR_END - 1,
61+};
62+
63+enum macsec_rxsc_attrs {
64+ MACSEC_RXSC_ATTR_UNSPEC,
65+ MACSEC_RXSC_ATTR_SCI, /* config/dump, u64 */
66+ MACSEC_RXSC_ATTR_ACTIVE, /* config/dump, u8 0..1 */
67+ MACSEC_RXSC_ATTR_SA_LIST, /* dump, nested */
68+ MACSEC_RXSC_ATTR_STATS, /* dump, nested, macsec_rxsc_stats_attr */
69+ __MACSEC_RXSC_ATTR_END,
70+ NUM_MACSEC_RXSC_ATTR = __MACSEC_RXSC_ATTR_END,
71+ MACSEC_RXSC_ATTR_MAX = __MACSEC_RXSC_ATTR_END - 1,
72+};
73+
74+enum macsec_sa_attrs {
75+ MACSEC_SA_ATTR_UNSPEC,
76+ MACSEC_SA_ATTR_AN, /* config/dump, u8 0..3 */
77+ MACSEC_SA_ATTR_ACTIVE, /* config/dump, u8 0..1 */
78+ MACSEC_SA_ATTR_PN, /* config/dump, u32 */
79+ MACSEC_SA_ATTR_KEY, /* config, data */
80+ MACSEC_SA_ATTR_KEYID, /* config/dump, u64 */
81+ MACSEC_SA_ATTR_STATS, /* dump, nested, macsec_sa_stats_attr */
82+ __MACSEC_SA_ATTR_END,
83+ NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END,
84+ MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
85+};
86+
87+enum macsec_nl_commands {
88+ MACSEC_CMD_GET_TXSC,
89+ MACSEC_CMD_ADD_RXSC,
90+ MACSEC_CMD_DEL_RXSC,
91+ MACSEC_CMD_UPD_RXSC,
92+ MACSEC_CMD_ADD_TXSA,
93+ MACSEC_CMD_DEL_TXSA,
94+ MACSEC_CMD_UPD_TXSA,
95+ MACSEC_CMD_ADD_RXSA,
96+ MACSEC_CMD_DEL_RXSA,
97+ MACSEC_CMD_UPD_RXSA,
98+};
99+
100+/* u64 per-RXSC stats */
101+enum macsec_rxsc_stats_attr {
102+ MACSEC_RXSC_STATS_ATTR_UNSPEC,
103+ MACSEC_RXSC_STATS_ATTR_IN_OCTETS_VALIDATED,
104+ MACSEC_RXSC_STATS_ATTR_IN_OCTETS_DECRYPTED,
105+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_UNCHECKED,
106+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_DELAYED,
107+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_OK,
108+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_INVALID,
109+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_LATE,
110+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_NOT_VALID,
111+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_NOT_USING_SA,
112+ MACSEC_RXSC_STATS_ATTR_IN_PKTS_UNUSED_SA,
113+ __MACSEC_RXSC_STATS_ATTR_END,
114+ NUM_MACSEC_RXSC_STATS_ATTR = __MACSEC_RXSC_STATS_ATTR_END,
115+ MACSEC_RXSC_STATS_ATTR_MAX = __MACSEC_RXSC_STATS_ATTR_END - 1,
116+};
117+
118+/* u32 per-{RX,TX}SA stats */
119+enum macsec_sa_stats_attr {
120+ MACSEC_SA_STATS_ATTR_UNSPEC,
121+ MACSEC_SA_STATS_ATTR_IN_PKTS_OK,
122+ MACSEC_SA_STATS_ATTR_IN_PKTS_INVALID,
123+ MACSEC_SA_STATS_ATTR_IN_PKTS_NOT_VALID,
124+ MACSEC_SA_STATS_ATTR_IN_PKTS_NOT_USING_SA,
125+ MACSEC_SA_STATS_ATTR_IN_PKTS_UNUSED_SA,
126+ MACSEC_SA_STATS_ATTR_OUT_PKTS_PROTECTED,
127+ MACSEC_SA_STATS_ATTR_OUT_PKTS_ENCRYPTED,
128+ __MACSEC_SA_STATS_ATTR_END,
129+ NUM_MACSEC_SA_STATS_ATTR = __MACSEC_SA_STATS_ATTR_END,
130+ MACSEC_SA_STATS_ATTR_MAX = __MACSEC_SA_STATS_ATTR_END - 1,
131+};
132+
133+/* u64 per-TXSC stats */
134+enum macsec_txsc_stats_attr {
135+ MACSEC_TXSC_STATS_ATTR_UNSPEC,
136+ MACSEC_TXSC_STATS_ATTR_OUT_PKTS_PROTECTED,
137+ MACSEC_TXSC_STATS_ATTR_OUT_PKTS_ENCRYPTED,
138+ MACSEC_TXSC_STATS_ATTR_OUT_OCTETS_PROTECTED,
139+ MACSEC_TXSC_STATS_ATTR_OUT_OCTETS_ENCRYPTED,
140+ __MACSEC_TXSC_STATS_ATTR_END,
141+ NUM_MACSEC_TXSC_STATS_ATTR = __MACSEC_TXSC_STATS_ATTR_END,
142+ MACSEC_TXSC_STATS_ATTR_MAX = __MACSEC_TXSC_STATS_ATTR_END - 1,
143+};
144+
145+/* u64 per-SecY stats */
146+enum macsec_secy_stats_attr {
147+ MACSEC_SECY_STATS_ATTR_UNSPEC,
148+ MACSEC_SECY_STATS_ATTR_OUT_PKTS_UNTAGGED,
149+ MACSEC_SECY_STATS_ATTR_IN_PKTS_UNTAGGED,
150+ MACSEC_SECY_STATS_ATTR_OUT_PKTS_TOO_LONG,
151+ MACSEC_SECY_STATS_ATTR_IN_PKTS_NO_TAG,
152+ MACSEC_SECY_STATS_ATTR_IN_PKTS_BAD_TAG,
153+ MACSEC_SECY_STATS_ATTR_IN_PKTS_UNKNOWN_SCI,
154+ MACSEC_SECY_STATS_ATTR_IN_PKTS_NO_SCI,
155+ MACSEC_SECY_STATS_ATTR_IN_PKTS_OVERRUN,
156+ __MACSEC_SECY_STATS_ATTR_END,
157+ NUM_MACSEC_SECY_STATS_ATTR = __MACSEC_SECY_STATS_ATTR_END,
158+ MACSEC_SECY_STATS_ATTR_MAX = __MACSEC_SECY_STATS_ATTR_END - 1,
159+};
160+
161+#endif /* _UAPI_MACSEC_H */
include/uapi/linux/iio/types.h+1−0
@@ -37,6 +37,7 @@ enum iio_chan_type { · 36 unmodified lines
3737 IIO_VELOCITY,
3838 IIO_CONCENTRATION,
3939 IIO_RESISTANCE,
40+ IIO_PH,
4041 };
4142
4243 enum iio_modifier {
include/uapi/linux/input.h+1−0
@@ -246,6 +246,7 @@ struct input_mask { · 245 unmodified lines
246246 #define BUS_GSC 0x1A
247247 #define BUS_ATARI 0x1B
248248 #define BUS_SPI 0x1C
249+#define BUS_RMI 0x1D
249250
250251 /*
251252 * MT_TOOL types
include/uapi/linux/ip.h+2−0
@@ -165,6 +165,8 @@ enum · 164 unmodified lines
165165 IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,
166166 IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
167167 IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
168+ IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
169+ IPV4_DEVCONF_DROP_GRATUITOUS_ARP,
168170 __IPV4_DEVCONF_MAX
169171 };
170172
include/uapi/linux/ipv6.h+3−0
@@ -174,6 +174,9 @@ enum { · 173 unmodified lines
174174 DEVCONF_USE_OIF_ADDRS_ONLY,
175175 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
176176 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
177+ DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
178+ DEVCONF_DROP_UNSOLICITED_NA,
179+ DEVCONF_KEEP_ADDR_ON_DOWN,
177180 DEVCONF_MAX
178181 };
179182
include/uapi/linux/kcm.h+40−0
@@ -0,0 +1,40 @@
1+/*
2+ * Kernel Connection Multiplexor
3+ *
4+ * Copyright (c) 2016 Tom Herbert <tom@herbertland.com>
5+ *
6+ * This program is free software; you can redistribute it and/or modify
7+ * it under the terms of the GNU General Public License version 2
8+ * as published by the Free Software Foundation.
9+ *
10+ * User API to clone KCM sockets and attach transport socket to a KCM
11+ * multiplexor.
12+ */
13+
14+#ifndef KCM_KERNEL_H
15+#define KCM_KERNEL_H
16+
17+struct kcm_attach {
18+ int fd;
19+ int bpf_fd;
20+};
21+
22+struct kcm_unattach {
23+ int fd;
24+};
25+
26+struct kcm_clone {
27+ int fd;
28+};
29+
30+#define SIOCKCMATTACH (SIOCPROTOPRIVATE + 0)
31+#define SIOCKCMUNATTACH (SIOCPROTOPRIVATE + 1)
32+#define SIOCKCMCLONE (SIOCPROTOPRIVATE + 2)
33+
34+#define KCMPROTO_CONNECTED 0
35+
36+/* Socket options */
37+#define KCM_RECV_DISABLE 1
38+
39+#endif
40+
include/uapi/linux/kcov.h+10−0
@@ -0,0 +1,10 @@
1+#ifndef _LINUX_KCOV_IOCTLS_H
2+#define _LINUX_KCOV_IOCTLS_H
3+
4+#include <linux/types.h>
5+
6+#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
7+#define KCOV_ENABLE _IO('c', 100)
8+#define KCOV_DISABLE _IO('c', 101)
9+
10+#endif /* _LINUX_KCOV_IOCTLS_H */
include/uapi/linux/kernel.h+1−0
@@ -9,5 +9,6 @@ · 8 unmodified lines
99 #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
1010 #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
1111
12+#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
1213
1314 #endif /* _UAPI_LINUX_KERNEL_H */
include/uapi/linux/kvm.h+18−1
@@ -157,6 +157,7 @@ struct kvm_s390_skeys { · 156 unmodified lines
157157
158158 struct kvm_hyperv_exit {
159159 #define KVM_EXIT_HYPERV_SYNIC 1
160+#define KVM_EXIT_HYPERV_HCALL 2
160161 __u32 type;
161162 union {
162163 struct {
@@ -165,6 +166,11 @@ struct kvm_hyperv_exit { · 2 unmodified lines
165166 __u64 evt_page;
166167 __u64 msg_page;
167168 } synic;
169+ struct {
170+ __u64 input;
171+ __u64 result;
172+ __u64 params[2];
173+ } hcall;
168174 } u;
169175 };
170176
@@ -541,7 +547,13 @@ struct kvm_s390_pgm_info { · 370 unmodified lines
541547 __u8 exc_access_id;
542548 __u8 per_access_id;
543549 __u8 op_access_id;
544− __u8 pad[3];
550+#define KVM_S390_PGM_FLAGS_ILC_VALID 0x01
551+#define KVM_S390_PGM_FLAGS_ILC_0 0x02
552+#define KVM_S390_PGM_FLAGS_ILC_1 0x04
553+#define KVM_S390_PGM_FLAGS_ILC_MASK 0x06
554+#define KVM_S390_PGM_FLAGS_NO_REWIND 0x08
555+ __u8 flags;
556+ __u8 pad[2];
545557 };
546558
547559 struct kvm_s390_prefix_info {
@@ -850,6 +862,9 @@ struct kvm_ppc_smmu_info { · 302 unmodified lines
850862 #define KVM_CAP_IOEVENTFD_ANY_LENGTH 122
851863 #define KVM_CAP_HYPERV_SYNIC 123
852864 #define KVM_CAP_S390_RI 124
865+#define KVM_CAP_SPAPR_TCE_64 125
866+#define KVM_CAP_ARM_PMU_V3 126
867+#define KVM_CAP_VCPU_ATTRIBUTES 127
853868
854869 #ifdef KVM_CAP_IRQ_ROUTING
855870
@@ -1142,6 +1157,8 @@ struct kvm_s390_ucas_mapping { · 286 unmodified lines
11421157 /* Available with KVM_CAP_PPC_ALLOC_HTAB */
11431158 #define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)
11441159 #define KVM_CREATE_SPAPR_TCE _IOW(KVMIO, 0xa8, struct kvm_create_spapr_tce)
1160+#define KVM_CREATE_SPAPR_TCE_64 _IOW(KVMIO, 0xa8, \
1161+ struct kvm_create_spapr_tce_64)
11451162 /* Available with KVM_CAP_RMA */
11461163 #define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma)
11471164 /* Available with KVM_CAP_PPC_HTAB_FD */
include/uapi/linux/media.h+33−12
@@ -78,6 +78,22 @@ struct media_device_info { · 77 unmodified lines
7878 #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002)
7979 #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003)
8080
81+/*
82+ * Analog TV IF-PLL decoders
83+ *
84+ * It is a responsibility of the master/bridge drivers to create links
85+ * for MEDIA_ENT_F_IF_VID_DECODER and MEDIA_ENT_F_IF_AUD_DECODER.
86+ */
87+#define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 0x02001)
88+#define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 0x02002)
89+
90+/*
91+ * Audio Entity Functions
92+ */
93+#define MEDIA_ENT_F_AUDIO_CAPTURE (MEDIA_ENT_F_BASE + 0x03001)
94+#define MEDIA_ENT_F_AUDIO_PLAYBACK (MEDIA_ENT_F_BASE + 0x03002)
95+#define MEDIA_ENT_F_AUDIO_MIXER (MEDIA_ENT_F_BASE + 0x03003)
96+
8197 /*
8298 * Connectors
8399 */
@@ -113,8 +129,12 @@ struct media_device_info { · 29 unmodified lines
113129 #define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3)
114130 #define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4)
115131 /*
116− * It is a responsibility of the entity drivers to add connectors and links
117− * for the tuner entities.
132+ * It is a responsibility of the master/bridge drivers to add connectors
133+ * and links for MEDIA_ENT_F_TUNER. Please notice that some old tuners
134+ * may require the usage of separate I2C chips to decode analog TV signals,
135+ * when the master/bridge chipset doesn't have its own TV standard decoder.
136+ * On such cases, the IF-PLL staging is mapped via one or two entities:
137+ * MEDIA_ENT_F_IF_VID_DECODER and/or MEDIA_ENT_F_IF_AUD_DECODER.
118138 */
119139 #define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5)
120140
@@ -262,6 +282,7 @@ struct media_links_enum { · 141 unmodified lines
262282
263283 #define MEDIA_INTF_T_DVB_BASE 0x00000100
264284 #define MEDIA_INTF_T_V4L_BASE 0x00000200
285+#define MEDIA_INTF_T_ALSA_BASE 0x00000300
265286
266287 /* Interface types */
267288
@@ -277,6 +298,15 @@ struct media_links_enum { · 9 unmodified lines
277298 #define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3)
278299 #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
279300
301+#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
302+#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
303+#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2)
304+#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3)
305+#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)
306+#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)
307+#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6)
308+#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7)
309+
280310 /*
281311 * MC next gen API definitions
282312 *
@@ -296,7 +326,7 @@ struct media_links_enum { · 13 unmodified lines
296326 * later, before the adding this API upstream.
297327 */
298328
299−#if 0 /* Let's postpone it to Kernel 4.6 */
329+
300330 struct media_v2_entity {
301331 __u32 id;
302332 char name[64]; /* FIXME: move to a property? (RFC says so) */
@@ -357,21 +387,12 @@ struct media_v2_topology { · 54 unmodified lines
357387 __u64 ptr_links;
358388 } __attribute__ ((packed));
359389
360−static inline void __user *media_get_uptr(__u64 arg)
361−{
362− return (void __user *)(uintptr_t)arg;
363−}
364−#endif
365−
366390 /* ioctls */
367391
368392 #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)
369393 #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
370394 #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
371395 #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
372−
373−#if 0 /* Let's postpone it to Kernel 4.6 */
374396 #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
375−#endif
376397
377398 #endif /* __LINUX_MEDIA_H */
include/uapi/linux/mroute6.h+2−7
@@ -1,6 +1,7 @@
11 #ifndef _UAPI__LINUX_MROUTE6_H
22 #define _UAPI__LINUX_MROUTE6_H
33
4+#include <linux/kernel.h>
45 #include <linux/types.h>
56 #include <linux/sockios.h>
67
@@ -46,14 +47,8 @@ typedef unsigned short mifi_t; · 39 unmodified lines
4647 typedef __u32 if_mask;
4748 #define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */
4849
49−#if !defined(__KERNEL__)
50−#if !defined(DIV_ROUND_UP)
51−#define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y))
52−#endif
53−#endif
54−
5550 typedef struct if_set {
56− if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
51+ if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
5752 } if_set;
5853
5954 #define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))
include/uapi/linux/ndctl.h+13−0
@@ -98,6 +98,14 @@ struct nd_cmd_ars_status { · 97 unmodified lines
9898 } __packed records[0];
9999 } __packed;
100100
101+struct nd_cmd_clear_error {
102+ __u64 address;
103+ __u64 length;
104+ __u32 status;
105+ __u8 reserved[4];
106+ __u64 cleared;
107+} __packed;
108+
101109 enum {
102110 ND_CMD_IMPLEMENTED = 0,
103111
@@ -105,6 +113,7 @@ enum { · 1 unmodified line
105113 ND_CMD_ARS_CAP = 1,
106114 ND_CMD_ARS_START = 2,
107115 ND_CMD_ARS_STATUS = 3,
116+ ND_CMD_CLEAR_ERROR = 4,
108117
109118 /* per-dimm commands */
110119 ND_CMD_SMART = 1,
@@ -129,6 +138,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) · 18 unmodified lines
129138 [ND_CMD_ARS_CAP] = "ars_cap",
130139 [ND_CMD_ARS_START] = "ars_start",
131140 [ND_CMD_ARS_STATUS] = "ars_status",
141+ [ND_CMD_CLEAR_ERROR] = "clear_error",
132142 };
133143
134144 if (cmd < ARRAY_SIZE(names) && names[cmd])
@@ -187,6 +197,9 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) · 52 unmodified lines
187197 #define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\
188198 struct nd_cmd_ars_status)
189199
200+#define ND_IOCTL_CLEAR_ERROR _IOWR(ND_IOCTL, ND_CMD_CLEAR_ERROR,\
201+ struct nd_cmd_clear_error)
202+
190203 #define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */
191204 #define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */
192205 #define ND_DEVICE_REGION_BLK 3 /* nd_region: (parent of BLK namespaces) */
include/uapi/linux/netconf.h+1−0
@@ -19,6 +19,7 @@ enum { · 18 unmodified lines
1919 __NETCONFA_MAX
2020 };
2121 #define NETCONFA_MAX (__NETCONFA_MAX - 1)
22+#define NETCONFA_ALL -1
2223
2324 #define NETCONFA_IFINDEX_ALL -1
2425 #define NETCONFA_IFINDEX_DEFAULT -2
include/uapi/linux/netfilter/nf_conntrack_common.h+9−3
@@ -20,9 +20,15 @@ enum ip_conntrack_info { · 19 unmodified lines
2020
2121 IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY,
2222 IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY,
23− IP_CT_NEW_REPLY = IP_CT_NEW + IP_CT_IS_REPLY,
24− /* Number of distinct IP_CT types (no NEW in reply dirn). */
25− IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
23+ /* No NEW in reply direction. */
24+
25+ /* Number of distinct IP_CT types. */
26+ IP_CT_NUMBER,
27+
28+ /* only for userspace compatibility */
29+#ifndef __KERNEL__
30+ IP_CT_NEW_REPLY = IP_CT_NUMBER,
31+#endif
2632 };
2733
2834 #define NF_CT_STATE_INVALID_BIT (1 << 0)
include/uapi/linux/netfilter/nf_tables.h+6−0
@@ -681,6 +681,7 @@ enum nft_exthdr_attributes { · 680 unmodified lines
681681 * @NFT_META_IIFGROUP: packet input interface group
682682 * @NFT_META_OIFGROUP: packet output interface group
683683 * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid)
684+ * @NFT_META_PRANDOM: a 32bit pseudo-random number
684685 */
685686 enum nft_meta_keys {
686687 NFT_META_LEN,
@@ -707,6 +708,7 @@ enum nft_meta_keys { · 20 unmodified lines
707708 NFT_META_IIFGROUP,
708709 NFT_META_OIFGROUP,
709710 NFT_META_CGROUP,
711+ NFT_META_PRANDOM,
710712 };
711713
712714 /**
@@ -949,10 +951,14 @@ enum nft_nat_attributes { · 236 unmodified lines
949951 * enum nft_masq_attributes - nf_tables masquerade expression attributes
950952 *
951953 * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
954+ * @NFTA_MASQ_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
955+ * @NFTA_MASQ_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
952956 */
953957 enum nft_masq_attributes {
954958 NFTA_MASQ_UNSPEC,
955959 NFTA_MASQ_FLAGS,
960+ NFTA_MASQ_REG_PROTO_MIN,
961+ NFTA_MASQ_REG_PROTO_MAX,
956962 __NFTA_MASQ_MAX
957963 };
958964 #define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
include/uapi/linux/netlink.h+4−0
@@ -107,8 +107,10 @@ struct nlmsgerr { · 106 unmodified lines
107107 #define NETLINK_PKTINFO 3
108108 #define NETLINK_BROADCAST_ERROR 4
109109 #define NETLINK_NO_ENOBUFS 5
110+#ifndef __KERNEL__
110111 #define NETLINK_RX_RING 6
111112 #define NETLINK_TX_RING 7
113+#endif
112114 #define NETLINK_LISTEN_ALL_NSID 8
113115 #define NETLINK_LIST_MEMBERSHIPS 9
114116 #define NETLINK_CAP_ACK 10
@@ -134,6 +136,7 @@ struct nl_mmap_hdr { · 19 unmodified lines
134136 __u32 nm_gid;
135137 };
136138
139+#ifndef __KERNEL__
137140 enum nl_mmap_status {
138141 NL_MMAP_STATUS_UNUSED,
139142 NL_MMAP_STATUS_RESERVED,
@@ -145,6 +148,7 @@ enum nl_mmap_status { · 5 unmodified lines
145148 #define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO
146149 #define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
147150 #define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
151+#endif
148152
149153 #define NET_MAJOR 36 /* Major 36 is reserved for networking */
150154
include/uapi/linux/netlink_diag.h+2−0
@@ -48,6 +48,8 @@ enum { · 47 unmodified lines
4848
4949 #define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */
5050 #define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */
51+#ifndef __KERNEL__
5152 #define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */
53+#endif
5254
5355 #endif
include/uapi/linux/nl80211.h+14−0
@@ -1727,6 +1727,8 @@ enum nl80211_commands { · 1726 unmodified lines
17271727 * underlying device supports these minimal RRM features:
17281728 * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,
17291729 * %NL80211_FEATURE_QUIET,
1730+ * Or, if global RRM is supported, see:
1731+ * %NL80211_EXT_FEATURE_RRM
17301732 * If this flag is used, driver must add the Power Capabilities IE to the
17311733 * association request. In addition, it must also set the RRM capability
17321734 * flag in the association request's Capability Info field.
@@ -1789,6 +1791,10 @@ enum nl80211_commands { · 56 unmodified lines
17891791 * thus it must not specify the number of iterations, only the interval
17901792 * between scans. The scan plans are executed sequentially.
17911793 * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan.
1794+ * @NL80211_ATTR_PBSS: flag attribute. If set it means operate
1795+ * in a PBSS. Specified in %NL80211_CMD_CONNECT to request
1796+ * connecting to a PCP, and in %NL80211_CMD_START_AP to start
1797+ * a PCP instead of AP. Relevant for DMG networks only.
17921798 *
17931799 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
17941800 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2164,6 +2170,8 @@ enum nl80211_attrs { · 369 unmodified lines
21642170 NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS,
21652171 NL80211_ATTR_SCHED_SCAN_PLANS,
21662172
2173+ NL80211_ATTR_PBSS,
2174+
21672175 /* add attributes here, update the policy in nl80211.c */
21682176
21692177 __NL80211_ATTR_AFTER_LAST,
@@ -4396,12 +4404,18 @@ enum nl80211_feature_flags { · 2226 unmodified lines
43964404 /**
43974405 * enum nl80211_ext_feature_index - bit index of extended features.
43984406 * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.
4407+ * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can
4408+ * can request to use RRM (see %NL80211_ATTR_USE_RRM) with
4409+ * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
4410+ * the ASSOC_REQ_USE_RRM flag in the association request even if
4411+ * NL80211_FEATURE_QUIET is not advertized.
43994412 *
44004413 * @NUM_NL80211_EXT_FEATURES: number of extended features.
44014414 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
44024415 */
44034416 enum nl80211_ext_feature_index {
44044417 NL80211_EXT_FEATURE_VHT_IBSS,
4418+ NL80211_EXT_FEATURE_RRM,
44054419
44064420 /* add new features before the definition below */
44074421 NUM_NL80211_EXT_FEATURES,
include/uapi/linux/openvswitch.h+49−0
@@ -454,6 +454,14 @@ struct ovs_key_ct_labels { · 453 unmodified lines
454454 #define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */
455455 #define OVS_CS_F_INVALID 0x10 /* Could not track connection. */
456456 #define OVS_CS_F_TRACKED 0x20 /* Conntrack has occurred. */
457+#define OVS_CS_F_SRC_NAT 0x40 /* Packet's source address/port was
458+ * mangled by NAT.
459+ */
460+#define OVS_CS_F_DST_NAT 0x80 /* Packet's destination address/port
461+ * was mangled by NAT.
462+ */
463+
464+#define OVS_CS_F_NAT_MASK (OVS_CS_F_SRC_NAT | OVS_CS_F_DST_NAT)
457465
458466 /**
459467 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
@@ -632,6 +640,8 @@ struct ovs_action_hash { · 172 unmodified lines
632640 * mask. For each bit set in the mask, the corresponding bit in the value is
633641 * copied to the connection tracking label field in the connection.
634642 * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG.
643+ * @OVS_CT_ATTR_NAT: Nested OVS_NAT_ATTR_* for performing L3 network address
644+ * translation (NAT) on the packet.
635645 */
636646 enum ovs_ct_attr {
637647 OVS_CT_ATTR_UNSPEC,
@@ -641,11 +651,50 @@ enum ovs_ct_attr { · 3 unmodified lines
641651 OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */
642652 OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of
643653 related connections. */
654+ OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */
644655 __OVS_CT_ATTR_MAX
645656 };
646657
647658 #define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)
648659
660+/**
661+ * enum ovs_nat_attr - Attributes for %OVS_CT_ATTR_NAT.
662+ *
663+ * @OVS_NAT_ATTR_SRC: Flag for Source NAT (mangle source address/port).
664+ * @OVS_NAT_ATTR_DST: Flag for Destination NAT (mangle destination
665+ * address/port). Only one of (@OVS_NAT_ATTR_SRC, @OVS_NAT_ATTR_DST) may be
666+ * specified. Effective only for packets for ct_state NEW connections.
667+ * Packets of committed connections are mangled by the NAT action according to
668+ * the committed NAT type regardless of the flags specified. As a corollary, a
669+ * NAT action without a NAT type flag will only mangle packets of committed
670+ * connections. The following NAT attributes only apply for NEW
671+ * (non-committed) connections, and they may be included only when the CT
672+ * action has the @OVS_CT_ATTR_COMMIT flag and either @OVS_NAT_ATTR_SRC or
673+ * @OVS_NAT_ATTR_DST is also included.
674+ * @OVS_NAT_ATTR_IP_MIN: struct in_addr or struct in6_addr
675+ * @OVS_NAT_ATTR_IP_MAX: struct in_addr or struct in6_addr
676+ * @OVS_NAT_ATTR_PROTO_MIN: u16 L4 protocol specific lower boundary (port)
677+ * @OVS_NAT_ATTR_PROTO_MAX: u16 L4 protocol specific upper boundary (port)
678+ * @OVS_NAT_ATTR_PERSISTENT: Flag for persistent IP mapping across reboots
679+ * @OVS_NAT_ATTR_PROTO_HASH: Flag for pseudo random L4 port mapping (MD5)
680+ * @OVS_NAT_ATTR_PROTO_RANDOM: Flag for fully randomized L4 port mapping
681+ */
682+enum ovs_nat_attr {
683+ OVS_NAT_ATTR_UNSPEC,
684+ OVS_NAT_ATTR_SRC,
685+ OVS_NAT_ATTR_DST,
686+ OVS_NAT_ATTR_IP_MIN,
687+ OVS_NAT_ATTR_IP_MAX,
688+ OVS_NAT_ATTR_PROTO_MIN,
689+ OVS_NAT_ATTR_PROTO_MAX,
690+ OVS_NAT_ATTR_PERSISTENT,
691+ OVS_NAT_ATTR_PROTO_HASH,
692+ OVS_NAT_ATTR_PROTO_RANDOM,
693+ __OVS_NAT_ATTR_MAX,
694+};
695+
696+#define OVS_NAT_ATTR_MAX (__OVS_NAT_ATTR_MAX - 1)
697+
649698 /**
650699 * enum ovs_action_attr - Action types.
651700 *
include/uapi/linux/pkt_cls.h+3−0
@@ -172,6 +172,7 @@ enum { · 171 unmodified lines
172172 TCA_U32_INDEV,
173173 TCA_U32_PCNT,
174174 TCA_U32_MARK,
175+ TCA_U32_FLAGS,
175176 __TCA_U32_MAX
176177 };
177178
@@ -416,6 +417,8 @@ enum { · 238 unmodified lines
416417 TCA_FLOWER_KEY_TCP_DST, /* be16 */
417418 TCA_FLOWER_KEY_UDP_SRC, /* be16 */
418419 TCA_FLOWER_KEY_UDP_DST, /* be16 */
420+
421+ TCA_FLOWER_FLAGS,
419422 __TCA_FLOWER_MAX,
420423 };
421424
include/uapi/linux/quota.h+14−0
@@ -71,6 +71,7 @@ · 70 unmodified lines
7171 #define Q_SETINFO 0x800006 /* set information about quota files */
7272 #define Q_GETQUOTA 0x800007 /* get user quota structure */
7373 #define Q_SETQUOTA 0x800008 /* set user quota structure */
74+#define Q_GETNEXTQUOTA 0x800009 /* get disk limits and usage >= ID */
7475
7576 /* Quota format type IDs */
7677 #define QFMT_VFS_OLD 1
@@ -119,6 +120,19 @@ struct if_dqblk { · 42 unmodified lines
119120 __u32 dqb_valid;
120121 };
121122
123+struct if_nextdqblk {
124+ __u64 dqb_bhardlimit;
125+ __u64 dqb_bsoftlimit;
126+ __u64 dqb_curspace;
127+ __u64 dqb_ihardlimit;
128+ __u64 dqb_isoftlimit;
129+ __u64 dqb_curinodes;
130+ __u64 dqb_btime;
131+ __u64 dqb_itime;
132+ __u32 dqb_valid;
133+ __u32 dqb_id;
134+};
135+
122136 /*
123137 * Structure used for setting quota information about file via quotactl
124138 * Following flags are used to specify which fields are valid
include/uapi/linux/rfkill.h+2−0
@@ -59,6 +59,8 @@ enum rfkill_type { · 58 unmodified lines
5959 * @RFKILL_OP_DEL: a device was removed
6060 * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device
6161 * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all)
62+ * into a state, also updating the default state used for devices that
63+ * are hot-plugged later.
6264 */
6365 enum rfkill_operation {
6466 RFKILL_OP_ADD = 0,
include/uapi/linux/sched.h+1−2
@@ -21,8 +21,7 @@ · 20 unmodified lines
2121 #define CLONE_DETACHED 0x00400000 /* Unused, ignored */
2222 #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
2323 #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
24−/* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state)
25− and is now available for re-use. */
24+#define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */
2625 #define CLONE_NEWUTS 0x04000000 /* New utsname namespace */
2726 #define CLONE_NEWIPC 0x08000000 /* New ipc namespace */
2827 #define CLONE_NEWUSER 0x10000000 /* New user namespace */
include/uapi/linux/serial_core.h+3−0
@@ -261,4 +261,7 @@ · 260 unmodified lines
261261 /* STM32 USART */
262262 #define PORT_STM32 113
263263
264+/* MVEBU UART */
265+#define PORT_MVEBU 114
266+
264267 #endif /* _UAPILINUX_SERIAL_CORE_H */
include/uapi/linux/stddef.h+4−0
@@ -1 +1,5 @@
11 #include <linux/compiler.h>
2+
3+#ifndef __always_inline
4+#define __always_inline inline
5+#endif
include/uapi/linux/swab.h+5−5
@@ -151,7 +151,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 150 unmodified lines
151151 * __swab16p - return a byteswapped 16-bit value from a pointer
152152 * @p: pointer to a naturally-aligned 16-bit value
153153 */
154−static inline __u16 __swab16p(const __u16 *p)
154+static __always_inline __u16 __swab16p(const __u16 *p)
155155 {
156156 #ifdef __arch_swab16p
157157 return __arch_swab16p(p);
@@ -164,7 +164,7 @@ static inline __u16 __swab16p(const __u16 *p) · 6 unmodified lines
164164 * __swab32p - return a byteswapped 32-bit value from a pointer
165165 * @p: pointer to a naturally-aligned 32-bit value
166166 */
167−static inline __u32 __swab32p(const __u32 *p)
167+static __always_inline __u32 __swab32p(const __u32 *p)
168168 {
169169 #ifdef __arch_swab32p
170170 return __arch_swab32p(p);
@@ -177,7 +177,7 @@ static inline __u32 __swab32p(const __u32 *p) · 6 unmodified lines
177177 * __swab64p - return a byteswapped 64-bit value from a pointer
178178 * @p: pointer to a naturally-aligned 64-bit value
179179 */
180−static inline __u64 __swab64p(const __u64 *p)
180+static __always_inline __u64 __swab64p(const __u64 *p)
181181 {
182182 #ifdef __arch_swab64p
183183 return __arch_swab64p(p);
@@ -232,7 +232,7 @@ static inline void __swab16s(__u16 *p) · 48 unmodified lines
232232 * __swab32s - byteswap a 32-bit value in-place
233233 * @p: pointer to a naturally-aligned 32-bit value
234234 */
235−static inline void __swab32s(__u32 *p)
235+static __always_inline void __swab32s(__u32 *p)
236236 {
237237 #ifdef __arch_swab32s
238238 __arch_swab32s(p);
@@ -245,7 +245,7 @@ static inline void __swab32s(__u32 *p) · 6 unmodified lines
245245 * __swab64s - byteswap a 64-bit value in-place
246246 * @p: pointer to a naturally-aligned 64-bit value
247247 */
248−static inline void __swab64s(__u64 *p)
248+static __always_inline void __swab64s(__u64 *p)
249249 {
250250 #ifdef __arch_swab64s
251251 __arch_swab64s(p);
include/uapi/linux/target_core_user.h+1−0
@@ -41,6 +41,7 @@ · 40 unmodified lines
4141
4242 #define TCMU_MAILBOX_VERSION 2
4343 #define ALIGN_SIZE 64 /* Should be enough for most CPUs */
44+#define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */
4445
4546 struct tcmu_mailbox {
4647 __u16 version;
include/uapi/linux/tc_act/tc_ife.h+38−0
@@ -0,0 +1,38 @@
1+#ifndef __UAPI_TC_IFE_H
2+#define __UAPI_TC_IFE_H
3+
4+#include <linux/types.h>
5+#include <linux/pkt_cls.h>
6+
7+#define TCA_ACT_IFE 25
8+/* Flag bits for now just encoding/decoding; mutually exclusive */
9+#define IFE_ENCODE 1
10+#define IFE_DECODE 0
11+
12+struct tc_ife {
13+ tc_gen;
14+ __u16 flags;
15+};
16+
17+/*XXX: We need to encode the total number of bytes consumed */
18+enum {
19+ TCA_IFE_UNSPEC,
20+ TCA_IFE_PARMS,
21+ TCA_IFE_TM,
22+ TCA_IFE_DMAC,
23+ TCA_IFE_SMAC,
24+ TCA_IFE_TYPE,
25+ TCA_IFE_METALST,
26+ __TCA_IFE_MAX
27+};
28+#define TCA_IFE_MAX (__TCA_IFE_MAX - 1)
29+
30+#define IFE_META_SKBMARK 1
31+#define IFE_META_HASHID 2
32+#define IFE_META_PRIO 3
33+#define IFE_META_QMAP 4
34+/*Can be overridden at runtime by module option*/
35+#define __IFE_META_MAX 5
36+#define IFE_META_MAX (__IFE_META_MAX - 1)
37+
38+#endif
include/uapi/linux/tcp.h+5−0
@@ -196,6 +196,11 @@ struct tcp_info { · 195 unmodified lines
196196 __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
197197 __u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
198198 __u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */
199+
200+ __u32 tcpi_notsent_bytes;
201+ __u32 tcpi_min_rtt;
202+ __u32 tcpi_data_segs_in; /* RFC4898 tcpEStatsDataSegsIn */
203+ __u32 tcpi_data_segs_out; /* RFC4898 tcpEStatsDataSegsOut */
199204 };
200205
201206 /* for TCP_MD5SIG socket option */
include/uapi/linux/usb/ch11.h+21−0
@@ -29,6 +29,14 @@ · 28 unmodified lines
2929 #define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
3030 #define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
3131
32+/*
33+ * Port status type for GetPortStatus requests added in USB 3.1
34+ * See USB 3.1 spec Table 10-12
35+ */
36+#define HUB_PORT_STATUS 0
37+#define HUB_PORT_PD_STATUS 1
38+#define HUB_EXT_PORT_STATUS 2
39+
3240 /*
3341 * Hub class requests
3442 * See USB 2.0 spec Table 11-16
@@ -97,10 +105,13 @@ · 62 unmodified lines
97105 /*
98106 * Hub Status and Hub Change results
99107 * See USB 2.0 spec Table 11-19 and Table 11-20
108+ * USB 3.1 extends the port status request and may return 4 additional bytes.
109+ * See USB 3.1 spec section 10.16.2.6 Table 10-12 and 10-15
100110 */
101111 struct usb_port_status {
102112 __le16 wPortStatus;
103113 __le16 wPortChange;
114+ __le32 dwExtPortStatus;
104115 } __attribute__ ((packed));
105116
106117 /*
@@ -172,6 +183,16 @@ struct usb_port_status { · 65 unmodified lines
172183 #define USB_PORT_STAT_C_LINK_STATE 0x0040
173184 #define USB_PORT_STAT_C_CONFIG_ERROR 0x0080
174185
186+/*
187+ * USB 3.1 dwExtPortStatus field masks
188+ * See USB 3.1 spec 10.16.2.6.3 Table 10-15
189+ */
190+
191+#define USB_EXT_PORT_STAT_RX_SPEED_ID 0x0000000f
192+#define USB_EXT_PORT_STAT_TX_SPEED_ID 0x000000f0
193+#define USB_EXT_PORT_STAT_RX_LANES 0x00000f00
194+#define USB_EXT_PORT_STAT_TX_LANES 0x0000f000
195+
175196 /*
176197 * wHubCharacteristics (masks)
177198 * See USB 2.0 spec Table 11-13, offset 3
include/uapi/linux/usb/ch9.h+37−1
@@ -234,6 +234,8 @@ struct usb_ctrlrequest { · 233 unmodified lines
234234 #define USB_DT_PIPE_USAGE 0x24
235235 /* From the USB 3.0 spec */
236236 #define USB_DT_SS_ENDPOINT_COMP 0x30
237+/* From the USB 3.1 spec */
238+#define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31
237239
238240 /* Conventional codes for class-specific descriptors. The convention is
239241 * defined in the USB "Common Class" Spec (3.11). Individual class specs
@@ -613,6 +615,20 @@ static inline int usb_endpoint_interrupt_type( · 373 unmodified lines
613615
614616 /*-------------------------------------------------------------------------*/
615617
618+/* USB_DT_SSP_ISOC_ENDPOINT_COMP: SuperSpeedPlus Isochronous Endpoint Companion
619+ * descriptor
620+ */
621+struct usb_ssp_isoc_ep_comp_descriptor {
622+ __u8 bLength;
623+ __u8 bDescriptorType;
624+ __le16 wReseved;
625+ __le32 dwBytesPerInterval;
626+} __attribute__ ((packed));
627+
628+#define USB_DT_SSP_ISOC_EP_COMP_SIZE 8
629+
630+/*-------------------------------------------------------------------------*/
631+
616632 /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */
617633 struct usb_ss_ep_comp_descriptor {
618634 __u8 bLength;
@@ -646,6 +662,8 @@ usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp) · 27 unmodified lines
646662
647663 /* Bits 1:0 of bmAttributes if this is an isoc endpoint */
648664 #define USB_SS_MULT(p) (1 + ((p) & 0x3))
665+/* Bit 7 of bmAttributes if a SSP isoc endpoint companion descriptor exists */
666+#define USB_SS_SSP_ISOC_COMP(p) ((p) & (1 << 7))
649667
650668 /*-------------------------------------------------------------------------*/
651669
@@ -690,6 +708,7 @@ struct usb_otg20_descriptor { · 38 unmodified lines
690708 #define USB_OTG_HNP (1 << 1) /* swap host/device roles */
691709 #define USB_OTG_ADP (1 << 2) /* support ADP */
692710
711+#define OTG_STS_SELECTOR 0xF000 /* OTG status selector */
693712 /*-------------------------------------------------------------------------*/
694713
695714 /* USB_DT_DEBUG: for special highspeed devices, replacing serial console */
@@ -880,7 +899,7 @@ struct usb_ssp_cap_descriptor { · 184 unmodified lines
880899 __le32 bmAttributes;
881900 #define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) /* sublink speed entries */
882901 #define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) /* speed ID entries */
883− __u16 wFunctionalitySupport;
902+ __le16 wFunctionalitySupport;
884903 #define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf)
885904 #define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8)
886905 #define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12)
@@ -894,6 +913,22 @@ struct usb_ssp_cap_descriptor { · 7 unmodified lines
894913 #define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) /* Lanespeed mantissa */
895914 } __attribute__((packed));
896915
916+/*
917+ * Precision time measurement capability descriptor: advertised by devices and
918+ * hubs that support PTM
919+ */
920+#define USB_PTM_CAP_TYPE 0xb
921+struct usb_ptm_cap_descriptor {
922+ __u8 bLength;
923+ __u8 bDescriptorType;
924+ __u8 bDevCapabilityType;
925+} __attribute__((packed));
926+
927+/*
928+ * The size of the descriptor for the Sublink Speed Attribute Count
929+ * (SSAC) specified in bmAttributes[4:0].
930+ */
931+#define USB_DT_USB_SSP_CAP_SIZE(ssac) (16 + ssac * 4)
897932
898933 /*-------------------------------------------------------------------------*/
899934
@@ -954,6 +989,7 @@ enum usb_device_speed { · 54 unmodified lines
954989 USB_SPEED_HIGH, /* usb 2.0 */
955990 USB_SPEED_WIRELESS, /* wireless (usb 2.5) */
956991 USB_SPEED_SUPER, /* usb 3.0 */
992+ USB_SPEED_SUPER_PLUS, /* usb 3.1 */
957993 };
958994
959995
include/uapi/linux/usb/tmc.h+26−3
@@ -2,12 +2,14 @@ · 1 unmodified line
22 * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
33 * Copyright (C) 2008 Novell, Inc.
44 * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
5+ * Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com>
56 *
67 * This file holds USB constants defined by the USB Device Class
7− * Definition for Test and Measurement devices published by the USB-IF.
8+ * and USB488 Subclass Definitions for Test and Measurement devices
9+ * published by the USB-IF.
810 *
9− * It also has the ioctl definitions for the usbtmc kernel driver that
10− * userspace needs to know about.
11+ * It also has the ioctl and capability definitions for the
12+ * usbtmc kernel driver that userspace needs to know about.
1113 */
1214
1315 #ifndef __LINUX_USB_TMC_H
@@ -30,6 +32,10 @@ · 16 unmodified lines
3032 #define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6
3133 #define USBTMC_REQUEST_GET_CAPABILITIES 7
3234 #define USBTMC_REQUEST_INDICATOR_PULSE 64
35+#define USBTMC488_REQUEST_READ_STATUS_BYTE 128
36+#define USBTMC488_REQUEST_REN_CONTROL 160
37+#define USBTMC488_REQUEST_GOTO_LOCAL 161
38+#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
3339
3440 /* Request values for USBTMC driver's ioctl entry point */
3541 #define USBTMC_IOC_NR 91
@@ -39,5 +45,22 @@ · 3 unmodified lines
3945 #define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
4046 #define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
4147 #define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)
48+#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
49+#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)
50+#define USBTMC488_IOCTL_REN_CONTROL _IOW(USBTMC_IOC_NR, 19, unsigned char)
51+#define USBTMC488_IOCTL_GOTO_LOCAL _IO(USBTMC_IOC_NR, 20)
52+#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21)
53+
54+/* Driver encoded usb488 capabilities */
55+#define USBTMC488_CAPABILITY_TRIGGER 1
56+#define USBTMC488_CAPABILITY_SIMPLE 2
57+#define USBTMC488_CAPABILITY_REN_CONTROL 2
58+#define USBTMC488_CAPABILITY_GOTO_LOCAL 2
59+#define USBTMC488_CAPABILITY_LOCAL_LOCKOUT 2
60+#define USBTMC488_CAPABILITY_488_DOT_2 4
61+#define USBTMC488_CAPABILITY_DT1 16
62+#define USBTMC488_CAPABILITY_RL1 32
63+#define USBTMC488_CAPABILITY_SR1 64
64+#define USBTMC488_CAPABILITY_FULL_SCPI 128
4265
4366 #endif
include/uapi/linux/usbdevice_fs.h+3−0
@@ -134,6 +134,8 @@ struct usbdevfs_hub_portinfo { · 133 unmodified lines
134134 #define USBDEVFS_CAP_NO_PACKET_SIZE_LIM 0x04
135135 #define USBDEVFS_CAP_BULK_SCATTER_GATHER 0x08
136136 #define USBDEVFS_CAP_REAP_AFTER_DISCONNECT 0x10
137+#define USBDEVFS_CAP_MMAP 0x20
138+#define USBDEVFS_CAP_DROP_PRIVILEGES 0x40
137139
138140 /* USBDEVFS_DISCONNECT_CLAIM flags & struct */
139141
@@ -187,5 +189,6 @@ struct usbdevfs_streams { · 47 unmodified lines
187189 #define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)
188190 #define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams)
189191 #define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)
192+#define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32)
190193
191194 #endif /* _UAPI_LINUX_USBDEVICE_FS_H */
include/uapi/linux/v4l2-common.h+35−11
@@ -10,19 +10,43 @@ · 9 unmodified lines
1010 * Copyright (C) 2012 Nokia Corporation
1111 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
1212 *
13− * This program is free software; you can redistribute it and/or
14− * modify it under the terms of the GNU General Public License
15− * version 2 as published by the Free Software Foundation.
13+ * This program is free software; you can redistribute it and/or modify
14+ * it under the terms of the GNU General Public License as published by
15+ * the Free Software Foundation; either version 2 of the License, or
16+ * (at your option) any later version.
1617 *
17− * This program is distributed in the hope that it will be useful, but
18− * WITHOUT ANY WARRANTY; without even the implied warranty of
19− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20− * General Public License for more details.
18+ * This program is distributed in the hope that it will be useful,
19+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+ * GNU General Public License for more details.
2122 *
22− * You should have received a copy of the GNU General Public License
23− * along with this program; if not, write to the Free Software
24− * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25− * 02110-1301 USA
23+ * Alternatively you can redistribute this file under the terms of the
24+ * BSD license as stated below:
25+ *
26+ * Redistribution and use in source and binary forms, with or without
27+ * modification, are permitted provided that the following conditions
28+ * are met:
29+ * 1. Redistributions of source code must retain the above copyright
30+ * notice, this list of conditions and the following disclaimer.
31+ * 2. Redistributions in binary form must reproduce the above copyright
32+ * notice, this list of conditions and the following disclaimer in
33+ * the documentation and/or other materials provided with the
34+ * distribution.
35+ * 3. The names of its contributors may not be used to endorse or promote
36+ * products derived from this software without specific prior written
37+ * permission.
38+ *
39+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
40+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
41+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
42+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2650 *
2751 */
2852
include/uapi/linux/v4l2-controls.h+11−0
@@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode { · 389 unmodified lines
390390 #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226)
391391 #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227)
392392 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228)
393+#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229)
393394
394395 #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
395396 #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
@@ -912,8 +913,18 @@ enum v4l2_dv_rgb_range { · 516 unmodified lines
912913 V4L2_DV_RGB_RANGE_FULL = 2,
913914 };
914915
916+#define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6)
917+enum v4l2_dv_it_content_type {
918+ V4L2_DV_IT_CONTENT_TYPE_GRAPHICS = 0,
919+ V4L2_DV_IT_CONTENT_TYPE_PHOTO = 1,
920+ V4L2_DV_IT_CONTENT_TYPE_CINEMA = 2,
921+ V4L2_DV_IT_CONTENT_TYPE_GAME = 3,
922+ V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,
923+};
924+
915925 #define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
916926 #define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
927+#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)
917928
918929 #define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)
919930 #define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1)
include/uapi/linux/vfio.h+90−2
@@ -59,6 +59,33 @@ · 58 unmodified lines
5959 #define VFIO_TYPE (';')
6060 #define VFIO_BASE 100
6161
62+/*
63+ * For extension of INFO ioctls, VFIO makes use of a capability chain
64+ * designed after PCI/e capabilities. A flag bit indicates whether
65+ * this capability chain is supported and a field defined in the fixed
66+ * structure defines the offset of the first capability in the chain.
67+ * This field is only valid when the corresponding bit in the flags
68+ * bitmap is set. This offset field is relative to the start of the
69+ * INFO buffer, as is the next field within each capability header.
70+ * The id within the header is a shared address space per INFO ioctl,
71+ * while the version field is specific to the capability id. The
72+ * contents following the header are specific to the capability id.
73+ */
74+struct vfio_info_cap_header {
75+ __u16 id; /* Identifies capability */
76+ __u16 version; /* Version specific to the capability ID */
77+ __u32 next; /* Offset of next capability */
78+};
79+
80+/*
81+ * Callers of INFO ioctls passing insufficiently sized buffers will see
82+ * the capability chain flag bit set, a zero value for the first capability
83+ * offset (if available within the provided argsz), and argsz will be
84+ * updated to report the necessary buffer size. For compatibility, the
85+ * INFO ioctl will not report error in this case, but the capability chain
86+ * will not be available.
87+ */
88+
6289 /* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */
6390
6491 /**
@@ -194,13 +221,73 @@ struct vfio_region_info { · 129 unmodified lines
194221 #define VFIO_REGION_INFO_FLAG_READ (1 << 0) /* Region supports read */
195222 #define VFIO_REGION_INFO_FLAG_WRITE (1 << 1) /* Region supports write */
196223 #define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */
224+#define VFIO_REGION_INFO_FLAG_CAPS (1 << 3) /* Info supports caps */
197225 __u32 index; /* Region index */
198− __u32 resv; /* Reserved for alignment */
226+ __u32 cap_offset; /* Offset within info struct of first cap */
199227 __u64 size; /* Region size (bytes) */
200228 __u64 offset; /* Region offset from start of device fd */
201229 };
202230 #define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8)
203231
232+/*
233+ * The sparse mmap capability allows finer granularity of specifying areas
234+ * within a region with mmap support. When specified, the user should only
235+ * mmap the offset ranges specified by the areas array. mmaps outside of the
236+ * areas specified may fail (such as the range covering a PCI MSI-X table) or
237+ * may result in improper device behavior.
238+ *
239+ * The structures below define version 1 of this capability.
240+ */
241+#define VFIO_REGION_INFO_CAP_SPARSE_MMAP 1
242+
243+struct vfio_region_sparse_mmap_area {
244+ __u64 offset; /* Offset of mmap'able area within region */
245+ __u64 size; /* Size of mmap'able area */
246+};
247+
248+struct vfio_region_info_cap_sparse_mmap {
249+ struct vfio_info_cap_header header;
250+ __u32 nr_areas;
251+ __u32 reserved;
252+ struct vfio_region_sparse_mmap_area areas[];
253+};
254+
255+/*
256+ * The device specific type capability allows regions unique to a specific
257+ * device or class of devices to be exposed. This helps solve the problem for
258+ * vfio bus drivers of defining which region indexes correspond to which region
259+ * on the device, without needing to resort to static indexes, as done by
260+ * vfio-pci. For instance, if we were to go back in time, we might remove
261+ * VFIO_PCI_VGA_REGION_INDEX and let vfio-pci simply define that all indexes
262+ * greater than or equal to VFIO_PCI_NUM_REGIONS are device specific and we'd
263+ * make a "VGA" device specific type to describe the VGA access space. This
264+ * means that non-VGA devices wouldn't need to waste this index, and thus the
265+ * address space associated with it due to implementation of device file
266+ * descriptor offsets in vfio-pci.
267+ *
268+ * The current implementation is now part of the user ABI, so we can't use this
269+ * for VGA, but there are other upcoming use cases, such as opregions for Intel
270+ * IGD devices and framebuffers for vGPU devices. We missed VGA, but we'll
271+ * use this for future additions.
272+ *
273+ * The structure below defines version 1 of this capability.
274+ */
275+#define VFIO_REGION_INFO_CAP_TYPE 2
276+
277+struct vfio_region_info_cap_type {
278+ struct vfio_info_cap_header header;
279+ __u32 type; /* global per bus driver */
280+ __u32 subtype; /* type specific */
281+};
282+
283+#define VFIO_REGION_TYPE_PCI_VENDOR_TYPE (1 << 31)
284+#define VFIO_REGION_TYPE_PCI_VENDOR_MASK (0xffff)
285+
286+/* 8086 Vendor sub-types */
287+#define VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION (1)
288+#define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2)
289+#define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3)
290+
204291 /**
205292 * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9,
206293 * struct vfio_irq_info)
@@ -336,7 +423,8 @@ enum { · 129 unmodified lines
336423 * between described ranges are unimplemented.
337424 */
338425 VFIO_PCI_VGA_REGION_INDEX,
339− VFIO_PCI_NUM_REGIONS
426+ VFIO_PCI_NUM_REGIONS = 9 /* Fixed user ABI, region indexes >=9 use */
427+ /* device specific cap to define content. */
340428 };
341429
342430 enum {
include/uapi/linux/vhost.h+6−0
@@ -126,6 +126,12 @@ struct vhost_memory { · 125 unmodified lines
126126 #define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, struct vhost_vring_file)
127127 /* Set eventfd to signal an error */
128128 #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file)
129+/* Set busy loop timeout (in us) */
130+#define VHOST_SET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x23, \
131+ struct vhost_vring_state)
132+/* Get busy loop timeout (in us) */
133+#define VHOST_GET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x24, \
134+ struct vhost_vring_state)
129135
130136 /* VHOST_NET specific defines */
131137
include/uapi/linux/videodev2.h+7−0
@@ -546,6 +546,10 @@ struct v4l2_pix_format { · 545 unmodified lines
546546 /* three non contiguous planes - Y, Cb, Cr */
547547 #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
548548 #define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */
549+#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */
550+#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */
551+#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */
552+#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */
549553
550554 /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
551555 #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
@@ -621,6 +625,9 @@ struct v4l2_pix_format { · 69 unmodified lines
621625 #define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
622626 #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
623627 #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
628+#define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */
629+#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
630+#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
624631
625632 /* SDR formats - used only for Software Defined Radio devices */
626633 #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
include/uapi/linux/virtio_balloon.h+2−1
@@ -51,7 +51,8 @@ struct virtio_balloon_config { · 50 unmodified lines
5151 #define VIRTIO_BALLOON_S_MINFLT 3 /* Number of minor faults */
5252 #define VIRTIO_BALLOON_S_MEMFREE 4 /* Total amount of free memory */
5353 #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
54−#define VIRTIO_BALLOON_S_NR 6
54+#define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */
55+#define VIRTIO_BALLOON_S_NR 7
5556
5657 /*
5758 * Memory statistics structure.
include/uapi/linux/virtio_blk.h+3−3
@@ -43,11 +43,11 @@ · 42 unmodified lines
4343 #ifndef VIRTIO_BLK_NO_LEGACY
4444 #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */
4545 #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
46−#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */
46+#define VIRTIO_BLK_F_FLUSH 9 /* Flush command supported */
4747 #define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
4848 #ifndef __KERNEL__
49−/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
50−#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE
49+/* Old (deprecated) name for VIRTIO_BLK_F_FLUSH. */
50+#define VIRTIO_BLK_F_WCE VIRTIO_BLK_F_FLUSH
5151 #endif
5252 #endif /* !VIRTIO_BLK_NO_LEGACY */
5353
include/uapi/linux/virtio_config.h+2−0
@@ -40,6 +40,8 @@ · 39 unmodified lines
4040 #define VIRTIO_CONFIG_S_DRIVER_OK 4
4141 /* Driver has finished configuring features */
4242 #define VIRTIO_CONFIG_S_FEATURES_OK 8
43+/* Device entered invalid state, driver must reset it */
44+#define VIRTIO_CONFIG_S_NEEDS_RESET 0x40
4345 /* We've given up on this device. */
4446 #define VIRTIO_CONFIG_S_FAILED 0x80
4547
include/uapi/misc/cxl.h+24−0
@@ -55,11 +55,35 @@ struct cxl_afu_id { · 54 unmodified lines
5555 __u64 reserved6;
5656 };
5757
58+/* base adapter image header is included in the image */
59+#define CXL_AI_NEED_HEADER 0x0000000000000001ULL
60+#define CXL_AI_ALL CXL_AI_NEED_HEADER
61+
62+#define CXL_AI_HEADER_SIZE 128
63+#define CXL_AI_BUFFER_SIZE 4096
64+#define CXL_AI_MAX_ENTRIES 256
65+#define CXL_AI_MAX_CHUNK_SIZE (CXL_AI_BUFFER_SIZE * CXL_AI_MAX_ENTRIES)
66+
67+struct cxl_adapter_image {
68+ __u64 flags;
69+ __u64 data;
70+ __u64 len_data;
71+ __u64 len_image;
72+ __u64 reserved1;
73+ __u64 reserved2;
74+ __u64 reserved3;
75+ __u64 reserved4;
76+};
77+
5878 /* ioctl numbers */
5979 #define CXL_MAGIC 0xCA
80+/* AFU devices */
6081 #define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work)
6182 #define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32)
6283 #define CXL_IOCTL_GET_AFU_ID _IOR(CXL_MAGIC, 0x02, struct cxl_afu_id)
84+/* adapter devices */
85+#define CXL_IOCTL_DOWNLOAD_IMAGE _IOW(CXL_MAGIC, 0x0A, struct cxl_adapter_image)
86+#define CXL_IOCTL_VALIDATE_IMAGE _IOW(CXL_MAGIC, 0x0B, struct cxl_adapter_image)
6387
6488 #define CXL_READ_MIN_SIZE 0x1000 /* 4K */
6589
include/uapi/rdma/hfi/hfi1_user.h+6−8
@@ -66,7 +66,7 @@ · 65 unmodified lines
6666 * The major version changes when data structures change in an incompatible
6767 * way. The driver must be the same for initialization to succeed.
6868 */
69−#define HFI1_USER_SWMAJOR 4
69+#define HFI1_USER_SWMAJOR 5
7070
7171 /*
7272 * Minor version differences are always compatible
@@ -93,7 +93,7 @@ · 20 unmodified lines
9393 #define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/
9494 #define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */
9595 #define HFI1_CAP_NODROP_EGR_FULL (1UL << 9) /* Don't drop on EGR buffs full */
96−#define HFI1_CAP_TID_UNMAP (1UL << 10) /* Enable Expected TID caching */
96+#define HFI1_CAP_TID_UNMAP (1UL << 10) /* Disable Expected TID caching */
9797 #define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */
9898 #define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */
9999 #define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */
@@ -134,6 +134,7 @@ · 34 unmodified lines
134134 #define HFI1_CMD_ACK_EVENT 10 /* ack & clear user status bits */
135135 #define HFI1_CMD_SET_PKEY 11 /* set context's pkey */
136136 #define HFI1_CMD_CTXT_RESET 12 /* reset context's HW send context */
137+#define HFI1_CMD_TID_INVAL_READ 13 /* read TID cache invalidations */
137138 /* separate EPROM commands from normal PSM commands */
138139 #define HFI1_CMD_EP_INFO 64 /* read EPROM device ID */
139140 #define HFI1_CMD_EP_ERASE_CHIP 65 /* erase whole EPROM */
@@ -147,13 +148,15 @@ · 7 unmodified lines
147148 #define _HFI1_EVENT_LID_CHANGE_BIT 2
148149 #define _HFI1_EVENT_LMC_CHANGE_BIT 3
149150 #define _HFI1_EVENT_SL2VL_CHANGE_BIT 4
150−#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_SL2VL_CHANGE_BIT
151+#define _HFI1_EVENT_TID_MMU_NOTIFY_BIT 5
152+#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_TID_MMU_NOTIFY_BIT
151153
152154 #define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT)
153155 #define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT)
154156 #define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT)
155157 #define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT)
156158 #define HFI1_EVENT_SL2VL_CHANGE (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT)
159+#define HFI1_EVENT_TID_MMU_NOTIFY (1UL << _HFI1_EVENT_TID_MMU_NOTIFY_BIT)
157160
158161 /*
159162 * These are the status bits readable (in ASCII form, 64bit value)
@@ -238,11 +241,6 @@ struct hfi1_tid_info { · 78 unmodified lines
238241 __u32 tidcnt;
239242 /* length of transfer buffer programmed by this request */
240243 __u32 length;
241− /*
242− * pointer to bitmap of TIDs used for this call;
243− * checked for being large enough at open
244− */
245− __u64 tidmap;
246244 };
247245
248246 struct hfi1_cmd {
include/uapi/rdma/rdma_netlink.h+3−2
@@ -5,9 +5,10 @@ · 4 unmodified lines
55
66 enum {
77 RDMA_NL_RDMA_CM = 1,
8− RDMA_NL_NES,
9− RDMA_NL_C4IW,
8+ RDMA_NL_IWCM,
9+ RDMA_NL_RSVD,
1010 RDMA_NL_LS, /* RDMA Local Services */
11+ RDMA_NL_I40IW,
1112 RDMA_NL_NUM_CLIENTS
1213 };
1314
include/uapi/sound/asequencer.h+4−8
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 #include <sound/asound.h>
2626
2727 /** version of the sequencer */
28−#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
28+#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2)
2929
3030 /**
3131 * definition of sequencer event types
@@ -357,7 +357,9 @@ struct snd_seq_client_info { · 325 unmodified lines
357357 unsigned char event_filter[32]; /* event filter bitmap */
358358 int num_ports; /* RO: number of ports */
359359 int event_lost; /* number of lost events */
360− char reserved[64]; /* for future use */
360+ int card; /* RO: card number[kernel] */
361+ int pid; /* RO: pid[user] */
362+ char reserved[56]; /* for future use */
361363 };
362364
363365
@@ -594,14 +596,8 @@ struct snd_seq_query_subs { · 230 unmodified lines
594596 #define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
595597 #define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
596598 #define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo)
597−#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER _IOWR('S', 0x43, struct snd_seq_queue_owner)
598−#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER _IOW ('S', 0x44, struct snd_seq_queue_owner)
599599 #define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
600600 #define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer)
601−/* XXX
602−#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC _IOWR('S', 0x53, struct snd_seq_queue_sync)
603−#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC _IOW ('S', 0x54, struct snd_seq_queue_sync)
604−*/
605601 #define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
606602 #define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)
607603 #define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
include/uapi/sound/asound.h+4−0
@@ -23,7 +23,11 @@ · 22 unmodified lines
2323 #ifndef _UAPI__SOUND_ASOUND_H
2424 #define _UAPI__SOUND_ASOUND_H
2525
26+#if defined(__KERNEL__) || defined(__linux__)
2627 #include <linux/types.h>
28+#else
29+#include <sys/ioctl.h>
30+#endif
2731
2832 #ifndef __KERNEL__
2933 #include <stdlib.h>

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