1. 22 Jan, 2019 6 commits
    • Nikolay Aleksandrov's avatar
      bonding: 3ad: remove bond_3ad_rx_indication's length argument · dadeb61d
      Nikolay Aleksandrov authored
      Since the received lacpdu is accessed via skb_header_pointer() in
      bond_3ad_lacpdu_recv() we no longer need to check for skb->len's length.
      If the returned lacpdu pointer is not null that should be enough.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dadeb61d
    • Nikolay Aleksandrov's avatar
      bonding: adjust style of bond_3ad_rx_indication · 3d021715
      Nikolay Aleksandrov authored
      No functional changes, adjust the style of bond_3ad_rx_indication to
      prepare it for the stats changes:
       - reduce indentation by returning early on wrong length
       - remove extra new lines between switch cases
       - add marker local variable and use it to reduce line length
       - rearrange local variables in reverse xmas tree
       - separate final return
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d021715
    • Atul Gupta's avatar
      cxgb4: TLS record offload enable · 1435d997
      Atul Gupta authored
      Enable Inline TLS record by default
      Signed-off-by: default avatarAtul Gupta <atul.gupta@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1435d997
    • Atul Gupta's avatar
      net/tls: free ctx in sock destruct · 76f7164d
      Atul Gupta authored
      free tls context in sock destruct. close may not be the last
      call to free sock but force releasing the ctx in close
      will result in GPF when ctx referred again in tcp_done
      
      [  515.330477] general protection fault: 0000 [#1] SMP PTI
      [  515.330539] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.20.0-rc7+ #10
      [  515.330657] Hardware name: Supermicro X8ST3/X8ST3, BIOS 2.0b
      11/07/2013
      [  515.330844] RIP: 0010:tls_hw_unhash+0xbf/0xd0
      [
      [  515.332220] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  515.332340] CR2: 00007fab32c55000 CR3: 000000009261e000 CR4:
      00000000000006e0
      [  515.332519] Call Trace:
      [  515.332632]  <IRQ>
      [  515.332793]  tcp_set_state+0x5a/0x190
      [  515.332907]  ? tcp_update_metrics+0xe3/0x350
      [  515.333023]  tcp_done+0x31/0xd0
      [  515.333130]  tcp_rcv_state_process+0xc27/0x111a
      [  515.333242]  ? __lock_is_held+0x4f/0x90
      [  515.333350]  ? tcp_v4_do_rcv+0xaf/0x1e0
      [  515.333456]  tcp_v4_do_rcv+0xaf/0x1e0
      Signed-off-by: default avatarAtul Gupta <atul.gupta@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76f7164d
    • Atul Gupta's avatar
      net/tls: build_protos moved to common routine · 63a6b3fe
      Atul Gupta authored
      build protos is required for tls_hw_prot also hence moved to
      'tls_build_proto' and called as required from tls_init
      and tls_hw_proto. This is required since build_protos
      for v4 is moved from tls_register to tls_init in
      commit <28cb6f1e>
      Signed-off-by: default avatarAtul Gupta <atul.gupta@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63a6b3fe
    • Cong Wang's avatar
      net: introduce a knob to control whether to inherit devconf config · 856c395c
      Cong Wang authored
      There have been many people complaining about the inconsistent
      behaviors of IPv4 and IPv6 devconf when creating new network
      namespaces.  Currently, for IPv4, we inherit all current settings
      from init_net, but for IPv6 we reset all setting to default.
      
      This patch introduces a new /proc file
      /proc/sys/net/core/devconf_inherit_init_net to control the
      behavior of whether to inhert sysctl current settings from init_net.
      This file itself is only available in init_net.
      
      As demonstrated below:
      
      Initial setup in init_net:
       # cat /proc/sys/net/ipv4/conf/all/rp_filter
       2
       # cat /proc/sys/net/ipv6/conf/all/accept_dad
       1
      
      Default value 0 (current behavior):
       # ip netns del test
       # ip netns add test
       # ip netns exec test cat /proc/sys/net/ipv4/conf/all/rp_filter
       2
       # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad
       0
      
      Set to 1 (inherit from init_net):
       # echo 1 > /proc/sys/net/core/devconf_inherit_init_net
       # ip netns del test
       # ip netns add test
       # ip netns exec test cat /proc/sys/net/ipv4/conf/all/rp_filter
       2
       # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad
       1
      
      Set to 2 (reset to default):
       # echo 2 > /proc/sys/net/core/devconf_inherit_init_net
       # ip netns del test
       # ip netns add test
       # ip netns exec test cat /proc/sys/net/ipv4/conf/all/rp_filter
       0
       # ip netns exec test cat /proc/sys/net/ipv6/conf/all/accept_dad
       0
      
      Set to a value out of range (invalid):
       # echo 3 > /proc/sys/net/core/devconf_inherit_init_net
       -bash: echo: write error: Invalid argument
       # echo -1 > /proc/sys/net/core/devconf_inherit_init_net
       -bash: echo: write error: Invalid argument
      Reported-by: default avatarZhu Yanjun <Yanjun.Zhu@windriver.com>
      Reported-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
      Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      856c395c
  2. 21 Jan, 2019 4 commits
  3. 20 Jan, 2019 30 commits