Merge branch 'iproute2-master' into next

Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
David Ahern 2019-05-20 14:34:26 -07:00
commit 2cc9b5f4fa
6 changed files with 167 additions and 82 deletions

View File

@ -4,5 +4,19 @@
# and/or not always written the same way, making contributions from the # and/or not always written the same way, making contributions from the
# same person appearing not to be so or badly displayed. # same person appearing not to be so or badly displayed.
# #
# Format
# Full name <goodaddress> <badaddress>
Steve Wise <larrystevenwise@gmail.com> <swise@opengridcomputing.com> Steve Wise <larrystevenwise@gmail.com> <swise@opengridcomputing.com>
Steve Wise <larrystevenwise@gmail.com> <swise@chelsio.com> Steve Wise <larrystevenwise@gmail.com> <swise@chelsio.com>
Stephen Hemminger <stephen@networkplumber.org> <sthemmin@microsoft.com>
Stephen Hemminger <stephen@networkplumber.org> <shemming@brocade.com>
Stephen Hemminger <stephen@networkplumber.org> <stephen.hemminger@vyatta.com>
Stephen Hemminger <stephen@networkplumber.org> <shemminger@vyatta.com>
Stephen Hemminger <stephen@networkplumber.org> <shemminger>
Stephen Hemminger <stephen@networkplumber.org> <shemminger@linux-foundation.org>
Stephen Hemminger <stephen@networkplumber.org> <shemminger@osdl.org>
Stephen Hemminger <stephen@networkplumber.org> <osdl.org!shemminger>
Stephen Hemminger <stephen@networkplumber.org> <osdl.net!shemminger>
David Ahern <dsahern@gmail.com> <dsa@cumulusnetworks.com>

View File

@ -1 +1 @@
static const char SNAPSHOT[] = "190319"; static const char SNAPSHOT[] = "190510";

View File

@ -629,7 +629,7 @@ union bpf_attr {
* **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\
* **->swhash** and *skb*\ **->l4hash** to 0). * **->swhash** and *skb*\ **->l4hash** to 0).
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -654,7 +654,7 @@ union bpf_attr {
* flexibility and can handle sizes larger than 2 or 4 for the * flexibility and can handle sizes larger than 2 or 4 for the
* checksum to update. * checksum to update.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -686,7 +686,7 @@ union bpf_attr {
* flexibility and can handle sizes larger than 2 or 4 for the * flexibility and can handle sizes larger than 2 or 4 for the
* checksum to update. * checksum to update.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -741,7 +741,7 @@ union bpf_attr {
* efficient, but it is handled through an action code where the * efficient, but it is handled through an action code where the
* redirection happens only after the eBPF program has returned. * redirection happens only after the eBPF program has returned.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -806,7 +806,7 @@ union bpf_attr {
* **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to
* be **ETH_P_8021Q**. * be **ETH_P_8021Q**.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -818,7 +818,7 @@ union bpf_attr {
* Description * Description
* Pop a VLAN header from the packet associated to *skb*. * Pop a VLAN header from the packet associated to *skb*.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1168,7 +1168,7 @@ union bpf_attr {
* All values for *flags* are reserved for future usage, and must * All values for *flags* are reserved for future usage, and must
* be left at zero. * be left at zero.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1281,7 +1281,7 @@ union bpf_attr {
* implicitly linearizes, unclones and drops offloads from the * implicitly linearizes, unclones and drops offloads from the
* *skb*. * *skb*.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1317,7 +1317,7 @@ union bpf_attr {
* **bpf_skb_pull_data()** to effectively unclone the *skb* from * **bpf_skb_pull_data()** to effectively unclone the *skb* from
* the very beginning in case it is indeed cloned. * the very beginning in case it is indeed cloned.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1369,7 +1369,7 @@ union bpf_attr {
* All values for *flags* are reserved for future usage, and must * All values for *flags* are reserved for future usage, and must
* be left at zero. * be left at zero.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1384,7 +1384,7 @@ union bpf_attr {
* can be used to prepare the packet for pushing or popping * can be used to prepare the packet for pushing or popping
* headers. * headers.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1518,20 +1518,20 @@ union bpf_attr {
* * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size. * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size.
* Adjusting mss in this way is not allowed for datagrams. * Adjusting mss in this way is not allowed for datagrams.
* *
* * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 **: * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4**,
* * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 **: * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6**:
* Any new space is reserved to hold a tunnel header. * Any new space is reserved to hold a tunnel header.
* Configure skb offsets and other fields accordingly. * Configure skb offsets and other fields accordingly.
* *
* * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE **: * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE**,
* * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP **: * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP**:
* Use with ENCAP_L3 flags to further specify the tunnel type. * Use with ENCAP_L3 flags to further specify the tunnel type.
* *
* * **BPF_F_ADJ_ROOM_ENCAP_L2(len) **: * * **BPF_F_ADJ_ROOM_ENCAP_L2**\ (*len*):
* Use with ENCAP_L3/L4 flags to further specify the tunnel * Use with ENCAP_L3/L4 flags to further specify the tunnel
* type; **len** is the length of the inner MAC header. * type; *len* is the length of the inner MAC header.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1610,7 +1610,7 @@ union bpf_attr {
* more flexibility as the user is free to store whatever meta * more flexibility as the user is free to store whatever meta
* data they need. * data they need.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1852,7 +1852,7 @@ union bpf_attr {
* copied if necessary (i.e. if data was not linear and if start * copied if necessary (i.e. if data was not linear and if start
* and end pointers do not point to the same chunk). * and end pointers do not point to the same chunk).
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -1886,7 +1886,7 @@ union bpf_attr {
* only possible to shrink the packet as of this writing, * only possible to shrink the packet as of this writing,
* therefore *delta* must be a negative integer. * therefore *delta* must be a negative integer.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -2061,18 +2061,18 @@ union bpf_attr {
* **BPF_LWT_ENCAP_IP** * **BPF_LWT_ENCAP_IP**
* IP encapsulation (GRE/GUE/IPIP/etc). The outer header * IP encapsulation (GRE/GUE/IPIP/etc). The outer header
* must be IPv4 or IPv6, followed by zero or more * must be IPv4 or IPv6, followed by zero or more
* additional headers, up to LWT_BPF_MAX_HEADROOM total * additional headers, up to **LWT_BPF_MAX_HEADROOM**
* bytes in all prepended headers. Please note that * total bytes in all prepended headers. Please note that
* if skb_is_gso(skb) is true, no more than two headers * if **skb_is_gso**\ (*skb*) is true, no more than two
* can be prepended, and the inner header, if present, * headers can be prepended, and the inner header, if
* should be either GRE or UDP/GUE. * present, should be either GRE or UDP/GUE.
* *
* BPF_LWT_ENCAP_SEG6*** types can be called by bpf programs of * **BPF_LWT_ENCAP_SEG6**\ \* types can be called by BPF programs
* type BPF_PROG_TYPE_LWT_IN; BPF_LWT_ENCAP_IP type can be called * of type **BPF_PROG_TYPE_LWT_IN**; **BPF_LWT_ENCAP_IP** type can
* by bpf programs of types BPF_PROG_TYPE_LWT_IN and * be called by bpf programs of types **BPF_PROG_TYPE_LWT_IN** and
* BPF_PROG_TYPE_LWT_XMIT. * **BPF_PROG_TYPE_LWT_XMIT**.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -2087,7 +2087,7 @@ union bpf_attr {
* inside the outermost IPv6 Segment Routing Header can be * inside the outermost IPv6 Segment Routing Header can be
* modified through this helper. * modified through this helper.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -2103,7 +2103,7 @@ union bpf_attr {
* after the segments are accepted. *delta* can be as well * after the segments are accepted. *delta* can be as well
* positive (growing) as negative (shrinking). * positive (growing) as negative (shrinking).
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -2126,13 +2126,13 @@ union bpf_attr {
* Type of *param*: **int**. * Type of *param*: **int**.
* **SEG6_LOCAL_ACTION_END_B6** * **SEG6_LOCAL_ACTION_END_B6**
* End.B6 action: Endpoint bound to an SRv6 policy. * End.B6 action: Endpoint bound to an SRv6 policy.
* Type of param: **struct ipv6_sr_hdr**. * Type of *param*: **struct ipv6_sr_hdr**.
* **SEG6_LOCAL_ACTION_END_B6_ENCAP** * **SEG6_LOCAL_ACTION_END_B6_ENCAP**
* End.B6.Encap action: Endpoint bound to an SRv6 * End.B6.Encap action: Endpoint bound to an SRv6
* encapsulation policy. * encapsulation policy.
* Type of param: **struct ipv6_sr_hdr**. * Type of *param*: **struct ipv6_sr_hdr**.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
* previously done by the verifier are invalidated and must be * previously done by the verifier are invalidated and must be
* performed again, if the helper is used in combination with * performed again, if the helper is used in combination with
@ -2285,7 +2285,8 @@ union bpf_attr {
* Return * Return
* Pointer to **struct bpf_sock**, or **NULL** in case of failure. * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
* For sockets with reuseport option, the **struct bpf_sock** * For sockets with reuseport option, the **struct bpf_sock**
* result is from **reuse->socks**\ [] using the hash of the tuple. * result is from *reuse*\ **->socks**\ [] using the hash of the
* tuple.
* *
* struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags) * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
* Description * Description
@ -2321,7 +2322,8 @@ union bpf_attr {
* Return * Return
* Pointer to **struct bpf_sock**, or **NULL** in case of failure. * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
* For sockets with reuseport option, the **struct bpf_sock** * For sockets with reuseport option, the **struct bpf_sock**
* result is from **reuse->socks**\ [] using the hash of the tuple. * result is from *reuse*\ **->socks**\ [] using the hash of the
* tuple.
* *
* int bpf_sk_release(struct bpf_sock *sock) * int bpf_sk_release(struct bpf_sock *sock)
* Description * Description
@ -2490,31 +2492,34 @@ union bpf_attr {
* network namespace *netns*. The return value must be checked, * network namespace *netns*. The return value must be checked,
* and if non-**NULL**, released via **bpf_sk_release**\ (). * and if non-**NULL**, released via **bpf_sk_release**\ ().
* *
* This function is identical to bpf_sk_lookup_tcp, except that it * This function is identical to **bpf_sk_lookup_tcp**\ (), except
* also returns timewait or request sockets. Use bpf_sk_fullsock * that it also returns timewait or request sockets. Use
* or bpf_tcp_socket to access the full structure. * **bpf_sk_fullsock**\ () or **bpf_tcp_sock**\ () to access the
* full structure.
* *
* This helper is available only if the kernel was compiled with * This helper is available only if the kernel was compiled with
* **CONFIG_NET** configuration option. * **CONFIG_NET** configuration option.
* Return * Return
* Pointer to **struct bpf_sock**, or **NULL** in case of failure. * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
* For sockets with reuseport option, the **struct bpf_sock** * For sockets with reuseport option, the **struct bpf_sock**
* result is from **reuse->socks**\ [] using the hash of the tuple. * result is from *reuse*\ **->socks**\ [] using the hash of the
* tuple.
* *
* int bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len) * int bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
* Description * Description
* Check whether iph and th contain a valid SYN cookie ACK for * Check whether *iph* and *th* contain a valid SYN cookie ACK for
* the listening socket in sk. * the listening socket in *sk*.
* *
* iph points to the start of the IPv4 or IPv6 header, while * *iph* points to the start of the IPv4 or IPv6 header, while
* iph_len contains sizeof(struct iphdr) or sizeof(struct ip6hdr). * *iph_len* contains **sizeof**\ (**struct iphdr**) or
* **sizeof**\ (**struct ip6hdr**).
* *
* th points to the start of the TCP header, while th_len contains * *th* points to the start of the TCP header, while *th_len*
* sizeof(struct tcphdr). * contains **sizeof**\ (**struct tcphdr**).
* *
* Return * Return
* 0 if iph and th are a valid SYN cookie ACK, or a negative error * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
* otherwise. * error otherwise.
* *
* int bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags) * int bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags)
* Description * Description
@ -2592,17 +2597,17 @@ union bpf_attr {
* and save the result in *res*. * and save the result in *res*.
* *
* The string may begin with an arbitrary amount of white space * The string may begin with an arbitrary amount of white space
* (as determined by isspace(3)) followed by a single optional '-' * (as determined by **isspace**\ (3)) followed by a single
* sign. * optional '**-**' sign.
* *
* Five least significant bits of *flags* encode base, other bits * Five least significant bits of *flags* encode base, other bits
* are currently unused. * are currently unused.
* *
* Base must be either 8, 10, 16 or 0 to detect it automatically * Base must be either 8, 10, 16 or 0 to detect it automatically
* similar to user space strtol(3). * similar to user space **strtol**\ (3).
* Return * Return
* Number of characters consumed on success. Must be positive but * Number of characters consumed on success. Must be positive but
* no more than buf_len. * no more than *buf_len*.
* *
* **-EINVAL** if no valid digits were found or unsupported base * **-EINVAL** if no valid digits were found or unsupported base
* was provided. * was provided.
@ -2616,16 +2621,16 @@ union bpf_attr {
* given base and save the result in *res*. * given base and save the result in *res*.
* *
* The string may begin with an arbitrary amount of white space * The string may begin with an arbitrary amount of white space
* (as determined by isspace(3)). * (as determined by **isspace**\ (3)).
* *
* Five least significant bits of *flags* encode base, other bits * Five least significant bits of *flags* encode base, other bits
* are currently unused. * are currently unused.
* *
* Base must be either 8, 10, 16 or 0 to detect it automatically * Base must be either 8, 10, 16 or 0 to detect it automatically
* similar to user space strtoul(3). * similar to user space **strtoul**\ (3).
* Return * Return
* Number of characters consumed on success. Must be positive but * Number of characters consumed on success. Must be positive but
* no more than buf_len. * no more than *buf_len*.
* *
* **-EINVAL** if no valid digits were found or unsupported base * **-EINVAL** if no valid digits were found or unsupported base
* was provided. * was provided.
@ -2634,26 +2639,26 @@ union bpf_attr {
* *
* void *bpf_sk_storage_get(struct bpf_map *map, struct bpf_sock *sk, void *value, u64 flags) * void *bpf_sk_storage_get(struct bpf_map *map, struct bpf_sock *sk, void *value, u64 flags)
* Description * Description
* Get a bpf-local-storage from a sk. * Get a bpf-local-storage from a *sk*.
* *
* Logically, it could be thought of getting the value from * Logically, it could be thought of getting the value from
* a *map* with *sk* as the **key**. From this * a *map* with *sk* as the **key**. From this
* perspective, the usage is not much different from * perspective, the usage is not much different from
* **bpf_map_lookup_elem(map, &sk)** except this * **bpf_map_lookup_elem**\ (*map*, **&**\ *sk*) except this
* helper enforces the key must be a **bpf_fullsock()** * helper enforces the key must be a full socket and the map must
* and the map must be a BPF_MAP_TYPE_SK_STORAGE also. * be a **BPF_MAP_TYPE_SK_STORAGE** also.
* *
* Underneath, the value is stored locally at *sk* instead of * Underneath, the value is stored locally at *sk* instead of
* the map. The *map* is used as the bpf-local-storage **type**. * the *map*. The *map* is used as the bpf-local-storage
* The bpf-local-storage **type** (i.e. the *map*) is searched * "type". The bpf-local-storage "type" (i.e. the *map*) is
* against all bpf-local-storages residing at sk. * searched against all bpf-local-storages residing at *sk*.
* *
* An optional *flags* (BPF_SK_STORAGE_GET_F_CREATE) can be * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be
* used such that a new bpf-local-storage will be * used such that a new bpf-local-storage will be
* created if one does not exist. *value* can be used * created if one does not exist. *value* can be used
* together with BPF_SK_STORAGE_GET_F_CREATE to specify * together with **BPF_SK_STORAGE_GET_F_CREATE** to specify
* the initial value of a bpf-local-storage. If *value* is * the initial value of a bpf-local-storage. If *value* is
* NULL, the new bpf-local-storage will be zero initialized. * **NULL**, the new bpf-local-storage will be zero initialized.
* Return * Return
* A bpf-local-storage pointer is returned on success. * A bpf-local-storage pointer is returned on success.
* *
@ -2662,7 +2667,7 @@ union bpf_attr {
* *
* int bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk) * int bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk)
* Description * Description
* Delete a bpf-local-storage from a sk. * Delete a bpf-local-storage from a *sk*.
* Return * Return
* 0 on success. * 0 on success.
* *

58
include/uapi/linux/net.h Normal file
View File

@ -0,0 +1,58 @@
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* NET An implementation of the SOCKET network access protocol.
* This is the master header file for the Linux NET layer,
* or, in plain English: the networking handling part of the
* kernel.
*
* Version: @(#)net.h 1.0.3 05/25/93
*
* Authors: Orest Zborowski, <obz@Kodak.COM>
* Ross Biro
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
*
* 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 _LINUX_NET_H
#define _LINUX_NET_H
#include <linux/socket.h>
#include <asm/socket.h>
#define NPROTO AF_MAX
#define SYS_SOCKET 1 /* sys_socket(2) */
#define SYS_BIND 2 /* sys_bind(2) */
#define SYS_CONNECT 3 /* sys_connect(2) */
#define SYS_LISTEN 4 /* sys_listen(2) */
#define SYS_ACCEPT 5 /* sys_accept(2) */
#define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */
#define SYS_GETPEERNAME 7 /* sys_getpeername(2) */
#define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */
#define SYS_SEND 9 /* sys_send(2) */
#define SYS_RECV 10 /* sys_recv(2) */
#define SYS_SENDTO 11 /* sys_sendto(2) */
#define SYS_RECVFROM 12 /* sys_recvfrom(2) */
#define SYS_SHUTDOWN 13 /* sys_shutdown(2) */
#define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */
#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
#define SYS_ACCEPT4 18 /* sys_accept4(2) */
#define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */
#define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */
typedef enum {
SS_FREE = 0, /* not allocated */
SS_UNCONNECTED, /* unconnected to any socket */
SS_CONNECTING, /* in process of connecting */
SS_CONNECTED, /* connected to socket */
SS_DISCONNECTING /* in process of disconnecting */
} socket_state;
#define __SO_ACCEPTCON (1 << 16) /* performed a listen */
#endif /* _LINUX_NET_H */

View File

@ -170,7 +170,8 @@ static const char *node_type_to_str(uint8_t node_type)
static const char * const node_type_str[] = { "unknown", "ca", static const char * const node_type_str[] = { "unknown", "ca",
"switch", "router", "switch", "router",
"rnic", "usnic", "rnic", "usnic",
"usnic_dp" }; "usnic_udp",
"unspecified" };
if (node_type < ARRAY_SIZE(node_type_str)) if (node_type < ARRAY_SIZE(node_type_str))
return node_type_str[node_type]; return node_type_str[node_type];
return "unknown"; return "unknown";

View File

@ -49,17 +49,6 @@ enum {
RDMA_NL_IWPM_NUM_OPS RDMA_NL_IWPM_NUM_OPS
}; };
struct rdma_cm_id_stats {
__u32 qp_num;
__u32 bound_dev_if;
__u32 port_space;
__s32 pid;
__u8 cm_state;
__u8 node_type;
__u8 port_num;
__u8 qp_type;
};
enum { enum {
IWPM_NLA_REG_PID_UNSPEC = 0, IWPM_NLA_REG_PID_UNSPEC = 0,
IWPM_NLA_REG_PID_SEQ, IWPM_NLA_REG_PID_SEQ,
@ -261,7 +250,10 @@ enum rdma_nldev_command {
RDMA_NLDEV_CMD_PORT_GET, /* can dump */ RDMA_NLDEV_CMD_PORT_GET, /* can dump */
/* 6 - 8 are free to use */ RDMA_NLDEV_CMD_SYS_GET,
RDMA_NLDEV_CMD_SYS_SET,
/* 8 is free to use */
RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */
@ -472,6 +464,21 @@ enum rdma_nldev_attr {
*/ */
RDMA_NLDEV_ATTR_LINK_TYPE, /* string */ RDMA_NLDEV_ATTR_LINK_TYPE, /* string */
/*
* net namespace mode for rdma subsystem:
* either shared or exclusive among multiple net namespaces.
*/
RDMA_NLDEV_SYS_ATTR_NETNS_MODE, /* u8 */
/*
* Device protocol, e.g. ib, iw, usnic, roce and opa
*/
RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */
/*
* File descriptor handle of the net namespace object
*/
RDMA_NLDEV_NET_NS_FD, /* u32 */
/* /*
* Always the end * Always the end
*/ */