1. 02 Apr, 2024 5 commits
  2. 01 Apr, 2024 31 commits
  3. 29 Mar, 2024 4 commits
    • Jakub Kicinski's avatar
      Merge branch 'add-property-in-dwmac-stm32-documentation' · d79b28fd
      Jakub Kicinski authored
      Christophe Roullier says:
      
      ====================
      Add property in dwmac-stm32 documentation
      
      Introduce property in dwmac-stm32 documentation
      
       - st,ext-phyclk: is present since 2020 in driver so need to explain
         it and avoid dtbs check issue : views/kernel/upstream/net-next/arch/arm/boot/dts/st/stm32mp157c-dk2.dtb:
      ethernet@5800a000: Unevaluated properties are not allowed
      ('st,ext-phyclk' was unexpected)
         Furthermore this property will be use in upstream of MP13 dwmac glue. (next step)
      ====================
      
      Link: https://lore.kernel.org/r/20240328185337.332703-1-christophe.roullier@foss.st.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d79b28fd
    • Christophe Roullier's avatar
      dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk · 929107d3
      Christophe Roullier authored
      The Linux kernel dwmac-stm32 driver currently supports three DT
      properties used to configure whether PHY clock are generated by
      the MAC or supplied to the MAC from the PHY.
      
      Originally there were two properties, st,eth-clk-sel and
      st,eth-ref-clk-sel, each used to configure MAC clocking in
      different bus mode and for different MAC clock frequency.
      Since it is possible to determine the MAC 'eth-ck' clock
      frequency from the clock subsystem and PHY bus mode from
      the 'phy-mode' property, two disparate DT properties are
      no longer required to configure MAC clocking.
      
      Linux kernel commit 1bb694e2 ("net: ethernet: stmmac: simplify phy modes management for stm32")
      introduced a third, unified, property st,ext-phyclk. This property
      covers both use cases of st,eth-clk-sel and st,eth-ref-clk-sel DT
      properties, as well as a new use case for 25 MHz clock generated
      by the MAC.
      
      The third property st,ext-phyclk is so far undocumented,
      document it.
      
      Below table summarizes the clock requirement and clock sources for
      supported PHY interface modes.
       __________________________________________________________________________
      |PHY_MODE | Normal | PHY wo crystal|   PHY wo crystal   |No 125Mhz from PHY|
      |         |        |      25MHz    |        50MHz       |                  |
      
      ---------------------------------------------------------------------------
      |  MII    |    -   |     eth-ck    |        n/a         |       n/a        |
      |         |        | st,ext-phyclk |                    |                  |
      
      ---------------------------------------------------------------------------
      |  GMII   |    -   |     eth-ck    |        n/a         |       n/a        |
      |         |        | st,ext-phyclk |                    |                  |
      
      ---------------------------------------------------------------------------
      | RGMII   |    -   |     eth-ck    |        n/a         |      eth-ck      |
      |         |        | st,ext-phyclk |                    | st,eth-clk-sel or|
      |         |        |               |                    | st,ext-phyclk    |
      
      ---------------------------------------------------------------------------
      | RMII    |    -   |     eth-ck    |      eth-ck        |       n/a        |
      |         |        | st,ext-phyclk | st,eth-ref-clk-sel |                  |
      |         |        |               | or st,ext-phyclk   |                  |
      
      ---------------------------------------------------------------------------
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarChristophe Roullier <christophe.roullier@foss.st.com>
      Link: https://lore.kernel.org/r/20240328185337.332703-2-christophe.roullier@foss.st.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      929107d3
    • Johannes Berg's avatar
      netlink: introduce type-checking attribute iteration · e8058a49
      Johannes Berg authored
      There are, especially with multi-attr arrays, many cases
      of needing to iterate all attributes of a specific type
      in a netlink message or a nested attribute. Add specific
      macros to support that case.
      
      Also convert many instances using this spatch:
      
          @@
          iterator nla_for_each_attr;
          iterator name nla_for_each_attr_type;
          identifier nla;
          expression head, len, rem;
          expression ATTR;
          type T;
          identifier x;
          @@
          -nla_for_each_attr(nla, head, len, rem)
          +nla_for_each_attr_type(nla, ATTR, head, len, rem)
           {
          <... T x; ...>
          -if (nla_type(nla) == ATTR) {
           ...
          -}
           }
      
          @@
          identifier nla;
          iterator nla_for_each_nested;
          iterator name nla_for_each_nested_type;
          expression attr, rem;
          expression ATTR;
          type T;
          identifier x;
          @@
          -nla_for_each_nested(nla, attr, rem)
          +nla_for_each_nested_type(nla, ATTR, attr, rem)
           {
          <... T x; ...>
          -if (nla_type(nla) == ATTR) {
           ...
          -}
           }
      
          @@
          iterator nla_for_each_attr;
          iterator name nla_for_each_attr_type;
          identifier nla;
          expression head, len, rem;
          expression ATTR;
          type T;
          identifier x;
          @@
          -nla_for_each_attr(nla, head, len, rem)
          +nla_for_each_attr_type(nla, ATTR, head, len, rem)
           {
          <... T x; ...>
          -if (nla_type(nla) != ATTR) continue;
           ...
           }
      
          @@
          identifier nla;
          iterator nla_for_each_nested;
          iterator name nla_for_each_nested_type;
          expression attr, rem;
          expression ATTR;
          type T;
          identifier x;
          @@
          -nla_for_each_nested(nla, attr, rem)
          +nla_for_each_nested_type(nla, ATTR, attr, rem)
           {
          <... T x; ...>
          -if (nla_type(nla) != ATTR) continue;
           ...
           }
      
      Although I had to undo one bad change this made, and
      I also adjusted some other code for whitespace and to
      use direct variable initialization now.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Link: https://lore.kernel.org/r/20240328203144.b5a6c895fb80.I1869b44767379f204998ff44dd239803f39c23e0@changeidSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e8058a49
    • Jakub Kicinski's avatar
      Merge branch 'udp-small-changes-on-receive-path' · 9494dc0b
      Jakub Kicinski authored
      Eric Dumazet says:
      
      ====================
      udp: small changes on receive path
      
      This series is based on an observation I made in UDP receive path.
      
      The sock_def_readable() costs are pretty high, especially when
      epoll is used to generate EPOLLIN events.
      
      First patch annotates races on sk->sk_rcvbuf reads.
      
      Second patch replaces an atomic_add_return()
       with a less expensive atomic_add()
      
      Third patch avoids calling sock_def_readable() when possible.
      
      Fourth patch adds sk_wake_async_rcu() to get better inlining
      and code generation.
      ====================
      
      Link: https://lore.kernel.org/r/20240328144032.1864988-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9494dc0b