1. 20 9月, 2012 3 次提交
    • M
      r8169: use unlimited DMA burst for TX · aee77e4a
      Michal Schmidt 提交于
      The r8169 driver currently limits the DMA burst for TX to 1024 bytes. I have
      a box where this prevents the interface from using the gigabit line to its full
      potential. This patch solves the problem by setting TX_DMA_BURST to unlimited.
      
      The box has an ASRock B75M motherboard with on-board RTL8168evl/8111evl
      (XID 0c900880). TSO is enabled.
      
      I used netperf (TCP_STREAM test) to measure the dependency of TX throughput
      on MTU. I did it for three different values of TX_DMA_BURST ('5'=512, '6'=1024,
      '7'=unlimited). This chart shows the results:
      http://michich.fedorapeople.org/r8169/r8169-effects-of-TX_DMA_BURST.png
      
      Interesting points:
       - With the current DMA burst limit (1024):
         - at the default MTU=1500 I get only 842 Mbit/s.
         - when going from small MTU, the performance rises monotonically with
           increasing MTU only up to a peak at MTU=1076 (908 MBit/s). Then there's
           a sudden drop to 762 MBit/s from which the throughput rises monotonically
           again with further MTU increases.
       - With a smaller DMA burst limit (512):
         - there's a similar peak at MTU=1076 and another one at MTU=564.
       - With unlimited DMA burst:
         - at the default MTU=1500 I get nice 940 Mbit/s.
         - the throughput rises monotonically with increasing MTU with no strange
           peaks.
      
      Notice that the peaks occur at MTU sizes that are multiples of the DMA burst
      limit plus 52. Why 52? Because:
        20 (IP header) + 20 (TCP header) + 12 (TCP options) = 52
      
      The Realtek-provided r8168 driver (v8.032.00) uses unlimited TX DMA burst too,
      except for CFG_METHOD_1 where the TX DMA burst is set to 512 bytes.
      CFG_METHOD_1 appears to be the oldest MAC version of "RTL8168B/8111B",
      i.e. RTL_GIGA_MAC_VER_11 in r8169. Not sure if this MAC version really needs
      the smaller burst limit, or if any other versions have similar requirements.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Acked-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aee77e4a
    • S
      netdev: make address const in device address management · 6b6e2725
      stephen hemminger 提交于
      The internal functions for add/deleting addresses don't change
      their argument.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b6e2725
    • M
      i825xx: znet: fix compiler warnings when building a 64-bit kernel · 1d3ff767
      Mika Westerberg 提交于
      When building 64-bit kernel with this driver we get following warnings from
      the compiler:
      
      drivers/net/ethernet/i825xx/znet.c: In function ‘hardware_init’:
      drivers/net/ethernet/i825xx/znet.c:863:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      drivers/net/ethernet/i825xx/znet.c:870:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      
      Fix these by calling isa_virt_to_bus() before passing the pointers to
      set_dma_addr().
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d3ff767
  2. 19 9月, 2012 7 次提交
  3. 17 9月, 2012 6 次提交
  4. 16 9月, 2012 8 次提交
  5. 14 9月, 2012 11 次提交
  6. 13 9月, 2012 5 次提交