1. 09 Jul, 2019 8 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · af144a98
      David S. Miller authored
      Two cases of overlapping changes, nothing fancy.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af144a98
    • Willem de Bruijn's avatar
      skbuff: increase verbosity when dumping skb data · 6413139d
      Willem de Bruijn authored
      skb_warn_bad_offload and netdev_rx_csum_fault trigger on hard to debug
      issues. Dump more state and the header.
      
      Optionally dump the entire packet and linear segment. This is required
      to debug checksum bugs that may include bytes past skb_tail_pointer().
      
      Both call sites call this function inside a net_ratelimit() block.
      Limit full packet log further to a hard limit of can_dump_full (5).
      
      Based on an earlier patch by Cong Wang, see link below.
      
      Changes v1 -> v2
        - dump frag_list only on full_pkt
      
      Link: https://patchwork.ozlabs.org/patch/1000841/Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6413139d
    • 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
    • Christoph Paasch's avatar
      tcp: Reset bytes_acked and bytes_received when disconnecting · e858faf5
      Christoph Paasch authored
      If an app is playing tricks to reuse a socket via tcp_disconnect(),
      bytes_acked/received needs to be reset to 0. Otherwise tcp_info will
      report the sum of the current and the old connection..
      
      Cc: Eric Dumazet <edumazet@google.com>
      Fixes: 0df48c26 ("tcp: add tcpi_bytes_acked to tcp_info")
      Fixes: bdd1f9ed ("tcp: add tcpi_bytes_received to tcp_info")
      Signed-off-by: default avatarChristoph Paasch <cpaasch@apple.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e858faf5
    • 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 32 commits