]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update kernel headers to 4.16.0-rc2+
authorDavid Ahern <dsahern@gmail.com>
Tue, 20 Feb 2018 04:06:04 +0000 (20:06 -0800)
committerDavid Ahern <dsahern@gmail.com>
Tue, 20 Feb 2018 04:06:04 +0000 (20:06 -0800)
Update kernel headers to commit f5c0c6f4299f
("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")

Signed-off-by: David Ahern <dsahern@gmail.com>
include/uapi/linux/bpf.h
include/uapi/linux/bpf_common.h
include/uapi/linux/if_ether.h
include/uapi/linux/if_link.h
include/uapi/linux/if_macsec.h
include/uapi/linux/libc-compat.h
include/uapi/linux/netfilter_ipv4.h
include/uapi/linux/netfilter_ipv6.h
include/uapi/linux/types.h
include/uapi/rdma/rdma_netlink.h

index a902a490bc19cd275064c8bab4019fe27295c9e1..40b08520a369d70fa6262bd339aa4b09d573b101 100644 (file)
@@ -17,7 +17,7 @@
 #define BPF_ALU64      0x07    /* alu mode in double word width */
 
 /* ld/ldx fields */
-#define BPF_DW         0x18    /* double word */
+#define BPF_DW         0x18    /* double word (64-bit) */
 #define BPF_XADD       0xc0    /* exclusive add */
 
 /* alu/jmp fields */
