1. 09 Feb, 2021 5 commits
    • Vladimir Oltean's avatar
      net: dsa: felix: implement port flushing on .phylink_mac_link_down · eb4733d7
      Vladimir Oltean authored
      There are several issues which may be seen when the link goes down while
      forwarding traffic, all of which can be attributed to the fact that the
      port flushing procedure from the reference manual was not closely
      followed.
      
      With flow control enabled on both the ingress port and the egress port,
      it may happen when a link goes down that Ethernet packets are in flight.
      In flow control mode, frames are held back and not dropped. When there
      is enough traffic in flight (example: iperf3 TCP), then the ingress port
      might enter congestion and never exit that state. This is a problem,
      because it is the egress port's link that went down, and that has caused
      the inability of the ingress port to send packets to any other port.
      This is solved by flushing the egress port's queues when it goes down.
      
      There is also a problem when performing stream splitting for
      IEEE 802.1CB traffic (not yet upstream, but a sort of multicast,
      basically). There, if one port from the destination ports mask goes
      down, splitting the stream towards the other destinations will no longer
      be performed. This can be traced down to this line:
      
      	ocelot_port_writel(ocelot_port, 0, DEV_MAC_ENA_CFG);
      
      which should have been instead, as per the reference manual:
      
      	ocelot_port_rmwl(ocelot_port, 0, DEV_MAC_ENA_CFG_RX_ENA,
      			 DEV_MAC_ENA_CFG);
      
      Basically only DEV_MAC_ENA_CFG_RX_ENA should be disabled, but not
      DEV_MAC_ENA_CFG_TX_ENA - I don't have further insight into why that is
      the case, but apparently multicasting to several ports will cause issues
      if at least one of them doesn't have DEV_MAC_ENA_CFG_TX_ENA set.
      
      I am not sure what the state of the Ocelot VSC7514 driver is, but
      probably not as bad as Felix/Seville, since VSC7514 uses phylib and has
      the following in ocelot_adjust_link:
      
      	if (!phydev->link)
      		return;
      
      therefore the port is not really put down when the link is lost, unlike
      the DSA drivers which use .phylink_mac_link_down for that.
      
      Nonetheless, I put ocelot_port_flush() in the common ocelot.c because it
      needs to access some registers from drivers/net/ethernet/mscc/ocelot_rew.h
      which are not exported in include/soc/mscc/ and a bugfix patch should
      probably not move headers around.
      
      Fixes: bdeced75 ("net: dsa: felix: Add PCS operations for PHYLINK")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb4733d7
    • David S. Miller's avatar
      Merge branch 'bridge-mrp' · 6bbc088d
      David S. Miller authored
      Horatiu Vultur says:
      
      ====================
      bridge: mrp: Fix br_mrp_port_switchdev_set_state
      
      Based on the discussion here[1], there was a problem with the function
      br_mrp_port_switchdev_set_state. The problem was that it was called
      both with BR_STATE* and BR_MRP_PORT_STATE* types. This patch series
      fixes this issue and removes SWITCHDEV_ATTR_ID_MRP_PORT_STAT because
      is not used anymore.
      
      [1] https://www.spinics.net/lists/netdev/msg714816.html
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6bbc088d
    • Horatiu Vultur's avatar
      switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT · 059d2a10
      Horatiu Vultur authored
      Now that MRP started to use also SWITCHDEV_ATTR_ID_PORT_STP_STATE to
      notify HW, then SWITCHDEV_ATTR_ID_MRP_PORT_STAT is not used anywhere
      else, therefore we can remove it.
      
      Fixes: c284b545 ("switchdev: mrp: Extend switchdev API to offload MRP")
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      059d2a10
    • Horatiu Vultur's avatar
      bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state · b2bdba1c
      Horatiu Vultur authored
      The function br_mrp_port_switchdev_set_state was called both with MRP
      port state and STP port state, which is an issue because they don't
      match exactly.
      
      Therefore, update the function to be used only with STP port state and
      use the id SWITCHDEV_ATTR_ID_PORT_STP_STATE.
      
      The choice of using STP over MRP is that the drivers already implement
      SWITCHDEV_ATTR_ID_PORT_STP_STATE and already in SW we update the port
      STP state.
      
      Fixes: 9a9f26e8 ("bridge: mrp: Connect MRP API with the switchdev API")
      Fixes: fadd4091 ("bridge: switchdev: mrp: Implement MRP API for switchdev")
      Fixes: 2f1a11ae ("bridge: mrp: Add MRP interface.")
      Reported-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b2bdba1c
    • Edwin Peer's avatar
      net: watchdog: hold device global xmit lock during tx disable · 3aa6bce9
      Edwin Peer authored
      Prevent netif_tx_disable() running concurrently with dev_watchdog() by
      taking the device global xmit lock. Otherwise, the recommended:
      
      	netif_carrier_off(dev);
      	netif_tx_disable(dev);
      
      driver shutdown sequence can happen after the watchdog has already
      checked carrier, resulting in possible false alarms. This is because
      netif_tx_lock() only sets the frozen bit without maintaining the locks
      on the individual queues.
      
      Fixes: c3f26a26 ("netdev: Fix lockdep warnings in multiqueue configurations.")
      Signed-off-by: default avatarEdwin Peer <edwin.peer@broadcom.com>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3aa6bce9
  2. 08 Feb, 2021 2 commits
  3. 06 Feb, 2021 11 commits
  4. 05 Feb, 2021 10 commits
  5. 04 Feb, 2021 4 commits
  6. 03 Feb, 2021 4 commits
  7. 02 Feb, 2021 4 commits
    • Linus Torvalds's avatar
      Merge tag 'clang-format-for-linux-v5.11-rc7' of git://github.com/ojeda/linux · 3aaf0a27
      Linus Torvalds authored
      Pull clang-format update from Miguel Ojeda:
       "Update with the latest for_each macro list"
      
      * tag 'clang-format-for-linux-v5.11-rc7' of git://github.com/ojeda/linux:
        clang-format: Update with the latest for_each macro list
      3aaf0a27
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.11-1' of git://git.infradead.org/users/hch/dma-mapping · 7d36ccd4
      Linus Torvalds authored
      Pull dma-mapping fix from Christoph Hellwig:
       "Fix a kernel crash in the new dma-mapping benchmark test (Barry Song)"
      
      * tag 'dma-mapping-5.11-1' of git://git.infradead.org/users/hch/dma-mapping:
        dma-mapping: benchmark: fix kernel crash when dma_map_single fails
      7d36ccd4
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 2e02677e
      Linus Torvalds authored
      Pull vdpa fix from Michael Tsirkin:
       "A single mlx bugfix"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vdpa/mlx5: Fix memory key MTT population
      2e02677e
    • Linus Torvalds's avatar
      Merge tag 'net-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · a9925628
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes for 5.11-rc7, including fixes from bpf and mac80211
        trees.
      
        Current release - regressions:
      
         - ip_tunnel: fix mtu calculation
      
         - mlx5: fix function calculation for page trees
      
        Previous releases - regressions:
      
         - vsock: fix the race conditions in multi-transport support
      
         - neighbour: prevent a dead entry from updating gc_list
      
         - dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add
      
        Previous releases - always broken:
      
         - bpf, cgroup: two copy_{from,to}_user() warn_on_once splats for BPF
           cgroup getsockopt infra when user space is trying to race against
           optlen, from Loris Reiff.
      
         - bpf: add missing fput() in BPF inode storage map update helper
      
         - udp: ipv4: manipulate network header of NATed UDP GRO fraglist
      
         - mac80211: fix station rate table updates on assoc
      
         - r8169: work around RTL8125 UDP HW bug
      
         - igc: report speed and duplex as unknown when device is runtime
           suspended
      
         - rxrpc: fix deadlock around release of dst cached on udp tunnel"
      
      * tag 'net-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (36 commits)
        net: hsr: align sup_multicast_addr in struct hsr_priv to u16 boundary
        net: ipa: fix two format specifier errors
        net: ipa: use the right accessor in ipa_endpoint_status_skip()
        net: ipa: be explicit about endianness
        net: ipa: add a missing __iomem attribute
        net: ipa: pass correct dma_handle to dma_free_coherent()
        r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set
        net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS
        net: mvpp2: TCAM entry enable should be written after SRAM data
        net: lapb: Copy the skb before sending a packet
        net/mlx5e: Release skb in case of failure in tc update skb
        net/mlx5e: Update max_opened_tc also when channels are closed
        net/mlx5: Fix leak upon failure of rule creation
        net/mlx5: Fix function calculation for page trees
        docs: networking: swap words in icmp_errors_use_inbound_ifaddr doc
        udp: ipv4: manipulate network header of NATed UDP GRO fraglist
        net: ip_tunnel: fix mtu calculation
        vsock: fix the race conditions in multi-transport support
        net: sched: replaced invalid qdisc tree flush helper in qdisc_replace
        ibmvnic: device remove has higher precedence over reset
        ...
      a9925628