11 Feb, 2010
1 commit
-
Simplify seq_file code.
Signed-off-by: Li Zefan
Signed-off-by: David S. Miller
27 Jan, 2010
21 commits
-
Move "mpoa:%s: ", __func__/__FILE__ to #defines
Remove mpoa __func__/__FILE__ from dprintk uses
Add and use #define dprint_cont where appropriateSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Reduce indentation in lec_arp_check_expire
Indent a case label
Remove != NULL logical tests from while ((skb = foo())) assign and testsSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Mostly 80 column wrapped.
Move embedded assigns out of tests
Move trailing statements to new lines
switch/case cleanupsSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Spacing cleanups
Mostly 80 column wrapped.
Move embedded assigns out of tests
Move trailing statements to new lines
switch/case cleanupsSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Spacing cleanups
Mostly 80 column wrapped.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
Spacing cleanups
Mostly 80 column wrapped.
Move trailing statements to new linesSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Move embedded assigns out of tests
Move trailing statements to new lines
Move labels to column 1Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Convert #include pr_info and pr_cont
Moved labels to column 1
Move trailing statements to new lines
switch/case cleanups
remove unnecessary breaks after returns
Remove unnecessary braces around single line statementsSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Convert #include
Use print_hex_dump
Move embedded assigns out of tests
Move trailing statements to new lines
Remove unnecessary braces around single line statements
switch/case cleanups
Removed paren around returns
Use %pM
Moved leading continuation logical tests to end of previous lineSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Spacing cleanups
Moved EXPORT_SYMBOL
Mostly 80 column wrapped.
switch/case cleanupsSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Convert #include
Signed-off-by: David S. Miller -
Add space after for
Indent switch/case statements
80 column wrappingSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Moved EXPORT_SYMBOL to follow definition
Add space after commasSigned-off-by: Joe Perches
Signed-off-by: David S. Miller -
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
Remove function names from output
Use single line pr_debug instead of broken multiple uses without newlineSigned-off-by: Joe Perches
Signed-off-by: David S. Miller
09 Dec, 2009
2 commits
-
in routed mode, we don't have a hardware address so netdev_ops doesnt
need to validate our hardware address via .ndo_validate_addrReported-by: Manuel Fuentes
Signed-off-by: Chas Williams - CONTRACTOR
Signed-off-by: David S. Miller -
fix oops when initializing lane interfaces. lec should probably be
changed to use alloc_netdev() instead.Signed-off-by: Chas Williams - CONTRACTOR
Signed-off-by: David S. Miller
26 Nov, 2009
1 commit
-
Generated with the following semantic patch
@@
struct net *n1;
struct net *n2;
@@
- n1 == n2
+ net_eq(n1, n2)@@
struct net *n1;
struct net *n2;
@@
- n1 != n2
+ !net_eq(n1, n2)applied over {include,net,drivers/net}.
Signed-off-by: Octavian Purdila
Signed-off-by: David S. Miller
12 Nov, 2009
1 commit
-
We have two implementations of the compat_ioctl handling for ATM, the
one that we have had for ages in fs/compat_ioctl.c and the one added to
net/atm/ioctl.c by David Woodhouse. Unfortunately, both versions are
incomplete, and in practice we use a very confusing combination of the
two.For ioctl numbers that have the same identifier on 32 and 64 bit systems,
we go directly through the compat_ioctl socket operation, for those thatdiffer, we do a conversion in fs/compat_ioctl.c.
This patch moves both variants into the vcc_compat_ioctl() function,
while preserving the current behaviour. It also kills off the COMPATIBLE_IOCTL
definitions that we never use here.
Doing it this way is clearly not a good solution, but I hope it is a
step into the right direction, so that someone is able to clean up this
mess for real.Signed-off-by: Arnd Bergmann
Cc: Eric Dumazet
Cc: David Woodhouse
Signed-off-by: David S. Miller
06 Nov, 2009
1 commit
-
The generic __sock_create function has a kern argument which allows the
security system to make decisions based on if a socket is being created by
the kernel or by userspace. This patch passes that flag to the
net_proto_family specific create function, so it can do the same thing.Signed-off-by: Eric Paris
Acked-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller
13 Oct, 2009
1 commit
-
Create a new socket level option to report number of queue overflows
Recently I augmented the AF_PACKET protocol to report the number of frames lost
on the socket receive queue between any two enqueued frames. This value was
exported via a SOL_PACKET level cmsg. AFter I completed that work it was
requested that this feature be generalized so that any datagram oriented socket
could make use of this option. As such I've created this patch, It creates a
new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
overflowed between any two given frames. It also augments the AF_PACKET
protocol to take advantage of this new feature (as it previously did not touch
sk->sk_drops, which this patch uses to record the overflow count). Tested
successfully by me.Notes:
1) Unlike my previous patch, this patch simply records the sk_drops value, which
is not a number of drops between packets, but rather a total number of drops.
Deltas must be computed in user space.2) While this patch currently works with datagram oriented protocols, it will
also be accepted by non-datagram oriented protocols. I'm not sure if thats
agreeable to everyone, but my argument in favor of doing so is that, for those
protocols which aren't applicable to this option, sk_drops will always be zero,
and reporting no drops on a receive queue that isn't used for those
non-participating protocols seems reasonable to me. This also saves us having
to code in a per-protocol opt in mechanism.3) This applies cleanly to net-next assuming that commit
977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is revertedSigned-off-by: Neil Horman
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
07 Oct, 2009
1 commit
-
All usages of structure net_proto_ops should be declared const.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
01 Oct, 2009
1 commit
-
This provides safety against negative optlen at the type
level instead of depending upon (sometimes non-trivial)
checks against this sprinkled all over the the place, in
each and every implementation.Based upon work done by Arjan van de Ven and feedback
from Linus Torvalds.Signed-off-by: David S. Miller
03 Sep, 2009
1 commit
-
…we can send packets again.
This patch removes the call to dev_kfree_skb() when the atm device is busy.
Calling dev_kfree_skb() causes heavy packet loss then the device is under
heavy load, the more correct behavior should be to stop the upper layers,
then when the lower device can queue packets again wake the upper layers.Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
02 Sep, 2009
1 commit
-
These tables are never modified at runtime. Move to read-only
section.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
01 Sep, 2009
1 commit
-
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
06 Aug, 2009
1 commit
-
String literals are constant, and usually, we can also tag the array
of pointers const too, moving it to the .rodata section.Signed-off-by: Jan Engelhardt
Signed-off-by: David S. Miller
10 Jul, 2009
2 commits
-
Adding memory barrier after the poll_wait function, paired with
receive callbacks. Adding fuctions sock_poll_wait and sk_has_sleeper
to wrap the memory barrier.Without the memory barrier, following race can happen.
The race fires, when following code paths meet, and the tp->rcv_nxt
and __add_wait_queue updates stay in CPU caches.CPU1 CPU2
sys_select receive packet
... ...
__add_wait_queue update tp->rcv_nxt
... ...
tp->rcv_nxt check sock_def_readable
... {
schedule ...
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible(sk->sk_sleep)
...
}If there was no cache the code would work ok, since the wait_queue and
rcv_nxt are opposit to each other.Meaning that once tp->rcv_nxt is updated by CPU2, the CPU1 either already
passed the tp->rcv_nxt check and sleeps, or will get the new value for
tp->rcv_nxt and will return with new data mask.
In both cases the process (CPU1) is being added to the wait queue, so the
waitqueue_active (CPU2) call cannot miss and will wake up CPU1.The bad case is when the __add_wait_queue changes done by CPU1 stay in its
cache, and so does the tp->rcv_nxt update on CPU2 side. The CPU1 will then
endup calling schedule and sleep forever if there are no more data on the
socket.Calls to poll_wait in following modules were ommited:
net/bluetooth/af_bluetooth.c
net/irda/af_irda.c
net/irda/irnet/irnet_ppp.c
net/mac80211/rc80211_pid_debugfs.c
net/phonet/socket.c
net/rds/af_rds.c
net/rfkill/core.c
net/sunrpc/cache.c
net/sunrpc/rpc_pipe.c
net/tipc/socket.cSigned-off-by: Jiri Olsa
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
06 Jul, 2009
2 commits
-
This patch converts the remaining occurences of raw return values to their
symbolic counterparts in ndo_start_xmit() functions that were missed by the
previous automatic conversion.Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero
is changed to explicitly use NETDEV_TX_OK.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
18 Jun, 2009
1 commit
-
commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
(net: No more expensive sock_hold()/sock_put() on each tx)
changed initial sk_wmem_alloc value.This broke net/atm since this protocol assumed a null
initial value. This patch makes necessary changes.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
13 Jun, 2009
1 commit
-
Fix up ATM drivers that return an errno value to qdisc_restart(), causing
qdisc_restart() to print a warning an requeue/retransmit the skb.- lec: condition can only be remedied by userspace, until that retransmissions
Compile tested only.
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller