]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@gmail.com>
Wed, 27 Feb 2019 16:23:22 +0000 (08:23 -0800)
committerDavid Ahern <dsahern@gmail.com>
Wed, 27 Feb 2019 16:23:22 +0000 (08:23 -0800)
Update kernel headers to commit:
    ff8285f81822 ("net: sched: pie: fix 64-bit division")

Signed-off-by: David Ahern <dsahern@gmail.com>
18 files changed:
include/uapi/linux/bpf.h
include/uapi/linux/devlink.h
include/uapi/linux/pkt_cls.h
include/uapi/linux/pkt_sched.h
include/uapi/linux/tc_act/tc_bpf.h
include/uapi/linux/tc_act/tc_connmark.h
include/uapi/linux/tc_act/tc_csum.h
include/uapi/linux/tc_act/tc_gact.h
include/uapi/linux/tc_act/tc_ife.h
include/uapi/linux/tc_act/tc_ipt.h
include/uapi/linux/tc_act/tc_mirred.h
include/uapi/linux/tc_act/tc_nat.h
include/uapi/linux/tc_act/tc_pedit.h
include/uapi/linux/tc_act/tc_sample.h
include/uapi/linux/tc_act/tc_skbedit.h
include/uapi/linux/tc_act/tc_skbmod.h
include/uapi/linux/tc_act/tc_tunnel_key.h
include/uapi/linux/tc_act/tc_vlan.h

