Commit 009dd872 authored by Padmanabh Ratnakar's avatar Padmanabh Ratnakar Committed by David S. Miller

be2net: Handle error completion in Lancer

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: default avatarPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c709f8f
...@@ -1757,12 +1757,15 @@ static int be_poll_rx(struct napi_struct *napi, int budget) ...@@ -1757,12 +1757,15 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
break; break;
/* Ignore flush completions */ /* Ignore flush completions */
if (rxcp->num_rcvd) { if (rxcp->num_rcvd && rxcp->pkt_size) {
if (do_gro(rxcp)) if (do_gro(rxcp))
be_rx_compl_process_gro(adapter, rxo, rxcp); be_rx_compl_process_gro(adapter, rxo, rxcp);
else else
be_rx_compl_process(adapter, rxo, rxcp); 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); be_rx_stats_update(rxo, rxcp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment