]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@kernel.org>
Mon, 3 Aug 2020 14:56:28 +0000 (14:56 +0000)
committerDavid Ahern <dsahern@kernel.org>
Mon, 3 Aug 2020 14:56:28 +0000 (14:56 +0000)
Update kernel headers to commit:
    bd0b33b24897 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")

Signed-off-by: David Ahern <dsahern@kernel.org>
include/uapi/linux/bpf.h
include/uapi/linux/icmpv6.h
include/uapi/linux/if_link.h
include/uapi/linux/in.h
include/uapi/linux/in6.h
include/uapi/linux/pkt_cls.h
include/uapi/linux/snmp.h
include/uapi/linux/tcp.h
include/uapi/linux/xfrm.h

index 34d9003d01ae0da96f1ccff58dd47cedb51bf7ac..378eda2042156d374aee00ed5cf3ece8e8f9b8f7 100644 (file)
@@ -189,6 +189,7 @@ enum bpf_prog_type {
        BPF_PROG_TYPE_STRUCT_OPS,
        BPF_PROG_TYPE_EXT,
        BPF_PROG_TYPE_LSM,
+       BPF_PROG_TYPE_SK_LOOKUP,
 };
 
 enum bpf_attach_type {
@@ -227,6 +228,8 @@ enum bpf_attach_type {
        BPF_CGROUP_INET6_GETSOCKNAME,
        BPF_XDP_DEVMAP,
        BPF_CGROUP_INET_SOCK_RELEASE,
+       BPF_XDP_CPUMAP,
+       BPF_SK_LOOKUP,
        __MAX_BPF_ATTACH_TYPE
 };
 
@@ -2419,7 +2422,7 @@ union bpf_attr {
  *                     Look for an IPv6 socket.
  *
  *             If the *netns* is a negative signed 32-bit integer, then the
- *             socket lookup table in the netns associated with the *ctx* will
+ *             socket lookup table in the netns associated with the *ctx*
  *             will be used. For the TC hooks, this is the netns of the device
  *             in the skb. For socket hooks, this is the netns of the socket.
  *             If *netns* is any other signed 32-bit value greater than or
@@ -2456,7 +2459,7 @@ union bpf_attr {
  *                     Look for an IPv6 socket.
  *
  *             If the *netns* is a negative signed 32-bit integer, then the
- *             socket lookup table in the netns associated with the *ctx* will
+ *             socket lookup table in the netns associated with the *ctx*
  *             will be used. For the TC hooks, this is the netns of the device
  *             in the skb. For socket hooks, this is the netns of the socket.
  *             If *netns* is any other signed 32-bit value greater than or
@@ -3068,6 +3071,10 @@ union bpf_attr {
  *
  * long bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)
  *     Description
+ *             Helper is overloaded depending on BPF program type. This
+ *             description applies to **BPF_PROG_TYPE_SCHED_CLS** and
+ *             **BPF_PROG_TYPE_SCHED_ACT** programs.
+ *
  *             Assign the *sk* to the *skb*. When combined with appropriate
  *             routing configuration to receive the packet towards the socket,
  *             will cause *skb* to be delivered to the specified socket.
@@ -3093,6 +3100,56 @@ union bpf_attr {
  *             **-ESOCKTNOSUPPORT** if the socket type is not supported
  *             (reuseport).
  *
+ * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags)
+ *     Description
+ *             Helper is overloaded depending on BPF program type. This
+ *             description applies to **BPF_PROG_TYPE_SK_LOOKUP** programs.
+ *
+ *             Select the *sk* as a result of a socket lookup.
+ *
+ *             For the operation to succeed passed socket must be compatible
+ *             with the packet description provided by the *ctx* object.
+ *
+ *             L4 protocol (**IPPROTO_TCP** or **IPPROTO_UDP**) must
+ *             be an exact match. While IP family (**AF_INET** or
+ *             **AF_INET6**) must be compatible, that is IPv6 sockets
+ *             that are not v6-only can be selected for IPv4 packets.
+ *
+ *             Only TCP listeners and UDP unconnected sockets can be
+ *             selected. *sk* can also be NULL to reset any previous
+ *             selection.
+ *
+ *             *flags* argument can combination of following values:
+ *
+ *             * **BPF_SK_LOOKUP_F_REPLACE** to override the previous
+ *               socket selection, potentially done by a BPF program
+ *               that ran before us.
+ *
+ *             * **BPF_SK_LOOKUP_F_NO_REUSEPORT** to skip
+ *               load-balancing within reuseport group for the socket
+ *               being selected.
+ *
+ *             On success *ctx->sk* will point to the selected socket.
+ *
+ *     Return
+ *             0 on success, or a negative errno in case of failure.
+ *
+ *             * **-EAFNOSUPPORT** if socket family (*sk->family*) is
+ *               not compatible with packet family (*ctx->family*).
+ *
+ *             * **-EEXIST** if socket has been already selected,
+ *               potentially by another program, and
+ *               **BPF_SK_LOOKUP_F_REPLACE** flag was not specified.
+ *
+ *             * **-EINVAL** if unsupported flags were specified.
+ *
+ *             * **-EPROTOTYPE** if socket L4 protocol
+ *               (*sk->protocol*) doesn't match packet protocol
+ *               (*ctx->protocol*).
+ *
+ *             * **-ESOCKTNOSUPPORT** if socket is not in allowed
+ *               state (TCP listening or UDP unconnected).
+ *
  * u64 bpf_ktime_get_boot_ns(void)
  *     Description
  *             Return the time elapsed since system boot, in nanoseconds.
@@ -3606,6 +3663,12 @@ enum {
        BPF_RINGBUF_HDR_SZ              = 8,
 };
 
+/* BPF_FUNC_sk_assign flags in bpf_sk_lookup context. */
+enum {
+       BPF_SK_LOOKUP_F_REPLACE         = (1ULL << 0),
+       BPF_SK_LOOKUP_F_NO_REUSEPORT    = (1ULL << 1),
+};
+
 /* Mode for BPF_FUNC_skb_adjust_room helper. */
 enum bpf_adj_room_mode {
        BPF_ADJ_ROOM_NET,
@@ -3849,6 +3912,19 @@ struct bpf_devmap_val {
        } bpf_prog;
 };
 
+/* CPUMAP map-value layout
+ *
+ * The struct data-layout of map-value is a configuration interface.
+ * New members can only be added to the end of this structure.
+ */
+struct bpf_cpumap_val {
+       __u32 qsize;    /* queue size to remote target CPU */
+       union {
+               int   fd;       /* prog fd on map write */
+               __u32 id;       /* prog id on map read */
+       } bpf_prog;
+};
+
 enum sk_action {
        SK_DROP = 0,
        SK_PASS,
@@ -3986,7 +4062,7 @@ struct bpf_link_info {
 
 /* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
  * by user and intended to be used by socket (e.g. to bind to, depends on
- * attach attach type).
+ * attach type).
  */
 struct bpf_sock_addr {
        __u32 user_family;      /* Allows 4-byte read, but no write. */
@@ -4335,4 +4411,19 @@ struct bpf_pidns_info {
        __u32 pid;
        __u32 tgid;
 };
+
+/* User accessible data for SK_LOOKUP programs. Add new fields at the end. */
+struct bpf_sk_lookup {
+       __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
+
+       __u32 family;           /* Protocol family (AF_INET, AF_INET6) */
+       __u32 protocol;         /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */
+       __u32 remote_ip4;       /* Network byte order */
+       __u32 remote_ip6[4];    /* Network byte order */
+       __u32 remote_port;      /* Network byte order */
+       __u32 local_ip4;        /* Network byte order */
+       __u32 local_ip6[4];     /* Network byte order */
+       __u32 local_port;       /* Host byte order */
+};
+
 #endif /* __LINUX_BPF_H__ */
index 1dc7cc6780ac4416ed8dc9a2f00f6d3c9b3185c2..70b283ff1e0545275270fffb74c11038fb6f9799 100644 (file)
@@ -68,6 +68,7 @@ struct icmp6hdr {
 #define icmp6_mtu              icmp6_dataun.un_data32[0]
 #define icmp6_unused           icmp6_dataun.un_data32[0]
 #define icmp6_maxdelay         icmp6_dataun.un_data16[0]
+#define icmp6_datagram_len     icmp6_dataun.un_data8[0]
 #define icmp6_router           icmp6_dataun.u_nd_advt.router
 #define icmp6_solicited                icmp6_dataun.u_nd_advt.solicited
 #define icmp6_override         icmp6_dataun.u_nd_advt.override
index 58c40777f6fbd63edd4993a55334a7e239e7fde6..b1bdcfb893ef0cf690bacd7569f78aa0fad2d5b1 100644 (file)
@@ -170,12 +170,22 @@ enum {
        IFLA_PROP_LIST,
        IFLA_ALT_IFNAME, /* Alternative ifname */
        IFLA_PERM_ADDRESS,
+       IFLA_PROTO_DOWN_REASON,
        __IFLA_MAX
 };
 
 
 #define IFLA_MAX (__IFLA_MAX - 1)
 
+enum {
+       IFLA_PROTO_DOWN_REASON_UNSPEC,
+       IFLA_PROTO_DOWN_REASON_MASK,    /* u32, mask for reason bits */
+       IFLA_PROTO_DOWN_REASON_VALUE,   /* u32, reason bit value */
+
+       __IFLA_PROTO_DOWN_REASON_CNT,
+       IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1
+};
+
 /* backwards compatibility for userspace */
 #define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
@@ -599,7 +609,6 @@ enum {
        IFLA_BAREUDP_ETHERTYPE,
        IFLA_BAREUDP_SRCPORT_MIN,
        IFLA_BAREUDP_MULTIPROTO_MODE,
-       IFLA_BAREUDP_RX_COLLECT_METADATA,
        __IFLA_BAREUDP_MAX
 };
 
@@ -906,7 +915,14 @@ enum {
 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
 
 
-/* HSR section */
+/* HSR/PRP section, both uses same interface */
+
+/* Different redundancy protocols for hsr device */
+enum {
+       HSR_PROTOCOL_HSR,
+       HSR_PROTOCOL_PRP,
+       HSR_PROTOCOL_MAX,
+};
 
 enum {
        IFLA_HSR_UNSPEC,
@@ -916,6 +932,9 @@ enum {
        IFLA_HSR_SUPERVISION_ADDR,      /* Supervision frame multicast addr */
        IFLA_HSR_SEQ_NR,
        IFLA_HSR_VERSION,               /* HSR version */
+       IFLA_HSR_PROTOCOL,              /* Indicate different protocol than
+                                        * HSR. For example PRP.
+                                        */
        __IFLA_HSR_MAX,
 };
 
index ca59dc7612121ba265af35a4f5cf13271ef7c103..0f68bcff7dfe0d35198f4261d5d895dd5aafc746 100644 (file)
@@ -123,6 +123,7 @@ struct in_addr {
 #define IP_CHECKSUM    23
 #define IP_BIND_ADDRESS_NO_PORT        24
 #define IP_RECVFRAGSIZE        25
+#define IP_RECVERR_RFC4884     26
 
 /* IP_MTU_DISCOVER values */
 #define IP_PMTUDISC_DONT               0       /* Never send DF frames */
index d016ac9f832ece9a3dba2b01deec0a54c1031c1d..7e3a58e6040f28156d4818d60c08000999c2d236 100644 (file)
@@ -179,6 +179,7 @@ struct in6_flowlabel_req {
 #define IPV6_LEAVE_ANYCAST     28
 #define IPV6_MULTICAST_ALL     29
 #define IPV6_ROUTER_ALERT_ISOLATE      30
+#define IPV6_RECVERR_RFC4884   31
 
 /* IPV6_MTU_DISCOVER values */
 #define IPV6_PMTUDISC_DONT             0
index 7576209d96f9f6a8e8977d69a6a0a72a4040b58b..ee95f42fb0ecfab10c641c7b4401ea14152ada32 100644 (file)
@@ -578,6 +578,9 @@ enum {
 
        TCA_FLOWER_KEY_MPLS_OPTS,
 
+       TCA_FLOWER_KEY_HASH,            /* u32 */
+       TCA_FLOWER_KEY_HASH_MASK,       /* u32 */
+
        __TCA_FLOWER_MAX,
 };
 
index 7d91f4debc483f28632b9070be231331ffc51ed6..cee9f8e6fce31589acb03529a5c5fce9ed8676f7 100644 (file)
@@ -287,6 +287,7 @@ enum
        LINUX_MIB_TCPFASTOPENPASSIVEALTKEY,     /* TCPFastOpenPassiveAltKey */
        LINUX_MIB_TCPTIMEOUTREHASH,             /* TCPTimeoutRehash */
        LINUX_MIB_TCPDUPLICATEDATAREHASH,       /* TCPDuplicateDataRehash */
+       LINUX_MIB_TCPDSACKRECVSEGS,             /* TCPDSACKRecvSegs */
        __LINUX_MIB_MAX
 };
 
index f4e1003ba207ca11b86f0dc993a1e930797f2690..ee670e8848a4b3dd23e13efd0ed8117bf8453eb5 100644 (file)
@@ -313,6 +313,7 @@ enum {
        TCP_NLA_SRTT,           /* smoothed RTT in usecs */
        TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */
        TCP_NLA_BYTES_NOTSENT,  /* Bytes in write queue not yet sent */
+       TCP_NLA_EDT,            /* Earliest departure time (CLOCK_MONOTONIC) */
 };
 
 /* for TCP_MD5SIG socket option */
index 50450f3f075180d57de1b6aba43cfd124ab83d56..eec67a2be4363bbd21d2e2b4432ab35cf3a11d72 100644 (file)
@@ -387,6 +387,7 @@ struct xfrm_usersa_info {
 };
 
 #define XFRM_SA_XFLAG_DONT_ENCAP_DSCP  1
+#define XFRM_SA_XFLAG_OSEQ_MAY_WRAP    2
 
 struct xfrm_usersa_id {
        xfrm_address_t                  daddr;