1. 01 12月, 2012 1 次提交
  2. 08 9月, 2012 2 次提交
  3. 17 7月, 2012 1 次提交
  4. 11 7月, 2012 1 次提交
  5. 10 5月, 2012 2 次提交
  6. 07 3月, 2012 1 次提交
  7. 25 2月, 2012 1 次提交
    • B
      sfc: Fix assignment of ip_summed for pre-allocated skbs · ff3bc1e7
      Ben Hutchings 提交于
      When pre-allocating skbs for received packets, we set ip_summed =
      CHECKSUM_UNNCESSARY.  We used to change it back to CHECKSUM_NONE when
      the received packet had an incorrect checksum or unhandled protocol.
      
      Commit bc8acf2c ('drivers/net: avoid
      some skb->ip_summed initializations') mistakenly replaced the latter
      assignment with a DEBUG-only assertion that ip_summed ==
      CHECKSUM_NONE.  This assertion is always false, but it seems no-one
      has exercised this code path in a DEBUG build.
      
      Fix this by moving our assignment of CHECKSUM_UNNECESSARY into
      efx_rx_packet_gro().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      ff3bc1e7
  8. 16 2月, 2012 2 次提交
    • B
      sfc: Leave interrupts and event queues enabled whenever we can · 9f2cb71c
      Ben Hutchings 提交于
      When SR-IOV is enabled we may receive FLR (Function-Level Reset)
      events, associated queue flush events and requests from VF drivers at
      any time.  Therefore we need to keep event queues and interrupts
      enabled whenever possible.
      
      Currently we stop interrupt-driven event processing before flushing RX
      and TX queues; efx_nic_flush_queues() then polls event queues for
      flush events and discards any others it finds.  Change it to work with
      the regular event handling functions.
      
      Currently efx_start_channel() fills RX queues synchronously when a
      device is brought up.  This could now race with NAPI, so change it to
      send fill events.
      
      This was almost entirely written by Steve Hodgson, formerly
      shodgson@solarflare.com.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      9f2cb71c
    • B
      sfc: Generate RX fill events based on RX queues, not channels · 2ae75dac
      Ben Hutchings 提交于
      This makes it harder to accidentally send such events to TX-only
      channels.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      2ae75dac
  9. 31 1月, 2012 1 次提交
    • B
      sfc: Use a more sensible cast in efx_rx_buf_offset() · 06e63c57
      Ben Hutchings 提交于
      This function returns the page offset of the buffer, which can be
      calculated based on either its DMA address or its virtual address.  It
      used to use the virtual address and we would cast that to unsigned
      long, as anything smaller would result in a compiler warning.  Now
      that it's using the DMA address we should use unsigned int, matching
      the return type.  It is also unnecessary to use __force.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      06e63c57
  10. 27 1月, 2012 2 次提交
  11. 06 1月, 2012 1 次提交
  12. 17 12月, 2011 1 次提交
  13. 04 12月, 2011 1 次提交
  14. 01 11月, 2011 1 次提交
  15. 19 10月, 2011 1 次提交
  16. 23 9月, 2011 1 次提交
  17. 11 8月, 2011 1 次提交
  18. 23 5月, 2011 2 次提交
    • P
      Add appropriate <linux/prefetch.h> include for prefetch users · 70c71606
      Paul Gortmaker 提交于
      After discovering that wide use of prefetch on modern CPUs
      could be a net loss instead of a win, net drivers which were
      relying on the implicit inclusion of prefetch.h via the list
      headers showed up in the resulting cleanup fallout.  Give
      them an explicit include via the following $0.02 script.
      
       =========================================
       #!/bin/bash
       MANUAL=""
       for i in `git grep -l 'prefetch(.*)' .` ; do
       	grep -q '<linux/prefetch.h>' $i
       	if [ $? = 0 ] ; then
       		continue
       	fi
      
       	(	echo '?^#include <linux/?a'
       		echo '#include <linux/prefetch.h>'
       		echo .
       		echo w
       		echo q
       	) | ed -s $i > /dev/null 2>&1
       	if [ $? != 0 ]; then
       		echo $i needs manual fixup
       		MANUAL="$i $MANUAL"
       	fi
       done
       echo ------------------- 8\<----------------------
       echo vi $MANUAL
       =========================================
      Signed-off-by: NPaul <paul.gortmaker@windriver.com>
      [ Fixed up some incorrect #include placements, and added some
        non-network drivers and the fib_trie.c case    - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70c71606
    • P
      drivers/net: add prefetch header for prefetch users · c0cba59e
      Paul Gortmaker 提交于
      After discovering that wide use of prefetch on modern CPUs
      could be a net loss instead of a win, net drivers which were
      relying on the implicit inclusion of prefetch.h via the list
      headers showed up in the resulting cleanup fallout.  Give
      them an explicit include via the following $0.02 script.
      
       =========================================
       #!/bin/bash
       MANUAL=""
       for i in `git grep -l 'prefetch(.*)' .` ; do
       	grep -q '<linux/prefetch.h>' $i
       	if [ $? = 0 ] ; then
       		continue
       	fi
      
       	(	echo '?^#include <linux/?a'
       		echo '#include <linux/prefetch.h>'
       		echo .
       		echo w
       		echo q
       	) | ed -s $i > /dev/null 2>&1
       	if [ $? != 0 ]; then
       		echo $i needs manual fixup
       		MANUAL="$i $MANUAL"
       	fi
       done
       echo ------------------- 8\<----------------------
       echo vi $MANUAL
       =========================================
      Signed-off-by: NPaul <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0cba59e
  19. 05 4月, 2011 1 次提交
  20. 02 4月, 2011 1 次提交
  21. 01 3月, 2011 3 次提交
  22. 11 12月, 2010 1 次提交
  23. 11 9月, 2010 3 次提交
  24. 03 9月, 2010 1 次提交
  25. 26 6月, 2010 1 次提交
  26. 25 6月, 2010 2 次提交
  27. 02 6月, 2010 4 次提交
    • S
      sfc: Allow shared pages to be recycled · 62b330ba
      Steve Hodgson 提交于
      Insert a structure at the start of the shared page that
      tracks the dma mapping refcnt. DMA into the next cache
      line of the (shared) page (plus EFX_PAGE_IP_ALIGN).
      
      When recycling a page, check the page refcnt. If the
      page is otherwise unused, then resurrect the other
      receive buffer that previously referenced the page.
      Be careful not to overflow the receive ring, since we
      can now resurrect n receive buffers in a row.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62b330ba
    • S
      sfc: Recycle discarded rx buffers back onto the queue · 24455800
      Steve Hodgson 提交于
      The cut-through design of the receive path means that packets that
      fail to match the appropriate MAC filter are not discarded at the MAC
      but are flagged in the completion event as 'to be discarded'.  On
      networks with heavy multicast traffic, this can account for a
      significant proportion of received packets, so it is worthwhile to
      recycle the buffer immediately in this case rather than freeing it
      and then reallocating it shortly after.
      
      The only complication here is dealing with a page shared
      between two receive buffers. In that case, we need to be
      careful to free the dma mapping when both buffers have
      been free'd by the kernel. This means that we can only
      recycle such a page if both receive buffers are discarded.
      Unfortunately, in an environment with 1500mtu,
      rx_alloc_method=PAGE, and a mixture of discarded and
      not-discarded frames hitting the same receive queue,
      buffer recycling won't always be possible.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      24455800
    • S
      sfc: Support only two rx buffers per page · f7d6f379
      Steve Hodgson 提交于
      - Pull the loop handling into efx_init_rx_buffers_(skb|page)
      - Remove rx_queue->buf_page, and associated clean up code
      - Remove unmap_addr, since unmap_addr is trivially calculable
      
      This will allow us to recycle discarded buffers directly
      from efx_rx_packet(), since will never be in the middle of
      splitting a page.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7d6f379
    • S
      sfc: Remove efx_rx_queue::add_lock · 90d683af
      Steve Hodgson 提交于
      Ensure that efx_fast_push_rx_descriptors() must only run
      from efx_process_channel() [NAPI], or when napi_disable()
      has been executed.
      
      Reimplement the slow fill by sending an event to the
      channel, so that NAPI runs, and hanging the subsequent
      fast fill off the event handler. Replace the sfc_refill
      workqueue and delayed work items with a timer. We do
      not need to stop this timer in efx_flush_all() because
      it's safe to send the event always; receiving it will
      be delayed until NAPI is restarted.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90d683af