[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTinRM9oSu8qbRHasrDMLVZ49I-_8YVG7STMshUY-@mail.gmail.com>
Date: Sat, 5 Jun 2010 22:58:43 +0800
From: Changli Gao <xiaosuo@...il.com>
To: hadi@...erus.ca
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH v2] act_mirred: don't clone skb when skb isn't shared
On Sat, Jun 5, 2010 at 10:49 PM, jamal <hadi@...erus.ca> wrote:
> On Sat, 2010-06-05 at 20:39 +0800, Changli Gao wrote:
>
>> + if ((action == TC_ACT_SHOT || action == TC_ACT_STOLEN ||
>
> I am not so sure about SHOT; the other two are fine.
It is unlikely that this function will be called with TC_ACT_SHOT. In
fact, this function has only one user act_mirred. Should we remove
this flag, or keep STOLEN flag only?
>
>> - skb2 = skb_act_clone(skb, GFP_ATOMIC);
>> + at = G_TC_AT(skb->tc_verd);
>
> Was there any need to move above line?
skb2 maybe skb, and its tc_verd maybe mangled in skb_act_clone(), so I
move it up.
>
>> + skb2 = skb_act_clone(skb, GFP_ATOMIC, m->tcf_action);
>
>
>> - skb2->dev = dev;
>
> Or this one?
>
>> skb2->skb_iif = skb->dev->ifindex;
>> + skb2->dev = dev;
>
the same reason as above. skb2 and skb maybe the same. If we don't
move lines, skb->dev maybe over written.
--
Regards,
Changli Gao(xiaosuo@...il.com)
--
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