1. 26 Jun, 2019 22 commits
  2. 25 Jun, 2019 6 commits
    • Roman Mashak's avatar
      tc-testing: add ingress qdisc tests · 2f8776f0
      Roman Mashak authored
      Signed-off-by: default avatarRoman Mashak <mrv@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f8776f0
    • Jon Maloy's avatar
      tipc: rename function msg_get_wrapped() to msg_inner_hdr() · a7dc51ad
      Jon Maloy authored
      We rename the inline function msg_get_wrapped() to the more
      comprehensible msg_inner_hdr().
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7dc51ad
    • Jon Maloy's avatar
      tipc: eliminate unnecessary skb expansion during retransmission · 20c67312
      Jon Maloy authored
      We increase the allocated headroom for the buffer copies to be
      retransmitted. This eliminates the need for the lower stack levels
      (UDP/IP/L2) to expand the headroom in order to add their own headers.
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20c67312
    • Jon Maloy's avatar
      tipc: simplify stale link failure criteria · 77cf8edb
      Jon Maloy authored
      In commit a4dc70d4 ("tipc: extend link reset criteria for stale
      packet retransmission") we made link retransmission failure events
      dependent on the link tolerance, and not only of the number of failed
      retransmission attempts, as we did earlier. This works well. However,
      keeping the original, additional criteria of 99 failed retransmissions
      is now redundant, and may in some cases lead to failure detection
      times in the order of minutes instead of the expected 1.5 sec link
      tolerance value.
      
      We now remove this criteria altogether.
      Acked-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77cf8edb
    • Lucas Bates's avatar
      tc-testing: Restore original behaviour for namespaces in tdc · 489ce2f4
      Lucas Bates authored
      This patch restores the original behaviour for tdc prior to the
      introduction of the plugin system, where the network namespace
      functionality was split from the main script.
      
      It introduces the concept of required plugins for testcases,
      and will automatically load any plugin that isn't already
      enabled when said plugin is required by even one testcase.
      
      Additionally, the -n option for the nsPlugin is deprecated
      so the default action is to make use of the namespaces.
      Instead, we introduce -N to not use them, but still create
      the veth pair.
      
      buildebpfPlugin's -B option is also deprecated.
      
      If a test cases requires the features of a specific plugin
      in order to pass, it should instead include a new key/value
      pair describing plugin interactions:
      
              "plugins": {
                      "requires": "buildebpfPlugin"
              },
      
      A test case can have more than one required plugin: a list
      can be inserted as the value for 'requires'.
      Signed-off-by: default avatarLucas Bates <lucasb@mojatatu.com>
      Acked-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Tested-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      489ce2f4
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 27d92807
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patches contains Netfilter updates for net-next:
      
      1) .br_defrag indirection depends on CONFIG_NF_DEFRAG_IPV6, from wenxu.
      
      2) Remove unnecessary memset() in ipset, from Florent Fourcot.
      
      3) Merge control plane addition and deletion in ipset, also from Florent.
      
      4) A few missing check for nla_parse() in ipset, from Aditya Pakki
         and Jozsef Kadlecsik.
      
      5) Incorrect cleanup in error path of xt_set version 3, from Jozsef.
      
      6) Memory accounting problems when resizing in ipset, from Stefano Brivio.
      
      7) Jozsef updates his email to @netfilter.org, this batch comes with a
         conflict resolution with recent SPDX header updates.
      
      8) Add to create custom conntrack expectations via nftables, from
         Stephane Veyret.
      
      9) A lookup optimization for conntrack, from Florian Westphal.
      
      10) Check for supported flags in xt_owner.
      
      11) Support for pernet sysctl in br_netfilter, patches
          from Christian Brauner.
      
      12) Patches to move common synproxy infrastructure to nf_synproxy.c,
          to prepare the synproxy support for nf_tables, patches from
          Fernando Fernandez Mancera.
      
      13) Support to restore expiration time in set element, from Laura Garcia.
      
      14) Fix recent rewrite of netfilter IPv6 to avoid indirections
          when CONFIG_IPV6 is unset, from Arnd Bergmann.
      
      15) Always reset vlan tag on skbuff fraglist when refragmenting in
          bridge conntrack, from wenxu.
      
      16) Support to match IPv4 options in nf_tables, from Stephen Suryaputra.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27d92807
  3. 24 Jun, 2019 12 commits
    • Pablo Neira Ayuso's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 1c5ba67d
      Pablo Neira Ayuso authored
      Resolve conflict between d2912cb1 ("treewide: Replace GPLv2
      boilerplate/reference with SPDX - rule 500") removing the GPL disclaimer
      and fe03d474 ("Update my email address") which updates Jozsef
      Kadlecsik's email.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      1c5ba67d
    • David S. Miller's avatar
      Merge branch 'cxgb4-Reference-count-MPS-TCAM-entries-within-a-PF' · 045df37e
      David S. Miller authored
      Raju Rangoju says:
      
      ====================
      cxgb4: Reference count MPS TCAM entries within a PF
      
      Firmware reference counts the MPS TCAM entries by PF and VF,
      but it does not do it for usage within a PF or VF. This patch
      adds the support to track MPS TCAM entries within a PF.
      
      v2->v3:
       Fixed the compiler errors due to incorrect patch
       Also, removed the new blank line at EOF
      v1->v2:
       Use refcount_t type instead of atomic_t for mps reference count
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      045df37e
    • Raju Rangoju's avatar
      cxgb4: Add MPS refcounting for alloc/free mac filters · f9f329ad
      Raju Rangoju authored
      This patch adds reference counting support for
      alloc/free mac filters
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9f329ad
    • Raju Rangoju's avatar
      cxgb4: Add MPS TCAM refcounting for cxgb4 change mac · 2f0b9406
      Raju Rangoju authored
      This patch adds TCAM reference counting
      support for cxgb4 change mac path
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f0b9406
    • Raju Rangoju's avatar
      cxgb4: Add MPS TCAM refcounting for raw mac filters · 5fab5158
      Raju Rangoju authored
      This patch adds TCAM reference counting
      support for raw mac filters.
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fab5158
    • Raju Rangoju's avatar
      cxgb4: Re-work the logic for mps refcounting · 28b38705
      Raju Rangoju authored
      Remove existing mps refcounting code which was
      added only for encap filters and add necessary
      data structures/functions to support mps reference
      counting for all the mac filters. Also add wrapper
      functions for allocating and freeing encap mac
      filters.
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28b38705
    • Icenowy Zheng's avatar
      net: stmmac: sun8i: force select external PHY when no internal one · 0fec7e72
      Icenowy Zheng authored
      The PHY selection bit also exists on SoCs without an internal PHY; if it's
      set to 1 (internal PHY, default value) then the MAC will not make use of
      any PHY on such SoCs.
      
      This problem appears when adapting for H6, which has no real internal PHY
      (the "internal PHY" on H6 is not on-die, but on a co-packaged AC200 chip,
      connected via RMII interface at GPIO bank A).
      
      Force the PHY selection bit to 0 when the SOC doesn't have an internal PHY,
      to address the problem of a wrong default value.
      Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.io>
      Signed-off-by: default avatarOndrej Jirman <megous@megous.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fec7e72
    • Icenowy Zheng's avatar
      net: stmmac: sun8i: add support for Allwinner H6 EMAC · adadd38c
      Icenowy Zheng authored
      The EMAC on Allwinner H6 is just like the one on A64. The "internal PHY" on
      H6 is on a co-packaged AC200 chip, and it's not really internal (it's
      connected via RMII at PA GPIO bank).
      
      Add support for the Allwinner H6 EMAC in the dwmac-sun8i driver.
      Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.io>
      Signed-off-by: default avatarOndrej Jirman <megous@megous.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adadd38c
    • David S. Miller's avatar
      Merge branch 'cached-route-listings' · dcdfa50e
      David S. Miller authored
      Stefano Brivio says:
      
      ====================
      Fix listing (IPv4, IPv6) and flushing (IPv6) of cached route exceptions
      
      For IPv6 cached routes, the commands 'ip -6 route list cache' and
      'ip -6 route flush cache' don't work at all after route exceptions have
      been moved to a separate hash table in commit 2b760fcf ("ipv6: hook
      up exception table to store dst cache").
      
      For IPv4 cached routes, the command 'ip route list cache' has also
      stopped working in kernel 3.5 after commit 4895c771 ("ipv4: Add FIB
      nexthop exceptions.") introduced storage for route exceptions as a
      separate entity.
      
      Fix this by allowing userspace to clearly request cached routes with
      the RTM_F_CLONED flag used as a filter (in conjuction with strict
      checking) and by retrieving and dumping cached routes if requested.
      
      If strict checking is not requested (iproute2 < 5.0.0), we don't have a
      way to consistently filter results on other selectors (e.g. on tables),
      so skip filtering entirely and dump both regular routes and exceptions.
      
      For IPv4, cache flushing uses a completely different mechanism, so it
      wasn't affected. Listing of exception routes (modified routes pre-3.5) was
      tested against these versions of kernel and iproute2:
      
                          iproute2
      kernel         4.14.0   4.15.0   4.19.0   5.0.0   5.1.0
       3.5-rc4         +        +        +        +       +
       4.4
       4.9
       4.14
       4.15
       4.19
       5.0
       5.1
       fixed           +        +        +        +       +
      
      For IPv6, a separate iproute2 patch is required. Versions of iproute2
      and kernel tested:
      
                          iproute2
      kernel             4.14.0   4.15.0   4.19.0   5.0.0   5.1.0    5.1.0, patched
       3.18    list        +        +        +        +       +            +
               flush       +        +        +        +       +            +
       4.4     list        +        +        +        +       +            +
               flush       +        +        +        +       +            +
       4.9     list        +        +        +        +       +            +
               flush       +        +        +        +       +            +
       4.14    list        +        +        +        +       +            +
               flush       +        +        +        +       +            +
       4.15    list
               flush
       4.19    list
               flush
       5.0     list
               flush
       5.1     list
               flush
       with    list        +        +        +        +       +            +
       fix     flush       +        +        +                             +
      
      v7: Make sure r->rtm_tos is initialised in 3/11, move loop over nexthop
          objects in 4/11, add comments about usage of "skip" counters in commit
          messages of 4/11 and 8/11
      
      v6: Target for net-next, rebase and adapt to nexthop objects for IPv6 paths.
          Merge selftests into this series (as they were addressed for net-next).
          A number of minor changes detailed in logs of single patches.
      
      v5: Skip filtering altogether if no strict checking is requested: selecting
          routes or exceptions only would be inconsistent with the fact we can't
          filter on tables. Drop 1/8 (non-strict dump filter function no longer
          needed), replace 2/8 (don't use NLM_F_MATCH, decide to skip routes or
          exceptions in filter function), drop 6/8 (2/8 is enough for IPv6 too).
          Introduce dump_routes and dump_exceptions flags in filter, adapt other
          patches to that.
      
      v4: Fix the listing issue also for IPv4, making the behaviour consistent
          with IPv6. Honour NLM_F_MATCH as per RFC 3549 and allow usage of
          RTM_F_CLONED filter. Split patches into smaller logical changes.
      
      v3: Drop check on RTM_F_CLONED and rework logic of return values of
          rt6_dump_route()
      
      v2: Add count of routes handled in partial dumps, and skip them, in patch 1/2.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dcdfa50e
    • Stefano Brivio's avatar
      selftests: pmtu: Make list_flush_ipv6_exception test more demanding · b964641e
      Stefano Brivio authored
      Instead of just listing and flushing two cached exceptions, create
      a relatively big number of them, and count how many are listed. Single
      netlink dump messages contain approximately 25 entries each, and this
      way we can make sure the partial dump tracking mechanism is working
      properly.
      
      While at it, also ensure that no cached routes can be listed after
      flush, and remove 'sleep 1' calls, they are not actually needed.
      
      v7: No changes
      
      v6:
        - Merge this patch into series including fix, as it's also targeted
          for net-next. No actual changes
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b964641e
    • Stefano Brivio's avatar
      selftests: pmtu: Introduce list_flush_ipv4_exception test case · de755a85
      Stefano Brivio authored
      This test checks that route exceptions can be successfully listed and
      flushed using ip -6 route {list,flush} cache.
      
      v7: No changes
      
      v6:
        - Merge this patch into series including fix, as it's also targeted
          for net-next
        - Drop left-over print of 'ip route list cache | wc -l'
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de755a85
    • Stefano Brivio's avatar
      ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1() · 40cb35d5
      Stefano Brivio authored
      When we perform an inexact match on FIB nodes via fib6_locate_1(), longer
      prefixes will be preferred to shorter ones. However, it might happen that
      a node, with higher fn_bit value than some other, has no valid routing
      information.
      
      In this case, we'll pick that node, but it will be discarded by the check
      on RTN_RTINFO in fib6_locate(), and we might miss nodes with valid routing
      information but with lower fn_bit value.
      
      This is apparent when a routing exception is created for a default route:
       # ip -6 route list
       fc00:1::/64 dev veth_A-R1 proto kernel metric 256 pref medium
       fc00:2::/64 dev veth_A-R2 proto kernel metric 256 pref medium
       fc00:4::1 via fc00:2::2 dev veth_A-R2 metric 1024 pref medium
       fe80::/64 dev veth_A-R1 proto kernel metric 256 pref medium
       fe80::/64 dev veth_A-R2 proto kernel metric 256 pref medium
       default via fc00:1::2 dev veth_A-R1 metric 1024 pref medium
       # ip -6 route list cache
       fc00:4::1 via fc00:2::2 dev veth_A-R2 metric 1024 expires 593sec mtu 1500 pref medium
       fc00:3::1 via fc00:1::2 dev veth_A-R1 metric 1024 expires 593sec mtu 1500 pref medium
       # ip -6 route flush cache    # node for default route is discarded
       Failed to send flush request: No such process
       # ip -6 route list cache
       fc00:3::1 via fc00:1::2 dev veth_A-R1 metric 1024 expires 586sec mtu 1500 pref medium
      
      Check right away if the node has a RTN_RTINFO flag, before replacing the
      'prev' pointer, that indicates the longest matching prefix found so far.
      
      Fixes: 38fbeeee ("ipv6: prepare fib6_locate() for exception table")
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40cb35d5