summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2010-06-01 11:20:34 +0000
committerDavid S. Miller <davem@davemloft.net>2010-06-02 02:21:09 -0700
commit244558006cf02f0096fb247f3a54dc7e7d81a256 (patch)
treed56b996063fa685cdaf49720a9370910913db837 /virt
parentf7d6f379db61233a1740cb2c6818b9c97531771f (diff)
sfc: Recycle discarded rx buffers back onto the queue
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: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions