Commit 8096acd7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Jakub Kicinski.
 "Including fixes from bpf and netfilter.

  Current release - regressions:

   - sock: fix parameter order in sock_setsockopt()

  Current release - new code bugs:

   - netfilter: nft_last:
       - fix incorrect arithmetic when restoring last used
       - honor NFTA_LAST_SET on restoration

  Previous releases - regressions:

   - udp: properly flush normal packet at GRO time

   - sfc: ensure correct number of XDP queues; don't allow enabling the
     feature if there isn't sufficient resources to Tx from any CPU

   - dsa: sja1105: fix address learning getting disabled on the CPU port

   - mptcp: addresses a rmem accounting issue that could keep packets in
     subflow receive buffers longer than necessary, delaying MPTCP-level
     ACKs

   - ip_tunnel: fix mtu calculation for ETHER tunnel devices

   - do not reuse skbs allocated from skbuff_fclone_cache in the napi
     skb cache, we'd try to return them to the wrong slab cache

   - tcp: consistently disable header prediction for mptcp

  Previous releases - always broken:

   - bpf: fix subprog poke descriptor tracking use-after-free

   - ipv6:
       - allocate enough headroom in ip6_finish_output2() in case
         iptables TEE is used
       - tcp: drop silly ICMPv6 packet too big messages to avoid
         expensive and pointless lookups (which may serve as a DDOS
         vector)
       - make sure fwmark is copied in SYNACK packets
       - fix 'disable_policy' for forwarded packets (align with IPv4)

   - netfilter: conntrack:
       - do not renew entry stuck in tcp SYN_SENT state
       - do not mark RST in the reply direction coming after SYN packet
         for an out-of-sync entry

   - mptcp: cleanly handle error conditions with MP_JOIN and syncookies

   - mptcp: fix double free when rejecting a join due to port mismatch

   - validate lwtstate->data before returning from skb_tunnel_info()

   - tcp: call sk_wmem_schedule before sk_mem_charge in zerocopy path

   - mt76: mt7921: continue to probe driver when fw already downloaded

   - bonding: fix multiple issues with offloading IPsec to (thru?) bond

   - stmmac: ptp: fix issues around Qbv support and setting time back

   - bcmgenet: always clear wake-up based on energy detection

  Misc:

   - sctp: move 198 addresses from unusable to private scope

   - ptp: support virtual clocks and timestamping

   - openvswitch: optimize operation for key comparison"

* tag 'net-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (158 commits)
  net: dsa: properly check for the bridge_leave methods in dsa_switch_bridge_leave()
  sfc: add logs explaining XDP_TX/REDIRECT is not available
  sfc: ensure correct number of XDP queues
  sfc: fix lack of XDP TX queues - error XDP TX failed (-22)
  net: fddi: fix UAF in fza_probe
  net: dsa: sja1105: fix address learning getting disabled on the CPU port
  net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload
  net: Use nlmsg_unicast() instead of netlink_unicast()
  octeontx2-pf: Fix uninitialized boolean variable pps
  ipv6: allocate enough headroom in ip6_finish_output2()
  net: hdlc: rename 'mod_init' & 'mod_exit' functions to be module-specific
  net: bridge: multicast: fix MRD advertisement router port marking race
  net: bridge: multicast: fix PIM hello router port marking race
  net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340
  dsa: fix for_each_child.cocci warnings
  virtio_net: check virtqueue_add_sgs() return value
  mptcp: properly account bulk freed memory
  selftests: mptcp: fix case multiple subflows limited by server
  mptcp: avoid processing packet if a subflow reset
  mptcp: fix syncookie process if mptcp can not_accept new subflow
  ...
parents d1d488d8 bcb9928a
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -33,6 +33,13 @@ Description:
		frequency adjustment value (a positive integer) in
		parts per billion.

What:		/sys/class/ptp/ptpN/max_vclocks
Date:		May 2021
Contact:	Yangbo Lu <yangbo.lu@nxp.com>
Description:
		This file contains the maximum number of ptp vclocks.
		Write integer to re-configure it.

What:		/sys/class/ptp/ptpN/n_alarms
Date:		September 2010
Contact:	Richard Cochran <richardcochran@gmail.com>
@@ -61,6 +68,19 @@ Description:
		This file contains the number of programmable pins
		offered by the PTP hardware clock.

What:		/sys/class/ptp/ptpN/n_vclocks
Date:		May 2021
Contact:	Yangbo Lu <yangbo.lu@nxp.com>
Description:
		This file contains the number of virtual PTP clocks in
		use.  By default, the value is 0 meaning that only the
		physical clock is in use.  Setting the value creates
		the corresponding number of virtual clocks and causes
		the physical clock to become free running.  Setting the
		value back to 0 deletes the virtual clocks and
		switches the physical clock back to normal, adjustable
		operation.

What:		/sys/class/ptp/ptpN/pins
Date:		March 2014
Contact:	Richard Cochran <richardcochran@gmail.com>
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt

For the properties relevant to the ethernet controller connected to the GPMC
refer to the binding documentation of the device. For example, the documentation
for the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt
for the SMSC 911x is Documentation/devicetree/bindings/net/smsc,lan9115.yaml

Child nodes need to specify the GPMC bus address width using the "bank-width"
property but is possible that an ethernet controller also has a property to
+110 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/smsc,lan9115.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller

maintainers:
  - Shawn Guo <shawnguo@kernel.org>

allOf:
  - $ref: ethernet-controller.yaml#

properties:
  compatible:
    oneOf:
      - const: smsc,lan9115
      - items:
          - enum:
              - smsc,lan89218
              - smsc,lan9117
              - smsc,lan9118
              - smsc,lan9220
              - smsc,lan9221
          - const: smsc,lan9115

  reg:
    maxItems: 1

  reg-shift: true

  reg-io-width:
    enum: [ 2, 4 ]
    default: 2

  interrupts:
    minItems: 1
    items:
      - description:
          LAN interrupt line
      - description:
          Optional PME (power management event) interrupt that is able to wake
          up the host system with a 50ms pulse on network activity

  clocks:
    maxItems: 1

  phy-mode: true

  smsc,irq-active-high:
    type: boolean
    description: Indicates the IRQ polarity is active-high

  smsc,irq-push-pull:
    type: boolean
    description: Indicates the IRQ type is push-pull

  smsc,force-internal-phy:
    type: boolean
    description: Forces SMSC LAN controller to use internal PHY

  smsc,force-external-phy:
    type: boolean
    description: Forces SMSC LAN controller to use external PHY

  smsc,save-mac-address:
    type: boolean
    description:
      Indicates that MAC address needs to be saved before resetting the
      controller

  reset-gpios:
    maxItems: 1
    description:
      A GPIO line connected to the RESET (active low) signal of the device.
      On many systems this is wired high so the device goes out of reset at
      power-on, but if it is under program control, this optional GPIO can
      wake up in response to it.

  vdd33a-supply:
    description: 3.3V analog power supply

  vddvario-supply:
    description: IO logic power supply

required:
  - compatible
  - reg
  - interrupts

# There are lots of bus-specific properties ("qcom,*", "samsung,*", "fsl,*",
# "gpmc,*", ...) to be found, that actually depend on the compatible value of
# the parent node.
additionalProperties: true

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    ethernet@f4000000 {
            compatible = "smsc,lan9220", "smsc,lan9115";
            reg = <0xf4000000 0x2000000>;
            phy-mode = "mii";
            interrupt-parent = <&gpio1>;
            interrupts = <31>, <32>;
            reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
            reg-io-width = <4>;
            smsc,irq-push-pull;
    };
+0 −43
Original line number Diff line number Diff line
* Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller

