1. 28 Jun, 2019 34 commits
  2. 27 Jun, 2019 6 commits
    • David S. Miller's avatar
      Merge tag 'blk-dim-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · d7ee2878
      David S. Miller authored
      Saeed Mamameed says:
      
      ====================
      Generic DIM
      
      From: Tal Gilboa and Yamin Fridman
      
      Implement net DIM over a generic DIM library, add RDMA DIM
      
      dim.h lib exposes an implementation of the DIM algorithm for
      dynamically-tuned interrupt moderation for networking interfaces.
      
      We want a similar functionality for other protocols, which might need to
      optimize interrupts differently. Main motivation here is DIM for NVMf
      storage protocol.
      
      Current DIM implementation prioritizes reducing interrupt overhead over
      latency. Also, in order to reduce DIM's own overhead, the algorithm might
      take some time to identify it needs to change profiles. While this is
      acceptable for networking, it might not work well on other scenarios.
      
      Here we propose a new structure to DIM. The idea is to allow a slightly
      modified functionality without the risk of breaking Net DIM behavior for
      netdev. We verified there are no degradations in current DIM behavior with
      the modified solution.
      
      Suggested solution:
      - Common logic is implemented in lib/dim/dim.c
      - Net DIM (existing) logic is implemented in lib/dim/net_dim.c, which uses
        the common logic in dim.c
      - Any new DIM logic will be implemented in "lib/dim/new_dim.c".
        This new implementation will expose modified versions of profiles,
        dim_step() and dim_decision().
      - DIM API is declared in include/linux/dim.h for all implementations.
      
      Pros for this solution are:
      - Zero impact on existing net_dim implementation and usage
      - Relatively more code reuse (compared to two separate solutions)
      - Increased extensibility
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7ee2878
    • Christian Lamparter's avatar
      net: dsa: qca8k: introduce reset via gpio feature · a653f2f5
      Christian Lamparter authored
      The QCA8337(N) has a RESETn signal on Pin B42 that
      triggers a chip reset if the line is pulled low.
      The datasheet says that: "The active low duration
      must be greater than 10 ms".
      
      This can hopefully fix some of the issues related
      to pin strapping in OpenWrt for the EA8500 which
      suffers from detection issues after a SoC reset.
      
      Please note that the qca8k_probe() function does
      currently require to read the chip's revision
      register for identification purposes.
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a653f2f5
    • Christian Lamparter's avatar
      dt-bindings: net: dsa: qca8k: document reset-gpios property · e7dd8a89
      Christian Lamparter authored
      This patch documents the qca8k's reset-gpios property that
      can be used if the QCA8337N ends up in a bad state during
      reset.
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e7dd8a89
    • David Ahern's avatar
      ipv6: Convert gateway validation to use fib6_info · b2c709cc
      David Ahern authored
      Gateway validation does not need a dst_entry, it only needs the fib
      entry to validate the gateway resolution and egress device. So,
      convert ip6_nh_lookup_table from ip6_pol_route to fib6_table_lookup
      and ip6_route_check_nh to use fib6_lookup over rt6_lookup.
      
      ip6_pol_route is a call to fib6_table_lookup and if successful a call
      to fib6_select_path. From there the exception cache is searched for an
      entry or a dst_entry is created to return to the caller. The exception
      entry is not relevant for gateway validation, so what matters are the
      calls to fib6_table_lookup and then fib6_select_path.
      
      Similarly, rt6_lookup can be replaced with a call to fib6_lookup with
      RT6_LOOKUP_F_IFACE set in flags. Again, the exception cache search is
      not relevant, only the lookup with path selection. The primary difference
      in the lookup paths is the use of rt6_select with fib6_lookup versus
      rt6_device_match with rt6_lookup. When you remove complexities in the
      rt6_select path, e.g.,
      1. saddr is not set for gateway validation, so RT6_LOOKUP_F_HAS_SADDR
         is not relevant
      2. rt6_check_neigh is not called so that removes the RT6_NUD_FAIL_DO_RR
         return and round-robin logic.
      
      the code paths are believed to be equivalent for the given use case -
      validate the gateway and optionally given the device. Furthermore, it
      aligns the validation with onlink code path and the lookup path actually
      used for rx and tx.
      
      Adjust the users, ip6_route_check_nh_onlink and ip6_route_check_nh to
      handle a fib6_info vs a rt6_info when performing validation checks.
      
      Existing selftests fib-onlink-tests.sh and fib_tests.sh are used to
      verify the changes.
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Reviewed-by: default avatarWei Wang <weiwan@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b2c709cc
    • David S. Miller's avatar
      Merge branch 'FDB-VLAN-and-PTP-fixes-for-SJA1105-DSA' · 5b1bf3f6
      David S. Miller authored
      Vladimir Oltean says:
      
      ====================
      FDB, VLAN and PTP fixes for SJA1105 DSA
      
      This patchset is an assortment of fixes for the net-next version of the
      sja1105 DSA driver:
      - Avoid a kernel panic when the driver fails to probe or unregisters
      - Finish Arnd Bermann's idea of compiling PTP support as part of the
        main DSA driver and not separately
      - Better handling of initial port-based VLAN as well as VLANs for
        dsa_8021q FDB entries
      - Fix address learning for the SJA1105 P/Q/R/S family
      - Make static FDB entries persistent across switch resets
      - Fix reporting of statically-added FDB entries in 'bridge fdb show'
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b1bf3f6
    • Vladimir Oltean's avatar
      net: dsa: sja1105: Implement is_static for FDB entries on E/T · d7637782
      Vladimir Oltean authored
      The first generation switches don't tell us through the dynamic config
      interface whether the dumped FDB entries are static or not (the LOCKEDS
      bit from P/Q/R/S).
      
      However, now that we're keeping a mirror of all 'bridge fdb' commands in
      the static config, this is an opportunity to compare a dumped FDB entry
      to the driver's private database.  After all, what makes an entry static
      is that *we* added it.
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7637782