be2net: Handle out of buffer completions for lancer
Subsystems (2)
PATCH 3/3 be2net: Handle out of buffer completions for lancer
If Lancer chip does not have posted RX buffers, it posts an RX completion entry with the same frag_index as the last valid completion. The Error bit is also set. In BE, a flush completion is indicated with a zero value for num_rcvd in the completion.
Such completions don't carry any data and are not processed.
This patch refactors code to handle both cases with the same code.
--- drivers/net/benet/be.h | 4 ++- drivers/net/benet/be_main.c | 55 +++++++++++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 21 deletions(-)
drivers/net/benet/be.h +3 -1
@@ -220,7 +220,9 @@ struct be_rx_obj {struct be_rx_stats stats;u8 rss_id;bool rx_post_starved;/* Zero rx frags have been posted to BE */ -u32 cache_line_barrier[16 ]; +u16 last_frag_index; +u16 rsvd; +u32 cache_line_barrier[15 ]; };struct be_vf_cfg {
drivers/net/benet/be_main.c +35 -20
104 lines not on this page · raw message
Signature · 1 line
1.6.5.2
From: Sathya Perla <[email protected]>
Date: Wed, 1 Dec 2010 16:34:17 +0530
Quoted 9 lines
If Lancer chip does not have posted RX buffers, it posts an RX completion entry with the same
frag_indexas the last valid completion. The Error bit is also set. In BE, a flush completion is indicated with a zero value fornum_rcvdin the completion.
Such completions don't carry any data and are not processed.
This patch refactors code to handle both cases with the same code.Signed-off-by Padmanabh Ratnakar <[email protected]>Signed-off-by Sathya Perla <[email protected]>
Applied.