Skip to content
  1. Oct 18, 2018
  2. Oct 17, 2018
  3. Oct 16, 2018
    • David S. Miller's avatar
      Merge branch 'net-Kernel-side-filtering-for-route-dumps' · 2c59f06c
      David S. Miller authored
      
      
      David Ahern says:
      
      ====================
      net: Kernel side filtering for route dumps
      
      Implement kernel side filtering of route dumps by protocol (e.g., which
      routing daemon installed the route), route type (e.g., unicast), table
      id and nexthop device.
      
      iproute2 has been doing this filtering in userspace for years; pushing
      the filters to the kernel side reduces the amount of data the kernel
      sends and reduces wasted cycles on both sides processing unwanted data.
      These initial options provide a huge improvement for efficiently
      examining routes on large scale systems.
      
      v2
      - better handling of requests for a specific table. Rather than walking
        the hash of all tables, lookup the specific table and dump it
      - refactor mr_rtm_dumproute moving the loop over the table into a
        helper that can be invoked directly
      - add hook to return NLM_F_DUMP_FILTERED in DONE message to ensure
        it is returned even when the dump returns nothing
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c59f06c
    • David Ahern's avatar
      net/ipv4: Bail early if user only wants prefix entries · e4e92fb1
      David Ahern authored
      
      
      Unlike IPv6, IPv4 does not have routes marked with RTF_PREFIX_RT. If the
      flag is set in the dump request, just return.
      
      In the process of this change, move the CLONE check to use the new
      filter flags.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e4e92fb1
    • David Ahern's avatar
      net/ipv6: Bail early if user only wants cloned entries · 08e814c9
      David Ahern authored
      
      
      Similar to IPv4, IPv6 fib no longer contains cloned routes. If a user
      requests a route dump for only cloned entries, no sense walking the FIB
      and returning everything.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      08e814c9
    • David Ahern's avatar
      net/mpls: Handle kernel side filtering of route dumps · 196cfebf
      David Ahern authored
      
      
      Update the dump request parsing in MPLS for the non-INET case to
      enable kernel side filtering. If INET is disabled the only filters
      that make sense for MPLS are protocol and nexthop device.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      196cfebf
    • David Ahern's avatar
      net: Enable kernel side filtering of route dumps · effe6792
      David Ahern authored
      
      
      Update parsing of route dump request to enable kernel side filtering.
      Allow filtering results by protocol (e.g., which routing daemon installed
      the route), route type (e.g., unicast), table id and nexthop device. These
      amount to the low hanging fruit, yet a huge improvement, for dumping
      routes.
      
      ip_valid_fib_dump_req is called with RTNL held, so __dev_get_by_index can
      be used to look up the device index without taking a reference. From
      there filter->dev is only used during dump loops with the lock still held.
      
      Set NLM_F_DUMP_FILTERED in the answer_flags so the user knows the results
      have been filtered should no entries be returned.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      effe6792
    • David Ahern's avatar
      net: Plumb support for filtering ipv4 and ipv6 multicast route dumps · cb167893
      David Ahern authored
      
      
      Implement kernel side filtering of routes by egress device index and
      table id. If the table id is given in the filter, lookup table and
      call mr_table_dump directly for it.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cb167893
    • David Ahern's avatar
      ipmr: Refactor mr_rtm_dumproute · e1cedae1
      David Ahern authored
      
      
      Move per-table loops from mr_rtm_dumproute to mr_table_dump and export
      mr_table_dump for dumps by specific table id.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1cedae1
    • David Ahern's avatar
      net/mpls: Plumb support for filtering route dumps · bae9a78b
      David Ahern authored
      
      
      Implement kernel side filtering of routes by egress device index and
      protocol. MPLS uses only a single table and route type.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bae9a78b
    • David Ahern's avatar
      net/ipv6: Plumb support for filtering route dumps · 13e38901
      David Ahern authored
      
      
      Implement kernel side filtering of routes by table id, egress device
      index, protocol, and route type. If the table id is given in the filter,
      lookup the table and call fib6_dump_table directly for it.
      
      Move the existing route flags check for prefix only routes to the new
      filter.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13e38901
    • David Ahern's avatar
      net/ipv4: Plumb support for filtering route dumps · 18a8021a
      David Ahern authored
      
      
      Implement kernel side filtering of routes by table id, egress device index,
      protocol and route type. If the table id is given in the filter, lookup the
      table and call fib_table_dump directly for it.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18a8021a
    • David Ahern's avatar
      net: Add struct for fib dump filter · 4724676d
      David Ahern authored
      
      
      Add struct fib_dump_filter for options on limiting which routes are
      returned in a dump request. The current list is table id, protocol,
      route type, rtm_flags and nexthop device index. struct net is needed
      to lookup the net_device from the index.
      
      Declare the filter for each route dump handler and plumb the new
      arguments from dump handlers to ip_valid_fib_dump_req.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4724676d
    • David Ahern's avatar
      netlink: Add answer_flags to netlink_callback · 22e6c58b
      David Ahern authored
      
      
      With dump filtering we need a way to ensure the NLM_F_DUMP_FILTERED
      flag is set on a message back to the user if the data returned is
      influenced by some input attributes. Normally this can be done as
      messages are added to the skb, but if the filter results in no data
      being returned, the user could be confused as to why.
      
      This patch adds answer_flags to the netlink_callback allowing dump
      handlers to set the NLM_F_DUMP_FILTERED at a minimum in the
      NLMSG_DONE message ensuring the flag gets back to the user.
      
      The netlink_callback space is initialized to 0 via a memset in
      __netlink_dump_start, so init of the new answer_flags is covered.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22e6c58b
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · e8567951
      David S. Miller authored
      
      
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2018-10-16
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Convert BPF sockmap and kTLS to both use a new sk_msg API and enable
         sk_msg BPF integration for the latter, from Daniel and John.
      
      2) Enable BPF syscall side to indicate for maps that they do not support
         a map lookup operation as opposed to just missing key, from Prashant.
      
      3) Add bpftool map create command which after map creation pins the
         map into bpf fs for further processing, from Jakub.
      
      4) Add bpftool support for attaching programs to maps allowing sock_map
         and sock_hash to be used from bpftool, from John.
      
      5) Improve syscall BPF map update/delete path for map-in-map types to
         wait a RCU grace period for pending references to complete, from Daniel.
      
      6) Couple of follow-up fixes for the BPF socket lookup to get it
         enabled also when IPv6 is compiled as a module, from Joe.
      
      7) Fix a generic-XDP bug to handle the case when the Ethernet header
         was mangled and thus update skb's protocol and data, from Jesper.
      
      8) Add a missing BTF header length check between header copies from
         user space, from Wenwen.
      
      9) Minor fixups in libbpf to use __u32 instead u32 types and include
         proper perf_event.h uapi header instead of perf internal one, from Yonghong.
      
      10) Allow to pass user-defined flags through EXTRA_CFLAGS and EXTRA_LDFLAGS
          to bpftool's build, from Jiri.
      
      11) BPF kselftest tweaks to add LWTUNNEL to config fragment and to install
          with_addr.sh script from flow dissector selftest, from Anders.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8567951
    • Heiner Kallweit's avatar
      net: phy: merge phy_start_aneg and phy_start_aneg_priv · c45d7150
      Heiner Kallweit authored
      After commit 9f2959b6
      
       ("net: phy: improve handling delayed work")
      the sync parameter isn't needed any longer in phy_start_aneg_priv().
      This allows to merge phy_start_aneg() and phy_start_aneg_priv().
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c45d7150
    • Haiyang Zhang's avatar
      hv_netvsc: fix vf serial matching with pci slot info · 00547955
      Haiyang Zhang authored
      The VF device's serial number is saved as a string in PCI slot's
      kobj name, not the slot->number. This patch corrects the netvsc
      driver, so the VF device can be successfully paired with synthetic
      NIC.
      
      Fixes: 00d7ddba
      
       ("hv_netvsc: pair VF based on serial number")
      Reported-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00547955
    • David S. Miller's avatar
      Merge branch 'tcp-second-round-for-EDT-conversion' · b1394967
      David S. Miller authored
      
      
      Eric Dumazet says:
      
      ====================
      tcp: second round for EDT conversion
      
      First round of EDT patches left TCP stack in a non optimal state.
      
      - High speed flows suffered from loss of performance, addressed
        by the first patch of this series.
      
      - Second patch brings pacing to the current state of networking,
        since we now reach ~100 Gbit on a single TCP flow.
      
      - Third patch implements a mitigation for scheduling delays,
        like the one we did in sch_fq in the past.
      
      - Fourth patch removes one special case in sch_fq for ACK packets.
      
      - Fifth patch removes a serious perfomance cost for TCP internal
        pacing. We should setup the high resolution timer only if
        really needed.
      
      - Sixth patch fixes a typo in BBR.
      
      - Last patch is one minor change in cdg congestion control.
      
      Neal Cardwell also has a patch series fixing BBR after
      EDT adoption.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1394967