[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120708.235438.1404481344298927770.davem@davemloft.net>
Date: Sun, 08 Jul 2012 23:54:38 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: vyasevich@...il.com
Cc: nhorman@...driver.com, netdev@...r.kernel.org,
linux-sctp@...r.kernel.org
Subject: Re: [PATCH] sctp: refactor sctp_packet_append_chunk and clenup
some memory leaks
From: Vlad Yasevich <vyasevich@...il.com>
Date: Tue, 03 Jul 2012 10:39:36 -0400
> On 07/02/2012 03:59 PM, Neil Horman wrote:
>> While doing some recent work on sctp sack bundling I noted that
>> sctp_packet_append_chunk was pretty inefficient. Specifially, it was
>> called
>> recursively while trying to bundle auth and sack chunks. Because of
>> that we
>> call sctp_packet_bundle_sack and sctp_packet_bundle_auth a total of 4
>> times for
>> every call to sctp_packet_append_chunk, knowing that at least 3 of
>> those calls
>> will do nothing.
>>
>> So lets refactor sctp_packet_bundle_auth to have an outer part that
>> does the
>> attempted bundling, and an inner part that just does the chunk
>> appends. This
>> saves us several calls per iteration that we just don't need.
>>
>> Also, noticed that the auth and sack bundling fail to free the chunks
>> they
>> allocate if the append fails, so make sure we add that in
>>
>> Signed-off-by: Neil Horman<nhorman@...driver.com>
>> CC: Vlad Yasevich<vyasevich@...il.com>
>
> Acked-by: Vlad Yasevich <vyasevich@...il.com>
Applied to net-next, thanks.
--
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