1. 08 Apr, 2017 4 commits
    • David S. Miller's avatar
      Merge branch 'net-SO_COOKIE' · 7cb164ef
      David S. Miller authored
      Chenbo Feng says:
      
      ====================
      New getsockopt option to retrieve socket cookie
      
      In the current kernel socket cookie implementation, there is no simple
      and direct way to retrieve the socket cookie based on file descriptor. A
      process mat need to get it from sock fd if it want to correlate with
      sock_diag output or use a bpf map with new socket cookie function.
      
      If userspace wants to receive the socket cookie for a given socket fd,
      it must send a SOCK_DIAG_BY_FAMILY dump request and look for the 5-tuple.
      This is slow and can be ambiguous in the case of sockets that have the
      same 5-tuple (e.g., tproxy / transparent sockets, SO_REUSEPORT sockets,
      etc.).
      
      As shown in the example program. The xt_eBPF program is using socket cookie
      to record the network traffics statistics and with the socket cookie
      retrieved by getsockopt. The program can directly access to a specific
      socket data without scanning the whole bpf map.
      ====================
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cb164ef
    • Chenbo Feng's avatar
      Sample program using SO_COOKIE · 00f660ea
      Chenbo Feng authored
      Added a per socket traffic monitoring option to illustrate the usage
      of new getsockopt SO_COOKIE. The program is based on the socket traffic
      monitoring program using xt_eBPF and in the new option the data entry
      can be directly accessed using socket cookie. The cookie retrieved
      allow us to lookup an element in the eBPF for a specific socket.
      Signed-off-by: default avatarChenbo Feng <fengc@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00f660ea
    • Chenbo Feng's avatar
      New getsockopt option to get socket cookie · 5daab9db
      Chenbo Feng authored
      Introduce a new getsockopt operation to retrieve the socket cookie
      for a specific socket based on the socket fd.  It returns a unique
      non-decreasing cookie for each socket.
      Tested: https://android-review.googlesource.com/#/c/358163/Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarChenbo Feng <fengc@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5daab9db
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2017-04-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · c42cb98c
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2017-04-16
      
      This patchset provides some updates for the mlx5 drivers.
      
      From Majd,
      1st patch, Adds ConnectX-6 and ConnectX-6 VF PCI IDs support.
      
      From Guy,
      2nd patch, Adds RXFCS scatter support.
      3rd patch, Small cleanup to make a function static.
      
      From Eran,
      4th patch, Adds 4 zeros padding to ethtool FW version.
      6th patch, Trevial code reuse cleanup
      
      From Inbar,
      5th patch, Show board id in ethtool driver information
      
      From Saeed,
      7th patch, Set default RX moderation parameters on driver load
      as a small fix for the latest fail-safe config feature.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c42cb98c
  2. 07 Apr, 2017 36 commits