]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
19 years ago[NETFILTER]: ip{6}_queue: prevent unregistration race with nfnetlink_queue
Harald Welte [Wed, 10 Aug 2005 03:20:54 +0000 (20:20 -0700)]
[NETFILTER]: ip{6}_queue: prevent unregistration race with nfnetlink_queue

Since nfnetlink_queue can override ip{6}_queue as queue handlers, we
can no longer blindly unregister whoever is registered for PF_INET[6],
but only unregister ourselves.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: fix autoloading of nfnetlink_log
Harald Welte [Wed, 10 Aug 2005 03:20:34 +0000 (20:20 -0700)]
[NETFILTER]: fix autoloading of nfnetlink_log

This patch adds the MODULE_ALIAS required for netnlink autoloading of
nfnetlink_log.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SUNRPC]: svcsock.c needs linux/tcp.h
Andrew Morton [Wed, 10 Aug 2005 03:20:07 +0000 (20:20 -0700)]
[SUNRPC]: svcsock.c needs linux/tcp.h

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: move conntrack helper buffers from BSS to kmalloc()ed memory
Harald Welte [Wed, 10 Aug 2005 03:19:44 +0000 (20:19 -0700)]
[NETFILTER]: move conntrack helper buffers from BSS to kmalloc()ed memory

According to DaveM, it is preferrable to have large data structures be
allocated dynamically from the module init() function rather than
putting them as static global variables into BSS.

This patch moves the conntrack helper packet buffers into dynamically
allocated memory.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Make inet_create try to load protocol modules
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:19:14 +0000 (20:19 -0700)]
[INET]: Make inet_create try to load protocol modules

Syntax is net-pf-PROTOCOL_FAMILY-PROTOCOL-SOCK_TYPE and if this
fails net-pf-PROTOCOL_FAMILY-PROTOCOL.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Fix bug in setting a tg3_flag
Michael Chan [Wed, 10 Aug 2005 03:17:41 +0000 (20:17 -0700)]
[TG3]: Fix bug in setting a tg3_flag

Found a bug while reviewing the patches the second time.

The TG3_FLAG_TXD_MBOX_HWBUG flag is set after the register access
methods have been determined. This patch fixes it by moving it up before
the various access methods are assigned.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Eliminate one register write in tg3_restart_ints()
Michael Chan [Wed, 10 Aug 2005 03:17:28 +0000 (20:17 -0700)]
[TG3]: Eliminate one register write in tg3_restart_ints()

The register write to register 0x68 to restart interrupts is unnecessary
as the interrupt wasn't masked in that register by the irq handler. This
will save one register write in the fast path.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add indirect register method for 5703 behind ICH
Michael Chan [Wed, 10 Aug 2005 03:17:14 +0000 (20:17 -0700)]
[TG3]: Add indirect register method for 5703 behind ICH

This patch adds the new workaround for 5703 A1/A2 if it is behind
certain ICH bridges. The workaround disables memory and uses config.
cycles only to access all registers. The 5702/03 chips can mistakenly
decode the special cycles from the ICH chipsets as memory write cycles,
causing corruption of register and memory space. Only certain ICH
bridges will drive special cycles with non-zero data during the address
phase which can fall within the 5703's address range. This is not an ICH
bug as the PCI spec allows non-zero address during special cycles.
However, only these ICH bridges are known to drive non-zero addresses
during special cycles.

The indirect_lock is also changed to spin_lock_irqsave from spin_lock_bh
because it is used in irq handler when using the indirect method to
disable interrupts.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add mailbox read method
Michael Chan [Wed, 10 Aug 2005 03:17:00 +0000 (20:17 -0700)]
[TG3]: Add mailbox read method

This patch adds the mailbox read method and also adds an inline function
tw32_mailbox_f() for mailbox writes that require read flush.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add various register methods
Michael Chan [Wed, 10 Aug 2005 03:16:46 +0000 (20:16 -0700)]
[TG3]: Add various register methods

This patch adds various dedicated register read/write methods for the
existing workarounds, including PCIX target workaround, write with read
flush, etc. The chips that require these workarounds will use these
dedicated access functions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add basic register access function pointers
Michael Chan [Wed, 10 Aug 2005 03:16:32 +0000 (20:16 -0700)]
[TG3]: Add basic register access function pointers

This patch adds the basic function pointers to do register accesses in
the fast path. This was suggested by David Miller. The idea is that
various register access methods for different hardware errata can easily
be implemented with these function pointers and performance will not be
degraded on chips that use normal register access methods.

The various register read write macros (e.g. tw32, tr32, tw32_mailbox)
are redefined to call the function pointers.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[CCID3]: Reenable list_for_each_entry_safe_continue usage
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:16:04 +0000 (20:16 -0700)]
[CCID3]: Reenable list_for_each_entry_safe_continue usage

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[LIST]: Introduce list_for_each_entry_safe_continue
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:15:51 +0000 (20:15 -0700)]
[LIST]: Introduce list_for_each_entry_safe_continue

Used in the dccp CCID3 code, that is going to be submitted RSN.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[DCCP]: Fix checksum routines
Yoshifumi Nishida [Wed, 10 Aug 2005 03:15:35 +0000 (20:15 -0700)]
[DCCP]: Fix checksum routines

Signed-off-by: Yoshifumi Nishida <nishida@csl.sony.co.jp>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ICSK]: Move generalised functions from tcp to inet_connection_sock
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:15:09 +0000 (20:15 -0700)]
[ICSK]: Move generalised functions from tcp to inet_connection_sock

