1. 22 8月, 2013 13 次提交
  2. 21 8月, 2013 12 次提交
  3. 23 7月, 2013 1 次提交
  4. 05 7月, 2013 1 次提交
    • B
      sfc: Fix memory leak when discarding scattered packets · 734d4e15
      Ben Hutchings 提交于
      Commit 2768935a ('sfc: reuse pages to avoid DMA mapping/unmapping
      costs') did not fully take account of DMA scattering which was
      introduced immediately before.  If a received packet is invalid and
      must be discarded, we only drop a reference to the first buffer's
      page, but we need to drop a reference for each buffer the packet
      used.
      
      I think this bug was missed partly because efx_recycle_rx_buffers()
      was not renamed and so no longer does what its name says.  It does not
      change the state of buffers, but only prepares the underlying pages
      for recycling.  Rename it accordingly.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      734d4e15
  5. 25 6月, 2013 9 次提交
  6. 20 6月, 2013 1 次提交
  7. 12 6月, 2013 1 次提交
  8. 29 5月, 2013 1 次提交
  9. 15 5月, 2013 1 次提交
    • B
      sfc: Reduce RX scatter buffer size, and reduce alignment if appropriate · 950c54df
      Ben Hutchings 提交于
      efx_start_datapath() asserts that we can fit 2 RX scatter buffers plus
      a software structure, each appropriately aligned, into a single page.
      Where L1_CACHE_BYTES == 256 and PAGE_SIZE == 4096, which is the case
      on s390, this assertion fails.
      
      The current scatter buffer size is also not a multiple of 64 or 128,
      which are more common cache line sizes.  If we can make both the start
      and end of a scatter buffer cache-aligned, this will reduce the need
      for read-modify-write operations on inter- processor links.
      
      Fix the alignment by reducing EFX_RX_USR_BUF_SIZE to 2048 - 256 ==
      1792.  (We could use 2048 - L1_CACHE_BYTES, but EFX_RX_USR_BUF_SIZE
      also affects user-level networking where a larger amount of
      housekeeping data may be needed.  Although this version of the driver
      does not support user-level networking, I prefer to keep scattering
      behaviour consistent with the out-of-tree version.)
      
      This still doesn't fix the s390 build because like most architectures
      it has NET_IP_ALIGN == 2.  When NET_IP_ALIGN != 0 we cannot achieve
      cache line alignment at either the start or end of a scatter buffer,
      so there is actually no point in padding the buffers to a multiple of
      the cache line size.  All we need is 4-byte alignment of the network
      header, so do that.
      
      Adjust the assertions accordingly.
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Reported-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      950c54df