linux_dsm_epyc7002/drivers/net/ethernet/broadcom/genet
Petri Gynther d6707bec59 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>
2015-03-13 15:48:15 -04:00
..
bcmgenet_wol.c net: bcmgenet: properly disable password matching 2015-03-05 21:15:21 -05:00
bcmgenet.c net: bcmgenet: rewrite bcmgenet_rx_refill() 2015-03-13 15:48:15 -04:00
bcmgenet.h net: bcmgenet: collect Rx discarded packet count 2015-03-11 17:54:55 -04:00
bcmmii.c net: bcmgenet: enable driver to work without a device tree 2014-12-08 20:26:59 -05:00
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00