Required properties:
- compatible : Should be "smsc,lan<model>", "smsc,lan9115"
- reg : Address and length of the io space for SMSC LAN
- interrupts : one or two interrupt specifiers
  - The first interrupt is the SMSC LAN interrupt line
  - The second interrupt (if present) is the PME (power
    management event) interrupt that is able to wake up the host
     system with a 50ms pulse on network activity
- phy-mode : See ethernet.txt file in the same directory

Optional properties:
- reg-shift : Specify the quantity to shift the register offsets by
- reg-io-width : Specify the size (in bytes) of the IO accesses that
  should be performed on the device.  Valid value for SMSC LAN is
  2 or 4.  If it's omitted or invalid, the size would be 2.
- smsc,irq-active-high : Indicates the IRQ polarity is active-high
- smsc,irq-push-pull : Indicates the IRQ type is push-pull
- smsc,force-internal-phy : Forces SMSC LAN controller to use
  internal PHY
- smsc,force-external-phy : Forces SMSC LAN controller to use
  external PHY
- smsc,save-mac-address : Indicates that mac address needs to be saved
  before resetting the controller
- reset-gpios : a GPIO line connected to the RESET (active low) signal
  of the device. On many systems this is wired high so the device goes
  out of reset at power-on, but if it is under program control, this
  optional GPIO can wake up in response to it.
- vdd33a-supply, vddvario-supply : 3.3V analog and IO logic power supplies

Examples:

lan9220@f4000000 {
	compatible = "smsc,lan9220", "smsc,lan9115";
	reg = <0xf4000000 0x2000000>;
	phy-mode = "mii";
	interrupt-parent = <&gpio1>;
	interrupts = <31>, <32>;
	reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
	reg-io-width = <4>;
	smsc,irq-push-pull;
};
+22 −0
Original line number Diff line number Diff line
@@ -212,6 +212,7 @@ Userspace to kernel:
  ``ETHTOOL_MSG_FEC_SET``               set FEC settings
  ``ETHTOOL_MSG_MODULE_EEPROM_GET``     read SFP module EEPROM
  ``ETHTOOL_MSG_STATS_GET``             get standard statistics
  ``ETHTOOL_MSG_PHC_VCLOCKS_GET``       get PHC virtual clocks info
  ===================================== ================================

Kernel to userspace:
@@ -250,6 +251,7 @@ Kernel to userspace:
  ``ETHTOOL_MSG_FEC_NTF``                  FEC settings
  ``ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY``  read SFP module EEPROM
  ``ETHTOOL_MSG_STATS_GET_REPLY``          standard statistics
  ``ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY``    PHC virtual clocks info
  ======================================== =================================

``GET`` requests are sent by userspace applications to retrieve device
@@ -1477,6 +1479,25 @@ Low and high bounds are inclusive, for example:
 etherStatsPkts512to1023Octets 512  1023
 ============================= ==== ====

PHC_VCLOCKS_GET
===============

Query device PHC virtual clocks information.

Request contents:

  ====================================  ======  ==========================
  ``ETHTOOL_A_PHC_VCLOCKS_HEADER``      nested  request header
  ====================================  ======  ==========================

Kernel response contents:

  ====================================  ======  ==========================
  ``ETHTOOL_A_PHC_VCLOCKS_HEADER``      nested  reply header
  ``ETHTOOL_A_PHC_VCLOCKS_NUM``         u32     PHC virtual clocks number
  ``ETHTOOL_A_PHC_VCLOCKS_INDEX``       s32     PHC index array
  ====================================  ======  ==========================

Request translation
===================

@@ -1575,4 +1596,5 @@ are netlink only.
  n/a                                 ``ETHTOOL_MSG_CABLE_TEST_ACT``
  n/a                                 ``ETHTOOL_MSG_CABLE_TEST_TDR_ACT``
  n/a                                 ``ETHTOOL_MSG_TUNNEL_INFO_GET``
  n/a                                 ``ETHTOOL_MSG_PHC_VCLOCKS_GET``
  =================================== =====================================
Loading