]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
uapi: update headers to 4.20-rc1
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 5 Nov 2018 16:37:41 +0000 (08:37 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 5 Nov 2018 16:37:41 +0000 (08:37 -0800)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h
include/uapi/linux/elf-em.h
include/uapi/linux/if_link.h
include/uapi/linux/magic.h
include/uapi/linux/netlink.h
include/uapi/linux/sctp.h

index abb7f7748c2de75c16d3e59aa8db9149db288762..2bbe33db8aefa0e68ce1cf93620cc7a973bec417 100644 (file)
@@ -103,6 +103,7 @@ enum bpf_cmd {
        BPF_BTF_LOAD,
        BPF_BTF_GET_FD_BY_ID,
        BPF_TASK_FD_QUERY,
+       BPF_MAP_LOOKUP_AND_DELETE_ELEM,
 };
 
 enum bpf_map_type {
@@ -127,6 +128,9 @@ enum bpf_map_type {
        BPF_MAP_TYPE_SOCKHASH,
        BPF_MAP_TYPE_CGROUP_STORAGE,
        BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,
+       BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,
+       BPF_MAP_TYPE_QUEUE,
+       BPF_MAP_TYPE_STACK,
 };
 
 enum bpf_prog_type {
@@ -461,6 +465,28 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
+ * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)
+ *     Description
+ *             Push an element *value* in *map*. *flags* is one of:
+ *
+ *             **BPF_EXIST**
+ *             If the queue/stack is full, the oldest element is removed to
+ *             make room for this.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * int bpf_map_pop_elem(struct bpf_map *map, void *value)
+ *     Description
+ *             Pop an element from *map*.
+ * Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * int bpf_map_peek_elem(struct bpf_map *map, void *value)
+ *     Description
+ *             Get an element from *map* without removing it.
+ * Return
+ *             0 on success, or a negative error in case of failure.
+ *
  * int bpf_probe_read(void *dst, u32 size, const void *src)
  *     Description
  *             For tracing programs, safely attempt to read *size* bytes from
@@ -1432,7 +1458,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_adjust_room(struct sk_buff *skb, u32 len_diff, u32 mode, u64 flags)
+ * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)
  *     Description
  *             Grow or shrink the room for data in the packet associated to
  *             *skb* by *len_diff*, and according to the selected *mode*.
@@ -2143,6 +2169,94 @@ union bpf_attr {
  *             request in the skb.
  *     Return
  *             0 on success, or a negative error in case of failure.
+ *
+ * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
+ *     Description
+ *             Look for TCP socket matching *tuple*, optionally in a child
+ *             network namespace *netns*. The return value must be checked,
+ *             and if non-NULL, released via **bpf_sk_release**\ ().
+ *
+ *             The *ctx* should point to the context of the program, such as
+ *             the skb or socket (depending on the hook in use). This is used
+ *             to determine the base network namespace for the lookup.
+ *
+ *             *tuple_size* must be one of:
+ *
+ *             **sizeof**\ (*tuple*\ **->ipv4**)
+ *                     Look for an IPv4 socket.
+ *             **sizeof**\ (*tuple*\ **->ipv6**)
+ *                     Look for an IPv6 socket.
+ *
+ *             If the *netns* is zero, then the socket lookup table in the
+ *             netns associated with the *ctx* will be used. For the TC hooks,
+ *             this in the netns of the device in the skb. For socket hooks,
+ *             this in the netns of the socket. If *netns* is non-zero, then
+ *             it specifies the ID of the netns relative to the netns
+ *             associated with the *ctx*.
+ *
+ *             All values for *flags* are reserved for future usage, and must
+ *             be left at zero.
+ *
+ *             This helper is available only if the kernel was compiled with
+ *             **CONFIG_NET** configuration option.
+ *     Return
+ *             Pointer to *struct bpf_sock*, or NULL in case of failure.
+ *
+ * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
+ *     Description
+ *             Look for UDP socket matching *tuple*, optionally in a child
+ *             network namespace *netns*. The return value must be checked,
+ *             and if non-NULL, released via **bpf_sk_release**\ ().
+ *
+ *             The *ctx* should point to the context of the program, such as
+ *             the skb or socket (depending on the hook in use). This is used
+ *             to determine the base network namespace for the lookup.
+ *
+ *             *tuple_size* must be one of:
+ *
+ *             **sizeof**\ (*tuple*\ **->ipv4**)
+ *                     Look for an IPv4 socket.
+ *             **sizeof**\ (*tuple*\ **->ipv6**)
+ *                     Look for an IPv6 socket.
+ *
+ *             If the *netns* is zero, then the socket lookup table in the
+ *             netns associated with the *ctx* will be used. For the TC hooks,
+ *             this in the netns of the device in the skb. For socket hooks,
+ *             this in the netns of the socket. If *netns* is non-zero, then
+ *             it specifies the ID of the netns relative to the netns
+ *             associated with the *ctx*.
+ *
+ *             All values for *flags* are reserved for future usage, and must
+ *             be left at zero.
+ *
+ *             This helper is available only if the kernel was compiled with
+ *             **CONFIG_NET** configuration option.
+ *     Return
+ *             Pointer to *struct bpf_sock*, or NULL in case of failure.
+ *
+ * int bpf_sk_release(struct bpf_sock *sk)
+ *     Description
+ *             Release the reference held by *sock*. *sock* must be a non-NULL
+ *             pointer that was returned from bpf_sk_lookup_xxx\ ().
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)
+ *     Description
+ *             For socket policies, insert *len* bytes into msg at offset
+ *             *start*.
+ *
+ *             If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a
+ *             *msg* it may want to insert metadata or options into the msg.
+ *             This can later be read and used by any of the lower layer BPF
+ *             hooks.
+ *
+ *             This helper may fail if under memory pressure (a malloc
+ *             fails) in these cases BPF programs will get an appropriate
+ *             error and BPF programs will need to handle them.
+ *
+ *     Return
+ *             0 on success, or a negative error in case of failure.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -2228,7 +2342,14 @@ union bpf_attr {
        FN(get_current_cgroup_id),      \
        FN(get_local_storage),          \
        FN(sk_select_reuseport),        \
-       FN(skb_ancestor_cgroup_id),
+       FN(skb_ancestor_cgroup_id),     \
+       FN(sk_lookup_tcp),              \
+       FN(sk_lookup_udp),              \
+       FN(sk_release),                 \
+       FN(map_push_elem),              \
+       FN(map_pop_elem),               \
+       FN(map_peek_elem),              \
+       FN(msg_push_data),
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
  * function eBPF program intends to call
@@ -2398,6 +2519,23 @@ struct bpf_sock {
                                 */
 };
 
+struct bpf_sock_tuple {
+       union {
+               struct {
+                       __be32 saddr;
+                       __be32 daddr;
+                       __be16 sport;
+                       __be16 dport;
+               } ipv4;
+               struct {
+                       __be32 saddr[4];
+                       __be32 daddr[4];
+                       __be16 sport;
+                       __be16 dport;
+               } ipv6;
+       };
+};
+
 #define XDP_PACKET_HEADROOM 256
 
 /* User return codes for XDP prog type.
index 31aa101783351547469f4efc67b0bb9c9e0f10f1..93722e60204c607377bf20efeca54df08e78bbd4 100644 (file)
@@ -41,6 +41,7 @@
 #define EM_TILEPRO     188     /* Tilera TILEPro */
 #define EM_MICROBLAZE  189     /* Xilinx MicroBlaze */
 #define EM_TILEGX      191     /* Tilera TILE-Gx */
+#define EM_RISCV       243     /* RISC-V */
 #define EM_BPF         247     /* Linux BPF - in-kernel virtual machine */
 #define EM_FRV         0x5441  /* Fujitsu FR-V */
 
index 9c254603ebdad1a0c7e9196fe5ba1dc24f65c959..52e95197e07902c5d6f0fcadeab5fd8df1e70246 100644 (file)
@@ -285,6 +285,7 @@ enum {
        IFLA_BR_MCAST_STATS_ENABLED,
        IFLA_BR_MCAST_IGMP_VERSION,
        IFLA_BR_MCAST_MLD_VERSION,
+       IFLA_BR_VLAN_STATS_PER_PORT,
        __IFLA_BR_MAX,
 };
 
index 1a6fee974116a406deb077bd8be5585e5c4591cb..96c24478d8cedb50de46c7b27662f9b81008ce53 100644 (file)
@@ -29,6 +29,7 @@
 #define HPFS_SUPER_MAGIC       0xf995e849
 #define ISOFS_SUPER_MAGIC      0x9660
 #define JFFS2_SUPER_MAGIC      0x72b6
+#define XFS_SUPER_MAGIC                0x58465342      /* "XFSB" */
 #define PSTOREFS_MAGIC         0x6165676C
 #define EFIVARFS_MAGIC         0xde5e81e4
 #define HOSTFS_SUPER_MAGIC     0x00c0ffee
index 0b2c29bd081fa152647e7e5280a12c2671aff807..2966171b9b95ce279f90f754c4863d43a9957061 100644 (file)
@@ -153,6 +153,7 @@ enum nlmsgerr_attrs {
 #define NETLINK_LIST_MEMBERSHIPS       9
 #define NETLINK_CAP_ACK                        10
 #define NETLINK_EXT_ACK                        11
+#define NETLINK_DUMP_STRICT_CHK                12
 
 struct nl_pktinfo {
        __u32   group;
index dd164d7f4f41a6b2c888aa0834f2fee5524df4b6..626480b68fb597137c1cbec9897d86bfa05b6e96 100644 (file)
@@ -301,6 +301,7 @@ enum sctp_sinfo_flags {
        SCTP_SACK_IMMEDIATELY   = (1 << 3), /* SACK should be sent without delay. */
        /* 2 bits here have been used by SCTP_PR_SCTP_MASK */
        SCTP_SENDALL            = (1 << 6),
+       SCTP_PR_SCTP_ALL        = (1 << 7),
        SCTP_NOTIFICATION       = MSG_NOTIFICATION, /* Next message is not user msg but notification. */
        SCTP_EOF                = MSG_FIN,  /* Initiate graceful shutdown process. */
 };