]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge tag 'net-next-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Aug 2022 23:29:08 +0000 (16:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Aug 2022 23:29:08 +0000 (16:29 -0700)
Pull networking changes from Paolo Abeni:
 "Core:

   - Refactor the forward memory allocation to better cope with memory
     pressure with many open sockets, moving from a per socket cache to
     a per-CPU one

   - Replace rwlocks with RCU for better fairness in ping, raw sockets
     and IP multicast router.

   - Network-side support for IO uring zero-copy send.

   - A few skb drop reason improvements, including codegen the source
     file with string mapping instead of using macro magic.

   - Rename reference tracking helpers to a more consistent netdev_*
     schema.

   - Adapt u64_stats_t type to address load/store tearing issues.

   - Refine debug helper usage to reduce the log noise caused by bots.

  BPF:

   - Improve socket map performance, avoiding skb cloning on read
     operation.

   - Add support for 64 bits enum, to match types exposed by kernel.

   - Introduce support for sleepable uprobes program.

   - Introduce support for enum textual representation in libbpf.

   - New helpers to implement synproxy with eBPF/XDP.

   - Improve loop performances, inlining indirect calls when possible.

   - Removed all the deprecated libbpf APIs.

   - Implement new eBPF-based LSM flavor.

   - Add type match support, which allow accurate queries to the eBPF
     used types.

   - A few TCP congetsion control framework usability improvements.

   - Add new infrastructure to manipulate CT entries via eBPF programs.

   - Allow for livepatch (KLP) and BPF trampolines to attach to the same
     kernel function.

  Protocols:

   - Introduce per network namespace lookup tables for unix sockets,
     increasing scalability and reducing contention.

   - Preparation work for Wi-Fi 7 Multi-Link Operation (MLO) support.

   - Add support to forciby close TIME_WAIT TCP sockets via user-space
     tools.

   - Significant performance improvement for the TLS 1.3 receive path,
     both for zero-copy and not-zero-copy.

   - Support for changing the initial MTPCP subflow priority/backup
     status

   - Introduce virtually contingus buffers for sockets over RDMA, to
     cope better with memory pressure.

   - Extend CAN ethtool support with timestamping capabilities

   - Refactor CAN build infrastructure to allow building only the needed
     features.

  Driver API:

   - Remove devlink mutex to allow parallel commands on multiple links.

   - Add support for pause stats in distributed switch.

   - Implement devlink helpers to query and flash line cards.

   - New helper for phy mode to register conversion.

  New hardware / drivers:

   - Ethernet DSA driver for the rockchip mt7531 on BPI-R2 Pro.

   - Ethernet DSA driver for the Renesas RZ/N1 A5PSW switch.

   - Ethernet DSA driver for the Microchip LAN937x switch.

   - Ethernet PHY driver for the Aquantia AQR113C EPHY.

   - CAN driver for the OBD-II ELM327 interface.

   - CAN driver for RZ/N1 SJA1000 CAN controller.

   - Bluetooth: Infineon CYW55572 Wi-Fi plus Bluetooth combo device.

  Drivers:

   - Intel Ethernet NICs:
      - i40e: add support for vlan pruning
      - i40e: add support for XDP framented packets
      - ice: improved vlan offload support
      - ice: add support for PPPoE offload

   - Mellanox Ethernet (mlx5)
      - refactor packet steering offload for performance and scalability
      - extend support for TC offload
      - refactor devlink code to clean-up the locking schema
      - support stacked vlans for bridge offloads
      - use TLS objects pool to improve connection rate

   - Netronome Ethernet NICs (nfp):
      - extend support for IPv6 fields mangling offload
      - add support for vepa mode in HW bridge
      - better support for virtio data path acceleration (VDPA)
      - enable TSO by default

   - Microsoft vNIC driver (mana)
      - add support for XDP redirect

   - Others Ethernet drivers:
      - bonding: add per-port priority support
      - microchip lan743x: extend phy support
      - Fungible funeth: support UDP segmentation offload and XDP xmit
      - Solarflare EF100: add support for virtual function representors
      - MediaTek SoC: add XDP support

   - Mellanox Ethernet/IB switch (mlxsw):
      - dropped support for unreleased H/W (XM router).
      - improved stats accuracy
      - unified bridge model coversion improving scalability (parts 1-6)
      - support for PTP in Spectrum-2 asics

   - Broadcom PHYs
      - add PTP support for BCM54210E
      - add support for the BCM53128 internal PHY

   - Marvell Ethernet switches (prestera):
      - implement support for multicast forwarding offload

   - Embedded Ethernet switches:
      - refactor OcteonTx MAC filter for better scalability
      - improve TC H/W offload for the Felix driver
      - refactor the Microchip ksz8 and ksz9477 drivers to share the
        probe code (parts 1, 2), add support for phylink mac
        configuration

   - Other WiFi:
      - Microchip wilc1000: diable WEP support and enable WPA3
      - Atheros ath10k: encapsulation offload support

  Old code removal:

   - Neterion vxge ethernet driver: this is untouched since more than 10 years"

* tag 'net-next-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1890 commits)
  doc: sfp-phylink: Fix a broken reference
  wireguard: selftests: support UML
  wireguard: allowedips: don't corrupt stack when detecting overflow
  wireguard: selftests: update config fragments
  wireguard: ratelimiter: use hrtimer in selftest
  net/mlx5e: xsk: Discard unaligned XSK frames on striding RQ
  net: usb: ax88179_178a: Bind only to vendor-specific interface
  selftests: net: fix IOAM test skip return code
  net: usb: make USB_RTL8153_ECM non user configurable
  net: marvell: prestera: remove reduntant code
  octeontx2-pf: Reduce minimum mtu size to 60
  net: devlink: Fix missing mutex_unlock() call
  net/tls: Remove redundant workqueue flush before destroy
  net: txgbe: Fix an error handling path in txgbe_probe()
  net: dsa: Fix spelling mistakes and cleanup code
  Documentation: devlink: add add devlink-selftests to the table of contents
  dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock
  net: ionic: fix error check for vlan flags in ionic_set_nic_features()
  net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr()
  nfp: flower: add support for tunnel offload without key ID
  ...

20 files changed:
1  2 
MAINTAINERS
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
arch/arm64/boot/dts/marvell/armada-8040-puzzle-m801.dts
arch/arm64/boot/dts/marvell/cn9130-db.dtsi
arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
include/linux/socket.h
include/uapi/linux/bpf.h
include/uapi/linux/pkt_cls.h
include/uapi/linux/seg6_iptunnel.h
include/uapi/linux/xfrm.h
kernel/bpf/bpf_iter.c
kernel/events/core.c
net/core/flow_dissector.c
net/socket.c
tools/perf/util/bpf-loader.c
tools/testing/selftests/net/Makefile
tools/testing/selftests/wireguard/qemu/kernel.config

diff --cc MAINTAINERS
Simple merge
index b9ba7c452a77ed46ef430b2c1fbdad777734b7eb,5f6ed735e31aa7921b516f9e78f5506a8003abec..7ca71f2d7afbbfe268cb93becaf93a7bdb7df2f2
        sfp_eth0: sfp-eth0 {
                compatible = "sff,sfp";
                i2c-bus = <&cp0_i2c1>;
-               los-gpio = <&sfp_gpio 3 GPIO_ACTIVE_HIGH>;
-               mod-def0-gpio = <&sfp_gpio 2 GPIO_ACTIVE_LOW>;
-               tx-disable-gpio = <&sfp_gpio 1 GPIO_ACTIVE_HIGH>;
-               tx-fault-gpio = <&sfp_gpio 0 GPIO_ACTIVE_HIGH>;
+               los-gpios = <&sfp_gpio 3 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&sfp_gpio 2 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&sfp_gpio 1 GPIO_ACTIVE_HIGH>;
 -              tx-fault-gpios  = <&sfp_gpio 0 GPIO_ACTIVE_HIGH>;
++              tx-fault-gpios = <&sfp_gpio 0 GPIO_ACTIVE_HIGH>;
        };
  
        /* SFP 1G */
        sfp_eth2: sfp-eth2 {
                compatible = "sff,sfp";
                i2c-bus = <&cp0_i2c0>;
-               los-gpio = <&sfp_gpio 7 GPIO_ACTIVE_HIGH>;
-               mod-def0-gpio = <&sfp_gpio 6 GPIO_ACTIVE_LOW>;
-               tx-disable-gpio = <&sfp_gpio 5 GPIO_ACTIVE_HIGH>;
-               tx-fault-gpio = <&sfp_gpio 4 GPIO_ACTIVE_HIGH>;
+               los-gpios = <&sfp_gpio 7 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&sfp_gpio 6 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&sfp_gpio 5 GPIO_ACTIVE_HIGH>;
 -              tx-fault-gpios  = <&sfp_gpio 4 GPIO_ACTIVE_HIGH>;
++              tx-fault-gpios = <&sfp_gpio 4 GPIO_ACTIVE_HIGH>;
        };
  };
  
