26 Mar, 2008
3 commits
-
Add ieee80211_get_channel() which gets you a channel struct for a
specific wiphy if that channel is present in that wiphy.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
This patch makes mac80211 able to send a phase1 key for TKIP
decryption.
This is needed for drivers that don't do the rekeying by themselves
(i.e. iwlwifi). Upon IV16 wrap around, the packet is decrypted in SW,
if decryption is ok, mac80211 calls to update_tkip_key with a new
phase 1 RX key.Signed-off-by: Emmanuel Grumbach
Signed-off-by: Tomas Winkler
Signed-off-by: John W. Linville -
This patch makes mac80211 able to compute a TKIP key from an skb.
The requested key can be a phase 1 or a phase 2 key.
This is useful for drivers who need to provide tkip key to their
HW to enable HW encryption.Signed-off-by: Emmanuel Grumbach
Signed-off-by: Tomas Winkler
Signed-off-by: John W. Linville
24 Mar, 2008
9 commits
-
Conflicts:
net/ipv6/ndisc.c
-
sctp_datamsg_free and sctp_datamsg_track are just aliases for
sctp_datamsg_put and sctp_chunk_hold, respectively.Saves 32 Bytes on x86.
Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller -
133886 2004 220 136110 213ae sctp.new/sctp.o
134018 2004 220 136242 21432 sctp.old/sctp.oSigned-off-by: Florian Westphal
Signed-off-by: David S. Miller -
Make /proc/net/fib_trie and /proc/net/fib_triestat display
all routing tables, not just local and main.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Olsa
Signed-off-by: David S. Miller -
the first u32 copied from syncookie_secret is overwritten by the
minute-counter four lines below. After adjusting the destination
address, the size of syncookie_secret can be reduced accordingly.AFAICS, the only other user of syncookie_secret[] is the ipv6
syncookie support. Because ipv6 syncookies only grab 44 bytes from
syncookie_secret[], this shouldn't affect them in any way.With fixes from Glenn Griffin.
Signed-off-by: Florian Westphal
Acked-by: Glenn Griffin
Signed-off-by: David S. Miller -
HTB is event driven algorithm and part of its work is to apply
scheduled events at proper times. It tried to defend itself from
livelock by processing only limited number of events per dequeue.
Because of faster computers some users already hit this hardcoded
limit.This patch limits processing up to 2 jiffies (why not 1 jiffie ?
because it might stop prematurely when only fraction of jiffie
remains).Signed-off-by: Martin Devera
Signed-off-by: David S. Miller -
This patches removes unused code in ndisc_send_redirect() method in
net/ipv6/ndisc.c.Signed-off-by: Rami Rosen
Signed-off-by: David S. Miller -
Signed-off-by: Wang Chen
Signed-off-by: David S. Miller
23 Mar, 2008
12 commits
-
The variable cb is initialized but never used otherwise.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
type T;
identifier i;
constant C;
@@(
extern T i;
|
- T i;
)
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller -
The variable hlen is initialized but never used otherwise.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
type T;
identifier i;
constant C;
@@(
extern T i;
|
- T i;
)
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller -
This gets rid of a warning caused by the test in rcu_assign_pointer.
I tried to fix rcu_assign_pointer, but that devolved into a long set
of discussions about doing it right that came to no real solution.
Since the test in rcu_assign_pointer for constant NULL would never
succeed in fib_trie, just open code instead.Signed-off-by: Stephen Hemminger
Acked-by: Paul E. McKenney
Signed-off-by: David S. Miller -
The route table parameters are set based on system memory and sysctl
values that almost never change. Also the genid only changes every
10 minutes.RTprint is defined by never used.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Just remove it.
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Sorry for the patch sequence confusion :| but I found that the similar
thing can be done for raw sockets easily too late.Expand the proto.h union with the raw_hashinfo member and use it in
raw_prot and rawv6_prot. This allows to drop the protocol specific
versions of hash and unhash callbacks.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
After this we have only udp_lib_get_port to get the port and two
stubs for ipv4 and ipv6. No difference in udp and udplite except
for initialized h.udp_hash member.I tried to find a graceful way to drop the only difference between
udp_v4_get_port and udp_v6_get_port (i.e. the rcv_saddr comparison
routine), but adding one more callback on the struct proto didn't
appear such :( Maybe later.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Inspired by the commit ab1e0a13 ([SOCK] proto: Add hashinfo member to
struct proto) from Arnaldo, I made similar thing for UDP/-Lite IPv4
and -v6 protocols.The result is not that exciting, but it removes some levels of
indirection in udpxxx_get_port and saves some space in code and text.The first step is to union existing hashinfo and new udp_hash on the
struct proto and give a name to this union, since future initialization
of tcpxxx_prot, dccp_vx_protinfo and udpxxx_protinfo will cause gcc
warning about inability to initialize anonymous member this way.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This makes code a bit more uniform and straigthforward.
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
ip_options->is_data is assigned only and never checked. The structure is
not a part of kernel interface to the userspace. So, it is safe to remove
this field.Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
There is the only way to reach ip_options compile with opt != NULL:
ip_options_get_finish
opt->is_data = 1;
ip_options_compile(opt, NULL)So, checking for is_data inside opt != NULL branch is not needed.
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
While testing the virtio-net driver on KVM with TSO I noticed
that TSO performance with a 1500 MTU is significantly worse
compared to the performance of non-TSO with a 16436 MTU. The
packet dump shows that most of the packets sent are smaller
than a page.Looking at the code this actually is quite obvious as it always
stop extending the packet if it's the first packet yet to be
sent and if it's larger than the MSS. Since each extension is
bound by the page size, this means that (given a 1500 MTU) we're
very unlikely to construct packets greater than a page, provided
that the receiver and the path is fast enough so that packets can
always be sent immediately.The fix is also quite obvious. The push calls inside the loop
is just an optimisation so that we don't end up doing all the
sending at the end of the loop. Therefore there is no specific
reason why it has to do so at MSS boundaries. For TSO, the
most natural extension of this optimisation is to do the pushing
once the skb exceeds the TSO size goal.This is what the patch does and testing with KVM shows that the
TSO performance with a 1500 MTU easily surpasses that of a 16436
MTU and indeed the packet sizes sent are generally larger than
16436.I don't see any obvious downsides for slower peers or connections,
but it would be prudent to test this extensively to ensure that
those cases don't regress.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
22 Mar, 2008
7 commits
-
Change TCP_DEFER_ACCEPT implementation so that it transitions a
connection to ESTABLISHED after handshake is complete instead of
leaving it in SYN-RECV until some data arrvies. Place connection in
accept queue when first data packet arrives from slow path.Benefits:
- established connection is now reset if it never makes it
to the accept queue- diagnostic state of established matches with the packet traces
showing completed handshake- TCP_DEFER_ACCEPT timeouts are expressed in seconds and can now be
enforced with reasonable accuracy instead of rounding up to next
exponential back-off of syn-ack retry.Signed-off-by: Patrick McManus
Signed-off-by: David S. Miller -
a socket in LISTEN that had completed its 3 way handshake, but not notified
userspace because of SO_DEFER_ACCEPT, would retransmit the already
acked syn-ack during the time it was waiting for the first data byte
from the peer.Signed-off-by: Patrick McManus
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
timeout associated with SO_DEFER_ACCEPT wasn't being honored if it was
less than the timeout allowed by the maximum syn-recv queue size
algorithm. Fix by using the SO_DEFER_ACCEPT value if the ack has
arrived.Signed-off-by: Patrick McManus
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
This is a narrow pedantry :) but the dlci_ioctl_hook check and call
should not be parted with the mutex lock.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Commits f40c81 ([NETNS][IPV4] tcp - make proc handle the network
namespaces) and a91275 ([NETNS][IPV6] udp - make proc handle the
network namespace) both introduced bad checks on sockets and tw
buckets to belong to proper net namespace.I.e. when checking for socket to belong to given net and family the
do {
sk = sk_next(sk);
} while (sk && sk->sk_net != net && sk->sk_family != family);constructions were used. This is wrong, since as soon as the
sk->sk_net fits the net the socket is immediately returned, even if it
belongs to other family.As the result four /proc/net/(udp|tcp)[6] entries show wrong info.
The udp6 entry even oopses when dereferencing inet6_sk(sk) pointer:static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket)
{
...
struct ipv6_pinfo *np = inet6_sk(sp);
...dest = &np->daddr; /* will be NULL for AF_INET sockets */
...
seq_printf(...
dest->s6_addr32[0], dest->s6_addr32[1],
dest->s6_addr32[2], dest->s6_addr32[3],
...Fix it by converting && to ||.
Signed-off-by: Pavel Emelyanov
Acked-by: Daniel Lezcano
Signed-off-by: David S. Miller -
Make socket filters work for netlink unicast and notifications.
This is useful for applications like Zebra that get overrun with
messages that are then ignored.Note: netlink messages are in host byte order, but packet filter
state machine operations are done as network byte order.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Been seeing occasional panics in my testing of 2.6.25-rc in ip_defrag.
Offending line in ip_defrag is here:net = skb->dev->nd_net
where dev is NULL. Bisected the problem down to commit
ac18e7509e7df327e30d6e073a787d922eaf211d ([NETNS][FRAGS]: Make the
inet_frag_queue lookup work in namespaces).Below patch (idea from Patrick McHardy) fixes the problem for me.
Signed-off-by: Phil Oester
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller
21 Mar, 2008
9 commits
-
Make the proc for tcp6 to be per namespace.
Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
The proc init/exit functions take a new network namespace parameter in
order to register/unregister /proc/net/udp6 for a namespace.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch, like udp proc, makes the proc functions to take care of
which namespace the socket belongs.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
Copy the network namespace from the socket to the timewait socket.
Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the common udp proc functions to take care of which
socket they should show taking into account the namespace it belongs.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
When CONFIG_PROC_FS=no, the out_sock_create label is not used because
the code using it is disabled and that leads to a warning at compile
time.This patch fix that by making a specific function to initialize proc
for igmp6, and remove the annoying CONFIG_PROC_FS sections in
init/exit function.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
Update: My mailer ate one of Jarek's feedback mails... Fixed the
parameter in netif_set_gso_max_size() to be u32, not u16. Fixed the
whitespace issue due to a patch import botch. Changed the types from
u32 to unsigned int to be more consistent with other variables in the
area. Also brought the patch up to the latest net-2.6.26 tree.Update: Made gso_max_size container 32 bits, not 16. Moved the
location of gso_max_size within netdev to be less hotpath. Made more
consistent names between the sock and netdev layers, and added a
define for the max GSO size.Update: Respun for net-2.6.26 tree.
Update: changed max_gso_frame_size and sk_gso_max_size from signed to
unsigned - thanks Stephen!This patch adds the ability for device drivers to control the size of
the TSO frames being sent to them, per TCP connection. By setting the
netdevice's gso_max_size value, the socket layer will set the GSO
frame size based on that value. This will propogate into the TCP
layer, and send TSO's of that size to the hardware.This can be desirable to help tune the bursty nature of TSO on a
per-adapter basis, where one may have 1 GbE and 10 GbE devices
coexisting in a system, one running multiqueue and the other not, etc.This can also be desirable for devices that cannot support full 64 KB
TSO's, but still want to benefit from some level of segmentation
offloading.Signed-off-by: Peter P Waskiewicz Jr
Signed-off-by: David S. Miller -
Based on notice from "Colin" .
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller