Re: 答复: [PATCH] net: Expand headroom to send fragmented packets in bridge fragment forward

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yang Huajian(杨华健) <huajianyang@xxxxxxxxxxxx> wrote:
> > if (skb_headroom(skb) < ll_rs)
> >	goto expand_headroom;
> 
> > ... but I'm not sure what the actual problem is.
> 
> Yes, your guess is correct!
> 
> Actual problem: I think it is unreasonable to directly drop skb with insufficient headroom.
> 
> > Why does this need to make a full skb copy?
> > Should that be using skb_expand_head()?
> 
> Using skb_expand_head has the same effect.
 
> > Actually, can't you just (re)use the slowpath for the skb_headroom < ll_rs case instead of adding headroom expansion?
> 
> I tested it just now, reuse the slowpath will successed.
> But maybe this change cannot resolve all cases if the netdevice really needs this headroom.

The slowpath considers headroom requirements, see ip_frag_next():

        skb2 = alloc_skb(len + state->hlen + state->ll_rs, GFP_ATOMIC);

You should wait for more feedback and then send a v2 tomorrow.

Thanks!




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux