Skip to content

Commit

Permalink
be2net: Handle error completion in Lancer
Browse files Browse the repository at this point in the history
In Lancer if a frame is DMAed partially due to lack of RX buffers,
an error completion is sent with packet size as zero and num_recvd
indicating number of used buffers. These buffers need to be freed
and packet dropped.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Padmanabh Ratnakar authored and David S. Miller committed May 11, 2011
1 parent 3c709f8 commit 009dd87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1757,12 +1757,15 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
break;

/* Ignore flush completions */
if (rxcp->num_rcvd) {
if (rxcp->num_rcvd && rxcp->pkt_size) {
if (do_gro(rxcp))
be_rx_compl_process_gro(adapter, rxo, rxcp);
else
be_rx_compl_process(adapter, rxo, rxcp);
} else if (rxcp->pkt_size == 0) {
be_rx_compl_discard(adapter, rxo, rxcp);
}

be_rx_stats_update(rxo, rxcp);
}

Expand Down

0 comments on commit 009dd87

Please sign in to comment.