This also improves reqsk_queue_prune and renames it to
inet_csk_reqsk_queue_prune, as it deals with both inet_connection_sock
and inet_request_sock objects, not just with request_sock ones thus
belonging to inet_request_sock.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[DCCP]: Initial implementation
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:14:34 +0000 (20:14 -0700)]
[DCCP]: Initial implementation

Development to this point was done on a subversion repository at:

http://oops.ghostprotocols.net:81/cgi-bin/viewcvs.cgi/dccp-2.6/

This repository will be kept at this site for the foreseable future,
so that interested parties can see the history of this code,
attributions, etc.

If I ever decide to take this offline I'll provide the full history at
some other suitable place.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[RANDOM]: Introduce secure_dccp_sequence_number
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:12:30 +0000 (20:12 -0700)]
[RANDOM]: Introduce secure_dccp_sequence_number

Code contributed by Stephen Hemminger.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Export symbols needed by the current DCCP code
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:12:12 +0000 (20:12 -0700)]
[NET]: Export symbols needed by the current DCCP code

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ICSK]: Introduce reqsk_queue_prune from code in tcp_synack_timer
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:11:56 +0000 (20:11 -0700)]
[ICSK]: Introduce reqsk_queue_prune from code in tcp_synack_timer

With this we're very close to getting all of the current TCP
refactorings in my dccp-2.6 tree merged, next changeset will export
some functions needed by the current DCCP code and then dccp-2.6.git
will be born!

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ICSK]: Generalise tcp_listen_{start,stop}
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:11:41 +0000 (20:11 -0700)]
[ICSK]: Generalise tcp_listen_{start,stop}

This also moved inet_iif from tcp to inet_hashtables.h, as it is
needed by the inet_lookup callers, perhaps this needs a bit of
polishing, but for now seems fine.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ICSK]: Introduce inet_csk_clone
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:11:24 +0000 (20:11 -0700)]
[ICSK]: Introduce inet_csk_clone

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Just move the inet_connection_sock function from tcp sources
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:11:08 +0000 (20:11 -0700)]
[NET]: Just move the inet_connection_sock function from tcp sources

Completing the previous changeset, this also generalises tcp_v4_synq_add,
renaming it to inet_csk_reqsk_queue_hash_add, already geing used in the
DCCP tree, which I plan to merge RSN.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Introduce inet_connection_sock
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:10:42 +0000 (20:10 -0700)]
[NET]: Introduce inet_connection_sock

This creates struct inet_connection_sock, moving members out of struct
tcp_sock that are shareable with other INET connection oriented
protocols, such as DCCP, that in my private tree already uses most of
these members.

The functions that operate on these members were renamed, using a
inet_csk_ prefix while not being moved yet to a new file, so as to
ease the review of these changes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SOCK]: Introduce sk_clone
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:10:12 +0000 (20:10 -0700)]
[SOCK]: Introduce sk_clone

Out of tcp_create_openreq_child, will be used in
dccp_create_openreq_child, and is a nice sock function anyway.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET_TWSK]: Introduce inet_twsk_alloc
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:09:59 +0000 (20:09 -0700)]
[INET_TWSK]: Introduce inet_twsk_alloc

With the parts of tcp_time_wait that are not TCP specific, tcp_time_wait uses
it and so will dccp_time_wait.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Generalise the TCP sock ID lookup routines
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:09:46 +0000 (20:09 -0700)]
[INET]: Generalise the TCP sock ID lookup routines

And also some TIME_WAIT functions.

[acme@toy net-2.6.14]$ grep built-in /tmp/before.size /tmp/after.size
/tmp/before.size: 282955   13122    9312  305389   4a8ed net/ipv4/built-in.o
/tmp/after.size:  281566   13122    9312  304000   4a380 net/ipv4/built-in.o
[acme@toy net-2.6.14]$

I kept them still inlined, will uninline at some point to see what
would be the performance difference.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Generalise tcp_tw_bucket, aka TIME_WAIT sockets
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:09:30 +0000 (20:09 -0700)]
[INET]: Generalise tcp_tw_bucket, aka TIME_WAIT sockets

This paves the way to generalise the rest of the sock ID lookup
routines and saves some bytes in TCPv4 TIME_WAIT sockets on distro
kernels (where IPv6 is always built as a module):

[root@qemu ~]# grep tw_sock /proc/slabinfo
tw_sock_TCPv6  0  0  128  31  1
tw_sock_TCP    0  0   96  41  1
[root@qemu ~]#

Now if a protocol wants to use the TIME_WAIT generic infrastructure it
only has to set the sk_prot->twsk_obj_size field with the size of its
inet_timewait_sock derived sock and proto_register will create
sk_prot->twsk_slab, for now its only for INET sockets, but we can
introduce timewait_sock later if some non INET transport protocolo
wants to use this stuff.

Next changesets will take advantage of this new infrastructure to
generalise even more TCP code.

[acme@toy net-2.6.14]$ grep built-in /tmp/before.size /tmp/after.size
/tmp/before.size: 188646   11764    5068  205478   322a6 net/ipv4/built-in.o
/tmp/after.size:  188144   11764    5068  204976   320b0 net/ipv4/built-in.o
[acme@toy net-2.6.14]$

Tested with both IPv4 & IPv6 (::1 (localhost) & ::ffff:172.20.0.1
(qemu host)).

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Generalise tcp_v4_lookup_listener
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:09:06 +0000 (20:09 -0700)]
[INET]: Generalise tcp_v4_lookup_listener

[acme@toy net-2.6.14]$ grep built-in /tmp/before /tmp/after
/tmp/before: 282560       13122    9312  304994   4a762 net/ipv4/built-in.o
/tmp/after:  282560       13122    9312  304994   4a762 net/ipv4/built-in.o

Will be used in DCCP, not exporting it right now not to get in Adrian
Bunk's exported-but-not-used-on-modules radar 8)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Generalise tcp_v4_hash & tcp_unhash
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:08:50 +0000 (20:08 -0700)]
[INET]: Generalise tcp_v4_hash & tcp_unhash

It really just makes the existing code be a helper function that
tcp_v4_hash and tcp_unhash uses, specifying the right inet_hashinfo,
tcp_hashinfo.

One thing I'll investigate at some point is to have the inet_hashinfo
pointer in sk_prot, so that we get all the hashtable information from
the sk pointer, this can lead to some extra indirections that may well
hurt performance/code size, we'll see. Ultimate idea would be that
sk_prot would provide _all_ the information about a protocol
implementation.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Move the tcp sock states to net/tcp_states.h
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:08:28 +0000 (20:08 -0700)]
[TCP]: Move the tcp sock states to net/tcp_states.h

Lots of places just needs the states, not even linux/tcp.h, where this
enum was, needs it.

This speeds up development of the refactorings as less sources are
rebuilt when things get moved from net/tcp.h.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Generalise the tcp_listen_ lock routines
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:08:09 +0000 (20:08 -0700)]
[INET]: Generalise the tcp_listen_ lock routines

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Move tcp_port_rover to inet_hashinfo
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:07:35 +0000 (20:07 -0700)]
[INET]: Move tcp_port_rover to inet_hashinfo

Also expose all of the tcp_hashinfo members, i.e. killing those
tcp_ehash, etc macros, this will more clearly expose already generic
functions and some that need just a bit of work to become generic, as
we'll see in the upcoming changesets.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Generalise tcp_bind_hash & tcp_inherit_port
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:07:13 +0000 (20:07 -0700)]
[INET]: Generalise tcp_bind_hash & tcp_inherit_port

This required moving tcp_bucket_cachep to inet_hashinfo.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: fix list traversal order in ctnetlink
Pablo Neira Ayuso [Wed, 10 Aug 2005 03:06:42 +0000 (20:06 -0700)]
[NETFILTER]: fix list traversal order in ctnetlink

Currently conntracks are inserted after the head. That means that
conntracks are sorted from the biggest to the smallest id. This happens
because we use list_prepend (list_add) instead list_add_tail. This can
result in problems during the list iteration.

                 list_for_each(i, &ip_conntrack_hash[cb->args[0]]) {
                         h = (struct ip_conntrack_tuple_hash *) i;
                         if (DIRECTION(h) != IP_CT_DIR_ORIGINAL)
                                 continue;
                         ct = tuplehash_to_ctrack(h);
                         if (ct->id <= *id)
                                 continue;

In that case just the first conntrack in the bucket will be dumped. To
fix this, we iterate the list from the tail to the head via
list_for_each_prev. Same thing for the list of expectations.

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Fix typo in ctnl_exp_cb array (no bug, just memory waste)
Pablo Neira Ayuso [Wed, 10 Aug 2005 03:06:27 +0000 (20:06 -0700)]
[NETFILTER]: Fix typo in ctnl_exp_cb array (no bug, just memory waste)

This fixes the size of the ctnl_exp_cb array that is IPCTNL_MSG_EXP_MAX
instead of IPCTNL_MSG_MAX. Simple typo.

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: fix conntrack refcount leak in unlink_expect()
Pablo Neira Ayuso [Wed, 10 Aug 2005 03:06:11 +0000 (20:06 -0700)]
[NETFILTER]: fix conntrack refcount leak in unlink_expect()

In unlink_expect(), the expectation is removed from the list so the
refcount must be dropped as well.

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: ctnetlink: make sure event order is correct
Pablo Neira Ayuso [Wed, 10 Aug 2005 03:05:52 +0000 (20:05 -0700)]
[NETFILTER]: ctnetlink: make sure event order is correct

The following sequence is displayed during events dumping of an ICMP
connection: [NEW] [DESTROY] [UPDATE]

This happens because the event IPCT_DESTROY is delivered in
death_by_timeout(), that is called from the icmp protocol helper
(ct->timeout.function) once we see the reply.

To fix this, we move this event to destroy_conntrack().

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: don't use nested attributes for conntrack_expect
Harald Welte [Wed, 10 Aug 2005 03:04:07 +0000 (20:04 -0700)]
[NETFILTER]: don't use nested attributes for conntrack_expect

We used to use nested nfattr structures for ip_conntrack_expect.  This is
bogus, since ip_conntrack and ip_conntrack_expect are communicated in
different netlink message types.  both should be encoded at the top level
attributes, no extra nesting required.  This patch addresses the issue.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: cleanup nfnetlink_check_attributes()
Harald Welte [Wed, 10 Aug 2005 03:03:54 +0000 (20:03 -0700)]
[NETFILTER]: cleanup nfnetlink_check_attributes()

1) memset return parameter 'cda' (nfattr pointer array) only on success
2) a message without attributes and just a 'struct nfgenmsg' is valid,
   don't return -EINVAL
3) use likely() and unlikely() where apropriate

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: attribute count is an attribute of message type, not subsytem
Harald Welte [Wed, 10 Aug 2005 03:03:40 +0000 (20:03 -0700)]
[NETFILTER]: attribute count is an attribute of message type, not subsytem

Prior to this patch, every nfnetlink subsystem had to specify it's
attribute count.  However, in reality the attribute count depends on
the message type within the subsystem, not the subsystem itself.  This
patch moves 'attr_count' from 'struct nfnetlink_subsys' into
nfnl_callback to fix this.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: fix ctnetlink 'create_expect' parsing
Harald Welte [Wed, 10 Aug 2005 03:03:22 +0000 (20:03 -0700)]
[NETFILTER]: fix ctnetlink 'create_expect' parsing

There was a stupid copy+paste mistake where we parse the MASK nfattr into
the "tuple" variable instead of the "mask" variable.  This patch fixes it.
Thanks to Pablo Neira.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: conntrack_netlink: Fix locking during conntrack_create
Pablo Neira [Wed, 10 Aug 2005 03:02:55 +0000 (20:02 -0700)]
[NETFILTER]: conntrack_netlink: Fix locking during conntrack_create

The current codepath allowed for ip_conntrack_lock to be unlock'ed twice.

Signed-off-by: Pablo Neira <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: remove bogus memset() calls from ip_conntrack_netlink.c
Pablo Neira [Wed, 10 Aug 2005 03:02:36 +0000 (20:02 -0700)]
[NETFILTER]: remove bogus memset() calls from ip_conntrack_netlink.c

nfattr_parse_nested() calls nfattr_parse() which in turn does a memset
on the 'tb' array.  All callers therefore don't need to memset before
calling it.

Signed-off-by: Pablo Neira <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Fix multiple problems with the conntrack event cache
Patrick McHardy [Wed, 10 Aug 2005 03:02:13 +0000 (20:02 -0700)]
[NETFILTER]: Fix multiple problems with the conntrack event cache

refcnt underflow: the reference count is decremented when a conntrack
entry is removed from the hash but it is not incremented when entering
new entries.

missing protection of process context against softirq context: all
cache operations need to locally disable softirqs to avoid races.
Additionally the event cache can't be initialized when a packet
enteres the conntrack code but needs to be initialized whenever we
cache an event and the stored conntrack entry doesn't match the
current one.

incorrect flushing of the event cache in ip_ct_iterate_cleanup:
without real locking we can't flush the cache for different CPUs
without incurring races. The cache for different CPUs can only be
flushed when no packets are going through the
code. ip_ct_iterate_cleanup doesn't need to drop all references, so
flushing is moved to the cleanup path.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Move bind_hash from tcp_sk to inet_sk
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:01:14 +0000 (20:01 -0700)]
[INET]: Move bind_hash from tcp_sk to inet_sk

This should really be in a inet_connection_sock, but I'm leaving it
for a later optimization, when some more fields common to INET
transport protocols now in tcp_sk or inet_sk will be chunked out into
inet_connection_sock, for now its better to concentrate on getting the
changes in the core merged to leave the DCCP tree with only DCCP
specific code.

Next changesets will take advantage of this move to generalise things
like tcp_bind_hash, tcp_put_port, tcp_inherit_port, making the later
receive a inet_hashinfo parameter, and even __tcp_tw_hashdance, etc in
the future, when tcp_tw_bucket gets transformed into the struct
timewait_sock hierarchy.

tcp_destroy_sock also is eligible as soon as tcp_orphan_count gets
moved to sk_prot.

A cascade of incremental changes will ultimately make the tcp_lookup
functions be fully generic.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Move the TCP hashtable functions/structs to inet_hashtables.[ch]
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 03:00:51 +0000 (20:00 -0700)]
[INET]: Move the TCP hashtable functions/structs to inet_hashtables.[ch]

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Just rename the TCP hashtable functions/structs to inet_
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:59:44 +0000 (19:59 -0700)]
[INET]: Just rename the TCP hashtable functions/structs to inet_

This is to break down the complexity of the series of patches,
making it very clear that this one just does:

1. renames tcp_ prefixed hashtable functions and data structures that
   were already mostly generic to inet_ to share it with DCCP and
   other INET transport protocols.

2. Removes not used functions (__tb_head & tb_head)

3. Removes some leftover prototypes in the headers (tcp_bucket_unlock &
   tcp_v4_build_header)

Next changesets will move tcp_sk(sk)->bind_hash to inet_sock so that we can
make functions such as tcp_inherit_port, __tcp_inherit_port, tcp_v4_get_port,
__tcp_put_port,  generic and get others like tcp_destroy_sock closer to generic
(tcp_orphan_count will go to sk->sk_prot to allow this).

Eventually most of these functions will be used passing the transport protocol
inet_hashinfo structure.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Move the TCP ehash functions to include/net/inet_hashtables.h
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:59:20 +0000 (19:59 -0700)]
[INET]: Move the TCP ehash functions to include/net/inet_hashtables.h

To be shared with DCCP (and others), this is the start of a series of patches
that will expose the already generic TCP hash table routines.

The few changes noticed when calling gcc -S before/after on a pentium4 were of
this type:

        movl    40(%esp), %edx
        cmpl    %esi, 472(%edx)
        je      .L168
-       pushl   $291
+       pushl   $272
        pushl   $.LC0
        pushl   $.LC1
        pushl   $.LC2

