1. 05 4月, 2019 19 次提交
  2. 04 4月, 2019 12 次提交
    • D
      Merge branch 'net-More-movement-to-fib_nh_common' · b571bc62
      David S. Miller 提交于
      David Ahern says:
      
      ====================
      net: More movement to fib_nh_common
      
      Second set of three with the end goal of enabling IPv6 gateways with IPv4
      routes.
      
      This set moves:
      - the ipv4 tracepoint to take a fib_nh_common and updates it to handle
        a v6 gateway.
      - consolidates route notifications to use the same fill functions
        for both ipv4 and ipv6
      
      v4
      - enhanced the commit message for patches 1 and 2
      
      v3
      - comments from Martin:
        + renamed FIB_RES_NH to FIB_RES_NHC
        + removed family check from fib_result_prefsrc
        + in fib_nexthop_info, renamed nexthop arg to nhc and dropped for_ipv4 arg
      
      v2
      - dropped patches moving cached routes and exception buckets to
        fib_nh_common. The goal is allowing a fib6_nh to be used with an
        IPv4 route. The hold up is the need for separate exception buckets -
        one for v6 routes and one for v4 routes. When all of the nexthop patches
        are in, adding a secondi exception bucket pushes IPv6 fib6_info
        allocations over 256 which means fib6_info allocations roll up to 512.
        Hence, deferring the patches until some data mining can be done to keep
        the allocations at 256.
      ====================
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b571bc62
    • D
      ipv6: Flip to fib_nexthop_info · c0a72077
      David Ahern 提交于
      Export fib_nexthop_info and fib_add_nexthop for use by IPv6 code.
      Remove rt6_nexthop_info and rt6_add_nexthop in favor of the IPv4
      versions. Update fib_nexthop_info for IPv6 linkdown check and
      RTA_GATEWAY for AF_INET6.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0a72077
    • D
      ipv4: Change fib_nexthop_info and fib_add_nexthop to take fib_nh_common · c2364199
      David Ahern 提交于
      With the exception of the nexthop weight, the nexthop attributes used by
      fib_nexthop_info and fib_add_nexthop come from the fib_nh_common struct.
      Update both to use it and change fib_nexthop_info to check the family
      as needed.
      
      nexthop weight comes from the common struct for existing use cases, but
      for nexthop groups the weight is outside of the fib_nh_common to allow
      the same nexthop definition to be used in multiple groups with different
      weights.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2364199
    • D
      ipv4: Refactor nexthop attributes in fib_dump_info · b0f60193
      David Ahern 提交于
      Similar to ipv6, move addition of nexthop attributes to dump
      message into helpers that are called for both single path and
      multipath routes. Align the new helpers to the IPv6 variant
      which most notably means computing the flags argument based on
      settings in nh_flags.
      
      The RTA_FLOW argument is unique to IPv4, so it is appended after
      the new fib_nexthop_info helper. The intent of a later patch is to
      make both fib_nexthop_info and fib_add_nexthop usable for both IPv4
      and IPv6. This patch is stepping stone in that direction.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0f60193
    • D
      ipv4: Add fib_nh_common to fib_result · eba618ab
      David Ahern 提交于
      Most of the ipv4 code only needs data from fib_nh_common. Add
      fib_nh_common selection to fib_result and update users to use it.
      
      Right now, fib_nh_common in fib_result will point to a fib_nh struct
      that is embedded within a fib_info:
      
              fib_info  --> fib_nh
                            fib_nh
                            ...
                            fib_nh
                              ^
          fib_result->nhc ----+
      
      Later, nhc can point to a fib_nh within a nexthop struct:
      
              fib_info --> nexthop --> fib_nh
                                         ^
          fib_result->nhc ---------------+
      
      or for a nexthop group:
      
              fib_info --> nexthop --> nexthop --> fib_nh
                                       nexthop --> fib_nh
                                       ...
                                       nexthop --> fib_nh
                                                     ^
          fib_result->nhc ---------------------------+
      
      In all cases nhsel within fib_result will point to which leg in the
      multipath route is used.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eba618ab
    • D
      ipv4: Update fib_table_lookup tracepoint to take common nexthop · 0af7e7c1
      David Ahern 提交于
      Update fib_table_lookup tracepoint to take a fib_nh_common struct and
      dump the v6 gateway address if the nexthop uses it.
      
      Over the years saddr has not proven useful and the output of the
      tracepoint produces very long lines. Since saddr is not part of
      fib_nh_common, drop it. If it needs to be added later, fib_nh which
      contains saddr can be obtained from a fib_nh_common via container_of.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0af7e7c1
    • H
      net: phy: fix autoneg mismatch case in genphy_read_status · 4950c2ba
      Heiner Kallweit 提交于
      The original patch didn't consider the case that autoneg process
      finishes successfully but both link partners have no mode in common.
      In this case there's no link, nevertheless we may be interested in
      what the link partner advertised.
      
      Like phydev->link we set phydev->autoneg_complete in
      genphy_update_link() and use the stored value in genphy_read_status().
      This way we don't have to read register BMSR again.
      
      Fixes: b6163f19 ("net: phy: improve genphy_read_status")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4950c2ba
    • D
      Merge branch 'marvel10g-suspend-resume' · 49ffba36
      David S. Miller 提交于
      Antoine Tenart says:
      
      ====================
      net: phy: marvell10g: implement suspend/resume callbacks
      
      This series implements the suspend/resume callbacks in the marvell10g
      PHY driver.
      
      Thanks,
      Antoine
      
      Since v3:
        - Use the new phy_set/clear_bits_mmd() instead of phy_modify_mmd().
        - Use VEND2.f001.11 to power down the port instead of the per-mode
          LPOWER.
      
      Since v2:
        - Removed the third patch, setting the PHY in low power by default, as
          the change was controversial.
        - Rebased on the latest net-next.
      
      Since v1:
        - Fixed a mix up in the patches where two implementations of the
          suspend/resume callbacks were kept in the driver.
        - Rebased on the latest net-next.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49ffba36
    • A
      net: phy: marvell10g: add the suspend/resume callbacks for the 88x2210 · e02c4a9d
      Antoine Tenart 提交于
      When the 88x2110 PHY support was added, the suspend and resume callbacks
      were forgotten. This patch adds them to the 88x2110 PHY callback
      definition.
      Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e02c4a9d
    • A
      net: phy: marvell10g: implement suspend/resume callbacks · af3e28cb
      Antoine Tenart 提交于
      This patch adds the suspend/resume callbacks for Marvell 10G PHYs. The
      three PCS (base-t, base-r and 1000base-x) are set in low power (the PCS
      are powered down) when the PHY isn't used.
      Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af3e28cb
    • G
      net: dsa: microchip: mark expected switch fall-through · 0fd12842
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/net/dsa/microchip/ksz9477.c: In function ‘ksz9477_get_interface’:
      drivers/net/dsa/microchip/ksz9477.c:1145:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (gbit)
            ^
      drivers/net/dsa/microchip/ksz9477.c:1147:2: note: here
        case 0:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fd12842
    • G
      rxrpc: Mark expected switch fall-through · 936ee65f
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      net/rxrpc/local_object.c: In function ‘rxrpc_open_socket’:
      net/rxrpc/local_object.c:175:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (ret < 0) {
            ^
      net/rxrpc/local_object.c:184:2: note: here
        case AF_INET:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Currently, GCC is expecting to find the fall-through annotations
      at the very bottom of the case and on its own line. That's why
      I had to add the annotation, although the intentional fall-through
      is already mentioned in a few lines above.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      936ee65f
  3. 03 4月, 2019 9 次提交