| Age | Commit message (Collapse) | Author |
|
Place them on separate cache lines in SMP to lower memory bouncing
between multiple CPU accessing the device.
- One part is mostly used on receive path (including
eth_type_trans()) (poll_list, poll, quota, weight, last_rx,
dev_addr, broadcast)
- One part is mostly used on queue transmit path (qdisc)
(queue_lock, qdisc, qdisc_sleeping, qdisc_list, tx_queue_len)
- One part is mostly used on xmit path (device)
(xmit_lock, xmit_lock_owner, priv, hard_start_xmit, trans_start)
'features' is placed outside of these hot points, in a location that
may be shared by all cpus (because mostly read)
name_hlist is moved close to name[IFNAMSIZ] to speedup __dev_get_by_name()
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This patch adds a new field to net device to hold the permanent
hardware address, and adds a new generic ethtool_op function to
get that address.
Signed-off-by: Jon Wetzel <jon_wetzel@dell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Of this type, mostly:
CHECK net/ipv6/netfilter.c
net/ipv6/netfilter.c:96:12: warning: symbol 'ipv6_netfilter_init' was not declared. Should it be static?
net/ipv6/netfilter.c:101:6: warning: symbol 'ipv6_netfilter_fini' was not declared. Should it be static?
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
# grep -r 'netif_carrier_o[nf]' linux-2.6.12 | wc -l
246
# size vmlinux.org vmlinux.carrier
text data bss dec hex filename
4339634 1054414 259296 5653344 564360 vmlinux.org
4337710 1054414 259296 5651420 563bdc vmlinux.carrier
And this ain't an allyesconfig kernel!
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
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>
|
|
Eliminate the throttling behaviour when the netif receive queue fills
because it behaves badly when using high speed networks under load.
The throttling cause multiple packet drops that cause TCP to go into
slow start mode. The same effective patch has been part of BIC TCP and
H-TCP as well as part of Web100.
The existing code drops 100's of packets when the queue fills;
this changes it to individual packet drop-tail.
Signed-off-by: Stephen Hemmminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Remove the congestion sensing mechanism from netif_rx, and always
return either full or empty. Almost no driver checks the return value
from netif_rx, and those that do only use it for debug messages.
The original design of netif_rx was to do flow control based on the
receive queue, but NAPI has supplanted this and no driver uses the
feedback.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Remove last vestiages of fastroute code that is no longer used.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This patch creates a new kstrdup library function and changes the "local"
implementations in several places to use this function.
Most of the changes come from the sound and net subsystems. The sound part
had already been acknowledged by Takashi Iwai and the net part by David S.
Miller.
I left UML alone for now because I would need more time to read the code
carefully before making changes there.
Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch introduces a netpoll_info structure, which the struct net_device
will now point to instead of pointing to a struct netpoll. The reason for
this is two-fold: 1) fields such as the rx_flags, poll_owner, and poll_lock
should be maintained per net_device, not per netpoll; and 2) this is a first
step in providing support for multiple netpoll clients to register against the
same net_device.
The struct netpoll is now pointed to by the netpoll_info structure. As
such, the previous behaviour of the code is preserved.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
When the hardware header size is a multiple of HH_DATA_MOD, HH_DATA_OFF()
incorrectly returns HH_DATA_MOD (instead of 0). This affects ieee80211 layer
as 802.11 header is 32 bytes long.
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The features field in netdevice is really a bitmask, and bitmask's should
be unsigned.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Resend of earlier patch (no changes) from Catalin used to provide
device feature change notification.
Signed-off-by: Catalin BOIE <catab at umbrella.ro>
Acked-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Everybody does
struct packet_type foo_packet_type = {
.type = __constant_htons(ETH_P_FOO);
};
5 introduced warnings will be properly fixed later.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Ross moved. Remove the bad email address so people will find the correct
one in ./CREDITS.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Add struct netpoll pointer to struct netdevice
Move netpoll rx flags to netpoll struct
Stop traversing rx_list and get np pointer from skb->dev->np
Remove now unneeded rx_list
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Trivial reordering of netdevice structure to save four bytes.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Never called AFAICS, and only assigned -- to a no-op stub -- in
one driver.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The following definitions are historical relics.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This moves the SIOCSIFHWADDR code from dev_ifsioc() into a
separate new function, dev_set_mac_address(). This provides a single
entry point for all callers performing MAC address changes.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
|
|
|
|
When drivers other than loopback were using the LLTX
feature a race window was present. While sending
queued packets, the packet scheduler layer drops the
queue lock then calls directly into the drivers xmit
handler. The driver then grabs it's private TX lock
and goes to work.
However, as soon as we've dropped the queue lock another
thread doing TX processing for that card can execute
a netif_stop_queue() due to the TX queue filling up.
This race window causes problems because a properly coded
driver should never end up in it's ->hard_start_xmit()
handler if the queue on the device has been stopped and
we even BUG() trap for this condition in all of the device
drivers. That is how this race window was discovered
by Roland and the Infiniband folks.
Various suggestions were made to close this race. One
of which involved holding onto the queue lock all the
way into the ->hard_start_xmit() routine. Then having
the driver drop that lock only after taking it's private
TX lock. This solution was deemed grotty because it is
not wise to put queueing discipline internals into the
device drivers.
The solution taken here, which is based upon ideas from
Stephen Hemminger, is twofold:
1) Leave LLTX around for purely software devices that
need no locking at all for TX processing. The existing
example is loopback, although all tunnel devices could
be converted in this way too.
2) Stop trying to use LLTX for the other devices. Instead
achieve the same goal using a different mechanism.
For #2, the thing we were trying to achieve with LLTX
was to eliminate excess locking. We accomplish that
now by letting the device driver use dev->xmit_lock directly
instead of a seperate priv->tx_lock of some sort.
In order to allow that, we had to turn dev->xmit_lock into
a hardware IRQ disabling lock instead of a BH disabling one.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
- put a dev_id field in struct net_device, so that it uses space that
would be wasted by padding otherwise.
- if this fields is non-null let ipv6_generate_eui64 use the algorithm
from the QETH code to generate an EUI that's different for each
OS instance. See code comments for details.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The patch below contains the following cleanups:
- make needlessly global code static
- remove the following unused global functions:
- datagram.c: skb_copy_datagram
- iovec.c: memcpy_tokerneliovec
- remove the following unneeded EXPORT_SYMBOL's:
- datagram.c: skb_copy_datagram
- dev.c: ing_filter
- iovec.c: memcpy_tokerneliovec
- netpoll.c: netpoll_send_skb
- rtnetlink.c: rtnetlink_dump_ifinfo
- sock.c: sock_alloc_send_pskb
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
into coreworks.de:/home/kaber/src/nf/nf-2.6
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
CONFIG_NET_HW_FLOWCONTROL is entirely unused now, and superceded by NAPI in
practice, so remove the dead code
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
|
|
Since skb_checksum_help has been using pskb_expand_head for a while
now without any ill effects, I thought it would be a good idea to
remove the double pointers from it and its callers.
This is what the following patch does. The only 'rider' bit is the
removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding
assignment was only added because the following function oopsed so
there is no point in doing BUG_ON.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
It expands to a lot of code when SMP or PREEMPT is
enabled.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
into pobox.com:/spare/repo/net-drivers-2.6
|
|
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Old debugging code we no longer need.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
This patch removes CONFIG_NETPOLL_RX, as discussed.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
This is the patch to migrate Wireless Extension from WE-16 to
WE-17 for kernel 2.6.X. I would like you to queue that patch and
submit it to Linus as soon as 2.6.8 is released (so it can be fully
tested during 2.6.9). If you want, I can resend that as soon as 2.6.8
is released.
The patch is basically unchanged compared to the version
posted to the netdev list and my web page one month ago, I just
re-diff to the latest kernel (2.6.8-rc2-bk12). The patch already
included feedback from various driver maintainers, and nobody else
complained, so I guess it's ready.
The patch for some drivers inside the kernel will follow
(airo.c, wavelan.c, wavelan_cs). Patch for various other drivers
(orinoco, hostap, prism54) have been sent already to their maintainers
(one month ago) and basically waiting for this patch.
Changelog :
* - Add flags to frequency -> auto/fixed
* - Document (struct iw_quality *)->updated, add new flags (INVALID)
* - Wireless Event capability in struct iw_range
* - Add support for relative TxPower (yick !)
* - Change the way we get to spy_data method for added safety and hostap
* - Remove spy #ifdef, they are always on -> cleaner code
* - Allow any size GET request if user specifies length > max
* - Start migrating get_wireless_stats to struct iw_handler_def
* Based on patch from Pavel Roskin <proski@gnu.org> :
* - Fix kernel data leak to user space in private handler handling
I also added on my page a version of Wireless Tools that use
RtNetlink instead of ioctls. This is not as clean as I would like, but
is fully functional (if you have WE-19). I know that you were
interested, so feel free to send feedback on that...
Signed-off-by: Andrew Morton <akpm@osdl.org>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Based up suggestion/changes from Jeff Garzik.
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
|
|
|
|
|
|
Signed-off-by: Jamal Hadi Salim <hadi@znyx.com>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
hook.
In a nutshell, skb checksum mangling has been removed from
nf_hook_slow() and pushed up to whatever really needs to do it.
Namely: NAT, ip_fw_compat, ipt_TCPMSS, IPSec transforms.
skb_checksum_help() has been changed to perform an skb_copy() if needed
(e.g. the original problem case where bcast/mcast was cloning packets for
transmission over loopback, changing ip_summed).
Because of the above, the output path has been modified to take into
account the fact that an skb may need to be changed in some places. There
are some minor changes in the routing code to take care of the now
different input and output function prototypes. The ipv6 fragmentation
code has been modified to detect a changed skb.
The rest of the patch (probably the bulk of it) is simply the result of
changing to double skb pointers.
I've tested this with ipv4, ipv6, ipsec (including xfrm bundles), NAT and
the original DHCP test case. Everything seems to be working ok.
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Fixed the type of SIOCGIFCONF callback; inet instance was already
correctly annotated, decnet one was _not_. Moreover, decnet callback
needed fixing - dereferencing userland address.
|
|
dev_ioctl() has a __user pointer argument; however, its declaration
lacks that and callers are also wrong. Declaration fixed, callers updated.
|
|
|