[acme@toy net-2.6.14]$ size net/ipv4/tcp_ipv4.before.o net/ipv4/tcp_ipv4.after.o
   text    data     bss     dec     hex filename
  17804     516     140   18460    481c net/ipv4/tcp_ipv4.before.o
  17804     516     140   18460    481c net/ipv4/tcp_ipv4.after.o

Holler if some weird architecture has issues with things like this 8)

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Add new "nfnetlink_log" userspace packet logging facility
Harald Welte [Wed, 10 Aug 2005 02:58:39 +0000 (19:58 -0700)]
[NETFILTER]: Add new "nfnetlink_log" userspace packet logging facility

This is a generic (layer3 independent) version of what ipt_ULOG is already
doing for IPv4 today.  ipt_ULOG, ebt_ulog and finally also ip[6]t_LOG will
be deprecated by this mechanism in the long term.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Extend netfilter logging API
Harald Welte [Wed, 10 Aug 2005 02:58:27 +0000 (19:58 -0700)]
[NETFILTER]: Extend netfilter logging API

This patch is in preparation to nfnetlink_log:
- loggers now have to register struct nf_logger instead of nf_logfn
- nf_log_unregister() replaced by nf_log_unregister_pf() and
  nf_log_unregister_logger()
- add comment to ip[6]t_LOG.h to assure nobody redefines flags
- add /proc/net/netfilter/nf_log to tell user which logger is currently
  registered for which address family
- if user has configured logging, but no logging backend (logger) is
  available, always spit a message to syslog, not just the first time.
- split ip[6]t_LOG.c into two parts:
  Backend: Always try to register as logger for the respective address family
  Frontend: Always log via nf_log_packet() API
- modify all users of nf_log_packet() to accomodate additional argument

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Add refcounting and /proc/net/netfilter interface to nfnetlink_queue
Harald Welte [Wed, 10 Aug 2005 02:50:45 +0000 (19:50 -0700)]
[NETFILTER]: Add refcounting and /proc/net/netfilter interface to nfnetlink_queue

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[INET]: Introduce inet_sk_rebuild_header
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:50:02 +0000 (19:50 -0700)]
[INET]: Introduce inet_sk_rebuild_header

From tcp_v4_rebuild_header, that already was pretty generic, I only
needed to use sk->sk_protocol instead of the hardcoded IPPROTO_TCP and
establish the requirement that INET transport layer protocols that
want to use this function map TCP_SYN_SENT to its equivalent state.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SOCK]: Introduce sk_setup_caps
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:49:02 +0000 (19:49 -0700)]
[SOCK]: Introduce sk_setup_caps

From tcp_v4_setup_caps, that always is preceded by a call to
__sk_dst_set, so coalesce this sequence into sk_setup_caps, removing
one call to a TCP function in the IP layer.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SOCK]: Rename __tcp_v4_rehash to __sk_prot_rehash
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:47:37 +0000 (19:47 -0700)]
[SOCK]: Rename __tcp_v4_rehash to __sk_prot_rehash

This operation was already generic and DCCP will use it.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Cleanup INET_REFCNT_DEBUG code
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:45:38 +0000 (19:45 -0700)]
[NET]: Cleanup INET_REFCNT_DEBUG code

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether...
Patrick McHardy [Wed, 10 Aug 2005 02:45:02 +0000 (19:45 -0700)]
[IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether to send an ICMP unreachable

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IPV6]: Check interface bindings on IPv6 raw socket reception
Andrew McDonald [Wed, 10 Aug 2005 02:44:42 +0000 (19:44 -0700)]
[IPV6]: Check interface bindings on IPv6 raw socket reception

Take account of whether a socket is bound to a particular device when
selecting an IPv6 raw socket to receive a packet. Also perform this
check when receiving IPv6 packets with router alert options.

Signed-off-by: Andrew McDonald <andrew@mcdonald.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Add "nfnetlink_queue" netfilter queue handler over nfnetlink
Harald Welte [Wed, 10 Aug 2005 02:44:15 +0000 (19:44 -0700)]
[NETFILTER]: Add "nfnetlink_queue" netfilter queue handler over nfnetlink

- Add new nfnetlink_queue module
- Add new ipt_NFQUEUE and ip6t_NFQUEUE modules to access queue numbers 1-65535
- Mark ip_queue and ip6_queue Kconfig options as OBSOLETE
- Update feature-removal-schedule to remove ip[6]_queue in December

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Core changes required by upcoming nfnetlink_queue code
Harald Welte [Wed, 10 Aug 2005 02:43:44 +0000 (19:43 -0700)]
[NETFILTER]: Core changes required by upcoming nfnetlink_queue code

- split netfiler verdict in 16bit verdict and 16bit queue number
- add 'queuenum' argument to nf_queue_outfn_t and its users ip[6]_queue
- move NFNL_SUBSYS_ definitions from enum to #define
- introduce autoloading for nfnetlink subsystem modules
- add MODULE_ALIAS_NFNL_SUBSYS macro
- add nf_unregister_queue_handlers() to register all handlers for a given
  nf_queue_outfn_t
- add more verbose DEBUGP macro definition to nfnetlink.c
- make nfnetlink_subsys_register fail if subsys already exists
- add some more comments and debug statements to nfnetlink.c

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Move reroute-after-queue code up to the nf_queue layer.
Harald Welte [Wed, 10 Aug 2005 02:42:34 +0000 (19:42 -0700)]
[NETFILTER]: Move reroute-after-queue code up to the nf_queue layer.

