29 Jan, 2008
40 commits
-
A ringbuffer-based implementation of loss interval history is easier to
maintain, allocate, and update.The `swap' routine to keep the RX history sorted is due to and was written
by Arnaldo Carvalho de Melo, simplifying an earlier macro-based variant.Details:
* access to the Loss Interval Records via macro wrappers (with safety checks);
* simplified, on-demand allocation of entries (no extra memory consumption on
lossless links); cache allocation is local to the module / exported as service;
* provision of RFC-compliant algorithm to re-compute average loss interval;
* provision of comprehensive, new loss detection algorithm
- support for all cases of loss, including re-ordered/duplicate packets;
- waiting for NDUPACK=3 packets to fill the hole;
- updating loss records when a late-arriving packet fills a hole.Signed-off-by: Gerrit Renker
Signed-off-by: Ian McDonald
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This moves the inlines (which were previously declared as macros) back into
packet_history.h since the loss detection code needs to be able to read entries
from the RX history in order to create the relevant loss entries: it needs at
least tfrc_rx_hist_loss_prev() and tfrc_rx_hist_last_rcv(), which in turn
require the definition of the other inlines (macros).Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This separates RX/TX initialisation and puts all packet history / loss intervals
initialisation into tfrc.c.
The organisation is uniform: slab declaration -> {rx,tx}_init() -> {rx,tx}_exit()Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Recently David Miller and Herbert Xu pointed out that struct net becomes
overbloated and un-maintainable. There are two solutions:
- provide a pointer to a network subsystem definition from struct net.
This costs an additional dereferrence
- place sub-system definition into the structure itself. This will speedup
run-time access at the cost of recompilation timeThe second approach looks better for us. Other sub-systems will follow.
Signed-off-by: Denis V. Lunev
Acked-by: Daniel Lezcano
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
This patchset makes the different protocols to return an error code, so
the af_inet6 module can check the initialization was correct or not.The raw6 was taken into account to be consistent with the rest of the
protocols, but the registration is at the same place.
Because the raw6 has its own init function, the proto and the ops structure
can be moved inside the raw6.c file.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the inet6_register_protosw to return an error code.
The different protocols can be aware the registration was successful or
not and can pass the error to the initial caller, af_inet6.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the frag_init to return an error code, so the af_inet6
module can handle the error.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch factorize the code for the differents init functions for rthdr,
nodata, destopt in a single function exthdrs_init.
This function returns an error so the af_inet6 module can check correctly
the initialization.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the flowlab subsystem to return an error code and makes
some cleanup with procfs ifdefs.
The af_inet6 will use the flowlabel init return code to check the initialization
was correct.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This includes:
* moving neigh_sysctl_(un)register calls inside
devinet_sysctl_(un)register ones, as they are always
called in pairs;
* making __devinet_sysctl_unregister() to unregister
the ipv4_devconf struct, while original devinet_sysctl_unregister()
works with the in_device to handle both - devconf and
neigh sysctls;
* make stubs for CONFIG_SYSCTL=n case to get rid of
in-code ifdefs.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This is essentially IN_DEV_ANDCONF with proper arguments.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Make the INET_TWDR_TWKILL_SLOTS vs sizeof(twdr->thread_slots)
check nicer.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The sizeof(struct tcp_skb_cb) should not be less than the
sizeof(skb->cb). This is checked in net/ipv4/tcp.c, but
this check can be made more gracefully.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
nl_pid_hash_alloc() is renamed to nl_pid_hash_zalloc().
It is now returning zeroed memory to its callers.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This cleanup shrinks size of net/core/dst.o on i386 from 1299 to 1289 bytes.
(This is because dev_hold()/dev_put() are doing atomic_inc()/atomic_dec() and
force compiler to re-evaluate memory contents.)Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patch adds the xfrm_input_state helper function which returns the
current xfrm state being processed on the input path given an sk_buff.
This is currently only used by xfrm_input but will be used by ESP upon
asynchronous resumption.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Moved up the comment "Receiver routines" above the first occurrence of
RX history routines.Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
With fixes from Arnaldo Carvalho de Melo.
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
ipv4: no need pass pointer to a default into fib_detect_death
Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
The patch defines the usual static inline functions when the code is
disabled for fib6_rules. That's allow to remove some ifdef in route.c
file and make the code a little more clear.Signed-off-by: Daniel Lezcano
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
The following patch create the usual static inline functions to disable
the xfrm6_init and xfrm6_fini function when XFRM is off.
That's allow to remove some ifdef and make the code a little more clear.Signed-off-by: Daniel Lezcano
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Make the proc creation/destruction to be a separate function. That
allows to remove the #ifdef CONFIG_PROC_FS in the init/fini function
and make them more readable.Signed-off-by: Daniel Lezcano
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Just move the variable on the struct net and adjust
its usage.Others sysctls from sys.net.core table are more
difficult to virtualize (i.e. make them per-namespace),
but I'll look at them as well a bit later.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Some of ctl variables are going to be on the struct
net. Here's the way to adjust the ->data pointer on the
ctl_table-s to point on the right variable.Since some pointers still point on the global variables,
I keep turning the write bits off on such tables.This looks to become a common procedure for net sysctls,
so later parts of this code may migrate to some more
generic place.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Making them per-namespace is required for the following
two reasons:First, some ctl values have a per-namespace meaning.
Second, making them writable from the sub-namespace
is an isolation hole.So I introduce the pernet operations to create these
tables. For init_net I use the existing statically
declared tables, for sub-namespace they are duplicated
and the write bits are removed from the mode.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The SNMP_INC_STATS_OFFSET_BH is used only by ICMP6_INC_STATS_OFFSET_BH.
The ICMP6_INC_STATS_OFFSET_BH is unused.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
these three list_head are all local variables, but can also use
LIST_HEAD.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller -
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller -
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller -
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller -
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller -
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller -
We only use these variables when displaying the trie in proc so
place them into the iterator to make this explicit. We should
probably do something smarter to handle the CONFIG_IP_MULTIPLE_TABLES
case but at least this makes it clear that the silliness is limited
to the display in /proc.Signed-off-by: Eric W. Biederman
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
There are only 2 users and it doesn't hurt to call fib_get_table
instead, and it makes it easier to make the fib network namespace
aware.Signed-off-by: Eric W. Biederman
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller