1. 09 Jul, 2019 5 commits
    • Willem de Bruijn's avatar
      ipv6: elide flowlabel check if no exclusive leases exist · 59c820b2
      Willem de Bruijn authored
      Processes can request ipv6 flowlabels with cmsg IPV6_FLOWINFO.
      If not set, by default an autogenerated flowlabel is selected.
      
      Explicit flowlabels require a control operation per label plus a
      datapath check on every connection (every datagram if unconnected).
      This is particularly expensive on unconnected sockets multiplexing
      many flows, such as QUIC.
      
      In the common case, where no lease is exclusive, the check can be
      safely elided, as both lease request and check trivially succeed.
      Indeed, autoflowlabel does the same even with exclusive leases.
      
      Elide the check if no process has requested an exclusive lease.
      
      fl6_sock_lookup previously returns either a reference to a lease or
      NULL to denote failure. Modify to return a real error and update
      all callers. On return NULL, they can use the label and will elide
      the atomic_dec in fl6_sock_release.
      
      This is an optimization. Robust applications still have to revert to
      requesting leases if the fast path fails due to an exclusive lease.
      
      Changes RFC->v1:
        - use static_key_false_deferred to rate limit jump label operations
          - call static_key_deferred_flush to stop timers on exit
        - move decrement out of RCU context
        - defer optimization also if opt data is associated with a lease
        - updated all fp6_sock_lookup callers, not just udp
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59c820b2
    • Vincent Bernat's avatar
      bonding: fix value exported by Netlink for peer_notif_delay · ee4f56f4
      Vincent Bernat authored
      IFLA_BOND_PEER_NOTIF_DELAY was set to the value of downdelay instead
      of peer_notif_delay. After this change, the correct value is exported.
      
      Fixes: 07a4ddec ("bonding: add an option to specify a delay between peer notifications")
      Signed-off-by: default avatarVincent Bernat <vincent@bernat.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee4f56f4
    • Al Viro's avatar
      coallocate socket_wq with socket itself · 333f7909
      Al Viro authored
      socket->wq is assign-once, set when we are initializing both
      struct socket it's in and struct socket_wq it points to.  As the
      matter of fact, the only reason for separate allocation was the
      ability to RCU-delay freeing of socket_wq.  RCU-delaying the
      freeing of socket itself gets rid of that need, so we can just
      fold struct socket_wq into the end of struct socket and simplify
      the life both for sock_alloc_inode() (one allocation instead of
      two) and for tun/tap oddballs, where we used to embed struct socket
      and struct socket_wq into the same structure (now - embedding just
      the struct socket).
      
      Note that reference to struct socket_wq in struct sock does remain
      a reference - that's unchanged.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      333f7909
    • Al Viro's avatar
      sockfs: switch to ->free_inode() · 6d7855c5
      Al Viro authored
      we do have an RCU-delayed part there already (freeing the wq),
      so it's not like the pipe situation; moreover, it might be
      worth considering coallocating wq with the rest of struct sock_alloc.
      ->sk_wq in struct sock would remain a pointer as it is, but
      the object it normally points to would be coallocated with
      struct socket...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d7855c5
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 17ccf9e3
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2019-07-09
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Lots of libbpf improvements: i) addition of new APIs to attach BPF
         programs to tracing entities such as {k,u}probes or tracepoints,
         ii) improve specification of BTF-defined maps by eliminating the
         need for data initialization for some of the members, iii) addition
         of a high-level API for setting up and polling perf buffers for
         BPF event output helpers, all from Andrii.
      
      2) Add "prog run" subcommand to bpftool in order to test-run programs
         through the kernel testing infrastructure of BPF, from Quentin.
      
      3) Improve verifier for BPF sockaddr programs to support 8-byte stores
         for user_ip6 and msg_src_ip6 members given clang tends to generate
         such stores, from Stanislav.
      
      4) Enable the new BPF JIT zero-extension optimization for further
         riscv64 ALU ops, from Luke.
      
      5) Fix a bpftool json JIT dump crash on powerpc, from Jiri.
      
      6) Fix an AF_XDP race in generic XDP's receive path, from Ilya.
      
      7) Various smaller fixes from Ilya, Yue and Arnd.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      17ccf9e3
  2. 08 Jul, 2019 35 commits