alistair23-linux/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 appletalk: Remove out of date message in printk 2012-06-07 13:11:59 -07:00
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 libceph: flush msgr queue during mon_client shutdown 2012-06-20 07:43:50 -05:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-07-05 03:44:25 -07:00
dcb net: dcb: fix small regression in __dcbnl_pg_setcfg() 2012-06-21 15:06:00 -07:00
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 net: remove skb_orphan_try() 2012-06-15 15:30:15 -07:00
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 net: remove my future former mail address 2012-06-17 16:29:38 -07:00
rds
rfkill rfkill: Add the capability to switch all devices of all type in __rfkill_switch_all(). 2012-06-06 15:18:17 -04:00
rose
rxrpc ipv4: Kill ip_rt_frag_needed(). 2012-06-11 02:08:59 -07:00
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