Pull networking updates from David Miller: "Highlights: 1) Maintain the TCP retransmit queue using an rbtree, with 1GB windows at 100Gb this really has become necessary. From Eric Dumazet. 2) Multi-program support for cgroup+bpf, from Alexei Starovoitov. 3) Perform broadcast flooding in hardware in mv88e6xxx, from Andrew Lunn. 4) Add meter action support to openvswitch, from Andy Zhou. 5) Add a data meta pointer for BPF accessible packets, from Daniel Borkmann. 6) Namespace-ify almost all TCP sysctl knobs, from Eric Dumazet. 7) Turn on Broadcom Tags in b53 driver, from Florian Fainelli. 8) More work to move the RTNL mutex down, from Florian Westphal. 9) Add 'bpftool' utility, to help with bpf program introspection. From Jakub Kicinski. 10) Add new 'cpumap' type for XDP_REDIRECT action, from Jesper Dangaard Brouer. 11) Support 'blocks' of transformations in the packet scheduler which can span multiple network devices, from Jiri Pirko. 12) TC flower offload support in cxgb4, from Kumar Sanghvi. 13) Priority based stream scheduler for SCTP, from Marcelo Ricardo Leitner. 14) Thunderbolt networking driver, from Amir Levy and Mika Westerberg. 15) Add RED qdisc offloadability, and use it in mlxsw driver. From Nogah Frankel. 16) eBPF based device controller for cgroup v2, from Roman Gushchin. 17) Add some fundamental tracepoints for TCP, from Song Liu. 18) Remove garbage collection from ipv6 route layer, this is a significant accomplishment. From Wei Wang. 19) Add multicast route offload support to mlxsw, from Yotam Gigi" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2177 commits) tcp: highest_sack fix geneve: fix fill_info when link down bpf: fix lockdep splat net: cdc_ncm: GetNtbFormat endian fix openvswitch: meter: fix NULL pointer dereference in ovs_meter_cmd_reply_start netem: remove unnecessary 64 bit modulus netem: use 64 bit divide by rate tcp: Namespace-ify sysctl_tcp_default_congestion_control net: Protect iterations over net::fib_notifier_ops in fib_seq_sum() ipv6: set all.accept_dad to 0 by default uapi: fix linux/tls.h userspace compilation error usbnet: ipheth: prevent TX queue timeouts when device not ready vhost_net: conditionally enable tx polling uapi: fix linux/rxrpc.h userspace compilation errors net: stmmac: fix LPI transitioning for dwmac4 atm: horizon: Fix irq release error net-sysfs: trigger netlink notification on ifalias change via sysfs openvswitch: Using kfree_rcu() to simplify the code openvswitch: Make local function ovs_nsh_key_attr_size() static openvswitch: Fix return value check in ovs_meter_cmd_features() ...
Showing the changes to include/uapi (25 of 1617 files). Show all
Unified · Split
| @@ -24,20 +24,6 @@ · 23 unmodified lines | |||
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * enum batadv_tt_client_flags - TT client specific flags | 26 | * enum batadv_tt_client_flags - TT client specific flags |
| 27 | * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table | ||
| 28 | * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and the new | ||
| 29 | * update telling its new real location has not been received/sent yet | ||
| 30 | * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi interface. | ||
| 31 | * This information is used by the "AP Isolation" feature | ||
| 32 | * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This | ||
| 33 | * information is used by the Extended Isolation feature | ||
| 34 | * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from the table | ||
| 35 | * @BATADV_TT_CLIENT_NEW: this client has been added to the local table but has | ||
| 36 | * not been announced yet | ||
| 37 | * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it is kept | ||
| 38 | * in the table for one more originator interval for consistency purposes | ||
| 39 | * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be part of | ||
| 40 | * the network but no nnode has already announced it | ||
| 41 | * | 27 | * |
| 42 | * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire. | 28 | * Bits from 0 to 7 are called _remote flags_ because they are sent on the wire. |
| 43 | * Bits from 8 to 15 are called _local flags_ because they are used for local | 29 | * Bits from 8 to 15 are called _local flags_ because they are used for local |
| @@ -48,160 +34,385 @@ · 4 unmodified lines | |||
| 48 | * in the TT CRC computation. | 34 | * in the TT CRC computation. |
| 49 | */ | 35 | */ |
| 50 | enum batadv_tt_client_flags { | 36 | enum batadv_tt_client_flags { |
| 37 | /** | ||
| 38 | * @BATADV_TT_CLIENT_DEL: the client has to be deleted from the table | ||
| 39 | */ | ||
| 51 | BATADV_TT_CLIENT_DEL = (1 << 0), | 40 | BATADV_TT_CLIENT_DEL = (1 << 0), |
| 41 | |||
| 42 | /** | ||
| 43 | * @BATADV_TT_CLIENT_ROAM: the client roamed to/from another node and | ||
| 44 | * the new update telling its new real location has not been | ||
| 45 | * received/sent yet | ||
| 46 | */ | ||
| 52 | BATADV_TT_CLIENT_ROAM = (1 << 1), | 47 | BATADV_TT_CLIENT_ROAM = (1 << 1), |
| 48 | |||
| 49 | /** | ||
| 50 | * @BATADV_TT_CLIENT_WIFI: this client is connected through a wifi | ||
| 51 | * interface. This information is used by the "AP Isolation" feature | ||
| 52 | */ | ||
| 53 | BATADV_TT_CLIENT_WIFI = (1 << 4), | 53 | BATADV_TT_CLIENT_WIFI = (1 << 4), |
| 54 | |||
| 55 | /** | ||
| 56 | * @BATADV_TT_CLIENT_ISOLA: this client is considered "isolated". This | ||
| 57 | * information is used by the Extended Isolation feature | ||
| 58 | */ | ||
| 54 | BATADV_TT_CLIENT_ISOLA = (1 << 5), | 59 | BATADV_TT_CLIENT_ISOLA = (1 << 5), |
| 60 | |||
| 61 | /** | ||
| 62 | * @BATADV_TT_CLIENT_NOPURGE: this client should never be removed from | ||
| 63 | * the table | ||
| 64 | */ | ||
| 55 | BATADV_TT_CLIENT_NOPURGE = (1 << 8), | 65 | BATADV_TT_CLIENT_NOPURGE = (1 << 8), |
| 66 | |||
| 67 | /** | ||
| 68 | * @BATADV_TT_CLIENT_NEW: this client has been added to the local table | ||
| 69 | * but has not been announced yet | ||
| 70 | */ | ||
| 56 | BATADV_TT_CLIENT_NEW = (1 << 9), | 71 | BATADV_TT_CLIENT_NEW = (1 << 9), |
| 72 | |||
| 73 | /** | ||
| 74 | * @BATADV_TT_CLIENT_PENDING: this client is marked for removal but it | ||
| 75 | * is kept in the table for one more originator interval for consistency | ||
| 76 | * purposes | ||
| 77 | */ | ||
| 57 | BATADV_TT_CLIENT_PENDING = (1 << 10), | 78 | BATADV_TT_CLIENT_PENDING = (1 << 10), |
| 79 | |||
| 80 | /** | ||
| 81 | * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be | ||
| 82 | * part of the network but no nnode has already announced it | ||
| 83 | */ | ||
| 58 | BATADV_TT_CLIENT_TEMP = (1 << 11), | 84 | BATADV_TT_CLIENT_TEMP = (1 << 11), |
| 59 | }; | 85 | }; |
| 60 | 86 | ||
| 61 | /** | 87 | /** |
| 62 | * enum batadv_nl_attrs - batman-adv netlink attributes | 88 | * enum batadv_nl_attrs - batman-adv netlink attributes |
| 63 | * | ||
| 64 | * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors | ||
| 65 | * @BATADV_ATTR_VERSION: batman-adv version string | ||
| 66 | * @BATADV_ATTR_ALGO_NAME: name of routing algorithm | ||
| 67 | * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface | ||
| 68 | * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface | ||
| 69 | * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface | ||
| 70 | * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface | ||
| 71 | * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface | ||
| 72 | * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv interface | ||
| 73 | * @BATADV_ATTR_ORIG_ADDRESS: originator mac address | ||
| 74 | * @BATADV_ATTR_TPMETER_RESULT: result of run (see batadv_tp_meter_status) | ||
| 75 | * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took | ||
| 76 | * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run | ||
| 77 | * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session | ||
| 78 | * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment | ||
| 79 | * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active | ||
| 80 | * @BATADV_ATTR_TT_ADDRESS: Client MAC address | ||
| 81 | * @BATADV_ATTR_TT_TTVN: Translation table version | ||
| 82 | * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version | ||
| 83 | * @BATADV_ATTR_TT_CRC32: CRC32 over translation table | ||
| 84 | * @BATADV_ATTR_TT_VID: VLAN ID | ||
| 85 | * @BATADV_ATTR_TT_FLAGS: Translation table client flags | ||
| 86 | * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best | ||
| 87 | * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen | ||
| 88 | * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address | ||
| 89 | * @BATADV_ATTR_TQ: TQ to neighbour | ||
| 90 | * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour | ||
| 91 | * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth | ||
| 92 | * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth | ||
| 93 | * @BATADV_ATTR_ROUTER: Gateway router MAC address | ||
| 94 | * @BATADV_ATTR_BLA_OWN: Flag indicating own originator | ||
| 95 | * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address | ||
| 96 | * @BATADV_ATTR_BLA_VID: BLA VLAN ID | ||
| 97 | * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address | ||
| 98 | * @BATADV_ATTR_BLA_CRC: BLA CRC | ||
| 99 | * @__BATADV_ATTR_AFTER_LAST: internal use | ||
| 100 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available | ||
| 101 | * @BATADV_ATTR_MAX: highest attribute number currently defined | ||
| 102 | */ | 89 | */ |
| 103 | enum batadv_nl_attrs { | 90 | enum batadv_nl_attrs { |
| 91 | /** | ||
| 92 | * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors | ||
| 93 | */ | ||
| 104 | BATADV_ATTR_UNSPEC, | 94 | BATADV_ATTR_UNSPEC, |
| 95 | |||
| 96 | /** | ||
| 97 | * @BATADV_ATTR_VERSION: batman-adv version string | ||
| 98 | */ | ||
| 105 | BATADV_ATTR_VERSION, | 99 | BATADV_ATTR_VERSION, |
| 100 | |||
| 101 | /** | ||
| 102 | * @BATADV_ATTR_ALGO_NAME: name of routing algorithm | ||
| 103 | */ | ||
| 106 | BATADV_ATTR_ALGO_NAME, | 104 | BATADV_ATTR_ALGO_NAME, |
| 105 | |||
| 106 | /** | ||
| 107 | * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface | ||
| 108 | */ | ||
| 107 | BATADV_ATTR_MESH_IFINDEX, | 109 | BATADV_ATTR_MESH_IFINDEX, |
| 110 | |||
| 111 | /** | ||
| 112 | * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface | ||
| 113 | */ | ||
| 108 | BATADV_ATTR_MESH_IFNAME, | 114 | BATADV_ATTR_MESH_IFNAME, |
| 115 | |||
| 116 | /** | ||
| 117 | * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface | ||
| 118 | */ | ||
| 109 | BATADV_ATTR_MESH_ADDRESS, | 119 | BATADV_ATTR_MESH_ADDRESS, |
| 120 | |||
| 121 | /** | ||
| 122 | * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface | ||
| 123 | */ | ||
| 110 | BATADV_ATTR_HARD_IFINDEX, | 124 | BATADV_ATTR_HARD_IFINDEX, |
| 125 | |||
| 126 | /** | ||
| 127 | * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface | ||
| 128 | */ | ||
| 111 | BATADV_ATTR_HARD_IFNAME, | 129 | BATADV_ATTR_HARD_IFNAME, |
| 130 | |||
| 131 | /** | ||
| 132 | * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv | ||
| 133 | * interface | ||
| 134 | */ | ||
| 112 | BATADV_ATTR_HARD_ADDRESS, | 135 | BATADV_ATTR_HARD_ADDRESS, |
| 136 | |||
| 137 | /** | ||
| 138 | * @BATADV_ATTR_ORIG_ADDRESS: originator mac address | ||
| 139 | */ | ||
| 113 | BATADV_ATTR_ORIG_ADDRESS, | 140 | BATADV_ATTR_ORIG_ADDRESS, |
| 141 | |||
| 142 | /** | ||
| 143 | * @BATADV_ATTR_TPMETER_RESULT: result of run (see | ||
| 144 | * batadv_tp_meter_status) | ||
| 145 | */ | ||
| 114 | BATADV_ATTR_TPMETER_RESULT, | 146 | BATADV_ATTR_TPMETER_RESULT, |
| 147 | |||
| 148 | /** | ||
| 149 | * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took | ||
| 150 | */ | ||
| 115 | BATADV_ATTR_TPMETER_TEST_TIME, | 151 | BATADV_ATTR_TPMETER_TEST_TIME, |
| 152 | |||
| 153 | /** | ||
| 154 | * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run | ||
| 155 | */ | ||
| 116 | BATADV_ATTR_TPMETER_BYTES, | 156 | BATADV_ATTR_TPMETER_BYTES, |
| 157 | |||
| 158 | /** | ||
| 159 | * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session | ||
| 160 | */ | ||
| 117 | BATADV_ATTR_TPMETER_COOKIE, | 161 | BATADV_ATTR_TPMETER_COOKIE, |
| 162 | |||
| 163 | /** | ||
| 164 | * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment | ||
| 165 | */ | ||
| 118 | BATADV_ATTR_PAD, | 166 | BATADV_ATTR_PAD, |
| 167 | |||
| 168 | /** | ||
| 169 | * @BATADV_ATTR_ACTIVE: Flag indicating if the hard interface is active | ||
| 170 | */ | ||
| 119 | BATADV_ATTR_ACTIVE, | 171 | BATADV_ATTR_ACTIVE, |
| 172 | |||
| 173 | /** | ||
| 174 | * @BATADV_ATTR_TT_ADDRESS: Client MAC address | ||
| 175 | */ | ||
| 120 | BATADV_ATTR_TT_ADDRESS, | 176 | BATADV_ATTR_TT_ADDRESS, |
| 177 | |||
| 178 | /** | ||
| 179 | * @BATADV_ATTR_TT_TTVN: Translation table version | ||
| 180 | */ | ||
| 121 | BATADV_ATTR_TT_TTVN, | 181 | BATADV_ATTR_TT_TTVN, |
| 182 | |||
| 183 | /** | ||
| 184 | * @BATADV_ATTR_TT_LAST_TTVN: Previous translation table version | ||
| 185 | */ | ||
| 122 | BATADV_ATTR_TT_LAST_TTVN, | 186 | BATADV_ATTR_TT_LAST_TTVN, |
| 187 | |||
| 188 | /** | ||
| 189 | * @BATADV_ATTR_TT_CRC32: CRC32 over translation table | ||
| 190 | */ | ||
| 123 | BATADV_ATTR_TT_CRC32, | 191 | BATADV_ATTR_TT_CRC32, |
| 192 | |||
| 193 | /** | ||
| 194 | * @BATADV_ATTR_TT_VID: VLAN ID | ||
| 195 | */ | ||
| 124 | BATADV_ATTR_TT_VID, | 196 | BATADV_ATTR_TT_VID, |
| 197 | |||
| 198 | /** | ||
| 199 | * @BATADV_ATTR_TT_FLAGS: Translation table client flags | ||
| 200 | */ | ||
| 125 | BATADV_ATTR_TT_FLAGS, | 201 | BATADV_ATTR_TT_FLAGS, |
| 202 | |||
| 203 | /** | ||
| 204 | * @BATADV_ATTR_FLAG_BEST: Flags indicating entry is the best | ||
| 205 | */ | ||
| 126 | BATADV_ATTR_FLAG_BEST, | 206 | BATADV_ATTR_FLAG_BEST, |
| 207 | |||
| 208 | /** | ||
| 209 | * @BATADV_ATTR_LAST_SEEN_MSECS: Time in milliseconds since last seen | ||
| 210 | */ | ||
| 127 | BATADV_ATTR_LAST_SEEN_MSECS, | 211 | BATADV_ATTR_LAST_SEEN_MSECS, |
| 212 | |||
| 213 | /** | ||
| 214 | * @BATADV_ATTR_NEIGH_ADDRESS: Neighbour MAC address | ||
| 215 | */ | ||
| 128 | BATADV_ATTR_NEIGH_ADDRESS, | 216 | BATADV_ATTR_NEIGH_ADDRESS, |
| 217 | |||
| 218 | /** | ||
| 219 | * @BATADV_ATTR_TQ: TQ to neighbour | ||
| 220 | */ | ||
| 129 | BATADV_ATTR_TQ, | 221 | BATADV_ATTR_TQ, |
| 222 | |||
| 223 | /** | ||
| 224 | * @BATADV_ATTR_THROUGHPUT: Estimated throughput to Neighbour | ||
| 225 | */ | ||
| 130 | BATADV_ATTR_THROUGHPUT, | 226 | BATADV_ATTR_THROUGHPUT, |
| 227 | |||
| 228 | /** | ||
| 229 | * @BATADV_ATTR_BANDWIDTH_UP: Reported uplink bandwidth | ||
| 230 | */ | ||
| 131 | BATADV_ATTR_BANDWIDTH_UP, | 231 | BATADV_ATTR_BANDWIDTH_UP, |
| 232 | |||
| 233 | /** | ||
| 234 | * @BATADV_ATTR_BANDWIDTH_DOWN: Reported downlink bandwidth | ||
| 235 | */ | ||
| 132 | BATADV_ATTR_BANDWIDTH_DOWN, | 236 | BATADV_ATTR_BANDWIDTH_DOWN, |
| 237 | |||
| 238 | /** | ||
| 239 | * @BATADV_ATTR_ROUTER: Gateway router MAC address | ||
| 240 | */ | ||
| 133 | BATADV_ATTR_ROUTER, | 241 | BATADV_ATTR_ROUTER, |
| 242 | |||
| 243 | /** | ||
| 244 | * @BATADV_ATTR_BLA_OWN: Flag indicating own originator | ||
| 245 | */ | ||
| 134 | BATADV_ATTR_BLA_OWN, | 246 | BATADV_ATTR_BLA_OWN, |
| 247 | |||
| 248 | /** | ||
| 249 | * @BATADV_ATTR_BLA_ADDRESS: Bridge loop avoidance claim MAC address | ||
| 250 | */ | ||
| 135 | BATADV_ATTR_BLA_ADDRESS, | 251 | BATADV_ATTR_BLA_ADDRESS, |
| 252 | |||
| 253 | /** | ||
| 254 | * @BATADV_ATTR_BLA_VID: BLA VLAN ID | ||
| 255 | */ | ||
| 136 | BATADV_ATTR_BLA_VID, | 256 | BATADV_ATTR_BLA_VID, |
| 257 | |||
| 258 | /** | ||
| 259 | * @BATADV_ATTR_BLA_BACKBONE: BLA gateway originator MAC address | ||
| 260 | */ | ||
| 137 | BATADV_ATTR_BLA_BACKBONE, | 261 | BATADV_ATTR_BLA_BACKBONE, |
| 262 | |||
| 263 | /** | ||
| 264 | * @BATADV_ATTR_BLA_CRC: BLA CRC | ||
| 265 | */ | ||
| 138 | BATADV_ATTR_BLA_CRC, | 266 | BATADV_ATTR_BLA_CRC, |
| 267 | |||
| 139 | /* add attributes above here, update the policy in netlink.c */ | 268 | /* add attributes above here, update the policy in netlink.c */ |
| 269 | |||
| 270 | /** | ||
| 271 | * @__BATADV_ATTR_AFTER_LAST: internal use | ||
| 272 | */ | ||
| 140 | __BATADV_ATTR_AFTER_LAST, | 273 | __BATADV_ATTR_AFTER_LAST, |
| 274 | |||
| 275 | /** | ||
| 276 | * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available | ||
| 277 | */ | ||
| 141 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, | 278 | NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST, |
| 279 | |||
| 280 | /** | ||
| 281 | * @BATADV_ATTR_MAX: highest attribute number currently defined | ||
| 282 | */ | ||
| 142 | BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1 | 283 | BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1 |
| 143 | }; | 284 | }; |
| 144 | 285 | ||
| 145 | /** | 286 | /** |
| 146 | * enum batadv_nl_commands - supported batman-adv netlink commands | 287 | * enum batadv_nl_commands - supported batman-adv netlink commands |
| 147 | * | ||
| 148 | * @BATADV_CMD_UNSPEC: unspecified command to catch errors | ||
| 149 | * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device | ||
| 150 | * @BATADV_CMD_TP_METER: Start a tp meter session | ||
| 151 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session | ||
| 152 | * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms. | ||
| 153 | * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces | ||
| 154 | * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations | ||
| 155 | * @BATADV_CMD_GET_TRANSTABLE_GLOBAL Query list of global translations | ||
| 156 | * @BATADV_CMD_GET_ORIGINATORS: Query list of originators | ||
| 157 | * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours | ||
| 158 | * @BATADV_CMD_GET_GATEWAYS: Query list of gateways | ||
| 159 | * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims | ||
| 160 | * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance backbones | ||
| 161 | * @__BATADV_CMD_AFTER_LAST: internal use | ||
| 162 | * @BATADV_CMD_MAX: highest used command number | ||
| 163 | */ | 288 | */ |
| 164 | enum batadv_nl_commands { | 289 | enum batadv_nl_commands { |
| 290 | /** | ||
| 291 | * @BATADV_CMD_UNSPEC: unspecified command to catch errors | ||
| 292 | */ | ||
| 165 | BATADV_CMD_UNSPEC, | 293 | BATADV_CMD_UNSPEC, |
| 294 | |||
| 295 | /** | ||
| 296 | * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv | ||
| 297 | * device | ||
| 298 | */ | ||
| 166 | BATADV_CMD_GET_MESH_INFO, | 299 | BATADV_CMD_GET_MESH_INFO, |
| 300 | |||
| 301 | /** | ||
| 302 | * @BATADV_CMD_TP_METER: Start a tp meter session | ||
| 303 | */ | ||
| 167 | BATADV_CMD_TP_METER, | 304 | BATADV_CMD_TP_METER, |
| 305 | |||
| 306 | /** | ||
| 307 | * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session | ||
| 308 | */ | ||
| 168 | BATADV_CMD_TP_METER_CANCEL, | 309 | BATADV_CMD_TP_METER_CANCEL, |
| 310 | |||
| 311 | /** | ||
| 312 | * @BATADV_CMD_GET_ROUTING_ALGOS: Query the list of routing algorithms. | ||
| 313 | */ | ||
| 169 | BATADV_CMD_GET_ROUTING_ALGOS, | 314 | BATADV_CMD_GET_ROUTING_ALGOS, |
| 315 | |||
| 316 | /** | ||
| 317 | * @BATADV_CMD_GET_HARDIFS: Query list of hard interfaces | ||
| 318 | */ | ||
| 170 | BATADV_CMD_GET_HARDIFS, | 319 | BATADV_CMD_GET_HARDIFS, |
| 320 | |||
| 321 | /** | ||
| 322 | * @BATADV_CMD_GET_TRANSTABLE_LOCAL: Query list of local translations | ||
| 323 | */ | ||
| 171 | BATADV_CMD_GET_TRANSTABLE_LOCAL, | 324 | BATADV_CMD_GET_TRANSTABLE_LOCAL, |
| 325 | |||
| 326 | /** | ||
| 327 | * @BATADV_CMD_GET_TRANSTABLE_GLOBAL: Query list of global translations | ||
| 328 | */ | ||
| 172 | BATADV_CMD_GET_TRANSTABLE_GLOBAL, | 329 | BATADV_CMD_GET_TRANSTABLE_GLOBAL, |
| 330 | |||
| 331 | /** | ||
| 332 | * @BATADV_CMD_GET_ORIGINATORS: Query list of originators | ||
| 333 | */ | ||
| 173 | BATADV_CMD_GET_ORIGINATORS, | 334 | BATADV_CMD_GET_ORIGINATORS, |
| 335 | |||
| 336 | /** | ||
| 337 | * @BATADV_CMD_GET_NEIGHBORS: Query list of neighbours | ||
| 338 | */ | ||
| 174 | BATADV_CMD_GET_NEIGHBORS, | 339 | BATADV_CMD_GET_NEIGHBORS, |
| 340 | |||
| 341 | /** | ||
| 342 | * @BATADV_CMD_GET_GATEWAYS: Query list of gateways | ||
| 343 | */ | ||
| 175 | BATADV_CMD_GET_GATEWAYS, | 344 | BATADV_CMD_GET_GATEWAYS, |
| 345 | |||
| 346 | /** | ||
| 347 | * @BATADV_CMD_GET_BLA_CLAIM: Query list of bridge loop avoidance claims | ||
| 348 | */ | ||
| 176 | BATADV_CMD_GET_BLA_CLAIM, | 349 | BATADV_CMD_GET_BLA_CLAIM, |
| 350 | |||
| 351 | /** | ||
| 352 | * @BATADV_CMD_GET_BLA_BACKBONE: Query list of bridge loop avoidance | ||
| 353 | * backbones | ||
| 354 | */ | ||
| 177 | BATADV_CMD_GET_BLA_BACKBONE, | 355 | BATADV_CMD_GET_BLA_BACKBONE, |
| 356 | |||
| 178 | /* add new commands above here */ | 357 | /* add new commands above here */ |
| 358 | |||
| 359 | /** | ||
| 360 | * @__BATADV_CMD_AFTER_LAST: internal use | ||
| 361 | */ | ||
| 179 | __BATADV_CMD_AFTER_LAST, | 362 | __BATADV_CMD_AFTER_LAST, |
| 363 | |||
| 364 | /** | ||
| 365 | * @BATADV_CMD_MAX: highest used command number | ||
| 366 | */ | ||
| 180 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 | 367 | BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1 |
| 181 | }; | 368 | }; |
| 182 | 369 | ||
| 183 | /** | 370 | /** |
| 184 | * enum batadv_tp_meter_reason - reason of a tp meter test run stop | 371 | * enum batadv_tp_meter_reason - reason of a tp meter test run stop |
| 185 | * @BATADV_TP_REASON_COMPLETE: sender finished tp run | ||
| 186 | * @BATADV_TP_REASON_CANCEL: sender was stopped during run | ||
| 187 | * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or didn't | ||
| 188 | * answer | ||
| 189 | * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit | ||
| 190 | * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node already | ||
| 191 | * ongoing | ||
| 192 | * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory | ||
| 193 | * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface | ||
| 194 | * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions | ||
| 195 | */ | 372 | */ |
| 196 | enum batadv_tp_meter_reason { | 373 | enum batadv_tp_meter_reason { |
| 374 | /** | ||
| 375 | * @BATADV_TP_REASON_COMPLETE: sender finished tp run | ||
| 376 | */ | ||
| 197 | BATADV_TP_REASON_COMPLETE = 3, | 377 | BATADV_TP_REASON_COMPLETE = 3, |
| 378 | |||
| 379 | /** | ||
| 380 | * @BATADV_TP_REASON_CANCEL: sender was stopped during run | ||
| 381 | */ | ||
| 198 | BATADV_TP_REASON_CANCEL = 4, | 382 | BATADV_TP_REASON_CANCEL = 4, |
| 383 | |||
| 199 | /* error status >= 128 */ | 384 | /* error status >= 128 */ |
| 385 | |||
| 386 | /** | ||
| 387 | * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or | ||
| 388 | * didn't answer | ||
| 389 | */ | ||
| 200 | BATADV_TP_REASON_DST_UNREACHABLE = 128, | 390 | BATADV_TP_REASON_DST_UNREACHABLE = 128, |
| 391 | |||
| 392 | /** | ||
| 393 | * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit | ||
| 394 | */ | ||
| 201 | BATADV_TP_REASON_RESEND_LIMIT = 129, | 395 | BATADV_TP_REASON_RESEND_LIMIT = 129, |
| 396 | |||
| 397 | /** | ||
| 398 | * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node | ||
| 399 | * already ongoing | ||
| 400 | */ | ||
| 202 | BATADV_TP_REASON_ALREADY_ONGOING = 130, | 401 | BATADV_TP_REASON_ALREADY_ONGOING = 130, |
| 402 | |||
| 403 | /** | ||
| 404 | * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory | ||
| 405 | */ | ||
| 203 | BATADV_TP_REASON_MEMORY_ERROR = 131, | 406 | BATADV_TP_REASON_MEMORY_ERROR = 131, |
| 407 | |||
| 408 | /** | ||
| 409 | * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface | ||
| 410 | */ | ||
| 204 | BATADV_TP_REASON_CANT_SEND = 132, | 411 | BATADV_TP_REASON_CANT_SEND = 132, |
| 412 | |||
| 413 | /** | ||
| 414 | * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions | ||
| 415 | */ | ||
| 205 | BATADV_TP_REASON_TOO_MANY = 133, | 416 | BATADV_TP_REASON_TOO_MANY = 133, |
| 206 | }; | 417 | }; |
| 207 | 418 | ||
| @@ -93,6 +93,7 @@ enum bpf_cmd { · 92 unmodified lines | |||
| 93 | BPF_PROG_GET_FD_BY_ID, | 93 | BPF_PROG_GET_FD_BY_ID, |
| 94 | BPF_MAP_GET_FD_BY_ID, | 94 | BPF_MAP_GET_FD_BY_ID, |
| 95 | BPF_OBJ_GET_INFO_BY_FD, | 95 | BPF_OBJ_GET_INFO_BY_FD, |
| 96 | BPF_PROG_QUERY, | ||
| 96 | }; | 97 | }; |
| 97 | 98 | ||
| 98 | enum bpf_map_type { | 99 | enum bpf_map_type { |
| @@ -112,6 +113,7 @@ enum bpf_map_type { · 13 unmodified lines | |||
| 112 | BPF_MAP_TYPE_HASH_OF_MAPS, | 113 | BPF_MAP_TYPE_HASH_OF_MAPS, |
| 113 | BPF_MAP_TYPE_DEVMAP, | 114 | BPF_MAP_TYPE_DEVMAP, |
| 114 | BPF_MAP_TYPE_SOCKMAP, | 115 | BPF_MAP_TYPE_SOCKMAP, |
| 116 | BPF_MAP_TYPE_CPUMAP, | ||
| 115 | }; | 117 | }; |
| 116 | 118 | ||
| 117 | enum bpf_prog_type { | 119 | enum bpf_prog_type { |
| @@ -130,6 +132,7 @@ enum bpf_prog_type { · 12 unmodified lines | |||
| 130 | BPF_PROG_TYPE_LWT_XMIT, | 132 | BPF_PROG_TYPE_LWT_XMIT, |
| 131 | BPF_PROG_TYPE_SOCK_OPS, | 133 | BPF_PROG_TYPE_SOCK_OPS, |
| 132 | BPF_PROG_TYPE_SK_SKB, | 134 | BPF_PROG_TYPE_SK_SKB, |
| 135 | BPF_PROG_TYPE_CGROUP_DEVICE, | ||
| 133 | }; | 136 | }; |
| 134 | 137 | ||
| 135 | enum bpf_attach_type { | 138 | enum bpf_attach_type { |
| @@ -139,16 +142,53 @@ enum bpf_attach_type { · 3 unmodified lines | |||
| 139 | BPF_CGROUP_SOCK_OPS, | 142 | BPF_CGROUP_SOCK_OPS, |
| 140 | BPF_SK_SKB_STREAM_PARSER, | 143 | BPF_SK_SKB_STREAM_PARSER, |
| 141 | BPF_SK_SKB_STREAM_VERDICT, | 144 | BPF_SK_SKB_STREAM_VERDICT, |
| 145 | BPF_CGROUP_DEVICE, | ||
| 142 | __MAX_BPF_ATTACH_TYPE | 146 | __MAX_BPF_ATTACH_TYPE |
| 143 | }; | 147 | }; |
| 144 | 148 | ||
| 145 | #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE | 149 | #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE |
| 146 | 150 | ||
| 147 | /* If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command | 151 | /* cgroup-bpf attach flags used in BPF_PROG_ATTACH command |
| 148 | * to the given target_fd cgroup the descendent cgroup will be able to | 152 | * |
| 149 | * override effective bpf program that was inherited from this cgroup | 153 | * NONE(default): No further bpf programs allowed in the subtree. |
| 154 | * | ||
| 155 | * BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program, | ||
| 156 | * the program in this cgroup yields to sub-cgroup program. | ||
| 157 | * | ||
| 158 | * BPF_F_ALLOW_MULTI: If a sub-cgroup installs some bpf program, | ||
| 159 | * that cgroup program gets run in addition to the program in this cgroup. | ||
| 160 | * | ||
| 161 | * Only one program is allowed to be attached to a cgroup with | ||
| 162 | * NONE or BPF_F_ALLOW_OVERRIDE flag. | ||
| 163 | * Attaching another program on top of NONE or BPF_F_ALLOW_OVERRIDE will | ||
| 164 | * release old program and attach the new one. Attach flags has to match. | ||
| 165 | * | ||
| 166 | * Multiple programs are allowed to be attached to a cgroup with | ||
| 167 | * BPF_F_ALLOW_MULTI flag. They are executed in FIFO order | ||
| 168 | * (those that were attached first, run first) | ||
| 169 | * The programs of sub-cgroup are executed first, then programs of | ||
| 170 | * this cgroup and then programs of parent cgroup. | ||
| 171 | * When children program makes decision (like picking TCP CA or sock bind) | ||
| 172 | * parent program has a chance to override it. | ||
| 173 | * | ||
| 174 | * A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups. | ||
| 175 | * A cgroup with NONE doesn't allow any programs in sub-cgroups. | ||
| 176 | * Ex1: | ||
| 177 | * cgrp1 (MULTI progs A, B) -> | ||
| 178 | * cgrp2 (OVERRIDE prog C) -> | ||
| 179 | * cgrp3 (MULTI prog D) -> | ||
| 180 | * cgrp4 (OVERRIDE prog E) -> | ||
| 181 | * cgrp5 (NONE prog F) | ||
| 182 | * the event in cgrp5 triggers execution of F,D,A,B in that order. | ||
| 183 | * if prog F is detached, the execution is E,D,A,B | ||
| 184 | * if prog F and D are detached, the execution is E,A,B | ||
| 185 | * if prog F, E and D are detached, the execution is C,A,B | ||
| 186 | * | ||
| 187 | * All eligible programs are executed regardless of return code from | ||
| 188 | * earlier programs. | ||
| 150 | */ | 189 | */ |
| 151 | #define BPF_F_ALLOW_OVERRIDE (1U << 0) | 190 | #define BPF_F_ALLOW_OVERRIDE (1U << 0) |
| 191 | #define BPF_F_ALLOW_MULTI (1U << 1) | ||
| 152 | 192 | ||
| 153 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the | 193 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the |
| 154 | * verifier will perform strict alignment checking as if the kernel | 194 | * verifier will perform strict alignment checking as if the kernel |
| @@ -176,6 +216,15 @@ enum bpf_attach_type { · 21 unmodified lines | |||
| 176 | /* Specify numa node during map creation */ | 216 | /* Specify numa node during map creation */ |
| 177 | #define BPF_F_NUMA_NODE (1U << 2) | 217 | #define BPF_F_NUMA_NODE (1U << 2) |
| 178 | 218 | ||
| 219 | /* flags for BPF_PROG_QUERY */ | ||
| 220 | #define BPF_F_QUERY_EFFECTIVE (1U << 0) | ||
| 221 | |||
| 222 | #define BPF_OBJ_NAME_LEN 16U | ||
| 223 | |||
| 224 | /* Flags for accessing BPF object */ | ||
| 225 | #define BPF_F_RDONLY (1U << 3) | ||
| 226 | #define BPF_F_WRONLY (1U << 4) | ||
| 227 | |||
| 179 | union bpf_attr { | 228 | union bpf_attr { |
| 180 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 229 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| 181 | __u32 map_type; /* one of enum bpf_map_type */ | 230 | __u32 map_type; /* one of enum bpf_map_type */ |
| @@ -189,6 +238,7 @@ union bpf_attr { · 7 unmodified lines | |||
| 189 | __u32 numa_node; /* numa node (effective only if | 238 | __u32 numa_node; /* numa node (effective only if |
| 190 | * BPF_F_NUMA_NODE is set). | 239 | * BPF_F_NUMA_NODE is set). |
| 191 | */ | 240 | */ |
| 241 | char map_name[BPF_OBJ_NAME_LEN]; | ||
| 192 | }; | 242 | }; |
| 193 | 243 | ||
| 194 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 244 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| @@ -211,11 +261,14 @@ union bpf_attr { · 16 unmodified lines | |||
| 211 | __aligned_u64 log_buf; /* user supplied buffer */ | 261 | __aligned_u64 log_buf; /* user supplied buffer */ |
| 212 | __u32 kern_version; /* checked when prog_type=kprobe */ | 262 | __u32 kern_version; /* checked when prog_type=kprobe */ |
| 213 | __u32 prog_flags; | 263 | __u32 prog_flags; |
| 264 | char prog_name[BPF_OBJ_NAME_LEN]; | ||
| 265 | __u32 prog_target_ifindex; /* ifindex of netdev to prep for */ | ||
| 214 | }; | 266 | }; |
| 215 | 267 | ||
| 216 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | 268 | struct { /* anonymous struct used by BPF_OBJ_* commands */ |
| 217 | __aligned_u64 pathname; | 269 | __aligned_u64 pathname; |
| 218 | __u32 bpf_fd; | 270 | __u32 bpf_fd; |
| 271 | __u32 file_flags; | ||
| 219 | }; | 272 | }; |
| 220 | 273 | ||
| 221 | struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */ | 274 | struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */ |
| @@ -243,6 +296,7 @@ union bpf_attr { · 21 unmodified lines | |||
| 243 | __u32 map_id; | 296 | __u32 map_id; |
| 244 | }; | 297 | }; |
| 245 | __u32 next_id; | 298 | __u32 next_id; |
| 299 | __u32 open_flags; | ||
| 246 | }; | 300 | }; |
| 247 | 301 | ||
| 248 | struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ | 302 | struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ |
| @@ -250,6 +304,15 @@ union bpf_attr { · 1 unmodified line | |||
| 250 | __u32 info_len; | 304 | __u32 info_len; |
| 251 | __aligned_u64 info; | 305 | __aligned_u64 info; |
| 252 | } info; | 306 | } info; |
| 307 | |||
| 308 | struct { /* anonymous struct used by BPF_PROG_QUERY command */ | ||
| 309 | __u32 target_fd; /* container object to query */ | ||
| 310 | __u32 attach_type; | ||
| 311 | __u32 query_flags; | ||
| 312 | __u32 attach_flags; | ||
| 313 | __aligned_u64 prog_ids; | ||
| 314 | __u32 prog_cnt; | ||
| 315 | } query; | ||
| 253 | } __attribute__((aligned(8))); | 316 | } __attribute__((aligned(8))); |
| 254 | 317 | ||
| 255 | /* BPF helper function descriptions: | 318 | /* BPF helper function descriptions: |
| @@ -554,12 +617,22 @@ union bpf_attr { · 298 unmodified lines | |||
| 554 | * int bpf_setsockopt(bpf_socket, level, optname, optval, optlen) | 617 | * int bpf_setsockopt(bpf_socket, level, optname, optval, optlen) |
| 555 | * Calls setsockopt. Not all opts are available, only those with | 618 | * Calls setsockopt. Not all opts are available, only those with |
| 556 | * integer optvals plus TCP_CONGESTION. | 619 | * integer optvals plus TCP_CONGESTION. |
| 557 | * Supported levels: SOL_SOCKET and IPROTO_TCP | 620 | * Supported levels: SOL_SOCKET and IPPROTO_TCP |
| 621 | * @bpf_socket: pointer to bpf_socket | ||
| 622 | * @level: SOL_SOCKET or IPPROTO_TCP | ||
| 623 | * @optname: option name | ||
| 624 | * @optval: pointer to option value | ||
| 625 | * @optlen: length of optval in bytes | ||
| 626 | * Return: 0 or negative error | ||
| 627 | * | ||
| 628 | * int bpf_getsockopt(bpf_socket, level, optname, optval, optlen) | ||
| 629 | * Calls getsockopt. Not all opts are available. | ||
| 630 | * Supported levels: IPPROTO_TCP | ||
| 558 | * @bpf_socket: pointer to bpf_socket | 631 | * @bpf_socket: pointer to bpf_socket |
| 559 | * @level: SOL_SOCKET or IPROTO_TCP | 632 | * @level: IPPROTO_TCP |
| 560 | * @optname: option name | 633 | * @optname: option name |
| 561 | * @optval: pointer to option value | 634 | * @optval: pointer to option value |
| 562 | * @optlen: length of optval in byes | 635 | * @optlen: length of optval in bytes |
| 563 | * Return: 0 or negative error | 636 | * Return: 0 or negative error |
| 564 | * | 637 | * |
| 565 | * int bpf_skb_adjust_room(skb, len_diff, mode, flags) | 638 | * int bpf_skb_adjust_room(skb, len_diff, mode, flags) |
| @@ -583,6 +656,27 @@ union bpf_attr { · 17 unmodified lines | |||
| 583 | * @map: pointer to sockmap to update | 656 | * @map: pointer to sockmap to update |
| 584 | * @key: key to insert/update sock in map | 657 | * @key: key to insert/update sock in map |
| 585 | * @flags: same flags as map update elem | 658 | * @flags: same flags as map update elem |
| 659 | * | ||
| 660 | * int bpf_xdp_adjust_meta(xdp_md, delta) | ||
| 661 | * Adjust the xdp_md.data_meta by delta | ||
| 662 | * @xdp_md: pointer to xdp_md | ||
| 663 | * @delta: An positive/negative integer to be added to xdp_md.data_meta | ||
| 664 | * Return: 0 on success or negative on error | ||
| 665 | * | ||
| 666 | * int bpf_perf_event_read_value(map, flags, buf, buf_size) | ||
| 667 | * read perf event counter value and perf event enabled/running time | ||
| 668 | * @map: pointer to perf_event_array map | ||
| 669 | * @flags: index of event in the map or bitmask flags | ||
| 670 | * @buf: buf to fill | ||
| 671 | * @buf_size: size of the buf | ||
| 672 | * Return: 0 on success or negative error code | ||
| 673 | * | ||
| 674 | * int bpf_perf_prog_read_value(ctx, buf, buf_size) | ||
| 675 | * read perf prog attached perf event counter and enabled/running time | ||
| 676 | * @ctx: pointer to ctx | ||
| 677 | * @buf: buf to fill | ||
| 678 | * @buf_size: size of the buf | ||
| 679 | * Return : 0 on success or negative error code | ||
| 586 | */ | 680 | */ |
| 587 | #define __BPF_FUNC_MAPPER(FN) \ | 681 | #define __BPF_FUNC_MAPPER(FN) \ |
| 588 | FN(unspec), \ | 682 | FN(unspec), \ |
| @@ -639,6 +733,10 @@ union bpf_attr { · 50 unmodified lines | |||
| 639 | FN(redirect_map), \ | 733 | FN(redirect_map), \ |
| 640 | FN(sk_redirect_map), \ | 734 | FN(sk_redirect_map), \ |
| 641 | FN(sock_map_update), \ | 735 | FN(sock_map_update), \ |
| 736 | FN(xdp_adjust_meta), \ | ||
| 737 | FN(perf_event_read_value), \ | ||
| 738 | FN(perf_prog_read_value), \ | ||
| 739 | FN(getsockopt), | ||
| 642 | 740 | ||
| 643 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 741 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 644 | * function eBPF program intends to call | 742 | * function eBPF program intends to call |
| @@ -682,7 +780,9 @@ enum bpf_func_id { · 37 unmodified lines | |||
| 682 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) | 780 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) |
| 683 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) | 781 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) |
| 684 | 782 | ||
| 685 | /* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */ | 783 | /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and |
| 784 | * BPF_FUNC_perf_event_read_value flags. | ||
| 785 | */ | ||
| 686 | #define BPF_F_INDEX_MASK 0xffffffffULL | 786 | #define BPF_F_INDEX_MASK 0xffffffffULL |
| 687 | #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK | 787 | #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK |
| 688 | /* BPF_FUNC_perf_event_output for sk_buff input context. */ | 788 | /* BPF_FUNC_perf_event_output for sk_buff input context. */ |
| @@ -716,7 +816,7 @@ struct __sk_buff { · 27 unmodified lines | |||
| 716 | __u32 data_end; | 816 | __u32 data_end; |
| 717 | __u32 napi_id; | 817 | __u32 napi_id; |
| 718 | 818 | ||
| 719 | /* accessed by BPF_PROG_TYPE_sk_skb types */ | 819 | /* Accessed by BPF_PROG_TYPE_sk_skb types from here to ... */ |
| 720 | __u32 family; | 820 | __u32 family; |
| 721 | __u32 remote_ip4; /* Stored in network byte order */ | 821 | __u32 remote_ip4; /* Stored in network byte order */ |
| 722 | __u32 local_ip4; /* Stored in network byte order */ | 822 | __u32 local_ip4; /* Stored in network byte order */ |
| @@ -724,6 +824,9 @@ struct __sk_buff { · 1 unmodified line | |||
| 724 | __u32 local_ip6[4]; /* Stored in network byte order */ | 824 | __u32 local_ip6[4]; /* Stored in network byte order */ |
| 725 | __u32 remote_port; /* Stored in network byte order */ | 825 | __u32 remote_port; /* Stored in network byte order */ |
| 726 | __u32 local_port; /* stored in host byte order */ | 826 | __u32 local_port; /* stored in host byte order */ |
| 827 | /* ... here. */ | ||
| 828 | |||
| 829 | __u32 data_meta; | ||
| 727 | }; | 830 | }; |
| 728 | 831 | ||
| 729 | struct bpf_tunnel_key { | 832 | struct bpf_tunnel_key { |
| @@ -784,6 +887,7 @@ enum xdp_action { · 54 unmodified lines | |||
| 784 | struct xdp_md { | 887 | struct xdp_md { |
| 785 | __u32 data; | 888 | __u32 data; |
| 786 | __u32 data_end; | 889 | __u32 data_end; |
| 890 | __u32 data_meta; | ||
| 787 | }; | 891 | }; |
| 788 | 892 | ||
| 789 | enum sk_action { | 893 | enum sk_action { |
| @@ -793,6 +897,10 @@ enum sk_action { · 3 unmodified lines | |||
| 793 | 897 | ||
| 794 | #define BPF_TAG_SIZE 8 | 898 | #define BPF_TAG_SIZE 8 |
| 795 | 899 | ||
| 900 | enum bpf_prog_status { | ||
| 901 | BPF_PROG_STATUS_DEV_BOUND = (1 << 0), | ||
| 902 | }; | ||
| 903 | |||
| 796 | struct bpf_prog_info { | 904 | struct bpf_prog_info { |
| 797 | __u32 type; | 905 | __u32 type; |
| 798 | __u32 id; | 906 | __u32 id; |
| @@ -801,6 +909,13 @@ struct bpf_prog_info { · 2 unmodified lines | |||
| 801 | __u32 xlated_prog_len; | 909 | __u32 xlated_prog_len; |
| 802 | __aligned_u64 jited_prog_insns; | 910 | __aligned_u64 jited_prog_insns; |
| 803 | __aligned_u64 xlated_prog_insns; | 911 | __aligned_u64 xlated_prog_insns; |
| 912 | __u64 load_time; /* ns since boottime */ | ||
| 913 | __u32 created_by_uid; | ||
| 914 | __u32 nr_map_ids; | ||
| 915 | __aligned_u64 map_ids; | ||
| 916 | char name[BPF_OBJ_NAME_LEN]; | ||
| 917 | __u32 ifindex; | ||
| 918 | __u32 status; | ||
| 804 | } __attribute__((aligned(8))); | 919 | } __attribute__((aligned(8))); |
| 805 | 920 | ||
| 806 | struct bpf_map_info { | 921 | struct bpf_map_info { |
| @@ -810,6 +925,7 @@ struct bpf_map_info { · 3 unmodified lines | |||
| 810 | __u32 value_size; | 925 | __u32 value_size; |
| 811 | __u32 max_entries; | 926 | __u32 max_entries; |
| 812 | __u32 map_flags; | 927 | __u32 map_flags; |
| 928 | char name[BPF_OBJ_NAME_LEN]; | ||
| 813 | } __attribute__((aligned(8))); | 929 | } __attribute__((aligned(8))); |
| 814 | 930 | ||
| 815 | /* User bpf_sock_ops struct to access socket values and specify request ops | 931 | /* User bpf_sock_ops struct to access socket values and specify request ops |
| @@ -859,9 +975,35 @@ enum { · 43 unmodified lines | |||
| 859 | BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control | 975 | BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control |
| 860 | * needs ECN | 976 | * needs ECN |
| 861 | */ | 977 | */ |
| 978 | BPF_SOCK_OPS_BASE_RTT, /* Get base RTT. The correct value is | ||
| 979 | * based on the path and may be | ||
| 980 | * dependent on the congestion control | ||
| 981 | * algorithm. In general it indicates | ||
| 982 | * a congestion threshold. RTTs above | ||
| 983 | * this indicate congestion | ||
| 984 | */ | ||
| 862 | }; | 985 | }; |
| 863 | 986 | ||
| 864 | #define TCP_BPF_IW 1001 /* Set TCP initial congestion window */ | 987 | #define TCP_BPF_IW 1001 /* Set TCP initial congestion window */ |
| 865 | #define TCP_BPF_SNDCWND_CLAMP 1002 /* Set sndcwnd_clamp */ | 988 | #define TCP_BPF_SNDCWND_CLAMP 1002 /* Set sndcwnd_clamp */ |
| 866 | 989 | ||
| 990 | struct bpf_perf_event_value { | ||
| 991 | __u64 counter; | ||
| 992 | __u64 enabled; | ||
| 993 | __u64 running; | ||
| 994 | }; | ||
| 995 | |||
| 996 | #define BPF_DEVCG_ACC_MKNOD (1ULL << 0) | ||
| 997 | #define BPF_DEVCG_ACC_READ (1ULL << 1) | ||
| 998 | #define BPF_DEVCG_ACC_WRITE (1ULL << 2) | ||
| 999 | |||
| 1000 | #define BPF_DEVCG_DEV_BLOCK (1ULL << 0) | ||
| 1001 | #define BPF_DEVCG_DEV_CHAR (1ULL << 1) | ||
| 1002 | |||
| 1003 | struct bpf_cgroup_dev_ctx { | ||
| 1004 | __u32 access_type; /* (access << 16) | type */ | ||
| 1005 | __u32 major; | ||
| 1006 | __u32 minor; | ||
| 1007 | }; | ||
| 1008 | |||
| 867 | #endif /* _UAPI__LINUX_BPF_H__ */ | 1009 | #endif /* _UAPI__LINUX_BPF_H__ */ |
| @@ -206,6 +206,7 @@ struct cee_pfc { · 205 unmodified lines | |||
| 206 | #define IEEE_8021QAZ_APP_SEL_STREAM 2 | 206 | #define IEEE_8021QAZ_APP_SEL_STREAM 2 |
| 207 | #define IEEE_8021QAZ_APP_SEL_DGRAM 3 | 207 | #define IEEE_8021QAZ_APP_SEL_DGRAM 3 |
| 208 | #define IEEE_8021QAZ_APP_SEL_ANY 4 | 208 | #define IEEE_8021QAZ_APP_SEL_ANY 4 |
| 209 | #define IEEE_8021QAZ_APP_SEL_DSCP 5 | ||
| 209 | 210 | ||
| 210 | /* This structure contains the IEEE 802.1Qaz APP managed object. This | 211 | /* This structure contains the IEEE 802.1Qaz APP managed object. This |
| 211 | * object is also used for the CEE std as well. | 212 | * object is also used for the CEE std as well. |
| @@ -159,6 +159,8 @@ enum { · 158 unmodified lines | |||
| 159 | IFLA_PAD, | 159 | IFLA_PAD, |
| 160 | IFLA_XDP, | 160 | IFLA_XDP, |
| 161 | IFLA_EVENT, | 161 | IFLA_EVENT, |
| 162 | IFLA_NEW_NETNSID, | ||
| 163 | IFLA_IF_NETNSID, | ||
| 162 | __IFLA_MAX | 164 | __IFLA_MAX |
| 163 | }; | 165 | }; |
| 164 | 166 | ||
| @@ -326,6 +328,8 @@ enum { · 161 unmodified lines | |||
| 326 | IFLA_BRPORT_MCAST_TO_UCAST, | 328 | IFLA_BRPORT_MCAST_TO_UCAST, |
| 327 | IFLA_BRPORT_VLAN_TUNNEL, | 329 | IFLA_BRPORT_VLAN_TUNNEL, |
| 328 | IFLA_BRPORT_BCAST_FLOOD, | 330 | IFLA_BRPORT_BCAST_FLOOD, |
| 331 | IFLA_BRPORT_GROUP_FWD_MASK, | ||
| 332 | IFLA_BRPORT_NEIGH_SUPPRESS, | ||
| 329 | __IFLA_BRPORT_MAX | 333 | __IFLA_BRPORT_MAX |
| 330 | }; | 334 | }; |
| 331 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | 335 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) |
| @@ -463,6 +467,7 @@ enum macsec_validation_type { · 131 unmodified lines | |||
| 463 | enum { | 467 | enum { |
| 464 | IFLA_IPVLAN_UNSPEC, | 468 | IFLA_IPVLAN_UNSPEC, |
| 465 | IFLA_IPVLAN_MODE, | 469 | IFLA_IPVLAN_MODE, |
| 470 | IFLA_IPVLAN_FLAGS, | ||
| 466 | __IFLA_IPVLAN_MAX | 471 | __IFLA_IPVLAN_MAX |
| 467 | }; | 472 | }; |
| 468 | 473 | ||
| @@ -475,6 +480,9 @@ enum ipvlan_mode { · 6 unmodified lines | |||
| 475 | IPVLAN_MODE_MAX | 480 | IPVLAN_MODE_MAX |
| 476 | }; | 481 | }; |
| 477 | 482 | ||
| 483 | #define IPVLAN_F_PRIVATE 0x01 | ||
| 484 | #define IPVLAN_F_VEPA 0x02 | ||
| 485 | |||
| 478 | /* VXLAN section */ | 486 | /* VXLAN section */ |
| 479 | enum { | 487 | enum { |
| 480 | IFLA_VXLAN_UNSPEC, | 488 | IFLA_VXLAN_UNSPEC, |
| @@ -61,6 +61,8 @@ · 60 unmodified lines | |||
| 61 | /* TUNSETIFF ifr flags */ | 61 | /* TUNSETIFF ifr flags */ |
| 62 | #define IFF_TUN 0x0001 | 62 | #define IFF_TUN 0x0001 |
| 63 | #define IFF_TAP 0x0002 | 63 | #define IFF_TAP 0x0002 |
| 64 | #define IFF_NAPI 0x0010 | ||
| 65 | #define IFF_NAPI_FRAGS 0x0020 | ||
| 64 | #define IFF_NO_PI 0x1000 | 66 | #define IFF_NO_PI 0x1000 |
| 65 | /* This flag has no real effect */ | 67 | /* This flag has no real effect */ |
| 66 | #define IFF_ONE_QUEUE 0x2000 | 68 | #define IFF_ONE_QUEUE 0x2000 |
| @@ -85,6 +85,7 @@ enum tunnel_encap_types { · 84 unmodified lines | |||
| 85 | TUNNEL_ENCAP_NONE, | 85 | TUNNEL_ENCAP_NONE, |
| 86 | TUNNEL_ENCAP_FOU, | 86 | TUNNEL_ENCAP_FOU, |
| 87 | TUNNEL_ENCAP_GUE, | 87 | TUNNEL_ENCAP_GUE, |
| 88 | TUNNEL_ENCAP_MPLS, | ||
| 88 | }; | 89 | }; |
| 89 | 90 | ||
| 90 | #define TUNNEL_ENCAP_FLAG_CSUM (1<<0) | 91 | #define TUNNEL_ENCAP_FLAG_CSUM (1<<0) |
| @@ -17,6 +17,8 @@ enum { · 16 unmodified lines | |||
| 17 | ILA_ATTR_DIR, /* u32 */ | 17 | ILA_ATTR_DIR, /* u32 */ |
| 18 | ILA_ATTR_PAD, | 18 | ILA_ATTR_PAD, |
| 19 | ILA_ATTR_CSUM_MODE, /* u8 */ | 19 | ILA_ATTR_CSUM_MODE, /* u8 */ |
| 20 | ILA_ATTR_IDENT_TYPE, /* u8 */ | ||
| 21 | ILA_ATTR_HOOK_TYPE, /* u8 */ | ||
| 20 | 22 | ||
| 21 | __ILA_ATTR_MAX, | 23 | __ILA_ATTR_MAX, |
| 22 | }; | 24 | }; |
| @@ -41,6 +43,25 @@ enum { · 18 unmodified lines | |||
| 41 | ILA_CSUM_ADJUST_TRANSPORT, | 43 | ILA_CSUM_ADJUST_TRANSPORT, |
| 42 | ILA_CSUM_NEUTRAL_MAP, | 44 | ILA_CSUM_NEUTRAL_MAP, |
| 43 | ILA_CSUM_NO_ACTION, | 45 | ILA_CSUM_NO_ACTION, |
| 46 | ILA_CSUM_NEUTRAL_MAP_AUTO, | ||
| 47 | }; | ||
| 48 | |||
| 49 | enum { | ||
| 50 | ILA_ATYPE_IID = 0, | ||
| 51 | ILA_ATYPE_LUID, | ||
| 52 | ILA_ATYPE_VIRT_V4, | ||
| 53 | ILA_ATYPE_VIRT_UNI_V6, | ||
| 54 | ILA_ATYPE_VIRT_MULTI_V6, | ||
| 55 | ILA_ATYPE_NONLOCAL_ADDR, | ||
| 56 | ILA_ATYPE_RSVD_1, | ||
| 57 | ILA_ATYPE_RSVD_2, | ||
| 58 | |||
| 59 | ILA_ATYPE_USE_FORMAT = 32, /* Get type from type field in identifier */ | ||
| 60 | }; | ||
| 61 | |||
| 62 | enum { | ||
| 63 | ILA_HOOK_ROUTE_OUTPUT, | ||
| 64 | ILA_HOOK_ROUTE_INPUT, | ||
| 44 | }; | 65 | }; |
| 45 | 66 | ||
| 46 | #endif /* _UAPI_LINUX_ILA_H */ | 67 | #endif /* _UAPI_LINUX_ILA_H */ |
| @@ -285,6 +285,7 @@ struct in6_flowlabel_req { · 284 unmodified lines | |||
| 285 | #define IPV6_TRANSPARENT 75 | 285 | #define IPV6_TRANSPARENT 75 |
| 286 | #define IPV6_UNICAST_IF 76 | 286 | #define IPV6_UNICAST_IF 76 |
| 287 | #define IPV6_RECVFRAGSIZE 77 | 287 | #define IPV6_RECVFRAGSIZE 77 |
| 288 | #define IPV6_FREEBIND 78 | ||
| 288 | 289 | ||
| 289 | /* | 290 | /* |
| 290 | * Multicast Routing: | 291 | * Multicast Routing: |
| @@ -21,6 +21,8 @@ · 20 unmodified lines | |||
| 21 | #define IP6_TNL_F_RCV_DSCP_COPY 0x10 | 21 | #define IP6_TNL_F_RCV_DSCP_COPY 0x10 |
| 22 | /* copy fwmark from inner packet */ | 22 | /* copy fwmark from inner packet */ |
| 23 | #define IP6_TNL_F_USE_ORIG_FWMARK 0x20 | 23 | #define IP6_TNL_F_USE_ORIG_FWMARK 0x20 |
| 24 | /* allow remote endpoint on the local node */ | ||
| 25 | #define IP6_TNL_F_ALLOW_LOCAL_REMOTE 0x40 | ||
| 24 | 26 | ||
| 25 | struct ip6_tnl_parm { | 27 | struct ip6_tnl_parm { |
| 26 | char name[IFNAMSIZ]; /* name of tunnel device */ | 28 | char name[IFNAMSIZ]; /* name of tunnel device */ |
| @@ -186,6 +186,7 @@ enum { · 185 unmodified lines | |||
| 186 | DEVCONF_ADDR_GEN_MODE, | 186 | DEVCONF_ADDR_GEN_MODE, |
| 187 | DEVCONF_DISABLE_POLICY, | 187 | DEVCONF_DISABLE_POLICY, |
| 188 | DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN, | 188 | DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN, |
| 189 | DEVCONF_NDISC_TCLASS, | ||
| 189 | DEVCONF_MAX | 190 | DEVCONF_MAX |
| 190 | }; | 191 | }; |
| 191 | 192 | ||
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | 29 | ||
| 30 | #define RTF_ROUTEINFO 0x00800000 /* route information - RA */ | 30 | #define RTF_ROUTEINFO 0x00800000 /* route information - RA */ |
| 31 | 31 | ||
| 32 | #define RTF_CACHE 0x01000000 /* cache entry */ | 32 | #define RTF_CACHE 0x01000000 /* read-only: can not be set by user */ |
| 33 | #define RTF_FLOW 0x02000000 /* flow significant route */ | 33 | #define RTF_FLOW 0x02000000 /* flow significant route */ |
| 34 | #define RTF_POLICY 0x04000000 /* policy route */ | 34 | #define RTF_POLICY 0x04000000 /* policy route */ |
| 35 | 35 | ||
| @@ -89,6 +89,7 @@ · 88 unmodified lines | |||
| 89 | * @NFC_CMD_ACTIVATE_TARGET: Request NFC controller to reactivate target. | 89 | * @NFC_CMD_ACTIVATE_TARGET: Request NFC controller to reactivate target. |
| 90 | * @NFC_CMD_VENDOR: Vendor specific command, to be implemented directly | 90 | * @NFC_CMD_VENDOR: Vendor specific command, to be implemented directly |
| 91 | * from the driver in order to support hardware specific operations. | 91 | * from the driver in order to support hardware specific operations. |
| 92 | * @NFC_CMD_DEACTIVATE_TARGET: Request NFC controller to deactivate target. | ||
| 92 | */ | 93 | */ |
| 93 | enum nfc_commands { | 94 | enum nfc_commands { |
| 94 | NFC_CMD_UNSPEC, | 95 | NFC_CMD_UNSPEC, |
| @@ -121,6 +122,7 @@ enum nfc_commands { · 26 unmodified lines | |||
| 121 | NFC_CMD_SE_IO, | 122 | NFC_CMD_SE_IO, |
| 122 | NFC_CMD_ACTIVATE_TARGET, | 123 | NFC_CMD_ACTIVATE_TARGET, |
| 123 | NFC_CMD_VENDOR, | 124 | NFC_CMD_VENDOR, |
| 125 | NFC_CMD_DEACTIVATE_TARGET, | ||
| 124 | /* private: internal use only */ | 126 | /* private: internal use only */ |
| 125 | __NFC_CMD_AFTER_LAST | 127 | __NFC_CMD_AFTER_LAST |
| 126 | }; | 128 | }; |
| @@ -569,13 +569,14 @@ · 568 unmodified lines | |||
| 569 | * authentication/association or not receiving a response from the AP. | 569 | * authentication/association or not receiving a response from the AP. |
| 570 | * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as | 570 | * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as |
| 571 | * well to remain backwards compatible. | 571 | * well to remain backwards compatible. |
| 572 | * @NL80211_CMD_ROAM: notifcation indicating the card/driver roamed by itself. | 572 | * When establishing a security association, drivers that support 4 way |
| 573 | * When the driver roamed in a network that requires 802.1X authentication, | 573 | * handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when |
| 574 | * %NL80211_ATTR_PORT_AUTHORIZED should be set if the 802.1X authentication | 574 | * the 4 way handshake is completed successfully. |
| 575 | * was done by the driver or if roaming was done using Fast Transition | 575 | * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself. |
| 576 | * protocol (in which case 802.1X authentication is not needed). If | 576 | * When a security association was established with the new AP (e.g. if |
| 577 | * %NL80211_ATTR_PORT_AUTHORIZED is not set, user space is responsible for | 577 | * the FT protocol was used for roaming or the driver completed the 4 way |
| 578 | * the 802.1X authentication. | 578 | * handshake), this event should be followed by an |
| 579 | * %NL80211_CMD_PORT_AUTHORIZED event. | ||
| 579 | * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify | 580 | * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify |
| 580 | * userspace that a connection was dropped by the AP or due to other | 581 | * userspace that a connection was dropped by the AP or due to other |
| 581 | * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and | 582 | * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and |
| @@ -982,6 +983,14 @@ · 400 unmodified lines | |||
| 982 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously | 983 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously |
| 983 | * configured PMK for the authenticator address identified by | 984 | * configured PMK for the authenticator address identified by |
| 984 | * &NL80211_ATTR_MAC. | 985 | * &NL80211_ATTR_MAC. |
| 986 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way | ||
| 987 | * handshake was completed successfully by the driver. The BSSID is | ||
| 988 | * specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake | ||
| 989 | * offload should send this event after indicating 802.11 association with | ||
| 990 | * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed | ||
| 991 | * &NL80211_CMD_DISCONNECT should be indicated instead. | ||
| 992 | * | ||
| 993 | * @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded. | ||
| 985 | * | 994 | * |
| 986 | * @NL80211_CMD_MAX: highest used command number | 995 | * @NL80211_CMD_MAX: highest used command number |
| 987 | * @__NL80211_CMD_AFTER_LAST: internal use | 996 | * @__NL80211_CMD_AFTER_LAST: internal use |
| @@ -1185,6 +1194,10 @@ enum nl80211_commands { · 197 unmodified lines | |||
| 1185 | NL80211_CMD_SET_PMK, | 1194 | NL80211_CMD_SET_PMK, |
| 1186 | NL80211_CMD_DEL_PMK, | 1195 | NL80211_CMD_DEL_PMK, |
| 1187 | 1196 | ||
| 1197 | NL80211_CMD_PORT_AUTHORIZED, | ||
| 1198 | |||
| 1199 | NL80211_CMD_RELOAD_REGDB, | ||
| 1200 | |||
| 1188 | /* add new commands above here */ | 1201 | /* add new commands above here */ |
| 1189 | 1202 | ||
| 1190 | /* used to define NL80211_CMD_MAX below */ | 1203 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1407,8 +1420,12 @@ enum nl80211_commands { · 216 unmodified lines | |||
| 1407 | * | 1420 | * |
| 1408 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is | 1421 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is |
| 1409 | * used for the association (&enum nl80211_mfp, represented as a u32); | 1422 | * used for the association (&enum nl80211_mfp, represented as a u32); |
| 1410 | * this attribute can be used | 1423 | * this attribute can be used with %NL80211_CMD_ASSOCIATE and |
| 1411 | * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests | 1424 | * %NL80211_CMD_CONNECT requests. %NL80211_MFP_OPTIONAL is not allowed for |
| 1425 | * %NL80211_CMD_ASSOCIATE since user space SME is expected and hence, it | ||
| 1426 | * must have decided whether to use management frame protection or not. | ||
| 1427 | * Setting %NL80211_MFP_OPTIONAL with a %NL80211_CMD_CONNECT request will | ||
| 1428 | * let the driver (or the firmware) decide whether to use MFP or not. | ||
| 1412 | * | 1429 | * |
| 1413 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a | 1430 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a |
| 1414 | * &struct nl80211_sta_flag_update. | 1431 | * &struct nl80211_sta_flag_update. |
| @@ -2134,10 +2151,7 @@ enum nl80211_commands { · 719 unmodified lines | |||
| 2134 | * in %NL80211_CMD_CONNECT to indicate that for 802.1X authentication it | 2151 | * in %NL80211_CMD_CONNECT to indicate that for 802.1X authentication it |
| 2135 | * wants to use the supported offload of the 4-way handshake. | 2152 | * wants to use the supported offload of the 4-way handshake. |
| 2136 | * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. | 2153 | * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. |
| 2137 | * @NL80211_ATTR_PORT_AUTHORIZED: flag attribute used in %NL80211_CMD_ROAMED | 2154 | * @NL80211_ATTR_PORT_AUTHORIZED: (reserved) |
| 2138 | * notification indicating that that 802.1X authentication was done by | ||
| 2139 | * the driver or is not needed (because roaming used the Fast Transition | ||
| 2140 | * protocol). | ||
| 2141 | * | 2155 | * |
| 2142 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2156 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2143 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2157 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| @@ -3947,10 +3961,12 @@ enum nl80211_key_type { · 1803 unmodified lines | |||
| 3947 | * enum nl80211_mfp - Management frame protection state | 3961 | * enum nl80211_mfp - Management frame protection state |
| 3948 | * @NL80211_MFP_NO: Management frame protection not used | 3962 | * @NL80211_MFP_NO: Management frame protection not used |
| 3949 | * @NL80211_MFP_REQUIRED: Management frame protection required | 3963 | * @NL80211_MFP_REQUIRED: Management frame protection required |
| 3964 | * @NL80211_MFP_OPTIONAL: Management frame protection is optional | ||
| 3950 | */ | 3965 | */ |
| 3951 | enum nl80211_mfp { | 3966 | enum nl80211_mfp { |
| 3952 | NL80211_MFP_NO, | 3967 | NL80211_MFP_NO, |
| 3953 | NL80211_MFP_REQUIRED, | 3968 | NL80211_MFP_REQUIRED, |
| 3969 | NL80211_MFP_OPTIONAL, | ||
| 3954 | }; | 3970 | }; |
| 3955 | 3971 | ||
| 3956 | enum nl80211_wpa_versions { | 3972 | enum nl80211_wpa_versions { |
| @@ -4914,6 +4930,17 @@ enum nl80211_feature_flags { · 957 unmodified lines | |||
| 4914 | * handshake with 802.1X in station mode (will pass EAP frames to the host | 4930 | * handshake with 802.1X in station mode (will pass EAP frames to the host |
| 4915 | * and accept the set_pmk/del_pmk commands), doing it in the host might not | 4931 | * and accept the set_pmk/del_pmk commands), doing it in the host might not |
| 4916 | * be supported. | 4932 | * be supported. |
| 4933 | * @NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME: Driver is capable of overriding | ||
| 4934 | * the max channel attribute in the FILS request params IE with the | ||
| 4935 | * actual dwell time. | ||
| 4936 | * @NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP: Driver accepts broadcast probe | ||
| 4937 | * response | ||
| 4938 | * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE: Driver supports sending | ||
| 4939 | * the first probe request in each channel at rate of at least 5.5Mbps. | ||
| 4940 | * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: Driver supports | ||
| 4941 | * probe request tx deferral and suppression | ||
| 4942 | * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL | ||
| 4943 | * value in %NL80211_ATTR_USE_MFP. | ||
| 4917 | * | 4944 | * |
| 4918 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 4945 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 4919 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 4946 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| @@ -4936,6 +4963,11 @@ enum nl80211_ext_feature_index { · 16 unmodified lines | |||
| 4936 | NL80211_EXT_FEATURE_FILS_SK_OFFLOAD, | 4963 | NL80211_EXT_FEATURE_FILS_SK_OFFLOAD, |
| 4937 | NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK, | 4964 | NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK, |
| 4938 | NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X, | 4965 | NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X, |
| 4966 | NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME, | ||
| 4967 | NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP, | ||
| 4968 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE, | ||
| 4969 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION, | ||
| 4970 | NL80211_EXT_FEATURE_MFP_OPTIONAL, | ||
| 4939 | 4971 | ||
| 4940 | /* add new features before the definition below */ | 4972 | /* add new features before the definition below */ |
| 4941 | NUM_NL80211_EXT_FEATURES, | 4973 | NUM_NL80211_EXT_FEATURES, |
| @@ -5012,12 +5044,28 @@ enum nl80211_timeout_reason { · 70 unmodified lines | |||
| 5012 | * locally administered 1, multicast 0) is assumed. | 5044 | * locally administered 1, multicast 0) is assumed. |
| 5013 | * This flag must not be requested when the feature isn't supported, check | 5045 | * This flag must not be requested when the feature isn't supported, check |
| 5014 | * the nl80211 feature flags for the device. | 5046 | * the nl80211 feature flags for the device. |
| 5047 | * @NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME: fill the dwell time in the FILS | ||
| 5048 | * request parameters IE in the probe request | ||
| 5049 | * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses | ||
| 5050 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at | ||
| 5051 | * rate of at least 5.5M. In case non OCE AP is dicovered in the channel, | ||
| 5052 | * only the first probe req in the channel will be sent in high rate. | ||
| 5053 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request | ||
| 5054 | * tx deferral (dot11FILSProbeDelay shall be set to 15ms) | ||
| 5055 | * and suppression (if it has received a broadcast Probe Response frame, | ||
| 5056 | * Beacon frame or FILS Discovery frame from an AP that the STA considers | ||
| 5057 | * a suitable candidate for (re-)association - suitable in terms of | ||
| 5058 | * SSID and/or RSSI | ||
| 5015 | */ | 5059 | */ |
| 5016 | enum nl80211_scan_flags { | 5060 | enum nl80211_scan_flags { |
| 5017 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, | 5061 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, |
| 5018 | NL80211_SCAN_FLAG_FLUSH = 1<<1, | 5062 | NL80211_SCAN_FLAG_FLUSH = 1<<1, |
| 5019 | NL80211_SCAN_FLAG_AP = 1<<2, | 5063 | NL80211_SCAN_FLAG_AP = 1<<2, |
| 5020 | NL80211_SCAN_FLAG_RANDOM_ADDR = 1<<3, | 5064 | NL80211_SCAN_FLAG_RANDOM_ADDR = 1<<3, |
| 5065 | NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME = 1<<4, | ||
| 5066 | NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1<<5, | ||
| 5067 | NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1<<6, | ||
| 5068 | NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1<<7, | ||
| 5021 | }; | 5069 | }; |
| 5022 | 5070 | ||
| 5023 | /** | 5071 | /** |
| @@ -258,6 +258,8 @@ enum ovs_vport_attr { · 257 unmodified lines | |||
| 258 | /* receiving upcalls */ | 258 | /* receiving upcalls */ |
| 259 | OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */ | 259 | OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */ |
| 260 | OVS_VPORT_ATTR_PAD, | 260 | OVS_VPORT_ATTR_PAD, |
| 261 | OVS_VPORT_ATTR_IFINDEX, | ||
| 262 | OVS_VPORT_ATTR_NETNSID, | ||
| 261 | __OVS_VPORT_ATTR_MAX | 263 | __OVS_VPORT_ATTR_MAX |
| 262 | }; | 264 | }; |
| 263 | 265 | ||
| @@ -334,6 +336,7 @@ enum ovs_key_attr { · 70 unmodified lines | |||
| 334 | OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking label */ | 336 | OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking label */ |
| 335 | OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4, /* struct ovs_key_ct_tuple_ipv4 */ | 337 | OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4, /* struct ovs_key_ct_tuple_ipv4 */ |
| 336 | OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, /* struct ovs_key_ct_tuple_ipv6 */ | 338 | OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, /* struct ovs_key_ct_tuple_ipv6 */ |
| 339 | OVS_KEY_ATTR_NSH, /* Nested set of ovs_nsh_key_* */ | ||
| 337 | 340 | ||
| 338 | #ifdef __KERNEL__ | 341 | #ifdef __KERNEL__ |
| 339 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */ | 342 | OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */ |
| @@ -360,6 +363,7 @@ enum ovs_tunnel_key_attr { · 20 unmodified lines | |||
| 360 | OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ | 363 | OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ |
| 361 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ | 364 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ |
| 362 | OVS_TUNNEL_KEY_ATTR_PAD, | 365 | OVS_TUNNEL_KEY_ATTR_PAD, |
| 366 | OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* be32 ERSPAN index. */ | ||
| 363 | __OVS_TUNNEL_KEY_ATTR_MAX | 367 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 364 | }; | 368 | }; |
| 365 | 369 | ||
| @@ -492,6 +496,30 @@ struct ovs_key_ct_tuple_ipv6 { · 126 unmodified lines | |||
| 492 | __u8 ipv6_proto; | 496 | __u8 ipv6_proto; |
| 493 | }; | 497 | }; |
| 494 | 498 | ||
| 499 | enum ovs_nsh_key_attr { | ||
| 500 | OVS_NSH_KEY_ATTR_UNSPEC, | ||
| 501 | OVS_NSH_KEY_ATTR_BASE, /* struct ovs_nsh_key_base. */ | ||
| 502 | OVS_NSH_KEY_ATTR_MD1, /* struct ovs_nsh_key_md1. */ | ||
| 503 | OVS_NSH_KEY_ATTR_MD2, /* variable-length octets for MD type 2. */ | ||
| 504 | __OVS_NSH_KEY_ATTR_MAX | ||
| 505 | }; | ||
| 506 | |||
| 507 | #define OVS_NSH_KEY_ATTR_MAX (__OVS_NSH_KEY_ATTR_MAX - 1) | ||
| 508 | |||
| 509 | struct ovs_nsh_key_base { | ||
| 510 | __u8 flags; | ||
| 511 | __u8 ttl; | ||
| 512 | __u8 mdtype; | ||
| 513 | __u8 np; | ||
| 514 | __be32 path_hdr; | ||
| 515 | }; | ||
| 516 | |||
| 517 | #define NSH_MD1_CONTEXT_SIZE 4 | ||
| 518 | |||
| 519 | struct ovs_nsh_key_md1 { | ||
| 520 | __be32 context[NSH_MD1_CONTEXT_SIZE]; | ||
| 521 | }; | ||
| 522 | |||
| 495 | /** | 523 | /** |
| 496 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. | 524 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. |
| 497 | * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow | 525 | * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow |
| @@ -807,6 +835,11 @@ struct ovs_action_push_eth { · 309 unmodified lines | |||
| 807 | * packet. | 835 | * packet. |
| 808 | * @OVS_ACTION_ATTR_POP_ETH: Pop the outermost Ethernet header off the | 836 | * @OVS_ACTION_ATTR_POP_ETH: Pop the outermost Ethernet header off the |
| 809 | * packet. | 837 | * packet. |
| 838 | * @OVS_ACTION_ATTR_CT_CLEAR: Clear conntrack state from the packet. | ||
| 839 | * @OVS_ACTION_ATTR_PUSH_NSH: push NSH header to the packet. | ||
| 840 | * @OVS_ACTION_ATTR_POP_NSH: pop the outermost NSH header off the packet. | ||
| 841 | * @OVS_ACTION_ATTR_METER: Run packet through a meter, which may drop the | ||
| 842 | * packet, or modify the packet (e.g., change the DSCP field). | ||
| 810 | * | 843 | * |
| 811 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all | 844 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all |
| 812 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment | 845 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment |
| @@ -836,6 +869,10 @@ enum ovs_action_attr { · 23 unmodified lines | |||
| 836 | OVS_ACTION_ATTR_TRUNC, /* u32 struct ovs_action_trunc. */ | 869 | OVS_ACTION_ATTR_TRUNC, /* u32 struct ovs_action_trunc. */ |
| 837 | OVS_ACTION_ATTR_PUSH_ETH, /* struct ovs_action_push_eth. */ | 870 | OVS_ACTION_ATTR_PUSH_ETH, /* struct ovs_action_push_eth. */ |
| 838 | OVS_ACTION_ATTR_POP_ETH, /* No argument. */ | 871 | OVS_ACTION_ATTR_POP_ETH, /* No argument. */ |
| 872 | OVS_ACTION_ATTR_CT_CLEAR, /* No argument. */ | ||
| 873 | OVS_ACTION_ATTR_PUSH_NSH, /* Nested OVS_NSH_KEY_ATTR_*. */ | ||
| 874 | OVS_ACTION_ATTR_POP_NSH, /* No argument. */ | ||
| 875 | OVS_ACTION_ATTR_METER, /* u32 meter ID. */ | ||
| 839 | 876 | ||
| 840 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted | 877 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted |
| 841 | * from userspace. */ | 878 | * from userspace. */ |
| @@ -849,4 +886,55 @@ enum ovs_action_attr { · 7 unmodified lines | |||
| 849 | 886 | ||
| 850 | #define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1) | 887 | #define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1) |
| 851 | 888 | ||
| 889 | /* Meters. */ | ||
| 890 | #define OVS_METER_FAMILY "ovs_meter" | ||
| 891 | #define OVS_METER_MCGROUP "ovs_meter" | ||
| 892 | #define OVS_METER_VERSION 0x1 | ||
| 893 | |||
| 894 | enum ovs_meter_cmd { | ||
| 895 | OVS_METER_CMD_UNSPEC, | ||
| 896 | OVS_METER_CMD_FEATURES, /* Get features supported by the datapath. */ | ||
| 897 | OVS_METER_CMD_SET, /* Add or modify a meter. */ | ||
| 898 | OVS_METER_CMD_DEL, /* Delete a meter. */ | ||
| 899 | OVS_METER_CMD_GET /* Get meter stats. */ | ||
| 900 | }; | ||
| 901 | |||
| 902 | enum ovs_meter_attr { | ||
| 903 | OVS_METER_ATTR_UNSPEC, | ||
| 904 | OVS_METER_ATTR_ID, /* u32 meter ID within datapath. */ | ||
| 905 | OVS_METER_ATTR_KBPS, /* No argument. If set, units in kilobits | ||
| 906 | * per second. Otherwise, units in | ||
| 907 | * packets per second. | ||
| 908 | */ | ||
| 909 | OVS_METER_ATTR_STATS, /* struct ovs_flow_stats for the meter. */ | ||
| 910 | OVS_METER_ATTR_BANDS, /* Nested attributes for meter bands. */ | ||
| 911 | OVS_METER_ATTR_USED, /* u64 msecs last used in monotonic time. */ | ||
| 912 | OVS_METER_ATTR_CLEAR, /* Flag to clear stats, used. */ | ||
| 913 | OVS_METER_ATTR_MAX_METERS, /* u32 number of meters supported. */ | ||
| 914 | OVS_METER_ATTR_MAX_BANDS, /* u32 max number of bands per meter. */ | ||
| 915 | OVS_METER_ATTR_PAD, | ||
| 916 | __OVS_METER_ATTR_MAX | ||
| 917 | }; | ||
| 918 | |||
| 919 | #define OVS_METER_ATTR_MAX (__OVS_METER_ATTR_MAX - 1) | ||
| 920 | |||
| 921 | enum ovs_band_attr { | ||
| 922 | OVS_BAND_ATTR_UNSPEC, | ||
| 923 | OVS_BAND_ATTR_TYPE, /* u32 OVS_METER_BAND_TYPE_* constant. */ | ||
| 924 | OVS_BAND_ATTR_RATE, /* u32 band rate in meter units (see above). */ | ||
| 925 | OVS_BAND_ATTR_BURST, /* u32 burst size in meter units. */ | ||
| 926 | OVS_BAND_ATTR_STATS, /* struct ovs_flow_stats for the band. */ | ||
| 927 | __OVS_BAND_ATTR_MAX | ||
| 928 | }; | ||
| 929 | |||
| 930 | #define OVS_BAND_ATTR_MAX (__OVS_BAND_ATTR_MAX - 1) | ||
| 931 | |||
| 932 | enum ovs_meter_band_type { | ||
| 933 | OVS_METER_BAND_TYPE_UNSPEC, | ||
| 934 | OVS_METER_BAND_TYPE_DROP, /* Drop exceeding packets. */ | ||
| 935 | __OVS_METER_BAND_TYPE_MAX | ||
| 936 | }; | ||
| 937 | |||
| 938 | #define OVS_METER_BAND_TYPE_MAX (__OVS_METER_BAND_TYPE_MAX - 1) | ||
| 939 | |||
| 852 | #endif /* _LINUX_OPENVSWITCH_H */ | 940 | #endif /* _LINUX_OPENVSWITCH_H */ |
| @@ -75,6 +75,7 @@ struct tc_estimator { · 74 unmodified lines | |||
| 75 | #define TC_H_INGRESS (0xFFFFFFF1U) | 75 | #define TC_H_INGRESS (0xFFFFFFF1U) |
| 76 | #define TC_H_CLSACT TC_H_INGRESS | 76 | #define TC_H_CLSACT TC_H_INGRESS |
| 77 | 77 | ||
| 78 | #define TC_H_MIN_PRIORITY 0xFFE0U | ||
| 78 | #define TC_H_MIN_INGRESS 0xFFF2U | 79 | #define TC_H_MIN_INGRESS 0xFFF2U |
| 79 | #define TC_H_MIN_EGRESS 0xFFF3U | 80 | #define TC_H_MIN_EGRESS 0xFFF3U |
| 80 | 81 | ||
| @@ -255,6 +256,7 @@ struct tc_red_qopt { · 174 unmodified lines | |||
| 255 | #define TC_RED_ECN 1 | 256 | #define TC_RED_ECN 1 |
| 256 | #define TC_RED_HARDDROP 2 | 257 | #define TC_RED_HARDDROP 2 |
| 257 | #define TC_RED_ADAPTATIVE 4 | 258 | #define TC_RED_ADAPTATIVE 4 |
| 259 | #define TC_RED_OFFLOADED 8 | ||
| 258 | }; | 260 | }; |
| 259 | 261 | ||
| 260 | struct tc_red_xstats { | 262 | struct tc_red_xstats { |
| @@ -535,6 +537,9 @@ enum { · 274 unmodified lines | |||
| 535 | TCA_NETEM_ECN, | 537 | TCA_NETEM_ECN, |
| 536 | TCA_NETEM_RATE64, | 538 | TCA_NETEM_RATE64, |
| 537 | TCA_NETEM_PAD, | 539 | TCA_NETEM_PAD, |
| 540 | TCA_NETEM_LATENCY64, | ||
| 541 | TCA_NETEM_JITTER64, | ||
| 542 | TCA_NETEM_SLOT, | ||
| 538 | __TCA_NETEM_MAX, | 543 | __TCA_NETEM_MAX, |
| 539 | }; | 544 | }; |
| 540 | 545 | ||
| @@ -572,6 +577,13 @@ struct tc_netem_rate { · 31 unmodified lines | |||
| 572 | __s32 cell_overhead; | 577 | __s32 cell_overhead; |
| 573 | }; | 578 | }; |
| 574 | 579 | ||
| 580 | struct tc_netem_slot { | ||
| 581 | __s64 min_delay; /* nsec */ | ||
| 582 | __s64 max_delay; | ||
| 583 | __s32 max_packets; | ||
| 584 | __s32 max_bytes; | ||
| 585 | }; | ||
| 586 | |||
| 575 | enum { | 587 | enum { |
| 576 | NETEM_LOSS_UNSPEC, | 588 | NETEM_LOSS_UNSPEC, |
| 577 | NETEM_LOSS_GI, /* General Intuitive - 4 state model */ | 589 | NETEM_LOSS_GI, /* General Intuitive - 4 state model */ |
| @@ -626,6 +638,22 @@ enum { · 48 unmodified lines | |||
| 626 | 638 | ||
| 627 | #define TC_MQPRIO_HW_OFFLOAD_MAX (__TC_MQPRIO_HW_OFFLOAD_MAX - 1) | 639 | #define TC_MQPRIO_HW_OFFLOAD_MAX (__TC_MQPRIO_HW_OFFLOAD_MAX - 1) |
| 628 | 640 | ||
| 641 | enum { | ||
| 642 | TC_MQPRIO_MODE_DCB, | ||
| 643 | TC_MQPRIO_MODE_CHANNEL, | ||
| 644 | __TC_MQPRIO_MODE_MAX | ||
| 645 | }; | ||
| 646 | |||
| 647 | #define __TC_MQPRIO_MODE_MAX (__TC_MQPRIO_MODE_MAX - 1) | ||
| 648 | |||
| 649 | enum { | ||
| 650 | TC_MQPRIO_SHAPER_DCB, | ||
| 651 | TC_MQPRIO_SHAPER_BW_RATE, /* Add new shapers below */ | ||
| 652 | __TC_MQPRIO_SHAPER_MAX | ||
| 653 | }; | ||
| 654 | |||
| 655 | #define __TC_MQPRIO_SHAPER_MAX (__TC_MQPRIO_SHAPER_MAX - 1) | ||
| 656 | |||
| 629 | struct tc_mqprio_qopt { | 657 | struct tc_mqprio_qopt { |
| 630 | __u8 num_tc; | 658 | __u8 num_tc; |
| 631 | __u8 prio_tc_map[TC_QOPT_BITMASK + 1]; | 659 | __u8 prio_tc_map[TC_QOPT_BITMASK + 1]; |
| @@ -634,6 +662,22 @@ struct tc_mqprio_qopt { · 2 unmodified lines | |||
| 634 | __u16 offset[TC_QOPT_MAX_QUEUE]; | 662 | __u16 offset[TC_QOPT_MAX_QUEUE]; |
| 635 | }; | 663 | }; |
| 636 | 664 | ||
| 665 | #define TC_MQPRIO_F_MODE 0x1 | ||
| 666 | #define TC_MQPRIO_F_SHAPER 0x2 | ||
| 667 | #define TC_MQPRIO_F_MIN_RATE 0x4 | ||
| 668 | #define TC_MQPRIO_F_MAX_RATE 0x8 | ||
| 669 | |||
| 670 | enum { | ||
| 671 | TCA_MQPRIO_UNSPEC, | ||
| 672 | TCA_MQPRIO_MODE, | ||
| 673 | TCA_MQPRIO_SHAPER, | ||
| 674 | TCA_MQPRIO_MIN_RATE64, | ||
| 675 | TCA_MQPRIO_MAX_RATE64, | ||
| 676 | __TCA_MQPRIO_MAX, | ||
| 677 | }; | ||
| 678 | |||
| 679 | #define TCA_MQPRIO_MAX (__TCA_MQPRIO_MAX - 1) | ||
| 680 | |||
| 637 | /* SFB */ | 681 | /* SFB */ |
| 638 | 682 | ||
| 639 | enum { | 683 | enum { |
| @@ -872,4 +916,23 @@ struct tc_pie_xstats { · 232 unmodified lines | |||
| 872 | __u32 maxq; /* maximum queue size */ | 916 | __u32 maxq; /* maximum queue size */ |
| 873 | __u32 ecn_mark; /* packets marked with ecn*/ | 917 | __u32 ecn_mark; /* packets marked with ecn*/ |
| 874 | }; | 918 | }; |
| 919 | |||
| 920 | /* CBS */ | ||
| 921 | struct tc_cbs_qopt { | ||
| 922 | __u8 offload; | ||
| 923 | __u8 _pad[3]; | ||
| 924 | __s32 hicredit; | ||
| 925 | __s32 locredit; | ||
| 926 | __s32 idleslope; | ||
| 927 | __s32 sendslope; | ||
| 928 | }; | ||
| 929 | |||
| 930 | enum { | ||
| 931 | TCA_CBS_UNSPEC, | ||
| 932 | TCA_CBS_PARMS, | ||
| 933 | __TCA_CBS_MAX, | ||
| 934 | }; | ||
| 935 | |||
| 936 | #define TCA_CBS_MAX (__TCA_CBS_MAX - 1) | ||
| 937 | |||
| 875 | #endif | 938 | #endif |
| @@ -5,10 +5,45 @@ · 4 unmodified lines | |||
| 5 | #include <linux/socket.h> | 5 | #include <linux/socket.h> |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | 7 | ||
| 8 | #define QRTR_NODE_BCAST 0xffffffffu | ||
| 9 | #define QRTR_PORT_CTRL 0xfffffffeu | ||
| 10 | |||
| 8 | struct sockaddr_qrtr { | 11 | struct sockaddr_qrtr { |
| 9 | __kernel_sa_family_t sq_family; | 12 | __kernel_sa_family_t sq_family; |
| 10 | __u32 sq_node; | 13 | __u32 sq_node; |
| 11 | __u32 sq_port; | 14 | __u32 sq_port; |
| 12 | }; | 15 | }; |
| 13 | 16 | ||
| 17 | enum qrtr_pkt_type { | ||
| 18 | QRTR_TYPE_DATA = 1, | ||
| 19 | QRTR_TYPE_HELLO = 2, | ||
| 20 | QRTR_TYPE_BYE = 3, | ||
| 21 | QRTR_TYPE_NEW_SERVER = 4, | ||
| 22 | QRTR_TYPE_DEL_SERVER = 5, | ||
| 23 | QRTR_TYPE_DEL_CLIENT = 6, | ||
| 24 | QRTR_TYPE_RESUME_TX = 7, | ||
| 25 | QRTR_TYPE_EXIT = 8, | ||
| 26 | QRTR_TYPE_PING = 9, | ||
| 27 | QRTR_TYPE_NEW_LOOKUP = 10, | ||
| 28 | QRTR_TYPE_DEL_LOOKUP = 11, | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct qrtr_ctrl_pkt { | ||
| 32 | __le32 cmd; | ||
| 33 | |||
| 34 | union { | ||
| 35 | struct { | ||
| 36 | __le32 service; | ||
| 37 | __le32 instance; | ||
| 38 | __le32 node; | ||
| 39 | __le32 port; | ||
| 40 | } server; | ||
| 41 | |||
| 42 | struct { | ||
| 43 | __le32 node; | ||
| 44 | __le32 port; | ||
| 45 | } client; | ||
| 46 | }; | ||
| 47 | } __packed; | ||
| 48 | |||
| 14 | #endif /* _LINUX_QRTR_H */ | 49 | #endif /* _LINUX_QRTR_H */ |
| @@ -431,6 +431,8 @@ enum { · 430 unmodified lines | |||
| 431 | #define RTAX_QUICKACK RTAX_QUICKACK | 431 | #define RTAX_QUICKACK RTAX_QUICKACK |
| 432 | RTAX_CC_ALGO, | 432 | RTAX_CC_ALGO, |
| 433 | #define RTAX_CC_ALGO RTAX_CC_ALGO | 433 | #define RTAX_CC_ALGO RTAX_CC_ALGO |
| 434 | RTAX_FASTOPEN_NO_COOKIE, | ||
| 435 | #define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE | ||
| 434 | __RTAX_MAX | 436 | __RTAX_MAX |
| 435 | }; | 437 | }; |
| 436 | 438 | ||
| @@ -20,12 +20,12 @@ · 19 unmodified lines | |||
| 20 | * RxRPC socket address | 20 | * RxRPC socket address |
| 21 | */ | 21 | */ |
| 22 | struct sockaddr_rxrpc { | 22 | struct sockaddr_rxrpc { |
| 23 | sa_family_t srx_family; /* address family */ | 23 | __kernel_sa_family_t srx_family; /* address family */ |
| 24 | u16 srx_service; /* service desired */ | 24 | __u16 srx_service; /* service desired */ |
| 25 | u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ | 25 | __u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ |
| 26 | u16 transport_len; /* length of transport address */ | 26 | __u16 transport_len; /* length of transport address */ |
| 27 | union { | 27 | union { |
| 28 | sa_family_t family; /* transport address family */ | 28 | __kernel_sa_family_t family; /* transport address family */ |
| 29 | struct sockaddr_in sin; /* IPv4 transport address */ | 29 | struct sockaddr_in sin; /* IPv4 transport address */ |
| 30 | struct sockaddr_in6 sin6; /* IPv6 transport address */ | 30 | struct sockaddr_in6 sin6; /* IPv6 transport address */ |
| 31 | } transport; | 31 | } transport; |
| @@ -123,6 +123,8 @@ typedef __s32 sctp_assoc_t; · 122 unmodified lines | |||
| 123 | #define SCTP_RESET_ASSOC 120 | 123 | #define SCTP_RESET_ASSOC 120 |
| 124 | #define SCTP_ADD_STREAMS 121 | 124 | #define SCTP_ADD_STREAMS 121 |
| 125 | #define SCTP_SOCKOPT_PEELOFF_FLAGS 122 | 125 | #define SCTP_SOCKOPT_PEELOFF_FLAGS 122 |
| 126 | #define SCTP_STREAM_SCHEDULER 123 | ||
| 127 | #define SCTP_STREAM_SCHEDULER_VALUE 124 | ||
| 126 | 128 | ||
| 127 | /* PR-SCTP policies */ | 129 | /* PR-SCTP policies */ |
| 128 | #define SCTP_PR_SCTP_NONE 0x0000 | 130 | #define SCTP_PR_SCTP_NONE 0x0000 |
| @@ -815,6 +817,12 @@ struct sctp_assoc_value { · 686 unmodified lines | |||
| 815 | uint32_t assoc_value; | 817 | uint32_t assoc_value; |
| 816 | }; | 818 | }; |
| 817 | 819 | ||
| 820 | struct sctp_stream_value { | ||
| 821 | sctp_assoc_t assoc_id; | ||
| 822 | uint16_t stream_id; | ||
| 823 | uint16_t stream_value; | ||
| 824 | }; | ||
| 825 | |||
| 818 | /* | 826 | /* |
| 819 | * 7.2.2 Peer Address Information | 827 | * 7.2.2 Peer Address Information |
| 820 | * | 828 | * |
| @@ -1089,4 +1097,12 @@ struct sctp_add_streams { · 268 unmodified lines | |||
| 1089 | uint16_t sas_outstrms; | 1097 | uint16_t sas_outstrms; |
| 1090 | }; | 1098 | }; |
| 1091 | 1099 | ||
| 1100 | /* SCTP Stream schedulers */ | ||
| 1101 | enum sctp_sched_type { | ||
| 1102 | SCTP_SS_FCFS, | ||
| 1103 | SCTP_SS_PRIO, | ||
| 1104 | SCTP_SS_RR, | ||
| 1105 | SCTP_SS_MAX = SCTP_SS_RR | ||
| 1106 | }; | ||
| 1107 | |||
| 1092 | #endif /* _UAPI_SCTP_H */ | 1108 | #endif /* _UAPI_SCTP_H */ |
| @@ -191,7 +191,6 @@ enum · 190 unmodified lines | |||
| 191 | LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */ | 191 | LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */ |
| 192 | LINUX_MIB_TCPSACKRECOVERY, /* TCPSackRecovery */ | 192 | LINUX_MIB_TCPSACKRECOVERY, /* TCPSackRecovery */ |
| 193 | LINUX_MIB_TCPSACKRENEGING, /* TCPSACKReneging */ | 193 | LINUX_MIB_TCPSACKRENEGING, /* TCPSACKReneging */ |
| 194 | LINUX_MIB_TCPFACKREORDER, /* TCPFACKReorder */ | ||
| 195 | LINUX_MIB_TCPSACKREORDER, /* TCPSACKReorder */ | 194 | LINUX_MIB_TCPSACKREORDER, /* TCPSACKReorder */ |
| 196 | LINUX_MIB_TCPRENOREORDER, /* TCPRenoReorder */ | 195 | LINUX_MIB_TCPRENOREORDER, /* TCPRenoReorder */ |
| 197 | LINUX_MIB_TCPTSREORDER, /* TCPTSReorder */ | 196 | LINUX_MIB_TCPTSREORDER, /* TCPTSReorder */ |
| @@ -10,13 +10,13 @@ · 9 unmodified lines | |||
| 10 | #define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */ | 10 | #define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */ |
| 11 | #define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ | 11 | #define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ |
| 12 | #define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ | 12 | #define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ |
| 13 | 13 | ||
| 14 | struct tc_mirred { | 14 | struct tc_mirred { |
| 15 | tc_gen; | 15 | tc_gen; |
| 16 | int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ | 16 | int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ |
| 17 | __u32 ifindex; /* ifindex of egress port */ | 17 | __u32 ifindex; /* ifindex of egress port */ |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | enum { | 20 | enum { |
| 21 | TCA_MIRRED_UNSPEC, | 21 | TCA_MIRRED_UNSPEC, |
| 22 | TCA_MIRRED_TM, | 22 | TCA_MIRRED_TM, |
| @@ -25,5 +25,5 @@ enum { · 2 unmodified lines | |||
| 25 | __TCA_MIRRED_MAX | 25 | __TCA_MIRRED_MAX |
| 26 | }; | 26 | }; |
| 27 | #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) | 27 | #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) |
| 28 | 28 | ||
| 29 | #endif | 29 | #endif |
| @@ -120,6 +120,8 @@ enum { · 119 unmodified lines | |||
| 120 | #define TCP_FASTOPEN_CONNECT 30 /* Attempt FastOpen with connect */ | 120 | #define TCP_FASTOPEN_CONNECT 30 /* Attempt FastOpen with connect */ |
| 121 | #define TCP_ULP 31 /* Attach a ULP to a TCP connection */ | 121 | #define TCP_ULP 31 /* Attach a ULP to a TCP connection */ |
| 122 | #define TCP_MD5SIG_EXT 32 /* TCP MD5 Signature with extensions */ | 122 | #define TCP_MD5SIG_EXT 32 /* TCP MD5 Signature with extensions */ |
| 123 | #define TCP_FASTOPEN_KEY 33 /* Set the key for Fast Open (cookie) */ | ||
| 124 | #define TCP_FASTOPEN_NO_COOKIE 34 /* Enable TFO without a TFO cookie */ | ||
| 123 | 125 | ||
| 124 | struct tcp_repair_opt { | 126 | struct tcp_repair_opt { |
| 125 | __u32 opt_code; | 127 | __u32 opt_code; |
| @@ -232,6 +232,21 @@ struct sockaddr_tipc { · 231 unmodified lines | |||
| 232 | #define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */ | 232 | #define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */ |
| 233 | #define TIPC_MCAST_BROADCAST 133 /* Default: TIPC selects. No arg */ | 233 | #define TIPC_MCAST_BROADCAST 133 /* Default: TIPC selects. No arg */ |
| 234 | #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */ | 234 | #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */ |
| 235 | #define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */ | ||
| 236 | #define TIPC_GROUP_LEAVE 136 /* No argument */ | ||
| 237 | |||
| 238 | /* | ||
| 239 | * Flag values | ||
| 240 | */ | ||
| 241 | #define TIPC_GROUP_LOOPBACK 0x1 /* Receive copy of sent msg when match */ | ||
| 242 | #define TIPC_GROUP_MEMBER_EVTS 0x2 /* Receive membership events in socket */ | ||
| 243 | |||
| 244 | struct tipc_group_req { | ||
| 245 | __u32 type; /* group id */ | ||
| 246 | __u32 instance; /* member id */ | ||
| 247 | __u32 scope; /* zone/cluster/node */ | ||
| 248 | __u32 flags; | ||
| 249 | }; | ||
| 235 | 250 | ||
| 236 | /* | 251 | /* |
| 237 | * Maximum sizes of TIPC bearer-related names (including terminating NULL) | 252 | * Maximum sizes of TIPC bearer-related names (including terminating NULL) |
| @@ -35,10 +35,6 @@ · 34 unmodified lines | |||
| 35 | #define _UAPI_LINUX_TLS_H | 35 | #define _UAPI_LINUX_TLS_H |
| 36 | 36 | ||
| 37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
| 38 | #include <asm/byteorder.h> | ||
| 39 | #include <linux/socket.h> | ||
| 40 | #include <linux/tcp.h> | ||
| 41 | #include <net/tcp.h> | ||
| 42 | 38 | ||
| 43 | /* TLS socket options */ | 39 | /* TLS socket options */ |
| 44 | #define TLS_TX 1 /* Set transmit parameters */ | 40 | #define TLS_TX 1 /* Set transmit parameters */ |
| @@ -0,0 +1,33 @@ | |||
| 1 | /* AF_VSOCK sock_diag(7) interface for querying open sockets */ | ||
| 2 | |||
| 3 | #ifndef _UAPI__VM_SOCKETS_DIAG_H__ | ||
| 4 | #define _UAPI__VM_SOCKETS_DIAG_H__ | ||
| 5 | |||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 8 | /* Request */ | ||
| 9 | struct vsock_diag_req { | ||
| 10 | __u8 sdiag_family; /* must be AF_VSOCK */ | ||
| 11 | __u8 sdiag_protocol; /* must be 0 */ | ||
| 12 | __u16 pad; /* must be 0 */ | ||
| 13 | __u32 vdiag_states; /* query bitmap (e.g. 1 << TCP_LISTEN) */ | ||
| 14 | __u32 vdiag_ino; /* must be 0 (reserved) */ | ||
| 15 | __u32 vdiag_show; /* must be 0 (reserved) */ | ||
| 16 | __u32 vdiag_cookie[2]; | ||
| 17 | }; | ||
| 18 | |||
| 19 | /* Response */ | ||
| 20 | struct vsock_diag_msg { | ||
| 21 | __u8 vdiag_family; /* AF_VSOCK */ | ||
| 22 | __u8 vdiag_type; /* SOCK_STREAM or SOCK_DGRAM */ | ||
| 23 | __u8 vdiag_state; /* sk_state (e.g. TCP_LISTEN) */ | ||
| 24 | __u8 vdiag_shutdown; /* local RCV_SHUTDOWN | SEND_SHUTDOWN */ | ||
| 25 | __u32 vdiag_src_cid; | ||
| 26 | __u32 vdiag_src_port; | ||
| 27 | __u32 vdiag_dst_cid; | ||
| 28 | __u32 vdiag_dst_port; | ||
| 29 | __u32 vdiag_ino; | ||
| 30 | __u32 vdiag_cookie[2]; | ||
| 31 | }; | ||
| 32 | |||
| 33 | #endif /* _UAPI__VM_SOCKETS_DIAG_H__ */ | ||