index c0389dd17340aa5c1e573ea77578cb6bbf177f45,33c179838e24175b4e0a76016d7744ee51c27bef..ca1aeb69a8929931db866ec7b60b71b22fdfccc9
                /* CON15,16 - CPM lane 4 */
                compatible = "sff,sfp";
                i2c-bus = <&sfpp0_i2c>;
-               los-gpio = <&cp1_gpio1 28 GPIO_ACTIVE_HIGH>;
-               mod-def0-gpio = <&cp1_gpio1 27 GPIO_ACTIVE_LOW>;
-               tx-disable-gpio = <&cp1_gpio1 29 GPIO_ACTIVE_HIGH>;
-               tx-fault-gpio = <&cp1_gpio1 26 GPIO_ACTIVE_HIGH>;
+               los-gpios = <&cp1_gpio1 28 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&cp1_gpio1 27 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&cp1_gpio1 29 GPIO_ACTIVE_HIGH>;
 -              tx-fault-gpios  = <&cp1_gpio1 26 GPIO_ACTIVE_HIGH>;
++              tx-fault-gpios = <&cp1_gpio1 26 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
                pinctrl-0 = <&cp1_sfpp0_pins>;
                maximum-power-milliwatt = <2000>;
index cf868e0bbb9c62c2ffe7b4f13520aadf162cd475,72e9b0f671a901cd6a701bdff03e771b473681df..eb04735039362373bb9072f3184081d62c324d08
        sfp_cp0_eth0: sfp-cp0-eth0 {
                compatible = "sff,sfp";
                i2c-bus = <&sfpplus0_i2c>;
-               los-gpio = <&sfpplus_gpio 11 GPIO_ACTIVE_HIGH>;
-               mod-def0-gpio = <&sfpplus_gpio 10 GPIO_ACTIVE_LOW>;
-               tx-disable-gpio = <&sfpplus_gpio 9 GPIO_ACTIVE_HIGH>;
-               tx-fault-gpio = <&sfpplus_gpio 8 GPIO_ACTIVE_HIGH>;
+               los-gpios = <&sfpplus_gpio 11 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&sfpplus_gpio 10 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&sfpplus_gpio 9 GPIO_ACTIVE_HIGH>;
 -              tx-fault-gpios  = <&sfpplus_gpio 8 GPIO_ACTIVE_HIGH>;
++              tx-fault-gpios = <&sfpplus_gpio 8 GPIO_ACTIVE_HIGH>;
                maximum-power-milliwatt = <3000>;
        };
  
        sfp_cp1_eth0: sfp-cp1-eth0 {
                compatible = "sff,sfp";
                i2c-bus = <&sfpplus1_i2c>;
-               los-gpio = <&sfpplus_gpio 3 GPIO_ACTIVE_HIGH>;
-               mod-def0-gpio = <&sfpplus_gpio 2 GPIO_ACTIVE_LOW>;
-               tx-disable-gpio = <&sfpplus_gpio 1 GPIO_ACTIVE_HIGH>;
-               tx-fault-gpio = <&sfpplus_gpio 0 GPIO_ACTIVE_HIGH>;
+               los-gpios = <&sfpplus_gpio 3 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&sfpplus_gpio 2 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&sfpplus_gpio 1 GPIO_ACTIVE_HIGH>;
 -              tx-fault-gpios  = <&sfpplus_gpio 0 GPIO_ACTIVE_HIGH>;
++              tx-fault-gpios = <&sfpplus_gpio 0 GPIO_ACTIVE_HIGH>;
                maximum-power-milliwatt = <3000>;
        };
  
index 1d3ffbf3cde89faa2c20b59fcff88cee500a6383,7df8cfb1d3b9efbd01ed0378b4a89c99457589d2..5e34bd0b214d624c0ec13c0c9683a25403d68965
        status = "disabled";
  };
  
 +&i2s0_8ch {
 +      /* hdmi sound */
 +      status = "okay";
 +};
 +
+ &mdio0 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       switch@0 {
+               compatible = "mediatek,mt7531";
+               reg = <0>;
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       port@1 {
+                               reg = <1>;
+                               label = "lan0";
+                       };
+                       port@2 {
+                               reg = <2>;
+                               label = "lan1";
+                       };
+                       port@3 {
+                               reg = <3>;
+                               label = "lan2";
+                       };
+                       port@4 {
+                               reg = <4>;
+                               label = "lan3";
+                       };
+                       port@5 {
+                               reg = <5>;
+                               label = "cpu";
+                               ethernet = <&gmac0>;
+                               phy-mode = "rgmii";
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                                       pause;
+                               };
+                       };
+               };
+       };
+ };
  &mdio1 {
        rgmii_phy1: ethernet-phy@0 {
                compatible = "ethernet-phy-ieee802.3-c22";
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 6aee04f75e3e4128839e064291dccdcaa311e15c,237d396b6e41780fbde475fe143b53af8c4d3956..764c4cb3fe8f41d3ff9c4f9a981563d7296b2c72
@@@ -895,6 -895,11 +895,11 @@@ bool bpf_flow_dissect(struct bpf_prog *
        return result == BPF_OK;
  }
  
 -static bool is_pppoe_ses_hdr_valid(struct pppoe_hdr hdr)
++static bool is_pppoe_ses_hdr_valid(const struct pppoe_hdr *hdr)
+ {
 -      return hdr.ver == 1 && hdr.type == 1 && hdr.code == 0;
++      return hdr->ver == 1 && hdr->type == 1 && hdr->code == 0;
+ }
  /**
   * __skb_flow_dissect - extract the flow_keys struct and return it
   * @net: associated network namespace, derived from @skb if NULL
@@@ -1220,17 -1227,37 +1227,37 @@@ proto_again
                        break;
                }
  
-               nhoff += PPPOE_SES_HLEN;
-               switch (hdr->proto) {
-               case htons(PPP_IP):
 -              if (!is_pppoe_ses_hdr_valid(hdr->hdr)) {
++              if (!is_pppoe_ses_hdr_valid(&hdr->hdr)) {
+                       fdret = FLOW_DISSECT_RET_OUT_BAD;
+                       break;
+               }
+               /* least significant bit of the most significant octet
+                * indicates if protocol field was compressed
+                */
+               ppp_proto = ntohs(hdr->proto);
+               if (ppp_proto & 0x0100) {
+                       ppp_proto = ppp_proto >> 8;
+                       nhoff += PPPOE_SES_HLEN - 1;
+               } else {
+                       nhoff += PPPOE_SES_HLEN;
+               }
+               if (ppp_proto == PPP_IP) {
                        proto = htons(ETH_P_IP);
                        fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
-                       break;
-               case htons(PPP_IPV6):
+               } else if (ppp_proto == PPP_IPV6) {
                        proto = htons(ETH_P_IPV6);
                        fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
-                       break;
-               default:
+               } else if (ppp_proto == PPP_MPLS_UC) {
+                       proto = htons(ETH_P_MPLS_UC);
+                       fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
+               } else if (ppp_proto == PPP_MPLS_MC) {
+                       proto = htons(ETH_P_MPLS_MC);
+                       fdret = FLOW_DISSECT_RET_PROTO_AGAIN;
+               } else if (ppp_proto_is_valid(ppp_proto)) {
+                       fdret = FLOW_DISSECT_RET_OUT_GOOD;
+               } else {
                        fdret = FLOW_DISSECT_RET_OUT_BAD;
                        break;
                }
diff --cc net/socket.c
Simple merge
Simple merge
Simple merge