1. 16 Mar, 2022 8 commits
    • Biao Huang's avatar
      net: dt-bindings: dwmac: Convert mediatek-dwmac to DT schema · 150b6add
      Biao Huang authored
      Convert mediatek-dwmac to DT schema, and delete old mediatek-dwmac.txt.
      And there are some changes in .yaml than .txt, others almost keep the same:
        1. compatible "const: snps,dwmac-4.20".
        2. delete "snps,reset-active-low;" in example, since driver remove this
           property long ago.
        3. add "snps,reset-delay-us = <0 10000 10000>" in example.
        4. the example is for rgmii interface, keep related properties only.
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      150b6add
    • Biao Huang's avatar
      arm64: dts: mt2712: update ethernet device node · 79e11778
      Biao Huang authored
      Since there are some changes in ethernet driver:
      update ethernet device node in dts to accommodate to it.
      
      1. stmmac_probe_config_dt() in stmmac_platform.c will initialize specified
         parameters according to compatible string "snps,dwmac-4.20a", then,
         dwmac-mediatek.c can skip the initialization if add compatible string
         "snps,dwmac-4.20a" in eth device node.
      2. commit 882007ed ("net-next: dt-binding: dwmac-mediatek: add more
         description for RMII") added rmii internal support, we should add
         corresponding clocks/clocks-names in eth device node.
      3. add "snps,reset-delays-us = <0 10000 10000>;" to ensure reset delay
         can meet PHY requirement.
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79e11778
    • Biao Huang's avatar
      stmmac: dwmac-mediatek: re-arrange clock setting · 4fe3075f
      Biao Huang authored
      The rmii_internal clock is needed only when PHY
      interface is RMII, and reference clock is from MAC.
      
      Re-arrange the clock setting as following:
      1. the optional "rmii_internal" is controlled by devm_clk_get(),
      2. other clocks still be configured by devm_clk_bulk_get().
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4fe3075f
    • Biao Huang's avatar
      stmmac: dwmac-mediatek: Reuse more common features · a71e67b2
      Biao Huang authored
      This patch makes dwmac-mediatek reuse more features
      supported by stmmac_platform.c.
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Acked-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a71e67b2
    • Biao Huang's avatar
      stmmac: dwmac-mediatek: add platform level clocks management · 3186bdad
      Biao Huang authored
      This patch implements clks_config callback for dwmac-mediatek platform,
      which could support platform level clocks management.
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Acked-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3186bdad
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 79b04108
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2022-03-15
      
      Jacob Keller says:
      
      The ice_sriov.c file now houses almost all of the virtualization code in the
      ice driver. This includes both Single Root specific implementation as well
      as generic functionality such as the virtchnl interface.
      
      We are planning to implement support for Scalable IOV in the ice driver in
      the future. This implementation will want to use the generic functionality
      in ice_sriov.c
      
      Rather than dump the Scalable IOV code into ice_sriov.c, we will want to
      implement it in a separate file, ice_siov.c
      
      To help with this, refactor the code in ice_sriov.c and split the generic
      functionality out into separate files.
      
      Reorganize code to make the non-implementation specific bits into new files
      with the following general guidelines:
      
      * ice_vf_lib.[ch]
      
      Basic VF structures and accessors. This is where scheme-independent
      code will reside.
      
      * ice_virtchnl.[ch]
      
      Virtchnl message handling. This is where the bulk of the logic for
      processing messages from VFs using the virtchnl messaging scheme will
      reside. This is separated from ice_vf_lib.c because it is somewhat
      distinct and stand alone.
      
      * ice_sriov.[ch]
      
      Single Root IOV implementation, including initialization and the
      routines for interacting with SR-IOV based netdev operations.
      
      * (future) ice_siov.[ch]
      
      Scalable IOV implementation.
      
      The end goal is to make it easier to re-use the generic parts of the
      virtualization logic while keeping separate the concerns of the Single Root
      implementation.
      
      In addition to the pure code moves, this series has a reset refactor which
      clean up the functionality to make it easier to reuse the reset code. A new
      ops table is introduced to make the VF reset logic more generic. The Single
      Root specific details are implemented in ice_sriov.c. A future series
      implementing Scalable IOV support will use this ops table to allow re-use of
      the reset logic which is now in ice_vf_lib.c
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79b04108
    • Casper Andersson's avatar
      net: sparx5: Use Switchdev fdb events for managing fdb entries · 9f01cfbf
      Casper Andersson authored
      Changes the handling of fdb entries to use Switchdev events,
      instead of the previous "sync_bridge" and "sync_port" which
      only run when adding or removing VLANs on the bridge.
      Signed-off-by: default avatarCasper Andersson <casper.casan@gmail.com>
      Link: https://lore.kernel.org/r/20220314160918.4rfrrfgmbsf2pxl3@wse-c0155Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9f01cfbf
    • David Ahern's avatar
      net: Add l3mdev index to flow struct and avoid oif reset for port devices · 40867d74
      David Ahern authored
      The fundamental premise of VRF and l3mdev core code is binding a socket
      to a device (l3mdev or netdev with an L3 domain) to indicate L3 scope.
      Legacy code resets flowi_oif to the l3mdev losing any original port
      device binding. Ben (among others) has demonstrated use cases where the
      original port device binding is important and needs to be retained.
      This patch handles that by adding a new entry to the common flow struct
      that can indicate the l3mdev index for later rule and table matching
      avoiding the need to reset flowi_oif.
      
      In addition to allowing more use cases that require port device binds,
      this patch brings a few datapath simplications:
      
      1. l3mdev_fib_rule_match is only called when walking fib rules and
         always after l3mdev_update_flow. That allows an optimization to bail
         early for non-VRF type uses cases when flowi_l3mdev is not set. Also,
         only that index needs to be checked for the FIB table id.
      
      2. l3mdev_update_flow can be called with flowi_oif set to a l3mdev
         (e.g., VRF) device. By resetting flowi_oif only for this case the
         FLOWI_FLAG_SKIP_NH_OIF flag is not longer needed and can be removed,
         removing several checks in the datapath. The flowi_iif path can be
         simplified to only be called if the it is not loopback (loopback can
         not be assigned to an L3 domain) and the l3mdev index is not already
         set.
      
      3. Avoid another device lookup in the output path when the fib lookup
         returns a reject failure.
      
      Note: 2 functional tests for local traffic with reject fib rules are
      updated to reflect the new direct failure at FIB lookup time for ping
      rather than the failure on packet path. The current code fails like this:
      
          HINT: Fails since address on vrf device is out of device scope
          COMMAND: ip netns exec ns-A ping -c1 -w1 -I eth1 172.16.3.1
          ping: Warning: source address might be selected on device other than: eth1
          PING 172.16.3.1 (172.16.3.1) from 172.16.3.1 eth1: 56(84) bytes of data.
      
          --- 172.16.3.1 ping statistics ---
          1 packets transmitted, 0 received, 100% packet loss, time 0ms
      
      where the test now directly fails:
      
          HINT: Fails since address on vrf device is out of device scope
          COMMAND: ip netns exec ns-A ping -c1 -w1 -I eth1 172.16.3.1
          ping: connect: No route to host
      Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
      Tested-by: default avatarBen Greear <greearb@candelatech.com>
      Link: https://lore.kernel.org/r/20220314204551.16369-1-dsahern@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      40867d74
  2. 15 Mar, 2022 32 commits