linux-2.6-microblaze.git
18 years ago[BRIDGE]: remove unneeded bh disables
Stephen Hemminger [Tue, 21 Mar 2006 06:56:25 +0000 (22:56 -0800)]
[BRIDGE]: remove unneeded bh disables

The STP timers run off softirq (kernel timers), so there is no need to
disable bottom half in the spin locks.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE] br_netfilter: Warning fixes.
Andrew Morton [Tue, 21 Mar 2006 06:55:24 +0000 (22:55 -0800)]
[BRIDGE] br_netfilter: Warning fixes.

net/bridge/br_netfilter.c: In function `br_nf_pre_routing':
net/bridge/br_netfilter.c:427: warning: unused variable `vhdr'
net/bridge/br_netfilter.c:445: warning: unused variable `vhdr'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE] ebtables: Build fix.
Andrew Morton [Tue, 21 Mar 2006 06:55:02 +0000 (22:55 -0800)]
[BRIDGE] ebtables: Build fix.

net/bridge/netfilter/ebtables.c:1481: warning: initialization makes pointer from integer without a cast

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Fixup SO_PEERSEC value on 32-bit sparc.
David S. Miller [Tue, 21 Mar 2006 06:53:42 +0000 (22:53 -0800)]
[SPARC]: Fixup SO_PEERSEC value on 32-bit sparc.

Sparc64 and Sparc32 have to have identical socket call
numbering in order to handle compat layer stuff properly.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[INET]: Fix typo in Arnaldo's connection sock compat fixups.
David S. Miller [Tue, 21 Mar 2006 06:52:32 +0000 (22:52 -0800)]
[INET]: Fix typo in Arnaldo's connection sock compat fixups.

"struct inet_csk" --> "struct inet_connection_sock" :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] feat: Pass dccp_minisock ptr where only the minisock is used
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:51:53 +0000 (22:51 -0800)]
[DCCP] feat: Pass dccp_minisock ptr where only the minisock is used

This is in preparation for having a dccp_minisock embedded into
dccp_request_sock so that feature negotiation can be done prior to
creating the full blown dccp_sock.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] minisock: Rename struct dccp_options to struct dccp_minisock
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:50:58 +0000 (22:50 -0800)]
[DCCP] minisock: Rename struct dccp_options to struct dccp_minisock

This will later be included in struct dccp_request_sock so that we can
have per connection feature negotiation state while in the 3way
handshake, when we clone the DCCP_ROLE_LISTEN socket (in
dccp_create_openreq_child) we'll just copy this state from
dreq_minisock to dccps_minisock.

Also the feature negotiation and option parsing code will mostly touch
dccps_minisock, which will simplify some stuff.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SELINUX]: selinux_socket_getpeer_{stream,dgram} fixup
Catherine Zhang [Tue, 21 Mar 2006 06:49:00 +0000 (22:49 -0800)]
[SELINUX]: selinux_socket_getpeer_{stream,dgram} fixup

Signed-off-by: Catherine Zhang <cxzhang@watson.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[NET]: Identation & other cleanups related to compat_[gs]etsockopt cset
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:48:35 +0000 (22:48 -0800)]
[NET]: Identation & other cleanups related to compat_[gs]etsockopt cset

No code changes, just tidying up, in some cases moving EXPORT_SYMBOLs
to just after the function exported, etc.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SK_BUFF]: export skb_pull_rcsum
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:47:55 +0000 (22:47 -0800)]
[SK_BUFF]: export skb_pull_rcsum

*** Warning: "skb_pull_rcsum" [net/bridge/bridge.ko] undefined!
*** Warning: "skb_pull_rcsum" [net/8021q/8021q.ko] undefined!
*** Warning: "skb_pull_rcsum" [drivers/net/pppoe.ko] undefined!
*** Warning: "skb_pull_rcsum" [drivers/net/ppp_generic.ko] undefined!

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SECURITY] getpeersec: Fix build breakage
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:47:37 +0000 (22:47 -0800)]
[SECURITY] getpeersec: Fix build breakage

A recent changeset removes dummy_socket_getpeersec, replacing it with
two new functions, but still references the removed function in the
security_fixup_ops table, fix it by doing the replacement operation in
the fixup table too.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[INFINIBAND] ipoib: Remove leftover use of neigh_ops->destructor
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:46:40 +0000 (22:46 -0800)]
[INFINIBAND] ipoib: Remove leftover use of neigh_ops->destructor

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ICSK] compat: Introduce inet_csk_compat_[gs]etsockopt
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:46:16 +0000 (22:46 -0800)]
[ICSK] compat: Introduce inet_csk_compat_[gs]etsockopt

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SNAP]: Remove leftover unused hdr variable
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:45:37 +0000 (22:45 -0800)]
[SNAP]: Remove leftover unused hdr variable

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: {get|set}sockopt compatibility layer
Dmitry Mishin [Tue, 21 Mar 2006 06:45:21 +0000 (22:45 -0800)]
[NET]: {get|set}sockopt compatibility layer

This patch extends {get|set}sockopt compatibility layer in order to
move protocol specific parts to their place and avoid huge universal
net/compat.c file in the future.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: remove useless test in ip6_append_data
Dave Jones [Tue, 21 Mar 2006 06:44:52 +0000 (22:44 -0800)]
[IPV6]: remove useless test in ip6_append_data

We've already dereferenced 'np' a dozen
times at this point, so it's safe to say it's not null.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKT_SCHED]: Let NET_CLS_ACT no longer depend on EXPERIMENTAL
Adrian Bunk [Tue, 21 Mar 2006 06:44:24 +0000 (22:44 -0800)]
[PKT_SCHED]: Let NET_CLS_ACT no longer depend on EXPERIMENTAL

This option should IMHO no longer depend on EXPERIMENTAL.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
ACKed-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Replace skb_pull/skb_postpull_rcsum with skb_pull_rcsum
Herbert Xu [Tue, 21 Mar 2006 06:43:56 +0000 (22:43 -0800)]
[NET]: Replace skb_pull/skb_postpull_rcsum with skb_pull_rcsum

We're now starting to have quite a number of places that do skb_pull
followed immediately by an skb_postpull_rcsum.  We can merge these two
operations into one function with skb_pull_rcsum.  This makes sense
since most pull operations on receive skb's need to update the
checksum.

I've decided to make this out-of-line since it is fairly big and the
fast path where hardware checksums are enabled need to call
csum_partial anyway.

Since this is a brand new function we get to add an extra check on the
len argument.  As it is most callers of skb_pull ignore its return
value which essentially means that there is no check on the len
argument.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DECnet]: Use RCU locking in dn_rules.c
Steven Whitehouse [Tue, 21 Mar 2006 06:43:28 +0000 (22:43 -0800)]
[DECnet]: Use RCU locking in dn_rules.c

As per Robert Olsson's patch for ipv4, this is the DECnet
version to keep the code "in step". It changes the list
of rules to use RCU rather than an rwlock.

Inspired-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DECnet]: Patch to fix recvmsg() flag check
Patrick Caulfield [Tue, 21 Mar 2006 06:43:05 +0000 (22:43 -0800)]
[DECnet]: Patch to fix recvmsg() flag check

This patch means that 64bit kernel/32bit userland platforms will now
work correctly with DECnet.

Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DECnet]: Endian annotation and fixes for DECnet.
Steven Whitehouse [Tue, 21 Mar 2006 06:42:39 +0000 (22:42 -0800)]
[DECnet]: Endian annotation and fixes for DECnet.

The typedef for dn_address has been removed in favour of using __le16
or __u16 directly as appropriate. All the DECnet header files are
updated accordingly.

The byte ordering of dn_eth2dn() and dn_dn2eth() are both changed
since just about all their callers wanted network order rather than
host order, so the conversion is now done in the functions themselves.

Several missed endianess conversions have been picked up during the
conversion process. The nh_gw field in struct dn_fib_info has been
changed from a 32 bit field to 16 bits as it ought to be.

One or two cases of using htons rather than dn_htons in the routing
code have been found and fixed.

There are still a few warnings to fix, but this patch deals with the
important cases.

Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SECURITY]: TCP/UDP getpeersec
Catherine Zhang [Tue, 21 Mar 2006 06:41:23 +0000 (22:41 -0800)]
[SECURITY]: TCP/UDP getpeersec

This patch implements an application of the LSM-IPSec networking
controls whereby an application can determine the label of the
security association its TCP or UDP sockets are currently connected to
via getsockopt and the auxiliary data mechanism of recvmsg.

Patch purpose:

This patch enables a security-aware application to retrieve the
security context of an IPSec security association a particular TCP or
UDP socket is using.  The application can then use this security
context to determine the security context for processing on behalf of
the peer at the other end of this connection.  In the case of UDP, the
security context is for each individual packet.  An example
application is the inetd daemon, which could be modified to start
daemons running at security contexts dependent on the remote client.

Patch design approach:

- Design for TCP
The patch enables the SELinux LSM to set the peer security context for
a socket based on the security context of the IPSec security
association.  The application may retrieve this context using
getsockopt.  When called, the kernel determines if the socket is a
connected (TCP_ESTABLISHED) TCP socket and, if so, uses the dst_entry
cache on the socket to retrieve the security associations.  If a
security association has a security context, the context string is
returned, as for UNIX domain sockets.

- Design for UDP
Unlike TCP, UDP is connectionless.  This requires a somewhat different
API to retrieve the peer security context.  With TCP, the peer
security context stays the same throughout the connection, thus it can
be retrieved at any time between when the connection is established
and when it is torn down.  With UDP, each read/write can have
different peer and thus the security context might change every time.
As a result the security context retrieval must be done TOGETHER with
the packet retrieval.

The solution is to build upon the existing Unix domain socket API for
retrieving user credentials.  Linux offers the API for obtaining user
credentials via ancillary messages (i.e., out of band/control messages
that are bundled together with a normal message).

Patch implementation details:

- Implementation for TCP
The security context can be retrieved by applications using getsockopt
with the existing SO_PEERSEC flag.  As an example (ignoring error
checking):

getsockopt(sockfd, SOL_SOCKET, SO_PEERSEC, optbuf, &optlen);
printf("Socket peer context is: %s\n", optbuf);

The SELinux function, selinux_socket_getpeersec, is extended to check
for labeled security associations for connected (TCP_ESTABLISHED ==
sk->sk_state) TCP sockets only.  If so, the socket has a dst_cache of
struct dst_entry values that may refer to security associations.  If
these have security associations with security contexts, the security
context is returned.

getsockopt returns a buffer that contains a security context string or
the buffer is unmodified.

- Implementation for UDP
To retrieve the security context, the application first indicates to
the kernel such desire by setting the IP_PASSSEC option via
getsockopt.  Then the application retrieves the security context using
the auxiliary data mechanism.

An example server application for UDP should look like this:

toggle = 1;
toggle_len = sizeof(toggle);

setsockopt(sockfd, SOL_IP, IP_PASSSEC, &toggle, &toggle_len);
recvmsg(sockfd, &msg_hdr, 0);
if (msg_hdr.msg_controllen > sizeof(struct cmsghdr)) {
    cmsg_hdr = CMSG_FIRSTHDR(&msg_hdr);
    if (cmsg_hdr->cmsg_len <= CMSG_LEN(sizeof(scontext)) &&
        cmsg_hdr->cmsg_level == SOL_IP &&
        cmsg_hdr->cmsg_type == SCM_SECURITY) {
        memcpy(&scontext, CMSG_DATA(cmsg_hdr), sizeof(scontext));
    }
}

ip_setsockopt is enhanced with a new socket option IP_PASSSEC to allow
a server socket to receive security context of the peer.  A new
ancillary message type SCM_SECURITY.

When the packet is received we get the security context from the
sec_path pointer which is contained in the sk_buff, and copy it to the
ancillary message space.  An additional LSM hook,
selinux_socket_getpeersec_udp, is defined to retrieve the security
context from the SELinux space.  The existing function,
selinux_socket_getpeersec does not suit our purpose, because the
security context is copied directly to user space, rather than to
kernel space.

Testing:

We have tested the patch by setting up TCP and UDP connections between
applications on two machines using the IPSec policies that result in
labeled security associations being built.  For TCP, we can then
extract the peer security context using getsockopt on either end.  For
UDP, the receiving end can retrieve the security context using the
auxiliary data mechanism of recvmsg.

Signed-off-by: Catherine Zhang <cxzhang@watson.ibm.com>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Fix aevent related crash
Patrick McHardy [Tue, 21 Mar 2006 06:40:54 +0000 (22:40 -0800)]
[XFRM]: Fix aevent related crash

When xfrm_user isn't loaded xfrm_nl is NULL, which makes IPsec crash because
xfrm_aevent_is_on passes the NULL pointer to netlink_has_listeners as socket.
A second problem is that the xfrm_nl pointer is not cleared when the socket
is releases at module unload time.

Protect references of xfrm_nl from outside of xfrm_user by RCU, check
that the socket is present in xfrm_aevent_is_on and set it to NULL
when unloading xfrm_user.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: sysctl to allow TCP window > 32767 sans wscale
Rick Jones [Tue, 21 Mar 2006 06:40:29 +0000 (22:40 -0800)]
[TCP]: sysctl to allow TCP window > 32767 sans wscale

Back in the dark ages, we had to be conservative and only allow 15-bit
window fields if the window scale option was not negotiated.  Some
ancient stacks used a signed 16-bit quantity for the window field of
the TCP header and would get confused.

Those days are long gone, so we can use the full 16-bits by default
now.

There is a sysctl added so that we can still interact with such old
stacks

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4] ARP: Documentation for new arp_accept sysctl variable.
Neil Horman [Tue, 21 Mar 2006 06:40:03 +0000 (22:40 -0800)]
[IPV4] ARP: Documentation for new arp_accept sysctl variable.

As John pointed out, I had not added documentation to describe the
arp_accpet sysctl that I posted in my last patch.  This patch adds
that documentation.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4] ARP: Alloc acceptance of unsolicited ARP via netdevice sysctl.
Neil Horman [Tue, 21 Mar 2006 06:39:47 +0000 (22:39 -0800)]
[IPV4] ARP: Alloc acceptance of unsolicited ARP via netdevice sysctl.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: netif_carrier_off runs too early; could still be queued when init fails
Jeff Mahoney [Tue, 21 Mar 2006 06:39:21 +0000 (22:39 -0800)]
[TG3]: netif_carrier_off runs too early; could still be queued when init fails

Move the netif_carrier_off() call from tg3_init_one()->
tg3_init_link_config() to tg3_open() as is the convention for most other
network drivers.

I was getting a panic after a tg3 device failed to initialize due to DMA
failure.  The oops pointed to the link watch queue with spinlock debugging
enabled.  Without spinlock debugging, the Oops didn't occur.

I suspect that the link event was getting queued but not executed until
after the DMA test had failed and the device was freed.  The link event was
then operating on freed memory, which could contain anything.  With this
patch applied, the Oops no longer occurs.

[ Based upon feedback from Michael Chan, we move netif_carrier_off()
  to the end of tg3_init_one() instead of moving it to tg3_open() -DaveM ]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TIPC]: Avoid compiler warning
Per Liden [Tue, 21 Mar 2006 06:38:33 +0000 (22:38 -0800)]
[TIPC]: Avoid compiler warning

Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TIPC]: Reduce stack usage
Per Liden [Tue, 21 Mar 2006 06:38:14 +0000 (22:38 -0800)]
[TIPC]: Reduce stack usage

The node_map struct can be quite large (516 bytes) and allocating two of
them on the stack is not a good idea since we might only have a 4K stack
to start with.

Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TIPC]: Cleanups
Adrian Bunk [Tue, 21 Mar 2006 06:37:52 +0000 (22:37 -0800)]
[TIPC]: Cleanups

This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions:
  - name_table.c: tipc_nametbl_print()
  - name_table.c: tipc_nametbl_dump()
  - net.c: tipc_net_next_node()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TIPC]: Remove unused functions
Per Liden [Tue, 21 Mar 2006 06:37:27 +0000 (22:37 -0800)]
[TIPC]: Remove unused functions

Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TIPC]: Remove inlines from *.c
Sam Ravnborg [Tue, 21 Mar 2006 06:37:04 +0000 (22:37 -0800)]
[TIPC]: Remove inlines from *.c

With reference to latest discussions on linux-kernel with respect to
inline here is a patch for tipc to remove all inlines as used in
the .c files. See also chapter 14 in Documentation/CodingStyle.

Before:
   text        data     bss     dec     hex filename
 102990        5292    1752  110034   1add2 tipc.o

Now:
   text        data     bss     dec     hex filename
 101190        5292    1752  108234   1a6ca tipc.o

This is a nice text size reduction which will improve icache usage.
In some cases bigger (> 4 lines) functions where declared inline
and used in many places, they are most probarly no longer inlined by gcc
resulting in the size reduction.
There are several one liners that no longer are declared inline, but gcc
should inline these just fine without the inline hint.

With this patch applied one warning is added about an unused static
function - that was hidded by utilising inline before.
The function in question were kept so this patch is solely a
inline removal patch.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TIPC]: Fix simple sparse warnings
Sam Ravnborg [Tue, 21 Mar 2006 06:36:47 +0000 (22:36 -0800)]
[TIPC]: Fix simple sparse warnings

Tried to run the new tipc stack through sparse.
Following patch fixes all cases where 0 was used
as replacement of NULL.
Use NULL to document this is a pointer and to silence sparse.

This brough sparse warning count down with 127 to 24 warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Fix warnings in ip_nat_snmp_basic.c
David S. Miller [Tue, 21 Mar 2006 06:36:21 +0000 (22:36 -0800)]
[NETFILTER]: Fix warnings in ip_nat_snmp_basic.c

net/ipv4/netfilter/ip_nat_snmp_basic.c: In function 'asn1_header_decode':
net/ipv4/netfilter/ip_nat_snmp_basic.c:248: warning: 'len' may be used uninitialized in this function
net/ipv4/netfilter/ip_nat_snmp_basic.c:248: warning: 'def' may be used uninitialized in this function
net/ipv4/netfilter/ip_nat_snmp_basic.c: In function 'snmp_translate':
net/ipv4/netfilter/ip_nat_snmp_basic.c:672: warning: 'l' may be used uninitialized in this function
net/ipv4/netfilter/ip_nat_snmp_basic.c:668: warning: 'type' may be used uninitialized in this function

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Fix uninitialized var warnings in dccp_parse_options().
David S. Miller [Tue, 21 Mar 2006 06:36:01 +0000 (22:36 -0800)]
[DCCP]: Fix uninitialized var warnings in dccp_parse_options().

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: sem2mutex part 2
Ingo Molnar [Tue, 21 Mar 2006 06:35:41 +0000 (22:35 -0800)]
[NET]: sem2mutex part 2

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ATM] suni: cast arg properly in SONET_SETFRAMING
Alexey Dobriyan [Tue, 21 Mar 2006 06:35:16 +0000 (22:35 -0800)]
[ATM] suni: cast arg properly in SONET_SETFRAMING

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[WAN]: fix section mismatch warning in sbni
Sam Ravnborg [Tue, 21 Mar 2006 06:34:52 +0000 (22:34 -0800)]
[WAN]: fix section mismatch warning in sbni

In latest -mm sbni gives following warning: WARNING:
drivers/net/wan/sbni.o - Section mismatch: reference to \ .init.data:
from .text between 'init_module' (at offset 0x14ef) and \
'cleanup_module'

The warning is caused by init_module() calling a function declared
__init.  Declare init_module() __init too to fix warning.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SUNGEM]: sem2mutex
Ingo Molnar [Tue, 21 Mar 2006 06:34:25 +0000 (22:34 -0800)]
[SUNGEM]: sem2mutex

Semaphore to mutexes conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[CASSINI]: sem2mutex
Ingo Molnar [Tue, 21 Mar 2006 06:34:09 +0000 (22:34 -0800)]
[CASSINI]: sem2mutex

Semaphore to mutexes conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IRDA]: remove MODULE_PARM()
Andrew Morton [Tue, 21 Mar 2006 06:33:41 +0000 (22:33 -0800)]
[IRDA]: remove MODULE_PARM()

MODULE_PARM() is deprecated and is about to go away altogether.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET] sem2mutex: net/
Arjan van de Ven [Tue, 21 Mar 2006 06:33:17 +0000 (22:33 -0800)]
[NET] sem2mutex: net/

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IRDA] sem2mutex: drivers/net/irda
Arjan van de Ven [Tue, 21 Mar 2006 06:32:53 +0000 (22:32 -0800)]
[IRDA] sem2mutex: drivers/net/irda

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: dev_put/dev_hold cleanup
Stephen Hemminger [Tue, 21 Mar 2006 06:32:28 +0000 (22:32 -0800)]
[NET]: dev_put/dev_hold cleanup

Get rid of the old __dev_put macro that is just a hold over from pre 2.6
kernel.  And turn dev_hold into an inline instead of a macro.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] options: Make dccp_insert_options & friends yell on error
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:32:06 +0000 (22:32 -0800)]
[DCCP] options: Make dccp_insert_options & friends yell on error

And not the silly LIMIT_NETDEBUG and silently return without inserting
the option requested.

Also drop some old debugging messages associated to option insertion.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Remove leftover dccp_send_response prototype
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:31:46 +0000 (22:31 -0800)]
[DCCP]: Remove leftover dccp_send_response prototype

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: ditch dccp_v[46]_ctl_send_ack
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:31:26 +0000 (22:31 -0800)]
[DCCP]: ditch dccp_v[46]_ctl_send_ack

Merging it with its only user: dccp_v[46]_reqsk_send_ack.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Use sk->sk_prot->max_header consistently for non-data packets
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:31:09 +0000 (22:31 -0800)]
[DCCP]: Use sk->sk_prot->max_header consistently for non-data packets

Using this also provides opportunities for introducing
inet_csk_alloc_skb that would call alloc_skb, account it to the sock
and skb_reserve(max_header), but I'll leave this for later, for now
using sk_prot->max_header consistently is enough.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] options: Fix handling of ackvecs in DATA packets
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:30:51 +0000 (22:30 -0800)]
[DCCP] options: Fix handling of ackvecs in DATA packets

I.e. they should be just ignored, but we have to use 'break', not 'continue',
as we have to possibly reset the mandatory flag.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ATM]: Fix build after neigh->parms->neigh_destructor change.
David S. Miller [Tue, 21 Mar 2006 06:30:23 +0000 (22:30 -0800)]
[ATM]: Fix build after neigh->parms->neigh_destructor change.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: update version and reldate
Michael Chan [Tue, 21 Mar 2006 06:29:52 +0000 (22:29 -0800)]
[TG3]: update version and reldate

Update version to 3.52.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add firmware version info
Michael Chan [Tue, 21 Mar 2006 06:29:32 +0000 (22:29 -0800)]
[TG3]: Add firmware version info

Add fw_version information to ethtool -i.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: nvram cleanup
Michael Chan [Tue, 21 Mar 2006 06:29:15 +0000 (22:29 -0800)]
[TG3]: nvram cleanup

Some nvram related cleanup:

1. Add a tg3_nvram_read_swab() since swabing the data is frequently
done.

2. Add a function to convert nvram address to physical address
instead of doing it in 2 separate places.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Fixup memory test for 5787
Michael Chan [Tue, 21 Mar 2006 06:28:57 +0000 (22:28 -0800)]
[TG3]: Fixup memory test for 5787

Ethtool memory test on 5787 requires a new memory table.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add new one-shot MSI handler
Michael Chan [Tue, 21 Mar 2006 06:28:41 +0000 (22:28 -0800)]
[TG3]: Add new one-shot MSI handler

Support one-shot MSI on 5787.

This one-shot MSI idea is credited to David Miller. In this mode, MSI
disables itself automatically after it is generated, saving the driver
a register access to disable it for NAPI.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add ipv6 checksum support
Michael Chan [Tue, 21 Mar 2006 06:28:27 +0000 (22:28 -0800)]
[TG3]: Add ipv6 checksum support

Support ipv6 tx csum on 5787 by setting NETIF_F_HW_CSUM.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add new hard_start_xmit
Michael Chan [Tue, 21 Mar 2006 06:28:05 +0000 (22:28 -0800)]
[TG3]: Add new hard_start_xmit

Support 5787 hardware TSO using a new flag TG3_FLG2_HW_TSO_2.

Since the TSO interface is slightly different and these chips have
finally fixed the 4GB DMA problem and do not have the 40-bit DMA
problem, a new hard_start_xmit is used for these chips. All previous
chips will use the old hard_start_xmit that is now renamed
tg3_start_xmit_dma_bug().

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add 5787 nvram support
Michael Chan [Tue, 21 Mar 2006 06:27:48 +0000 (22:27 -0800)]
[TG3]: Add 5787 nvram support

Support additional nvrams and new nvram format for 5787 and 5754.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add 5787 and 5754 basic support
Michael Chan [Tue, 21 Mar 2006 06:27:35 +0000 (22:27 -0800)]
[TG3]: Add 5787 and 5754 basic support

Add basic support for 2 new chips 5787 and 5754.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: use fget_light() in net/socket.c
Benjamin LaHaise [Tue, 21 Mar 2006 06:27:12 +0000 (22:27 -0800)]
[NET]: use fget_light() in net/socket.c

Here's an updated copy of the patch to use fget_light in net/socket.c.
Rerunning the tests show a drop of ~80Mbit/s on average, which looks
bad until you see the drop in cpu usage from ~89% to ~82%.  That will
get fixed in another patch...

Before: max 8113.70, min 8026.32, avg 8072.34
 87380  16384  16384    10.01      8045.55   87.11    87.11    1.774   1.774
 87380  16384  16384    10.01      8065.14   90.86    90.86    1.846   1.846
 87380  16384  16384    10.00      8077.76   89.85    89.85    1.822   1.822
 87380  16384  16384    10.00      8026.32   89.80    89.80    1.833   1.833
 87380  16384  16384    10.01      8108.59   89.81    89.81    1.815   1.815
 87380  16384  16384    10.01      8034.53   89.01    89.01    1.815   1.815
 87380  16384  16384    10.00      8113.70   90.45    90.45    1.827   1.827
 87380  16384  16384    10.00      8111.37   89.90    89.90    1.816   1.816
 87380  16384  16384    10.01      8077.75   87.96    87.96    1.784   1.784
 87380  16384  16384    10.00      8062.70   90.25    90.25    1.834   1.834

After: max 8035.81, min 7963.69, avg 7998.14
 87380  16384  16384    10.01      8000.93   82.11    82.11    1.682   1.682
 87380  16384  16384    10.01      8016.17   83.67    83.67    1.710   1.710
 87380  16384  16384    10.01      7963.69   83.47    83.47    1.717   1.717
 87380  16384  16384    10.01      8014.35   81.71    81.71    1.671   1.671
 87380  16384  16384    10.00      7967.68   83.41    83.41    1.715   1.715
 87380  16384  16384    10.00      7995.22   81.00    81.00    1.660   1.660
 87380  16384  16384    10.00      8002.61   83.90    83.90    1.718   1.718
 87380  16384  16384    10.00      8035.81   81.71    81.71    1.666   1.666
 87380  16384  16384    10.01      8005.36   82.56    82.56    1.690   1.690
 87380  16384  16384    10.00      7979.61   82.50    82.50    1.694   1.694

Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: minor net_rx_action optimization
Stephen Hemminger [Tue, 21 Mar 2006 06:26:39 +0000 (22:26 -0800)]
[NET]: minor net_rx_action optimization

The functions list_del followed by list_add_tail is equivalent to the
existing inline list_move_tail. list_move_tail avoids unnecessary
_LIST_POISON.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET] rtnetlink: Add RTPROT entry for Netsukuku.
Alpt [Tue, 21 Mar 2006 06:26:17 +0000 (22:26 -0800)]
[NET] rtnetlink: Add RTPROT entry for Netsukuku.

The Netsukuku daemon is using the same number to mark its routes, you
can see it here:
http://hinezumilabs.org/cgi-bin/viewcvs.cgi/netsukuku/src/krnl_route.h?rev=HEAD&content-type=text/vnd.viewcvs-markup

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Move destructor from neigh->ops to neigh_params
Michael S. Tsirkin [Tue, 21 Mar 2006 06:25:41 +0000 (22:25 -0800)]
[NET]: Move destructor from neigh->ops to neigh_params

struct neigh_ops currently has a destructor field, which no in-kernel
drivers outside of infiniband use.  The infiniband/ulp/ipoib in-tree
driver stashes some info in the neighbour structure (the results of
the second-stage lookup from ARP results to real link-level path), and
it uses neigh->ops->destructor to get a callback so it can clean up
this extra info when a neighbour is freed.  We've run into problems
with this: since the destructor is in an ops field that is shared
between neighbours that may belong to different net devices, there's
no way to set/clear it safely.

The following patch moves this field to neigh_parms where it can be
safely set, together with its twin neigh_setup.  Two additional
patches in the patch series update ipoib to use this new interface.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Updates version.
Luiz Capitulino [Tue, 21 Mar 2006 06:25:05 +0000 (22:25 -0800)]
[PKTGEN]: Updates version.

Due to the thread's lock changes, we're at a new version now.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Removes thread_{un,}lock() macros.
Luiz Capitulino [Tue, 21 Mar 2006 06:24:45 +0000 (22:24 -0800)]
[PKTGEN]: Removes thread_{un,}lock() macros.

As suggested by Arnaldo, this patch replaces the
thread_lock()/thread_unlock() by directly calls to
mutex_lock()/mutex_unlock().

This change makes the code a bit more readable, and the direct calls
are used everywhere in the kernel.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Convert thread lock to mutexes.
Luiz Capitulino [Tue, 21 Mar 2006 06:24:27 +0000 (22:24 -0800)]
[PKTGEN]: Convert thread lock to mutexes.

pktgen's thread semaphores are strict mutexes, convert them to the
mutex implementation.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Convert RTNL to mutex.
Stephen Hemminger [Tue, 21 Mar 2006 06:23:58 +0000 (22:23 -0800)]
[NET]: Convert RTNL to mutex.

This patch turns the RTNL from a semaphore to a new 2.6.16 mutex and
gets rid of some of the leftover legacy.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPSEC] xfrm_user: Kill PAGE_SIZE check in verify_sec_ctx_len()
David S. Miller [Tue, 21 Mar 2006 06:23:35 +0000 (22:23 -0800)]
[IPSEC] xfrm_user: Kill PAGE_SIZE check in verify_sec_ctx_len()

First, it warns when PAGE_SIZE >= 64K because the ctx_len
field is 16-bits.

Secondly, if there are any real length limitations it can
be verified by the security layer security_xfrm_state_alloc()
call.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP] H-TCP: Better time accounting
Baruch Even [Tue, 21 Mar 2006 06:23:10 +0000 (22:23 -0800)]
[TCP] H-TCP: Better time accounting

Instead of estimating the time since the last congestion event, count
it directly.

Signed-off-by: Baruch Even <baruch@ev-en.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP] H-TCP: Account for delayed-ACKs
Baruch Even [Tue, 21 Mar 2006 06:22:47 +0000 (22:22 -0800)]
[TCP] H-TCP: Account for delayed-ACKs

Account for delayed-ACKs in H-TCP.

Delayed-ACKs cause H-TCP to be less aggressive than its design calls
for. It is especially true when the receiver is a Linux machine where
the average delayed ack is over 3 packets with values of 7 not unheard
of.

Signed-off-By: Baruch Even <baruch@ev-en.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP] H-TCP: Use msecs_to_jiffies
Baruch Even [Tue, 21 Mar 2006 06:22:20 +0000 (22:22 -0800)]
[TCP] H-TCP: Use msecs_to_jiffies

Use functions to calculate jiffies from milliseconds and not the old,
crude method of dividing HZ by a value. Ensures more accurate values
even in the face of strange HZ values.

Signed-off-By: Baruch Even <baruch@ev-en.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[CONNECTOR]: Use netlink_has_listeners() to avoind unnecessary allocations.
Evgeniy Polyakov [Tue, 21 Mar 2006 06:21:40 +0000 (22:21 -0800)]
[CONNECTOR]: Use netlink_has_listeners() to avoind unnecessary allocations.

Return -ESRCH from cn_netlink_send() when there are not listeners,
just as it could be done by netlink_broadcast().  Propagate
netlink_broadcast() error back to the caller.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IRDA]: TOIM3232 dongle support
David Basden [Tue, 21 Mar 2006 06:21:10 +0000 (22:21 -0800)]
[IRDA]: TOIM3232 dongle support

Here goes a patch for supporting TOIM3232 based serial IrDA dongles.
The code is based on the tekram dongle code.

It's been tested with a TOIM3232 based IRWave 320S dongle. It may work
for TOIM4232 dongles, although it's not been tested.

Signed-off-by: David Basden <davidb-irda@rcpt.to>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Updates version.
Luiz Capitulino [Tue, 21 Mar 2006 06:18:31 +0000 (22:18 -0800)]
[PKTGEN]: Updates version.

With all the previous changes, we're at a new version now.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Ports if_list to the in-kernel implementation.
Luiz Capitulino [Tue, 21 Mar 2006 06:18:16 +0000 (22:18 -0800)]
[PKTGEN]: Ports if_list to the in-kernel implementation.

This patch ports the per-thread interface list list to the in-kernel
linked list implementation. In the general, the resulting code is a
bit simpler.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Fix Initialization fail leak.
Luiz Capitulino [Tue, 21 Mar 2006 06:17:55 +0000 (22:17 -0800)]
[PKTGEN]: Fix Initialization fail leak.

Even if pktgen's thread initialization fails for all CPUs, the module
will be successfully loaded.

This patch changes that behaivor, by returning an error on module load time,
and also freeing all the resources allocated. It also prints a warning if a
thread initialization has failed.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Fix kernel_thread() fail leak.
Luiz Capitulino [Tue, 21 Mar 2006 06:17:00 +0000 (22:17 -0800)]
[PKTGEN]: Fix kernel_thread() fail leak.

Free all the alocated resources if kernel_thread() call fails.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Ports thread list to Kernel list implementation.
Luiz Capitulino [Tue, 21 Mar 2006 06:16:40 +0000 (22:16 -0800)]
[PKTGEN]: Ports thread list to Kernel list implementation.

The final result is a simpler and smaller code.

Note that I'm adding a new member in the struct pktgen_thread called
'removed'. The reason is that I didn't find a better wait condition to
be used in the place of the replaced one.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Lindent run.
Luiz Capitulino [Tue, 21 Mar 2006 06:16:13 +0000 (22:16 -0800)]
[PKTGEN]: Lindent run.

Lindet run, with some fixes made by hand.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] options: Fix some aspects of mandatory option processing
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:06:02 +0000 (22:06 -0800)]
[DCCP] options: Fix some aspects of mandatory option processing

According to dccp draft (draft-ietf-dccp-spec-13.txt) section 5.8.2
(Mandatory Option) the following patch correct the handling of the
following cases:

1) "... and any Mandatory options received on DCCP-Data packets MUST be
  ignored."

2) "The connection is in error and should be reset with Reset Code 5, ...
  if option O is absent (Mandatory was the last byte of the option list), or
  if option O equals Mandatory."

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] ccid2: coding style cleanups
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:05:37 +0000 (22:05 -0800)]
[DCCP] ccid2: coding style cleanups

No changes in the logic where made.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] ipv6: cleanups
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:01:29 +0000 (22:01 -0800)]
[DCCP] ipv6: cleanups

No changes in the logic were made, just removing trailing whitespaces,
etc.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ICSK]: Introduce inet_csk_ctl_sock_create
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:01:03 +0000 (22:01 -0800)]
[ICSK]: Introduce inet_csk_ctl_sock_create

Consolidating open coded sequences in tcp and dccp, v4 and v6.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] ipv6: Add missing ipv6 control socket
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 06:00:37 +0000 (22:00 -0800)]
[DCCP] ipv6: Add missing ipv6 control socket

I guess I forgot to add it, nah, now it just works:

18:04:33.274066 IP6 ::1.1476 > ::1.5001: request (service=0)
18:04:33.334482 IP6 ::1.5001 > ::1.1476: reset (code=bad_service_code)

Ditched IP_DCCP_UNLOAD_HACK, as now we would have to do it for both
IPv6 and IPv4, so I'll come up with another way for freeing the
control sockets in upcoming changesets.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Uninline some functions
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 05:58:56 +0000 (21:58 -0800)]
[DCCP]: Uninline some functions

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP] ipv4: make struct dccp_v4_prot static
Adrian Bunk [Tue, 21 Mar 2006 05:58:29 +0000 (21:58 -0800)]
[DCCP] ipv4: make struct dccp_v4_prot static

There's no reason for struct dccp_v4_prot being global.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Fix some code/comment formatting in ip6_dst_output().
David S. Miller [Tue, 21 Mar 2006 05:35:50 +0000 (21:35 -0800)]
[IPV6]: Fix some code/comment formatting in ip6_dst_output().

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: fib_trie stats fix
Robert Olsson [Tue, 21 Mar 2006 05:35:01 +0000 (21:35 -0800)]
[IPV4]: fib_trie stats fix

fib_triestats has been buggy and caused oopses some platforms as
openwrt.  The patch below should cure those problems.

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: fib_trie initialzation fix
Robert Olsson [Tue, 21 Mar 2006 05:34:12 +0000 (21:34 -0800)]
[IPV4]: fib_trie initialzation fix

In some kernel configs /proc functions seems to be accessed before the
trie is initialized. The patch below checks for this.

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Fix tg3_get_ringparam()
Michael Chan [Tue, 21 Mar 2006 05:33:42 +0000 (21:33 -0800)]
[TG3]: Fix tg3_get_ringparam()

Fix-up tg3_get_ringparam() to return the correct parameters.

Set the jumbo rx ring parameter only if it is supported by the chip
and currently in use.

Add missing value for tx_max_pending, noticed by Rick Jones.

Update version to 3.51.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Add some missing netif_running() checks
Michael Chan [Tue, 21 Mar 2006 05:33:26 +0000 (21:33 -0800)]
[TG3]: Add some missing netif_running() checks

Add missing netif_running() checks in tg3's dev->set_multicast_list()
and dev->set_mac_address(). If not netif_running(), these 2 calls can
simply return 0 after storing the new settings if required.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP] mtu probing: move tcp-specific data out of inet_connection_sock
John Heffner [Tue, 21 Mar 2006 05:32:58 +0000 (21:32 -0800)]
[TCP] mtu probing: move tcp-specific data out of inet_connection_sock

This moves some TCP-specific MTU probing state out of
inet_connection_sock back to tcp_sock.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AF_UNIX]: scm: better initialization
Benjamin LaHaise [Tue, 21 Mar 2006 05:31:51 +0000 (21:31 -0800)]
[AF_UNIX]: scm: better initialization

Instead of doing a memset then initialization of the fields of the scm
structure, just initialize all the members explicitly.  Prevent reloading
of current on x86 and x86-64 by storing the value in a local variable for
subsequent dereferences.  This is worth a ~7KB/s increase in af_unix
bandwidth.  Note that we avoid the issues surrounding potentially
uninitialized members of the ucred structure by constructing a struct
ucred instead of assigning the members individually, which forces the
compiler to zero any padding.

[ I modified the patch not to use the aggregate assignment since
  gcc-3.4.x and earlier cannot optimize that properly at all even
  though gcc-4.0.x and later can -DaveM ]

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AF_UNIX]: use shift instead of integer division
Benjamin LaHaise [Tue, 21 Mar 2006 05:29:05 +0000 (21:29 -0800)]
[AF_UNIX]: use shift instead of integer division

The patch below replaces a divide by 2 with a shift -- sk_sndbuf is an
integer, so gcc emits an idiv, which takes 10x longer than a shift by 1.
This improves af_unix bandwidth by ~6-10K/s.  Also, tidy up the comment
to fit in 80 columns while we're at it.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Uninline kfree_skb and allow NULL argument
Jörn Engel [Tue, 21 Mar 2006 05:28:35 +0000 (21:28 -0800)]
[NET]: Uninline kfree_skb and allow NULL argument

o Uninline kfree_skb, which saves some 15k of object code on my notebook.

o Allow kfree_skb to be called with a NULL argument.

  Subsequent patches can remove conditional from drivers and further
  reduce source and object size.

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[LLC]: Fix sap refcounting
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 05:28:11 +0000 (21:28 -0800)]
[LLC]: Fix sap refcounting

Thanks to Leslie Harlley Watter <leslie@watter.org> for reporting the
problem an testing this patch.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[LLC]: Replace __inline__ with inline
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 05:27:43 +0000 (21:27 -0800)]
[LLC]: Replace __inline__ with inline

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[LLC]: Fix struct proto .name
Arnaldo Carvalho de Melo [Tue, 21 Mar 2006 05:27:23 +0000 (21:27 -0800)]
[LLC]: Fix struct proto .name

Cut'n'paste error from ddp_proto.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET] pktgen: Fix races between control/worker threads.
Arthur Kepner [Tue, 21 Mar 2006 05:26:56 +0000 (21:26 -0800)]
[NET] pktgen: Fix races between control/worker threads.

There's a race in pktgen which can lead to a double
free of a pktgen_dev's skb. If a worker thread is in
the midst of doing fill_packet(), and the controlling
thread gets a "stop" message, the already freed skb
can be freed once again in pktgen_stop_device(). This
patch gives all responsibility for cleaning up a
pktgen_dev's skb to the associated worker thread.

Signed-off-by: Arthur Kepner <akepner@sgi.com>
Acked-by: Robert Olsson <Robert.Olsson@data.slu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Rearrange struct xfrm_aevent_id for better compatibility.
Jamal Hadi Salim [Tue, 21 Mar 2006 05:25:50 +0000 (21:25 -0800)]
[XFRM]: Rearrange struct xfrm_aevent_id for better compatibility.

struct xfrm_aevent_id needs to be 32-bit + 64-bit align friendly.

Based upon suggestions from Yoshifuji.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>