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
91 int _trapno; /* TRAP # which caused the signal */91 int _trapno; /* TRAP # which caused the signal */
92#endif92#endif
93 short _addr_lsb; /* LSB of the reported address */93 short _addr_lsb; /* LSB of the reported address */
94 struct {94 union {
95 void __user *_lower;95 /* used when si_code=SEGV_BNDERR */
96 void __user *_upper;96 struct {
97 } _addr_bnd;97 void __user *_lower;
98 void __user *_upper;
99 } _addr_bnd;
100 /* used when si_code=SEGV_PKUERR */
101 __u32 _pkey;
102 };
98 } _sigfault;103 } _sigfault;
99 104
100 /* SIGPOLL */105 /* SIGPOLL */
@@ -137,6 +142,7 @@ typedef struct siginfo { · 36 unmodified lines
137#define si_addr_lsb _sifields._sigfault._addr_lsb142#define si_addr_lsb _sifields._sigfault._addr_lsb
138#define si_lower _sifields._sigfault._addr_bnd._lower143#define si_lower _sifields._sigfault._addr_bnd._lower
139#define si_upper _sifields._sigfault._addr_bnd._upper144#define si_upper _sifields._sigfault._addr_bnd._upper
145#define si_pkey _sifields._sigfault._pkey
140#define si_band _sifields._sigpoll._band146#define si_band _sifields._sigpoll._band
141#define si_fd _sifields._sigpoll._fd147#define si_fd _sifields._sigpoll._fd
142#ifdef __ARCH_SIGSYS148#ifdef __ARCH_SIGSYS
@@ -206,7 +212,8 @@ typedef struct siginfo { · 63 unmodified lines
206#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */212#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
207#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */213#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
208#define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */214#define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */
209#define NSIGSEGV 3215#define SEGV_PKUERR (__SI_FAULT|4) /* failed protection key checks */
216#define NSIGSEGV 4
210 217
211/*218/*
212 * SIGBUS si_codes219 * SIGBUS si_codes
include/uapi/asm-generic/socket.h+2−0
@@ -90,4 +90,6 @@ · 89 unmodified lines
90#define SO_ATTACH_REUSEPORT_CBPF 5190#define SO_ATTACH_REUSEPORT_CBPF 51
91#define SO_ATTACH_REUSEPORT_EBPF 5291#define SO_ATTACH_REUSEPORT_EBPF 52
92 92
93#define SO_CNX_ADVICE 53
94
93#endif /* __ASM_GENERIC_SOCKET_H */95#endif /* __ASM_GENERIC_SOCKET_H */
include/uapi/drm/drm.h+1−0
@@ -669,6 +669,7 @@ struct drm_set_client_cap { · 668 unmodified lines
669 __u64 value;669 __u64 value;
670};670};
671 671
672#define DRM_RDWR O_RDWR
672#define DRM_CLOEXEC O_CLOEXEC673#define DRM_CLOEXEC O_CLOEXEC
673struct drm_prime_handle {674struct drm_prime_handle {
674 __u32 handle;675 __u32 handle;
include/uapi/drm/drm_mode.h+15−0
@@ -487,6 +487,21 @@ struct drm_mode_crtc_lut { · 486 unmodified lines
487 __u64 blue;487 __u64 blue;
488};488};
489 489
490struct drm_color_ctm {
491 /* Conversion matrix in S31.32 format. */
492 __s64 matrix[9];
493};
494
495struct 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
490#define DRM_MODE_PAGE_FLIP_EVENT 0x01505#define DRM_MODE_PAGE_FLIP_EVENT 0x01
491#define DRM_MODE_PAGE_FLIP_ASYNC 0x02506#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
492#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC)507#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
28 */28 */
29struct drm_exynos_gem_create {29struct drm_exynos_gem_create {
30 __u64 size;30 __u64 size;
31 unsigned int flags;31 __u32 flags;
32 unsigned int handle;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 */
42struct drm_exynos_gem_map {
43 __u32 handle;
44 __u32 reserved;
45 __u64 offset;
33};46};
34 47
35/**48/**
@@ -42,8 +55,8 @@ struct drm_exynos_gem_create { · 6 unmodified lines
42 * be set by driver.55 * be set by driver.
43 */56 */
44struct drm_exynos_gem_info {57struct drm_exynos_gem_info {
45 unsigned int handle;58 __u32 handle;
46 unsigned int flags;59 __u32 flags;
47 __u64 size;60 __u64 size;
48};61};
49 62
@@ -56,8 +69,8 @@ struct drm_exynos_gem_info { · 6 unmodified lines
56 * @edid: the edid data pointer from user side.69 * @edid: the edid data pointer from user side.
57 */70 */
58struct drm_exynos_vidi_connection {71struct drm_exynos_vidi_connection {
59 unsigned int connection;72 __u32 connection;
60 unsigned int extensions;73 __u32 extensions;
61 __u64 edid;74 __u64 edid;
62};75};
63 76
@@ -206,9 +219,9 @@ struct drm_exynos_ipp_prop_list { · 142 unmodified lines
206 * @pos: property of image position(src-cropped,dst-scaler).219 * @pos: property of image position(src-cropped,dst-scaler).
207 */220 */
208struct drm_exynos_ipp_config {221struct drm_exynos_ipp_config {
209 enum drm_exynos_ops_id ops_id;222 __u32 ops_id;
210 enum drm_exynos_flip flip;223 __u32 flip;
211 enum drm_exynos_degree degree;224 __u32 degree;
212 __u32 fmt;225 __u32 fmt;
213 struct drm_exynos_sz sz;226 struct drm_exynos_sz sz;
214 struct drm_exynos_pos pos;227 struct drm_exynos_pos pos;
@@ -233,7 +246,7 @@ enum drm_exynos_ipp_cmd { · 18 unmodified lines
233 */246 */
234struct drm_exynos_ipp_property {247struct drm_exynos_ipp_property {
235 struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX];248 struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX];
236 enum drm_exynos_ipp_cmd cmd;249 __u32 cmd;
237 __u32 ipp_id;250 __u32 ipp_id;
238 __u32 prop_id;251 __u32 prop_id;
239 __u32 refresh_rate;252 __u32 refresh_rate;
@@ -255,8 +268,8 @@ enum drm_exynos_ipp_buf_type { · 15 unmodified lines
255 * @user_data: user data.268 * @user_data: user data.
256 */269 */
257struct drm_exynos_ipp_queue_buf {270struct drm_exynos_ipp_queue_buf {
258 enum drm_exynos_ops_id ops_id;271 __u32 ops_id;
259 enum drm_exynos_ipp_buf_type buf_type;272 __u32 buf_type;
260 __u32 prop_id;273 __u32 prop_id;
261 __u32 buf_id;274 __u32 buf_id;
262 __u32 handle[EXYNOS_DRM_PLANAR_MAX];275 __u32 handle[EXYNOS_DRM_PLANAR_MAX];
@@ -280,10 +293,11 @@ enum drm_exynos_ipp_ctrl { · 17 unmodified lines
280 */293 */
281struct drm_exynos_ipp_cmd_ctrl {294struct drm_exynos_ipp_cmd_ctrl {
282 __u32 prop_id;295 __u32 prop_id;
283 enum drm_exynos_ipp_ctrl ctrl;296 __u32 ctrl;
284};297};
285 298
286#define DRM_EXYNOS_GEM_CREATE 0x00299#define DRM_EXYNOS_GEM_CREATE 0x00
300#define DRM_EXYNOS_GEM_MAP 0x01
287/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */301/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
288#define DRM_EXYNOS_GEM_GET 0x04302#define DRM_EXYNOS_GEM_GET 0x04
289#define DRM_EXYNOS_VIDI_CONNECTION 0x07303#define DRM_EXYNOS_VIDI_CONNECTION 0x07
@@ -301,7 +315,8 @@ struct drm_exynos_ipp_cmd_ctrl { · 11 unmodified lines
301 315
302#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \316#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
303 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)317 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)
305#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \320#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
306 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)321 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
307 322
include/uapi/drm/i915_drm.h+35−8
@@ -772,10 +772,12 @@ struct drm_i915_gem_execbuffer2 { · 771 unmodified lines
772#define I915_EXEC_HANDLE_LUT (1<<12)772#define I915_EXEC_HANDLE_LUT (1<<12)
773 773
774/** Used for switching BSD rings on the platforms with two BSD rings */774/** Used for switching BSD rings on the platforms with two BSD rings */
775#define I915_EXEC_BSD_MASK (3<<13)775#define I915_EXEC_BSD_SHIFT (13)
776#define I915_EXEC_BSD_DEFAULT (0<<13) /* default ping-pong mode */776#define I915_EXEC_BSD_MASK (3 << I915_EXEC_BSD_SHIFT)
777#define I915_EXEC_BSD_RING1 (1<<13)777/* default ping-pong mode */
778#define I915_EXEC_BSD_RING2 (2<<13)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)
779 781
780/** Tell the kernel that the batchbuffer is processed by782/** Tell the kernel that the batchbuffer is processed by
781 * the resource streamer.783 * the resource streamer.
@@ -812,10 +814,35 @@ struct drm_i915_gem_busy { · 30 unmodified lines
812 /** Handle of the buffer to check for busy */814 /** Handle of the buffer to check for busy */
813 __u32 handle;815 __u32 handle;
814 816
815 /** Return busy status (1 if busy, 0 if idle).817 /** Return busy status
816 * The high word is used to indicate on which rings the object818 *
817 * currently resides:819 * A return of 0 implies that the object is idle (after
818 * 16:31 - busy (r or r/w) rings (16 render, 17 bsd, 18 blt, etc)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.
819 */846 */
820 __u32 busy;847 __u32 busy;
821};848};
include/uapi/drm/msm_drm.h+2−0
@@ -50,6 +50,8 @@ struct drm_msm_timespec { · 49 unmodified lines
50#define MSM_PARAM_GPU_ID 0x0150#define MSM_PARAM_GPU_ID 0x01
51#define MSM_PARAM_GMEM_SIZE 0x0251#define MSM_PARAM_GMEM_SIZE 0x02
52#define MSM_PARAM_CHIP_ID 0x0352#define MSM_PARAM_CHIP_ID 0x03
53#define MSM_PARAM_MAX_FREQ 0x04
54#define MSM_PARAM_TIMESTAMP 0x05
53 55
54struct drm_msm_param {56struct drm_msm_param {
55 __u32 pipe; /* in, MSM_PIPE_x */57 __u32 pipe; /* in, MSM_PIPE_x */
include/uapi/linux/Kbuild+3−0
@@ -138,6 +138,7 @@ header-y += genetlink.h · 137 unmodified lines
138header-y += gen_stats.h138header-y += gen_stats.h
139header-y += gfs2_ondisk.h139header-y += gfs2_ondisk.h
140header-y += gigaset_dev.h140header-y += gigaset_dev.h
141header-y += gpio.h
141header-y += gsmmux.h142header-y += gsmmux.h
142header-y += hdlcdrv.h143header-y += hdlcdrv.h
143header-y += hdlc.h144header-y += hdlc.h
@@ -173,6 +174,7 @@ header-y += if_hippi.h · 29 unmodified lines
173header-y += if_infiniband.h174header-y += if_infiniband.h
174header-y += if_link.h175header-y += if_link.h
175header-y += if_ltalk.h176header-y += if_ltalk.h
177header-y += if_macsec.h
176header-y += if_packet.h178header-y += if_packet.h
177header-y += if_phonet.h179header-y += if_phonet.h
178header-y += if_plip.h180header-y += if_plip.h
@@ -352,6 +354,7 @@ header-y += reiserfs_fs.h · 173 unmodified lines
352header-y += reiserfs_xattr.h354header-y += reiserfs_xattr.h
353header-y += resource.h355header-y += resource.h
354header-y += rfkill.h356header-y += rfkill.h
357header-y += rio_mport_cdev.h
355header-y += romfs_fs.h358header-y += romfs_fs.h
356header-y += rose.h359header-y += rose.h
357header-y += route.h360header-y += route.h
include/uapi/linux/audit.h+1−0
@@ -110,6 +110,7 @@ · 109 unmodified lines
110#define AUDIT_SECCOMP 1326 /* Secure Computing event */110#define AUDIT_SECCOMP 1326 /* Secure Computing event */
111#define AUDIT_PROCTITLE 1327 /* Proctitle emit event */111#define AUDIT_PROCTITLE 1327 /* Proctitle emit event */
112#define AUDIT_FEATURE_CHANGE 1328 /* audit log listing feature changes */112#define AUDIT_FEATURE_CHANGE 1328 /* audit log listing feature changes */
113#define AUDIT_REPLACE 1329 /* Replace auditd if this packet unanswerd */
113 114
114#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */115#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
115#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */116#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
include/uapi/linux/auto_fs.h+9−12
@@ -1,7 +1,4 @@
1/* -*- linux-c -*- ------------------------------------------------------- *1/*
2 *
3 * linux/include/linux/auto_fs.h
4 *
5 * Copyright 1997 Transmeta Corporation - All Rights Reserved2 * Copyright 1997 Transmeta Corporation - All Rights Reserved
6 *3 *
7 * This file is part of the Linux kernel and is made available under4 * This file is part of the Linux kernel and is made available under
@@ -51,7 +48,7 @@ struct autofs_packet_hdr { · 43 unmodified lines
51 48
52struct autofs_packet_missing {49struct autofs_packet_missing {
53 struct autofs_packet_hdr hdr;50 struct autofs_packet_hdr hdr;
54 autofs_wqt_t wait_queue_token;51 autofs_wqt_t wait_queue_token;
55 int len;52 int len;
56 char name[NAME_MAX+1];53 char name[NAME_MAX+1];
57}; 54};
@@ -63,12 +60,12 @@ struct autofs_packet_expire { · 5 unmodified lines
63 char name[NAME_MAX+1];60 char name[NAME_MAX+1];
64};61};
65 62
66#define AUTOFS_IOC_READY _IO(0x93,0x60)63#define AUTOFS_IOC_READY _IO(0x93, 0x60)
67#define AUTOFS_IOC_FAIL _IO(0x93,0x61)64#define AUTOFS_IOC_FAIL _IO(0x93, 0x61)
68#define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)65#define AUTOFS_IOC_CATATONIC _IO(0x93, 0x62)
69#define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)66#define AUTOFS_IOC_PROTOVER _IOR(0x93, 0x63, int)
70#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t)67#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93, 0x64, compat_ulong_t)
71#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)68#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93, 0x64, unsigned long)
72#define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)69#define AUTOFS_IOC_EXPIRE _IOR(0x93, 0x65, struct autofs_packet_expire)
73 70
74#endif /* _UAPI_LINUX_AUTO_FS_H */71#endif /* _UAPI_LINUX_AUTO_FS_H */
include/uapi/linux/auto_fs4.h+5−12
@@ -1,6 +1,4 @@
1/* -*- c -*-1/*
2 * linux/include/linux/auto_fs4.h
3 *
4 * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy@goop.org>2 * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy@goop.org>
5 *3 *
6 * This file is part of the Linux kernel and is made available under4 * This file is part of the Linux kernel and is made available under
@@ -38,7 +36,6 @@ · 31 unmodified lines
38static inline void set_autofs_type_indirect(unsigned int *type)36static inline void set_autofs_type_indirect(unsigned int *type)
39{37{
40 *type = AUTOFS_TYPE_INDIRECT;38 *type = AUTOFS_TYPE_INDIRECT;
41 return;
42}39}
43 40
44static inline unsigned int autofs_type_indirect(unsigned int type)41static 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
49static inline void set_autofs_type_direct(unsigned int *type)46static inline void set_autofs_type_direct(unsigned int *type)
50{47{
51 *type = AUTOFS_TYPE_DIRECT;48 *type = AUTOFS_TYPE_DIRECT;
52 return;
53}49}
54 50
55static inline unsigned int autofs_type_direct(unsigned int type)51static 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
60static inline void set_autofs_type_offset(unsigned int *type)56static inline void set_autofs_type_offset(unsigned int *type)
61{57{
62 *type = AUTOFS_TYPE_OFFSET;58 *type = AUTOFS_TYPE_OFFSET;
63 return;
64}59}
65 60
66static inline unsigned int autofs_type_offset(unsigned int type)61static 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
81static inline void set_autofs_type_any(unsigned int *type)76static inline void set_autofs_type_any(unsigned int *type)
82{77{
83 *type = AUTOFS_TYPE_ANY;78 *type = AUTOFS_TYPE_ANY;
84 return;
85}79}
86 80
87static inline unsigned int autofs_type_any(unsigned int type)81static inline unsigned int autofs_type_any(unsigned int type)
@@ -114,7 +108,7 @@ enum autofs_notify { · 26 unmodified lines
114/* v4 multi expire (via pipe) */108/* v4 multi expire (via pipe) */
115struct autofs_packet_expire_multi {109struct autofs_packet_expire_multi {
116 struct autofs_packet_hdr hdr;110 struct autofs_packet_hdr hdr;
117 autofs_wqt_t wait_queue_token;111 autofs_wqt_t wait_queue_token;
118 int len;112 int len;
119 char name[NAME_MAX+1];113 char name[NAME_MAX+1];
120};114};
@@ -154,11 +148,10 @@ union autofs_v5_packet_union { · 33 unmodified lines
154 autofs_packet_expire_direct_t expire_direct;148 autofs_packet_expire_direct_t expire_direct;
155};149};
156 150
157#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int)151#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93, 0x66, int)
158#define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI152#define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI
159#define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI153#define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI
160#define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int)154#define AUTOFS_IOC_PROTOSUBVER _IOR(0x93, 0x67, int)
161#define AUTOFS_IOC_ASKUMOUNT _IOR(0x93,0x70,int)155#define AUTOFS_IOC_ASKUMOUNT _IOR(0x93, 0x70, int)
162
163 156
164#endif /* _LINUX_AUTO_FS4_H */157#endif /* _LINUX_AUTO_FS4_H */
include/uapi/linux/bpf.h+53−0
@@ -81,6 +81,9 @@ enum bpf_map_type { · 80 unmodified lines
81 BPF_MAP_TYPE_ARRAY,81 BPF_MAP_TYPE_ARRAY,
82 BPF_MAP_TYPE_PROG_ARRAY,82 BPF_MAP_TYPE_PROG_ARRAY,
83 BPF_MAP_TYPE_PERF_EVENT_ARRAY,83 BPF_MAP_TYPE_PERF_EVENT_ARRAY,
84 BPF_MAP_TYPE_PERCPU_HASH,
85 BPF_MAP_TYPE_PERCPU_ARRAY,
86 BPF_MAP_TYPE_STACK_TRACE,
84};87};
85 88
86enum bpf_prog_type {89enum bpf_prog_type {
@@ -98,12 +101,15 @@ enum bpf_prog_type { · 11 unmodified lines
98#define BPF_NOEXIST 1 /* create new element if it didn't exist */101#define BPF_NOEXIST 1 /* create new element if it didn't exist */
99#define BPF_EXIST 2 /* update existing element */102#define BPF_EXIST 2 /* update existing element */
100 103
104#define BPF_F_NO_PREALLOC (1U << 0)
105
101union bpf_attr {106union bpf_attr {
102 struct { /* anonymous struct used by BPF_MAP_CREATE command */107 struct { /* anonymous struct used by BPF_MAP_CREATE command */
103 __u32 map_type; /* one of enum bpf_map_type */108 __u32 map_type; /* one of enum bpf_map_type */
104 __u32 key_size; /* size of key in bytes */109 __u32 key_size; /* size of key in bytes */
105 __u32 value_size; /* size of value in bytes */110 __u32 value_size; /* size of value in bytes */
106 __u32 max_entries; /* max number of entries in a map */111 __u32 max_entries; /* max number of entries in a map */
112 __u32 map_flags; /* prealloc or not */
107 };113 };
108 114
109 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */115 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -270,6 +276,42 @@ enum bpf_func_id { · 160 unmodified lines
270 */276 */
271 BPF_FUNC_perf_event_output,277 BPF_FUNC_perf_event_output,
272 BPF_FUNC_skb_load_bytes,278 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,
273 __BPF_FUNC_MAX_ID,315 __BPF_FUNC_MAX_ID,
274};316};
275 317
@@ -277,6 +319,7 @@ enum bpf_func_id { · 1 unmodified line
277 319
278/* BPF_FUNC_skb_store_bytes flags. */320/* BPF_FUNC_skb_store_bytes flags. */
279#define BPF_F_RECOMPUTE_CSUM (1ULL << 0)321#define BPF_F_RECOMPUTE_CSUM (1ULL << 0)
322#define BPF_F_INVALIDATE_HASH (1ULL << 1)
280 323
281/* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.324/* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.
282 * First 4 bits are for passing the header field size.325 * First 4 bits are for passing the header field size.
@@ -285,6 +328,7 @@ enum bpf_func_id { · 2 unmodified lines
285 328
286/* BPF_FUNC_l4_csum_replace flags. */329/* BPF_FUNC_l4_csum_replace flags. */
287#define BPF_F_PSEUDO_HDR (1ULL << 4)330#define BPF_F_PSEUDO_HDR (1ULL << 4)
331#define BPF_F_MARK_MANGLED_0 (1ULL << 5)
288 332
289/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */333/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
290#define BPF_F_INGRESS (1ULL << 0)334#define BPF_F_INGRESS (1ULL << 0)
@@ -292,8 +336,15 @@ enum bpf_func_id { · 1 unmodified line
292/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */336/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
293#define BPF_F_TUNINFO_IPV6 (1ULL << 0)337#define BPF_F_TUNINFO_IPV6 (1ULL << 0)
294 338
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
295/* BPF_FUNC_skb_set_tunnel_key flags. */345/* BPF_FUNC_skb_set_tunnel_key flags. */
296#define BPF_F_ZERO_CSUM_TX (1ULL << 1)346#define BPF_F_ZERO_CSUM_TX (1ULL << 1)
347#define BPF_F_DONT_FRAGMENT (1ULL << 2)
297 348
298/* user accessible mirror of in-kernel sk_buff.349/* user accessible mirror of in-kernel sk_buff.
299 * new fields can only be added to the end of this structure350 * new fields can only be added to the end of this structure
@@ -324,6 +375,8 @@ struct bpf_tunnel_key { · 24 unmodified lines
324 };375 };
325 __u8 tunnel_tos;376 __u8 tunnel_tos;
326 __u8 tunnel_ttl;377 __u8 tunnel_ttl;
378 __u16 tunnel_ext;
379 __u32 tunnel_label;
327};380};
328 381
329#endif /* _UAPI__LINUX_BPF_H__ */382#endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/byteorder/big_endian.h+12−12
@@ -40,51 +40,51 @@ · 39 unmodified lines
40#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))40#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
41#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))41#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
42 42
43static inline __le64 __cpu_to_le64p(const __u64 *p)43static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
44{44{
45 return (__force __le64)__swab64p(p);45 return (__force __le64)__swab64p(p);
46}46}
47static inline __u64 __le64_to_cpup(const __le64 *p)47static __always_inline __u64 __le64_to_cpup(const __le64 *p)
48{48{
49 return __swab64p((__u64 *)p);49 return __swab64p((__u64 *)p);
50}50}
51static inline __le32 __cpu_to_le32p(const __u32 *p)51static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
52{52{
53 return (__force __le32)__swab32p(p);53 return (__force __le32)__swab32p(p);
54}54}
55static inline __u32 __le32_to_cpup(const __le32 *p)55static __always_inline __u32 __le32_to_cpup(const __le32 *p)
56{56{
57 return __swab32p((__u32 *)p);57 return __swab32p((__u32 *)p);
58}58}
59static inline __le16 __cpu_to_le16p(const __u16 *p)59static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
60{60{
61 return (__force __le16)__swab16p(p);61 return (__force __le16)__swab16p(p);
62}62}
63static inline __u16 __le16_to_cpup(const __le16 *p)63static __always_inline __u16 __le16_to_cpup(const __le16 *p)
64{64{
65 return __swab16p((__u16 *)p);65 return __swab16p((__u16 *)p);
66}66}
67static inline __be64 __cpu_to_be64p(const __u64 *p)67static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
68{68{
69 return (__force __be64)*p;69 return (__force __be64)*p;
70}70}
71static inline __u64 __be64_to_cpup(const __be64 *p)71static __always_inline __u64 __be64_to_cpup(const __be64 *p)
72{72{
73 return (__force __u64)*p;73 return (__force __u64)*p;
74}74}
75static inline __be32 __cpu_to_be32p(const __u32 *p)75static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
76{76{
77 return (__force __be32)*p;77 return (__force __be32)*p;
78}78}
79static inline __u32 __be32_to_cpup(const __be32 *p)79static __always_inline __u32 __be32_to_cpup(const __be32 *p)
80{80{
81 return (__force __u32)*p;81 return (__force __u32)*p;
82}82}
83static inline __be16 __cpu_to_be16p(const __u16 *p)83static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
84{84{
85 return (__force __be16)*p;85 return (__force __be16)*p;
86}86}
87static inline __u16 __be16_to_cpup(const __be16 *p)87static __always_inline __u16 __be16_to_cpup(const __be16 *p)
88{88{
89 return (__force __u16)*p;89 return (__force __u16)*p;
90}90}
include/uapi/linux/byteorder/little_endian.h+12−12
@@ -40,51 +40,51 @@ · 39 unmodified lines
40#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))40#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
41#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))41#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
42 42
43static inline __le64 __cpu_to_le64p(const __u64 *p)43static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
44{44{
45 return (__force __le64)*p;45 return (__force __le64)*p;
46}46}
47static inline __u64 __le64_to_cpup(const __le64 *p)47static __always_inline __u64 __le64_to_cpup(const __le64 *p)
48{48{
49 return (__force __u64)*p;49 return (__force __u64)*p;
50}50}
51static inline __le32 __cpu_to_le32p(const __u32 *p)51static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
52{52{
53 return (__force __le32)*p;53 return (__force __le32)*p;
54}54}
55static inline __u32 __le32_to_cpup(const __le32 *p)55static __always_inline __u32 __le32_to_cpup(const __le32 *p)
56{56{
57 return (__force __u32)*p;57 return (__force __u32)*p;
58}58}
59static inline __le16 __cpu_to_le16p(const __u16 *p)59static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
60{60{
61 return (__force __le16)*p;61 return (__force __le16)*p;
62}62}
63static inline __u16 __le16_to_cpup(const __le16 *p)63static __always_inline __u16 __le16_to_cpup(const __le16 *p)
64{64{
65 return (__force __u16)*p;65 return (__force __u16)*p;
66}66}
67static inline __be64 __cpu_to_be64p(const __u64 *p)67static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
68{68{
69 return (__force __be64)__swab64p(p);69 return (__force __be64)__swab64p(p);
70}70}
71static inline __u64 __be64_to_cpup(const __be64 *p)71static __always_inline __u64 __be64_to_cpup(const __be64 *p)
72{72{
73 return __swab64p((__u64 *)p);73 return __swab64p((__u64 *)p);
74}74}
75static inline __be32 __cpu_to_be32p(const __u32 *p)75static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
76{76{
77 return (__force __be32)__swab32p(p);77 return (__force __be32)__swab32p(p);
78}78}
79static inline __u32 __be32_to_cpup(const __be32 *p)79static __always_inline __u32 __be32_to_cpup(const __be32 *p)
80{80{
81 return __swab32p((__u32 *)p);81 return __swab32p((__u32 *)p);
82}82}
83static inline __be16 __cpu_to_be16p(const __u16 *p)83static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
84{84{
85 return (__force __be16)__swab16p(p);85 return (__force __be16)__swab16p(p);
86}86}
87static inline __u16 __be16_to_cpup(const __be16 *p)87static __always_inline __u16 __be16_to_cpup(const __be16 *p)
88{88{
89 return __swab16p((__u16 *)p);89 return __swab16p((__u16 *)p);
90}90}
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
19enum 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
42enum 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
49enum 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. */
25struct 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
39#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */39#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */
40#define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */40#define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */
41#define Q_XGETQSTATV XQM_CMD(8) /* newer version of get quota */41#define Q_XGETQSTATV XQM_CMD(8) /* newer version of get quota */
42#define Q_XGETNEXTQUOTA XQM_CMD(9) /* get disk limits and usage >= ID */
42 43
43/*44/*
44 * fs_disk_quota structure:45 * fs_disk_quota structure:
include/uapi/linux/elf-em.h+0−3
@@ -30,7 +30,6 @@ · 29 unmodified lines
30#define EM_X86_64 62 /* AMD x86-64 */30#define EM_X86_64 62 /* AMD x86-64 */
31#define EM_S390 22 /* IBM S/390 */31#define EM_S390 22 /* IBM S/390 */
32#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */32#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
33#define EM_V850 87 /* NEC v850 */
34#define EM_M32R 88 /* Renesas M32R */33#define EM_M32R 88 /* Renesas M32R */
35#define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */34#define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */
36#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */35#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
@@ -50,8 +49,6 @@ · 13 unmodified lines
50 */49 */
51#define EM_ALPHA 0x902650#define EM_ALPHA 0x9026
52 51
53/* Bogus old v850 magic number, used by old tools. */
54#define EM_CYGNUS_V850 0x9080
55/* Bogus old m32r magic number, used by old tools. */52/* Bogus old m32r magic number, used by old tools. */
56#define EM_CYGNUS_M32R 0x904153#define EM_CYGNUS_M32R 0x9041
57/* This is the old interim value for S/390 architecture */54/* This is the old interim value for S/390 architecture */
include/uapi/linux/ethtool.h+362−75
@@ -13,15 +13,21 @@ · 12 unmodified lines
13#ifndef _UAPI_LINUX_ETHTOOL_H13#ifndef _UAPI_LINUX_ETHTOOL_H
14#define _UAPI_LINUX_ETHTOOL_H14#define _UAPI_LINUX_ETHTOOL_H
15 15
16#include <linux/kernel.h>
16#include <linux/types.h>17#include <linux/types.h>
17#include <linux/if_ether.h>18#include <linux/if_ether.h>
18 19
20#ifndef __KERNEL__
21#include <limits.h> /* for INT_MAX */
22#endif
23
19/* All structures exposed to userland should be defined such that they24/* All structures exposed to userland should be defined such that they
20 * have the same layout for 32-bit and 64-bit userland.25 * have the same layout for 32-bit and 64-bit userland.
21 */26 */
22 27
23/**28/**
24 * struct ethtool_cmd - link control and status29 * struct ethtool_cmd - DEPRECATED, link control and status
30 * This structure is DEPRECATED, please use struct ethtool_link_settings.
25 * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET31 * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET
26 * @supported: Bitmask of %SUPPORTED_* flags for the link modes,32 * @supported: Bitmask of %SUPPORTED_* flags for the link modes,
27 * physical connectors and other link features for which the33 * physical connectors and other link features for which the
@@ -31,7 +37,7 @@ · 3 unmodified lines
31 * physical connectors and other link features that are37 * physical connectors and other link features that are
32 * advertised through autonegotiation or enabled for38 * advertised through autonegotiation or enabled for
33 * auto-detection.39 * auto-detection.
34 * @speed: Low bits of the speed40 * @speed: Low bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
35 * @duplex: Duplex mode; one of %DUPLEX_*41 * @duplex: Duplex mode; one of %DUPLEX_*
36 * @port: Physical connector type; one of %PORT_*42 * @port: Physical connector type; one of %PORT_*
37 * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not43 * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
@@ -47,7 +53,7 @@ · 9 unmodified lines
47 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.53 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
48 * @maxrxpkt: Historically used to report RX IRQ coalescing; now54 * @maxrxpkt: Historically used to report RX IRQ coalescing; now
49 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.55 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
50 * @speed_hi: High bits of the speed56 * @speed_hi: High bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
51 * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of57 * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
52 * %ETH_TP_MDI_*. If the status is unknown or not applicable, the58 * %ETH_TP_MDI_*. If the status is unknown or not applicable, the
53 * value will be %ETH_TP_MDI_INVALID. Read-only.59 * value will be %ETH_TP_MDI_INVALID. Read-only.
@@ -748,6 +754,56 @@ struct ethtool_usrip4_spec { · 694 unmodified lines
748 __u8 proto;754 __u8 proto;
749};755};
750 756
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 */
767struct 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 */
784struct 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 */
799struct 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
751union ethtool_flow_union {807union ethtool_flow_union {
752 struct ethtool_tcpip4_spec tcp_ip4_spec;808 struct ethtool_tcpip4_spec tcp_ip4_spec;
753 struct ethtool_tcpip4_spec udp_ip4_spec;809 struct ethtool_tcpip4_spec udp_ip4_spec;
@@ -755,6 +811,12 @@ union ethtool_flow_union { · 1 unmodified line
755 struct ethtool_ah_espip4_spec ah_ip4_spec;811 struct ethtool_ah_espip4_spec ah_ip4_spec;
756 struct ethtool_ah_espip4_spec esp_ip4_spec;812 struct ethtool_ah_espip4_spec esp_ip4_spec;
757 struct ethtool_usrip4_spec usr_ip4_spec;813 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;
758 struct ethhdr ether_spec;820 struct ethhdr ether_spec;
759 __u8 hdata[52];821 __u8 hdata[52];
760};822};
@@ -1146,10 +1208,29 @@ enum ethtool_sfeatures_retval_bits { · 385 unmodified lines
1146#define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)1208#define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)
1147#define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)1209#define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)
1148 1210
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 */
1220struct 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};
1149 1226
1150/* CMDs currently supported */1227/* CMDs currently supported */
1151#define ETHTOOL_GSET 0x00000001 /* Get settings. */1228#define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings.
1152#define ETHTOOL_SSET 0x00000002 /* Set settings. */1229 * Please use ETHTOOL_GLINKSETTINGS
1230 */
1231#define ETHTOOL_SSET 0x00000002 /* DEPRECATED, Set settings.
1232 * Please use ETHTOOL_SLINKSETTINGS
1233 */
1153#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */1234#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
1154#define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */1235#define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */
1155#define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */1236#define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */
@@ -1229,73 +1310,141 @@ enum ethtool_sfeatures_retval_bits { · 73 unmodified lines
1229#define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */1310#define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */
1230#define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */1311#define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */
1231 1312
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
1232/* compatibility with older code */1319/* compatibility with older code */
1233#define SPARC_ETH_GSET ETHTOOL_GSET1320#define SPARC_ETH_GSET ETHTOOL_GSET
1234#define SPARC_ETH_SSET ETHTOOL_SSET1321#define SPARC_ETH_SSET ETHTOOL_SSET
1235 1322
1236#define SUPPORTED_10baseT_Half (1 << 0)1323/* Link mode bit indices */
1237#define SUPPORTED_10baseT_Full (1 << 1)1324enum ethtool_link_mode_bit_indices {
1238#define SUPPORTED_100baseT_Half (1 << 2)1325 ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0,
1239#define SUPPORTED_100baseT_Full (1 << 3)1326 ETHTOOL_LINK_MODE_10baseT_Full_BIT = 1,
1240#define SUPPORTED_1000baseT_Half (1 << 4)1327 ETHTOOL_LINK_MODE_100baseT_Half_BIT = 2,
1241#define SUPPORTED_1000baseT_Full (1 << 5)1328 ETHTOOL_LINK_MODE_100baseT_Full_BIT = 3,
1242#define SUPPORTED_Autoneg (1 << 6)1329 ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 4,
1243#define SUPPORTED_TP (1 << 7)1330 ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 5,
1244#define SUPPORTED_AUI (1 << 8)1331 ETHTOOL_LINK_MODE_Autoneg_BIT = 6,
1245#define SUPPORTED_MII (1 << 9)1332 ETHTOOL_LINK_MODE_TP_BIT = 7,
1246#define SUPPORTED_FIBRE (1 << 10)1333 ETHTOOL_LINK_MODE_AUI_BIT = 8,
1247#define SUPPORTED_BNC (1 << 11)1334 ETHTOOL_LINK_MODE_MII_BIT = 9,
1248#define SUPPORTED_10000baseT_Full (1 << 12)1335 ETHTOOL_LINK_MODE_FIBRE_BIT = 10,
1249#define SUPPORTED_Pause (1 << 13)1336 ETHTOOL_LINK_MODE_BNC_BIT = 11,
1250#define SUPPORTED_Asym_Pause (1 << 14)1337 ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 12,
1251#define SUPPORTED_2500baseX_Full (1 << 15)1338 ETHTOOL_LINK_MODE_Pause_BIT = 13,
1252#define SUPPORTED_Backplane (1 << 16)1339 ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14,
1253#define SUPPORTED_1000baseKX_Full (1 << 17)1340 ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 15,
1254#define SUPPORTED_10000baseKX4_Full (1 << 18)1341 ETHTOOL_LINK_MODE_Backplane_BIT = 16,
1255#define SUPPORTED_10000baseKR_Full (1 << 19)1342 ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 17,
1256#define SUPPORTED_10000baseR_FEC (1 << 20)1343 ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18,
1257#define SUPPORTED_20000baseMLD2_Full (1 << 21)1344 ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 19,
1258#define SUPPORTED_20000baseKR2_Full (1 << 22)1345 ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 20,
1259#define SUPPORTED_40000baseKR4_Full (1 << 23)1346 ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21,
1260#define SUPPORTED_40000baseCR4_Full (1 << 24)1347 ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22,
1261#define SUPPORTED_40000baseSR4_Full (1 << 25)1348 ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23,
1262#define SUPPORTED_40000baseLR4_Full (1 << 26)1349 ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24,
1263#define SUPPORTED_56000baseKR4_Full (1 << 27)1350 ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25,
1264#define SUPPORTED_56000baseCR4_Full (1 << 28)1351 ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26,
1265#define SUPPORTED_56000baseSR4_Full (1 << 29)1352 ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27,
1266#define SUPPORTED_56000baseLR4_Full (1 << 30)1353 ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28,
1267 1354 ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29,
1268#define ADVERTISED_10baseT_Half (1 << 0)1355 ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30,
1269#define ADVERTISED_10baseT_Full (1 << 1)1356
1270#define ADVERTISED_100baseT_Half (1 << 2)1357 /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
1271#define ADVERTISED_100baseT_Full (1 << 3)1358 * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
1272#define ADVERTISED_1000baseT_Half (1 << 4)1359 * macro for bits > 31. The only way to use indices > 31 is to
1273#define ADVERTISED_1000baseT_Full (1 << 5)1360 * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API.
1274#define ADVERTISED_Autoneg (1 << 6)1361 */
1275#define ADVERTISED_TP (1 << 7)1362
1276#define ADVERTISED_AUI (1 << 8)1363 __ETHTOOL_LINK_MODE_LAST
1277#define ADVERTISED_MII (1 << 9)1364 = ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
1278#define ADVERTISED_FIBRE (1 << 10)1365};
1279#define ADVERTISED_BNC (1 << 11)1366
1280#define ADVERTISED_10000baseT_Full (1 << 12)1367#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \
1281#define ADVERTISED_Pause (1 << 13)1368 (1UL << (ETHTOOL_LINK_MODE_ ## base_name ## _BIT))
1282#define ADVERTISED_Asym_Pause (1 << 14)1369
1283#define ADVERTISED_2500baseX_Full (1 << 15)1370/* DEPRECATED macros. Please migrate to
1284#define ADVERTISED_Backplane (1 << 16)1371 * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT
1285#define ADVERTISED_1000baseKX_Full (1 << 17)1372 * define any new SUPPORTED_* macro for bits > 31.
1286#define ADVERTISED_10000baseKX4_Full (1 << 18)1373 */
1287#define ADVERTISED_10000baseKR_Full (1 << 19)1374#define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
1288#define ADVERTISED_10000baseR_FEC (1 << 20)1375#define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
1289#define ADVERTISED_20000baseMLD2_Full (1 << 21)1376#define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
1290#define ADVERTISED_20000baseKR2_Full (1 << 22)1377#define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
1291#define ADVERTISED_40000baseKR4_Full (1 << 23)1378#define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
1292#define ADVERTISED_40000baseCR4_Full (1 << 24)1379#define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
1293#define ADVERTISED_40000baseSR4_Full (1 << 25)1380#define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
1294#define ADVERTISED_40000baseLR4_Full (1 << 26)1381#define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
1295#define ADVERTISED_56000baseKR4_Full (1 << 27)1382#define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
1296#define ADVERTISED_56000baseCR4_Full (1 << 28)1383#define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
1297#define ADVERTISED_56000baseSR4_Full (1 << 29)1384#define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
1298#define ADVERTISED_56000baseLR4_Full (1 << 30)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 */
1299 1448
1300/* The following are all involved in forcing a particular link1449/* The following are all involved in forcing a particular link
1301 * mode for the device for setting things. When getting the1450 * mode for the device for setting things. When getting the
@@ -1303,7 +1452,7 @@ enum ethtool_sfeatures_retval_bits { · 1 unmodified line
1303 * it was forced up into this mode or autonegotiated.1452 * it was forced up into this mode or autonegotiated.
1304 */1453 */
1305 1454
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. */
1307#define SPEED_10 101456#define SPEED_10 10
1308#define SPEED_100 1001457#define SPEED_100 100
1309#define SPEED_1000 10001458#define SPEED_1000 1000
@@ -1319,11 +1468,28 @@ enum ethtool_sfeatures_retval_bits { · 9 unmodified lines
1319 1468
1320#define SPEED_UNKNOWN -11469#define SPEED_UNKNOWN -1
1321 1470
1471static inline int ethtool_validate_speed(__u32 speed)
1472{
1473 return speed <= INT_MAX || speed == SPEED_UNKNOWN;
1474}
1475
1322/* Duplex, half or full. */1476/* Duplex, half or full. */
1323#define DUPLEX_HALF 0x001477#define DUPLEX_HALF 0x00
1324#define DUPLEX_FULL 0x011478#define DUPLEX_FULL 0x01
1325#define DUPLEX_UNKNOWN 0xff1479#define DUPLEX_UNKNOWN 0xff
1326 1480
1481static 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
1327/* Which connector port. */1493/* Which connector port. */
1328#define PORT_TP 0x001494#define PORT_TP 0x00
1329#define PORT_AUI 0x011495#define PORT_AUI 0x01
@@ -1367,15 +1533,17 @@ enum ethtool_sfeatures_retval_bits { · 37 unmodified lines
1367#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */1533#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */
1368#define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */1534#define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */
1369#define AH_ESP_V4_FLOW 0x04 /* hash only */1535#define AH_ESP_V4_FLOW 0x04 /* hash only */
1370#define TCP_V6_FLOW 0x05 /* hash only */1536#define TCP_V6_FLOW 0x05 /* hash or spec (tcp_ip6_spec; nfc only) */
1371#define UDP_V6_FLOW 0x06 /* hash only */1537#define UDP_V6_FLOW 0x06 /* hash or spec (udp_ip6_spec; nfc only) */
1372#define SCTP_V6_FLOW 0x07 /* hash only */1538#define SCTP_V6_FLOW 0x07 /* hash or spec (sctp_ip6_spec; nfc only) */
1373#define AH_ESP_V6_FLOW 0x08 /* hash only */1539#define AH_ESP_V6_FLOW 0x08 /* hash only */
1374#define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */1540#define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */
1375#define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */1541#define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */
1376#define AH_V6_FLOW 0x0b /* hash only */1542#define AH_V6_FLOW 0x0b /* hash or spec (ah_ip6_spec; nfc only) */
1377#define ESP_V6_FLOW 0x0c /* hash only */1543#define ESP_V6_FLOW 0x0c /* hash or spec (esp_ip6_spec; nfc only) */
1378#define IP_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */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) */
1379#define IPV4_FLOW 0x10 /* hash only */1547#define IPV4_FLOW 0x10 /* hash only */
1380#define IPV6_FLOW 0x11 /* hash only */1548#define IPV6_FLOW 0x11 /* hash only */
1381#define ETHER_FLOW 0x12 /* spec only (ether_spec) */1549#define ETHER_FLOW 0x12 /* spec only (ether_spec) */
@@ -1441,4 +1609,123 @@ enum ethtool_reset_flags { · 59 unmodified lines
1441};1609};
1442#define ETH_RESET_SHARED_SHIFT 161610#define ETH_RESET_SHARED_SHIFT 16
1443 1611
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 */
1712struct 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};
1444#endif /* _UAPI_LINUX_ETHTOOL_H */1731#endif /* _UAPI_LINUX_ETHTOOL_H */
include/uapi/linux/fs.h+21−0
@@ -246,6 +246,24 @@ struct fsxattr { · 245 unmodified lines
246#define FS_IOC_FSGETXATTR _IOR ('X', 31, struct fsxattr)246#define FS_IOC_FSGETXATTR _IOR ('X', 31, struct fsxattr)
247#define FS_IOC_FSSETXATTR _IOW ('X', 32, struct fsxattr)247#define FS_IOC_FSSETXATTR _IOW ('X', 32, struct fsxattr)
248 248
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
255struct 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
249/*267/*
250 * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)268 * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
251 *269 *
@@ -304,4 +322,7 @@ struct fsxattr { · 52 unmodified lines
304#define SYNC_FILE_RANGE_WRITE 2322#define SYNC_FILE_RANGE_WRITE 2
305#define SYNC_FILE_RANGE_WAIT_AFTER 4323#define SYNC_FILE_RANGE_WAIT_AFTER 4
306 324
325/* flags for preadv2/pwritev2: */
326#define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */
327
307#endif /* _UAPI_LINUX_FS_H */328#endif /* _UAPI_LINUX_FS_H */
include/uapi/linux/genetlink.h+1−0
@@ -21,6 +21,7 @@ struct genlmsghdr { · 20 unmodified lines
21#define GENL_CMD_CAP_DO 0x0221#define GENL_CMD_CAP_DO 0x02
22#define GENL_CMD_CAP_DUMP 0x0422#define GENL_CMD_CAP_DUMP 0x04
23#define GENL_CMD_CAP_HASPOL 0x0823#define GENL_CMD_CAP_HASPOL 0x08
24#define GENL_UNS_ADMIN_PERM 0x10
24 25
25/*26/*
26 * List of reserved static generic netlink identifiers:27 * 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 */
23struct 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 */
48struct 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
37 * are shared for all types of net_devices. The sysfs entries are available37 * are shared for all types of net_devices. The sysfs entries are available
38 * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs38 * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs
39 * are annotated below, note that only a few flags can be toggled and some39 * 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 flags40 * other flags are always preserved from the original net_device flags
41 * even if you try to set them via sysfs. Flags which are always preserved41 * even if you try to set them via sysfs. Flags which are always preserved
42 * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile42 * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile
43 * are annotated below as such.43 * are annotated below as such.
include/uapi/linux/if_bridge.h+35−2
@@ -137,11 +137,17 @@ struct bridge_vlan_info { · 136 unmodified lines
137/* Bridge multicast database attributes137/* Bridge multicast database attributes
138 * [MDBA_MDB] = {138 * [MDBA_MDB] = {
139 * [MDBA_MDB_ENTRY] = {139 * [MDBA_MDB_ENTRY] = {
140 * [MDBA_MDB_ENTRY_INFO]140 * [MDBA_MDB_ENTRY_INFO] {
141 * struct br_mdb_entry
142 * [MDBA_MDB_EATTR attributes]
143 * }
141 * }144 * }
142 * }145 * }
143 * [MDBA_ROUTER] = {146 * [MDBA_ROUTER] = {
144 * [MDBA_ROUTER_PORT]147 * [MDBA_ROUTER_PORT] = {
148 * u32 ifindex
149 * [MDBA_ROUTER_PATTR attributes]
150 * }
145 * }151 * }
146 */152 */
147enum {153enum {
@@ -166,6 +172,22 @@ enum { · 18 unmodified lines
166};172};
167#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)173#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
168 174
175/* per mdb entry additional attributes */
176enum {
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 */
184enum {
185 MDB_RTR_TYPE_DISABLED,
186 MDB_RTR_TYPE_TEMP_QUERY,
187 MDB_RTR_TYPE_PERM,
188 MDB_RTR_TYPE_TEMP
189};
190
169enum {191enum {
170 MDBA_ROUTER_UNSPEC,192 MDBA_ROUTER_UNSPEC,
171 MDBA_ROUTER_PORT,193 MDBA_ROUTER_PORT,
@@ -173,6 +195,15 @@ enum { · 1 unmodified line
173};195};
174#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)196#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
175 197
198/* router port attributes */
199enum {
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
176struct br_port_msg {207struct br_port_msg {
177 __u8 family;208 __u8 family;
178 __u32 ifindex;209 __u32 ifindex;
@@ -183,6 +214,8 @@ struct br_mdb_entry { · 4 unmodified lines
183#define MDB_TEMPORARY 0214#define MDB_TEMPORARY 0
184#define MDB_PERMANENT 1215#define MDB_PERMANENT 1
185 __u8 state;216 __u8 state;
217#define MDB_FLAGS_OFFLOAD (1 << 0)
218 __u8 flags;
186 __u16 vid;219 __u16 vid;
187 struct {220 struct {
188 union {221 union {
include/uapi/linux/if_ether.h+1−0
@@ -83,6 +83,7 @@ · 82 unmodified lines
83#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */83#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */
84#define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */84#define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */
85#define ETH_P_TIPC 0x88CA /* TIPC */85#define ETH_P_TIPC 0x88CA /* TIPC */
86#define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */
86#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */87#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
87#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */88#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
88#define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */89#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
35 /* for cslip etc */35 /* for cslip etc */
36 __u32 rx_compressed;36 __u32 rx_compressed;
37 __u32 tx_compressed;37 __u32 tx_compressed;
38
39 __u32 rx_nohandler; /* dropped, no handler found */
38};40};
39 41
40/* The main device statistics structure */42/* The main device statistics structure */
@@ -68,6 +70,8 @@ struct rtnl_link_stats64 { · 27 unmodified lines
68 /* for cslip etc */70 /* for cslip etc */
69 __u64 rx_compressed;71 __u64 rx_compressed;
70 __u64 tx_compressed;72 __u64 tx_compressed;
73
74 __u64 rx_nohandler; /* dropped, no handler found */
71};75};
72 76
73/* The struct should be in sync with struct ifmap */77/* The struct should be in sync with struct ifmap */
@@ -149,6 +153,8 @@ enum { · 75 unmodified lines
149 IFLA_LINK_NETNSID,153 IFLA_LINK_NETNSID,
150 IFLA_PHYS_PORT_NAME,154 IFLA_PHYS_PORT_NAME,
151 IFLA_PROTO_DOWN,155 IFLA_PROTO_DOWN,
156 IFLA_GSO_MAX_SEGS,
157 IFLA_GSO_MAX_SIZE,
152 __IFLA_MAX158 __IFLA_MAX
153};159};
154 160
@@ -401,6 +407,43 @@ enum { · 246 unmodified lines
401 407
402#define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)408#define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
403 409
410enum {
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 */
419enum {
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
439enum 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
404/* IPVLAN section */447/* IPVLAN section */
405enum {448enum {
406 IFLA_IPVLAN_UNSPEC,449 IFLA_IPVLAN_UNSPEC,
@@ -444,6 +487,7 @@ enum { · 37 unmodified lines
444 IFLA_VXLAN_GBP,487 IFLA_VXLAN_GBP,
445 IFLA_VXLAN_REMCSUM_NOPARTIAL,488 IFLA_VXLAN_REMCSUM_NOPARTIAL,
446 IFLA_VXLAN_COLLECT_METADATA,489 IFLA_VXLAN_COLLECT_METADATA,
490 IFLA_VXLAN_LABEL,
447 __IFLA_VXLAN_MAX491 __IFLA_VXLAN_MAX
448};492};
449#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)493#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
@@ -466,6 +510,7 @@ enum { · 16 unmodified lines
466 IFLA_GENEVE_UDP_CSUM,510 IFLA_GENEVE_UDP_CSUM,
467 IFLA_GENEVE_UDP_ZERO_CSUM6_TX,511 IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
468 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,512 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
513 IFLA_GENEVE_LABEL,
469 __IFLA_GENEVE_MAX514 __IFLA_GENEVE_MAX
470};515};
471#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)516#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
@@ -556,6 +601,8 @@ enum { · 84 unmodified lines
556 */601 */
557 IFLA_VF_STATS, /* network device statistics */602 IFLA_VF_STATS, /* network device statistics */
558 IFLA_VF_TRUST, /* Trust VF */603 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 */
559 __IFLA_VF_MAX,606 __IFLA_VF_MAX,
560};607};
561 608
@@ -588,6 +635,11 @@ struct ifla_vf_spoofchk { · 26 unmodified lines
588 __u32 setting;635 __u32 setting;
589};636};
590 637
638struct ifla_vf_guid {
639 __u32 vf;
640 __u64 guid;
641};
642
591enum {643enum {
592 IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */644 IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */
593 IFLA_VF_LINK_STATE_ENABLE, /* link always up */645 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
28enum 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
43enum 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
63enum 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
74enum 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
87enum 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 */
101enum 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 */
119enum 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 */
134enum 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 */
146enum 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
37 IIO_VELOCITY,37 IIO_VELOCITY,
38 IIO_CONCENTRATION,38 IIO_CONCENTRATION,
39 IIO_RESISTANCE,39 IIO_RESISTANCE,
40 IIO_PH,
40};41};
41 42
42enum iio_modifier {43enum iio_modifier {
include/uapi/linux/input.h+1−0
@@ -246,6 +246,7 @@ struct input_mask { · 245 unmodified lines
246#define BUS_GSC 0x1A246#define BUS_GSC 0x1A
247#define BUS_ATARI 0x1B247#define BUS_ATARI 0x1B
248#define BUS_SPI 0x1C248#define BUS_SPI 0x1C
249#define BUS_RMI 0x1D
249 250
250/*251/*
251 * MT_TOOL types252 * MT_TOOL types
include/uapi/linux/ip.h+2−0
@@ -165,6 +165,8 @@ enum · 164 unmodified lines
165 IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,165 IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,
166 IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,166 IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
167 IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,167 IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
168 IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
169 IPV4_DEVCONF_DROP_GRATUITOUS_ARP,
168 __IPV4_DEVCONF_MAX170 __IPV4_DEVCONF_MAX
169};171};
170 172
include/uapi/linux/ipv6.h+3−0
@@ -174,6 +174,9 @@ enum { · 173 unmodified lines
174 DEVCONF_USE_OIF_ADDRS_ONLY,174 DEVCONF_USE_OIF_ADDRS_ONLY,
175 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,175 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
176 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,176 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
177 DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
178 DEVCONF_DROP_UNSOLICITED_NA,
179 DEVCONF_KEEP_ADDR_ON_DOWN,
177 DEVCONF_MAX180 DEVCONF_MAX
178};181};
179 182
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
17struct kcm_attach {
18 int fd;
19 int bpf_fd;
20};
21
22struct kcm_unattach {
23 int fd;
24};
25
26struct 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
9#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)9#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
10#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))10#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
11 11
12#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
12 13
13#endif /* _UAPI_LINUX_KERNEL_H */14#endif /* _UAPI_LINUX_KERNEL_H */
include/uapi/linux/kvm.h+18−1
@@ -157,6 +157,7 @@ struct kvm_s390_skeys { · 156 unmodified lines
157 157
158struct kvm_hyperv_exit {158struct kvm_hyperv_exit {
159#define KVM_EXIT_HYPERV_SYNIC 1159#define KVM_EXIT_HYPERV_SYNIC 1
160#define KVM_EXIT_HYPERV_HCALL 2
160 __u32 type;161 __u32 type;
161 union {162 union {
162 struct {163 struct {
@@ -165,6 +166,11 @@ struct kvm_hyperv_exit { · 2 unmodified lines
165 __u64 evt_page;166 __u64 evt_page;
166 __u64 msg_page;167 __u64 msg_page;
167 } synic;168 } synic;
169 struct {
170 __u64 input;
171 __u64 result;
172 __u64 params[2];
173 } hcall;
168 } u;174 } u;
169};175};
170 176
@@ -541,7 +547,13 @@ struct kvm_s390_pgm_info { · 370 unmodified lines
541 __u8 exc_access_id;547 __u8 exc_access_id;
542 __u8 per_access_id;548 __u8 per_access_id;
543 __u8 op_access_id;549 __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];
545};557};
546 558
547struct kvm_s390_prefix_info {559struct kvm_s390_prefix_info {
@@ -850,6 +862,9 @@ struct kvm_ppc_smmu_info { · 302 unmodified lines
850#define KVM_CAP_IOEVENTFD_ANY_LENGTH 122862#define KVM_CAP_IOEVENTFD_ANY_LENGTH 122
851#define KVM_CAP_HYPERV_SYNIC 123863#define KVM_CAP_HYPERV_SYNIC 123
852#define KVM_CAP_S390_RI 124864#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
853 868
854#ifdef KVM_CAP_IRQ_ROUTING869#ifdef KVM_CAP_IRQ_ROUTING
855 870
@@ -1142,6 +1157,8 @@ struct kvm_s390_ucas_mapping { · 286 unmodified lines
1142/* Available with KVM_CAP_PPC_ALLOC_HTAB */1157/* Available with KVM_CAP_PPC_ALLOC_HTAB */
1143#define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)1158#define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)
1144#define KVM_CREATE_SPAPR_TCE _IOW(KVMIO, 0xa8, struct kvm_create_spapr_tce)1159#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)
1145/* Available with KVM_CAP_RMA */1162/* Available with KVM_CAP_RMA */
1146#define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma)1163#define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma)
1147/* Available with KVM_CAP_PPC_HTAB_FD */1164/* 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
78#define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002)78#define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002)
79#define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003)79#define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003)
80 80
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
81/*97/*
82 * Connectors98 * Connectors
83 */99 */
@@ -113,8 +129,12 @@ struct media_device_info { · 29 unmodified lines
113#define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3)129#define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3)
114#define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4)130#define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4)
115/*131/*
116 * It is a responsibility of the entity drivers to add connectors and links132 * It is a responsibility of the master/bridge drivers to add connectors
117 * for the tuner entities.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.
118 */138 */
119#define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5)139#define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5)
120 140
@@ -262,6 +282,7 @@ struct media_links_enum { · 141 unmodified lines
262 282
263#define MEDIA_INTF_T_DVB_BASE 0x00000100283#define MEDIA_INTF_T_DVB_BASE 0x00000100
264#define MEDIA_INTF_T_V4L_BASE 0x00000200284#define MEDIA_INTF_T_V4L_BASE 0x00000200
285#define MEDIA_INTF_T_ALSA_BASE 0x00000300
265 286
266/* Interface types */287/* Interface types */
267 288
@@ -277,6 +298,15 @@ struct media_links_enum { · 9 unmodified lines
277#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3)298#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3)
278#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)299#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
279 300
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
280/*310/*
281 * MC next gen API definitions311 * MC next gen API definitions
282 *312 *
@@ -296,7 +326,7 @@ struct media_links_enum { · 13 unmodified lines
296 * later, before the adding this API upstream.326 * later, before the adding this API upstream.
297 */327 */
298 328
299#if 0 /* Let's postpone it to Kernel 4.6 */329
300struct media_v2_entity {330struct media_v2_entity {
301 __u32 id;331 __u32 id;
302 char name[64]; /* FIXME: move to a property? (RFC says so) */332 char name[64]; /* FIXME: move to a property? (RFC says so) */
@@ -357,21 +387,12 @@ struct media_v2_topology { · 54 unmodified lines
357 __u64 ptr_links;387 __u64 ptr_links;
358} __attribute__ ((packed));388} __attribute__ ((packed));
359 389
360static inline void __user *media_get_uptr(__u64 arg)
361{
362 return (void __user *)(uintptr_t)arg;
363}
364#endif
365
366/* ioctls */390/* ioctls */
367 391
368#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)392#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)
369#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)393#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
370#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)394#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
371#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)395#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
372
373#if 0 /* Let's postpone it to Kernel 4.6 */
374#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)396#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
375#endif
376 397
377#endif /* __LINUX_MEDIA_H */398#endif /* __LINUX_MEDIA_H */
include/uapi/linux/mroute6.h+2−7
@@ -1,6 +1,7 @@
1#ifndef _UAPI__LINUX_MROUTE6_H1#ifndef _UAPI__LINUX_MROUTE6_H
2#define _UAPI__LINUX_MROUTE6_H2#define _UAPI__LINUX_MROUTE6_H
3 3
4#include <linux/kernel.h>
4#include <linux/types.h>5#include <linux/types.h>
5#include <linux/sockios.h>6#include <linux/sockios.h>
6 7
@@ -46,14 +47,8 @@ typedef unsigned short mifi_t; · 39 unmodified lines
46typedef __u32 if_mask;47typedef __u32 if_mask;
47#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */48#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */
48 49
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
55typedef struct if_set {50typedef 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)];
57} if_set;52} if_set;
58 53
59#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))54#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
98 } __packed records[0];98 } __packed records[0];
99} __packed;99} __packed;
100 100
101struct nd_cmd_clear_error {
102 __u64 address;
103 __u64 length;
104 __u32 status;
105 __u8 reserved[4];
106 __u64 cleared;
107} __packed;
108
101enum {109enum {
102 ND_CMD_IMPLEMENTED = 0,110 ND_CMD_IMPLEMENTED = 0,
103 111
@@ -105,6 +113,7 @@ enum { · 1 unmodified line
105 ND_CMD_ARS_CAP = 1,113 ND_CMD_ARS_CAP = 1,
106 ND_CMD_ARS_START = 2,114 ND_CMD_ARS_START = 2,
107 ND_CMD_ARS_STATUS = 3,115 ND_CMD_ARS_STATUS = 3,
116 ND_CMD_CLEAR_ERROR = 4,
108 117
109 /* per-dimm commands */118 /* per-dimm commands */
110 ND_CMD_SMART = 1,119 ND_CMD_SMART = 1,
@@ -129,6 +138,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) · 18 unmodified lines
129 [ND_CMD_ARS_CAP] = "ars_cap",138 [ND_CMD_ARS_CAP] = "ars_cap",
130 [ND_CMD_ARS_START] = "ars_start",139 [ND_CMD_ARS_START] = "ars_start",
131 [ND_CMD_ARS_STATUS] = "ars_status",140 [ND_CMD_ARS_STATUS] = "ars_status",
141 [ND_CMD_CLEAR_ERROR] = "clear_error",
132 };142 };
133 143
134 if (cmd < ARRAY_SIZE(names) && names[cmd])144 if (cmd < ARRAY_SIZE(names) && names[cmd])
@@ -187,6 +197,9 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) · 52 unmodified lines
187#define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\197#define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\
188 struct nd_cmd_ars_status)198 struct nd_cmd_ars_status)
189 199
200#define ND_IOCTL_CLEAR_ERROR _IOWR(ND_IOCTL, ND_CMD_CLEAR_ERROR,\
201 struct nd_cmd_clear_error)
202
190#define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */203#define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */
191#define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */204#define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */
192#define ND_DEVICE_REGION_BLK 3 /* nd_region: (parent of BLK namespaces) */205#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
19 __NETCONFA_MAX19 __NETCONFA_MAX
20};20};
21#define NETCONFA_MAX (__NETCONFA_MAX - 1)21#define NETCONFA_MAX (__NETCONFA_MAX - 1)
22#define NETCONFA_ALL -1
22 23
23#define NETCONFA_IFINDEX_ALL -124#define NETCONFA_IFINDEX_ALL -1
24#define NETCONFA_IFINDEX_DEFAULT -225#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
20 20
21 IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY,21 IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY,
22 IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY,22 IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY,
23 IP_CT_NEW_REPLY = IP_CT_NEW + IP_CT_IS_REPLY, 23 /* No NEW in reply direction. */
24 /* Number of distinct IP_CT types (no NEW in reply dirn). */24
25 IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 125 /* 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
26};32};
27 33
28#define NF_CT_STATE_INVALID_BIT (1 << 0)34#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
681 * @NFT_META_IIFGROUP: packet input interface group681 * @NFT_META_IIFGROUP: packet input interface group
682 * @NFT_META_OIFGROUP: packet output interface group682 * @NFT_META_OIFGROUP: packet output interface group
683 * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid)683 * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid)
684 * @NFT_META_PRANDOM: a 32bit pseudo-random number
684 */685 */
685enum nft_meta_keys {686enum nft_meta_keys {
686 NFT_META_LEN,687 NFT_META_LEN,
@@ -707,6 +708,7 @@ enum nft_meta_keys { · 20 unmodified lines
707 NFT_META_IIFGROUP,708 NFT_META_IIFGROUP,
708 NFT_META_OIFGROUP,709 NFT_META_OIFGROUP,
709 NFT_META_CGROUP,710 NFT_META_CGROUP,
711 NFT_META_PRANDOM,
710};712};
711 713
712/**714/**
@@ -949,10 +951,14 @@ enum nft_nat_attributes { · 236 unmodified lines
949 * enum nft_masq_attributes - nf_tables masquerade expression attributes951 * enum nft_masq_attributes - nf_tables masquerade expression attributes
950 *952 *
951 * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)953 * @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)
952 */956 */
953enum nft_masq_attributes {957enum nft_masq_attributes {
954 NFTA_MASQ_UNSPEC,958 NFTA_MASQ_UNSPEC,
955 NFTA_MASQ_FLAGS,959 NFTA_MASQ_FLAGS,
960 NFTA_MASQ_REG_PROTO_MIN,
961 NFTA_MASQ_REG_PROTO_MAX,
956 __NFTA_MASQ_MAX962 __NFTA_MASQ_MAX
957};963};
958#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)964#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
include/uapi/linux/netlink.h+4−0
@@ -107,8 +107,10 @@ struct nlmsgerr { · 106 unmodified lines
107#define NETLINK_PKTINFO 3107#define NETLINK_PKTINFO 3
108#define NETLINK_BROADCAST_ERROR 4108#define NETLINK_BROADCAST_ERROR 4
109#define NETLINK_NO_ENOBUFS 5109#define NETLINK_NO_ENOBUFS 5
110#ifndef __KERNEL__
110#define NETLINK_RX_RING 6111#define NETLINK_RX_RING 6
111#define NETLINK_TX_RING 7112#define NETLINK_TX_RING 7
113#endif
112#define NETLINK_LISTEN_ALL_NSID 8114#define NETLINK_LISTEN_ALL_NSID 8
113#define NETLINK_LIST_MEMBERSHIPS 9115#define NETLINK_LIST_MEMBERSHIPS 9
114#define NETLINK_CAP_ACK 10116#define NETLINK_CAP_ACK 10
@@ -134,6 +136,7 @@ struct nl_mmap_hdr { · 19 unmodified lines
134 __u32 nm_gid;136 __u32 nm_gid;
135};137};
136 138
139#ifndef __KERNEL__
137enum nl_mmap_status {140enum nl_mmap_status {
138 NL_MMAP_STATUS_UNUSED,141 NL_MMAP_STATUS_UNUSED,
139 NL_MMAP_STATUS_RESERVED,142 NL_MMAP_STATUS_RESERVED,
@@ -145,6 +148,7 @@ enum nl_mmap_status { · 5 unmodified lines
145#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO148#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO
146#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)149#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
147#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))150#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
151#endif
148 152
149#define NET_MAJOR 36 /* Major 36 is reserved for networking */153#define NET_MAJOR 36 /* Major 36 is reserved for networking */
150 154
include/uapi/linux/netlink_diag.h+2−0
@@ -48,6 +48,8 @@ enum { · 47 unmodified lines
48 48
49#define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */49#define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */
50#define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */50#define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */
51#ifndef __KERNEL__
51#define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */52#define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */
53#endif
52 54
53#endif55#endif
include/uapi/linux/nl80211.h+14−0
@@ -1727,6 +1727,8 @@ enum nl80211_commands { · 1726 unmodified lines
1727 * underlying device supports these minimal RRM features:1727 * underlying device supports these minimal RRM features:
1728 * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,1728 * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,
1729 * %NL80211_FEATURE_QUIET,1729 * %NL80211_FEATURE_QUIET,
1730 * Or, if global RRM is supported, see:
1731 * %NL80211_EXT_FEATURE_RRM
1730 * If this flag is used, driver must add the Power Capabilities IE to the1732 * If this flag is used, driver must add the Power Capabilities IE to the
1731 * association request. In addition, it must also set the RRM capability1733 * association request. In addition, it must also set the RRM capability
1732 * flag in the association request's Capability Info field.1734 * flag in the association request's Capability Info field.
@@ -1789,6 +1791,10 @@ enum nl80211_commands { · 56 unmodified lines
1789 * thus it must not specify the number of iterations, only the interval1791 * thus it must not specify the number of iterations, only the interval
1790 * between scans. The scan plans are executed sequentially.1792 * between scans. The scan plans are executed sequentially.
1791 * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan.1793 * 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.
1792 *1798 *
1793 * @NUM_NL80211_ATTR: total number of nl80211_attrs available1799 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1794 * @NL80211_ATTR_MAX: highest attribute number currently defined1800 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2164,6 +2170,8 @@ enum nl80211_attrs { · 369 unmodified lines
2164 NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS,2170 NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS,
2165 NL80211_ATTR_SCHED_SCAN_PLANS,2171 NL80211_ATTR_SCHED_SCAN_PLANS,
2166 2172
2173 NL80211_ATTR_PBSS,
2174
2167 /* add attributes here, update the policy in nl80211.c */2175 /* add attributes here, update the policy in nl80211.c */
2168 2176
2169 __NL80211_ATTR_AFTER_LAST,2177 __NL80211_ATTR_AFTER_LAST,
@@ -4396,12 +4404,18 @@ enum nl80211_feature_flags { · 2226 unmodified lines
4396/**4404/**
4397 * enum nl80211_ext_feature_index - bit index of extended features.4405 * enum nl80211_ext_feature_index - bit index of extended features.
4398 * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.4406 * @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.
4399 *4412 *
4400 * @NUM_NL80211_EXT_FEATURES: number of extended features.4413 * @NUM_NL80211_EXT_FEATURES: number of extended features.
4401 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.4414 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
4402 */4415 */
4403enum nl80211_ext_feature_index {4416enum nl80211_ext_feature_index {
4404 NL80211_EXT_FEATURE_VHT_IBSS,4417 NL80211_EXT_FEATURE_VHT_IBSS,
4418 NL80211_EXT_FEATURE_RRM,
4405 4419
4406 /* add new features before the definition below */4420 /* add new features before the definition below */
4407 NUM_NL80211_EXT_FEATURES,4421 NUM_NL80211_EXT_FEATURES,
include/uapi/linux/openvswitch.h+49−0
@@ -454,6 +454,14 @@ struct ovs_key_ct_labels { · 453 unmodified lines
454#define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */454#define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */
455#define OVS_CS_F_INVALID 0x10 /* Could not track connection. */455#define OVS_CS_F_INVALID 0x10 /* Could not track connection. */
456#define OVS_CS_F_TRACKED 0x20 /* Conntrack has occurred. */456#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)
457 465
458/**466/**
459 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.467 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
@@ -632,6 +640,8 @@ struct ovs_action_hash { · 172 unmodified lines
632 * mask. For each bit set in the mask, the corresponding bit in the value is640 * mask. For each bit set in the mask, the corresponding bit in the value is
633 * copied to the connection tracking label field in the connection.641 * copied to the connection tracking label field in the connection.
634 * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG.642 * @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.
635 */645 */
636enum ovs_ct_attr {646enum ovs_ct_attr {
637 OVS_CT_ATTR_UNSPEC,647 OVS_CT_ATTR_UNSPEC,
@@ -641,11 +651,50 @@ enum ovs_ct_attr { · 3 unmodified lines
641 OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */651 OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */
642 OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of652 OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of
643 related connections. */653 related connections. */
654 OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */
644 __OVS_CT_ATTR_MAX655 __OVS_CT_ATTR_MAX
645};656};
646 657
647#define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)658#define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)
648 659
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 */
682enum 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
649/**698/**
650 * enum ovs_action_attr - Action types.699 * enum ovs_action_attr - Action types.
651 *700 *
include/uapi/linux/pkt_cls.h+3−0
@@ -172,6 +172,7 @@ enum { · 171 unmodified lines
172 TCA_U32_INDEV,172 TCA_U32_INDEV,
173 TCA_U32_PCNT,173 TCA_U32_PCNT,
174 TCA_U32_MARK,174 TCA_U32_MARK,
175 TCA_U32_FLAGS,
175 __TCA_U32_MAX176 __TCA_U32_MAX
176};177};
177 178
@@ -416,6 +417,8 @@ enum { · 238 unmodified lines
416 TCA_FLOWER_KEY_TCP_DST, /* be16 */417 TCA_FLOWER_KEY_TCP_DST, /* be16 */
417 TCA_FLOWER_KEY_UDP_SRC, /* be16 */418 TCA_FLOWER_KEY_UDP_SRC, /* be16 */
418 TCA_FLOWER_KEY_UDP_DST, /* be16 */419 TCA_FLOWER_KEY_UDP_DST, /* be16 */
420
421 TCA_FLOWER_FLAGS,
419 __TCA_FLOWER_MAX,422 __TCA_FLOWER_MAX,
420};423};
421 424
include/uapi/linux/quota.h+14−0
@@ -71,6 +71,7 @@ · 70 unmodified lines
71#define Q_SETINFO 0x800006 /* set information about quota files */71#define Q_SETINFO 0x800006 /* set information about quota files */
72#define Q_GETQUOTA 0x800007 /* get user quota structure */72#define Q_GETQUOTA 0x800007 /* get user quota structure */
73#define Q_SETQUOTA 0x800008 /* set user quota structure */73#define Q_SETQUOTA 0x800008 /* set user quota structure */
74#define Q_GETNEXTQUOTA 0x800009 /* get disk limits and usage >= ID */
74 75
75/* Quota format type IDs */76/* Quota format type IDs */
76#define QFMT_VFS_OLD 177#define QFMT_VFS_OLD 1
@@ -119,6 +120,19 @@ struct if_dqblk { · 42 unmodified lines
119 __u32 dqb_valid;120 __u32 dqb_valid;
120};121};
121 122
123struct 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
122/*136/*
123 * Structure used for setting quota information about file via quotactl137 * Structure used for setting quota information about file via quotactl
124 * Following flags are used to specify which fields are valid138 * 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
59 * @RFKILL_OP_DEL: a device was removed59 * @RFKILL_OP_DEL: a device was removed
60 * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device60 * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device
61 * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all)61 * @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.
62 */64 */
63enum rfkill_operation {65enum rfkill_operation {
64 RFKILL_OP_ADD = 0,66 RFKILL_OP_ADD = 0,
include/uapi/linux/sched.h+1−2
@@ -21,8 +21,7 @@ · 20 unmodified lines
21#define CLONE_DETACHED 0x00400000 /* Unused, ignored */21#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
22#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */22#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
23#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */23#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
24/* 0x02000000 was previously the unused CLONE_STOPPED (Start in stopped state)24#define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */
25 and is now available for re-use. */
26#define CLONE_NEWUTS 0x04000000 /* New utsname namespace */25#define CLONE_NEWUTS 0x04000000 /* New utsname namespace */
27#define CLONE_NEWIPC 0x08000000 /* New ipc namespace */26#define CLONE_NEWIPC 0x08000000 /* New ipc namespace */
28#define CLONE_NEWUSER 0x10000000 /* New user namespace */27#define CLONE_NEWUSER 0x10000000 /* New user namespace */
include/uapi/linux/serial_core.h+3−0
@@ -261,4 +261,7 @@ · 260 unmodified lines
261/* STM32 USART */261/* STM32 USART */
262#define PORT_STM32 113262#define PORT_STM32 113
263 263
264/* MVEBU UART */
265#define PORT_MVEBU 114
266
264#endif /* _UAPILINUX_SERIAL_CORE_H */267#endif /* _UAPILINUX_SERIAL_CORE_H */
include/uapi/linux/stddef.h+4−0
@@ -1 +1,5 @@
1#include <linux/compiler.h>1#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
151 * __swab16p - return a byteswapped 16-bit value from a pointer151 * __swab16p - return a byteswapped 16-bit value from a pointer
152 * @p: pointer to a naturally-aligned 16-bit value152 * @p: pointer to a naturally-aligned 16-bit value
153 */153 */
154static inline __u16 __swab16p(const __u16 *p)154static __always_inline __u16 __swab16p(const __u16 *p)
155{155{
156#ifdef __arch_swab16p156#ifdef __arch_swab16p
157 return __arch_swab16p(p);157 return __arch_swab16p(p);
@@ -164,7 +164,7 @@ static inline __u16 __swab16p(const __u16 *p) · 6 unmodified lines
164 * __swab32p - return a byteswapped 32-bit value from a pointer164 * __swab32p - return a byteswapped 32-bit value from a pointer
165 * @p: pointer to a naturally-aligned 32-bit value165 * @p: pointer to a naturally-aligned 32-bit value
166 */166 */
167static inline __u32 __swab32p(const __u32 *p)167static __always_inline __u32 __swab32p(const __u32 *p)
168{168{
169#ifdef __arch_swab32p169#ifdef __arch_swab32p
170 return __arch_swab32p(p);170 return __arch_swab32p(p);
@@ -177,7 +177,7 @@ static inline __u32 __swab32p(const __u32 *p) · 6 unmodified lines
177 * __swab64p - return a byteswapped 64-bit value from a pointer177 * __swab64p - return a byteswapped 64-bit value from a pointer
178 * @p: pointer to a naturally-aligned 64-bit value178 * @p: pointer to a naturally-aligned 64-bit value
179 */179 */
180static inline __u64 __swab64p(const __u64 *p)180static __always_inline __u64 __swab64p(const __u64 *p)
181{181{
182#ifdef __arch_swab64p182#ifdef __arch_swab64p
183 return __arch_swab64p(p);183 return __arch_swab64p(p);
@@ -232,7 +232,7 @@ static inline void __swab16s(__u16 *p) · 48 unmodified lines
232 * __swab32s - byteswap a 32-bit value in-place232 * __swab32s - byteswap a 32-bit value in-place
233 * @p: pointer to a naturally-aligned 32-bit value233 * @p: pointer to a naturally-aligned 32-bit value
234 */234 */
235static inline void __swab32s(__u32 *p)235static __always_inline void __swab32s(__u32 *p)
236{236{
237#ifdef __arch_swab32s237#ifdef __arch_swab32s
238 __arch_swab32s(p);238 __arch_swab32s(p);
@@ -245,7 +245,7 @@ static inline void __swab32s(__u32 *p) · 6 unmodified lines
245 * __swab64s - byteswap a 64-bit value in-place245 * __swab64s - byteswap a 64-bit value in-place
246 * @p: pointer to a naturally-aligned 64-bit value246 * @p: pointer to a naturally-aligned 64-bit value
247 */247 */
248static inline void __swab64s(__u64 *p)248static __always_inline void __swab64s(__u64 *p)
249{249{
250#ifdef __arch_swab64s250#ifdef __arch_swab64s
251 __arch_swab64s(p);251 __arch_swab64s(p);
include/uapi/linux/target_core_user.h+1−0
@@ -41,6 +41,7 @@ · 40 unmodified lines
41 41
42#define TCMU_MAILBOX_VERSION 242#define TCMU_MAILBOX_VERSION 2
43#define ALIGN_SIZE 64 /* Should be enough for most CPUs */43#define ALIGN_SIZE 64 /* Should be enough for most CPUs */
44#define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */
44 45
45struct tcmu_mailbox {46struct tcmu_mailbox {
46 __u16 version;47 __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
12struct tc_ife {
13 tc_gen;
14 __u16 flags;
15};
16
17/*XXX: We need to encode the total number of bytes consumed */
18enum {
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
196 __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */196 __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
197 __u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */197 __u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
198 __u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */198 __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 */
199};204};
200 205
201/* for TCP_MD5SIG socket option */206/* for TCP_MD5SIG socket option */
include/uapi/linux/usb/ch11.h+21−0
@@ -29,6 +29,14 @@ · 28 unmodified lines
29#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)29#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
30#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)30#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
31 31
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
32/*40/*
33 * Hub class requests41 * Hub class requests
34 * See USB 2.0 spec Table 11-1642 * See USB 2.0 spec Table 11-16
@@ -97,10 +105,13 @@ · 62 unmodified lines
97/*105/*
98 * Hub Status and Hub Change results106 * Hub Status and Hub Change results
99 * See USB 2.0 spec Table 11-19 and Table 11-20107 * 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
100 */110 */
101struct usb_port_status {111struct usb_port_status {
102 __le16 wPortStatus;112 __le16 wPortStatus;
103 __le16 wPortChange;113 __le16 wPortChange;
114 __le32 dwExtPortStatus;
104} __attribute__ ((packed));115} __attribute__ ((packed));
105 116
106/*117/*
@@ -172,6 +183,16 @@ struct usb_port_status { · 65 unmodified lines
172#define USB_PORT_STAT_C_LINK_STATE 0x0040183#define USB_PORT_STAT_C_LINK_STATE 0x0040
173#define USB_PORT_STAT_C_CONFIG_ERROR 0x0080184#define USB_PORT_STAT_C_CONFIG_ERROR 0x0080
174 185
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
175/*196/*
176 * wHubCharacteristics (masks)197 * wHubCharacteristics (masks)
177 * See USB 2.0 spec Table 11-13, offset 3198 * 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
234#define USB_DT_PIPE_USAGE 0x24234#define USB_DT_PIPE_USAGE 0x24
235/* From the USB 3.0 spec */235/* From the USB 3.0 spec */
236#define USB_DT_SS_ENDPOINT_COMP 0x30236#define USB_DT_SS_ENDPOINT_COMP 0x30
237/* From the USB 3.1 spec */
238#define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31
237 239
238/* Conventional codes for class-specific descriptors. The convention is240/* Conventional codes for class-specific descriptors. The convention is
239 * defined in the USB "Common Class" Spec (3.11). Individual class specs241 * 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
613 615
614/*-------------------------------------------------------------------------*/616/*-------------------------------------------------------------------------*/
615 617
618/* USB_DT_SSP_ISOC_ENDPOINT_COMP: SuperSpeedPlus Isochronous Endpoint Companion
619 * descriptor
620 */
621struct 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
616/* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */632/* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */
617struct usb_ss_ep_comp_descriptor {633struct usb_ss_ep_comp_descriptor {
618 __u8 bLength;634 __u8 bLength;
@@ -646,6 +662,8 @@ usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp) · 27 unmodified lines
646 662
647/* Bits 1:0 of bmAttributes if this is an isoc endpoint */663/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
648#define USB_SS_MULT(p) (1 + ((p) & 0x3))664#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))
649 667
650/*-------------------------------------------------------------------------*/668/*-------------------------------------------------------------------------*/
651 669
@@ -690,6 +708,7 @@ struct usb_otg20_descriptor { · 38 unmodified lines
690#define USB_OTG_HNP (1 << 1) /* swap host/device roles */708#define USB_OTG_HNP (1 << 1) /* swap host/device roles */
691#define USB_OTG_ADP (1 << 2) /* support ADP */709#define USB_OTG_ADP (1 << 2) /* support ADP */
692 710
711#define OTG_STS_SELECTOR 0xF000 /* OTG status selector */
693/*-------------------------------------------------------------------------*/712/*-------------------------------------------------------------------------*/
694 713
695/* USB_DT_DEBUG: for special highspeed devices, replacing serial console */714/* USB_DT_DEBUG: for special highspeed devices, replacing serial console */
@@ -880,7 +899,7 @@ struct usb_ssp_cap_descriptor { · 184 unmodified lines
880 __le32 bmAttributes;899 __le32 bmAttributes;
881#define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) /* sublink speed entries */900#define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) /* sublink speed entries */
882#define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) /* speed ID entries */901#define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) /* speed ID entries */
883 __u16 wFunctionalitySupport;902 __le16 wFunctionalitySupport;
884#define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf)903#define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf)
885#define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8)904#define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8)
886#define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12)905#define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12)
@@ -894,6 +913,22 @@ struct usb_ssp_cap_descriptor { · 7 unmodified lines
894#define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) /* Lanespeed mantissa */913#define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) /* Lanespeed mantissa */
895} __attribute__((packed));914} __attribute__((packed));
896 915
916/*
917 * Precision time measurement capability descriptor: advertised by devices and
918 * hubs that support PTM
919 */
920#define USB_PTM_CAP_TYPE 0xb
921struct 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)
897 932
898/*-------------------------------------------------------------------------*/933/*-------------------------------------------------------------------------*/
899 934
@@ -954,6 +989,7 @@ enum usb_device_speed { · 54 unmodified lines
954 USB_SPEED_HIGH, /* usb 2.0 */989 USB_SPEED_HIGH, /* usb 2.0 */
955 USB_SPEED_WIRELESS, /* wireless (usb 2.5) */990 USB_SPEED_WIRELESS, /* wireless (usb 2.5) */
956 USB_SPEED_SUPER, /* usb 3.0 */991 USB_SPEED_SUPER, /* usb 3.0 */
992 USB_SPEED_SUPER_PLUS, /* usb 3.1 */
957};993};
958 994
959 995
include/uapi/linux/usb/tmc.h+26−3
@@ -2,12 +2,14 @@ · 1 unmodified line
2 * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany2 * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
3 * Copyright (C) 2008 Novell, Inc.3 * Copyright (C) 2008 Novell, Inc.
4 * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>4 * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
5 * Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com>
5 *6 *
6 * This file holds USB constants defined by the USB Device Class7 * 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.
8 *10 *
9 * It also has the ioctl definitions for the usbtmc kernel driver that11 * It also has the ioctl and capability definitions for the
10 * userspace needs to know about.12 * usbtmc kernel driver that userspace needs to know about.
11 */13 */
12 14
13#ifndef __LINUX_USB_TMC_H15#ifndef __LINUX_USB_TMC_H
@@ -30,6 +32,10 @@ · 16 unmodified lines
30#define USBTMC_REQUEST_CHECK_CLEAR_STATUS 632#define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6
31#define USBTMC_REQUEST_GET_CAPABILITIES 733#define USBTMC_REQUEST_GET_CAPABILITIES 7
32#define USBTMC_REQUEST_INDICATOR_PULSE 6434#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
33 39
34/* Request values for USBTMC driver's ioctl entry point */40/* Request values for USBTMC driver's ioctl entry point */
35#define USBTMC_IOC_NR 9141#define USBTMC_IOC_NR 91
@@ -39,5 +45,22 @@ · 3 unmodified lines
39#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)45#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
40#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)46#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
41#define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)47#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
42 65
43#endif66#endif
include/uapi/linux/usbdevice_fs.h+3−0
@@ -134,6 +134,8 @@ struct usbdevfs_hub_portinfo { · 133 unmodified lines
134#define USBDEVFS_CAP_NO_PACKET_SIZE_LIM 0x04134#define USBDEVFS_CAP_NO_PACKET_SIZE_LIM 0x04
135#define USBDEVFS_CAP_BULK_SCATTER_GATHER 0x08135#define USBDEVFS_CAP_BULK_SCATTER_GATHER 0x08
136#define USBDEVFS_CAP_REAP_AFTER_DISCONNECT 0x10136#define USBDEVFS_CAP_REAP_AFTER_DISCONNECT 0x10
137#define USBDEVFS_CAP_MMAP 0x20
138#define USBDEVFS_CAP_DROP_PRIVILEGES 0x40
137 139
138/* USBDEVFS_DISCONNECT_CLAIM flags & struct */140/* USBDEVFS_DISCONNECT_CLAIM flags & struct */
139 141
@@ -187,5 +189,6 @@ struct usbdevfs_streams { · 47 unmodified lines
187#define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)189#define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)
188#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams)190#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams)
189#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)191#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)
192#define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32)
190 193
191#endif /* _UAPI_LINUX_USBDEVICE_FS_H */194#endif /* _UAPI_LINUX_USBDEVICE_FS_H */
include/uapi/linux/v4l2-common.h+35−11
@@ -10,19 +10,43 @@ · 9 unmodified lines
10 * Copyright (C) 2012 Nokia Corporation10 * Copyright (C) 2012 Nokia Corporation
11 * Contact: Sakari Ailus <sakari.ailus@iki.fi>11 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
12 *12 *
13 * This program is free software; you can redistribute it and/or13 * This program is free software; you can redistribute it and/or modify
14 * modify it under the terms of the GNU General Public License14 * it under the terms of the GNU General Public License as published by
15 * version 2 as published by the Free Software Foundation.15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
16 *17 *
17 * This program is distributed in the hope that it will be useful, but18 * This program is distributed in the hope that it will be useful,
18 * WITHOUT ANY WARRANTY; without even the implied warranty of19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * General Public License for more details.21 * GNU General Public License for more details.
21 *22 *
22 * You should have received a copy of the GNU General Public License23 * Alternatively you can redistribute this file under the terms of the
23 * along with this program; if not, write to the Free Software24 * BSD license as stated below:
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA25 *
25 * 02110-1301 USA26 * 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.
26 *50 *
27 */51 */
28 52
include/uapi/linux/v4l2-controls.h+11−0
@@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode { · 389 unmodified lines
390#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226)390#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226)
391#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227)391#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227)
392#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228)392#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)
393 394
394#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)395#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
395#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)396#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
912 V4L2_DV_RGB_RANGE_FULL = 2,913 V4L2_DV_RGB_RANGE_FULL = 2,
913};914};
914 915
916#define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6)
917enum 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
915#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)925#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
916#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)926#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)
917 928
918#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)929#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)
919#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1)930#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
59#define VFIO_TYPE (';')59#define VFIO_TYPE (';')
60#define VFIO_BASE 10060#define VFIO_BASE 100
61 61
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 */
74struct 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
62/* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */89/* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */
63 90
64/**91/**
@@ -194,13 +221,73 @@ struct vfio_region_info { · 129 unmodified lines
194#define VFIO_REGION_INFO_FLAG_READ (1 << 0) /* Region supports read */221#define VFIO_REGION_INFO_FLAG_READ (1 << 0) /* Region supports read */
195#define VFIO_REGION_INFO_FLAG_WRITE (1 << 1) /* Region supports write */222#define VFIO_REGION_INFO_FLAG_WRITE (1 << 1) /* Region supports write */
196#define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */223#define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */
224#define VFIO_REGION_INFO_FLAG_CAPS (1 << 3) /* Info supports caps */
197 __u32 index; /* Region index */225 __u32 index; /* Region index */
198 __u32 resv; /* Reserved for alignment */226 __u32 cap_offset; /* Offset within info struct of first cap */
199 __u64 size; /* Region size (bytes) */227 __u64 size; /* Region size (bytes) */
200 __u64 offset; /* Region offset from start of device fd */228 __u64 offset; /* Region offset from start of device fd */
201};229};
202#define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8)230#define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8)
203 231
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
243struct 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
248struct 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
277struct 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
204/**291/**
205 * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9,292 * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9,
206 * struct vfio_irq_info)293 * struct vfio_irq_info)
@@ -336,7 +423,8 @@ enum { · 129 unmodified lines
336 * between described ranges are unimplemented.423 * between described ranges are unimplemented.
337 */424 */
338 VFIO_PCI_VGA_REGION_INDEX,425 VFIO_PCI_VGA_REGION_INDEX,
339 VFIO_PCI_NUM_REGIONS426 VFIO_PCI_NUM_REGIONS = 9 /* Fixed user ABI, region indexes >=9 use */
427 /* device specific cap to define content. */
340};428};
341 429
342enum {430enum {
include/uapi/linux/vhost.h+6−0
@@ -126,6 +126,12 @@ struct vhost_memory { · 125 unmodified lines
126#define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, struct vhost_vring_file)126#define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, struct vhost_vring_file)
127/* Set eventfd to signal an error */127/* Set eventfd to signal an error */
128#define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file)128#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)
129 135
130/* VHOST_NET specific defines */136/* VHOST_NET specific defines */
131 137
include/uapi/linux/videodev2.h+7−0
@@ -546,6 +546,10 @@ struct v4l2_pix_format { · 545 unmodified lines
546/* three non contiguous planes - Y, Cb, Cr */546/* three non contiguous planes - Y, Cb, Cr */
547#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */547#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
548#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */548#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 */
549 553
550/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */554/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
551#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */555#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
621#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */625#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
622#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */626#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
623#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */627#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 */
624 631
625/* SDR formats - used only for Software Defined Radio devices */632/* SDR formats - used only for Software Defined Radio devices */
626#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */633#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
51#define VIRTIO_BALLOON_S_MINFLT 3 /* Number of minor faults */51#define VIRTIO_BALLOON_S_MINFLT 3 /* Number of minor faults */
52#define VIRTIO_BALLOON_S_MEMFREE 4 /* Total amount of free memory */52#define VIRTIO_BALLOON_S_MEMFREE 4 /* Total amount of free memory */
53#define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */53#define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
54#define VIRTIO_BALLOON_S_NR 654#define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */
55#define VIRTIO_BALLOON_S_NR 7
55 56
56/*57/*
57 * Memory statistics structure.58 * Memory statistics structure.
include/uapi/linux/virtio_blk.h+3−3
@@ -43,11 +43,11 @@ · 42 unmodified lines
43#ifndef VIRTIO_BLK_NO_LEGACY43#ifndef VIRTIO_BLK_NO_LEGACY
44#define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */44#define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */
45#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */45#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 */
47#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */47#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
48#ifndef __KERNEL__48#ifndef __KERNEL__
49/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */49/* Old (deprecated) name for VIRTIO_BLK_F_FLUSH. */
50#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE50#define VIRTIO_BLK_F_WCE VIRTIO_BLK_F_FLUSH
51#endif51#endif
52#endif /* !VIRTIO_BLK_NO_LEGACY */52#endif /* !VIRTIO_BLK_NO_LEGACY */
53 53
include/uapi/linux/virtio_config.h+2−0
@@ -40,6 +40,8 @@ · 39 unmodified lines
40#define VIRTIO_CONFIG_S_DRIVER_OK 440#define VIRTIO_CONFIG_S_DRIVER_OK 4
41/* Driver has finished configuring features */41/* Driver has finished configuring features */
42#define VIRTIO_CONFIG_S_FEATURES_OK 842#define VIRTIO_CONFIG_S_FEATURES_OK 8
43/* Device entered invalid state, driver must reset it */
44#define VIRTIO_CONFIG_S_NEEDS_RESET 0x40
43/* We've given up on this device. */45/* We've given up on this device. */
44#define VIRTIO_CONFIG_S_FAILED 0x8046#define VIRTIO_CONFIG_S_FAILED 0x80
45 47
include/uapi/misc/cxl.h+24−0
@@ -55,11 +55,35 @@ struct cxl_afu_id { · 54 unmodified lines
55 __u64 reserved6;55 __u64 reserved6;
56};56};
57 57
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
67struct 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
58/* ioctl numbers */78/* ioctl numbers */
59#define CXL_MAGIC 0xCA79#define CXL_MAGIC 0xCA
80/* AFU devices */
60#define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work)81#define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work)
61#define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32)82#define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32)
62#define CXL_IOCTL_GET_AFU_ID _IOR(CXL_MAGIC, 0x02, struct cxl_afu_id)83#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)
63 87
64#define CXL_READ_MIN_SIZE 0x1000 /* 4K */88#define CXL_READ_MIN_SIZE 0x1000 /* 4K */
65 89
include/uapi/rdma/hfi/hfi1_user.h+6−8
@@ -66,7 +66,7 @@ · 65 unmodified lines
66 * The major version changes when data structures change in an incompatible66 * The major version changes when data structures change in an incompatible
67 * way. The driver must be the same for initialization to succeed.67 * way. The driver must be the same for initialization to succeed.
68 */68 */
69#define HFI1_USER_SWMAJOR 469#define HFI1_USER_SWMAJOR 5
70 70
71/*71/*
72 * Minor version differences are always compatible72 * Minor version differences are always compatible
@@ -93,7 +93,7 @@ · 20 unmodified lines
93#define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/93#define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/
94#define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */94#define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */
95#define HFI1_CAP_NODROP_EGR_FULL (1UL << 9) /* Don't drop on EGR buffs full */95#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 */
97#define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */97#define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */
98#define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */98#define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */
99#define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */99#define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */
@@ -134,6 +134,7 @@ · 34 unmodified lines
134#define HFI1_CMD_ACK_EVENT 10 /* ack & clear user status bits */134#define HFI1_CMD_ACK_EVENT 10 /* ack & clear user status bits */
135#define HFI1_CMD_SET_PKEY 11 /* set context's pkey */135#define HFI1_CMD_SET_PKEY 11 /* set context's pkey */
136#define HFI1_CMD_CTXT_RESET 12 /* reset context's HW send context */136#define HFI1_CMD_CTXT_RESET 12 /* reset context's HW send context */
137#define HFI1_CMD_TID_INVAL_READ 13 /* read TID cache invalidations */
137/* separate EPROM commands from normal PSM commands */138/* separate EPROM commands from normal PSM commands */
138#define HFI1_CMD_EP_INFO 64 /* read EPROM device ID */139#define HFI1_CMD_EP_INFO 64 /* read EPROM device ID */
139#define HFI1_CMD_EP_ERASE_CHIP 65 /* erase whole EPROM */140#define HFI1_CMD_EP_ERASE_CHIP 65 /* erase whole EPROM */
@@ -147,13 +148,15 @@ · 7 unmodified lines
147#define _HFI1_EVENT_LID_CHANGE_BIT 2148#define _HFI1_EVENT_LID_CHANGE_BIT 2
148#define _HFI1_EVENT_LMC_CHANGE_BIT 3149#define _HFI1_EVENT_LMC_CHANGE_BIT 3
149#define _HFI1_EVENT_SL2VL_CHANGE_BIT 4150#define _HFI1_EVENT_SL2VL_CHANGE_BIT 4
150#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_SL2VL_CHANGE_BIT151#define _HFI1_EVENT_TID_MMU_NOTIFY_BIT 5
152#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_TID_MMU_NOTIFY_BIT
151 153
152#define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT)154#define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT)
153#define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT)155#define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT)
154#define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT)156#define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT)
155#define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT)157#define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT)
156#define HFI1_EVENT_SL2VL_CHANGE (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT)158#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)
157 160
158/*161/*
159 * These are the status bits readable (in ASCII form, 64bit value)162 * These are the status bits readable (in ASCII form, 64bit value)
@@ -238,11 +241,6 @@ struct hfi1_tid_info { · 78 unmodified lines
238 __u32 tidcnt;241 __u32 tidcnt;
239 /* length of transfer buffer programmed by this request */242 /* length of transfer buffer programmed by this request */
240 __u32 length;243 __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;
246};244};
247 245
248struct hfi1_cmd {246struct hfi1_cmd {
include/uapi/rdma/rdma_netlink.h+3−2
@@ -5,9 +5,10 @@ · 4 unmodified lines
5 5
6enum {6enum {
7 RDMA_NL_RDMA_CM = 1,7 RDMA_NL_RDMA_CM = 1,
8 RDMA_NL_NES,8 RDMA_NL_IWCM,
9 RDMA_NL_C4IW,9 RDMA_NL_RSVD,
10 RDMA_NL_LS, /* RDMA Local Services */10 RDMA_NL_LS, /* RDMA Local Services */
11 RDMA_NL_I40IW,
11 RDMA_NL_NUM_CLIENTS12 RDMA_NL_NUM_CLIENTS
12};13};
13 14
include/uapi/sound/asequencer.h+4−8
@@ -25,7 +25,7 @@ · 24 unmodified lines
25#include <sound/asound.h>25#include <sound/asound.h>
26 26
27/** version of the sequencer */27/** 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)
29 29
30/**30/**
31 * definition of sequencer event types31 * definition of sequencer event types
@@ -357,7 +357,9 @@ struct snd_seq_client_info { · 325 unmodified lines
357 unsigned char event_filter[32]; /* event filter bitmap */357 unsigned char event_filter[32]; /* event filter bitmap */
358 int num_ports; /* RO: number of ports */358 int num_ports; /* RO: number of ports */
359 int event_lost; /* number of lost events */359 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 */
361};363};
362 364
363 365
@@ -594,14 +596,8 @@ struct snd_seq_query_subs { · 230 unmodified lines
594#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)596#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
595#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)597#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
596#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo)598#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)
599#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)599#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
600#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer)600#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*/
605#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)601#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
606#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)602#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)
607#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)603#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
23#ifndef _UAPI__SOUND_ASOUND_H23#ifndef _UAPI__SOUND_ASOUND_H
24#define _UAPI__SOUND_ASOUND_H24#define _UAPI__SOUND_ASOUND_H
25 25
26#if defined(__KERNEL__) || defined(__linux__)
26#include <linux/types.h>27#include <linux/types.h>
28#else
29#include <sys/ioctl.h>
30#endif
27 31
28#ifndef __KERNEL__32#ifndef __KERNEL__
29#include <stdlib.h>33#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