11 Jun, 2010
2 commits
-
remove useless union keyword in rtable, rt6_info and dn_route.
Since there is only one member in a union, the union keyword isn't useful.
Signed-off-by: Changli Gao
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
commit 66018506e15b (ip: Router Alert RCU conversion) introduced RCU
lookups to ip_call_ra_chain(). It missed proper deinit phase :
When ip_ra_control() deletes an ip_ra_chain, it should make sure
ip_call_ra_chain() users can not start to use socket during the rcu
grace period. It should also delay the sock_put() after the grace
period, or we risk a premature socket freeing and corruptions, as
raw sockets are not rcu protected yet.This delay avoids using expensive atomic_inc_not_zero() in
ip_call_ra_chain().Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
10 Jun, 2010
4 commits
-
- ipv6_sock_mc_join() : doesnt touch dev refcount
- ipv6_sock_mc_drop() : doesnt touch dev/idev refcounts
- ip6_mc_find_dev() becomes ip6_mc_find_dev_rcu() (called from rcu),
and doesnt touch dev/idev refcounts- ipv6_sock_mc_close() : doesnt touch dev/idev refcounts
- ip6_mc_source() uses ip6_mc_find_dev_rcu()
- ip6_mc_msfilter() uses ip6_mc_find_dev_rcu()
- ip6_mc_msfget() uses ip6_mc_find_dev_rcu()
- ipv6_dev_mc_dec(), ipv6_chk_mcast_addr(),
igmp6_event_query(), igmp6_event_report(),
mld_sendpack(), igmp6_send() dont touch idev refcountSigned-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
There is no need for pppoe_xmit() forward declaration in
drivers/net/pppoe.c. This patch removes this pppoe_xmit() declaration.Signed-off-by: Rami Rosen
Signed-off-by: David S. Miller -
- rcu_read_lock() already held by caller
- use __in_dev_get_rcu() instead of in_dev_get() / in_dev_put()
- remove goto out;Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Use call_rcu rather than synchronize_rcu.
Signed-off-by: Jiri Pirko
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
08 Jun, 2010
6 commits
-
- dev_get_by_flags() changed to dev_get_by_flags_rcu()
- ipv6_sock_ac_join() dont touch dev & idev refcounts
- ipv6_sock_ac_drop() dont touch dev & idev refcounts
- ipv6_sock_ac_close() dont touch dev & idev refcounts
- ipv6_dev_ac_dec() dount touch idev refcount
- ipv6_chk_acast_addr() dont touch idev refcountSigned-off-by: Eric Dumazet
CC: Hideaki YOSHIFUJI
Signed-off-by: David S. Miller -
in_dev_get() -> __in_dev_get_rcu() in a rcu protected function.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
in_dev_get() -> __in_dev_get_rcu() in a rcu protected function.
[ Fix build with CONFIG_IP_ROUTE_VERBOSE disabled. -DaveM ]
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
in_dev_get() -> __in_dev_get_rcu() in a rcu protected function.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Straightforward conversion to RCU.
One rwlock becomes a spinlock, and is static.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Use call_rcu rather than synchronize_rcu.
Signed-off-by: Jiri Pirko
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
07 Jun, 2010
20 commits
-
The extra assertion to allow packet munging only when there are
no other ptypes listening which may have worked around an old bug
is unnecessary. It is sufficient to check if the skb is cloned before
trampling on it. Thanks to Herbert Xu for being persistent and patient
in getting this across.
[Note that cloning checks and assertions are the general rule used
by tc actions (documentation/networking/tc-actions-env-rules.txt)].Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Now that the core path doesnt set OK to munge we detect
writable skbs by looking to see if they are cloned.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
remove two unnecessary assignments
we don't need to assign NULL when initialize structure objects.
Signed-off-by: Changli Gao
----
net/sched/sch_htb.c | 2 --
1 file changed, 2 deletions(-)
Signed-off-by: David S. Miller -
The memory for the private data is allocated using kzalloc in
alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to
set the napi member to 0 explicitely.Signed-off-by: Tobias Klauser
Signed-off-by: David S. Miller -
Avoid two atomic ops per raw_send_hdrinc() call
Avoid two atomic ops per raw6_send_hdrinc() call
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
CAIF is using "xxx-AF_MAX" strings for the lock validator. It should use
its own strings.Signed-off-by: Alex Lorca
Signed-off-by: David S. Miller -
This patch address a serious performance issue in reading the
TCP sockets table (/proc/net/tcp).Reading the full table is done by a number of sequential read
operations. At each read operation, a seek is done to find the
last socket that was previously read. This seek operation requires
that the sockets in the table need to be counted up to the current
file position, and to count each of these requires taking a lock for
each non-empty bucket. The whole algorithm is O(n^2).The fix is to cache the last bucket value, offset within the bucket,
and the file position returned by the last read operation. On the
next sequential read, the bucket and offset are used to find the
last read socket immediately without needing ot scan the previous
buckets the table. This algorithm t read the whole table is O(n).The improvement offered by this patch is easily show by performing
cat'ing /proc/net/tcp on a machine with a lot of connections. With
about 182K connections in the table, I see the following:- Without patch
time cat /proc/net/tcp > /dev/nullreal 1m56.729s
user 0m0.214s
sys 1m56.344s- With patch
time cat /proc/net/tcp > /dev/nullreal 0m0.894s
user 0m0.290s
sys 0m0.594sSigned-off-by: Tom Herbert
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patch updates the tg3 version to 3.111.
Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
This patch adds the 5719 PCI device and phy IDs.
Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
This patch adds the 5719 ASIC revision.
Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The driver sometimes needs to know which function number the current
device is. This patch changes the code to use devfn over internal
register values.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The 5717 serdes phy brings link up via parallel detection without any
additional help from the driver. This patch changes the
tg3_setup_fiber_mii_phy() function to detect and allow the use of this
feature.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
This patch changes the code to make it legal to allocate only one MSI-X
vector. It also fixes a bug where the driver was not checking for error
return codes from pci_enable_msix().Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The driver was incorrectly programming the indirection table such that
rx traffic intended for the second ring went to the first ring, rx
traffic intended for the third ring went to the second ring, etc. This
patch changes the code so that rx traffic is diverted to the proper
ring.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The rx resources for MSI-X interrupt vector 0 were not being freed
correctly. This happens because the teardown loop continue's to the
next loop iteration if it detects the tx ring for that vector is not
setup, thus bypassing the rx teardown code. This patch moves the
call to tg3_rx_prodring_free() earlier in the loop.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
In certain edge conditions, internal tx resources can get corrupted.
This patch enables a bit that will fix the problem.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The 5717 and later devices relocate the APE mutex registers. This patch
organizes the code so that the driver can use the mutex registers in the
old and new locations.Signed-off-by: Matt Carlson
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
Conflicts:
drivers/net/sfc/net_driver.h
drivers/net/sfc/siena.c -
Some configurations need delay between the "write completed" indication
and new write to work reliably.Realtek driver seems to use longer delay when polling the "write complete"
bit, so it waits long enough between writes with high probability (but
could probably break too). This patch adds a new udelay to make sure we
wait unconditionally some time after the write complete indication.This caused a regression with XID 18000000 boards when the board specific
phy configuration writing many mdio registers was added in commit
2e955856ff (r8169: phy init for the 8169scd). Some of the configration
mdio writes would almost always fail, and depending on failure might leave
the PHY in non-working state.Signed-off-by: Timo Teräs
Acked-off-by: Francois Romieu
Signed-off-by: David S. Miller -
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
05 Jun, 2010
8 commits
-
Enable GRO by default for performance.
Signed-off-by: Shirley Ma
Acked-by: Greg Rose
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller -
With mtu=9000, mld_newpack() use order-2 GFP_ATOMIC allocations, that
are very unreliable, on machines where PAGE_SIZE=4KLimit allocated skbs to be at most one page. (order-0 allocations)
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patch compile tested only.
Convert legacy PM hooks to dev_pm_ops
Signed-off-by: Denis Kirjanov
Signed-off-by: David S. Miller -
v2: changed bonding module version, modified to apply on top of changes
from previous patch in series, and updated documentation to elaborate on
multiqueue awareness that now exists in bonding driver.This patch give the user the ability to control the output slave for
round-robin and active-backup bonding. Similar functionality was
discussed in the past, but Jay Vosburgh indicated he would rather see a
feature like this added to existing modes rather than creating a
completely new mode. Jay's thoughts as well as Neil's input surrounding
some of the issues with the first implementation pushed us toward a
design that relied on the queue_mapping rather than skb marks.
Round-robin and active-backup modes were chosen as the first users of
this slave selection as they seemed like the most logical choices when
considering a multi-switch environment.Round-robin mode works without any modification, but active-backup does
require inclusion of the first patch in this series and setting
the 'all_slaves_active' flag. This will allow reception of unicast traffic on
any of the backup interfaces.This was tested with IPv4-based filters as well as VLAN-based filters
with good results.More information as well as a configuration example is available in the
patch to Documentation/networking/bonding.txt.Signed-off-by: Andy Gospodarek
Signed-off-by: Neil Horman
Signed-off-by: David S. Miller -
v2: changed parameter name from 'keep_all' to 'all_slaves_active' and
skipped setting slaves to inactive rather than creating a new flag at
Jay's suggestion.In an effort to suppress duplicate frames on certain bonding modes
(specifically the modes that do not require additional configuration on
the switch or switches connected to the host), code was added in the
generic receive patch in 2.6.16. The current behavior works quite well
for most users, but there are some times it would be nice to restore old
functionality and allow all frames to make their way up the stack.This patch adds support for a new module option and sysfs file called
'all_slaves_active' that will restore pre-2.6.16 functionality if the
user desires. The default value is '0' and retains existing behavior,
but the user can set it to '1' and allow all frames up if desired.Signed-off-by: Andy Gospodarek
Signed-off-by: Jay Vosburgh
Signed-off-by: Neil Horman
Signed-off-by: David S. Miller -
We can avoid an unecessary cache miss by checking if the skb is non-linear
before accessing gso_size/gso_type in skb_warn_if_lro, the same can also be
done to avoid a cache miss on nr_frags if data_len is 0.Signed-off-by: Alexander Duyck
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller -
Hi,
__pppoe_xmit() in drivers/net/pppoe always returns 1.
When the methods fails (via goto abort), it should return 0 and not 1.Regards,
Rami RosenSigned-off-by: Rami Rosen
Signed-off-by: David S. Miller -
- ipv6 msstab: account for ipv6 header size
- ipv4 msstab: add mss for Jumbograms.Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller