1. 17 Feb, 2020 13 commits
    • Heiner Kallweit's avatar
      r8169: remove setting PCI_CACHE_LINE_SIZE in rtl_hw_start_8169 · cac960c5
      Heiner Kallweit authored
      This is done for all RTL8169 chip versions in rtl8169_init_phy already.
      Therefore we can remove it here.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cac960c5
    • Heiner Kallweit's avatar
      r8169: remove unneeded check from rtl_link_chg_patch · da090e40
      Heiner Kallweit authored
      rtl_link_chg_patch() can be called from rtl_open() to rtl8169_close()
      only. And in rtl8169_close() phy_stop() ensures that this function
      isn't called afterwards. So we don't need this check.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da090e40
    • Matteo Croce's avatar
      openvswitch: add TTL decrement action · 744676e7
      Matteo Croce authored
      New action to decrement TTL instead of setting it to a fixed value.
      This action will decrement the TTL and, in case of expired TTL, drop it
      or execute an action passed via a nested attribute.
      The default TTL expired action is to drop the packet.
      
      Supports both IPv4 and IPv6 via the ttl and hop_limit fields, respectively.
      
      Tested with a corresponding change in the userspace:
      
          # ovs-dpctl dump-flows
          in_port(2),eth(),eth_type(0x0800), packets:0, bytes:0, used:never, actions:dec_ttl{ttl<=1 action:(drop)},1
          in_port(1),eth(),eth_type(0x0800), packets:0, bytes:0, used:never, actions:dec_ttl{ttl<=1 action:(drop)},2
          in_port(1),eth(),eth_type(0x0806), packets:0, bytes:0, used:never, actions:2
          in_port(2),eth(),eth_type(0x0806), packets:0, bytes:0, used:never, actions:1
      
          # ping -c1 192.168.0.2 -t 42
          IP (tos 0x0, ttl 41, id 61647, offset 0, flags [DF], proto ICMP (1), length 84)
              192.168.0.1 > 192.168.0.2: ICMP echo request, id 386, seq 1, length 64
          # ping -c1 192.168.0.2 -t 120
          IP (tos 0x0, ttl 119, id 62070, offset 0, flags [DF], proto ICMP (1), length 84)
              192.168.0.1 > 192.168.0.2: ICMP echo request, id 388, seq 1, length 64
          # ping -c1 192.168.0.2 -t 1
          #
      Co-developed-by: default avatarBindiya Kurle <bindiyakurle@gmail.com>
      Signed-off-by: default avatarBindiya Kurle <bindiyakurle@gmail.com>
      Signed-off-by: default avatarMatteo Croce <mcroce@redhat.com>
      Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      744676e7
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: Also configure Port 5 for 2Gb/sec on 7278 · 7458bd54
      Florian Fainelli authored
      Either port 5 or port 8 can be used on a 7278 device, make sure that
      port 5 also gets configured properly for 2Gb/sec in that case.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7458bd54
    • Arjun Roy's avatar
      tcp-zerocopy: Return sk_err (if set) along with tcp receive zerocopy. · 33946518
      Arjun Roy authored
      This patchset is intended to reduce the number of extra system calls
      imposed by TCP receive zerocopy. For ping-pong RPC style workloads,
      this patchset has demonstrated a system call reduction of about 30%
      when coupled with userspace changes.
      
      For applications using epoll, returning sk_err along with the result
      of tcp receive zerocopy could remove the need to call
      recvmsg()=-EAGAIN after a spurious wakeup.
      
      Consider a multi-threaded application using epoll. A thread may awaken
      with EPOLLIN but another thread may already be reading. The
      spuriously-awoken thread does not necessarily know that another thread
      'won'; rather, it may be possible that it was woken up due to the
      presence of an error if there is no data. A zerocopy read receiving 0
      bytes thus would need to be followed up by recvmsg to be sure.
      
      Instead, we return sk_err directly with zerocopy, so the application
      can avoid this extra system call.
      Signed-off-by: default avatarArjun Roy <arjunroy@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33946518
    • Arjun Roy's avatar
      tcp-zerocopy: Return inq along with tcp receive zerocopy. · c8856c05
      Arjun Roy authored
      This patchset is intended to reduce the number of extra system calls
      imposed by TCP receive zerocopy. For ping-pong RPC style workloads,
      this patchset has demonstrated a system call reduction of about 30%
      when coupled with userspace changes.
      
      For applications using edge-triggered epoll, returning inq along with
      the result of tcp receive zerocopy could remove the need to call
      recvmsg()=-EAGAIN after a successful zerocopy. Generally speaking,
      since normally we would need to perform a recvmsg() call for every
      successful small RPC read via TCP receive zerocopy, returning inq can
      reduce the number of system calls performed by approximately half.
      Signed-off-by: default avatarArjun Roy <arjunroy@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8856c05
    • David S. Miller's avatar
      Merge branch 'Enhance-virtio-vsock-connection-semantics' · 8c8da5b8
      David S. Miller authored
      Sebastien Boeuf says:
      
      ====================
      Enhance virtio-vsock connection semantics
      
      This series improves the semantics behind the way virtio-vsock server
      accepts connections coming from the client. Whenever the server
      receives a connection request from the client, if it is bound to the
      socket but not yet listening, it will answer with a RST packet. The
      point is to ensure each request from the client is quickly processed
      so that the client can decide about the strategy of retrying or not.
      
      The series includes along with the improvement patch a new test to
      ensure the behavior is consistent across all hypervisors drivers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c8da5b8
    • Sebastien Boeuf's avatar
      tools: testing: vsock: Test when server is bound but not listening · 9de9f7d1
      Sebastien Boeuf authored
      Whenever the server side of vsock is binding to the socket, but not
      listening yet, we expect the behavior from the client to be identical to
      what happens when the server is not even started.
      
      This new test runs the server side so that it binds to the socket
      without ever listening to it. The client side will try to connect and
      should receive an ECONNRESET error.
      
      This new test provides a way to validate the previously introduced patch
      for making sure the server side will always answer with a RST packet in
      case the client requested a new connection.
      Signed-off-by: default avatarSebastien Boeuf <sebastien.boeuf@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9de9f7d1
    • Sebastien Boeuf's avatar
      net: virtio_vsock: Enhance connection semantics · df12eb6d
      Sebastien Boeuf authored
      Whenever the vsock backend on the host sends a packet through the RX
      queue, it expects an answer on the TX queue. Unfortunately, there is one
      case where the host side will hang waiting for the answer and might
      effectively never recover if no timeout mechanism was implemented.
      
      This issue happens when the guest side starts binding to the socket,
      which insert a new bound socket into the list of already bound sockets.
      At this time, we expect the guest to also start listening, which will
      trigger the sk_state to move from TCP_CLOSE to TCP_LISTEN. The problem
      occurs if the host side queued a RX packet and triggered an interrupt
      right between the end of the binding process and the beginning of the
      listening process. In this specific case, the function processing the
      packet virtio_transport_recv_pkt() will find a bound socket, which means
      it will hit the switch statement checking for the sk_state, but the
      state won't be changed into TCP_LISTEN yet, which leads the code to pick
      the default statement. This default statement will only free the buffer,
      while it should also respond to the host side, by sending a packet on
      its TX queue.
      
      In order to simply fix this unfortunate chain of events, it is important
      that in case the default statement is entered, and because at this stage
      we know the host side is waiting for an answer, we must send back a
      packet containing the operation VIRTIO_VSOCK_OP_RST.
      
      One could say that a proper timeout mechanism on the host side will be
      enough to avoid the backend to hang. But the point of this patch is to
      ensure the normal use case will be provided with proper responsiveness
      when it comes to establishing the connection.
      Signed-off-by: default avatarSebastien Boeuf <sebastien.boeuf@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df12eb6d
    • David S. Miller's avatar
      Merge tag 'mac80211-next-for-net-next-2020-02-14' of... · ddb535a6
      David S. Miller authored
      Merge tag 'mac80211-next-for-net-next-2020-02-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      A few big new things:
       * 802.11 frame encapsulation offload support
       * more HE (802.11ax) support, including some for 6 GHz band
       * powersave in hwsim, for better testing
      
      Of course as usual there are various cleanups and small fixes.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ddb535a6
    • chenqiwu's avatar
      net: x25: convert to list_for_each_entry_safe() · 1e5946f5
      chenqiwu authored
      Use list_for_each_entry_safe() instead of list_for_each_safe()
      to simplify the code.
      Signed-off-by: default avatarchenqiwu <chenqiwu@xiaomi.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e5946f5
    • Gustavo A. R. Silva's avatar
      lib: objagg: Replace zero-length arrays with flexible-array member · 1f4c51de
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertenly introduced[3] to the codebase from now on.
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f4c51de
    • Yangbo Lu's avatar
      ptp_qoriq: drop the code of alarm · d71151a3
      Yangbo Lu authored
      The alarm function hadn't been supported by PTP clock driver.
      The recommended solution PHC + phc2sys + nanosleep provides
      best performance. So drop the code of alarm in ptp_qoriq driver.
      Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d71151a3
  2. 14 Feb, 2020 27 commits