The rerouting functionality is required by the core, therefore it has
to be implemented by the core and not in individual queue handlers.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETLINK]: Add properly module refcounting for kernel netlink sockets.
Harald Welte [Wed, 10 Aug 2005 02:40:55 +0000 (19:40 -0700)]
[NETLINK]: Add properly module refcounting for kernel netlink sockets.

- Remove bogus code for compiling netlink as module
- Add module refcounting support for modules implementing a netlink
  protocol
- Add support for autoloading modules that implement a netlink protocol
  as soon as someone opens a socket for that protocol

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Move ipv4 specific code from net/core/netfilter.c to net/ipv4/netfilter.c
Harald Welte [Wed, 10 Aug 2005 02:39:00 +0000 (19:39 -0700)]
[NETFILTER]: Move ipv4 specific code from net/core/netfilter.c to net/ipv4/netfilter.c

Netfilter cleanup
- Move ipv4 code from net/core/netfilter.c to net/ipv4/netfilter.c
- Move ipv6 netfilter code from net/ipv6/ip6_output.c to net/ipv6/netfilter.c

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable()
Harald Welte [Wed, 10 Aug 2005 02:37:23 +0000 (19:37 -0700)]
[NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable()

There is nothing IPv4-specific in it.  In fact, it was already used by
IPv6, too...  Upcoming nfnetlink_queue code will use it for any kind
of packet.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: C99 initizalizers for NAT protocols
Patrick McHardy [Wed, 10 Aug 2005 02:36:53 +0000 (19:36 -0700)]
[NETFILTER]: C99 initizalizers for NAT protocols

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Remove explicit initializations of skb->input_dev
David S. Miller [Wed, 10 Aug 2005 02:36:29 +0000 (19:36 -0700)]
[NET]: Remove explicit initializations of skb->input_dev

Instead, set it in one place, namely the beginning of
netif_receive_skb().

Based upon suggestions from Jamal Hadi Salim.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IPV4]: possible cleanups
Adrian Bunk [Wed, 10 Aug 2005 02:35:47 +0000 (19:35 -0700)]
[IPV4]: possible cleanups

This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
  - xfrm4_state.c: xfrm4_state_fini
- remove the following unneeded EXPORT_SYMBOL's:
  - ip_output.c: ip_finish_output
  - ip_output.c: sysctl_ip_default_ttl
  - fib_frontend.c: ip_dev_find
  - inetpeer.c: inet_peer_idlock
  - ip_options.c: ip_options_compile
  - ip_options.c: ip_options_undo
  - net/core/request_sock.c: sysctl_max_syn_backlog

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Kill skb->real_dev
David S. Miller [Wed, 10 Aug 2005 02:34:12 +0000 (19:34 -0700)]
[NET]: Kill skb->real_dev

Bonding just wants the device before the skb_bond()
decapsulation occurs, so simply pass that original
device into packet_type->func() as an argument.

It remains to be seen whether we can use this same
exact thing to get rid of skb->input_dev as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Reduce tc_index/tc_verd to u16
Patrick McHardy [Wed, 10 Aug 2005 02:33:51 +0000 (19:33 -0700)]
[NET]: Reduce tc_index/tc_verd to u16

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[REQSK]: Move the syn_table destroy from tcp_listen_stop to reqsk_queue_destroy
Arnaldo Carvalho de Melo [Wed, 10 Aug 2005 02:33:31 +0000 (19:33 -0700)]
[REQSK]: Move the syn_table destroy from tcp_listen_stop to reqsk_queue_destroy

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Add ctnetlink subsystem
Harald Welte [Wed, 10 Aug 2005 02:32:58 +0000 (19:32 -0700)]
[NETFILTER]: Add ctnetlink subsystem

Add ctnetlink subsystem for userspace-access to ip_conntrack table.
This allows reading and updating of existing entries, as well as
creating new ones (and new expect's) via nfnetlink.

Please note the 'strange' byte order: nfattr (tag+length) are in host
byte order, while the payload is always guaranteed to be in network
byte order.  This allows a simple userspace process to encapsulate netlink
messages into arch-independent udp packets by just processing/swapping the
headers and not knowing anything about the actual payload.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Remove HIPPI private from skbuff.h
Stephen Hemminger [Wed, 10 Aug 2005 02:31:17 +0000 (19:31 -0700)]
[NET]: Remove HIPPI private from skbuff.h

This removes the private element from skbuff, that is only used by
HIPPI. Instead it uses skb->cb[] to hold the additional data that is
needed in the output path from hard_header to device driver.

PS: The only qdisc that might potentially corrupt this cb[] is if
netem was used over HIPPI. I will take care of that by fixing netem
to use skb->stamp. I don't expect many users of netem over HIPPI

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Introduce SO_{SND,RCV}BUFFORCE socket options
Patrick McHardy [Wed, 10 Aug 2005 02:30:51 +0000 (19:30 -0700)]
[NET]: Introduce SO_{SND,RCV}BUFFORCE socket options

Allows overriding of sysctl_{wmem,rmrm}_max

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFITLER]: Add nfnetlink layer.
Harald Welte [Wed, 10 Aug 2005 02:30:24 +0000 (19:30 -0700)]
[NETFITLER]: Add nfnetlink layer.

Introduce "nfnetlink" (netfilter netlink) layer.  This layer is used as
transport layer for all userspace communication of the new upcoming
netfilter subsystems, such as ctnetlink, nfnetlink_queue and some day even
the mythical pkttables ;)

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: connection tracking event notifiers
Harald Welte [Wed, 10 Aug 2005 02:28:03 +0000 (19:28 -0700)]
[NETFILTER]: connection tracking event notifiers

This adds a notifier chain based event mechanism for ip_conntrack state
changes.  As opposed to the previous implementations in patch-o-matic, we
do no longer need a field in the skb to achieve this.

Thanks to the valuable input from Patrick McHardy and Rusty on the idea
of a per_cpu implementation.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Kill skb->tc_classid
Patrick McHardy [Wed, 10 Aug 2005 02:25:56 +0000 (19:25 -0700)]
[NET]: Kill skb->tc_classid

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Kill skb->list
David S. Miller [Wed, 10 Aug 2005 02:25:21 +0000 (19:25 -0700)]
[NET]: Kill skb->list

Remove the "list" member of struct sk_buff, as it is entirely
redundant.  All SKB list removal callers know which list the
SKB is on, so storing this in sk_buff does nothing other than
taking up some space.

Two tricky bits were SCTP, which I took care of, and two ATM
drivers which Francois Romieu <romieu@fr.zoreil.com> fixed
up.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
19 years ago[NETFILTER]: reduce netfilter sk_buff enlargement
Harald Welte [Wed, 10 Aug 2005 02:24:19 +0000 (19:24 -0700)]
[NETFILTER]: reduce netfilter sk_buff enlargement

As discussed at netconf'05, we're trying to save every bit in sk_buff.
The patch below makes sk_buff 8 bytes smaller.  I did some basic
testing on my notebook and it seems to work.

The only real in-tree user of nfcache was IPVS, who only needs a
single bit.  Unfortunately I couldn't find some other free bit in
sk_buff to stuff that bit into, so I introduced a separate field for
them.  Maybe the IPVS guys can resolve that to further save space.

Initially I wanted to shrink pkt_type to three bits (PACKET_HOST and
alike are only 6 values defined), but unfortunately the bluetooth code
overloads pkt_type :(

The conntrack-event-api (out-of-tree) uses nfcache, but Rusty just
came up with a way how to do it without any skb fields, so it's safe
to remove it.

- remove all never-implemented 'nfcache' code
- don't have ipvs code abuse 'nfcache' field. currently get's their own
  compile-conditional skb->ipvs_property field.  IPVS maintainers can
  decide to move this bit elswhere, but nfcache needs to die.
- remove skb->nfcache field to save 4 bytes
- move skb->nfctinfo into three unused bits to save further 4 bytes

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: convert nfmark and conntrack mark to 32bit
Harald Welte [Wed, 10 Aug 2005 02:22:01 +0000 (19:22 -0700)]
[NETFILTER]: convert nfmark and conntrack mark to 32bit

As discussed at netconf'05, we convert nfmark and conntrack-mark to be
32bits even on 64bit architectures.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 29 Aug 2005 20:54:35 +0000 (13:54 -0700)]
Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

19 years agoMerge /spare/repo/linux-2.6/
Jeff Garzik [Mon, 29 Aug 2005 19:59:42 +0000 (15:59 -0400)]
Merge /spare/repo/linux-2.6/

19 years ago[SPARC64]: More fully work around Spitfire Errata 51.
David S. Miller [Mon, 29 Aug 2005 19:46:22 +0000 (12:46 -0700)]
[SPARC64]: More fully work around Spitfire Errata 51.

It appears that a memory barrier soon after a mispredicted
branch, not just in the delay slot, can cause the hang
condition of this cpu errata.

So move them out-of-line, and explicitly put them into
a "branch always, predict taken" delay slot which should
fully kill this problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Make debugging spinlocks usable again.
David S. Miller [Mon, 29 Aug 2005 19:46:07 +0000 (12:46 -0700)]
[SPARC64]: Make debugging spinlocks usable again.

When the spinlock routines were moved out of line into
kernel/spinlock.c this made it so that the debugging
spinlocks record lock acquisition program counts in the
kernel/spinlock.c functions not in their callers.
This makes the debugging info kind of useless.

So record the correct caller's program counter and
now this feature is useful once more.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC]: remove use of asm/segment.h
Kumar Gala [Mon, 29 Aug 2005 19:45:44 +0000 (12:45 -0700)]
[SPARC]: remove use of asm/segment.h

Removed sparc architecture specific users of asm/segment.h and
asm-sparc/segment.h itself

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: remove use of asm/segment.h
Kumar Gala [Mon, 29 Aug 2005 19:45:30 +0000 (12:45 -0700)]
[SPARC64]: remove use of asm/segment.h

Removed sparc64 architecture specific users of asm/segment.h and
asm-sparc64/segment.h itself

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Revamp Spitfire error trap handling.
David S. Miller [Mon, 29 Aug 2005 19:45:11 +0000 (12:45 -0700)]
[SPARC64]: Revamp Spitfire error trap handling.

Current uncorrectable error handling was poor enough
that the processor could just loop taking the same
trap over and over again.  Fix things up so that we
at least get a log message and perhaps even some register
state.

In the process, much consolidation became possible,
particularly with the correctable error handler.

Prefix assembler and C function names with "spitfire"
to indicate that these are for Ultra-I/II/IIi/IIe only.

More work is needed to make these routines robust and
featureful to the level of the Ultra-III error handlers.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Do not call winfix_dax blindly
David S. Miller [Mon, 29 Aug 2005 19:44:57 +0000 (12:44 -0700)]
[SPARC64]: Do not call winfix_dax blindly

Verify we really are taking a data access exception trap, at TL1, from
one of the window spill/fill handlers.

Else call a new function, data_access_exception_tl1, to log the error.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Fix trap state reading for instruction_access_exception.
David S. Miller [Mon, 29 Aug 2005 19:44:40 +0000 (12:44 -0700)]
[SPARC64]: Fix trap state reading for instruction_access_exception.

1) Read ASI_IMMU SFSR not ASI_DMMU.
2) IMMU has no SFAR, read TPC instead
3) Delete old and incorrect comment about the DTLB protection
   trap having a dependency on the SFSR contents in order to
   function correctly

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[libata sata_nv] NVIDIA ok'd license change from OSL+GPL to GPL
Jeff Garzik [Mon, 29 Aug 2005 19:12:56 +0000 (15:12 -0400)]
[libata sata_nv] NVIDIA ok'd license change from OSL+GPL to GPL

19 years ago[PATCH] missing include in smc-ultra
Al Viro [Sun, 28 Aug 2005 02:52:22 +0000 (03:52 +0100)]
[PATCH] missing include in smc-ultra

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] missing include in tda80xx
Al Viro [Sun, 28 Aug 2005 02:47:50 +0000 (03:47 +0100)]
[PATCH] missing include in tda80xx

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] mod_devicetable.h fixes
Al Viro [Sun, 28 Aug 2005 02:19:14 +0000 (03:19 +0100)]
[PATCH] mod_devicetable.h fixes

 * ieee1394_device_id has kernel_ulong_t field after an odd number of
   __u32 ones.  Since mod_devicetable.h is included both from kernel and
   from host build helper, we may be in trouble if we are building on
   32bit host for 64bit target - userland sees unsigned long long,
   kernel sees unsigned long and while their sizes match, alignments
   might not.  Fixed by forcing alignment.  Fortunately, almost nobody
   else needs that - the rest of such fields is naturally aligned as it
   is.

 * of_device_id has void * in it.  Host userland helpers need
   kernel_ulong_t instead, since their void * might have nothing to do
   with the kernel one.  Fixed in the same way it's done for similar
   problems in pcmcia_device_id (ifdef __KERNEL__).

 * pcmcia_device_id has the same problem as ieee1394_device_id.  Fixed
   the same way.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] new name for 2.6.14
Benjamin LaHaise [Sun, 28 Aug 2005 22:05:17 +0000 (18:05 -0400)]
[PATCH] new name for 2.6.14

We've had Woozy Numbat for a while now.  Here's an updated name care of
Jeff Garzik and myself.

Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
Linus Torvalds [Mon, 29 Aug 2005 17:36:48 +0000 (10:36 -0700)]
Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git

19 years agoMerge HEAD from master.kernel.org:/home/rmk/linux-2.6-arm.git
Linus Torvalds [Mon, 29 Aug 2005 17:35:43 +0000 (10:35 -0700)]
Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-arm.git

19 years agoMerge HEAD from master.kernel.org:/home/rmk/linux-2.6-mmc.git
Linus Torvalds [Mon, 29 Aug 2005 17:35:21 +0000 (10:35 -0700)]
Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-mmc.git

19 years agoMerge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial.git
Linus Torvalds [Mon, 29 Aug 2005 17:34:59 +0000 (10:34 -0700)]
Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial.git

19 years agoMerge HEAD from master.kernel.org:/home/rmk/linux-2.6-ucb.git
Linus Torvalds [Mon, 29 Aug 2005 17:34:31 +0000 (10:34 -0700)]
Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-ucb.git

19 years agoMerge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 29 Aug 2005 17:04:37 +0000 (10:04 -0700)]
Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

19 years agoMerge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 29 Aug 2005 17:03:46 +0000 (10:03 -0700)]
Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

19 years ago[PATCH] convert signal handling of NODEFER to act like other Unix boxes.
Steven Rostedt [Mon, 29 Aug 2005 15:44:09 +0000 (11:44 -0400)]
[PATCH] convert signal handling of NODEFER to act like other Unix boxes.

It has been reported that the way Linux handles NODEFER for signals is
not consistent with the way other Unix boxes handle it.  I've written a
program to test the behavior of how this flag affects signals and had
several reports from people who ran this on various Unix boxes,
confirming that Linux seems to be unique on the way this is handled.

The way NODEFER affects signals on other Unix boxes is as follows:

1) If NODEFER is set, other signals in sa_mask are still blocked.

2) If NODEFER is set and the signal is in sa_mask, then the signal is
still blocked. (Note: this is the behavior of all tested but Linux _and_
NetBSD 2.0 *).

The way NODEFER affects signals on Linux:

1) If NODEFER is set, other signals are _not_ blocked regardless of
sa_mask (Even NetBSD doesn't do this).

2) If NODEFER is set and the signal is in sa_mask, then the signal being
handled is not blocked.

The patch converts signal handling in all current Linux architectures to
the way most Unix boxes work.

Unix boxes that were tested:  DU4, AIX 5.2, Irix 6.5, NetBSD 2.0, SFU
3.5 on WinXP, AIX 5.3, Mac OSX, and of course Linux 2.6.13-rcX.

* NetBSD was the only other Unix to behave like Linux on point #2. The
main concern was brought up by point #1 which even NetBSD isn't like
Linux.  So with this patch, we leave NetBSD as the lonely one that
behaves differently here with #2.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>