@@ -642,6 +642,14 @@ union bpf_attr {
  *     @optlen: length of optval in bytes
  *     Return: 0 or negative error
  *
+ * int bpf_sock_ops_cb_flags_set(bpf_sock_ops, flags)
+ *     Set callback flags for sock_ops
+ *     @bpf_sock_ops: pointer to bpf_sock_ops_kern struct
+ *     @flags: flags value
+ *     Return: 0 for no error
+ *             -EINVAL if there is no full tcp socket
+ *             bits in flags that are not supported by current kernel
+ *
  * int bpf_skb_adjust_room(skb, len_diff, mode, flags)
  *     Grow or shrink room in sk_buff.
  *     @skb: pointer to skb
@@ -748,7 +756,8 @@ union bpf_attr {
        FN(perf_event_read_value),      \
        FN(perf_prog_read_value),       \
        FN(getsockopt),                 \
-       FN(override_return),
+       FN(override_return),            \
+       FN(sock_ops_cb_flags_set),
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
  * function eBPF program intends to call
@@ -938,6 +947,9 @@ struct bpf_map_info {
        __u32 max_entries;
        __u32 map_flags;
        char  name[BPF_OBJ_NAME_LEN];
+       __u32 ifindex;
+       __u64 netns_dev;
+       __u64 netns_ino;
 } __attribute__((aligned(8)));
 
 /* User bpf_sock_ops struct to access socket values and specify request ops
@@ -949,8 +961,9 @@ struct bpf_map_info {
 struct bpf_sock_ops {
        __u32 op;
        union {
-               __u32 reply;
-               __u32 replylong[4];
+               __u32 args[4];          /* Optionally passed to bpf program */
+               __u32 reply;            /* Returned by bpf program          */
+               __u32 replylong[4];     /* Optionally returned by bpf prog  */
        };
        __u32 family;
        __u32 remote_ip4;       /* Stored in network byte order */
@@ -965,8 +978,39 @@ struct bpf_sock_ops {
                                 */
        __u32 snd_cwnd;
        __u32 srtt_us;          /* Averaged RTT << 3 in usecs */
+       __u32 bpf_sock_ops_cb_flags; /* flags defined in uapi/linux/tcp.h */
+       __u32 state;
+       __u32 rtt_min;
+       __u32 snd_ssthresh;
+       __u32 rcv_nxt;
+       __u32 snd_nxt;
+       __u32 snd_una;
+       __u32 mss_cache;
+       __u32 ecn_flags;
+       __u32 rate_delivered;
+       __u32 rate_interval_us;
+       __u32 packets_out;
+       __u32 retrans_out;
+       __u32 total_retrans;
+       __u32 segs_in;
+       __u32 data_segs_in;
+       __u32 segs_out;
+       __u32 data_segs_out;
+       __u32 lost_out;
+       __u32 sacked_out;
+       __u32 sk_txhash;
+       __u64 bytes_received;
+       __u64 bytes_acked;
 };
 
+/* Definitions for bpf_sock_ops_cb_flags */
+#define BPF_SOCK_OPS_RTO_CB_FLAG       (1<<0)
+#define BPF_SOCK_OPS_RETRANS_CB_FLAG   (1<<1)
+#define BPF_SOCK_OPS_STATE_CB_FLAG     (1<<2)
+#define BPF_SOCK_OPS_ALL_CB_FLAGS       0x7            /* Mask of all currently
+                                                        * supported cb flags
+                                                        */
+
 /* List of known BPF sock_ops operators.
  * New entries can only be added at the end
  */
@@ -1000,6 +1044,43 @@ enum {
                                         * a congestion threshold. RTTs above
                                         * this indicate congestion
                                         */
+       BPF_SOCK_OPS_RTO_CB,            /* Called when an RTO has triggered.
+                                        * Arg1: value of icsk_retransmits
+                                        * Arg2: value of icsk_rto
+                                        * Arg3: whether RTO has expired
+                                        */
+       BPF_SOCK_OPS_RETRANS_CB,        /* Called when skb is retransmitted.
+                                        * Arg1: sequence number of 1st byte
+                                        * Arg2: # segments
+                                        * Arg3: return value of
+                                        *       tcp_transmit_skb (0 => success)
+                                        */
+       BPF_SOCK_OPS_STATE_CB,          /* Called when TCP changes state.
+                                        * Arg1: old_state
+                                        * Arg2: new_state
+                                        */
+};
+
+/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
+ * changes between the TCP and BPF versions. Ideally this should never happen.
+ * If it does, we need to add code to convert them before calling
+ * the BPF sock_ops function.
+ */
+enum {
+       BPF_TCP_ESTABLISHED = 1,
+       BPF_TCP_SYN_SENT,
+       BPF_TCP_SYN_RECV,
+       BPF_TCP_FIN_WAIT1,
+       BPF_TCP_FIN_WAIT2,
+       BPF_TCP_TIME_WAIT,
+       BPF_TCP_CLOSE,
+       BPF_TCP_CLOSE_WAIT,
+       BPF_TCP_LAST_ACK,
+       BPF_TCP_LISTEN,
+       BPF_TCP_CLOSING,        /* Now a valid state */
+       BPF_TCP_NEW_SYN_RECV,
+
+       BPF_TCP_MAX_STATES      /* Leave at the end! */
 };
 
 #define TCP_BPF_IW             1001    /* Set TCP initial congestion window */
index 9f0201beb6c4eb4d9dc2754e0a41e075bd2a3d79..f0fe1394971d19422a3fe39bec4451d2a436b27e 100644 (file)
 
 /* ld/ldx fields */
 #define BPF_SIZE(code)  ((code) & 0x18)
-#define                BPF_W           0x00
-#define                BPF_H           0x08
-#define                BPF_B           0x10
+#define                BPF_W           0x00 /* 32-bit */
+#define                BPF_H           0x08 /* 16-bit */
+#define                BPF_B           0x10 /*  8-bit */
+/* eBPF                BPF_DW          0x18    64-bit */
 #define BPF_MODE(code)  ((code) & 0xe0)
 #define                BPF_IMM         0x00
 #define                BPF_ABS         0x20
index 5f1d4af33a111423b61b712a8969da67d86a298f..a34b152e3c19683f2acd70a9e3d750897382eb70 100644 (file)
@@ -23,7 +23,6 @@
 #define _LINUX_IF_ETHER_H
 
 #include <linux/types.h>
-#include <linux/libc-compat.h>
 
 /*
  *     IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
  *     This is an Ethernet frame header.
  */
 
+/* allow libcs like musl to deactivate this, glibc does not implement this. */
+#ifndef __UAPI_DEF_ETHHDR
+#define __UAPI_DEF_ETHHDR              1
+#endif
+
 #if __UAPI_DEF_ETHHDR
 struct ethhdr {
        unsigned char   h_dest[ETH_ALEN];       /* destination eth addr */
index 1726e49fbc6b8482a8a1a1165b7f80988f410709..9c6cedabc91821f3f039607b22e0a11b85ccbca9 100644 (file)
@@ -161,6 +161,9 @@ enum {
        IFLA_EVENT,
        IFLA_NEW_NETNSID,
        IFLA_IF_NETNSID,
+       IFLA_CARRIER_UP_COUNT,
+       IFLA_CARRIER_DOWN_COUNT,
+       IFLA_NEW_IFINDEX,
        __IFLA_MAX
 };
 
@@ -936,4 +939,22 @@ enum {
        IFLA_EVENT_BONDING_OPTIONS,     /* change in bonding options */
 };
 
+/* tun section */
+
+enum {
+       IFLA_TUN_UNSPEC,
+       IFLA_TUN_OWNER,
+       IFLA_TUN_GROUP,
+       IFLA_TUN_TYPE,
+       IFLA_TUN_PI,
+       IFLA_TUN_VNET_HDR,
+       IFLA_TUN_PERSIST,
+       IFLA_TUN_MULTI_QUEUE,
+       IFLA_TUN_NUM_QUEUES,
+       IFLA_TUN_NUM_DISABLED_QUEUES,
+       __IFLA_TUN_MAX,
+};
+
+#define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)
+
 #endif /* _LINUX_IF_LINK_H */
index 0cfb902a09acc64dab1fdcae0a0346138f33d4a3..77439932561b99c4dca9c32823e6b985450fa038 100644 (file)
@@ -18,7 +18,7 @@
 #define MACSEC_GENL_NAME "macsec"
 #define MACSEC_GENL_VERSION 1
 
-#define MACSEC_MAX_KEY_LEN 256
+#define MACSEC_MAX_KEY_LEN 128
 
 #define MACSEC_KEYID_LEN 16
 
@@ -26,9 +26,9 @@
 #define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL
 #define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL
 
-#define MACSEC_DEFAULT_CIPHER_ID     MACSEC_CIPHER_ID_GCM_AES_128
 /* deprecated cipher ID for GCM-AES-128 */
-#define MACSEC_DEFAULT_CIPHER_ALT    0x0080020001000001ULL
+#define MACSEC_DEFAULT_CIPHER_ID     0x0080020001000001ULL
+#define MACSEC_DEFAULT_CIPHER_ALT    MACSEC_CIPHER_ID_GCM_AES_128
 
 #define MACSEC_MIN_ICV_LEN 8
 #define MACSEC_MAX_ICV_LEN 32
index 5668ec3dc61af22a1e76e6226aa5969a6ff542a6..a1599911e7a942322aed41c6aa730caaa66075e9 100644 (file)
 
 #endif /* __GLIBC__ */
 
-/* Definitions for if_ether.h */
-/* allow libcs like musl to deactivate this, glibc does not implement this. */
-#ifndef __UAPI_DEF_ETHHDR
-#define __UAPI_DEF_ETHHDR              1
-#endif
-
 #endif /* _LIBC_COMPAT_H */
index 27ca143bb28acdc3c34ff2c4c132af8ff5867536..074e2c8b923adbfbf7fabd586d2d95fe81791192 100644 (file)
@@ -55,6 +55,7 @@
 
 enum nf_ip_hook_priorities {
        NF_IP_PRI_FIRST = INT_MIN,
+       NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,
        NF_IP_PRI_CONNTRACK_DEFRAG = -400,
        NF_IP_PRI_RAW = -300,
        NF_IP_PRI_SELINUX_FIRST = -225,
index 35f33d1a596efaa5f0bda7d4a5fc1ae89a6c5ed1..92701fe853ada40cf0c64a54c1a35783704bb86d 100644 (file)
@@ -60,6 +60,7 @@
 
 enum nf_ip6_hook_priorities {
        NF_IP6_PRI_FIRST = INT_MIN,
+       NF_IP6_PRI_RAW_BEFORE_DEFRAG = -450,
        NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
        NF_IP6_PRI_RAW = -300,
        NF_IP6_PRI_SELINUX_FIRST = -225,
index b1c10874d7c6134a7bcce59c1567184bb80c13f8..5ea4daa7a020dbaa5df80cf720dd555f96fc0545 100644 (file)
@@ -44,5 +44,11 @@ typedef __u32 __bitwise __wsum;
 #define __aligned_be64 __be64 __attribute__((aligned(8)))
 #define __aligned_le64 __le64 __attribute__((aligned(8)))
 
+#ifdef __CHECK_POLL
+typedef unsigned __bitwise __poll_t;
+#else
+typedef unsigned __poll_t;
+#endif
+
 #endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */
index 48fbf3c373e0b9062c798aad09febb441aa8b8da..dbac3b829abbd389bb2c436f243cdbb14401b6fb 100644 (file)
@@ -227,14 +227,16 @@ enum rdma_nldev_command {
        RDMA_NLDEV_CMD_UNSPEC,
 
        RDMA_NLDEV_CMD_GET, /* can dump */
-       RDMA_NLDEV_CMD_SET,
-       RDMA_NLDEV_CMD_NEW,
-       RDMA_NLDEV_CMD_DEL,
 
-       RDMA_NLDEV_CMD_PORT_GET, /* can dump */
-       RDMA_NLDEV_CMD_PORT_SET,
-       RDMA_NLDEV_CMD_PORT_NEW,
-       RDMA_NLDEV_CMD_PORT_DEL,
+       /* 2 - 4 are free to use */
+
+       RDMA_NLDEV_CMD_PORT_GET = 5, /* can dump */
+
+       /* 6 - 8 are free to use */
+
+       RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */
+
+       RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */
 
        RDMA_NLDEV_NUM_OPS
 };
@@ -303,6 +305,51 @@ enum rdma_nldev_attr {
 
        RDMA_NLDEV_ATTR_DEV_NODE_TYPE,          /* u8 */
 
+       RDMA_NLDEV_ATTR_RES_SUMMARY,            /* nested table */
+       RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY,      /* nested table */
+       RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME, /* string */
+       RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, /* u64 */
+
+       RDMA_NLDEV_ATTR_RES_QP,                 /* nested table */
+       RDMA_NLDEV_ATTR_RES_QP_ENTRY,           /* nested table */
+       /*
+        * Local QPN
+        */
+       RDMA_NLDEV_ATTR_RES_LQPN,               /* u32 */
+       /*
+        * Remote QPN,
+        * Applicable for RC and UC only IBTA 11.2.5.3 QUERY QUEUE PAIR
+        */
+       RDMA_NLDEV_ATTR_RES_RQPN,               /* u32 */
+       /*
+        * Receive Queue PSN,
+        * Applicable for RC and UC only 11.2.5.3 QUERY QUEUE PAIR
+        */
+       RDMA_NLDEV_ATTR_RES_RQ_PSN,             /* u32 */
+       /*
+        * Send Queue PSN
+        */
+       RDMA_NLDEV_ATTR_RES_SQ_PSN,             /* u32 */
+       RDMA_NLDEV_ATTR_RES_PATH_MIG_STATE,     /* u8 */
+       /*
+        * QP types as visible to RDMA/core, the reserved QPT
+        * are not exported through this interface.
+        */
+       RDMA_NLDEV_ATTR_RES_TYPE,               /* u8 */
+       RDMA_NLDEV_ATTR_RES_STATE,              /* u8 */
+       /*
+        * Process ID which created object,
+        * in case of kernel origin, PID won't exist.
+        */
+       RDMA_NLDEV_ATTR_RES_PID,                /* u32 */
+       /*
+        * The name of process created following resource.
+        * It will exist only for kernel objects.
+        * For user created objects, the user is supposed
+        * to read /proc/PID/comm file.
+        */
+       RDMA_NLDEV_ATTR_RES_KERN_NAME,          /* string */
+
        RDMA_NLDEV_ATTR_MAX
 };
 #endif /* _RDMA_NETLINK_H */