OSDN Git Service
David S. Miller [Mon, 9 May 2011 22:13:28 +0000 (15:13 -0700)]
ipv4: xfrm: Eliminate ->rt_src reference in policy code.
Rearrange xfrm4_dst_lookup() so that it works by calling a helper
function __xfrm_dst_lookup() that takes an explicit flow key storage
area as an argument.
Use this new helper in xfrm4_get_saddr() so we can fetch the selected
source address from the flow instead of from rt->rt_src
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 21:52:02 +0000 (14:52 -0700)]
infiniband: Remove rt->rt_src usage in addr4_resolve()
Use an explicit flow key and fetch it from there.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 21:49:13 +0000 (14:49 -0700)]
sctp: Remove rt->rt_src usage in sctp_v4_get_saddr()
Flow key is available, so fetch it from there.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 20:31:04 +0000 (13:31 -0700)]
ipv4: udp: Eliminate remaining uses of rt->rt_src
We already track and pass around the correct flow key,
so simply use it in udp_send_skb().
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 20:28:22 +0000 (13:28 -0700)]
ipv4: icmp: Eliminate remaining uses of rt->rt_src
On input packets, rt->rt_src always equals ip_hdr(skb)->saddr
Anything that mangles or otherwise changes the IP header must
relookup the route found at skb_rtable(). Therefore this
invariant must always hold true.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 20:22:43 +0000 (13:22 -0700)]
ipv4: Pass explicit daddr arg to ip_send_reply().
This eliminates an access to rt->rt_src.
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 9 May 2011 09:45:23 +0000 (09:45 +0000)]
tulip: Use pr_<level> where appropriate
Use the current logging styles.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 9 May 2011 09:45:22 +0000 (09:45 +0000)]
tulip: Convert uses of KERN_DEBUG
Convert logging messages to more current styles.
Added -DDEBUG to Makefile to maintain current message logging.
This could be converted to a specific CONFIG_TULIP_DEBUG option.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 9 May 2011 09:45:21 +0000 (09:45 +0000)]
tulip: Convert printks to netdev_<level>
Use the current more descriptive logging styles.
Add pr_fmt and remove PFX where appropriate.
Use netif_<level>, netdev_<level>
Indent a few blocks in xircom_cb where appropriate.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 9 May 2011 09:45:20 +0000 (09:45 +0000)]
tulip: xircom_cb: Convert #ifdef DEBUG blocks and enter/leave uses
Change the blocks that are guarded by #if DEBUG to
be #if defined DEBUG && DEBUG > 1 so that pr_debug
can be used later.
Remove enter/leave macros and uses.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 19:48:05 +0000 (12:48 -0700)]
Merge branch 'davem-next.r8169' of git://git./linux/kernel/git/romieu/netdev-2.6
Alexey Dobriyan [Sat, 7 May 2011 23:00:07 +0000 (23:00 +0000)]
net: add mac_pton() for parsing MAC address
mac_pton() parses MAC address in form XX:XX:XX:XX:XX:XX and only in that form.
mac_pton() doesn't dirty result until it's sure string representation is valid.
mac_pton() doesn't care about characters _after_ last octet,
it's up to caller to deal with it.
mac_pton() diverges from 0/-E return value convention.
Target usage:
if (!mac_pton(str, whatever->mac))
return -EINVAL;
/* ->mac being u8 [ETH_ALEN] is filled at this point. */
/* optionally check str[3 * ETH_ALEN - 1] for termination */
Use mac_pton() in pktgen and netconsole for start.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Sat, 7 May 2011 20:33:13 +0000 (20:33 +0000)]
netconsole: switch to kstrto*() functions
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michał Mirosław [Sat, 7 May 2011 01:48:02 +0000 (01:48 +0000)]
net: bonding: factor out rlock(bond->lock) in xmit path
Pull read_lock(&bond->lock) and BOND_IS_OK() to bond_start_xmit() from
mode-dependent xmit functions.
netif_running() is always true in hard_start_xmit.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Francois Romieu [Sun, 8 May 2011 15:47:36 +0000 (17:47 +0200)]
r8169: avoid late chip identifier initialisation.
Unknown 8168 chips did not have any PLL power method set as they
did not inherit a default family soon enough. Fix it.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Francois Romieu [Wed, 27 Apr 2011 06:22:39 +0000 (08:22 +0200)]
r8169: merge firmware information into the chipset description data.
- RTL_GIGA_MAC_NONE is a fake index so put it at the end of the
enumeration and shift everybody.
- RTL_GIGA_MAC_VER_17 / RTL_GIGA_MAC_VER_16 ordering fixed. Though
not wrong it was confusing enough to wonder if things were right.
Renaming rtl_chip_info was not strictly necessary. It allows to
check the patch for the correct use of the indexes though.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Francois Romieu [Tue, 26 Apr 2011 16:58:59 +0000 (18:58 +0200)]
r8169: provide some firmware information via ethtool.
There is no real firmware version yet but the manpage of ethtool
is rather terse about the driver information.
Former output:
$ ethtool -i eth1
driver: r8169
version: 2.3LK-NAPI
firmware-version:
bus-info: 0000:01:00.0
$ ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version:
bus-info: 0000:03:00.0
Current output:
$ ethtool -i eth1
driver: r8169
version: 2.3LK-NAPI
firmware-version: N/A
bus-info: 0000:01:00.0
$ ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version: rtl_nic/rtl8168d-1.fw
bus-info: 0000:03:00.0
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Fixed-by Ciprian Docan <docan@eden.rutgers.edu>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Cc: Fejes József <fejes@joco.name>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Francois Romieu [Tue, 15 Mar 2011 16:29:31 +0000 (17:29 +0100)]
r8169: remove non-NAPI context invocation of rtl8169_rx_interrupt.
Invocation of rtl8169_rx_interrupt from rtl8169_reset_task was originally
intended to retrieve as much packets as possible from the rx ring when a
reset was needed. Nowadays rtl8169_reset_task is only scheduled, with
some delay
a. from the tx timeout watchdog
b. when resuming
c. from rtl8169_rx_interrupt itself
It's dubious that the loss of outdated packets will matter much for a)
and b). c) does not need to call itself again.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Francois Romieu [Fri, 11 Mar 2011 20:07:11 +0000 (21:07 +0100)]
r8169: link speed selection timer rework.
The implementation was a bit krusty.
The 10s rtl8169_phy_timer timer has been (was ?) required with older
8169 for adequate phy operation when full gigabit is advertised in
autonegotiated mode. The timer does nothing if the link is up.
Otherwise it keeps resetting the phy until things improve.
- the device private data field phy_1000_ctrl_reg was used to
schedule the timer. Avoid it and save a few bytes.
- rtl8169_set_settings
pending timer is disabled before changing the link settings as
rtl8169_phy_timer is not always needed (see the removed test in
rtl8169_phy_timer).
- rtl8169_set_speed
the requested link parameters may not match the chipset : bail out
early on failure.
- rtl8169_open
Calling rtl8169_request_timer is redundant with
-> rtl8169_open
-> rtl8169_init_phy
-> rtl8169_set_speed
-> mod_timer
The latter always enables the phy timer whereas the former did not
for RTL_GIGA_MAC_VER_01. It should not make things worse but only
time will tell if reality agrees.
- rtl8169_request_timer : unused yet. Removed.
- rtl8169_delete_timer : useless. Bloat. Removed.
Side effect : the timer may kick in if the TBI is enabled. I do not
know if the TBI has ever been used in real life.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Francois Romieu [Fri, 11 Mar 2011 19:30:24 +0000 (20:30 +0100)]
r8169: rtl8169_set_speed_xmii cleanup.
Shorten chipset version test.
No functional change.
Careful readers will notice that the 'supports_gmii' flag is deduced
from the device PCI id. Though less specific than the chipset related
RTL_GIGA_MAC_VER_XY, it is good enough to detect a GMII deprieved 810x.
Some features push for a device specific configuration (improved jumbo
frame support for instance). 'supports_gmii' will follow this path
if / when the device PCI id test stops working.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Francois Romieu [Fri, 29 Apr 2011 13:05:51 +0000 (15:05 +0200)]
r8169: remove some code duplication.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Francois Romieu [Fri, 1 Apr 2011 08:21:07 +0000 (10:21 +0200)]
r8169: style cleanups.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Eric Dumazet [Mon, 9 May 2011 04:40:44 +0000 (04:40 +0000)]
vlan: remove one synchronize_net() call
At VLAN dismantle phase, unregister_vlan_dev() makes one
synchronize_net() call after vlan_group_set_device(grp, vlan_id, NULL).
This call can be safely removed because we are calling
unregister_netdevice_queue() to queue device for deletion, and this
process needs at least one rcu grace period to complete.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ben Greear <greearb@candelatech.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jesse Gross <jesse@nicira.com>
Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 9 May 2011 03:35:55 +0000 (03:35 +0000)]
garp: remove one synchronize_rcu() call
Speedup vlan dismantling in CONFIG_VLAN_8021Q_GVRP=y cases,
by using a call_rcu() to free the memory instead of waiting with
expensive synchronize_rcu() [ while RTNL is held ]
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ben Greear <greearb@candelatech.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Sun, 8 May 2011 23:17:57 +0000 (23:17 +0000)]
net: use batched device unregister in veth and macvlan
veth devices dont use the batched device unregisters yet.
Since veth are a pair of devices, it makes sense to use a batch of two
unregisters, this roughly divides dismantle time by two.
Fix this by changing dellink() callers to always provide a non NULL
head. (Idea from Michał Mirosław)
This patch also handles macvlan case : We now dismantle all macvlans on
top of a lower dev at once.
Reported-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Michał Mirosław <mirqus@gmail.com>
Cc: Jesse Gross <jesse@nicira.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 04:14:41 +0000 (21:14 -0700)]
sctp: Fix debug message args.
I messed things up when I converted over to the transport
flow, I passed the ipv4 address value instead of it's address.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 00:24:10 +0000 (17:24 -0700)]
ipv4: Pass flow key down into ip_append_*().
This way rt->rt_dst accesses are unnecessary.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 May 2011 00:12:19 +0000 (17:12 -0700)]
ipv4: Pass flow keys down into datagram packet building engine.
This way ip_output.c no longer needs rt->rt_{src,dst}.
We already have these keys sitting, ready and waiting, on the stack or
in a socket structure.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 23:38:45 +0000 (16:38 -0700)]
udp: Use flow key information instead of rt->rt_{src,dst}
We have two cases.
Either the socket is in TCP_ESTABLISHED state and connect() filled
in the inet socket cork flow, or we looked up the route here and
used an on-stack flow.
Track which one it was, and use it to obtain src/dst addrs.
Signed-off-by: David S. Miller <davem@davemloft.net>
Mahesh Bandewar [Wed, 4 May 2011 15:30:11 +0000 (15:30 +0000)]
net: Allow ethtool to set interface in loopback mode.
This patch enables ethtool to set the loopback mode on a given interface.
By configuring the interface in loopback mode in conjunction with a policy
route / rule, a userland application can stress the egress / ingress path
exposing the flows of the change in progress and potentially help developer(s)
understand the impact of those changes without even sending a packet out
on the network.
Following set of commands illustrates one such example -
a) ip -4 addr add 192.168.1.1/24 dev eth1
b) ip -4 rule add from all iif eth1 lookup 250
c) ip -4 route add local 0/0 dev lo proto kernel scope host table 250
d) arp -Ds 192.168.1.100 eth1
e) arp -Ds 192.168.1.200 eth1
f) sysctl -w net.ipv4.ip_nonlocal_bind=1
g) sysctl -w net.ipv4.conf.all.accept_local=1
# Assuming that the machine has 8 cores
h) taskset 000f netserver -L 192.168.1.200
i) taskset 00f0 netperf -t TCP_CRR -L 192.168.1.100 -H 192.168.1.200 -l 30
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Tue, 3 May 2011 11:23:40 +0000 (11:23 +0000)]
pktgen: use %pI6c for printing IPv6 addresses
I don't know why %pI6 doesn't compress, but the format specifier is
kernel-standard, so use it.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Mon, 2 May 2011 21:30:08 +0000 (21:30 +0000)]
ethtool: Add 20G bit definitions
Add 20G supported and advertising bit definitions.
20G will be supported with the 57840 chips.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
------
include/linux/ethtool.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 22:39:11 +0000 (15:39 -0700)]
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge
David S. Miller [Sat, 7 May 2011 05:36:30 +0000 (22:36 -0700)]
tcp: Use cork flow info instead of rt->rt_dst in tcp_v4_get_peer()
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 May 2011 05:34:29 +0000 (22:34 -0700)]
sctp: Don't use rt->rt_{src,dst} in sctp_v4_xmit()
Now we can pick it out of the transport's flow key.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 May 2011 05:30:20 +0000 (22:30 -0700)]
ipv4: Don't use rt->rt_{src,dst} in ip_queue_xmit().
Now we can pick it out of the provided flow key.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 May 2011 05:23:20 +0000 (22:23 -0700)]
inet: Pass flowi to ->queue_xmit().
This allows us to acquire the exact route keying information from the
protocol, however that might be managed.
It handles all of the possibilities, from the simplest case of storing
the key in inet->cork.fl to the more complex setup SCTP has where
individual transports determine the flow.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 22:28:03 +0000 (15:28 -0700)]
ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.
Operation order is now transposed, we first create the child
socket then we try to hook up the route.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 21:34:22 +0000 (14:34 -0700)]
ipv4: Create inet_csk_route_child_sock().
This is just like inet_csk_route_req() except that it operates after
we've created the new child socket.
In this way we can use the new socket's cork flow for proper route
key storage.
This will be used by DCCP and TCP child socket creation handling.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 May 2011 23:32:47 +0000 (16:32 -0700)]
sctp: Store a flowi in transports to provide persistent keying.
Several future simplifications are possible now because of this.
For example, the sctp_addr unions can simply refer directly to
the flowi information.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 May 2011 23:24:06 +0000 (16:24 -0700)]
ipv4: Use cork flow in ip_queue_xmit()
All invokers of ip_queue_xmit() must make certain that the
socket is locked. All of SCTP, TCP, DCCP, and L2TP now make
sure this is the case.
Therefore we can use the cork flow during output route lookup in
ip_queue_xmit() when the socket route check fails.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 May 2011 23:18:04 +0000 (16:18 -0700)]
ipv4: Use cork flow in inet_sk_{reselect_saddr,rebuild_header}()
These two functions must be invoked only when the socket is locked
(because socket identity modifications are made non-atomically).
Therefore we can use the cork flow for output route lookups.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 May 2011 05:27:25 +0000 (22:27 -0700)]
ipv4: Lock socket and use cork flow in ip4_datagram_connect().
This is to make sure that an l2tp socket's inet cork flow is
fully filled in, when it's encapsulated in UDP.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 20:48:37 +0000 (13:48 -0700)]
l2tp: Use cork flow in l2tp_ip_connect() and l2tp_ip_sendmsg()
Now that the socket is consistently locked in these two routines,
this transformation is legal.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 20:45:20 +0000 (13:45 -0700)]
l2tp: Fix locking in l2tp_core.c
l2tp_xmit_skb() must take the socket lock. It makes use of ip_queue_xmit()
which expects to execute in a socket atomic context.
Since we execute this function in software interrupts, we cannot use the
usual lock_sock()/release_sock() sequence, instead we have to use
bh_lock_sock() and see if a user has the socket locked, and if so drop
the packet.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 May 2011 20:39:01 +0000 (13:39 -0700)]
l2tp: Fix locking in l2tp_ip.c
Both l2tp_ip_connect() and l2tp_ip_sendmsg() must take the socket
lock. They both modify socket state non-atomically, and in particular
l2tp_ip_sendmsg() increments socket private counters without using
atomic operations.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 May 2011 23:11:19 +0000 (16:11 -0700)]
tcp: Use cork flow in tcp_v4_connect()
Since this is invoked from inet_stream_connect() the socket is locked
and therefore this usage is safe.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 May 2011 23:10:41 +0000 (16:10 -0700)]
dccp: Use cork flow in dccp_v4_connect()
Since this is invoked from inet_stream_connect() the socket is locked
and therefore this usage is safe.
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Fri, 15 Apr 2011 06:46:06 +0000 (23:46 -0700)]
ethtool: remove phys_id from ethtool_ops
After that all the upstream kernel drivers now use phys_id,
and the old ethtool_ops interface (phys_id) can be removed.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniele Furlan [Sat, 7 May 2011 20:45:19 +0000 (22:45 +0200)]
batman-adv: remove duplicate code from function is_bidirectional_neigh()
In function is_bidirectional_neigh the code that find out the one hop
neighbor is duplicated.
Signed-off-by: Daniele Furlan <daniele.furlan@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Sun, 8 May 2011 10:45:45 +0000 (12:45 +0200)]
batman-adv: Remove multiline comments from line ending
It is slightly irritating that comments after a long line span over
multiple lines without any code. It is easier to put them before the
actual code and reduce the number of lines which the eye has to read.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Antonio Quartulli [Thu, 5 May 2011 06:42:45 +0000 (08:42 +0200)]
batman-adv: rename everything from *hna* into *tt* (translation table)
To be coherent, all the functions/variables/constants have been renamed
to the TranslationTable style
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Marek Lindner [Thu, 5 May 2011 12:14:46 +0000 (14:14 +0200)]
batman-adv: Fix refcount imbalance in find_router
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Tue, 3 May 2011 11:10:06 +0000 (13:10 +0200)]
batman-adv: Avoid deadlock between rtnl_lock and s_active
The hard_if_event is called by the notifier with rtnl_lock and tries to
remove sysfs entries when a NETDEV_UNREGISTER event is received. This
will automatically take the s_active lock.
The s_active lock is also used when a new interface is added to a meshif
through sysfs. In that situation we cannot wait for the rntl_lock before
creating the actual batman-adv interface to prevent a deadlock. It is
still possible to try to get the rtnl_lock and immediately abort the
current operation when the trylock call failed.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann [Tue, 3 May 2011 09:51:38 +0000 (11:51 +0200)]
batman-adv: Remove unnecessary hardif_list_lock
hardif_list_lock is unneccessary because we already ensure that no
multiple admin operations can take place through rtnl_lock.
hardif_list_lock only adds additional overhead and complexity.
Critical functions now check whether they are called with rtnl_lock
using ASSERT_RTNL.
It indirectly fixes the problem that orig_hash_del_if() expects that
only one interface is deleted from hardif_list at a time, but
hardif_remove_interfaces() removes all at once and then calls
orig_hash_del_if().
Reported-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Marek Lindner [Thu, 21 Apr 2011 13:52:17 +0000 (15:52 +0200)]
batman-adv: multi vlan support for bridge loop detection
The bridge loop detection for batman-adv allows the bat0 interface
to be bridged into an ethernet segment which other batman-adv nodes
are connected to. In order to also allow multiple VLANs on top of
the bat0 interface to be bridged into the ethernet segment this
patch extends the aforementioned bridge loop detection.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Marek Lindner [Mon, 2 May 2011 14:37:13 +0000 (16:37 +0200)]
batman-adv: remove misplaced comment
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
David S. Miller [Sun, 8 May 2011 05:57:22 +0000 (22:57 -0700)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6
David S. Miller [Sat, 7 May 2011 08:02:28 +0000 (01:02 -0700)]
hamachi: Put back RX_CHECKSUM
I deleted it by mistake in the TX_CHECKSUM removal
commit.
Reported-by: Michał Mirosław <mirqus@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Thu, 21 Apr 2011 08:43:43 +0000 (08:43 +0000)]
ixgbe: add ethtool counters for OS2BMC
OS2BMC registers are available for X540.
This patch adds ethtool counters based on those registers.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Emil Tantilov [Sat, 23 Apr 2011 04:50:40 +0000 (04:50 +0000)]
ixgbe: add rxhash support
feed RSS hash into skb->rxhash
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jeff Kirsher [Sat, 7 May 2011 06:37:14 +0000 (06:37 +0000)]
igb: convert to ethtool set_phys_id
Based on patch from Stephen Hemminger.
Convert igb driver to use new set_phys_id ethtool interface.
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jeff Kirsher [Tue, 3 May 2011 05:26:13 +0000 (05:26 +0000)]
e1000: convert to set_phys_id
Based on the original patch from Stephen Hemminger.
Convert to new LED control infrastucture and remove no longer
necessary bits.
CC: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jeff Kirsher [Tue, 3 May 2011 05:28:23 +0000 (05:28 +0000)]
e100: implemenet set_phys_id
Based on the original patch from Stephen Hemminger.
Implement set_phys_id to control LED.
CC: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
David S. Miller [Fri, 6 May 2011 23:01:15 +0000 (16:01 -0700)]
ipv4: Initialize cork->opt using NULL not 0.
Noticed by Joe Perches.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 May 2011 22:06:01 +0000 (15:06 -0700)]
ipv4: Initialize on-stack cork more efficiently.
ip_setup_cork() explicitly initializes every member of
inet_cork except flags, addr, and opt. So we can simply
set those three members to zero instead of using a
memset() via an empty struct assignment.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
David S. Miller [Fri, 6 May 2011 22:02:07 +0000 (15:02 -0700)]
inet: Decrease overhead of on-stack inet_cork.
When we fast path datagram sends to avoid locking by putting
the inet_cork on the stack we use up lots of space that isn't
necessary.
This is because inet_cork contains a "struct flowi" which isn't
used in these code paths.
Split inet_cork to two parts, "inet_cork" and "inet_cork_full".
Only the latter of which has the "struct flowi" and is what is
stored in inet_sock.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
David S. Miller [Fri, 6 May 2011 18:58:55 +0000 (11:58 -0700)]
hamachi: Delete TX checksumming code commented out since 1999
TX checksumming support has been ifdef commented out of this driver
for more than 10 years, and it makes references to aspects of the IPv4
stack from back then as well.
If someone has one of these rare cards and wants to properly resurrect
TX checksumming support, they can still get at this code in the
version control history.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 5 May 2011 21:59:02 +0000 (14:59 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
David S. Miller [Thu, 5 May 2011 21:09:28 +0000 (14:09 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6
Anton Blanchard [Mon, 2 May 2011 20:21:35 +0000 (20:21 +0000)]
net: Add sendmmsg socket system call
This patch adds a multiple message send syscall and is the send
version of the existing recvmmsg syscall. This is heavily
based on the patch by Arnaldo that added recvmmsg.
I wrote a microbenchmark to test the performance gains of using
this new syscall:
http://ozlabs.org/~anton/junkcode/sendmmsg_test.c
The test was run on a ppc64 box with a 10 Gbit network card. The
benchmark can send both UDP and RAW ethernet packets.
64B UDP
batch pkts/sec
1 804570
2 872800 (+ 8 %)
4 916556 (+14 %)
8 939712 (+17 %)
16 952688 (+18 %)
32 956448 (+19 %)
64 964800 (+20 %)
64B raw socket
batch pkts/sec
1
1201449
2
1350028 (+12 %)
4
1461416 (+22 %)
8
1513080 (+26 %)
16
1541216 (+28 %)
32
1553440 (+29 %)
64
1557888 (+30 %)
We see a 20% improvement in throughput on UDP send and 30%
on raw socket send.
[ Add sparc syscall entries. -DaveM ]
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kurt Van Dijck [Mon, 2 May 2011 04:50:48 +0000 (04:50 +0000)]
can: fix SJA1000 dlc for RTR packets
RTR frames do have a valid data length code on CAN.
The driver for SJA1000 did not handle that situation properly.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Sat, 30 Apr 2011 01:21:32 +0000 (01:21 +0000)]
net: call dev_alloc_name from register_netdevice
Force dev_alloc_name() to be called from register_netdevice() by
dev_get_valid_name(). That allows to remove multiple explicit
dev_alloc_name() calls.
The possibility to call dev_alloc_name in advance remains.
This also fixes veth creation regresion caused by
84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 4 May 2011 23:52:40 +0000 (23:52 +0000)]
bnx2x: function descriptions format fixed
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 4 May 2011 23:51:13 +0000 (23:51 +0000)]
bnx2x: update year to 2011 and version to 1.62.12-0
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 4 May 2011 23:50:33 +0000 (23:50 +0000)]
bnx2x: improve memory handling, low memory recovery flows
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 4 May 2011 23:49:53 +0000 (23:49 +0000)]
bnx2x: Do storage mac address validation for SF mode.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 4 May 2011 23:49:11 +0000 (23:49 +0000)]
bnx2x: allow WoL on every function in MF modes
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Wed, 4 May 2011 23:48:23 +0000 (23:48 +0000)]
bnx2x: link report improvements
To avoid link notification duplication
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Giuseppe CAVALLARO [Thu, 5 May 2011 00:10:50 +0000 (00:10 +0000)]
stmmac: removed not used definitions
Reported-by: Karim Hamiti <karim.hamiti@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 28 Apr 2011 22:37:09 +0000 (22:37 +0000)]
usbnet: runtime pm: fix out of memory
This patch makes use of the EVENT_DEV_OPEN flag introduced recently to
fix one out of memory issue, which can be reproduced on omap3/4 based
pandaboard/beagle XM easily with steps below:
- enable runtime pm
echo auto > /sys/devices/platform/usbhs-omap.0/ehci-omap.0/usb1/1-1/1-1.1/power/control
- ifconfig eth0 up
- then out of memroy happened, see [1] for kernel message.
Follows my analysis:
- 'ifconfig eth0 up' brings eth0 out of suspend, and usbnet_resume
is called to schedule dev->bh, then rx urbs are submited to prepare for
recieving data;
- some usbnet devices will produce garbage rx packets flood if
info->reset is not called in usbnet_open.
- so there is no enough chances for usbnet_bh to handle and release
recieved skb buffers since many rx interrupts consumes cpu, so out of memory
for atomic allocation in rx_submit happened.
This patch fixes the issue by simply not allowing schedule of usbnet_bh until device
is opened.
[1], dmesg
[ 234.712005] smsc95xx 1-1.1:1.0: rpm_resume flags 0x4
[ 234.712066] usb 1-1.1: rpm_resume flags 0x0
[ 234.712066] usb 1-1: rpm_resume flags 0x0
[ 234.712097] usb usb1: rpm_resume flags 0x0
[ 234.712127] usb usb1: usb auto-resume
[ 234.712158] ehci-omap ehci-omap.0: resume root hub
[ 234.754028] hub 1-0:1.0: hub_resume
[ 234.754821] hub 1-0:1.0: port 1: status 0507 change 0000
[ 234.756011] hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0000
[ 234.756042] hub 1-0:1.0: rpm_resume flags 0x4
[ 234.756072] usb usb1: rpm_resume flags 0x0
[ 234.756164] usb usb1: rpm_resume returns 1
[ 234.756195] hub 1-0:1.0: rpm_resume returns 0
[ 234.756195] hub 1-0:1.0: rpm_suspend flags 0x4
[ 234.756225] hub 1-0:1.0: rpm_suspend returns 0
[ 234.756256] usb usb1: rpm_resume returns 0
[ 234.757141] usb 1-1: usb auto-resume
[ 234.793151] ehci-omap ehci-omap.0: GetStatus port:1 status 001005 0 ACK POWER sig=se0 PE CONNECT
[ 234.816558] usb 1-1: finish resume
[ 234.817871] hub 1-1:1.0: hub_resume
[ 234.818420] hub 1-1:1.0: port 1: status 0507 change 0000
[ 234.820495] ehci-omap ehci-omap.0: reused qh
eec50220 schedule
[ 234.820495] usb 1-1: link qh256-0001/
eec50220 start 1 [1/0 us]
[ 234.820587] usb 1-1: rpm_resume returns 0
[ 234.820800] hub 1-1:1.0: state 7 ports 5 chg 0000 evt 0000
[ 234.820800] hub 1-1:1.0: rpm_resume flags 0x4
[ 234.820831] hub 1-1:1.0: rpm_resume returns 0
[ 234.820861] hub 1-1:1.0: rpm_suspend flags 0x4
[ 234.820861] hub 1-1:1.0: rpm_suspend returns 0
[ 234.821777] usb 1-1.1: usb auto-resume
[ 234.868591] hub 1-1:1.0: state 7 ports 5 chg 0000 evt 0002
[ 234.868591] hub 1-1:1.0: rpm_resume flags 0x4
[ 234.868621] hub 1-1:1.0: rpm_resume returns 0
[ 234.868652] hub 1-1:1.0: rpm_suspend flags 0x4
[ 234.868652] hub 1-1:1.0: rpm_suspend returns 0
[ 234.879486] usb 1-1.1: finish resume
[ 234.880279] usb 1-1.1: rpm_resume returns 0
[ 234.880310] smsc95xx 1-1.1:1.0: rpm_resume returns 0
[ 238.880187] ksoftirqd/0: page allocation failure. order:0, mode:0x20
[ 238.880218] Backtrace:
[ 238.880249] [<
c01b9800>] (dump_backtrace+0x0/0xf8) from [<
c065e1dc>] (dump_stack+0x18/0x1c)
[ 238.880249] r6:
00000000 r5:
00000000 r4:
00000020 r3:
00000002
[ 238.880310] [<
c065e1c4>] (dump_stack+0x0/0x1c) from [<
c026ece4>] (__alloc_pages_nodemask+0x620/0x724)
[ 238.880340] [<
c026e6c4>] (__alloc_pages_nodemask+0x0/0x724) from [<
c02986d4>] (kmem_getpages.clone.34+0x34/0xc8)
[ 238.880371] [<
c02986a0>] (kmem_getpages.clone.34+0x0/0xc8) from [<
c02988f8>] (cache_grow.clone.42+0x84/0x154)
[ 238.880371] r6:
ef871aa4 r5:
ef871a80 r4:
ef81fd40 r3:
00000020
[ 238.880401] [<
c0298874>] (cache_grow.clone.42+0x0/0x154) from [<
c0298b64>] (cache_alloc_refill+0x19c/0x1f0)
[ 238.880432] [<
c02989c8>] (cache_alloc_refill+0x0/0x1f0) from [<
c0299804>] (kmem_cache_alloc+0x90/0x190)
[ 238.880462] [<
c0299774>] (kmem_cache_alloc+0x0/0x190) from [<
c052e260>] (__alloc_skb+0x34/0xe8)
[ 238.880493] [<
c052e22c>] (__alloc_skb+0x0/0xe8) from [<
bf0509f4>] (rx_submit+0x2c/0x1d4 [usbnet])
[ 238.880523] [<
bf0509c8>] (rx_submit+0x0/0x1d4 [usbnet]) from [<
bf050d38>] (rx_complete+0x19c/0x1b0 [usbnet])
[ 238.880737] [<
bf050b9c>] (rx_complete+0x0/0x1b0 [usbnet]) from [<
bf006fd0>] (usb_hcd_giveback_urb+0xa8/0xf4 [usbcore])
[ 238.880737] r8:
eeeced34 r7:
eeecec00 r6:
eeecec00 r5:
00000000 r4:
eec2dd20
[ 238.880767] r3:
bf050b9c
[ 238.880859] [<
bf006f28>] (usb_hcd_giveback_urb+0x0/0xf4 [usbcore]) from [<
bf03c8f8>] (ehci_urb_done+0xb0/0xbc [ehci_hcd])
[ 238.880859] r6:
00000000 r5:
eec2dd20 r4:
eeeced44 r3:
eec2dd34
[ 238.880920] [<
bf03c848>] (ehci_urb_done+0x0/0xbc [ehci_hcd]) from [<
bf040204>] (qh_completions+0x308/0x3bc [ehci_hcd])
[ 238.880920] r7:
00000000 r6:
eeda21a0 r5:
ffdfe3c0 r4:
eeda21ac
[ 238.880981] [<
bf03fefc>] (qh_completions+0x0/0x3bc [ehci_hcd]) from [<
bf040ef8>] (scan_async+0xb0/0x16c [ehci_hcd])
[ 238.881011] [<
bf040e48>] (scan_async+0x0/0x16c [ehci_hcd]) from [<
bf040fec>] (ehci_work+0x38/0x90 [ehci_hcd])
[ 238.881042] [<
bf040fb4>] (ehci_work+0x0/0x90 [ehci_hcd]) from [<
bf042940>] (ehci_irq+0x300/0x34c [ehci_hcd])
[ 238.881072] r4:
eeeced34 r3:
00000001
[ 238.881134] [<
bf042640>] (ehci_irq+0x0/0x34c [ehci_hcd]) from [<
bf006828>] (usb_hcd_irq+0x40/0xac [usbcore])
[ 238.881195] [<
bf0067e8>] (usb_hcd_irq+0x0/0xac [usbcore]) from [<
c0239764>] (handle_irq_event_percpu+0xb8/0x240)
[ 238.881225] r6:
eec504e0 r5:
0000006d r4:
eec504e0 r3:
bf0067e8
[ 238.881256] [<
c02396ac>] (handle_irq_event_percpu+0x0/0x240) from [<
c0239930>] (handle_irq_event+0x44/0x64)
[ 238.881256] [<
c02398ec>] (handle_irq_event+0x0/0x64) from [<
c023bbd0>] (handle_level_irq+0xe0/0x114)
[ 238.881286] r6:
0000006d r5:
c080c14c r4:
c080c100 r3:
00020000
[ 238.881317] [<
c023baf0>] (handle_level_irq+0x0/0x114) from [<
c01ab090>] (asm_do_IRQ+0x90/0xd0)
[ 238.881317] r5:
00000000 r4:
0000006d
[ 238.881347] [<
c01ab000>] (asm_do_IRQ+0x0/0xd0) from [<
c06624d0>] (__irq_svc+0x50/0x134)
[ 238.881378] Exception stack(0xef837e20 to 0xef837e68)
[ 238.881378] 7e20:
00000001 00185610 016cc000 c00490c0 eb380000 ef800540 00000020 00004ae0
[ 238.881408] 7e40:
00000020 bf0509f4 60000013 ef837e9c ef837e40 ef837e68 c0226f0c c0298ca0
[ 238.881408] 7e60:
20000013 ffffffff
[ 238.881408] r5:
fa240100 r4:
ffffffff
[ 238.881439] [<
c0298bb8>] (__kmalloc_track_caller+0x0/0x1d0) from [<
c052e284>] (__alloc_skb+0x58/0xe8)
[ 238.881469] [<
c052e22c>] (__alloc_skb+0x0/0xe8) from [<
bf0509f4>] (rx_submit+0x2c/0x1d4 [usbnet])
[ 238.881500] [<
bf0509c8>] (rx_submit+0x0/0x1d4 [usbnet]) from [<
bf0513d8>] (usbnet_bh+0x1b4/0x250 [usbnet])
[ 238.881530] [<
bf051224>] (usbnet_bh+0x0/0x250 [usbnet]) from [<
c01f912c>] (tasklet_action+0xb0/0x1f8)
[ 238.881530] r6:
00000000 r5:
ef9757f0 r4:
ef9757ec r3:
bf051224
[ 238.881561] [<
c01f907c>] (tasklet_action+0x0/0x1f8) from [<
c01f97ac>] (__do_softirq+0x140/0x290)
[ 238.881561] r8:
00000006 r7:
00000101 r6:
00000000 r5:
c0806098 r4:
00000001
[ 238.881591] r3:
c01f907c
[ 238.881622] [<
c01f966c>] (__do_softirq+0x0/0x290) from [<
c01f99cc>] (run_ksoftirqd+0xd0/0x1f4)
[ 238.881622] [<
c01f98fc>] (run_ksoftirqd+0x0/0x1f4) from [<
c02113b0>] (kthread+0x90/0x98)
[ 238.881652] r7:
00000013 r6:
c01f98fc r5:
00000000 r4:
ef831efc
[ 238.881683] [<
c0211320>] (kthread+0x0/0x98) from [<
c01f62f4>] (do_exit+0x0/0x374)
[ 238.881713] r6:
c01f62f4 r5:
c0211320 r4:
ef831efc
[ 238.881713] Mem-info:
[ 238.881744] Normal per-cpu:
[ 238.881744] CPU 0: hi: 186, btch: 31 usd: 38
[ 238.881744] CPU 1: hi: 186, btch: 31 usd: 169
[ 238.881774] HighMem per-cpu:
[ 238.881774] CPU 0: hi: 90, btch: 15 usd: 66
[ 238.881774] CPU 1: hi: 90, btch: 15 usd: 86
[ 238.881805] active_anon:544 inactive_anon:71 isolated_anon:0
[ 238.881805] active_file:926 inactive_file:2538 isolated_file:0
[ 238.881805] unevictable:0 dirty:10 writeback:0 unstable:0
[ 238.881805] free:57782 slab_reclaimable:864 slab_unreclaimable:186898
[ 238.881805] mapped:632 shmem:144 pagetables:50 bounce:0
[ 238.881835] Normal free:1328kB min:3532kB low:4412kB high:5296kB active_anon:0kB inactive_anon:0kB active_file:880kB inactive_file:848kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:780288kB mlocked:0kB dirty:36kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:3456kB slab_unreclaimable:747592kB kernel_stack:392kB pagetables:200kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[ 238.881866] lowmem_reserve[]: 0 1904 1904
[ 238.881896] HighMem free:229800kB min:236kB low:508kB high:784kB active_anon:2176kB inactive_anon:284kB active_file:2824kB inactive_file:9304kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:243712kB mlocked:0kB dirty:4kB writeback:0kB mapped:2528kB shmem:576kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[ 238.881927] lowmem_reserve[]: 0 0 0
[ 238.881958] Normal: 0*4kB 4*8kB 6*16kB 0*32kB 1*64kB 1*128kB 0*256kB 2*512kB 0*1024kB 0*2048kB 0*4096kB = 1344kB
[ 238.882019] HighMem: 6*4kB 2*8kB 4*16kB 4*32kB 1*64kB 1*128kB 0*256kB 2*512kB 3*1024kB 0*2048kB 55*4096kB = 229800kB
[ 238.882080] 3610 total pagecache pages
[ 238.882080] 0 pages in swap cache
[ 238.882080] Swap cache stats: add 0, delete 0, find 0/0
[ 238.882110] Free swap = 0kB
[ 238.882110] Total swap = 0kB
[ 238.933776] 262144 pages of RAM
[ 238.933776] 58240 free pages
[ 238.933776] 10503 reserved pages
[ 238.933776] 187773 slab pages
[ 238.933807] 2475 pages shared
[ 238.933807] 0 pages swap cached
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
John W. Linville [Thu, 5 May 2011 17:32:35 +0000 (13:32 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/libertas/if_cs.c
drivers/net/wireless/rtlwifi/pci.c
net/bluetooth/l2cap_sock.c
Mohammed Shafi Shajakhan [Thu, 5 May 2011 05:29:24 +0000 (10:59 +0530)]
mac80211: Fix a warning due to skipping tailroom reservation for IV
The devices that require IV generation in software need tailroom
reservation for ICVs used in TKIP or WEP encryptions.
Currently, decision to skip the tailroom reservation in the tx
path was taken only on whether driver wants MMIC to be generated
in software or not. Following patch appends IV generation check for
such decisions and fixes the following warning.
WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x56/0xf3()
Hardware name:
64756D6
Modules linked in: ath9k ath9k_common ath9k_hw
Pid: 0, comm: swapper Tainted: G W 2.6.39-rc5-wl
Call Trace:
[<
c102fd29>] warn_slowpath_common+0x65/0x7a
[<
c1465c4e>] ? ieee80211_wep_add_iv+0x56/0xf3
[<
c102fd4d>] warn_slowpath_null+0xf/0x13
[<
c1465c4e>] ieee80211_wep_add_iv+0x56/0xf3
[<
c1466007>] ieee80211_crypto_wep_encrypt+0x63/0x88
[<
c1478bf3>] ieee80211_tx_h_encrypt+0x2f/0x63
[<
c1478cba>] invoke_tx_handlers+0x93/0xe1
[<
c1478eda>] ieee80211_tx+0x4b/0x6d
[<
c147907c>] ieee80211_xmit+0x180/0x188
[<
c147779d>] ? ieee80211_skb_resize+0x95/0xd9
[<
c1479edf>] ieee80211_subif_start_xmit+0x64f/0x668
[<
c13956fc>] dev_hard_start_xmit+0x368/0x48c
[<
c13a8bd6>] sch_direct_xmit+0x4d/0x101
[<
c1395ae1>] dev_queue_xmit+0x2c1/0x43f
[<
c13a74a2>] ? eth_header+0x1e/0x90
[<
c13a7400>] ? eth_type_trans+0x91/0xc2
[<
c13a7484>] ? eth_rebuild_header+0x53/0x53
[<
c139f079>] neigh_resolve_output+0x223/0x27e
[<
c13c6b23>] ip_finish_output2+0x1d4/0x1fe
[<
c13c6bc6>] ip_finish_output+0x79/0x7d
[<
c13c6cbe>] T.1075+0x43/0x48
[<
c13c6e6e>] ip_output+0x75/0x7b
[<
c13c4970>] dst_output+0xc/0xe
[<
c13c62c9>] ip_local_out+0x17/0x1a
[<
c13c67bb>] ip_queue_xmit+0x2aa/0x2f8
[<
c138b742>] ? sk_setup_caps+0x21/0x92
[<
c13d95ea>] ? __tcp_v4_send_check+0x7e/0xb7
[<
c13d5d2e>] tcp_transmit_skb+0x6a1/0x6d7
[<
c13d533b>] ? tcp_established_options+0x20/0x8b
[<
c13d6f28>] tcp_retransmit_skb+0x43a/0x527
[<
c13d8d6d>] tcp_retransmit_timer+0x32e/0x45d
[<
c13d8f23>] tcp_write_timer+0x87/0x16c
[<
c103a030>] run_timer_softirq+0x156/0x1f9
[<
c13d8e9c>] ? tcp_retransmit_timer+0x45d/0x45d
[<
c1034d65>] __do_softirq+0x97/0x14a
[<
c1034cce>] ? irq_enter+0x4d/0x4d
Cc: Yogesh Powar <yogeshp@marvell.com>
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Tested-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kurt Van Dijck [Tue, 3 May 2011 18:42:04 +0000 (18:42 +0000)]
can: rename can_try_module_get to can_get_proto
can: rename can_try_module_get to can_get_proto
can_try_module_get does return a struct can_proto.
The name explains what is done in so much detail that a caller
may not notice that a struct can_proto is locked/unlocked.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kurt Van Dijck [Tue, 3 May 2011 18:40:57 +0000 (18:40 +0000)]
can: make struct can_proto const
commit
53914b67993c724cec585863755c9ebc8446e83b had the
same message. That commit did put everything in place but
did not make can_proto const itself.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 4 May 2011 10:02:26 +0000 (10:02 +0000)]
net: ip_expire() must revalidate route
Commit
4a94445c9a5c (net: Use ip_route_input_noref() in input path)
added a bug in IP defragmentation handling, in case timeout is fired.
When a frame is defragmented, we use last skb dst field when building
final skb. Its dst is valid, since we are in rcu read section.
But if a timeout occurs, we take first queued fragment to build one ICMP
TIME EXCEEDED message. Problem is all queued skb have weak dst pointers,
since we escaped RCU critical section after their queueing. icmp_send()
might dereference a now freed (and possibly reused) part of memory.
Calling skb_dst_drop() and ip_route_input_noref() to revalidate route is
the only possible choice.
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 4 May 2011 20:54:50 +0000 (13:54 -0700)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6
David S. Miller [Wed, 4 May 2011 19:46:24 +0000 (12:46 -0700)]
ipv6: Use flowi4->{daddr,saddr} in ipip6_tunnel_xmit().
Instead of rt->rt_{dst,src}
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 4 May 2011 19:33:34 +0000 (12:33 -0700)]
ipv4: Kill rt->rt_{src, dst} usage in IP GRE tunnels.
First, make callers pass on-stack flowi4 to ip_route_output_gre()
so they can get at the fully resolved flow key.
Next, use that in ipgre_tunnel_xmit() to avoid the need to use
rt->rt_{dst,src}.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 4 May 2011 19:18:54 +0000 (12:18 -0700)]
ipv4: Pass explicit saddr/daddr args to ipmr_get_route().
This eliminates the need to use rt->rt_{src,dst}.
Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Tue, 26 Apr 2011 08:00:00 +0000 (08:00 +0000)]
ixgbe: Cleanup PCIe bus speed info
PCIe connections should be expressed as GT/s (GigaTransfers per second)
instead of the current Gb/s (Gigabits per second). In addition, it is
incorrect because (due to PCIe gen 1 & 2 having a 20% overhead) the
actually data rate, when expressed in Gb/s, is only 80% of the rate of
GT/s.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Emil Tantilov [Wed, 20 Apr 2011 08:49:06 +0000 (08:49 +0000)]
ixgbe: improve EEPROM read/write operations
Introduce buffered read/writes which greatly improves performance on
parts with large EEPROMs.
Previously reading/writing a word requires taking/releasing of synchronization
semaphores which adds 10ms to each operation. The optimization is to
read/write in buffers, but make sure the semaphore is not held for >500ms
according to the datasheet.
Since we can't read the EEPROM page size ixgbe_detect_eeprom_page_size() is
used to discover the EEPROM size when needed and keeps the result in
word_page_size for the rest of the run time.
Use buffered reads for ethtool -e.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Emil Tantilov [Thu, 14 Apr 2011 07:46:41 +0000 (07:46 +0000)]
ixgbe: fix sparse warning
warning: symbol 'before' shadows an earlier one
Convert large macros to functions similar to e1000e.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Don Skidmore [Wed, 13 Apr 2011 07:01:52 +0000 (07:01 +0000)]
ixgbe: fix typo error with software defined pins on 82599
Correcting a simple typo with enabling software defined pins. I don't
believe this was causing any issues but this is how it was meant to be
implemented.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Emil Tantilov [Wed, 13 Apr 2011 04:56:15 +0000 (04:56 +0000)]
ixgbe: Use function pointer for ixgbe_acquire/release_swfw_sync()
Change remaining direct calls to function pointers.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
stephen hemminger [Tue, 5 Apr 2011 04:26:27 +0000 (04:26 +0000)]
igbvf: remove bogus phys_id
This device lies about supporting phys_id. Remove it and just
let the upper layer report not supported.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Carolyn Wyborny [Wed, 4 May 2011 04:29:51 +0000 (04:29 +0000)]
igb: Add check for invalid size to igb_get_invariants_82575()
Recent commits have changed how EEPROM size is checked and if the size
word is misconfigured, the driver will fail to load. This patch adds a
check for invalid size word in the EEPROM and uses default size instead
for 82576 parts.
Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jeff Kirsher [Tue, 3 May 2011 05:17:34 +0000 (05:17 +0000)]
ixgb: convert to set_phys_id
Based on the original patch sent by Stephen Hemminger.
This version incorporates the ethtool changes that Bruce Allan
submitted.
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
David S. Miller [Wed, 4 May 2011 19:03:30 +0000 (12:03 -0700)]
ipv4: In ip_build_and_send_pkt() use 'saddr' and 'daddr' args passed in.
Instead of rt->rt_{dst,src}
The only tricky part is source route option handling.
If the source route option is enabled we can't just use plain 'daddr',
we have to use opt->opt.faddr.
Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Wed, 27 Apr 2011 08:51:29 +0000 (08:51 +0000)]
e100: fix build warning
In function 'e100_hw_init':
warning: 'err' may be used uninitialized in this function
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>