[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87y3tchouh.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
Date: Wed, 31 May 2017 14:18:30 -0400
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To: Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
"David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next v2 6/6] net: dsa: factor skb freeing on xmit
Hi Florian,
Florian Fainelli <f.fainelli@...il.com> writes:
> On 05/30/2017 11:33 AM, Vivien Didelot wrote:
>> The taggers are currently responsible to free the original SKB if they
>> made a copy of it, or in case of error.
>>
>> This patch simplifies this by freeing the original SKB in the
>> dsa_slave_xmit caller, but only if an error (NULL) is returned.
>
> Is not it a clearer contract if the tagging protocol must always free
> the original SKB, whether it succeeded in creating a new one or not?
The rcv caller frees the original SKB on error, as of a86d8becc3f0
("net: dsa: Factor bottom tag receive functions").
It'd be nice if we could make both xmit and rcv symmetric, and limit the
tagging implementations to only do their real job: tag/untag an SKB with
the destination/source port.
Thanks,
Vivien
Powered by blists - more mailing lists