[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAABZP2z4OQ5fHDDAJPU5RAteBFK9wwmCqRSg8Knp635auCj4ZA@mail.gmail.com>
Date: Sat, 3 May 2014 08:58:31 +0800
From: Zhouyi Zhou <zhouzhouyi@...il.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: David Miller <davem@...emloft.net>, steffen.klassert@...unet.com,
fan.du@...driver.com, dborkman@...hat.com,
Mathias Krause <minipli@...glemail.com>, tgraf@...g.ch,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Zhouyi Zhou <yizhouzhou@....ac.cn>
Subject: Re: [PATCH] netdev: pktgen xmit packet through vlan interface
Thank Sergei for reviewing.
I think
On Sat, May 3, 2014 at 12:18 AM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists