diff options
author | Petri Gynther | 2015-03-12 23:48:00 +0100 |
---|---|---|
committer | David S. Miller | 2015-03-13 20:48:15 +0100 |
commit | d6707bec598649450ee0887bf11896e525777874 (patch) | |
tree | 8e33b10d376a8365d6d369ffd52ae8a461737719 /drivers/net/ethernet/intel/i40evf/i40e_txrx.h | |
parent | Merge branch 'tcp_metrics_netns_debloat' (diff) | |
download | kernel-qcow2-linux-d6707bec598649450ee0887bf11896e525777874.tar.gz kernel-qcow2-linux-d6707bec598649450ee0887bf11896e525777874.tar.xz kernel-qcow2-linux-d6707bec598649450ee0887bf11896e525777874.zip |
net: bcmgenet: rewrite bcmgenet_rx_refill()
Currently, bcmgenet_desc_rx() calls bcmgenet_rx_refill() at the end of
Rx packet processing loop, after the current Rx packet has already been
passed to napi_gro_receive(). However, bcmgenet_rx_refill() might fail
to allocate a new Rx skb, thus leaving a hole on the Rx queue where no
valid Rx buffer exists.
To eliminate this situation:
1. Rewrite bcmgenet_rx_refill() to retain the current Rx skb on the Rx
queue if a new replacement Rx skb can't be allocated and DMA-mapped.
In this case, the data on the current Rx skb is effectively dropped.
2. Modify bcmgenet_desc_rx() to call bcmgenet_rx_refill() at the top of
Rx packet processing loop, so that the new replacement Rx skb is
already in place before the current Rx skb is processed.
Signed-off-by: Petri Gynther <pgynther@google.com>
Tested-by: Jaedon Shin <jaedon.shin@gmail.com>--
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40e_txrx.h')
0 files changed, 0 insertions, 0 deletions