Linux 5.6
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl6BIG4eHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGlHUH/RCFve2sfHRPjRW+ xR5SaLVAw6XKvtKBq7yvKmHEwqNJnL79IHyqqtSrtfFr2FfaH/KvYiCbbAezvSrM np0udGu7STKGd21CWuyEZJudyhXkOwMRNiFiCXWp7rs35oh8T0TpJxMzo2Nc1nLk JFQPqAP6OSvq4IkWEywKQI+Au3Z1IBf83xVjZ1s+MKPQHYD49x2hc4cQntL5/cnm a3DoR2iBkYiGZCZ9dDqAqJTnMQIiCbACdZXgGjNRUpdyA/dtAjsMl11NPYHm8TA2 3AHBupAK50WBZGad6xv2qKQyScsmoJG2mv92QjlOFz0Tpiu6rLnDlLYREDVB6YH6 qbLDsc8= =XEIU -----END PGP SIGNATURE----- Merge tag 'v5.6' into next Sync up with mainline to get device tree and other changes.
This commit is contained in:
commit
0fdc50dfab
11763 changed files with 555564 additions and 238554 deletions
|
|
@ -49,6 +49,7 @@ struct acct
|
|||
__u16 ac_uid16; /* LSB of Real User ID */
|
||||
__u16 ac_gid16; /* LSB of Real Group ID */
|
||||
__u16 ac_tty; /* Control Terminal */
|
||||
/* __u32 range means times from 1970 to 2106 */
|
||||
__u32 ac_btime; /* Process Creation Time */
|
||||
comp_t ac_utime; /* User Time */
|
||||
comp_t ac_stime; /* System Time */
|
||||
|
|
@ -81,6 +82,7 @@ struct acct_v3
|
|||
__u32 ac_gid; /* Real Group ID */
|
||||
__u32 ac_pid; /* Process ID */
|
||||
__u32 ac_ppid; /* Parent Process ID */
|
||||
/* __u32 range means times from 1970 to 2106 */
|
||||
__u32 ac_btime; /* Process Creation Time */
|
||||
#ifdef __KERNEL__
|
||||
__u32 ac_etime; /* Elapsed Time */
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@
|
|||
#define AUDIT_FANOTIFY 1331 /* Fanotify access decision */
|
||||
#define AUDIT_TIME_INJOFFSET 1332 /* Timekeeping offset injected */
|
||||
#define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */
|
||||
#define AUDIT_BPF 1334 /* BPF subsystem */
|
||||
|
||||
#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
|
||||
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* $Id: b1lli.h,v 1.8.8.3 2001/09/23 22:25:05 kai Exp $
|
||||
*
|
||||
* ISDN lowlevel-module for AVM B1-card.
|
||||
*
|
||||
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _B1LLI_H_
|
||||
#define _B1LLI_H_
|
||||
/*
|
||||
* struct for loading t4 file
|
||||
*/
|
||||
typedef struct avmb1_t4file {
|
||||
int len;
|
||||
unsigned char *data;
|
||||
} avmb1_t4file;
|
||||
|
||||
typedef struct avmb1_loaddef {
|
||||
int contr;
|
||||
avmb1_t4file t4file;
|
||||
} avmb1_loaddef;
|
||||
|
||||
typedef struct avmb1_loadandconfigdef {
|
||||
int contr;
|
||||
avmb1_t4file t4file;
|
||||
avmb1_t4file t4config;
|
||||
} avmb1_loadandconfigdef;
|
||||
|
||||
typedef struct avmb1_resetdef {
|
||||
int contr;
|
||||
} avmb1_resetdef;
|
||||
|
||||
typedef struct avmb1_getdef {
|
||||
int contr;
|
||||
int cardtype;
|
||||
int cardstate;
|
||||
} avmb1_getdef;
|
||||
|
||||
/*
|
||||
* struct for adding new cards
|
||||
*/
|
||||
typedef struct avmb1_carddef {
|
||||
int port;
|
||||
int irq;
|
||||
} avmb1_carddef;
|
||||
|
||||
#define AVM_CARDTYPE_B1 0
|
||||
#define AVM_CARDTYPE_T1 1
|
||||
#define AVM_CARDTYPE_M1 2
|
||||
#define AVM_CARDTYPE_M2 3
|
||||
|
||||
typedef struct avmb1_extcarddef {
|
||||
int port;
|
||||
int irq;
|
||||
int cardtype;
|
||||
int cardnr; /* for HEMA/T1 */
|
||||
} avmb1_extcarddef;
|
||||
|
||||
#define AVMB1_LOAD 0 /* load image to card */
|
||||
#define AVMB1_ADDCARD 1 /* add a new card - OBSOLETE */
|
||||
#define AVMB1_RESETCARD 2 /* reset a card */
|
||||
#define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
|
||||
#define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
|
||||
#define AVMB1_GET_CARDINFO 5 /* get cardtype */
|
||||
#define AVMB1_REMOVECARD 6 /* remove a card - OBSOLETE */
|
||||
|
||||
#define AVMB1_REGISTERCARD_IS_OBSOLETE
|
||||
|
||||
#endif /* _B1LLI_H_ */
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
|
||||
/* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:
|
||||
/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
|
||||
*
|
||||
* Marek Lindner, Simon Wunderlich
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors:
|
||||
/* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors:
|
||||
*
|
||||
* Matthias Schiffer
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ static inline struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys)
|
|||
#define BCACHE_SB_MAX_VERSION 4
|
||||
|
||||
#define SB_SECTOR 8
|
||||
#define SB_OFFSET (SB_SECTOR << SECTOR_SHIFT)
|
||||
#define SB_SIZE 4096
|
||||
#define SB_LABEL_SIZE 32
|
||||
#define SB_JOURNAL_BUCKETS 256U
|
||||
|
|
@ -156,6 +157,57 @@ static inline struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys)
|
|||
|
||||
#define BDEV_DATA_START_DEFAULT 16 /* sectors */
|
||||
|
||||
struct cache_sb_disk {
|
||||
__le64 csum;
|
||||
__le64 offset; /* sector where this sb was written */
|
||||
__le64 version;
|
||||
|
||||
__u8 magic[16];
|
||||
|
||||
__u8 uuid[16];
|
||||
union {
|
||||
__u8 set_uuid[16];
|
||||
__le64 set_magic;
|
||||
};
|
||||
__u8 label[SB_LABEL_SIZE];
|
||||
|
||||
__le64 flags;
|
||||
__le64 seq;
|
||||
__le64 pad[8];
|
||||
|
||||
union {
|
||||
struct {
|
||||
/* Cache devices */
|
||||
__le64 nbuckets; /* device size */
|
||||
|
||||
__le16 block_size; /* sectors */
|
||||
__le16 bucket_size; /* sectors */
|
||||
|
||||
__le16 nr_in_set;
|
||||
__le16 nr_this_dev;
|
||||
};
|
||||
struct {
|
||||
/* Backing devices */
|
||||
__le64 data_offset;
|
||||
|
||||
/*
|
||||
* block_size from the cache device section is still used by
|
||||
* backing devices, so don't add anything here until we fix
|
||||
* things to not need it for backing devices anymore
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
__le32 last_mount; /* time overflow in y2106 */
|
||||
|
||||
__le16 first_bucket;
|
||||
union {
|
||||
__le16 njournal_buckets;
|
||||
__le16 keys;
|
||||
};
|
||||
__le64 d[SB_JOURNAL_BUCKETS]; /* journal buckets */
|
||||
};
|
||||
|
||||
struct cache_sb {
|
||||
__u64 csum;
|
||||
__u64 offset; /* sector where this sb was written */
|
||||
|
|
|
|||
|
|
@ -107,6 +107,10 @@ enum bpf_cmd {
|
|||
BPF_MAP_LOOKUP_AND_DELETE_ELEM,
|
||||
BPF_MAP_FREEZE,
|
||||
BPF_BTF_GET_NEXT_ID,
|
||||
BPF_MAP_LOOKUP_BATCH,
|
||||
BPF_MAP_LOOKUP_AND_DELETE_BATCH,
|
||||
BPF_MAP_UPDATE_BATCH,
|
||||
BPF_MAP_DELETE_BATCH,
|
||||
};
|
||||
|
||||
enum bpf_map_type {
|
||||
|
|
@ -136,6 +140,7 @@ enum bpf_map_type {
|
|||
BPF_MAP_TYPE_STACK,
|
||||
BPF_MAP_TYPE_SK_STORAGE,
|
||||
BPF_MAP_TYPE_DEVMAP_HASH,
|
||||
BPF_MAP_TYPE_STRUCT_OPS,
|
||||
};
|
||||
|
||||
/* Note that tracing related programs such as
|
||||
|
|
@ -174,6 +179,8 @@ enum bpf_prog_type {
|
|||
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
|
||||
BPF_PROG_TYPE_CGROUP_SOCKOPT,
|
||||
BPF_PROG_TYPE_TRACING,
|
||||
BPF_PROG_TYPE_STRUCT_OPS,
|
||||
BPF_PROG_TYPE_EXT,
|
||||
};
|
||||
|
||||
enum bpf_attach_type {
|
||||
|
|
@ -231,6 +238,11 @@ enum bpf_attach_type {
|
|||
* When children program makes decision (like picking TCP CA or sock bind)
|
||||
* parent program has a chance to override it.
|
||||
*
|
||||
* With BPF_F_ALLOW_MULTI a new program is added to the end of the list of
|
||||
* programs for a cgroup. Though it's possible to replace an old program at
|
||||
* any position by also specifying BPF_F_REPLACE flag and position itself in
|
||||
* replace_bpf_fd attribute. Old program at this position will be released.
|
||||
*
|
||||
* A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups.
|
||||
* A cgroup with NONE doesn't allow any programs in sub-cgroups.
|
||||
* Ex1:
|
||||
|
|
@ -249,6 +261,7 @@ enum bpf_attach_type {
|
|||
*/
|
||||
#define BPF_F_ALLOW_OVERRIDE (1U << 0)
|
||||
#define BPF_F_ALLOW_MULTI (1U << 1)
|
||||
#define BPF_F_REPLACE (1U << 2)
|
||||
|
||||
/* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
|
||||
* verifier will perform strict alignment checking as if the kernel
|
||||
|
|
@ -351,7 +364,12 @@ enum bpf_attach_type {
|
|||
/* Enable memory-mapping BPF map */
|
||||
#define BPF_F_MMAPABLE (1U << 10)
|
||||
|
||||
/* flags for BPF_PROG_QUERY */
|
||||
/* Flags for BPF_PROG_QUERY. */
|
||||
|
||||
/* Query effective (directly attached + inherited from ancestor cgroups)
|
||||
* programs that will be executed for events within a cgroup.
|
||||
* attach_flags with this flag are returned only for directly attached programs.
|
||||
*/
|
||||
#define BPF_F_QUERY_EFFECTIVE (1U << 0)
|
||||
|
||||
enum bpf_stack_build_id_status {
|
||||
|
|
@ -391,6 +409,10 @@ union bpf_attr {
|
|||
__u32 btf_fd; /* fd pointing to a BTF type data */
|
||||
__u32 btf_key_type_id; /* BTF type_id of the key */
|
||||
__u32 btf_value_type_id; /* BTF type_id of the value */
|
||||
__u32 btf_vmlinux_value_type_id;/* BTF type_id of a kernel-
|
||||
* struct stored as the
|
||||
* map value
|
||||
*/
|
||||
};
|
||||
|
||||
struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
|
||||
|
|
@ -403,6 +425,23 @@ union bpf_attr {
|
|||
__u64 flags;
|
||||
};
|
||||
|
||||
struct { /* struct used by BPF_MAP_*_BATCH commands */
|
||||
__aligned_u64 in_batch; /* start batch,
|
||||
* NULL to start from beginning
|
||||
*/
|
||||
__aligned_u64 out_batch; /* output: next start batch */
|
||||
__aligned_u64 keys;
|
||||
__aligned_u64 values;
|
||||
__u32 count; /* input/output:
|
||||
* input: # of key/value
|
||||
* elements
|
||||
* output: # of filled elements
|
||||
*/
|
||||
__u32 map_fd;
|
||||
__u64 elem_flags;
|
||||
__u64 flags;
|
||||
} batch;
|
||||
|
||||
struct { /* anonymous struct used by BPF_PROG_LOAD command */
|
||||
__u32 prog_type; /* one of enum bpf_prog_type */
|
||||
__u32 insn_cnt;
|
||||
|
|
@ -442,6 +481,10 @@ union bpf_attr {
|
|||
__u32 attach_bpf_fd; /* eBPF program to attach */
|
||||
__u32 attach_type;
|
||||
__u32 attach_flags;
|
||||
__u32 replace_bpf_fd; /* previously attached eBPF
|
||||
* program to replace if
|
||||
* BPF_F_REPLACE is used
|
||||
*/
|
||||
};
|
||||
|
||||
struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */
|
||||
|
|
@ -1002,9 +1045,9 @@ union bpf_attr {
|
|||
* supports redirection to the egress interface, and accepts no
|
||||
* flag at all.
|
||||
*
|
||||
* The same effect can be attained with the more generic
|
||||
* **bpf_redirect_map**\ (), which requires specific maps to be
|
||||
* used but offers better performance.
|
||||
* The same effect can also be attained with the more generic
|
||||
* **bpf_redirect_map**\ (), which uses a BPF map to store the
|
||||
* redirect target instead of providing it directly to the helper.
|
||||
* Return
|
||||
* For XDP, the helper returns **XDP_REDIRECT** on success or
|
||||
* **XDP_ABORTED** on error. For other program types, the values
|
||||
|
|
@ -1568,13 +1611,11 @@ union bpf_attr {
|
|||
* the caller. Any higher bits in the *flags* argument must be
|
||||
* unset.
|
||||
*
|
||||
* When used to redirect packets to net devices, this helper
|
||||
* provides a high performance increase over **bpf_redirect**\ ().
|
||||
* This is due to various implementation details of the underlying
|
||||
* mechanisms, one of which is the fact that **bpf_redirect_map**\
|
||||
* () tries to send packet as a "bulk" to the device.
|
||||
* See also bpf_redirect(), which only supports redirecting to an
|
||||
* ifindex, but doesn't require a map to do so.
|
||||
* Return
|
||||
* **XDP_REDIRECT** on success, or **XDP_ABORTED** on error.
|
||||
* **XDP_REDIRECT** on success, or the value of the two lower bits
|
||||
* of the **flags* argument on error.
|
||||
*
|
||||
* int bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags)
|
||||
* Description
|
||||
|
|
@ -2693,7 +2734,8 @@ union bpf_attr {
|
|||
*
|
||||
* int bpf_send_signal(u32 sig)
|
||||
* Description
|
||||
* Send signal *sig* to the current task.
|
||||
* Send signal *sig* to the process of the current task.
|
||||
* The signal may be delivered to any of this process's threads.
|
||||
* Return
|
||||
* 0 on success or successfully queued.
|
||||
*
|
||||
|
|
@ -2821,6 +2863,33 @@ union bpf_attr {
|
|||
* Return
|
||||
* On success, the strictly positive length of the string, including
|
||||
* the trailing NUL character. On error, a negative value.
|
||||
*
|
||||
* int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
|
||||
* Description
|
||||
* Send out a tcp-ack. *tp* is the in-kernel struct tcp_sock.
|
||||
* *rcv_nxt* is the ack_seq to be sent out.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* int bpf_send_signal_thread(u32 sig)
|
||||
* Description
|
||||
* Send signal *sig* to the thread corresponding to the current task.
|
||||
* Return
|
||||
* 0 on success or successfully queued.
|
||||
*
|
||||
* **-EBUSY** if work queue under nmi is full.
|
||||
*
|
||||
* **-EINVAL** if *sig* is invalid.
|
||||
*
|
||||
* **-EPERM** if no permission to send the *sig*.
|
||||
*
|
||||
* **-EAGAIN** if bpf program can try again.
|
||||
*
|
||||
* u64 bpf_jiffies64(void)
|
||||
* Description
|
||||
* Obtain the 64bit jiffies
|
||||
* Return
|
||||
* The 64 bit jiffies
|
||||
*/
|
||||
#define __BPF_FUNC_MAPPER(FN) \
|
||||
FN(unspec), \
|
||||
|
|
@ -2938,7 +3007,10 @@ union bpf_attr {
|
|||
FN(probe_read_user), \
|
||||
FN(probe_read_kernel), \
|
||||
FN(probe_read_user_str), \
|
||||
FN(probe_read_kernel_str),
|
||||
FN(probe_read_kernel_str), \
|
||||
FN(tcp_send_ack), \
|
||||
FN(send_signal_thread), \
|
||||
FN(jiffies64),
|
||||
|
||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||
* function eBPF program intends to call
|
||||
|
|
@ -3339,7 +3411,7 @@ struct bpf_map_info {
|
|||
__u32 map_flags;
|
||||
char name[BPF_OBJ_NAME_LEN];
|
||||
__u32 ifindex;
|
||||
__u32 :32;
|
||||
__u32 btf_vmlinux_value_type_id;
|
||||
__u64 netns_dev;
|
||||
__u64 netns_ino;
|
||||
__u32 btf_id;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,14 @@ struct btf_param {
|
|||
|
||||
enum {
|
||||
BTF_VAR_STATIC = 0,
|
||||
BTF_VAR_GLOBAL_ALLOCATED,
|
||||
BTF_VAR_GLOBAL_ALLOCATED = 1,
|
||||
BTF_VAR_GLOBAL_EXTERN = 2,
|
||||
};
|
||||
|
||||
enum btf_func_linkage {
|
||||
BTF_FUNC_STATIC = 0,
|
||||
BTF_FUNC_GLOBAL = 1,
|
||||
BTF_FUNC_EXTERN = 2,
|
||||
};
|
||||
|
||||
/* BTF_KIND_VAR is followed by a single "struct btf_var" to describe
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@ struct vfs_ns_cap_data {
|
|||
/* Allow more than 64hz interrupts from the real-time clock */
|
||||
/* Override max number of consoles on console allocation */
|
||||
/* Override max number of keymaps */
|
||||
/* Control memory reclaim behavior */
|
||||
|
||||
#define CAP_SYS_RESOURCE 24
|
||||
|
||||
|
|
|
|||
|
|
@ -272,9 +272,9 @@ enum {
|
|||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 41
|
||||
#define DM_VERSION_MINOR 42
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2019-09-16)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2020-02-27)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
|
|
|||
53
include/uapi/linux/dma-heap.h
Normal file
53
include/uapi/linux/dma-heap.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* DMABUF Heaps Userspace API
|
||||
*
|
||||
* Copyright (C) 2011 Google, Inc.
|
||||
* Copyright (C) 2019 Linaro Ltd.
|
||||
*/
|
||||
#ifndef _UAPI_LINUX_DMABUF_POOL_H
|
||||
#define _UAPI_LINUX_DMABUF_POOL_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* DOC: DMABUF Heaps Userspace API
|
||||
*/
|
||||
|
||||
/* Valid FD_FLAGS are O_CLOEXEC, O_RDONLY, O_WRONLY, O_RDWR */
|
||||
#define DMA_HEAP_VALID_FD_FLAGS (O_CLOEXEC | O_ACCMODE)
|
||||
|
||||
/* Currently no heap flags */
|
||||
#define DMA_HEAP_VALID_HEAP_FLAGS (0)
|
||||
|
||||
/**
|
||||
* struct dma_heap_allocation_data - metadata passed from userspace for
|
||||
* allocations
|
||||
* @len: size of the allocation
|
||||
* @fd: will be populated with a fd which provides the
|
||||
* handle to the allocated dma-buf
|
||||
* @fd_flags: file descriptor flags used when allocating
|
||||
* @heap_flags: flags passed to heap
|
||||
*
|
||||
* Provided by userspace as an argument to the ioctl
|
||||
*/
|
||||
struct dma_heap_allocation_data {
|
||||
__u64 len;
|
||||
__u32 fd;
|
||||
__u32 fd_flags;
|
||||
__u64 heap_flags;
|
||||
};
|
||||
|
||||
#define DMA_HEAP_IOC_MAGIC 'H'
|
||||
|
||||
/**
|
||||
* DOC: DMA_HEAP_IOCTL_ALLOC - allocate memory from pool
|
||||
*
|
||||
* Takes a dma_heap_allocation_data struct and returns it with the fd field
|
||||
* populated with the dmabuf handle of the allocation.
|
||||
*/
|
||||
#define DMA_HEAP_IOCTL_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
|
||||
struct dma_heap_allocation_data)
|
||||
|
||||
#endif /* _UAPI_LINUX_DMABUF_POOL_H */
|
||||
|
|
@ -593,6 +593,9 @@ struct ethtool_pauseparam {
|
|||
* @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
|
||||
* @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
|
||||
* @ETH_SS_PHY_TUNABLES: PHY tunable names
|
||||
* @ETH_SS_LINK_MODES: link mode names
|
||||
* @ETH_SS_MSG_CLASSES: debug message class names
|
||||
* @ETH_SS_WOL_MODES: wake-on-lan modes
|
||||
*/
|
||||
enum ethtool_stringset {
|
||||
ETH_SS_TEST = 0,
|
||||
|
|
@ -604,6 +607,12 @@ enum ethtool_stringset {
|
|||
ETH_SS_TUNABLES,
|
||||
ETH_SS_PHY_STATS,
|
||||
ETH_SS_PHY_TUNABLES,
|
||||
ETH_SS_LINK_MODES,
|
||||
ETH_SS_MSG_CLASSES,
|
||||
ETH_SS_WOL_MODES,
|
||||
|
||||
/* add new constants above here */
|
||||
ETH_SS_COUNT
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1688,6 +1697,8 @@ static inline int ethtool_validate_duplex(__u8 duplex)
|
|||
#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
|
||||
#define WAKE_FILTER (1 << 7)
|
||||
|
||||
#define WOL_MODE_COUNT 8
|
||||
|
||||
/* L2-L4 network traffic flow types */
|
||||
#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */
|
||||
#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */
|
||||
|
|
|
|||
237
include/uapi/linux/ethtool_netlink.h
Normal file
237
include/uapi/linux/ethtool_netlink.h
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* include/uapi/linux/ethtool_netlink.h - netlink interface for ethtool
|
||||
*
|
||||
* See Documentation/networking/ethtool-netlink.txt in kernel source tree for
|
||||
* doucumentation of the interface.
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_LINUX_ETHTOOL_NETLINK_H_
|
||||
#define _UAPI_LINUX_ETHTOOL_NETLINK_H_
|
||||
|
||||
#include <linux/ethtool.h>
|
||||
|
||||
/* message types - userspace to kernel */
|
||||
enum {
|
||||
ETHTOOL_MSG_USER_NONE,
|
||||
ETHTOOL_MSG_STRSET_GET,
|
||||
ETHTOOL_MSG_LINKINFO_GET,
|
||||
ETHTOOL_MSG_LINKINFO_SET,
|
||||
ETHTOOL_MSG_LINKMODES_GET,
|
||||
ETHTOOL_MSG_LINKMODES_SET,
|
||||
ETHTOOL_MSG_LINKSTATE_GET,
|
||||
ETHTOOL_MSG_DEBUG_GET,
|
||||
ETHTOOL_MSG_DEBUG_SET,
|
||||
ETHTOOL_MSG_WOL_GET,
|
||||
ETHTOOL_MSG_WOL_SET,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_USER_CNT,
|
||||
ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1
|
||||
};
|
||||
|
||||
/* message types - kernel to userspace */
|
||||
enum {
|
||||
ETHTOOL_MSG_KERNEL_NONE,
|
||||
ETHTOOL_MSG_STRSET_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKINFO_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKINFO_NTF,
|
||||
ETHTOOL_MSG_LINKMODES_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKMODES_NTF,
|
||||
ETHTOOL_MSG_LINKSTATE_GET_REPLY,
|
||||
ETHTOOL_MSG_DEBUG_GET_REPLY,
|
||||
ETHTOOL_MSG_DEBUG_NTF,
|
||||
ETHTOOL_MSG_WOL_GET_REPLY,
|
||||
ETHTOOL_MSG_WOL_NTF,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_KERNEL_CNT,
|
||||
ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1
|
||||
};
|
||||
|
||||
/* request header */
|
||||
|
||||
/* use compact bitsets in reply */
|
||||
#define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)
|
||||
/* provide optional reply for SET or ACT requests */
|
||||
#define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)
|
||||
|
||||
#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \
|
||||
ETHTOOL_FLAG_OMIT_REPLY)
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_HEADER_UNSPEC,
|
||||
ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */
|
||||
ETHTOOL_A_HEADER_DEV_NAME, /* string */
|
||||
ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_HEADER_CNT,
|
||||
ETHTOOL_A_HEADER_MAX = __ETHTOOL_A_HEADER_CNT - 1
|
||||
};
|
||||
|
||||
/* bit sets */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_BITSET_BIT_UNSPEC,
|
||||
ETHTOOL_A_BITSET_BIT_INDEX, /* u32 */
|
||||
ETHTOOL_A_BITSET_BIT_NAME, /* string */
|
||||
ETHTOOL_A_BITSET_BIT_VALUE, /* flag */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_BITSET_BIT_CNT,
|
||||
ETHTOOL_A_BITSET_BIT_MAX = __ETHTOOL_A_BITSET_BIT_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_BITSET_BITS_UNSPEC,
|
||||
ETHTOOL_A_BITSET_BITS_BIT, /* nest - _A_BITSET_BIT_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_BITSET_BITS_CNT,
|
||||
ETHTOOL_A_BITSET_BITS_MAX = __ETHTOOL_A_BITSET_BITS_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_BITSET_UNSPEC,
|
||||
ETHTOOL_A_BITSET_NOMASK, /* flag */
|
||||
ETHTOOL_A_BITSET_SIZE, /* u32 */
|
||||
ETHTOOL_A_BITSET_BITS, /* nest - _A_BITSET_BITS_* */
|
||||
ETHTOOL_A_BITSET_VALUE, /* binary */
|
||||
ETHTOOL_A_BITSET_MASK, /* binary */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_BITSET_CNT,
|
||||
ETHTOOL_A_BITSET_MAX = __ETHTOOL_A_BITSET_CNT - 1
|
||||
};
|
||||
|
||||
/* string sets */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRING_UNSPEC,
|
||||
ETHTOOL_A_STRING_INDEX, /* u32 */
|
||||
ETHTOOL_A_STRING_VALUE, /* string */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRING_CNT,
|
||||
ETHTOOL_A_STRING_MAX = __ETHTOOL_A_STRING_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRINGS_UNSPEC,
|
||||
ETHTOOL_A_STRINGS_STRING, /* nest - _A_STRINGS_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRINGS_CNT,
|
||||
ETHTOOL_A_STRINGS_MAX = __ETHTOOL_A_STRINGS_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRINGSET_UNSPEC,
|
||||
ETHTOOL_A_STRINGSET_ID, /* u32 */
|
||||
ETHTOOL_A_STRINGSET_COUNT, /* u32 */
|
||||
ETHTOOL_A_STRINGSET_STRINGS, /* nest - _A_STRINGS_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRINGSET_CNT,
|
||||
ETHTOOL_A_STRINGSET_MAX = __ETHTOOL_A_STRINGSET_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRINGSETS_UNSPEC,
|
||||
ETHTOOL_A_STRINGSETS_STRINGSET, /* nest - _A_STRINGSET_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRINGSETS_CNT,
|
||||
ETHTOOL_A_STRINGSETS_MAX = __ETHTOOL_A_STRINGSETS_CNT - 1
|
||||
};
|
||||
|
||||
/* STRSET */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRSET_UNSPEC,
|
||||
ETHTOOL_A_STRSET_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_STRSET_STRINGSETS, /* nest - _A_STRINGSETS_* */
|
||||
ETHTOOL_A_STRSET_COUNTS_ONLY, /* flag */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRSET_CNT,
|
||||
ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1
|
||||
};
|
||||
|
||||
/* LINKINFO */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_LINKINFO_UNSPEC,
|
||||
ETHTOOL_A_LINKINFO_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_LINKINFO_PORT, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_PHYADDR, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_TP_MDIX, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_TRANSCEIVER, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_LINKINFO_CNT,
|
||||
ETHTOOL_A_LINKINFO_MAX = __ETHTOOL_A_LINKINFO_CNT - 1
|
||||
};
|
||||
|
||||
/* LINKMODES */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_LINKMODES_UNSPEC,
|
||||
ETHTOOL_A_LINKMODES_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_LINKMODES_AUTONEG, /* u8 */
|
||||
ETHTOOL_A_LINKMODES_OURS, /* bitset */
|
||||
ETHTOOL_A_LINKMODES_PEER, /* bitset */
|
||||
ETHTOOL_A_LINKMODES_SPEED, /* u32 */
|
||||
ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_LINKMODES_CNT,
|
||||
ETHTOOL_A_LINKMODES_MAX = __ETHTOOL_A_LINKMODES_CNT - 1
|
||||
};
|
||||
|
||||
/* LINKSTATE */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_LINKSTATE_UNSPEC,
|
||||
ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_LINKSTATE_LINK, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_LINKSTATE_CNT,
|
||||
ETHTOOL_A_LINKSTATE_MAX = __ETHTOOL_A_LINKSTATE_CNT - 1
|
||||
};
|
||||
|
||||
/* DEBUG */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_DEBUG_UNSPEC,
|
||||
ETHTOOL_A_DEBUG_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_DEBUG_MSGMASK, /* bitset */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_DEBUG_CNT,
|
||||
ETHTOOL_A_DEBUG_MAX = __ETHTOOL_A_DEBUG_CNT - 1
|
||||
};
|
||||
|
||||
/* WOL */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_WOL_UNSPEC,
|
||||
ETHTOOL_A_WOL_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_WOL_MODES, /* bitset */
|
||||
ETHTOOL_A_WOL_SOPASS, /* binary */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_WOL_CNT,
|
||||
ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1
|
||||
};
|
||||
|
||||
/* generic netlink info */
|
||||
#define ETHTOOL_GENL_NAME "ethtool"
|
||||
#define ETHTOOL_GENL_VERSION 1
|
||||
|
||||
#define ETHTOOL_MCGRP_MONITOR_NAME "monitor"
|
||||
|
||||
#endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
#define _UAPI_LINUX_FCNTL_H
|
||||
|
||||
#include <asm/fcntl.h>
|
||||
#include <linux/openat2.h>
|
||||
|
||||
#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
|
||||
#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
|
||||
|
|
@ -100,5 +101,4 @@
|
|||
|
||||
#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
|
||||
|
||||
|
||||
#endif /* _UAPI_LINUX_FCNTL_H */
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#ifndef _UAPI_LINUX_FSCRYPT_H
|
||||
#define _UAPI_LINUX_FSCRYPT_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Encryption policy flags */
|
||||
|
|
@ -109,11 +110,22 @@ struct fscrypt_key_specifier {
|
|||
} u;
|
||||
};
|
||||
|
||||
/*
|
||||
* Payload of Linux keyring key of type "fscrypt-provisioning", referenced by
|
||||
* fscrypt_add_key_arg::key_id as an alternative to fscrypt_add_key_arg::raw.
|
||||
*/
|
||||
struct fscrypt_provisioning_key_payload {
|
||||
__u32 type;
|
||||
__u32 __reserved;
|
||||
__u8 raw[];
|
||||
};
|
||||
|
||||
/* Struct passed to FS_IOC_ADD_ENCRYPTION_KEY */
|
||||
struct fscrypt_add_key_arg {
|
||||
struct fscrypt_key_specifier key_spec;
|
||||
__u32 raw_size;
|
||||
__u32 __reserved[9];
|
||||
__u32 key_id;
|
||||
__u32 __reserved[8];
|
||||
__u8 raw[];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* interface to user space for the gigaset driver
|
||||
*
|
||||
* Copyright (c) 2004 by Hansjoerg Lipp <hjlipp@web.de>
|
||||
*
|
||||
* =====================================================================
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* =====================================================================
|
||||
*/
|
||||
|
||||
#ifndef GIGASET_INTERFACE_H
|
||||
#define GIGASET_INTERFACE_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
/* The magic IOCTL value for this interface. */
|
||||
#define GIGASET_IOCTL 0x47
|
||||
|
||||
/* enable/disable device control via character device (lock out ISDN subsys) */
|
||||
#define GIGASET_REDIR _IOWR(GIGASET_IOCTL, 0, int)
|
||||
|
||||
/* enable adapter configuration mode (M10x only) */
|
||||
#define GIGASET_CONFIG _IOWR(GIGASET_IOCTL, 1, int)
|
||||
|
||||
/* set break characters (M105 only) */
|
||||
#define GIGASET_BRKCHARS _IOW(GIGASET_IOCTL, 2, unsigned char[6])
|
||||
|
||||
/* get version information selected by arg[0] */
|
||||
#define GIGASET_VERSION _IOWR(GIGASET_IOCTL, 3, unsigned[4])
|
||||
/* values for GIGASET_VERSION arg[0] */
|
||||
#define GIGVER_DRIVER 0 /* get driver version */
|
||||
#define GIGVER_COMPAT 1 /* get interface compatibility version */
|
||||
#define GIGVER_FWBASE 2 /* get base station firmware version */
|
||||
|
||||
#endif
|
||||
|
|
@ -79,6 +79,15 @@ typedef struct {
|
|||
unsigned int timeout;
|
||||
} cisco_proto;
|
||||
|
||||
typedef struct {
|
||||
unsigned short dce; /* 1 for DCE (network side) operation */
|
||||
unsigned int modulo; /* modulo (8 = basic / 128 = extended) */
|
||||
unsigned int window; /* frame window size */
|
||||
unsigned int t1; /* timeout t1 */
|
||||
unsigned int t2; /* timeout t2 */
|
||||
unsigned int n2; /* frame retry counter */
|
||||
} x25_hdlc_proto;
|
||||
|
||||
/* PPP doesn't need any info now - supply length = 0 to ioctl */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ struct hidraw_devinfo {
|
|||
/* The first byte of SFEATURE and GFEATURE is the report number */
|
||||
#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
|
||||
#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
|
||||
#define HIDIOCGRAWUNIQ(len) _IOC(_IOC_READ, 'H', 0x08, len)
|
||||
|
||||
#define HIDRAW_FIRST_MINOR 0
|
||||
#define HIDRAW_MAX_DEVICES 64
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* $Id: hysdn_if.h,v 1.1.8.3 2001/09/23 22:25:05 kai Exp $
|
||||
*
|
||||
* Linux driver for HYSDN cards
|
||||
* ioctl definitions shared by hynetmgr and driver.
|
||||
*
|
||||
* Author Werner Cornelius (werner@titro.de) for Hypercope GmbH
|
||||
* Copyright 1999 by Werner Cornelius (werner@titro.de)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* error values */
|
||||
/****************/
|
||||
#define ERR_NONE 0 /* no error occurred */
|
||||
#define ERR_ALREADY_BOOT 1000 /* we are already booting */
|
||||
#define EPOF_BAD_MAGIC 1001 /* bad magic in POF header */
|
||||
#define ERR_BOARD_DPRAM 1002 /* board DPRAM failed */
|
||||
#define EPOF_INTERNAL 1003 /* internal POF handler error */
|
||||
#define EPOF_BAD_IMG_SIZE 1004 /* POF boot image size invalid */
|
||||
#define ERR_BOOTIMG_FAIL 1005 /* 1. stage boot image did not start */
|
||||
#define ERR_BOOTSEQ_FAIL 1006 /* 2. stage boot seq handshake timeout */
|
||||
#define ERR_POF_TIMEOUT 1007 /* timeout waiting for card pof ready */
|
||||
#define ERR_NOT_BOOTED 1008 /* operation only allowed when booted */
|
||||
#define ERR_CONF_LONG 1009 /* conf line is too long */
|
||||
#define ERR_INV_CHAN 1010 /* invalid channel number */
|
||||
#define ERR_ASYNC_TIME 1011 /* timeout sending async data */
|
||||
|
||||
|
||||
|
||||
|
||||
228
include/uapi/linux/idxd.h
Normal file
228
include/uapi/linux/idxd.h
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
|
||||
#ifndef _USR_IDXD_H_
|
||||
#define _USR_IDXD_H_
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/* Descriptor flags */
|
||||
#define IDXD_OP_FLAG_FENCE 0x0001
|
||||
#define IDXD_OP_FLAG_BOF 0x0002
|
||||
#define IDXD_OP_FLAG_CRAV 0x0004
|
||||
#define IDXD_OP_FLAG_RCR 0x0008
|
||||
#define IDXD_OP_FLAG_RCI 0x0010
|
||||
#define IDXD_OP_FLAG_CRSTS 0x0020
|
||||
#define IDXD_OP_FLAG_CR 0x0080
|
||||
#define IDXD_OP_FLAG_CC 0x0100
|
||||
#define IDXD_OP_FLAG_ADDR1_TCS 0x0200
|
||||
#define IDXD_OP_FLAG_ADDR2_TCS 0x0400
|
||||
#define IDXD_OP_FLAG_ADDR3_TCS 0x0800
|
||||
#define IDXD_OP_FLAG_CR_TCS 0x1000
|
||||
#define IDXD_OP_FLAG_STORD 0x2000
|
||||
#define IDXD_OP_FLAG_DRDBK 0x4000
|
||||
#define IDXD_OP_FLAG_DSTS 0x8000
|
||||
|
||||
/* Opcode */
|
||||
enum dsa_opcode {
|
||||
DSA_OPCODE_NOOP = 0,
|
||||
DSA_OPCODE_BATCH,
|
||||
DSA_OPCODE_DRAIN,
|
||||
DSA_OPCODE_MEMMOVE,
|
||||
DSA_OPCODE_MEMFILL,
|
||||
DSA_OPCODE_COMPARE,
|
||||
DSA_OPCODE_COMPVAL,
|
||||
DSA_OPCODE_CR_DELTA,
|
||||
DSA_OPCODE_AP_DELTA,
|
||||
DSA_OPCODE_DUALCAST,
|
||||
DSA_OPCODE_CRCGEN = 0x10,
|
||||
DSA_OPCODE_COPY_CRC,
|
||||
DSA_OPCODE_DIF_CHECK,
|
||||
DSA_OPCODE_DIF_INS,
|
||||
DSA_OPCODE_DIF_STRP,
|
||||
DSA_OPCODE_DIF_UPDT,
|
||||
DSA_OPCODE_CFLUSH = 0x20,
|
||||
};
|
||||
|
||||
/* Completion record status */
|
||||
enum dsa_completion_status {
|
||||
DSA_COMP_NONE = 0,
|
||||
DSA_COMP_SUCCESS,
|
||||
DSA_COMP_SUCCESS_PRED,
|
||||
DSA_COMP_PAGE_FAULT_NOBOF,
|
||||
DSA_COMP_PAGE_FAULT_IR,
|
||||
DSA_COMP_BATCH_FAIL,
|
||||
DSA_COMP_BATCH_PAGE_FAULT,
|
||||
DSA_COMP_DR_OFFSET_NOINC,
|
||||
DSA_COMP_DR_OFFSET_ERANGE,
|
||||
DSA_COMP_DIF_ERR,
|
||||
DSA_COMP_BAD_OPCODE = 0x10,
|
||||
DSA_COMP_INVALID_FLAGS,
|
||||
DSA_COMP_NOZERO_RESERVE,
|
||||
DSA_COMP_XFER_ERANGE,
|
||||
DSA_COMP_DESC_CNT_ERANGE,
|
||||
DSA_COMP_DR_ERANGE,
|
||||
DSA_COMP_OVERLAP_BUFFERS,
|
||||
DSA_COMP_DCAST_ERR,
|
||||
DSA_COMP_DESCLIST_ALIGN,
|
||||
DSA_COMP_INT_HANDLE_INVAL,
|
||||
DSA_COMP_CRA_XLAT,
|
||||
DSA_COMP_CRA_ALIGN,
|
||||
DSA_COMP_ADDR_ALIGN,
|
||||
DSA_COMP_PRIV_BAD,
|
||||
DSA_COMP_TRAFFIC_CLASS_CONF,
|
||||
DSA_COMP_PFAULT_RDBA,
|
||||
DSA_COMP_HW_ERR1,
|
||||
DSA_COMP_HW_ERR_DRB,
|
||||
DSA_COMP_TRANSLATION_FAIL,
|
||||
};
|
||||
|
||||
#define DSA_COMP_STATUS_MASK 0x7f
|
||||
#define DSA_COMP_STATUS_WRITE 0x80
|
||||
|
||||
struct dsa_batch_desc {
|
||||
uint32_t pasid:20;
|
||||
uint32_t rsvd:11;
|
||||
uint32_t priv:1;
|
||||
uint32_t flags:24;
|
||||
uint32_t opcode:8;
|
||||
uint64_t completion_addr;
|
||||
uint64_t desc_list_addr;
|
||||
uint64_t rsvd1;
|
||||
uint32_t desc_count;
|
||||
uint16_t interrupt_handle;
|
||||
uint16_t rsvd2;
|
||||
uint8_t rsvd3[24];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct dsa_hw_desc {
|
||||
uint32_t pasid:20;
|
||||
uint32_t rsvd:11;
|
||||
uint32_t priv:1;
|
||||
uint32_t flags:24;
|
||||
uint32_t opcode:8;
|
||||
uint64_t completion_addr;
|
||||
union {
|
||||
uint64_t src_addr;
|
||||
uint64_t rdback_addr;
|
||||
uint64_t pattern;
|
||||
};
|
||||
union {
|
||||
uint64_t dst_addr;
|
||||
uint64_t rdback_addr2;
|
||||
uint64_t src2_addr;
|
||||
uint64_t comp_pattern;
|
||||
};
|
||||
uint32_t xfer_size;
|
||||
uint16_t int_handle;
|
||||
uint16_t rsvd1;
|
||||
union {
|
||||
uint8_t expected_res;
|
||||
struct {
|
||||
uint64_t delta_addr;
|
||||
uint32_t max_delta_size;
|
||||
};
|
||||
uint32_t delta_rec_size;
|
||||
uint64_t dest2;
|
||||
/* CRC */
|
||||
struct {
|
||||
uint32_t crc_seed;
|
||||
uint32_t crc_rsvd;
|
||||
uint64_t seed_addr;
|
||||
};
|
||||
/* DIF check or strip */
|
||||
struct {
|
||||
uint8_t src_dif_flags;
|
||||
uint8_t dif_chk_res;
|
||||
uint8_t dif_chk_flags;
|
||||
uint8_t dif_chk_res2[5];
|
||||
uint32_t chk_ref_tag_seed;
|
||||
uint16_t chk_app_tag_mask;
|
||||
uint16_t chk_app_tag_seed;
|
||||
};
|
||||
/* DIF insert */
|
||||
struct {
|
||||
uint8_t dif_ins_res;
|
||||
uint8_t dest_dif_flag;
|
||||
uint8_t dif_ins_flags;
|
||||
uint8_t dif_ins_res2[13];
|
||||
uint32_t ins_ref_tag_seed;
|
||||
uint16_t ins_app_tag_mask;
|
||||
uint16_t ins_app_tag_seed;
|
||||
};
|
||||
/* DIF update */
|
||||
struct {
|
||||
uint8_t src_upd_flags;
|
||||
uint8_t upd_dest_flags;
|
||||
uint8_t dif_upd_flags;
|
||||
uint8_t dif_upd_res[5];
|
||||
uint32_t src_ref_tag_seed;
|
||||
uint16_t src_app_tag_mask;
|
||||
uint16_t src_app_tag_seed;
|
||||
uint32_t dest_ref_tag_seed;
|
||||
uint16_t dest_app_tag_mask;
|
||||
uint16_t dest_app_tag_seed;
|
||||
};
|
||||
|
||||
uint8_t op_specific[24];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
struct dsa_raw_desc {
|
||||
uint64_t field[8];
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* The status field will be modified by hardware, therefore it should be
|
||||
* volatile and prevent the compiler from optimize the read.
|
||||
*/
|
||||
struct dsa_completion_record {
|
||||
volatile uint8_t status;
|
||||
union {
|
||||
uint8_t result;
|
||||
uint8_t dif_status;
|
||||
};
|
||||
uint16_t rsvd;
|
||||
uint32_t bytes_completed;
|
||||
uint64_t fault_addr;
|
||||
union {
|
||||
uint16_t delta_rec_size;
|
||||
uint16_t crc_val;
|
||||
|
||||
/* DIF check & strip */
|
||||
struct {
|
||||
uint32_t dif_chk_ref_tag;
|
||||
uint16_t dif_chk_app_tag_mask;
|
||||
uint16_t dif_chk_app_tag;
|
||||
};
|
||||
|
||||
/* DIF insert */
|
||||
struct {
|
||||
uint64_t dif_ins_res;
|
||||
uint32_t dif_ins_ref_tag;
|
||||
uint16_t dif_ins_app_tag_mask;
|
||||
uint16_t dif_ins_app_tag;
|
||||
};
|
||||
|
||||
/* DIF update */
|
||||
struct {
|
||||
uint32_t dif_upd_src_ref_tag;
|
||||
uint16_t dif_upd_src_app_tag_mask;
|
||||
uint16_t dif_upd_src_app_tag;
|
||||
uint32_t dif_upd_dest_ref_tag;
|
||||
uint16_t dif_upd_dest_app_tag_mask;
|
||||
uint16_t dif_upd_dest_app_tag;
|
||||
};
|
||||
|
||||
uint8_t op_specific[16];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
struct dsa_raw_completion_record {
|
||||
uint64_t field[4];
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
|
@ -213,6 +213,7 @@ struct if_settings {
|
|||
fr_proto __user *fr;
|
||||
fr_proto_pvc __user *fr_pvc;
|
||||
fr_proto_pvc_info __user *fr_pvc_info;
|
||||
x25_hdlc_proto __user *x25;
|
||||
|
||||
/* interface settings */
|
||||
sync_serial_settings __user *sync;
|
||||
|
|
|
|||
|
|
@ -95,6 +95,16 @@
|
|||
#define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */
|
||||
#define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */
|
||||
|
||||
/* 802.3ad port state definitions (43.4.2.2 in the 802.3ad standard) */
|
||||
#define LACP_STATE_LACP_ACTIVITY 0x1
|
||||
#define LACP_STATE_LACP_TIMEOUT 0x2
|
||||
#define LACP_STATE_AGGREGATION 0x4
|
||||
#define LACP_STATE_SYNCHRONIZATION 0x8
|
||||
#define LACP_STATE_COLLECTING 0x10
|
||||
#define LACP_STATE_DISTRIBUTING 0x20
|
||||
#define LACP_STATE_DEFAULTED 0x40
|
||||
#define LACP_STATE_EXPIRED 0x80
|
||||
|
||||
typedef struct ifbond {
|
||||
__s32 bond_mode;
|
||||
__s32 num_slaves;
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ enum {
|
|||
#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */
|
||||
#define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
|
||||
#define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */
|
||||
#define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */
|
||||
|
||||
struct bridge_vlan_info {
|
||||
__u16 flags;
|
||||
|
|
@ -156,6 +157,45 @@ struct bridge_vlan_xstats {
|
|||
__u32 pad2;
|
||||
};
|
||||
|
||||
struct bridge_stp_xstats {
|
||||
__u64 transition_blk;
|
||||
__u64 transition_fwd;
|
||||
__u64 rx_bpdu;
|
||||
__u64 tx_bpdu;
|
||||
__u64 rx_tcn;
|
||||
__u64 tx_tcn;
|
||||
};
|
||||
|
||||
/* Bridge vlan RTM header */
|
||||
struct br_vlan_msg {
|
||||
__u8 family;
|
||||
__u8 reserved1;
|
||||
__u16 reserved2;
|
||||
__u32 ifindex;
|
||||
};
|
||||
|
||||
/* Bridge vlan RTM attributes
|
||||
* [BRIDGE_VLANDB_ENTRY] = {
|
||||
* [BRIDGE_VLANDB_ENTRY_INFO]
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
enum {
|
||||
BRIDGE_VLANDB_UNSPEC,
|
||||
BRIDGE_VLANDB_ENTRY,
|
||||
__BRIDGE_VLANDB_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
|
||||
|
||||
enum {
|
||||
BRIDGE_VLANDB_ENTRY_UNSPEC,
|
||||
BRIDGE_VLANDB_ENTRY_INFO,
|
||||
BRIDGE_VLANDB_ENTRY_RANGE,
|
||||
BRIDGE_VLANDB_ENTRY_STATE,
|
||||
__BRIDGE_VLANDB_ENTRY_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
|
||||
|
||||
/* Bridge multicast database attributes
|
||||
* [MDBA_MDB] = {
|
||||
* [MDBA_MDB_ENTRY] = {
|
||||
|
|
@ -262,6 +302,7 @@ enum {
|
|||
BRIDGE_XSTATS_VLAN,
|
||||
BRIDGE_XSTATS_MCAST,
|
||||
BRIDGE_XSTATS_PAD,
|
||||
BRIDGE_XSTATS_STP,
|
||||
__BRIDGE_XSTATS_MAX
|
||||
};
|
||||
#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ enum {
|
|||
IFLA_MAX_MTU,
|
||||
IFLA_PROP_LIST,
|
||||
IFLA_ALT_IFNAME, /* Alternative ifname */
|
||||
IFLA_PERM_ADDRESS,
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
|
|
@ -485,6 +486,13 @@ enum macsec_validation_type {
|
|||
MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
|
||||
};
|
||||
|
||||
enum macsec_offload {
|
||||
MACSEC_OFFLOAD_OFF = 0,
|
||||
MACSEC_OFFLOAD_PHY = 1,
|
||||
__MACSEC_OFFLOAD_END,
|
||||
MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1,
|
||||
};
|
||||
|
||||
/* IPVLAN section */
|
||||
enum {
|
||||
IFLA_IPVLAN_UNSPEC,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ enum macsec_attrs {
|
|||
MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */
|
||||
MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */
|
||||
MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */
|
||||
MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */
|
||||
__MACSEC_ATTR_END,
|
||||
NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
|
||||
MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
|
||||
|
|
@ -97,6 +98,15 @@ enum macsec_sa_attrs {
|
|||
MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
|
||||
};
|
||||
|
||||
enum macsec_offload_attrs {
|
||||
MACSEC_OFFLOAD_ATTR_UNSPEC,
|
||||
MACSEC_OFFLOAD_ATTR_TYPE, /* config/dump, u8 0..2 */
|
||||
MACSEC_OFFLOAD_ATTR_PAD,
|
||||
__MACSEC_OFFLOAD_ATTR_END,
|
||||
NUM_MACSEC_OFFLOAD_ATTR = __MACSEC_OFFLOAD_ATTR_END,
|
||||
MACSEC_OFFLOAD_ATTR_MAX = __MACSEC_OFFLOAD_ATTR_END - 1,
|
||||
};
|
||||
|
||||
enum macsec_nl_commands {
|
||||
MACSEC_CMD_GET_TXSC,
|
||||
MACSEC_CMD_ADD_RXSC,
|
||||
|
|
@ -108,6 +118,7 @@ enum macsec_nl_commands {
|
|||
MACSEC_CMD_ADD_RXSA,
|
||||
MACSEC_CMD_DEL_RXSA,
|
||||
MACSEC_CMD_UPD_RXSA,
|
||||
MACSEC_CMD_UPD_OFFLOAD,
|
||||
};
|
||||
|
||||
/* u64 per-RXSC stats */
|
||||
|
|
|
|||
|
|
@ -74,8 +74,12 @@ enum {
|
|||
#define IPPROTO_UDPLITE IPPROTO_UDPLITE
|
||||
IPPROTO_MPLS = 137, /* MPLS in IP (RFC 4023) */
|
||||
#define IPPROTO_MPLS IPPROTO_MPLS
|
||||
IPPROTO_ETHERNET = 143, /* Ethernet-within-IPv6 Encapsulation */
|
||||
#define IPPROTO_ETHERNET IPPROTO_ETHERNET
|
||||
IPPROTO_RAW = 255, /* Raw IP packets */
|
||||
#define IPPROTO_RAW IPPROTO_RAW
|
||||
IPPROTO_MPTCP = 262, /* Multipath TCP connection */
|
||||
#define IPPROTO_MPTCP IPPROTO_MPTCP
|
||||
IPPROTO_MAX
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -652,6 +652,9 @@
|
|||
/* Electronic privacy screen control */
|
||||
#define KEY_PRIVACY_SCREEN_TOGGLE 0x279
|
||||
|
||||
/* Select an area of screen to be copied */
|
||||
#define KEY_SELECTIVE_SCREENSHOT 0x27a
|
||||
|
||||
/*
|
||||
* Some keyboards have keys which do not have a defined meaning, these keys
|
||||
* are intended to be programmed / bound to macros by the user. For most
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ struct input_event {
|
|||
__kernel_ulong_t __sec;
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
unsigned int __usec;
|
||||
unsigned int __pad;
|
||||
#else
|
||||
__kernel_ulong_t __usec;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,21 +34,43 @@ struct io_uring_sqe {
|
|||
__u32 timeout_flags;
|
||||
__u32 accept_flags;
|
||||
__u32 cancel_flags;
|
||||
__u32 open_flags;
|
||||
__u32 statx_flags;
|
||||
__u32 fadvise_advice;
|
||||
};
|
||||
__u64 user_data; /* data to be passed back at completion time */
|
||||
union {
|
||||
__u16 buf_index; /* index into fixed buffers, if used */
|
||||
struct {
|
||||
/* index into fixed buffers, if used */
|
||||
__u16 buf_index;
|
||||
/* personality to use, if used */
|
||||
__u16 personality;
|
||||
};
|
||||
__u64 __pad2[3];
|
||||
};
|
||||
};
|
||||
|
||||
enum {
|
||||
IOSQE_FIXED_FILE_BIT,
|
||||
IOSQE_IO_DRAIN_BIT,
|
||||
IOSQE_IO_LINK_BIT,
|
||||
IOSQE_IO_HARDLINK_BIT,
|
||||
IOSQE_ASYNC_BIT,
|
||||
};
|
||||
|
||||
/*
|
||||
* sqe->flags
|
||||
*/
|
||||
#define IOSQE_FIXED_FILE (1U << 0) /* use fixed fileset */
|
||||
#define IOSQE_IO_DRAIN (1U << 1) /* issue after inflight IO */
|
||||
#define IOSQE_IO_LINK (1U << 2) /* links next sqe */
|
||||
#define IOSQE_IO_HARDLINK (1U << 3) /* like LINK, but stronger */
|
||||
/* use fixed fileset */
|
||||
#define IOSQE_FIXED_FILE (1U << IOSQE_FIXED_FILE_BIT)
|
||||
/* issue after inflight IO */
|
||||
#define IOSQE_IO_DRAIN (1U << IOSQE_IO_DRAIN_BIT)
|
||||
/* links next sqe */
|
||||
#define IOSQE_IO_LINK (1U << IOSQE_IO_LINK_BIT)
|
||||
/* like LINK, but stronger */
|
||||
#define IOSQE_IO_HARDLINK (1U << IOSQE_IO_HARDLINK_BIT)
|
||||
/* always go async */
|
||||
#define IOSQE_ASYNC (1U << IOSQE_ASYNC_BIT)
|
||||
|
||||
/*
|
||||
* io_uring_setup() flags
|
||||
|
|
@ -57,6 +79,8 @@ struct io_uring_sqe {
|
|||
#define IORING_SETUP_SQPOLL (1U << 1) /* SQ poll thread */
|
||||
#define IORING_SETUP_SQ_AFF (1U << 2) /* sq_thread_cpu is valid */
|
||||
#define IORING_SETUP_CQSIZE (1U << 3) /* app defines CQ size */
|
||||
#define IORING_SETUP_CLAMP (1U << 4) /* clamp SQ/CQ ring sizes */
|
||||
#define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */
|
||||
|
||||
enum {
|
||||
IORING_OP_NOP,
|
||||
|
|
@ -76,6 +100,19 @@ enum {
|
|||
IORING_OP_ASYNC_CANCEL,
|
||||
IORING_OP_LINK_TIMEOUT,
|
||||
IORING_OP_CONNECT,
|
||||
IORING_OP_FALLOCATE,
|
||||
IORING_OP_OPENAT,
|
||||
IORING_OP_CLOSE,
|
||||
IORING_OP_FILES_UPDATE,
|
||||
IORING_OP_STATX,
|
||||
IORING_OP_READ,
|
||||
IORING_OP_WRITE,
|
||||
IORING_OP_FADVISE,
|
||||
IORING_OP_MADVISE,
|
||||
IORING_OP_SEND,
|
||||
IORING_OP_RECV,
|
||||
IORING_OP_OPENAT2,
|
||||
IORING_OP_EPOLL_CTL,
|
||||
|
||||
/* this goes last, obviously */
|
||||
IORING_OP_LAST,
|
||||
|
|
@ -153,7 +190,8 @@ struct io_uring_params {
|
|||
__u32 sq_thread_cpu;
|
||||
__u32 sq_thread_idle;
|
||||
__u32 features;
|
||||
__u32 resv[4];
|
||||
__u32 wq_fd;
|
||||
__u32 resv[3];
|
||||
struct io_sqring_offsets sq_off;
|
||||
struct io_cqring_offsets cq_off;
|
||||
};
|
||||
|
|
@ -164,6 +202,8 @@ struct io_uring_params {
|
|||
#define IORING_FEAT_SINGLE_MMAP (1U << 0)
|
||||
#define IORING_FEAT_NODROP (1U << 1)
|
||||
#define IORING_FEAT_SUBMIT_STABLE (1U << 2)
|
||||
#define IORING_FEAT_RW_CUR_POS (1U << 3)
|
||||
#define IORING_FEAT_CUR_PERSONALITY (1U << 4)
|
||||
|
||||
/*
|
||||
* io_uring_register(2) opcodes and arguments
|
||||
|
|
@ -175,10 +215,32 @@ struct io_uring_params {
|
|||
#define IORING_REGISTER_EVENTFD 4
|
||||
#define IORING_UNREGISTER_EVENTFD 5
|
||||
#define IORING_REGISTER_FILES_UPDATE 6
|
||||
#define IORING_REGISTER_EVENTFD_ASYNC 7
|
||||
#define IORING_REGISTER_PROBE 8
|
||||
#define IORING_REGISTER_PERSONALITY 9
|
||||
#define IORING_UNREGISTER_PERSONALITY 10
|
||||
|
||||
struct io_uring_files_update {
|
||||
__u32 offset;
|
||||
__s32 *fds;
|
||||
__u32 resv;
|
||||
__aligned_u64 /* __s32 * */ fds;
|
||||
};
|
||||
|
||||
#define IO_URING_OP_SUPPORTED (1U << 0)
|
||||
|
||||
struct io_uring_probe_op {
|
||||
__u8 op;
|
||||
__u8 resv;
|
||||
__u16 flags; /* IO_URING_OP_* flags */
|
||||
__u32 resv2;
|
||||
};
|
||||
|
||||
struct io_uring_probe {
|
||||
__u8 last_op; /* last opcode supported */
|
||||
__u8 ops_len; /* length of ops[] array below */
|
||||
__u16 resv;
|
||||
__u32 resv2[3];
|
||||
struct io_uring_probe_op ops[0];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,7 @@ struct kvm_ppc_resize_hpt {
|
|||
#define KVM_CAP_PPC_GUEST_DEBUG_SSTEP 176
|
||||
#define KVM_CAP_ARM_NISV_TO_USER 177
|
||||
#define KVM_CAP_ARM_INJECT_EXT_DABT 178
|
||||
#define KVM_CAP_S390_VCPU_RESETS 179
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
|
|
@ -1473,6 +1474,10 @@ struct kvm_enc_region {
|
|||
/* Available with KVM_CAP_ARM_SVE */
|
||||
#define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int)
|
||||
|
||||
/* Available with KVM_CAP_S390_VCPU_RESETS */
|
||||
#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3)
|
||||
#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4)
|
||||
|
||||
/* Secure Encrypted Virtualization command */
|
||||
enum sev_cmd_id {
|
||||
/* Guest initialization commands */
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@
|
|||
#define NSFS_MAGIC 0x6e736673
|
||||
#define BPF_FS_MAGIC 0xcafe4a11
|
||||
#define AAFS_MAGIC 0x5a3c69f0
|
||||
#define ZONEFS_MAGIC 0x5a4f4653
|
||||
|
||||
/* Since UDF 2.01 is ISO 13346 based... */
|
||||
#define UDF_SUPER_MAGIC 0x15013346
|
||||
|
|
|
|||
|
|
@ -131,6 +131,18 @@
|
|||
#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */
|
||||
#define NWAYTEST_RESV2 0xfe00 /* Unused... */
|
||||
|
||||
/* MAC and PHY tx_config_Reg[15:0] for SGMII in-band auto-negotiation.*/
|
||||
#define ADVERTISE_SGMII 0x0001 /* MAC can do SGMII */
|
||||
#define LPA_SGMII 0x0001 /* PHY can do SGMII */
|
||||
#define LPA_SGMII_DPX_SPD_MASK 0x1C00 /* SGMII duplex and speed bits */
|
||||
#define LPA_SGMII_10HALF 0x0000 /* Can do 10mbps half-duplex */
|
||||
#define LPA_SGMII_10FULL 0x1000 /* Can do 10mbps full-duplex */
|
||||
#define LPA_SGMII_100HALF 0x0400 /* Can do 100mbps half-duplex */
|
||||
#define LPA_SGMII_100FULL 0x1400 /* Can do 100mbps full-duplex */
|
||||
#define LPA_SGMII_1000HALF 0x0800 /* Can do 1000mbps half-duplex */
|
||||
#define LPA_SGMII_1000FULL 0x1800 /* Can do 1000mbps full-duplex */
|
||||
#define LPA_SGMII_LINK 0x8000 /* PHY link with copper-side partner */
|
||||
|
||||
/* 1000BASE-T Control register */
|
||||
#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */
|
||||
#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */
|
||||
|
|
|
|||
|
|
@ -90,6 +90,14 @@ enum hwtstamp_tx_types {
|
|||
* queue.
|
||||
*/
|
||||
HWTSTAMP_TX_ONESTEP_SYNC,
|
||||
|
||||
/*
|
||||
* Same as HWTSTAMP_TX_ONESTEP_SYNC, but also enables time
|
||||
* stamp insertion directly into PDelay_Resp packets. In this
|
||||
* case, neither transmitted Sync nor PDelay_Resp packets will
|
||||
* receive a time stamp via the socket error queue.
|
||||
*/
|
||||
HWTSTAMP_TX_ONESTEP_P2P,
|
||||
};
|
||||
|
||||
/* possible values for hwtstamp_config->rx_filter */
|
||||
|
|
|
|||
|
|
@ -97,6 +97,15 @@ enum ip_conntrack_status {
|
|||
IPS_UNTRACKED_BIT = 12,
|
||||
IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT),
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/* Re-purposed for in-kernel use:
|
||||
* Tags a conntrack entry that clashed with an existing entry
|
||||
* on insert.
|
||||
*/
|
||||
IPS_NAT_CLASH_BIT = IPS_UNTRACKED_BIT,
|
||||
IPS_NAT_CLASH = IPS_UNTRACKED,
|
||||
#endif
|
||||
|
||||
/* Conntrack got a helper explicitly attached via CT target. */
|
||||
IPS_HELPER_BIT = 13,
|
||||
IPS_HELPER = (1 << IPS_HELPER_BIT),
|
||||
|
|
@ -110,7 +119,8 @@ enum ip_conntrack_status {
|
|||
*/
|
||||
IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |
|
||||
IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |
|
||||
IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD),
|
||||
IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED |
|
||||
IPS_OFFLOAD),
|
||||
|
||||
__IPS_MAX_BIT = 15,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ enum nft_registers {
|
|||
|
||||
#define NFT_REG_SIZE 16
|
||||
#define NFT_REG32_SIZE 4
|
||||
#define NFT_REG32_COUNT (NFT_REG32_15 - NFT_REG32_00 + 1)
|
||||
|
||||
/**
|
||||
* enum nft_verdicts - nf_tables internal verdicts
|
||||
|
|
@ -301,14 +302,28 @@ enum nft_set_policies {
|
|||
* enum nft_set_desc_attributes - set element description
|
||||
*
|
||||
* @NFTA_SET_DESC_SIZE: number of elements in set (NLA_U32)
|
||||
* @NFTA_SET_DESC_CONCAT: description of field concatenation (NLA_NESTED)
|
||||
*/
|
||||
enum nft_set_desc_attributes {
|
||||
NFTA_SET_DESC_UNSPEC,
|
||||
NFTA_SET_DESC_SIZE,
|
||||
NFTA_SET_DESC_CONCAT,
|
||||
__NFTA_SET_DESC_MAX
|
||||
};
|
||||
#define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum nft_set_field_attributes - attributes of concatenated fields
|
||||
*
|
||||
* @NFTA_SET_FIELD_LEN: length of single field, in bits (NLA_U32)
|
||||
*/
|
||||
enum nft_set_field_attributes {
|
||||
NFTA_SET_FIELD_UNSPEC,
|
||||
NFTA_SET_FIELD_LEN,
|
||||
__NFTA_SET_FIELD_MAX
|
||||
};
|
||||
#define NFTA_SET_FIELD_MAX (__NFTA_SET_FIELD_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum nft_set_attributes - nf_tables set netlink attributes
|
||||
*
|
||||
|
|
@ -370,6 +385,7 @@ enum nft_set_elem_flags {
|
|||
* @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY)
|
||||
* @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes)
|
||||
* @NFTA_SET_ELEM_OBJREF: stateful object reference (NLA_STRING)
|
||||
* @NFTA_SET_ELEM_KEY_END: closing key value (NLA_NESTED: nft_data)
|
||||
*/
|
||||
enum nft_set_elem_attributes {
|
||||
NFTA_SET_ELEM_UNSPEC,
|
||||
|
|
@ -382,6 +398,7 @@ enum nft_set_elem_attributes {
|
|||
NFTA_SET_ELEM_EXPR,
|
||||
NFTA_SET_ELEM_PAD,
|
||||
NFTA_SET_ELEM_OBJREF,
|
||||
NFTA_SET_ELEM_KEY_END,
|
||||
__NFTA_SET_ELEM_MAX
|
||||
};
|
||||
#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)
|
||||
|
|
@ -484,6 +501,20 @@ enum nft_immediate_attributes {
|
|||
};
|
||||
#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum nft_bitwise_ops - nf_tables bitwise operations
|
||||
*
|
||||
* @NFT_BITWISE_BOOL: mask-and-xor operation used to implement NOT, AND, OR and
|
||||
* XOR boolean operations
|
||||
* @NFT_BITWISE_LSHIFT: left-shift operation
|
||||
* @NFT_BITWISE_RSHIFT: right-shift operation
|
||||
*/
|
||||
enum nft_bitwise_ops {
|
||||
NFT_BITWISE_BOOL,
|
||||
NFT_BITWISE_LSHIFT,
|
||||
NFT_BITWISE_RSHIFT,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
|
||||
*
|
||||
|
|
@ -492,16 +523,20 @@ enum nft_immediate_attributes {
|
|||
* @NFTA_BITWISE_LEN: length of operands (NLA_U32)
|
||||
* @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)
|
||||
* @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)
|
||||
* @NFTA_BITWISE_OP: type of operation (NLA_U32: nft_bitwise_ops)
|
||||
* @NFTA_BITWISE_DATA: argument for non-boolean operations
|
||||
* (NLA_NESTED: nft_data_attributes)
|
||||
*
|
||||
* The bitwise expression performs the following operation:
|
||||
* The bitwise expression supports boolean and shift operations. It implements
|
||||
* the boolean operations by performing the following operation:
|
||||
*
|
||||
* dreg = (sreg & mask) ^ xor
|
||||
*
|
||||
* which allow to express all bitwise operations:
|
||||
* with these mask and xor values:
|
||||
*
|
||||
* mask xor
|
||||
* NOT: 1 1
|
||||
* OR: 0 x
|
||||
* OR: ~x x
|
||||
* XOR: 1 x
|
||||
* AND: x 0
|
||||
*/
|
||||
|
|
@ -512,6 +547,8 @@ enum nft_bitwise_attributes {
|
|||
NFTA_BITWISE_LEN,
|
||||
NFTA_BITWISE_MASK,
|
||||
NFTA_BITWISE_XOR,
|
||||
NFTA_BITWISE_OP,
|
||||
NFTA_BITWISE_DATA,
|
||||
__NFTA_BITWISE_MAX
|
||||
};
|
||||
#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)
|
||||
|
|
@ -805,6 +842,8 @@ enum nft_exthdr_attributes {
|
|||
* @NFT_META_TIME_NS: time since epoch (in nanoseconds)
|
||||
* @NFT_META_TIME_DAY: day of week (from 0 = Sunday to 6 = Saturday)
|
||||
* @NFT_META_TIME_HOUR: hour of day (in seconds)
|
||||
* @NFT_META_SDIF: slave device interface index
|
||||
* @NFT_META_SDIFNAME: slave device interface name
|
||||
*/
|
||||
enum nft_meta_keys {
|
||||
NFT_META_LEN,
|
||||
|
|
@ -840,6 +879,8 @@ enum nft_meta_keys {
|
|||
NFT_META_TIME_NS,
|
||||
NFT_META_TIME_DAY,
|
||||
NFT_META_TIME_HOUR,
|
||||
NFT_META_SDIF,
|
||||
NFT_META_SDIFNAME,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
39
include/uapi/linux/openat2.h
Normal file
39
include/uapi/linux/openat2.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _UAPI_LINUX_OPENAT2_H
|
||||
#define _UAPI_LINUX_OPENAT2_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* Arguments for how openat2(2) should open the target path. If only @flags and
|
||||
* @mode are non-zero, then openat2(2) operates very similarly to openat(2).
|
||||
*
|
||||
* However, unlike openat(2), unknown or invalid bits in @flags result in
|
||||
* -EINVAL rather than being silently ignored. @mode must be zero unless one of
|
||||
* {O_CREAT, O_TMPFILE} are set.
|
||||
*
|
||||
* @flags: O_* flags.
|
||||
* @mode: O_CREAT/O_TMPFILE file mode.
|
||||
* @resolve: RESOLVE_* flags.
|
||||
*/
|
||||
struct open_how {
|
||||
__u64 flags;
|
||||
__u64 mode;
|
||||
__u64 resolve;
|
||||
};
|
||||
|
||||
/* how->resolve flags for openat2(2). */
|
||||
#define RESOLVE_NO_XDEV 0x01 /* Block mount-point crossings
|
||||
(includes bind-mounts). */
|
||||
#define RESOLVE_NO_MAGICLINKS 0x02 /* Block traversal through procfs-style
|
||||
"magic-links". */
|
||||
#define RESOLVE_NO_SYMLINKS 0x04 /* Block traversal through all symlinks
|
||||
(implies OEXT_NO_MAGICLINKS) */
|
||||
#define RESOLVE_BENEATH 0x08 /* Block "lexical" trickery like
|
||||
"..", symlinks, and absolute
|
||||
paths which escape the dirfd. */
|
||||
#define RESOLVE_IN_ROOT 0x10 /* Make all jumps to "/" and ".."
|
||||
be scoped inside the dirfd
|
||||
(similar to chroot(2)). */
|
||||
|
||||
#endif /* _UAPI_LINUX_OPENAT2_H */
|
||||
|
|
@ -672,6 +672,32 @@ struct ovs_action_push_mpls {
|
|||
__be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ovs_action_add_mpls - %OVS_ACTION_ATTR_ADD_MPLS action
|
||||
* argument.
|
||||
* @mpls_lse: MPLS label stack entry to push.
|
||||
* @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame.
|
||||
* @tun_flags: MPLS tunnel attributes.
|
||||
*
|
||||
* The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and
|
||||
* %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected.
|
||||
*/
|
||||
struct ovs_action_add_mpls {
|
||||
__be32 mpls_lse;
|
||||
__be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
|
||||
__u16 tun_flags;
|
||||
};
|
||||
|
||||
#define OVS_MPLS_L3_TUNNEL_FLAG_MASK (1 << 0) /* Flag to specify the place of
|
||||
* insertion of MPLS header.
|
||||
* When false, the MPLS header
|
||||
* will be inserted at the start
|
||||
* of the packet.
|
||||
* When true, the MPLS header
|
||||
* will be inserted at the start
|
||||
* of the l3 header.
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
|
||||
* @vlan_tpid: Tag protocol identifier (TPID) to push.
|
||||
|
|
@ -892,6 +918,10 @@ struct check_pkt_len_arg {
|
|||
* @OVS_ACTION_ATTR_CHECK_PKT_LEN: Check the packet length and execute a set
|
||||
* of actions if greater than the specified packet length, else execute
|
||||
* another set of actions.
|
||||
* @OVS_ACTION_ATTR_ADD_MPLS: Push a new MPLS label stack entry at the
|
||||
* start of the packet or at the start of the l3 header depending on the value
|
||||
* of l3 tunnel flag in the tun_flags field of OVS_ACTION_ATTR_ADD_MPLS
|
||||
* argument.
|
||||
*
|
||||
* Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
|
||||
* fields within a header are modifiable, e.g. the IPv4 protocol and fragment
|
||||
|
|
@ -927,6 +957,7 @@ enum ovs_action_attr {
|
|||
OVS_ACTION_ATTR_METER, /* u32 meter ID. */
|
||||
OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */
|
||||
OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */
|
||||
OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */
|
||||
|
||||
__OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
|
||||
* from userspace. */
|
||||
|
|
|
|||
|
|
@ -676,6 +676,7 @@
|
|||
#define PCI_EXP_LNKCTL2_TLS_32_0GT 0x0005 /* Supported Speed 32GT/s */
|
||||
#define PCI_EXP_LNKCTL2_ENTER_COMP 0x0010 /* Enter Compliance */
|
||||
#define PCI_EXP_LNKCTL2_TX_MARGIN 0x0380 /* Transmit Margin */
|
||||
#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
|
||||
#define PCI_EXP_LNKSTA2 50 /* Link Status 2 */
|
||||
#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */
|
||||
#define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */
|
||||
|
|
|
|||
|
|
@ -971,6 +971,37 @@ struct tc_pie_xstats {
|
|||
__u32 ecn_mark; /* packets marked with ecn*/
|
||||
};
|
||||
|
||||
/* FQ PIE */
|
||||
enum {
|
||||
TCA_FQ_PIE_UNSPEC,
|
||||
TCA_FQ_PIE_LIMIT,
|
||||
TCA_FQ_PIE_FLOWS,
|
||||
TCA_FQ_PIE_TARGET,
|
||||
TCA_FQ_PIE_TUPDATE,
|
||||
TCA_FQ_PIE_ALPHA,
|
||||
TCA_FQ_PIE_BETA,
|
||||
TCA_FQ_PIE_QUANTUM,
|
||||
TCA_FQ_PIE_MEMORY_LIMIT,
|
||||
TCA_FQ_PIE_ECN_PROB,
|
||||
TCA_FQ_PIE_ECN,
|
||||
TCA_FQ_PIE_BYTEMODE,
|
||||
TCA_FQ_PIE_DQ_RATE_ESTIMATOR,
|
||||
__TCA_FQ_PIE_MAX
|
||||
};
|
||||
#define TCA_FQ_PIE_MAX (__TCA_FQ_PIE_MAX - 1)
|
||||
|
||||
struct tc_fq_pie_xstats {
|
||||
__u32 packets_in; /* total number of packets enqueued */
|
||||
__u32 dropped; /* packets dropped due to fq_pie_action */
|
||||
__u32 overlimit; /* dropped due to lack of space in queue */
|
||||
__u32 overmemory; /* dropped due to lack of memory in queue */
|
||||
__u32 ecn_mark; /* packets marked with ecn */
|
||||
__u32 new_flow_count; /* count of new flows created by packets */
|
||||
__u32 new_flows_len; /* count of flows in new list */
|
||||
__u32 old_flows_len; /* count of flows in old list */
|
||||
__u32 memory_usage; /* total memory across all queues */
|
||||
};
|
||||
|
||||
/* CBS */
|
||||
struct tc_cbs_qopt {
|
||||
__u8 offload;
|
||||
|
|
@ -1187,4 +1218,21 @@ enum {
|
|||
|
||||
#define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1)
|
||||
|
||||
/* ETS */
|
||||
|
||||
#define TCQ_ETS_MAX_BANDS 16
|
||||
|
||||
enum {
|
||||
TCA_ETS_UNSPEC,
|
||||
TCA_ETS_NBANDS, /* u8 */
|
||||
TCA_ETS_NSTRICT, /* u8 */
|
||||
TCA_ETS_QUANTA, /* nested TCA_ETS_QUANTA_BAND */
|
||||
TCA_ETS_QUANTA_BAND, /* u32 */
|
||||
TCA_ETS_PRIOMAP, /* nested TCA_ETS_PRIOMAP_BAND */
|
||||
TCA_ETS_PRIOMAP_BAND, /* u8 */
|
||||
__TCA_ETS_MAX,
|
||||
};
|
||||
|
||||
#define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -234,4 +234,8 @@ struct prctl_mm_map {
|
|||
#define PR_GET_TAGGED_ADDR_CTRL 56
|
||||
# define PR_TAGGED_ADDR_ENABLE (1UL << 0)
|
||||
|
||||
/* Control reclaim behavior when allocating memory */
|
||||
#define PR_SET_IO_FLUSHER 57
|
||||
#define PR_GET_IO_FLUSHER 58
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
|
|
|||
|
|
@ -48,9 +48,11 @@ struct rand_pool_info {
|
|||
* Flags for getrandom(2)
|
||||
*
|
||||
* GRND_NONBLOCK Don't block and return EAGAIN instead
|
||||
* GRND_RANDOM Use the /dev/random pool instead of /dev/urandom
|
||||
* GRND_RANDOM No effect
|
||||
* GRND_INSECURE Return non-cryptographic random bytes
|
||||
*/
|
||||
#define GRND_NONBLOCK 0x0001
|
||||
#define GRND_RANDOM 0x0002
|
||||
#define GRND_INSECURE 0x0004
|
||||
|
||||
#endif /* _UAPI_LINUX_RANDOM_H */
|
||||
|
|
|
|||
|
|
@ -92,7 +92,12 @@ struct rtc_pll_info {
|
|||
#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */
|
||||
#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */
|
||||
|
||||
#define RTC_VL_READ _IOR('p', 0x13, int) /* Voltage low detector */
|
||||
#define RTC_VL_DATA_INVALID BIT(0) /* Voltage too low, RTC data is invalid */
|
||||
#define RTC_VL_BACKUP_LOW BIT(1) /* Backup voltage is low */
|
||||
#define RTC_VL_BACKUP_EMPTY BIT(2) /* Backup empty or not present */
|
||||
#define RTC_VL_ACCURACY_LOW BIT(3) /* Voltage is low, RTC accuracy is reduced */
|
||||
|
||||
#define RTC_VL_READ _IOR('p', 0x13, unsigned int) /* Voltage low detection */
|
||||
#define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */
|
||||
|
||||
/* interrupt flags */
|
||||
|
|
|
|||
|
|
@ -171,6 +171,13 @@ enum {
|
|||
RTM_GETLINKPROP,
|
||||
#define RTM_GETLINKPROP RTM_GETLINKPROP
|
||||
|
||||
RTM_NEWVLAN = 112,
|
||||
#define RTM_NEWNVLAN RTM_NEWVLAN
|
||||
RTM_DELVLAN,
|
||||
#define RTM_DELVLAN RTM_DELVLAN
|
||||
RTM_GETVLAN,
|
||||
#define RTM_GETVLAN RTM_GETVLAN
|
||||
|
||||
__RTM_MAX,
|
||||
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
|
||||
};
|
||||
|
|
@ -309,6 +316,8 @@ enum rt_scope_t {
|
|||
#define RTM_F_PREFIX 0x800 /* Prefix addresses */
|
||||
#define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */
|
||||
#define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */
|
||||
#define RTM_F_OFFLOAD 0x4000 /* route is offloaded */
|
||||
#define RTM_F_TRAP 0x8000 /* route is trapping packets */
|
||||
|
||||
/* Reserved table identifiers */
|
||||
|
||||
|
|
@ -721,6 +730,8 @@ enum rtnetlink_groups {
|
|||
#define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R
|
||||
RTNLGRP_NEXTHOP,
|
||||
#define RTNLGRP_NEXTHOP RTNLGRP_NEXTHOP
|
||||
RTNLGRP_BRVLAN,
|
||||
#define RTNLGRP_BRVLAN RTNLGRP_BRVLAN
|
||||
__RTNLGRP_MAX
|
||||
};
|
||||
#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@
|
|||
/* Flags for the clone3() syscall. */
|
||||
#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */
|
||||
|
||||
/*
|
||||
* cloning flags intersect with CSIGNAL so can be used with unshare and clone3
|
||||
* syscalls only:
|
||||
*/
|
||||
#define CLONE_NEWTIME 0x00000080 /* New time namespace */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/**
|
||||
* struct clone_args - arguments for the clone3 syscall
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef _UAPI_SERIO_H
|
||||
#define _UAPI_SERIO_H
|
||||
|
||||
|
||||
#include <linux/const.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
|
||||
|
|
@ -18,10 +18,10 @@
|
|||
/*
|
||||
* bit masks for use in "interrupt" flags (3rd argument)
|
||||
*/
|
||||
#define SERIO_TIMEOUT BIT(0)
|
||||
#define SERIO_PARITY BIT(1)
|
||||
#define SERIO_FRAME BIT(2)
|
||||
#define SERIO_OOB_DATA BIT(3)
|
||||
#define SERIO_TIMEOUT _BITUL(0)
|
||||
#define SERIO_PARITY _BITUL(1)
|
||||
#define SERIO_FRAME _BITUL(2)
|
||||
#define SERIO_OOB_DATA _BITUL(3)
|
||||
|
||||
/*
|
||||
* Serio types
|
||||
|
|
|
|||
|
|
@ -285,6 +285,8 @@ enum
|
|||
LINUX_MIB_TCPRCVQDROP, /* TCPRcvQDrop */
|
||||
LINUX_MIB_TCPWQUEUETOOBIG, /* TCPWqueueTooBig */
|
||||
LINUX_MIB_TCPFASTOPENPASSIVEALTKEY, /* TCPFastOpenPassiveAltKey */
|
||||
LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */
|
||||
LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */
|
||||
__LINUX_MIB_MAX
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <asm/swab.h>
|
||||
|
||||
/*
|
||||
|
|
@ -132,6 +133,15 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
|
|||
__fswab64(x))
|
||||
#endif
|
||||
|
||||
static __always_inline unsigned long __swab(const unsigned long y)
|
||||
{
|
||||
#if __BITS_PER_LONG == 64
|
||||
return __swab64(y);
|
||||
#else /* __BITS_PER_LONG == 32 */
|
||||
return __swab32(y);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* __swahw32 - return a word-swapped 32-bit value
|
||||
* @x: value to wordswap
|
||||
|
|
|
|||
|
|
@ -32,7 +32,18 @@
|
|||
#define SWITCHTEC_IOCTL_PART_VENDOR5 10
|
||||
#define SWITCHTEC_IOCTL_PART_VENDOR6 11
|
||||
#define SWITCHTEC_IOCTL_PART_VENDOR7 12
|
||||
#define SWITCHTEC_IOCTL_NUM_PARTITIONS 13
|
||||
#define SWITCHTEC_IOCTL_PART_BL2_0 13
|
||||
#define SWITCHTEC_IOCTL_PART_BL2_1 14
|
||||
#define SWITCHTEC_IOCTL_PART_MAP_0 15
|
||||
#define SWITCHTEC_IOCTL_PART_MAP_1 16
|
||||
#define SWITCHTEC_IOCTL_PART_KEY_0 17
|
||||
#define SWITCHTEC_IOCTL_PART_KEY_1 18
|
||||
|
||||
#define SWITCHTEC_NUM_PARTITIONS_GEN3 13
|
||||
#define SWITCHTEC_NUM_PARTITIONS_GEN4 19
|
||||
|
||||
/* obsolete: for compatibility with old userspace software */
|
||||
#define SWITCHTEC_IOCTL_NUM_PARTITIONS SWITCHTEC_NUM_PARTITIONS_GEN3
|
||||
|
||||
struct switchtec_ioctl_flash_info {
|
||||
__u64 flash_length;
|
||||
|
|
@ -98,7 +109,9 @@ struct switchtec_ioctl_event_summary {
|
|||
#define SWITCHTEC_IOCTL_EVENT_CREDIT_TIMEOUT 27
|
||||
#define SWITCHTEC_IOCTL_EVENT_LINK_STATE 28
|
||||
#define SWITCHTEC_IOCTL_EVENT_GFMS 29
|
||||
#define SWITCHTEC_IOCTL_MAX_EVENTS 30
|
||||
#define SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY 30
|
||||
#define SWITCHTEC_IOCTL_EVENT_UEC 31
|
||||
#define SWITCHTEC_IOCTL_MAX_EVENTS 32
|
||||
|
||||
#define SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX -1
|
||||
#define SWITCHTEC_IOCTL_EVENT_IDX_ALL -2
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ enum
|
|||
VM_MIN_UNMAPPED=32, /* Set min percent of unmapped pages */
|
||||
VM_PANIC_ON_OOM=33, /* panic at out-of-memory */
|
||||
VM_VDSO_ENABLED=34, /* map VDSO into new processes? */
|
||||
VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */
|
||||
VM_MIN_SLAB=35, /* Percent pages ignored by node reclaim */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#define TASKSTATS_VERSION 9
|
||||
#define TASKSTATS_VERSION 10
|
||||
#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
|
||||
* in linux/sched.h */
|
||||
|
||||
|
|
@ -112,6 +112,7 @@ struct taskstats {
|
|||
__u32 ac_gid; /* Group ID */
|
||||
__u32 ac_pid; /* Process ID */
|
||||
__u32 ac_ppid; /* Parent process ID */
|
||||
/* __u32 range means times from 1970 to 2106 */
|
||||
__u32 ac_btime; /* Begin time [sec since 1970] */
|
||||
__u64 ac_etime __attribute__((aligned(8)));
|
||||
/* Elapsed time [usec] */
|
||||
|
|
@ -168,6 +169,9 @@ struct taskstats {
|
|||
/* Delay waiting for thrashing page */
|
||||
__u64 thrashing_count;
|
||||
__u64 thrashing_delay_total;
|
||||
|
||||
/* v10: 64-bit btime to avoid overflow */
|
||||
__u64 ac_btime64; /* 64-bit begin time */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -311,20 +311,22 @@ enum {
|
|||
TCP_NLA_DSACK_DUPS, /* DSACK blocks received */
|
||||
TCP_NLA_REORD_SEEN, /* reordering events seen */
|
||||
TCP_NLA_SRTT, /* smoothed RTT in usecs */
|
||||
TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */
|
||||
};
|
||||
|
||||
/* for TCP_MD5SIG socket option */
|
||||
#define TCP_MD5SIG_MAXKEYLEN 80
|
||||
|
||||
/* tcp_md5sig extension flags for TCP_MD5SIG_EXT */
|
||||
#define TCP_MD5SIG_FLAG_PREFIX 1 /* address prefix length */
|
||||
#define TCP_MD5SIG_FLAG_PREFIX 0x1 /* address prefix length */
|
||||
#define TCP_MD5SIG_FLAG_IFINDEX 0x2 /* ifindex set */
|
||||
|
||||
struct tcp_md5sig {
|
||||
struct __kernel_sockaddr_storage tcpm_addr; /* address associated */
|
||||
__u8 tcpm_flags; /* extension flags */
|
||||
__u8 tcpm_prefixlen; /* address prefix */
|
||||
__u16 tcpm_keylen; /* key length */
|
||||
__u32 __tcpm_pad; /* zero */
|
||||
int tcpm_ifindex; /* device index for scope */
|
||||
__u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
* TEE Implementation ID
|
||||
*/
|
||||
#define TEE_IMPL_ID_OPTEE 1
|
||||
#define TEE_IMPL_ID_AMDTEE 2
|
||||
|
||||
/*
|
||||
* OP-TEE specific capabilities
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/time_types.h>
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#ifndef _STRUCT_TIMESPEC
|
||||
#define _STRUCT_TIMESPEC
|
||||
struct timespec {
|
||||
|
|
@ -18,6 +19,17 @@ struct timeval {
|
|||
__kernel_suseconds_t tv_usec; /* microseconds */
|
||||
};
|
||||
|
||||
struct itimerspec {
|
||||
struct timespec it_interval;/* timer period */
|
||||
struct timespec it_value; /* timer expiration */
|
||||
};
|
||||
|
||||
struct itimerval {
|
||||
struct timeval it_interval;/* timer interval */
|
||||
struct timeval it_value; /* current value */
|
||||
};
|
||||
#endif
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest; /* minutes west of Greenwich */
|
||||
int tz_dsttime; /* type of dst correction */
|
||||
|
|
@ -31,16 +43,6 @@ struct timezone {
|
|||
#define ITIMER_VIRTUAL 1
|
||||
#define ITIMER_PROF 2
|
||||
|
||||
struct itimerspec {
|
||||
struct timespec it_interval; /* timer period */
|
||||
struct timespec it_value; /* timer expiration */
|
||||
};
|
||||
|
||||
struct itimerval {
|
||||
struct timeval it_interval; /* timer interval */
|
||||
struct timeval it_value; /* current value */
|
||||
};
|
||||
|
||||
/*
|
||||
* The IDs of the various system clocks (for POSIX.1b interval timers):
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ struct __kernel_old_timespec {
|
|||
long tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
struct __kernel_old_itimerval {
|
||||
struct __kernel_old_timeval it_interval;/* timer interval */
|
||||
struct __kernel_old_timeval it_value; /* current value */
|
||||
};
|
||||
|
||||
struct __kernel_sock_timeval {
|
||||
__s64 tv_sec;
|
||||
__s64 tv_usec;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
#define NTP_API 4 /* NTP API version */
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/*
|
||||
* syscall interface - used (mainly by NTP daemon)
|
||||
* to discipline kernel clock oscillator
|
||||
|
|
@ -91,6 +92,7 @@ struct timex {
|
|||
int :32; int :32; int :32; int :32;
|
||||
int :32; int :32; int :32;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct __kernel_timex_timeval {
|
||||
__kernel_time64_t tv_sec;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ enum {
|
|||
TIPC_NL_UDP_GET_REMOTEIP,
|
||||
TIPC_NL_KEY_SET,
|
||||
TIPC_NL_KEY_FLUSH,
|
||||
TIPC_NL_ADDR_LEGACY_GET,
|
||||
|
||||
__TIPC_NL_CMD_MAX,
|
||||
TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1
|
||||
|
|
@ -176,6 +177,7 @@ enum {
|
|||
TIPC_NLA_NET_ADDR, /* u32 */
|
||||
TIPC_NLA_NET_NODEID, /* u64 */
|
||||
TIPC_NLA_NET_NODEID_W1, /* u64 */
|
||||
TIPC_NLA_NET_ADDR_LEGACY, /* flag */
|
||||
|
||||
__TIPC_NLA_NET_MAX,
|
||||
TIPC_NLA_NET_MAX = __TIPC_NLA_NET_MAX - 1
|
||||
|
|
|
|||
|
|
@ -42,5 +42,6 @@ struct udphdr {
|
|||
#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */
|
||||
#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */
|
||||
#define UDP_ENCAP_RXRPC 6
|
||||
#define TCP_ENCAP_ESPINTCP 7 /* Yikes, this is really xfrm encap types. */
|
||||
|
||||
#endif /* _UAPI_LINUX_UDP_H */
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
* ACA (Accessory Charger Adapters)
|
||||
*/
|
||||
enum usb_charger_type {
|
||||
UNKNOWN_TYPE,
|
||||
SDP_TYPE,
|
||||
DCP_TYPE,
|
||||
CDP_TYPE,
|
||||
ACA_TYPE,
|
||||
UNKNOWN_TYPE = 0,
|
||||
SDP_TYPE = 1,
|
||||
DCP_TYPE = 2,
|
||||
CDP_TYPE = 3,
|
||||
ACA_TYPE = 4,
|
||||
};
|
||||
|
||||
/* USB charger state */
|
||||
enum usb_charger_state {
|
||||
USB_CHARGER_DEFAULT,
|
||||
USB_CHARGER_PRESENT,
|
||||
USB_CHARGER_ABSENT,
|
||||
USB_CHARGER_DEFAULT = 0,
|
||||
USB_CHARGER_PRESENT = 1,
|
||||
USB_CHARGER_ABSENT = 2,
|
||||
};
|
||||
|
||||
#endif /* _UAPI__LINUX_USB_CHARGER_H */
|
||||
|
|
|
|||
|
|
@ -912,6 +912,25 @@ struct v4l2_jpegcompression {
|
|||
/*
|
||||
* M E M O R Y - M A P P I N G B U F F E R S
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/*
|
||||
* This corresponds to the user space version of timeval
|
||||
* for 64-bit time_t. sparc64 is different from everyone
|
||||
* else, using the microseconds in the wrong half of the
|
||||
* second 64-bit word.
|
||||
*/
|
||||
struct __kernel_v4l2_timeval {
|
||||
long long tv_sec;
|
||||
#if defined(__sparc__) && defined(__arch64__)
|
||||
int tv_usec;
|
||||
int __pad;
|
||||
#else
|
||||
long long tv_usec;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
struct v4l2_requestbuffers {
|
||||
__u32 count;
|
||||
__u32 type; /* enum v4l2_buf_type */
|
||||
|
|
@ -997,7 +1016,11 @@ struct v4l2_buffer {
|
|||
__u32 bytesused;
|
||||
__u32 flags;
|
||||
__u32 field;
|
||||
#ifdef __KERNEL__
|
||||
struct __kernel_v4l2_timeval timestamp;
|
||||
#else
|
||||
struct timeval timestamp;
|
||||
#endif
|
||||
struct v4l2_timecode timecode;
|
||||
__u32 sequence;
|
||||
|
||||
|
|
@ -1017,6 +1040,7 @@ struct v4l2_buffer {
|
|||
};
|
||||
};
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/**
|
||||
* v4l2_timeval_to_ns - Convert timeval to nanoseconds
|
||||
* @ts: pointer to the timeval variable to be converted
|
||||
|
|
@ -1028,6 +1052,7 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv)
|
|||
{
|
||||
return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Flags for 'flags' field */
|
||||
/* Buffer is mapped (flag) */
|
||||
|
|
@ -2339,7 +2364,11 @@ struct v4l2_event {
|
|||
} u;
|
||||
__u32 pending;
|
||||
__u32 sequence;
|
||||
#ifdef __KERNEL__
|
||||
struct __kernel_timespec timestamp;
|
||||
#else
|
||||
struct timespec timestamp;
|
||||
#endif
|
||||
__u32 id;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -99,11 +99,13 @@
|
|||
|
||||
#define VMADDR_CID_HYPERVISOR 0
|
||||
|
||||
/* This CID is specific to VMCI and can be considered reserved (even VMCI
|
||||
* doesn't use it anymore, it's a legacy value from an older release).
|
||||
/* Use this as the destination CID in an address when referring to the
|
||||
* local communication (loopback).
|
||||
* (This was VMADDR_CID_RESERVED, but even VMCI doesn't use it anymore,
|
||||
* it was a legacy value from an older release).
|
||||
*/
|
||||
|
||||
#define VMADDR_CID_RESERVED 1
|
||||
#define VMADDR_CID_LOCAL 1
|
||||
|
||||
/* Use this as the destination CID in an address when referring to the host
|
||||
* (any process other than the hypervisor). VMCI relies on it being 2, but
|
||||
|
|
|
|||
196
include/uapi/linux/wireguard.h
Normal file
196
include/uapi/linux/wireguard.h
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
|
||||
/*
|
||||
* Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
||||
*
|
||||
* Documentation
|
||||
* =============
|
||||
*
|
||||
* The below enums and macros are for interfacing with WireGuard, using generic
|
||||
* netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two
|
||||
* methods: get and set. Note that while they share many common attributes,
|
||||
* these two functions actually accept a slightly different set of inputs and
|
||||
* outputs.
|
||||
*
|
||||
* WG_CMD_GET_DEVICE
|
||||
* -----------------
|
||||
*
|
||||
* May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain
|
||||
* one but not both of:
|
||||
*
|
||||
* WGDEVICE_A_IFINDEX: NLA_U32
|
||||
* WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
|
||||
*
|
||||
* The kernel will then return several messages (NLM_F_MULTI) containing the
|
||||
* following tree of nested items:
|
||||
*
|
||||
* WGDEVICE_A_IFINDEX: NLA_U32
|
||||
* WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
|
||||
* WGDEVICE_A_PRIVATE_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
|
||||
* WGDEVICE_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
|
||||
* WGDEVICE_A_LISTEN_PORT: NLA_U16
|
||||
* WGDEVICE_A_FWMARK: NLA_U32
|
||||
* WGDEVICE_A_PEERS: NLA_NESTED
|
||||
* 0: NLA_NESTED
|
||||
* WGPEER_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
|
||||
* WGPEER_A_PRESHARED_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
|
||||
* WGPEER_A_ENDPOINT: NLA_MIN_LEN(struct sockaddr), struct sockaddr_in or struct sockaddr_in6
|
||||
* WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16
|
||||
* WGPEER_A_LAST_HANDSHAKE_TIME: NLA_EXACT_LEN, struct __kernel_timespec
|
||||
* WGPEER_A_RX_BYTES: NLA_U64
|
||||
* WGPEER_A_TX_BYTES: NLA_U64
|
||||
* WGPEER_A_ALLOWEDIPS: NLA_NESTED
|
||||
* 0: NLA_NESTED
|
||||
* WGALLOWEDIP_A_FAMILY: NLA_U16
|
||||
* WGALLOWEDIP_A_IPADDR: NLA_MIN_LEN(struct in_addr), struct in_addr or struct in6_addr
|
||||
* WGALLOWEDIP_A_CIDR_MASK: NLA_U8
|
||||
* 0: NLA_NESTED
|
||||
* ...
|
||||
* 0: NLA_NESTED
|
||||
* ...
|
||||
* ...
|
||||
* WGPEER_A_PROTOCOL_VERSION: NLA_U32
|
||||
* 0: NLA_NESTED
|
||||
* ...
|
||||
* ...
|
||||
*
|
||||
* It is possible that all of the allowed IPs of a single peer will not
|
||||
* fit within a single netlink message. In that case, the same peer will
|
||||
* be written in the following message, except it will only contain
|
||||
* WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several
|
||||
* times in a row for the same peer. It is then up to the receiver to
|
||||
* coalesce adjacent peers. Likewise, it is possible that all peers will
|
||||
* not fit within a single message. So, subsequent peers will be sent
|
||||
* in following messages, except those will only contain WGDEVICE_A_IFNAME
|
||||
* and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these
|
||||
* messages to form the complete list of peers.
|
||||
*
|
||||
* Since this is an NLA_F_DUMP command, the final message will always be
|
||||
* NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message
|
||||
* contains an integer error code. It is either zero or a negative error
|
||||
* code corresponding to the errno.
|
||||
*
|
||||
* WG_CMD_SET_DEVICE
|
||||
* -----------------
|
||||
*
|
||||
* May only be called via NLM_F_REQUEST. The command should contain the
|
||||
* following tree of nested items, containing one but not both of
|
||||
* WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME:
|
||||
*
|
||||
* WGDEVICE_A_IFINDEX: NLA_U32
|
||||
* WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
|
||||
* WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current
|
||||
* peers should be removed prior to adding the list below.
|
||||
* WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove
|
||||
* WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly
|
||||
* WGDEVICE_A_FWMARK: NLA_U32, 0 to disable
|
||||
* WGDEVICE_A_PEERS: NLA_NESTED
|
||||
* 0: NLA_NESTED
|
||||
* WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN
|
||||
* WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the
|
||||
* specified peer should not exist at the end of the
|
||||
* operation, rather than added/updated and/or
|
||||
* WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed
|
||||
* IPs of this peer should be removed prior to adding
|
||||
* the list below and/or WGPEER_F_UPDATE_ONLY if the
|
||||
* peer should only be set if it already exists.
|
||||
* WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove
|
||||
* WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6
|
||||
* WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable
|
||||
* WGPEER_A_ALLOWEDIPS: NLA_NESTED
|
||||
* 0: NLA_NESTED
|
||||
* WGALLOWEDIP_A_FAMILY: NLA_U16
|
||||
* WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr
|
||||
* WGALLOWEDIP_A_CIDR_MASK: NLA_U8
|
||||
* 0: NLA_NESTED
|
||||
* ...
|
||||
* 0: NLA_NESTED
|
||||
* ...
|
||||
* ...
|
||||
* WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at
|
||||
* all by most users of this API, as the
|
||||
* most recent protocol will be used when
|
||||
* this is unset. Otherwise, must be set
|
||||
* to 1.
|
||||
* 0: NLA_NESTED
|
||||
* ...
|
||||
* ...
|
||||
*
|
||||
* It is possible that the amount of configuration data exceeds that of
|
||||
* the maximum message length accepted by the kernel. In that case, several
|
||||
* messages should be sent one after another, with each successive one
|
||||
* filling in information not contained in the prior. Note that if
|
||||
* WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably
|
||||
* should not be specified in fragments that come after, so that the list
|
||||
* of peers is only cleared the first time but appended after. Likewise for
|
||||
* peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message
|
||||
* of a peer, it likely should not be specified in subsequent fragments.
|
||||
*
|
||||
* If an error occurs, NLMSG_ERROR will reply containing an errno.
|
||||
*/
|
||||
|
||||
#ifndef _WG_UAPI_WIREGUARD_H
|
||||
#define _WG_UAPI_WIREGUARD_H
|
||||
|
||||
#define WG_GENL_NAME "wireguard"
|
||||
#define WG_GENL_VERSION 1
|
||||
|
||||
#define WG_KEY_LEN 32
|
||||
|
||||
enum wg_cmd {
|
||||
WG_CMD_GET_DEVICE,
|
||||
WG_CMD_SET_DEVICE,
|
||||
__WG_CMD_MAX
|
||||
};
|
||||
#define WG_CMD_MAX (__WG_CMD_MAX - 1)
|
||||
|
||||
enum wgdevice_flag {
|
||||
WGDEVICE_F_REPLACE_PEERS = 1U << 0,
|
||||
__WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS
|
||||
};
|
||||
enum wgdevice_attribute {
|
||||
WGDEVICE_A_UNSPEC,
|
||||
WGDEVICE_A_IFINDEX,
|
||||
WGDEVICE_A_IFNAME,
|
||||
WGDEVICE_A_PRIVATE_KEY,
|
||||
WGDEVICE_A_PUBLIC_KEY,
|
||||
WGDEVICE_A_FLAGS,
|
||||
WGDEVICE_A_LISTEN_PORT,
|
||||
WGDEVICE_A_FWMARK,
|
||||
WGDEVICE_A_PEERS,
|
||||
__WGDEVICE_A_LAST
|
||||
};
|
||||
#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)
|
||||
|
||||
enum wgpeer_flag {
|
||||
WGPEER_F_REMOVE_ME = 1U << 0,
|
||||
WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1,
|
||||
WGPEER_F_UPDATE_ONLY = 1U << 2,
|
||||
__WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS |
|
||||
WGPEER_F_UPDATE_ONLY
|
||||
};
|
||||
enum wgpeer_attribute {
|
||||
WGPEER_A_UNSPEC,
|
||||
WGPEER_A_PUBLIC_KEY,
|
||||
WGPEER_A_PRESHARED_KEY,
|
||||
WGPEER_A_FLAGS,
|
||||
WGPEER_A_ENDPOINT,
|
||||
WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
|
||||
WGPEER_A_LAST_HANDSHAKE_TIME,
|
||||
WGPEER_A_RX_BYTES,
|
||||
WGPEER_A_TX_BYTES,
|
||||
WGPEER_A_ALLOWEDIPS,
|
||||
WGPEER_A_PROTOCOL_VERSION,
|
||||
__WGPEER_A_LAST
|
||||
};
|
||||
#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)
|
||||
|
||||
enum wgallowedip_attribute {
|
||||
WGALLOWEDIP_A_UNSPEC,
|
||||
WGALLOWEDIP_A_FAMILY,
|
||||
WGALLOWEDIP_A_IPADDR,
|
||||
WGALLOWEDIP_A_CIDR_MASK,
|
||||
__WGALLOWEDIP_A_LAST
|
||||
};
|
||||
#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
|
||||
|
||||
#endif /* _WG_UAPI_WIREGUARD_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue