1. 15 2月, 2019 1 次提交
  2. 22 1月, 2019 1 次提交
  3. 13 12月, 2018 2 次提交
  4. 29 11月, 2018 1 次提交
  5. 26 9月, 2018 3 次提交
  6. 01 9月, 2018 2 次提交
  7. 30 8月, 2018 2 次提交
    • M
      i40e: add AF_XDP zero-copy Tx support · 1328dcdd
      Magnus Karlsson 提交于
      This patch adds zero-copy Tx support for AF_XDP sockets. It implements
      the ndo_xsk_async_xmit netdev ndo and performs all the Tx logic from a
      NAPI context. This means pulling egress packets from the Tx ring,
      placing the frames on the NIC HW descriptor ring and completing sent
      frames back to the application via the completion ring.
      
      The regular XDP Tx ring is used for AF_XDP as well. This rationale for
      this is as follows: XDP_REDIRECT guarantees mutual exclusion between
      different NAPI contexts based on CPU id. In other words, a netdev can
      XDP_REDIRECT to another netdev with a different NAPI context, since
      the operation is bound to a specific core and each core has its own
      hardware ring.
      
      As the AF_XDP Tx action is running in the same NAPI context and using
      the same ring, it will also be protected from XDP_REDIRECT actions
      with the exact same mechanism.
      
      As with AF_XDP Rx, all AF_XDP Tx specific functions are added to
      i40e_xsk.c.
      Signed-off-by: NMagnus Karlsson <magnus.karlsson@intel.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      1328dcdd
    • B
      i40e: add AF_XDP zero-copy Rx support · 0a714186
      Björn Töpel 提交于
      This patch adds zero-copy Rx support for AF_XDP sockets. Instead of
      allocating buffers of type MEM_TYPE_PAGE_SHARED, the Rx frames are
      allocated as MEM_TYPE_ZERO_COPY when AF_XDP is enabled for a certain
      queue.
      
      All AF_XDP specific functions are added to a new file, i40e_xsk.c.
      
      Note that when AF_XDP zero-copy is enabled, the XDP action XDP_PASS
      will allocate a new buffer and copy the zero-copy frame prior passing
      it to the kernel stack.
      Signed-off-by: NBjörn Töpel <bjorn.topel@intel.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      0a714186