提交 f5eecbbe 编写于 作者: L Lendacky, Thomas 提交者: David S. Miller

amd-xgbe: Check for complete packet on skb allocation error

If the skb allocation fails during receive processing, the driver would
continue reading descriptors without first determining if there were
any more descriptors for the current packet. Update the code to check
whether more descriptors are associated with the current packet or
whether to move on to the next descriptor as a new packet.
Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e98c72c9
......@@ -1908,7 +1908,7 @@ static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
skb = xgbe_create_skb(pdata, rdata, &put_len);
if (!skb) {
error = 1;
goto read_again;
goto skip_data;
}
}
......@@ -1926,10 +1926,10 @@ static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
}
}
skip_data:
if (incomplete || context_next)
goto read_again;
/* Stray Context Descriptor? */
if (!skb)
goto next_packet;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册