Thank Sergei for reviewing. I think On Sat, May 3, 2014 at 12:18 AM, Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> wrote:
>> + >> + if (pkt_dev->clone_skb && is_vlan_dev(odev)) { >> + nskb = skb_clone(pkt_dev->skb, GFP_ATOMIC); >> + ret = -ENOMEM; >> + if (nskb) >> + ret = (*xmit)(nskb, odev); if (is_vlan_dev(odev) && pkt_dev->clone_skb) { nskb = skb_clone(pkt_dev->skb, GFP_ATOMIC); ret = -ENOMEM; if (nskb) ret = (*xmit)(nskb, odev); } > and case NETDEV_TX_LOCKED: case NETDEV_TX_BUSY: /* Retry it next time */ atomic_dec(&(pkt_dev->skb->users)); if (is_vlan_dev(odev) && pkt_dev->clone_skb && nskb) kfree_skb(nskb); else atomic_dec(&(pkt_dev->skb->users)); is better, because is_vlan_dev(odev) is probably in read most cache line. Zhouyi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/