index 031c4b4c32fd95dfea46c079be0f983640941b80..b7b748f15da107d6a637f0c7ed79d8ca06652cbe 100644 (file)
@@ -2016,6 +2016,19 @@ union bpf_attr {
  *                     Only works if *skb* contains an IPv6 packet. Insert a
  *                     Segment Routing Header (**struct ipv6_sr_hdr**) inside
  *                     the IPv6 header.
+ *             **BPF_LWT_ENCAP_IP**
+ *                     IP encapsulation (GRE/GUE/IPIP/etc). The outer header
+ *                     must be IPv4 or IPv6, followed by zero or more
+ *                     additional headers, up to LWT_BPF_MAX_HEADROOM total
+ *                     bytes in all prepended headers. Please note that
+ *                     if skb_is_gso(skb) is true, no more than two headers
+ *                     can be prepended, and the inner header, if present,
+ *                     should be either GRE or UDP/GUE.
+ *
+ *             BPF_LWT_ENCAP_SEG6*** types can be called by bpf programs of
+ *             type BPF_PROG_TYPE_LWT_IN; BPF_LWT_ENCAP_IP type can be called
+ *             by bpf programs of types BPF_PROG_TYPE_LWT_IN and
+ *             BPF_PROG_TYPE_LWT_XMIT.
  *
  *             A call to this helper is susceptible to change the underlaying
  *             packet buffer. Therefore, at load time, all checks on pointers
@@ -2329,6 +2342,23 @@ union bpf_attr {
  *             "**y**".
  *     Return
  *             0
+ *
+ * struct bpf_sock *bpf_sk_fullsock(struct bpf_sock *sk)
+ *     Description
+ *             This helper gets a **struct bpf_sock** pointer such
+ *             that all the fields in bpf_sock can be accessed.
+ *     Return
+ *             A **struct bpf_sock** pointer on success, or NULL in
+ *             case of failure.
+ *
+ * struct bpf_tcp_sock *bpf_tcp_sock(struct bpf_sock *sk)
+ *     Description
+ *             This helper gets a **struct bpf_tcp_sock** pointer from a
+ *             **struct bpf_sock** pointer.
+ *
+ *     Return
+ *             A **struct bpf_tcp_sock** pointer on success, or NULL in
+ *             case of failure.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -2425,7 +2455,9 @@ union bpf_attr {
        FN(msg_pop_data),               \
        FN(rc_pointer_rel),             \
        FN(spin_lock),                  \
-       FN(spin_unlock),
+       FN(spin_unlock),                \
+       FN(sk_fullsock),                \
+       FN(tcp_sock),
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
  * function eBPF program intends to call
@@ -2498,7 +2530,8 @@ enum bpf_hdr_start_off {
 /* Encapsulation type for BPF_FUNC_lwt_push_encap helper. */
 enum bpf_lwt_encap_mode {
        BPF_LWT_ENCAP_SEG6,
-       BPF_LWT_ENCAP_SEG6_INLINE
+       BPF_LWT_ENCAP_SEG6_INLINE,
+       BPF_LWT_ENCAP_IP,
 };
 
 #define __bpf_md_ptr(type, name)       \
@@ -2545,6 +2578,7 @@ struct __sk_buff {
        __u64 tstamp;
        __u32 wire_len;
        __u32 gso_segs;
+       __bpf_md_ptr(struct bpf_sock *, sk);
 };
 
 struct bpf_tunnel_key {
@@ -2586,7 +2620,15 @@ enum bpf_ret_code {
        BPF_DROP = 2,
        /* 3-6 reserved */
        BPF_REDIRECT = 7,
-       /* >127 are reserved for prog type specific return codes */
+       /* >127 are reserved for prog type specific return codes.
+        *
+        * BPF_LWT_REROUTE: used by BPF_PROG_TYPE_LWT_IN and
+        *    BPF_PROG_TYPE_LWT_XMIT to indicate that skb had been
+        *    changed and should be routed based on its new L3 header.
+        *    (This is an L3 redirect, as opposed to L2 redirect
+        *    represented by BPF_REDIRECT above).
+        */
+       BPF_LWT_REROUTE = 128,
 };
 
 struct bpf_sock {
@@ -2596,14 +2638,52 @@ struct bpf_sock {
        __u32 protocol;
        __u32 mark;
        __u32 priority;
-       __u32 src_ip4;          /* Allows 1,2,4-byte read.
-                                * Stored in network byte order.
+       /* IP address also allows 1 and 2 bytes access */
+       __u32 src_ip4;
+       __u32 src_ip6[4];
+       __u32 src_port;         /* host byte order */
+       __u32 dst_port;         /* network byte order */
+       __u32 dst_ip4;
+       __u32 dst_ip6[4];
+       __u32 state;
+};
+
+struct bpf_tcp_sock {
+       __u32 snd_cwnd;         /* Sending congestion window            */
+       __u32 srtt_us;          /* smoothed round trip time << 3 in usecs */
+       __u32 rtt_min;
+       __u32 snd_ssthresh;     /* Slow start size threshold            */
+       __u32 rcv_nxt;          /* What we want to receive next         */
+       __u32 snd_nxt;          /* Next sequence we send                */
+       __u32 snd_una;          /* First byte we want an ack for        */
+       __u32 mss_cache;        /* Cached effective mss, not including SACKS */
+       __u32 ecn_flags;        /* ECN status bits.                     */
+       __u32 rate_delivered;   /* saved rate sample: packets delivered */
+       __u32 rate_interval_us; /* saved rate sample: time elapsed */
+       __u32 packets_out;      /* Packets which are "in flight"        */
+       __u32 retrans_out;      /* Retransmitted packets out            */
+       __u32 total_retrans;    /* Total retransmits for entire connection */
+       __u32 segs_in;          /* RFC4898 tcpEStatsPerfSegsIn
+                                * total number of segments in.
                                 */
-       __u32 src_ip6[4];       /* Allows 1,2,4-byte read.
-                                * Stored in network byte order.
+       __u32 data_segs_in;     /* RFC4898 tcpEStatsPerfDataSegsIn
+                                * total number of data segments in.
+                                */
+       __u32 segs_out;         /* RFC4898 tcpEStatsPerfSegsOut
+                                * The total number of segments sent.
+                                */
+       __u32 data_segs_out;    /* RFC4898 tcpEStatsPerfDataSegsOut
+                                * total number of data segments sent.
+                                */
+       __u32 lost_out;         /* Lost packets                 */
+       __u32 sacked_out;       /* SACK'd packets                       */
+       __u64 bytes_received;   /* RFC4898 tcpEStatsAppHCThruOctetsReceived
+                                * sum(delta(rcv_nxt)), or how many bytes
+                                * were acked.
                                 */
-       __u32 src_port;         /* Allows 4-byte read.
-                                * Stored in host byte order
+       __u64 bytes_acked;      /* RFC4898 tcpEStatsAppHCThruOctetsAcked
+                                * sum(delta(snd_una)), or how many bytes
+                                * were acked.
                                 */
 };
 
index d51b59a7b8ee5863c55e2aa4a7593c53cacbd6f4..3b6a9e6be3ac9a35fe2d9b7ad86ccc7a3d20bd31 100644 (file)
@@ -96,6 +96,15 @@ enum devlink_command {
 
        DEVLINK_CMD_INFO_GET,           /* can dump */
 
+       DEVLINK_CMD_HEALTH_REPORTER_GET,
+       DEVLINK_CMD_HEALTH_REPORTER_SET,
+       DEVLINK_CMD_HEALTH_REPORTER_RECOVER,
+       DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE,
+       DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET,
+       DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR,
+
+       DEVLINK_CMD_FLASH_UPDATE,
+
        /* add new commands above here */
        __DEVLINK_CMD_MAX,
        DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
@@ -302,6 +311,27 @@ enum devlink_attr {
 
        DEVLINK_ATTR_SB_POOL_CELL_SIZE,         /* u32 */
 
+       DEVLINK_ATTR_FMSG,                      /* nested */
+       DEVLINK_ATTR_FMSG_OBJ_NEST_START,       /* flag */
+       DEVLINK_ATTR_FMSG_PAIR_NEST_START,      /* flag */
+       DEVLINK_ATTR_FMSG_ARR_NEST_START,       /* flag */
+       DEVLINK_ATTR_FMSG_NEST_END,             /* flag */
+       DEVLINK_ATTR_FMSG_OBJ_NAME,             /* string */
+       DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE,       /* u8 */
+       DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA,       /* dynamic */
+
+       DEVLINK_ATTR_HEALTH_REPORTER,                   /* nested */
+       DEVLINK_ATTR_HEALTH_REPORTER_NAME,              /* string */
+       DEVLINK_ATTR_HEALTH_REPORTER_STATE,             /* u8 */
+       DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT,         /* u64 */
+       DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT,     /* u64 */
+       DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS,           /* u64 */
+       DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,   /* u64 */
+       DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER,      /* u8 */
+
+       DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME,    /* string */
+       DEVLINK_ATTR_FLASH_UPDATE_COMPONENT,    /* string */
+
        /* add new attributes above here, update the policy in devlink.c */
 
        __DEVLINK_ATTR_MAX,
index 02ac251be8c43cc8a57deb2da1153cc7f8be5be4..51a0496f78eacc66a927a5f836dd1e70d2990fad 100644 (file)
@@ -63,12 +63,49 @@ enum {
 #define TC_ACT_GOTO_CHAIN __TC_ACT_EXT(2)
 #define TC_ACT_EXT_OPCODE_MAX  TC_ACT_GOTO_CHAIN
 
+/* These macros are put here for binary compatibility with userspace apps that
+ * make use of them. For kernel code and new userspace apps, use the TCA_ID_*
+ * versions.
+ */
+#define TCA_ACT_GACT 5
+#define TCA_ACT_IPT 6
+#define TCA_ACT_PEDIT 7
+#define TCA_ACT_MIRRED 8
+#define TCA_ACT_NAT 9
+#define TCA_ACT_XT 10
+#define TCA_ACT_SKBEDIT 11
+#define TCA_ACT_VLAN 12
+#define TCA_ACT_BPF 13
+#define TCA_ACT_CONNMARK 14
+#define TCA_ACT_SKBMOD 15
+#define TCA_ACT_CSUM 16
+#define TCA_ACT_TUNNEL_KEY 17
+#define TCA_ACT_SIMP 22
+#define TCA_ACT_IFE 25
+#define TCA_ACT_SAMPLE 26
+
 /* Action type identifiers*/
-enum {
-       TCA_ID_UNSPEC=0,
-       TCA_ID_POLICE=1,
+enum tca_id {
+       TCA_ID_UNSPEC = 0,
+       TCA_ID_POLICE = 1,
+       TCA_ID_GACT = TCA_ACT_GACT,
+       TCA_ID_IPT = TCA_ACT_IPT,
+       TCA_ID_PEDIT = TCA_ACT_PEDIT,
+       TCA_ID_MIRRED = TCA_ACT_MIRRED,
+       TCA_ID_NAT = TCA_ACT_NAT,
+       TCA_ID_XT = TCA_ACT_XT,
+       TCA_ID_SKBEDIT = TCA_ACT_SKBEDIT,
+       TCA_ID_VLAN = TCA_ACT_VLAN,
+       TCA_ID_BPF = TCA_ACT_BPF,
+       TCA_ID_CONNMARK = TCA_ACT_CONNMARK,
+       TCA_ID_SKBMOD = TCA_ACT_SKBMOD,
+       TCA_ID_CSUM = TCA_ACT_CSUM,
+       TCA_ID_TUNNEL_KEY = TCA_ACT_TUNNEL_KEY,
+       TCA_ID_SIMP = TCA_ACT_SIMP,
+       TCA_ID_IFE = TCA_ACT_IFE,
+       TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
        /* other actions go here */
-       __TCA_ID_MAX=255
+       __TCA_ID_MAX = 255
 };
 
 #define TCA_ID_MAX __TCA_ID_MAX
index 0d18b1d1fbbc8a845857461b7baa3522636dbf31..1eb572ef3f2775686d4f5c7d0e6c2582a9c16f3b 100644 (file)
@@ -954,7 +954,7 @@ enum {
 #define TCA_PIE_MAX   (__TCA_PIE_MAX - 1)
 
 struct tc_pie_xstats {
-       __u32 prob;             /* current probability */
+       __u64 prob;             /* current probability */
        __u32 delay;            /* current delay in ms */
        __u32 avg_dq_rate;      /* current average dq_rate in bits/pie_time */
        __u32 packets_in;       /* total number of packets enqueued */
index 6e89a5df49a46a601cd5b4e82b0a4dcb6af7e23c..653c4f94f76e371cf08283010db13615f5d1dfc0 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_BPF 13
-
 struct tc_act_bpf {
        tc_gen;
 };
index 80caa47b19334fac38b71cf2fb4b114f7fcb45f0..9f8f6f709feb5cb67decc5fc80c422d9373df930 100644 (file)
@@ -5,8 +5,6 @@
 #include <linux/types.h>
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_CONNMARK 14
-
 struct tc_connmark {
        tc_gen;
        __u16 zone;
index 0ecf4d29e2f31312a08931f5cd760d8a83cc8088..94b2044929de52ca58e6d0b5328d033b83d861ac 100644 (file)
@@ -5,8 +5,6 @@
 #include <linux/types.h>
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_CSUM 16
-
 enum {
        TCA_CSUM_UNSPEC,
        TCA_CSUM_PARMS,
index 94273c3b81b0ba5a8ff8fab6a2865e9e01bdd098..37e5392e02c700218db07536f212428d87728798 100644 (file)
@@ -5,7 +5,6 @@
 #include <linux/types.h>
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_GACT 5
 struct tc_gact {
        tc_gen;
 
index 2f48490ef3867a52b8de029b053cfc2b3eb0d981..8c401f185675582febc262a8d11bf9598cb8a1f4 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/pkt_cls.h>
 #include <linux/ife.h>
 
-#define TCA_ACT_IFE 25
 /* Flag bits for now just encoding/decoding; mutually exclusive */
 #define IFE_ENCODE 1
 #define IFE_DECODE 0
index b743c8bddd13d32f2de9141276acdc9331195ce4..c48d7da6750dd30f537b0ca2dfe9082e821d2590 100644 (file)
@@ -4,9 +4,6 @@
 
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_IPT 6
-#define TCA_ACT_XT 10
-
 enum {
        TCA_IPT_UNSPEC,
        TCA_IPT_TABLE,
index 5dd671cf577655ebc0d9df669ce531b217090e42..2500a0005d051b3292df07cd6c8eff94e6b04723 100644 (file)
@@ -5,7 +5,6 @@
 #include <linux/types.h>
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_MIRRED 8
 #define TCA_EGRESS_REDIR 1  /* packet redirect to EGRESS*/
 #define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */
 #define TCA_INGRESS_REDIR 3  /* packet redirect to INGRESS*/
index 086be842587bd7cb5d88999746dad12677b41cd5..21399c2c613015125ed07ac7f93ab1196c4db530 100644 (file)
@@ -5,8 +5,6 @@
 #include <linux/pkt_cls.h>
 #include <linux/types.h>
 
-#define TCA_ACT_NAT 9
-
 enum {
        TCA_NAT_UNSPEC,
        TCA_NAT_PARMS,
index 24ec792dacc1828f814625a6b6e0109566e4843b..f3e61b04fa01b4f728c74a8ef0589040f8e62349 100644 (file)
@@ -5,8 +5,6 @@
 #include <linux/types.h>
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_PEDIT 7
-
 enum {
        TCA_PEDIT_UNSPEC,
        TCA_PEDIT_TM,
index bd7e9f03abd2e845c0d6890333ef1905dc87b588..fee1bcc207936ada1b21f29e06fa34c76ff908e9 100644 (file)
@@ -6,8 +6,6 @@
 #include <linux/pkt_cls.h>
 #include <linux/if_ether.h>
 
-#define TCA_ACT_SAMPLE 26
-
 struct tc_sample {
        tc_gen;
 };
index 6de6071ebed605f3165ad49eca2ac645b4cff5a9..800e9337721887d80e5054a2564264bde5fc2936 100644 (file)
@@ -23,8 +23,6 @@
 
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_SKBEDIT 11
-
 #define SKBEDIT_F_PRIORITY             0x1
 #define SKBEDIT_F_QUEUE_MAPPING                0x2
 #define SKBEDIT_F_MARK                 0x4
index 38c072f66f2fcff17cecc17082203bac038b8078..c525b3503797d4b7ddb278915cd70b34996372ec 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_SKBMOD 15
-
 #define SKBMOD_F_DMAC  0x1
 #define SKBMOD_F_SMAC  0x2
 #define SKBMOD_F_ETYPE 0x4
index be384d63e1b56b297707cb5159c50ea4e3dff0dc..41c8b462c177c11231d3877e5071b5c1537e2a35 100644 (file)
@@ -14,8 +14,6 @@
 
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_TUNNEL_KEY 17
-
 #define TCA_TUNNEL_KEY_ACT_SET     1
 #define TCA_TUNNEL_KEY_ACT_RELEASE  2
 
index 0d7b5fd6605b049ecc2d997ed192a6c20611f5dd..168995b54a70330081fdc6d835cc6d27c822a8f7 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <linux/pkt_cls.h>
 
-#define TCA_ACT_VLAN 12
-
 #define TCA_VLAN_ACT_POP       1
 #define TCA_VLAN_ACT_PUSH      2
 #define TCA_VLAN_ACT_MODIFY    3