1. 27 6月, 2020 1 次提交
  2. 26 6月, 2020 10 次提交
  3. 25 6月, 2020 14 次提交
  4. 24 6月, 2020 13 次提交
    • T
      net: Do not clear the sock TX queue in sk_set_socket() · 41b14fb8
      Tariq Toukan 提交于
      Clearing the sock TX queue in sk_set_socket() might cause unexpected
      out-of-order transmit when called from sock_orphan(), as outstanding
      packets can pick a different TX queue and bypass the ones already queued.
      
      This is undesired in general. More specifically, it breaks the in-order
      scheduling property guarantee for device-offloaded TLS sockets.
      
      Remove the call to sk_tx_queue_clear() in sk_set_socket(), and add it
      explicitly only where needed.
      
      Fixes: e022f0b4 ("net: Introduce sk_tx_queue_mapping")
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Reviewed-by: NBoris Pismenny <borisp@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41b14fb8
    • G
      dn_route_rcv: remove redundant dev null check · f9215d6b
      Gaurav Singh 提交于
      dev cannot be NULL here since its already being accessed
      before. Remove the redundant null check.
      Signed-off-by: NGaurav Singh <gaurav1086@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9215d6b
    • G
      dcb_doit: remove redundant skb check · 0cc55e69
      Gaurav Singh 提交于
      skb cannot be NULL here since its already being accessed
      before: sock_net(skb->sk). Remove the redundant null check.
      Signed-off-by: NGaurav Singh <gaurav1086@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0cc55e69
    • G
      net: ipv6: Use struct_size() helper and kcalloc() · 6f393457
      Gustavo A. R. Silva 提交于
      Make use of the struct_size() helper instead of an open-coded version
      in order to avoid any potential type mistakes. Also, remove unnecessary
      function ipv6_rpl_srh_alloc_size() and replace kzalloc() with kcalloc(),
      which has a 2-factor argument form for multiplication.
      
      This code was detected with the help of Coccinelle and, audited and
      fixed manually.
      Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f393457
    • A
      net: ethtool: Handle missing cable test TDR parameters · 4b973f49
      Andrew Lunn 提交于
      A last minute change put the TDR cable test parameters into a nest.
      The validation is not sufficient, resulting in an oops if the nest is
      missing. Set default values first, then update them if the nest is
      provided.
      
      Fixes: f2bc8ad3 ("net: ethtool: Allow PHY cable test TDR data to configured")
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b973f49
    • E
      udp: move gro declarations to net/udp.h · 6db69328
      Eric Dumazet 提交于
      This removes following warnings :
        CC      net/ipv4/udp_offload.o
      net/ipv4/udp_offload.c:504:17: warning: no previous prototype for 'udp4_gro_receive' [-Wmissing-prototypes]
        504 | struct sk_buff *udp4_gro_receive(struct list_head *head, struct sk_buff *skb)
            |                 ^~~~~~~~~~~~~~~~
      net/ipv4/udp_offload.c:584:29: warning: no previous prototype for 'udp4_gro_complete' [-Wmissing-prototypes]
        584 | INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
            |                             ^~~~~~~~~~~~~~~~~
      
        CHECK   net/ipv6/udp_offload.c
      net/ipv6/udp_offload.c:115:16: warning: symbol 'udp6_gro_receive' was not declared. Should it be static?
      net/ipv6/udp_offload.c:148:29: warning: symbol 'udp6_gro_complete' was not declared. Should it be static?
        CC      net/ipv6/udp_offload.o
      net/ipv6/udp_offload.c:115:17: warning: no previous prototype for 'udp6_gro_receive' [-Wmissing-prototypes]
        115 | struct sk_buff *udp6_gro_receive(struct list_head *head, struct sk_buff *skb)
            |                 ^~~~~~~~~~~~~~~~
      net/ipv6/udp_offload.c:148:29: warning: no previous prototype for 'udp6_gro_complete' [-Wmissing-prototypes]
        148 | INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff)
            |                             ^~~~~~~~~~~~~~~~~
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6db69328
    • E
      net: move tcp gro declarations to net/tcp.h · 5521d95e
      Eric Dumazet 提交于
      This patch removes following (C=1 W=1) warnings for CONFIG_RETPOLINE=y :
      
      net/ipv4/tcp_offload.c:306:16: warning: symbol 'tcp4_gro_receive' was not declared. Should it be static?
      net/ipv4/tcp_offload.c:306:17: warning: no previous prototype for 'tcp4_gro_receive' [-Wmissing-prototypes]
      net/ipv4/tcp_offload.c:319:29: warning: symbol 'tcp4_gro_complete' was not declared. Should it be static?
      net/ipv4/tcp_offload.c:319:29: warning: no previous prototype for 'tcp4_gro_complete' [-Wmissing-prototypes]
        CHECK   net/ipv6/tcpv6_offload.c
      net/ipv6/tcpv6_offload.c:16:16: warning: symbol 'tcp6_gro_receive' was not declared. Should it be static?
      net/ipv6/tcpv6_offload.c:29:29: warning: symbol 'tcp6_gro_complete' was not declared. Should it be static?
        CC      net/ipv6/tcpv6_offload.o
      net/ipv6/tcpv6_offload.c:16:17: warning: no previous prototype for 'tcp6_gro_receive' [-Wmissing-prototypes]
         16 | struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb)
            |                 ^~~~~~~~~~~~~~~~
      net/ipv6/tcpv6_offload.c:29:29: warning: no previous prototype for 'tcp6_gro_complete' [-Wmissing-prototypes]
         29 | INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
            |                             ^~~~~~~~~~~~~~~~~
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5521d95e
    • E
      tcp: move ipv4_specific to tcp include file · 9b9e2f25
      Eric Dumazet 提交于
      Declare ipv4_specific once, in tcp.h were it belongs.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b9e2f25
    • E
      tcp: move ipv6_specific declaration to remove a warning · b03d2142
      Eric Dumazet 提交于
      ipv6_specific should be declared in tcp include files,
      not mptcp.
      
      This removes the following warning :
        CHECK   net/ipv6/tcp_ipv6.c
      net/ipv6/tcp_ipv6.c:78:42: warning: symbol 'ipv6_specific' was not declared. Should it be static?
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b03d2142
    • J
      bonding/xfrm: use real_dev instead of slave_dev · bdfd2d1f
      Jarod Wilson 提交于
      Rather than requiring every hw crypto capable NIC driver to do a check for
      slave_dev being set, set real_dev in the xfrm layer and xso init time, and
      then override it in the bonding driver as needed. Then NIC drivers can
      always use real_dev, and at the same time, we eliminate the use of a
      variable name that probably shouldn't have been used in the first place,
      particularly given recent current events.
      
      CC: Boris Pismenny <borisp@mellanox.com>
      CC: Saeed Mahameed <saeedm@mellanox.com>
      CC: Leon Romanovsky <leon@kernel.org>
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Jakub Kicinski <kuba@kernel.org>
      CC: Steffen Klassert <steffen.klassert@secunet.com>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: netdev@vger.kernel.org
      Suggested-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdfd2d1f
    • B
      ipv6: fib6: avoid indirect calls from fib6_rule_lookup · 55cced4f
      Brian Vazquez 提交于
      It was reported that a considerable amount of cycles were spent on the
      expensive indirect calls on fib6_rule_lookup. This patch introduces an
      inline helper called pol_route_func that uses the indirect_call_wrappers
      to avoid the indirect calls.
      
      This patch saves around 50ns per call.
      
      Performance was measured on the receiver by checking the amount of
      syncookies that server was able to generate under a synflood load.
      
      Traffic was generated using trafgen[1] which was pushing around 1Mpps on
      a single queue. Receiver was using only one rx queue which help to
      create a bottle neck and make the experiment rx-bounded.
      
      These are the syncookies generated over 10s from the different runs:
      
      Whithout the patch:
      TcpExtSyncookiesSent            3553749            0.0
      TcpExtSyncookiesSent            3550895            0.0
      TcpExtSyncookiesSent            3553845            0.0
      TcpExtSyncookiesSent            3541050            0.0
      TcpExtSyncookiesSent            3539921            0.0
      TcpExtSyncookiesSent            3557659            0.0
      TcpExtSyncookiesSent            3526812            0.0
      TcpExtSyncookiesSent            3536121            0.0
      TcpExtSyncookiesSent            3529963            0.0
      TcpExtSyncookiesSent            3536319            0.0
      
      With the patch:
      TcpExtSyncookiesSent            3611786            0.0
      TcpExtSyncookiesSent            3596682            0.0
      TcpExtSyncookiesSent            3606878            0.0
      TcpExtSyncookiesSent            3599564            0.0
      TcpExtSyncookiesSent            3601304            0.0
      TcpExtSyncookiesSent            3609249            0.0
      TcpExtSyncookiesSent            3617437            0.0
      TcpExtSyncookiesSent            3608765            0.0
      TcpExtSyncookiesSent            3620205            0.0
      TcpExtSyncookiesSent            3601895            0.0
      
      Without the patch the average is 354263 pkt/s or 2822 ns/pkt and with
      the patch the average is 360738 pkt/s or 2772 ns/pkt which gives an
      estimate of 50 ns per packet.
      
      [1] http://netsniff-ng.org/
      
      Changelog since v1:
       - Change ordering in the ICW (Paolo Abeni)
      
      Cc: Luigi Rizzo <lrizzo@google.com>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Reported-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NBrian Vazquez <brianvv@google.com>
      Acked-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55cced4f
    • A
      net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM · b4730ae6
      Alexander Lobakin 提交于
      Commit e585f236 ("udp: Changes to udp_offload to support remote
      checksum offload") added new GSO type and a corresponding netdev
      feature, but missed Ethtool's 'netdev_features_strings' table.
      Give it a name so it will be exposed to userspace and become available
      for manual configuration.
      
      v3:
       - decouple from "netdev_features_strings[] cleanup" series;
       - no functional changes.
      
      v2:
       - don't split the "Fixes:" tag across lines;
       - no functional changes.
      
      Fixes: e585f236 ("udp: Changes to udp_offload to support remote checksum offload")
      Signed-off-by: NAlexander Lobakin <alobakin@pm.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4730ae6
    • H
      bridge: mrp: Validate when setting the port role · 7882c895
      Horatiu Vultur 提交于
      This patch adds specific checks for primary(0x0) and secondary(0x1) when
      setting the port role. For any other value the function
      'br_mrp_set_port_role' will return -EINVAL.
      
      Fixes: 20f6a05e ("bridge: mrp: Rework the MRP netlink interface")
      Signed-off-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7882c895
  5. 23 6月, 2020 2 次提交