kernel_optimize_test/net
Neil Horman ed10627725 sctp: refactor sctp_packet_append_chunk and clenup some memory leaks
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 <vyasevich@gmail.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: linux-sctp@vger.kernel.org
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-08 23:56:16 -07:00
..
9p Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-06-28 17:37:00 -07:00
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: Don't leak information through uninitialized packet fields 2012-07-01 22:47:24 +02:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-06-29 12:07:37 -04:00
bridge br_netfilter: Convert to dst_neigh_lookup_skb(). 2012-07-05 01:10:05 -07:00
caif Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-06-28 17:37:00 -07:00
can can: fix sparse warning in af_can.c 2012-07-02 11:07:27 +02:00
ceph
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-07-05 03:44:25 -07:00
dcb
dccp dccp: remove unnecessary codes in ipv6.c 2012-07-05 03:11:15 -07:00
decnet decnet: Use neighbours privately in dn_route struct. 2012-07-05 01:12:14 -07:00
dns_resolver
dsa
ethernet net: introduce new priv_flag indicating iface capable of change mac when running 2012-06-30 01:08:00 -07:00
ieee802154 6lowpan: revert 'reuse eth_mac_addr()' 2012-07-05 03:11:15 -07:00
ipv4 Merge branch 'master' of git://1984.lsi.us.es/nf-next 2012-07-07 16:18:50 -07:00
ipv6 Merge branch 'master' of git://1984.lsi.us.es/nf-next 2012-07-07 16:18:50 -07:00
ipx
irda
iucv
key
l2tp net: l2tp_eth: provide tx_dropped counter 2012-06-29 00:52:32 -07:00
lapb
llc
mac80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-06-29 12:42:14 -04:00
mac802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-06-28 17:37:00 -07:00
netfilter Merge branch 'master' of git://1984.lsi.us.es/nf-next 2012-07-07 16:18:50 -07:00
netlabel
netlink netlink: add nlk->netlink_bind hook for module auto-loading 2012-06-29 16:46:06 -07:00
netrom
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-06-29 12:07:37 -04:00
openvswitch
packet net: added support for 40GbE link. 2012-06-27 15:42:24 -07:00
phonet
rds
rfkill
rose
rxrpc
sched Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next 2012-07-07 16:29:29 -07:00
sctp sctp: refactor sctp_packet_append_chunk and clenup some memory leaks 2012-07-08 23:56:16 -07:00
sunrpc sunrpc: Don't do a dst_confirm() on an input routes. 2012-07-05 01:02:43 -07:00
tipc
unix unix_diag: Do not use RTA_PUT() macros 2012-06-27 15:36:43 -07:00
wanrouter
wimax
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-06-29 12:42:14 -04:00
x25
xfrm xfrm: No need to copy generic neighbour pointer. 2012-07-05 02:42:00 -07:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c