History log of /external/libnl/lib/route/sch/tbf.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
86b6f6f6291eaaec542a2f4028087fa823122082 10-Jul-2010 Denys Fedorysychenko <nuclearcat@nuclearcat.com> Trivial fix for TBF memleak

Without this patch, running alloc / free cache loop will lead to huge memory
leaks on machine with 3000 interfaces with tbf qdiscs.

Here was valgrind output:

==5580== 18,070,728 bytes in 347,514 blocks are definitely lost in loss record
32 of 32
==5580== at 0x4025485: calloc (in /lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==5580== by 0x405F410: tbf_msg_parser (tbf.c:46)
==5580== by 0x405302B: qdisc_msg_parser (qdisc.c:119)
==5580== by 0x4033DC9: nl_cache_parse (cache.c:643)
==5580== by 0x4033E7C: update_msg_parser (cache.c:460)
==5580== by 0x4038A11: nl_recvmsgs (netlink-local.h:112)
==5580== by 0x4034175: __cache_pickup (cache.c:483)
==5580== by 0x40343FF: nl_cache_pickup (cache.c:516)
==5580== by 0x403447D: nl_cache_refill (cache.c:698)
==5580== by 0x4034AB7: nl_cache_alloc_and_fill (cache.c:198)
==5580== by 0x4053216: rtnl_qdisc_alloc_cache (qdisc.c:388)
==5580== by 0x80489DB: main (in /home/root/nltest)

Patch complied and tested for same test case, no more leaks anymore.
/external/libnl/lib/route/sch/tbf.c
52510e7d394a1c8ee0a3aaf046db6199f0558c78 14-Nov-2009 Denys Fedoryschenko <denys@visp.net.lb> invalid comma cause segfault for nl-tctree-list, tbf.c

I notice segfault while running nl-tctree-list for tbf qdisc.

Patch that fix this typo is attached.
/external/libnl/lib/route/sch/tbf.c
d84430702496f617c01c5e2d27d0e82e02390bb7 23-May-2008 Thomas Graf <tgr@lsx.localdomain> Remove old line counting while dumping
/external/libnl/lib/route/sch/tbf.c
8a3efffa5b3fde252675239914118664d36a2c24 14-May-2008 Thomas Graf <tgr@lsx.localdomain> Thread-safe error handling

In order for the interface to become more thread safe, the error
handling was revised to no longer depend on a static errno and
error string buffer.

This patch converts all error paths to return a libnl specific
error code which can be translated to a error message using
nl_geterror(int error). The functions nl_error() and
nl_get_errno() are therefore obsolete.

This change required various sets of function prototypes to be
changed in order to return an error code, the most prominent
are:

struct nl_cache *foo_alloc_cache(...);
changed to:
int foo_alloc_cache(..., struct nl_cache **);

struct nl_msg *foo_build_request(...);
changed to:
int foo_build_request(..., struct nl_msg **);

struct foo *foo_parse(...);
changed to:
int foo_parse(..., struct foo **);

This pretty much only leaves trivial allocation functions to
still return a pointer object which can still return NULL to
signal out of memory.

This change is a serious API and ABI breaker, sorry!
/external/libnl/lib/route/sch/tbf.c
241b2b83ba5672f5c86154d29eeb8ef4c7c6e9b4 30-Apr-2008 Tad Kollar <Thaddeus.J.Kollar@nasa.gov> New netem funtionality and TBF fix

New netem-related functionality:
Added ability to save new settings to the kernel. In netem.c, the
netem_get_opts() stub has been replaced with netem_build_msg() which
manipulates the nl_msg data directly and returns an error code instead
of a new nl_msg. Modifications to qdisc_build() in qdisc.c and struct
rtnl_qdisc_ops were necessary for this.
Added support for getting/setting corruption probability/correlation.
Added support for setting a delay distribution.

Fixed tbf_msg_parser() to call tbf_alloc() instead of tbf_qdisc() to
prevent a seg fault.
/external/libnl/lib/route/sch/tbf.c
44d362409d5469aed47d19e7908d19bd194493a4 15-Sep-2007 Thomas Graf <tgraf@suug.ch> Initial import
/external/libnl/lib/route/sch/tbf.c