提交 3225b919 编写于 作者: S Stephen Hemminger 提交者: Jeff Garzik

sky2: keep track of receive alloc failures

When driver can't allocate receive buffer it drops incoming
packet. Keep a counter.
Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 53419c68
......@@ -2141,8 +2141,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
switch (le->opcode & ~HW_OWNER) {
case OP_RXSTAT:
skb = sky2_receive(dev, length, status);
if (!skb)
if (unlikely(!skb)) {
sky2->net_stats.rx_dropped++;
goto force_update;
}
skb->protocol = eth_type_trans(skb, dev);
sky2->net_stats.rx_packets++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册