Subject: Re: [PATCH net-next 3/4] net: dsa: Refactor transmit path

From: Florian Fainelli <[email-masked]>
Date: Thu, 30 Jul 2015 12:40:36 -0700

On 30/07/15 12:35, Florian Fainelli wrote:
> All tagging protocols do the same thing: increment device statistics,
> make room for the tag to be inserted, create the tag, invoke the parent
> network device transmit function.
> 
> In order to prepare for adding netpoll support, which requires the tag
> creation, but not using the parent network device transmit function, do
> some little refactoring which eliminates duplication between the 4
> tagging protocols supported.
> 
> Signed-off-by: Florian Fainelli <[email-masked]>
> ---
[snip]

>  	/*
>  	 * We have to make sure that the trailer ends up as the very
>  	 * last 4 bytes of the packet.  This means that we have to pad
> @@ -36,7 +33,7 @@ static netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev)
>  	nskb = alloc_skb(NET_IP_ALIGN + skb->len + padlen + 4, GFP_ATOMIC);
>  	if (nskb == NULL) {
>  		kfree_skb(skb);
> -		return NETDEV_TX_OK;
> +		return -ENOMEM;

I just spotted this, this won't work since we allocated a new SKB, but
the transmit code will attempt to submit skb, not nskb, I will respin
this patch series, sorry for not noticing this earlier...

David, please discard this.
-- 
Florian