Skip to contentSkip to conversation

be2net: Handle out of buffer completions for lancer

PATCH Applied Sathya Perla 2 participants 2 messages Dec 1, 2010 – Dec 6, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index b61a1df..9cab323 100644
@@ -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
maintainer Applied
#1 lore raw

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_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.

Applied.