OSDN Git Service

via-rhine: forbid holes in the receive descriptor ring.
authorfrançois romieu <romieu@fr.zoreil.com>
Fri, 1 May 2015 20:14:41 +0000 (22:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 04:18:26 +0000 (00:18 -0400)
commit8709bb2c1e902a64e257c740d301ba0d43065a1c
tree680075a81b20e7647fd62d5157d46fbfe835745d
parent4d1fd9c1d89e5ca033c1e0cbd2838180c2e01f8b
via-rhine: forbid holes in the receive descriptor ring.

Rationales:
- throttle work under memory pressure
- lower receive descriptor recycling latency for the network adapter
- lower the maintenance burden of uncommon paths

The patch is twofold:
- it fails early if the receive ring can't be completely initialized
  at dev->open() time
- it drops packets on the floor in the napi receive handler so as to
  keep the received ring full

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/via/via-rhine.c