1. 23 5月, 2018 10 次提交
    • E
      tcp: add max_quickacks param to tcp_incr_quickack and tcp_enter_quickack_mode · 9a9c9b51
      Eric Dumazet 提交于
      We want to add finer control of the number of ACK packets sent after
      ECN events.
      
      This patch is not changing current behavior, it only enables following
      change.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a9c9b51
    • V
      net: sched: don't disable bh when accessing action idr · 290aa0ad
      Vlad Buslov 提交于
      Initial net_device implementation used ingress_lock spinlock to synchronize
      ingress path of device. This lock was used in both process and bh context.
      In some code paths action map lock was obtained while holding ingress_lock.
      Commit e1e992e5 ("[NET_SCHED] protect action config/dump from irqs")
      modified actions to always disable bh, while using action map lock, in
      order to prevent deadlock on ingress_lock in softirq. This lock was removed
      from net_device, so disabling bh, while accessing action map, is no longer
      necessary.
      
      Replace all action idr spinlock usage with regular calls that do not
      disable bh.
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      290aa0ad
    • D
      Merge branch 'net-ipv6-Fix-route-append-and-replace-use-cases' · 73bf1fc5
      David S. Miller 提交于
      David Ahern says:
      
      ====================
      net/ipv6: Fix route append and replace use cases
      
      This patch set fixes a few append and replace uses cases for IPv6 and
      adds test cases that codifies the expectations of how append and replace
      are expected to work. In paricular it allows a multipath route to have
      a dev-only nexthop, something Thomas tried to accomplish with commit
      edd7ceb7 ("ipv6: Allow non-gateway ECMP for IPv6") which had to be
      reverted because of breakage, and to replace an existing FIB entry
      with a reject route.
      
      There are a number of inconsistent and surprising aspects to the Linux
      API for adding, deleting, replacing and changing FIB entries. For example,
      with IPv4 NLM_F_APPEND means insert the route after any existing entries
      with the same key (prefix + priority + TOS for IPv4) and NLM_F_CREATE
      without the append flag inserts the new route before any existing entries.
      
      IPv6 on the other hand attempts to guess whether a new route should be
      appended to an existing one, possibly creating a multipath route, or to
      add a new entry after any existing ones. This applies to both the 'append'
      (NLM_F_CREATE + NLM_F_APPEND) and 'prepend' (NLM_F_CREATE only) cases
      meaning for IPv6 the NLM_F_APPEND is basically ignored. This guessing
      whether the route should be added to a multipath route (gateway routes)
      or inserted after existing entries (non-gateway based routes) means a
      multipath route can not have a dev only nexthop (potentially required in
      some cases - tunnels or VRF route leaking for example) and route 'replace'
      is a bit adhoc treating gateway based routes and dev-only / reject routes
      differently.
      
      This has led to frustration with developers working on routing suites
      such as FRR where workarounds such as delete and add are used instead of
      replace.
      
      After this patch set there are 2 differences between IPv4 and IPv6:
      1. 'ip ro prepend' = NLM_F_CREATE only
          IPv4 adds the new route before any existing ones
          IPv6 adds new route after any existing ones
      
      2. 'ip ro append' = NLM_F_CREATE|NLM_F_APPEND
         IPv4 adds the new route after any existing ones
         IPv6 adds the nexthop to existing routes converting to multipath
      
      For the former, there are cases where we want same prefix routes added
      after existing ones (e.g., multicast, prefix routes for macvlan when used
      for virtual router redundancy). Requiring the APPEND flag to add a new
      route to an existing one helps here but is a slight change in behavior
      since prepend with gateway routes now create a separate entry.
      
      For the latter IPv6 behavior is preferred - appending a route for the same
      prefix and metric to make a multipath route, so really IPv4 not allowing an
      existing route to be updated is the limiter. This will be fixed when
      nexthops become separate objects - a future patch set.
      
      Thank you to Thomas and Ido for testing earlier versions of this set, and
      to Ido for providing an update to the mlxsw driver.
      
      Changes since RFC
      - cleanup wording in test script; add comments about expected failures
        and why
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73bf1fc5
    • D
      selftests: fib_tests: Add ipv4 route add append replace tests · abb1860a
      David Ahern 提交于
      Add IPv4 route tests covering add, append and replace permutations.
      Assumes the ability to add a basic single path route works; this is
      required for example when adding an address to an interface.
      
      $ fib_tests.sh -t ipv4_rt
      
      IPv4 route add / append tests
          TEST: Attempt to add duplicate route - gw                           [ OK ]
          TEST: Attempt to add duplicate route - dev only                     [ OK ]
          TEST: Attempt to add duplicate route - reject route                 [ OK ]
          TEST: Add new nexthop for existing prefix                           [ OK ]
          TEST: Append nexthop to existing route - gw                         [ OK ]
          TEST: Append nexthop to existing route - dev only                   [ OK ]
          TEST: Append nexthop to existing route - reject route               [ OK ]
          TEST: Append nexthop to existing reject route - gw                  [ OK ]
          TEST: Append nexthop to existing reject route - dev only            [ OK ]
          TEST: add multipath route                                           [ OK ]
          TEST: Attempt to add duplicate multipath route                      [ OK ]
          TEST: Route add with different metrics                              [ OK ]
          TEST: Route delete with metric                                      [ OK ]
      
      IPv4 route replace tests
          TEST: Single path with single path                                  [ OK ]
          TEST: Single path with multipath                                    [ OK ]
          TEST: Single path with reject route                                 [ OK ]
          TEST: Single path with single path via multipath attribute          [ OK ]
          TEST: Invalid nexthop                                               [ OK ]
          TEST: Single path - replace of non-existent route                   [ OK ]
          TEST: Multipath with multipath                                      [ OK ]
          TEST: Multipath with single path                                    [ OK ]
          TEST: Multipath with single path via multipath attribute            [ OK ]
          TEST: Multipath with reject route                                   [ OK ]
          TEST: Multipath - invalid first nexthop                             [ OK ]
          TEST: Multipath - invalid second nexthop                            [ OK ]
          TEST: Multipath - replace of non-existent route                     [ OK ]
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abb1860a
    • D
      selftests: fib_tests: Add ipv6 route add append replace tests · f9a5a9d8
      David Ahern 提交于
      Add IPv6 route tests covering add, append and replace permutations.
      Assumes the ability to add a basic single path route works; this is
      required for example when adding an address to an interface.
      
      $ fib_tests.sh -t ipv6_rt
      
      IPv6 route add / append tests
          TEST: Attempt to add duplicate route - gw                           [ OK ]
          TEST: Attempt to add duplicate route - dev only                     [ OK ]
          TEST: Attempt to add duplicate route - reject route                 [ OK ]
          TEST: Add new route for existing prefix (w/o NLM_F_EXCL)            [ OK ]
          TEST: Append nexthop to existing route - gw                         [ OK ]
          TEST: Append nexthop to existing route - dev only                   [ OK ]
          TEST: Append nexthop to existing route - reject route               [ OK ]
          TEST: Append nexthop to existing reject route - gw                  [ OK ]
          TEST: Append nexthop to existing reject route - dev only            [ OK ]
          TEST: Add multipath route                                           [ OK ]
          TEST: Attempt to add duplicate multipath route                      [ OK ]
          TEST: Route add with different metrics                              [ OK ]
          TEST: Route delete with metric                                      [ OK ]
      
      IPv6 route replace tests
          TEST: Single path with single path                                  [ OK ]
          TEST: Single path with multipath                                    [ OK ]
          TEST: Single path with reject route                                 [ OK ]
          TEST: Single path with single path via multipath attribute          [ OK ]
          TEST: Invalid nexthop                                               [ OK ]
          TEST: Single path - replace of non-existent route                   [ OK ]
          TEST: Multipath with multipath                                      [ OK ]
          TEST: Multipath with single path                                    [ OK ]
          TEST: Multipath with single path via multipath attribute            [ OK ]
          TEST: Multipath with reject route                                   [ OK ]
          TEST: Multipath - invalid first nexthop                             [ OK ]
          TEST: Multipath - invalid second nexthop                            [ OK ]
          TEST: Multipath - replace of non-existent route                     [ OK ]
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9a5a9d8
    • D
      selftests: fib_tests: Add option to pause after each test · 7df15e6c
      David Ahern 提交于
      Add option to pause after each test before cleanup is done. Allows
      user to do manual inspection or more ad-hoc testing after each test
      with the setup in tact.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7df15e6c
    • D
      selftests: fib_tests: Add command line options · 1c7447b4
      David Ahern 提交于
      Add command line options for controlling pause on fail, controlling
      specific tests to run and verbose mode rather than relying on environment
      variables.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c7447b4
    • D
      selftests: fib_tests: Add success-fail counts · 37ce42c1
      David Ahern 提交于
      As more tests are added, it is convenient to have a tally at the end.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37ce42c1
    • D
      net/ipv6: Simplify route replace and appending into multipath route · f34436a4
      David Ahern 提交于
      Bring consistency to ipv6 route replace and append semantics.
      
      Remove rt6_qualify_for_ecmp which is just guess work. It fails in 2 cases:
      1. can not replace a route with a reject route. Existing code appends
         a new route instead of replacing the existing one.
      
      2. can not have a multipath route where a leg uses a dev only nexthop
      
      Existing use cases affected by this change:
      1. adding a route with existing prefix and metric using NLM_F_CREATE
         without NLM_F_APPEND or NLM_F_EXCL (ie., what iproute2 calls
         'prepend'). Existing code auto-determines that the new nexthop can
         be appended to an existing route to create a multipath route. This
         change breaks that by requiring the APPEND flag for the new route
         to be added to an existing one. Instead the prepend just adds another
         route entry.
      
      2. route replace. Existing code replaces first matching multipath route
         if new route is multipath capable and fallback to first matching
         non-ECMP route (reject or dev only route) in case one isn't available.
         New behavior replaces first matching route. (Thanks to Ido for spotting
         this one)
      
      Note: Newer iproute2 is needed to display multipath routes with a dev-only
            nexthop. This is due to a bug in iproute2 and parsing nexthops.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f34436a4
    • D
      mlxsw: spectrum_router: Add support for route append · 5a15a1b0
      David Ahern 提交于
      Handle append for gateway based routes. Dev-only multipath routes will
      be handled by a follow on patch.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a15a1b0
  2. 22 5月, 2018 11 次提交
  3. 21 5月, 2018 19 次提交