1. 17 2月, 2020 11 次提交
    • M
      openvswitch: add TTL decrement action · 744676e7
      Matteo Croce 提交于
      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: NBindiya Kurle <bindiyakurle@gmail.com>
      Signed-off-by: NBindiya Kurle <bindiyakurle@gmail.com>
      Signed-off-by: NMatteo Croce <mcroce@redhat.com>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      744676e7
    • F
      net: dsa: bcm_sf2: Also configure Port 5 for 2Gb/sec on 7278 · 7458bd54
      Florian Fainelli 提交于
      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: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7458bd54
    • A
      tcp-zerocopy: Return sk_err (if set) along with tcp receive zerocopy. · 33946518
      Arjun Roy 提交于
      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: NArjun Roy <arjunroy@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33946518
    • A
      tcp-zerocopy: Return inq along with tcp receive zerocopy. · c8856c05
      Arjun Roy 提交于
      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: NArjun Roy <arjunroy@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8856c05
    • D
      Merge branch 'Enhance-virtio-vsock-connection-semantics' · 8c8da5b8
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      8c8da5b8
    • S
      tools: testing: vsock: Test when server is bound but not listening · 9de9f7d1
      Sebastien Boeuf 提交于
      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: NSebastien Boeuf <sebastien.boeuf@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9de9f7d1
    • S
      net: virtio_vsock: Enhance connection semantics · df12eb6d
      Sebastien Boeuf 提交于
      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: NSebastien Boeuf <sebastien.boeuf@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df12eb6d
    • D
      Merge tag 'mac80211-next-for-net-next-2020-02-14' of... · ddb535a6
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      ddb535a6
    • C
      net: x25: convert to list_for_each_entry_safe() · 1e5946f5
      chenqiwu 提交于
      Use list_for_each_entry_safe() instead of list_for_each_safe()
      to simplify the code.
      Signed-off-by: Nchenqiwu <chenqiwu@xiaomi.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e5946f5
    • G
      lib: objagg: Replace zero-length arrays with flexible-array member · 1f4c51de
      Gustavo A. R. Silva 提交于
      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: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f4c51de
    • Y
      ptp_qoriq: drop the code of alarm · d71151a3
      Yangbo Lu 提交于
      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: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d71151a3
  2. 15 2月, 2020 4 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 2019fc96
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix interrupt name truncation in mv88e6xxx dsa driver, from Andrew
          Lunn.
      
       2) Process generic XDP even if SKB is cloned, from Toke Høiland-Jørgensen.
      
       3) Fix leak of kernel memory to userspace in smc, from Eric Dumazet.
      
       4) Add some missing netlink attribute validation to matchall and
          flower, from Davide Caratti.
      
       5) Send icmp responses properly when NAT has been applied to the frame
          before we get to the tunnel emitting the icmp, from Jason Donenfeld.
      
       6) Make sure there is enough SKB headroom when adding dsa tags for qca
          and ar9331. From Per Forlin.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits)
        netdevice.h: fix all kernel-doc and Sphinx warnings
        net: dsa: tag_ar9331: Make sure there is headroom for tag
        net: dsa: tag_qca: Make sure there is headroom for tag
        net, ip6_tunnel: enhance tunnel locate with link check
        net/smc: no peer ID in CLC decline for SMCD
        net/smc: transfer fasync_list in case of fallback
        net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples()
        net: hns3: fix VF bandwidth does not take effect in some case
        net: hns3: add management table after IMP reset
        mac80211: fix wrong 160/80+80 MHz setting
        cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE
        xfrm: interface: use icmp_ndo_send helper
        wireguard: device: use icmp_ndo_send helper
        sunvnet: use icmp_ndo_send helper
        gtp: use icmp_ndo_send helper
        icmp: introduce helper for nat'd source address in network device context
        net/sched: flower: add missing validation of TCA_FLOWER_FLAGS
        net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS
        net/flow_dissector: remove unexist field description
        page_pool: refill page when alloc.count of pool is zero
        ...
      2019fc96
    • L
      Merge tag 'pm-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 4e03e4e6
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "Fix three issues related to the handling of wakeup events signaled
        through the ACPI SCI while suspended to idle (Rafael Wysocki) and
        unexport an internal cpufreq variable (Yangtao Li)"
      
      * tag 'pm-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system
        ACPICA: Introduce acpi_any_gpe_status_set()
        ACPI: PM: s2idle: Avoid possible race related to the EC GPE
        ACPI: EC: Fix flushing of pending work
        cpufreq: Make cpufreq_global_kobject static
      4e03e4e6
    • L
      Merge tag 'sound-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 81f3011c
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "The only common change is the regression fix of the previous PCM fix
        patch for managed buffers while the rest are usual suspects, USB-audio
        and HD-audio device-specific quirks.
      
        The change for UAC2 clock validation workaround became a bit big, but
        the changes are fairly straightforward"
      
      * tag 'sound-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: pcm: Fix double hw_free calls
        ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000
        ALSA: hda/realtek - Fix silent output on MSI-GL73
        ALSA: hda/realtek - Add more codec supported Headset Button
        ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
        ALSA: usb-audio: Fix UAC2/3 effect unit parsing
        ALSA: usb-audio: Apply 48kHz fixed rate playback for Jabra Evolve 65 headset
      81f3011c
    • L
      Merge tag 'drm-fixes-2020-02-14' of git://anongit.freedesktop.org/drm/drm · 3f0d3293
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "The core has a build fix for edid code on certain compilers/arches/,
        one MST fix and one vgem fix. Regular amdgpu fixes, and a couple of
        small driver fixes.
      
        The i915 fixes are bit larger than normal for this stage, but they
        were having CI issues last week, and they hadn't sent any fixes last
        week due to this.
      
        core:
         - edid build fix
      
        mst:
         - fix NULL ptr deref
      
        vgem:
         - fix close after free
      
        msm:
         - better dma-api usage
      
        sun4i:
         - disable allow_fb_modifiers
      
        amdgpu:
         - Additional OD fixes for navi
         - Misc display fixes
         - VCN 2.5 DPG fix
         - Prevent build errors on PowerPC on some configs
         - GDS EDC fix
      
        i915:
         - dsi/acpi fixes
         - gvt locking and allocation fixes
         - gem/gt fixes
         - bios timing parameters fix"
      
      * tag 'drm-fixes-2020-02-14' of git://anongit.freedesktop.org/drm/drm: (50 commits)
        drm/i915: Mark the removal of the i915_request from the sched.link
        drm/i915/execlists: Reclaim the hanging virtual request
        drm/i915/execlists: Take a reference while capturing the guilty request
        drm/i915/execlists: Offline error capture
        drm/i915/gt: Allow temporary suspension of inflight requests
        drm/i915: Keep track of request among the scheduling lists
        drm/i915/gem: Tighten checks and acquiring the mmap object
        drm/i915: Fix preallocated barrier list append
        drm/i915/gt: Acquire ce->active before ce->pin_count/ce->pin_mutex
        drm/i915: Tighten atomicity of i915_active_acquire vs i915_active_release
        drm/i915: Stub out i915_gpu_coredump_put
        drm/amdgpu:/navi10: use the ODCAP enum to index the caps array
        drm/amdgpu: update smu_v11_0_pptable.h
        drm/amdgpu: correct comment to clear up the confusion
        drm/amd/display: DCN2.x Do not program DPPCLK if same value
        drm/amd/display: Don't map ATOM_ENABLE to ATOM_INIT
        drm/amdgpu/vcn2.5: fix warning
        drm/amdgpu: limit GDS clearing workaround in cold boot sequence
        drm/amdgpu: fix amdgpu pmu to use hwc->config instead of hwc->conf
        amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags
        ...
      3f0d3293
  3. 14 2月, 2020 25 次提交