Search Linux Wireless

Re: [PATCH] mac80211: Ensure enough headroom when forwarding mesh pkt

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

 



> -	fwd_skb = skb_copy(skb, GFP_ATOMIC);
> +	if (skb_headroom(skb) >= local->tx_headroom)
> +		fwd_skb = skb_copy(skb, GFP_ATOMIC);
> +	else
> +		fwd_skb = skb_copy_expand(skb, local->tx_headroom,
> +					  0, GFP_ATOMIC);

Why bother making this conditional? It seems that always using
skb_copy_expand() should be sufficient? The code between the two
(skb_copy, skb_copy_expand) is almost identical anyway, apart from the
latter setting the headroom (and tailroom).

johannes



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux