Pull networking updates from Paolo Abeni: "Core: - Allow live renaming when an interface is up - Add retpoline wrappers for tc, improving considerably the performances of complex queue discipline configurations - Add inet drop monitor support - A few GRO performance improvements - Add infrastructure for atomic dev stats, addressing long standing data races - De-duplicate common code between OVS and conntrack offloading infrastructure - A bunch of UBSAN_BOUNDS/FORTIFY_SOURCE improvements - Netfilter: introduce packet parser for tunneled packets - Replace IPVS timer-based estimators with kthreads to scale up the workload with the number of available CPUs - Add the helper support for connection-tracking OVS offload BPF: - Support for user defined BPF objects: the use case is to allocate own objects, build own object hierarchies and use the building blocks to build own data structures flexibly, for example, linked lists in BPF - Make cgroup local storage available to non-cgroup attached BPF programs - Avoid unnecessary deadlock detection and failures wrt BPF task storage helpers - A relevant bunch of BPF verifier fixes and improvements - Veristat tool improvements to support custom filtering, sorting, and replay of results - Add LLVM disassembler as default library for dumping JITed code - Lots of new BPF documentation for various BPF maps - Add bpf_rcu_read_{,un}lock() support for sleepable programs - Add RCU grace period chaining to BPF to wait for the completion of access from both sleepable and non-sleepable BPF programs - Add support storing struct task_struct objects as kptrs in maps - Improve helper UAPI by explicitly defining BPF_FUNC_xxx integer values - Add libbpf *_opts API-variants for bpf_*_get_fd_by_id() functions Protocols: - TCP: implement Protective Load Balancing across switch links - TCP: allow dynamically disabling TCP-MD5 static key, reverting back to fast[er]-path - UDP: Introduce optional per-netns hash lookup table - IPv6: simplify and cleanup sockets disposal - Netlink: support different type policies for each generic netlink operation - MPTCP: add MSG_FASTOPEN and FastOpen listener side support - MPTCP: add netlink notification support for listener sockets events - SCTP: add VRF support, allowing sctp sockets binding to VRF devices - Add bridging MAC Authentication Bypass (MAB) support - Extensions for Ethernet VPN bridging implementation to better support multicast scenarios - More work for Wi-Fi 7 support, comprising conversion of all the existing drivers to internal TX queue usage - IPSec: introduce a new offload type (packet offload) allowing complete header processing and crypto offloading - IPSec: extended ack support for more descriptive XFRM error reporting - RXRPC: increase SACK table size and move processing into a per-local endpoint kernel thread, reducing considerably the required locking - IEEE 802154: synchronous send frame and extended filtering support, initial support for scanning available 15.4 networks - Tun: bump the link speed from 10Mbps to 10Gbps - Tun/VirtioNet: implement UDP segmentation offload support Driver API: - PHY/SFP: improve power level switching between standard level 1 and the higher power levels - New API for netdev <-> devlink_port linkage - PTP: convert existing drivers to new frequency adjustment implementation - DSA: add support for rx offloading - Autoload DSA tagging driver when dynamically changing protocol - Add new PCP and APPTRUST attributes to Data Center Bridging - Add configuration support for 800Gbps link speed - Add devlink port function attribute to enable/disable RoCE and migratable - Extend devlink-rate to support strict prioriry and weighted fair queuing - Add devlink support to directly reading from region memory - New device tree helper to fetch MAC address from nvmem - New big TCP helper to simplify temporary header stripping New hardware / drivers: - Ethernet: - Marvel Octeon CNF95N and CN10KB Ethernet Switches - Marvel Prestera AC5X Ethernet Switch - WangXun 10 Gigabit NIC - Motorcomm yt8521 Gigabit Ethernet - Microchip ksz9563 Gigabit Ethernet Switch - Microsoft Azure Network Adapter - Linux Automation 10Base-T1L adapter - PHY: - Aquantia AQR112 and AQR412 - Motorcomm YT8531S - PTP: - Orolia ART-CARD - WiFi: - MediaTek Wi-Fi 7 (802.11be) devices - RealTek rtw8821cu, rtw8822bu, rtw8822cu and rtw8723du USB devices - Bluetooth: - Broadcom BCM4377/4378/4387 Bluetooth chipsets - Realtek RTL8852BE and RTL8723DS - Cypress.CYW4373A0 WiFi + Bluetooth combo device Drivers: - CAN: - gs_usb: bus error reporting support - kvaser_usb: listen only and bus error reporting support - Ethernet NICs: - Intel (100G): - extend action skbedit to RX queue mapping - implement devlink-rate support - support direct read from memory - nVidia/Mellanox (mlx5): - SW steering improvements, increasing rules update rate - Support for enhanced events compression - extend H/W offload packet manipulation capabilities - implement IPSec packet offload mode - nVidia/Mellanox (mlx4): - better big TCP support - Netronome Ethernet NICs (nfp): - IPsec offload support - add support for multicast filter - Broadcom: - RSS and PTP support improvements - AMD/SolarFlare: - netlink extened ack improvements - add basic flower matches to offload, and related stats - Virtual NICs: - ibmvnic: introduce affinity hint support - small / embedded: - FreeScale fec: add initial XDP support - Marvel mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood - TI am65-cpsw: add suspend/resume support - Mediatek MT7986: add RX wireless wthernet dispatch support - Realtek 8169: enable GRO software interrupt coalescing per default - Ethernet high-speed switches: - Microchip (sparx5): - add support for Sparx5 TC/flower H/W offload via VCAP - Mellanox mlxsw: - add 802.1X and MAC Authentication Bypass offload support - add ip6gre support - Embedded Ethernet switches: - Mediatek (mtk_eth_soc): - improve PCS implementation, add DSA untag support - enable flow offload support - Renesas: - add rswitch R-Car Gen4 gPTP support - Microchip (lan966x): - add full XDP support - add TC H/W offload via VCAP - enable PTP on bridge interfaces - Microchip (ksz8): - add MTU support for KSZ8 series - Qualcomm 802.11ax WiFi (ath11k): - support configuring channel dwell time during scan - MediaTek WiFi (mt76): - enable Wireless Ethernet Dispatch (WED) offload support - add ack signal support - enable coredump support - remain_on_channel support - Intel WiFi (iwlwifi): - enable Wi-Fi 7 Extremely High Throughput (EHT) PHY capabilities - 320 MHz channels support - RealTek WiFi (rtw89): - new dynamic header firmware format support - wake-over-WLAN support" * tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2002 commits) ipvs: fix type warning in do_div() on 32 bit net: lan966x: Remove a useless test in lan966x_ptp_add_trap() net: ipa: add IPA v4.7 support dt-bindings: net: qcom,ipa: Add SM6350 compatible bnxt: Use generic HBH removal helper in tx path IPv6/GRO: generic helper to remove temporary HBH/jumbo header in driver selftests: forwarding: Add bridge MDB test selftests: forwarding: Rename bridge_mdb test bridge: mcast: Support replacement of MDB port group entries bridge: mcast: Allow user space to specify MDB entry routing protocol bridge: mcast: Allow user space to add (*, G) with a source list and filter mode bridge: mcast: Add support for (*, G) with a source list and filter mode bridge: mcast: Avoid arming group timer when (S, G) corresponds to a source bridge: mcast: Add a flag for user installed source entries bridge: mcast: Expose __br_multicast_del_group_src() bridge: mcast: Expose br_multicast_new_group_src() bridge: mcast: Add a centralized error path bridge: mcast: Place netlink policy before validation functions bridge: mcast: Split (*, G) and (S, G) addition into different functions bridge: mcast: Do not derive entry type from its filter mode ...
Showing the changes to scripts (1 of 2013 files). Show all
Unified · Split
| @@ -97,6 +97,7 @@ class HeaderParser(object): · 96 unmodified lines | |||
| 97 | self.desc_unique_helpers = set() | 97 | self.desc_unique_helpers = set() |
| 98 | self.define_unique_helpers = [] | 98 | self.define_unique_helpers = [] |
| 99 | self.helper_enum_vals = {} | 99 | self.helper_enum_vals = {} |
| 100 | self.helper_enum_pos = {} | ||
| 100 | self.desc_syscalls = [] | 101 | self.desc_syscalls = [] |
| 101 | self.enum_syscalls = [] | 102 | self.enum_syscalls = [] |
| 102 | 103 | ||
| @@ -253,54 +254,71 @@ class HeaderParser(object): · 150 unmodified lines | |||
| 253 | break | 254 | break |
| 254 | 255 | ||
| 255 | def parse_define_helpers(self): | 256 | def parse_define_helpers(self): |
| 256 | # Parse FN(...) in #define __BPF_FUNC_MAPPER to compare later with the | 257 | # Parse FN(...) in #define ___BPF_FUNC_MAPPER to compare later with the |
| 257 | # number of unique function names present in description and use the | 258 | # number of unique function names present in description and use the |
| 258 | # correct enumeration value. | 259 | # correct enumeration value. |
| 259 | # Note: seek_to(..) discards the first line below the target search text, | 260 | # Note: seek_to(..) discards the first line below the target search text, |
| 260 | # resulting in FN(unspec) being skipped and not added to self.define_unique_helpers. | 261 | # resulting in FN(unspec, 0, ##ctx) being skipped and not added to |
| 261 | self.seek_to('#define __BPF_FUNC_MAPPER(FN)', | 262 | # self.define_unique_helpers. |
| 263 | self.seek_to('#define ___BPF_FUNC_MAPPER(FN, ctx...)', | ||
| 262 | 'Could not find start of eBPF helper definition list') | 264 | 'Could not find start of eBPF helper definition list') |
| 263 | # Searches for one FN(\w+) define or a backslash for newline | 265 | # Searches for one FN(\w+) define or a backslash for newline |
| 264 | p = re.compile('\s*FN\((\w+)\)|\\\\') | 266 | p = re.compile('\s*FN\((\w+), (\d+), ##ctx\)|\\\\') |
| 265 | fn_defines_str = '' | 267 | fn_defines_str = '' |
| 266 | i = 1 # 'unspec' is skipped as mentioned above | 268 | i = 0 |
| 267 | while True: | 269 | while True: |
| 268 | capture = p.match(self.line) | 270 | capture = p.match(self.line) |
| 269 | if capture: | 271 | if capture: |
| 270 | fn_defines_str += self.line | 272 | fn_defines_str += self.line |
| 271 | self.helper_enum_vals[capture.expand(r'bpf_\1')] = i | 273 | helper_name = capture.expand(r'bpf_\1') |
| 274 | self.helper_enum_vals[helper_name] = int(capture[2]) | ||
| 275 | self.helper_enum_pos[helper_name] = i | ||
| 272 | i += 1 | 276 | i += 1 |
| 273 | else: | 277 | else: |
| 274 | break | 278 | break |
| 275 | self.line = self.reader.readline() | 279 | self.line = self.reader.readline() |
| 276 | # Find the number of occurences of FN(\w+) | 280 | # Find the number of occurences of FN(\w+) |
| 277 | self.define_unique_helpers = re.findall('FN\(\w+\)', fn_defines_str) | 281 | self.define_unique_helpers = re.findall('FN\(\w+, \d+, ##ctx\)', fn_defines_str) |
| 278 | 282 | ||
| 279 | def assign_helper_values(self): | 283 | def validate_helpers(self): |
| 284 | last_helper = '' | ||
| 280 | seen_helpers = set() | 285 | seen_helpers = set() |
| 286 | seen_enum_vals = set() | ||
| 287 | i = 0 | ||
| 281 | for helper in self.helpers: | 288 | for helper in self.helpers: |
| 282 | proto = helper.proto_break_down() | 289 | proto = helper.proto_break_down() |
| 283 | name = proto['name'] | 290 | name = proto['name'] |
| 284 | try: | 291 | try: |
| 285 | enum_val = self.helper_enum_vals[name] | 292 | enum_val = self.helper_enum_vals[name] |
| 293 | enum_pos = self.helper_enum_pos[name] | ||
| 286 | except KeyError: | 294 | except KeyError: |
| 287 | raise Exception("Helper %s is missing from enum bpf_func_id" % name) | 295 | raise Exception("Helper %s is missing from enum bpf_func_id" % name) |
| 288 | 296 | ||
| 297 | if name in seen_helpers: | ||
| 298 | if last_helper != name: | ||
| 299 | raise Exception("Helper %s has multiple descriptions which are not grouped together" % name) | ||
| 300 | continue | ||
| 301 | |||
| 289 | # Enforce current practice of having the descriptions ordered | 302 | # Enforce current practice of having the descriptions ordered |
| 290 | # by enum value. | 303 | # by enum value. |
| 304 | if enum_pos != i: | ||
| 305 | raise Exception("Helper %s (ID %d) comment order (#%d) must be aligned with its position (#%d) in enum bpf_func_id" % (name, enum_val, i + 1, enum_pos + 1)) | ||
| 306 | if enum_val in seen_enum_vals: | ||
| 307 | raise Exception("Helper %s has duplicated value %d" % (name, enum_val)) | ||
| 308 | |||
| 291 | seen_helpers.add(name) | 309 | seen_helpers.add(name) |
| 292 | desc_val = len(seen_helpers) | 310 | last_helper = name |
| 293 | if desc_val != enum_val: | 311 | seen_enum_vals.add(enum_val) |
| 294 | raise Exception("Helper %s comment order (#%d) must be aligned with its position (#%d) in enum bpf_func_id" % (name, desc_val, enum_val)) | ||
| 295 | 312 | ||
| 296 | helper.enum_val = enum_val | 313 | helper.enum_val = enum_val |
| 314 | i += 1 | ||
| 297 | 315 | ||
| 298 | def run(self): | 316 | def run(self): |
| 299 | self.parse_desc_syscall() | 317 | self.parse_desc_syscall() |
| 300 | self.parse_enum_syscall() | 318 | self.parse_enum_syscall() |
| 301 | self.parse_desc_helpers() | 319 | self.parse_desc_helpers() |
| 302 | self.parse_define_helpers() | 320 | self.parse_define_helpers() |
| 303 | self.assign_helper_values() | 321 | self.validate_helpers() |
| 304 | self.reader.close() | 322 | self.reader.close() |
| 305 | 323 | ||
| 306 | ############################################################################### | 324 | ############################################################################### |
| @@ -423,7 +441,7 @@ class PrinterHelpersRST(PrinterRST): · 116 unmodified lines | |||
| 423 | """ | 441 | """ |
| 424 | def __init__(self, parser): | 442 | def __init__(self, parser): |
| 425 | self.elements = parser.helpers | 443 | self.elements = parser.helpers |
| 426 | self.elem_number_check(parser.desc_unique_helpers, parser.define_unique_helpers, 'helper', '__BPF_FUNC_MAPPER') | 444 | self.elem_number_check(parser.desc_unique_helpers, parser.define_unique_helpers, 'helper', '___BPF_FUNC_MAPPER') |
| 427 | 445 | ||
| 428 | def print_header(self): | 446 | def print_header(self): |
| 429 | header = '''\ | 447 | header = '''\ |
| @@ -636,7 +654,7 @@ class PrinterHelpers(Printer): · 206 unmodified lines | |||
| 636 | """ | 654 | """ |
| 637 | def __init__(self, parser): | 655 | def __init__(self, parser): |
| 638 | self.elements = parser.helpers | 656 | self.elements = parser.helpers |
| 639 | self.elem_number_check(parser.desc_unique_helpers, parser.define_unique_helpers, 'helper', '__BPF_FUNC_MAPPER') | 657 | self.elem_number_check(parser.desc_unique_helpers, parser.define_unique_helpers, 'helper', '___BPF_FUNC_MAPPER') |
| 640 | 658 | ||
| 641 | type_fwds = [ | 659 | type_fwds = [ |
| 642 | 'struct bpf_fib_lookup', | 660 | 'struct bpf_fib_lookup', |
| @@ -667,6 +685,7 @@ class PrinterHelpers(Printer): · 24 unmodified lines | |||
| 667 | 'struct udp6_sock', | 685 | 'struct udp6_sock', |
| 668 | 'struct unix_sock', | 686 | 'struct unix_sock', |
| 669 | 'struct task_struct', | 687 | 'struct task_struct', |
| 688 | 'struct cgroup', | ||
| 670 | 689 | ||
| 671 | 'struct __sk_buff', | 690 | 'struct __sk_buff', |
| 672 | 'struct sk_msg_md', | 691 | 'struct sk_msg_md', |
| @@ -724,6 +743,7 @@ class PrinterHelpers(Printer): · 51 unmodified lines | |||
| 724 | 'struct udp6_sock', | 743 | 'struct udp6_sock', |
| 725 | 'struct unix_sock', | 744 | 'struct unix_sock', |
| 726 | 'struct task_struct', | 745 | 'struct task_struct', |
| 746 | 'struct cgroup', | ||
| 727 | 'struct path', | 747 | 'struct path', |
| 728 | 'struct btf_ptr', | 748 | 'struct btf_ptr', |
| 729 | 'struct inode', | 749 | 'struct inode', |
| @@ -732,6 +752,7 @@ class PrinterHelpers(Printer): · 2 unmodified lines | |||
| 732 | 'struct bpf_timer', | 752 | 'struct bpf_timer', |
| 733 | 'struct mptcp_sock', | 753 | 'struct mptcp_sock', |
| 734 | 'struct bpf_dynptr', | 754 | 'struct bpf_dynptr', |
| 755 | 'const struct bpf_dynptr', | ||
| 735 | 'struct iphdr', | 756 | 'struct iphdr', |
| 736 | 'struct ipv6hdr', | 757 | 'struct ipv6hdr', |
| 737 | } | 758 | } |