From: Vlad Yasevich <redacted>
Date: Tue, 03 Jul 2012 10:39:36 -0400
On 07/02/2012 03:59 PM, Neil Horman wrote:
quoted
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@tuxdriver.com>
CC: Vlad Yasevich<redacted>
Acked-by: Vlad Yasevich <redacted>
Applied to net-next, thanks.