- 18 10月, 2010 21 次提交
-
-
由 Vladislav Zolotarov 提交于
Optimized the branching in the bnx2x_rx_int() based on the fact that FP CQE will always have at least one of START or STOP flags set, so if not both bits are set and START bit is not set, then it's a STOP bit that is set. Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com> Signed-off-by: NVladislav Zolotarov <vladz@broadcom.com> Signed-off-by: NEilon Greenstein <eilong@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Carpenter 提交于
This is essentially cosmetic. At this point the IRQs are already disabled because we called spin_lock_irq(&dev->rx_info.lock). The real bug here was fixed back in 2006 in 3a10cceb: "[PATCH] lock validator: fix ns83820.c irq-flags bug". Prior to that patch, it was a "spin_lock_irq is not nestable" type bug. The 2006 patch changes the unlock to not re-enable IRQs, which eliminates the potential deadlock. But this bit was missed. We should change the lock function as well so it balances nicely. Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Allan Stephens 提交于
Optimize processing in TIPC's bearer shutdown code, including: 1. Remove an unnecessary check to see if TIPC bearer's can exist. 2. Don't release spinlocks before calling a media-specific disabling routine, since the routine can't sleep. 3. Make bearer_disable() operate directly on a struct bearer, instead of needlessly taking a name and then mapping that to the struct. Signed-off-by: NAllan Stephens <allan.stephens@windriver.com> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Reviewed-by: NNeil Horman <nhorman@tuxdriver.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
It's completely unused and exporting a static symbol makes no sense and breaks the build. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
This patch updates the tg3 version to 3.115. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
Currently the tg3 driver leaves the speed and duplex fields uninitialized in tg3_get_settings() if the device is not up. This can lead to some strange deductions in certain versions of ethtool. When the device is up and the link is down, the driver reports SPEED_INVALID and DUPLEX_INVALID for these fields. This patch makes the presentation consistent by returning SPEED_INVALID and DUPLEX_INVALID when the device has not been brought up as well. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
The 5714, 5715, and 5780 devices do not have a separate rx jumbo producer ring. This patch changes the code so that resources are not allocated for it. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
src_map is no longer used in tg3_alloc_rx_skb(). Remove it. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
This patch adds Energy Efficient Ethernet (EEE) support for the 5718 device ID and the 57765 B0 asic revision. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
This patch adds clause 45 register access methods. They will be used in the following patch. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
This patch allows the driver to disable the additional transmit rings available on the 5717 and 5719 devices. This is not strictly necessary, but is done anyways for correctness. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Matt Carlson 提交于
5718 B0 and 5719 devices will use a new selfboot firmware format. This patch adds code to detect the new format so that bootcode versions get reported correctly. Signed-off-by: NMatt Carlson <mcarlson@broadcom.com> Reviewed-by: NMichael Chan <mchan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
Get rid of fib_hash_lock rwlock. The fn_zone hash table resize is the noticeable part of this patch. I added a seqlock per fn_zone, so that readers can restart their lookup in the (very rare) case a writer expanded the hash table. Add rcu heads in fib_alias and fib_node, use call_rcu() to defer their freeing, and use appropriate _rcu list manipulations. Stress test (160.000.000 udp frames sent, IP route cache disabled to mimic DDOS attack, FIB_HASH) Before: real 0m41.191s user 0m13.137s sys 8m55.241s After: real 0m38.091s user 0m13.189s sys 7m53.018s Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
First step for RCU conversion of fib_hash : struct fn_zone are created and never deleted. Very classic conversion, using rcu_assign_pointer(), rcu_dereference() and rtnl_dereference() verbs. __rcu markers on fz_next and fn_zone_list They are created under RTNL, we dont need fib_hash_lock anymore in fn_new_zone(). Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
While looking for false sharing problems, I noticed sizeof(struct fn_zone) was small (28 bytes) and possibly sharing a cache line with an often written kernel structure. Most of the time, fn_zone uses its initial hash table of 16 slots. We can avoid the false sharing problem by embedding this initial hash table in fn_zone itself, so that sizeof(fn_zone) > L1_CACHE_BYTES We did a similar optimization in commit a6501e08 (Reduce memory needs and speedup lookups) Add a fz_revorder field to speedup fn_hash() a bit. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Joe Perches 提交于
Use the standard macro to put this table in __devinitconst. Compiled, untested. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
In a network bench, I noticed an unfortunate false sharing between 'loopback_dev' and 'count' fields in "struct net". 'count' is written each time a socket is created or destroyed, while loopback_dev might be often read in routing code. Move loopback_dev in a read mostly section of "struct net" Note: struct netns_xfrm is cache line aligned on SMP. (It contains a "struct dst_ops") Move it at the end to avoid holes, and reduce sizeof(struct net) by 128 bytes on ia32. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ilpo Järvinen 提交于
As CWR is stronger than CA_Disorder state, we can miscount SACK/Reno failure into other timeouts. Not a bad problem as it can happen only due to ECN, FRTO detecting spurious RTO or xmit error which are the only callers of tcp_enter_cwr. And even then losses and RTO must still follow thereafter to actually end up into the relevant code paths. Compile tested. Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ilpo Järvinen 提交于
When only fast rexmit should be done, tcp_mark_head_lost marks L too far. Also, sacked_upto below 1 is perfectly valid number, the packets == 0 then needs to be trapped elsewhere. Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Giuseppe Cavallaro 提交于
Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com> Reported-by: NArmando Visconti <armando.visconti@st.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Harvey Harrison 提交于
Suppress a large block of warnings like: drivers/net/niu.c:7094:38: warning: incorrect type in assignment (different base types) drivers/net/niu.c:7094:38: expected restricted __be32 [usertype] ip4src drivers/net/niu.c:7094:38: got unsigned long long drivers/net/niu.c:7104:17: warning: cast from restricted __be32 ... Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 17 10月, 2010 16 次提交
-
-
由 Randy Dunlap 提交于
We have USB, PCMCIA, and gigabit ethernet drivers that select MII even though NET_ETHERNET is not enabled, so make MII not be dependent on NET_ETHERNET. It is still dependent on NET and NETDEVICES. Fixes kconfig unmet dependency warning (shortened, was very long string): warning: (ARM_AT91_ETHER && NETDEVICES && NET_ETHERNET && ARM && ARCH_AT91RM9200 || ARM_KS8695_ETHER && NETDEVICES && NET_ETHERNET && ARM && ARCH_KS8695 || ... || IP1000 && NETDEVICES && NETDEV_1000 && PCI && EXPERIMENTAL || HAMACHI && NETDEVICES && NETDEV_1000 && PCI || R8169 && NETDEVICES && NETDEV_1000 && PCI || SIS190 && NETDEVICES && NETDEV_1000 && PCI || VIA_VELOCITY && NETDEVICES && NETDEV_1000 && PCI || ATL1 && NETDEVICES && NETDEV_1000 && PCI || ATL1E && NETDEVICES && NETDEV_1000 && PCI && EXPERIMENTAL || ATL1C && NETDEVICES && NETDEV_1000 && PCI && EXPERIMENTAL || JME && NETDEVICES && NETDEV_1000 && PCI || STMMAC_ETH && NETDEV_1000 && NETDEVICES && HAS_IOMEM || USB_PEGASUS && NETDEVICES && USB && NET || USB_RTL8150 && NETDEVICES && USB && NET && EXPERIMENTAL || USB_USBNET && NETDEVICES && USB && NET || PCMCIA_SMC91C92 && NETDEVICES && NET_PCMCIA && PCMCIA) selects MII which has unmet direct dependencies (NETDEVICES && NET_ETHERNET) Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Acked-by: Jeff Garzik <jgarzik@pobox.com> [2006-NOV-30] Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Randy Dunlap 提交于
Fix kconfig dependency warning to satisfy dependencies: warning: (MLX4_EN && NETDEVICES && NETDEV_10000 && PCI && INET || MLX4_INFINIBAND && INFINIBAND) selects MLX4_CORE which has unmet direct dependencies (NETDEVICES && NETDEV_10000 && PCI) Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 stephen hemminger 提交于
These tables only contain function pointers. Signed-off-by: NStephen Hemminger <shemminger@vyatta.com> Acked-by: NGustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 stephen hemminger 提交于
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com> Acked-by: NGustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 stephen hemminger 提交于
Do some cleanups of TIPC based on make namespacecheck 1. Don't export unused symbols 2. Eliminate dead code 3. Make functions and variables local 4. Rename buf_acquire to tipc_buf_acquire since it is used in several files Compile tested only. This make break out of tree kernel modules that depend on TIPC routines. Signed-off-by: NStephen Hemminger <shemminger@vyatta.com> Acked-by: NJon Maloy <jon.maloy@ericsson.com> Acked-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 françois romieu 提交于
Full duplex only. Half duplex 1000 Mbps is not supported. Signed-off-by: NDavid Lv <DavidLv@viatech.com.cn> Acked-by: NFrancois Romieu <romieu@fr.zoreil.com> Tested-by: NSeguier Regis <rseguier@e-teleport.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
While doing profile analysis, I found fib_hash_table was sometime in a cache line shared by a possibly often written kernel structure. (CONFIG_IP_ROUTE_MULTIPATH || !CONFIG_IPV6_MULTIPLE_TABLES) It's hard to detect because not easily reproductible. Make sure we allocate a full cache line to keep this shared in all cpus caches. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
fib_table_lookup() might use fls() to speedup an open coded loop. Noticed while doing a profile analysis. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
fib_nl_delrule() calls synchronize_rcu() for no apparent reason, while rtnl is held. I suspect it was done to avoid an atomic_inc_not_zero() in fib_rules_lookup(), which commit 7fa7cb71 added anyway. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
Avoid two atomic ops on found rule in fib6_rule_lookup() Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Denis Kirjanov 提交于
Add ethtool stats support. Signed-off-by: NDenis Kirjanov <dkirjanov@kernel.org> Acked-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Carpenter 提交于
There were no curly braces in this if condition so it always enabled full duplex. And ecmd->speed is an unsigned short so it is never equal to -1. The effect is that mii_ethtool_sset() fails with -EINVAL and an error is printed to dmesg. Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Harvey Harrison 提交于
Their doesn't appear to be bugs with the endianness handling here, just get the annotations right to keep sparse happy. Suppresses the following sparse warnings: drivers/net/dnet.c:30:5: warning: symbol 'dnet_readw_mac' was not declared. Should it be static? drivers/net/dnet.c:49:6: warning: symbol 'dnet_writew_mac' was not declared. Should it be static? drivers/net/dnet.c:364:5: warning: symbol 'dnet_phy_marvell_fixup' was not declared. Should it be static? drivers/net/dnet.c:66:13: warning: incorrect type in assignment (different base types) drivers/net/dnet.c:66:13: expected unsigned short [unsigned] [usertype] tmp drivers/net/dnet.c:66:13: got restricted __be16 [usertype] <noident> drivers/net/dnet.c:68:13: warning: incorrect type in assignment (different base types) drivers/net/dnet.c:68:13: expected unsigned short [unsigned] [usertype] tmp drivers/net/dnet.c:68:13: got restricted __be16 [usertype] <noident> drivers/net/dnet.c:70:13: warning: incorrect type in assignment (different base types) drivers/net/dnet.c:70:13: expected unsigned short [unsigned] [usertype] tmp drivers/net/dnet.c:70:13: got restricted __be16 [usertype] <noident> drivers/net/dnet.c:92:27: warning: cast to restricted __be16 drivers/net/dnet.c:94:33: warning: cast to restricted __be16 drivers/net/dnet.c:96:33: warning: cast to restricted __be16 Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Harvey Harrison 提交于
Single bit signed bitfields don't make a lot of sense, noticed by sparse: drivers/net/cxgb4vf/t4vf_common.h:135:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:136:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:137:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:138:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:139:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:140:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:141:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:142:35: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:143:35: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:154:27: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:155:26: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:156:27: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:157:26: error: dubious one-bit signed bitfield Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
commit b30973f8 (node-aware skb allocation) spread a wrong habit of allocating net drivers skbs on a given memory node : The one closest to the NIC hardware. This is wrong because as soon as we try to scale network stack, we need to use many cpus to handle traffic and hit slub/slab management on cross-node allocations/frees when these cpus have to alloc/free skbs bound to a central node. skb allocated in RX path are ephemeral, they have a very short lifetime : Extra cost to maintain NUMA affinity is too expensive. What appeared as a nice idea four years ago is in fact a bad one. In 2010, NIC hardwares are multiqueue, or we use RPS to spread the load, and two 10Gb NIC might deliver more than 28 million packets per second, needing all the available cpus. Cost of cross-node handling in network and vm stacks outperforms the small benefit hardware had when doing its DMA transfert in its 'local' memory node at RX time. Even trying to differentiate the two allocations done for one skb (the sk_buff on local node, the data part on NIC hardware node) is not enough to bring good performance. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Acked-by: NTom Herbert <therbert@google.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Dumazet 提交于
Using standard skb allocations in r8169 leads to order-3 allocations (if PAGE_SIZE=4096), because NIC needs 16383 bytes, and skb overhead makes this bigger than 16384 -> 32768 bytes per "skb" Using kmalloc() permits to reduce memory requirements of one r8169 nic by 4Mbytes. (256 frames * 16Kbytes). This is fine since a hardware bug requires us to copy incoming frames, so we build real skb when doing this copy. Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 16 10月, 2010 1 次提交
-
-
由 John Fastabend 提交于
Remove a DCB check config from DCB configuration we continue to configure DCB even if it fails so don't even bother to check. Plus user space (lldpad) checks this before programming the hw anyways. Worse case is we program some values into the hw that don't make total sense resulting in incorrect bandwidth allocation. Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 10月, 2010 2 次提交
-
-
由 Carolyn Wyborny 提交于
Signed-off-by: NCarolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: NEmil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Emil Tantilov 提交于
Following patch fixes warnings reported by `make namespacecheck` Reported by Stephen Hemminger CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: NEmil Tantilov <emil.s.tantilov@intel.com> Tested-by: NStephen Ko <stephen.s.ko@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-