summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * netfilter: ip_tables: unfold two critical loops in ip_packet_match()Eric Dumazet2009-02-201-12/+21
| | | | | | | | | | | | | | | | | | | | While doing oprofile tests I noticed two loops are not properly unrolled by gcc Using a hand coded unrolled loop provides nice speedup : ipt_do_table credited of 2.52 % of cpu instead of 3.29 % in tbench. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: x_tables: add LED trigger targetAdam Nielsen2009-02-206-0/+203
| | | | | | | | | | | | | | | | | | | | Kernel module providing implementation of LED netfilter target. Each instance of the target appears as a led-trigger device, which can be associated with one or more LEDs in /sys/class/leds/ Signed-off-by: Adam Nielsen <a.nielsen@shikadi.net> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: fix hardcoded size assumptionsHagen Paul Pfeifer2009-02-203-4/+6
| | | | | | | | | | | | | | | | | | get_random_bytes() is sometimes called with a hard coded size assumption of an integer. This could not be true for next centuries. This patch replace it with a compile time statement. Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: nf_conntrack: table max size should hold at least table sizeHagen Paul Pfeifer2009-02-202-2/+2
| | | | | | | | | | | | | | | | | | | | Table size is defined as unsigned, wheres the table maximum size is defined as a signed integer. The calculation of max is 8 or 4, multiplied the table size. Therefore the max value is aligned to unsigned. Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: iptables: lock free countersStephen Hemminger2009-02-205-102/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reader/writer lock in ip_tables is acquired in the critical path of processing packets and is one of the reasons just loading iptables can cause a 20% performance loss. The rwlock serves two functions: 1) it prevents changes to table state (xt_replace) while table is in use. This is now handled by doing rcu on the xt_table. When table is replaced, the new table(s) are put in and the old one table(s) are freed after RCU period. 2) it provides synchronization when accesing the counter values. This is now handled by swapping in new table_info entries for each cpu then summing the old values, and putting the result back onto one cpu. On a busy system it may cause sampling to occur at different times on each cpu, but no packet/byte counts are lost in the process. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Sucessfully tested on my dual quad core machine too, but iptables only (no ipv6 here) BTW, my new "tbench 8" result is 2450 MB/s, (it was 2150 MB/s not so long ago) Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: ip6_tables: unfold two loops in ip6_packet_match()Eric Dumazet2009-02-191-12/+21
| | | | | | | | | | | | | | | | ip6_tables netfilter module can use an ifname_compare() helper so that two loops are unfolded. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: xt_physdev: unfold two loops in physdev_mt()Eric Dumazet2009-02-191-11/+21
| | | | | | | | | | | | | | | | xt_physdev netfilter module can use an ifname_compare() helper so that two loops are unfolded. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: xtables: add backward-compat optionsJan Engelhardt2009-02-192-0/+36
| | | | | | | | | | | | | | | | Concern has been expressed about the changing Kconfig options. Provide the old options that forward-select. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: xt_physdev fixesEric Dumazet2009-02-181-12/+11Star
| | | | | | | | | | | | | | | | | | 1) physdev_mt() incorrectly assumes nulldevname[] is aligned on an int 2) It also uses word comparisons, while it could use long word ones. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: Combine ipt_ttl and ip6t_hl sourceJan Engelhardt2009-02-189-151/+117Star
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: Combine ipt_TTL and ip6t_HL sourceJan Engelhardt2009-02-189-226/+187Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by: James King <t.james.king@gmail.com> Similarly to commit c9fd49680954714473d6cbd2546d6ff120f96840, merge TTL and HL. Since HL does not depend on any IPv6-specific function, no new module dependencies would arise. With slight adjustments to the Kconfig help text. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: arp_tables: unfold two critical loops in arp_packet_match()Eric Dumazet2009-02-181-10/+34
| | | | | | | | | | | | | | | | | | | | x86 and powerpc can perform long word accesses in an efficient maner. We can use this to unroll two loops in arp_packet_match(), to perform arithmetic on long words instead of bytes. This is a win on x86_64 for example. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: log invalid new icmpv6 packet with nf_log_packet()Eric Leblond2009-02-181-0/+4
| | | | | | | | | | | | | | This patch adds a logging message for invalid new icmpv6 packet. Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: ebtables: remove unneeded initializationsStephen Hemminger2009-02-183-3/+0Star
| | | | | | | | | | | | | | | | The initialization of the lock element is not needed since the lock is always initialized in ebt_register_table. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: x_tables: remove unneeded initializationsStephen Hemminger2009-02-1810-11/+0Star
| | | | | | | | | | | | | | | | | | Later patches change the locking on xt_table and the initialization of the lock element is not needed since the lock is always initialized in xt_table_register anyway. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: x_tables: change elements in x_tablesStephen Hemminger2009-02-181-5/+4Star
| | | | | | | | | | | | | | | | Change to proper type on private pointer rather than anonymous void. Keep active elements on same cache line. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: remove unneeded gotoJan Engelhardt2009-02-181-2/+0Star
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
| * netfilter: change generic l4 protocol numberChristoph Paasch2009-02-181-1/+1
| | | | | | | | | | | | | | | | 0 is used by Hop-by-hop header and so this may cause confusion. 255 is stated as 'Reserved' by IANA. Signed-off-by: Christoph Paasch <christoph.paasch@student.uclouvain.be> Signed-off-by: Patrick McHardy <kaber@trash.net>
* | ucc_geth: Fix build breakage caused by a mergeAnton Vorontsov2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes following build error: CC ucc_geth.o ucc_geth.c: In function 'ucc_geth_probe': ucc_geth.c:3644: error: implicit declaration of function 'uec_mdio_bus_name' make[2]: *** [ucc_geth.o] Error 1 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ucc_geth: Fix merge error.David S. Miller2009-03-241-5/+0Star
| | | | | | | | | | | | | | I left a merge failure unresolved, noticed by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
* | fsl_pq_mdio: Use proper address translationAnton Vorontsov2009-03-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the driver just read "reg" property for constructing MDIO bus IDs, but this won't work when we'll start using "ranges = <>" in the device tree, so this will pop up: Freescale PowerQUICC MII Bus: probed sysfs: duplicate filename 'mdio@520' can not be created ------------[ cut here ]------------ Badness at c00cb6b8 [verbose debug info unavailable] NIP: c00cb6b8 LR: c00cb6b8 CTR: c001271c REGS: cf82fc10 TRAP: 0700 Not tainted (2.6.29-rc7-03702-g7ccd10f) MSR: 00029032 <EE,ME,CE,IR,DR> CR: 42044022 XER: 20000000 TASK = cf81fbd0[1] 'swapper' THREAD: cf82e000 GPR00: c00cb6b8 cf82fcc0 cf81fbd0 0000003b 00000e42 ffffffff 00004000 00000e42 GPR08: c03cb0fc c03bfbdc 00000e42 c03cac50 22044022 1006a2bc 0ffcb000 00000000 GPR16: 0ffc04b0 0ffc5a40 00000000 0ffc79a8 0f7863a8 00000004 00000000 00000000 GPR24: c033a6a8 d1014520 cf85e840 cf82fd08 cf87cf2c cf82fcd8 cf85dea8 ffffffef NIP [c00cb6b8] sysfs_add_one+0x4c/0x54 LR [c00cb6b8] sysfs_add_one+0x4c/0x54 Call Trace: [cf82fcc0] [c00cb6b8] sysfs_add_one+0x4c/0x54 (unreliable) [cf82fcd0] [c00cbc18] create_dir+0x58/0xc0 [cf82fd00] [c00cbcc0] sysfs_create_dir+0x40/0x70 [cf82fd20] [c0159388] create_dir+0x28/0x78 [cf82fd30] [c0159824] kobject_add_internal+0x98/0x13c [cf82fd50] [c0159e98] kobject_add+0x60/0x98 [cf82fd80] [c018a480] device_add+0x98/0x2ac [cf82fda0] [c01a2380] mdiobus_register+0xbc/0x1c0 [cf82fdc0] [c019f31c] fsl_pq_mdio_probe+0x284/0x2a0 [cf82fe00] [c0223814] of_platform_device_probe+0x5c/0x84 ... This patch fixes the issue by translating the "reg" property to a full address, and thus avoids the duplicate names. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | spider_net: Add missing .ndo_validate_addrDavid S. Miller2009-03-231-0/+1
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | myri_sbus/sunbmac/sunlance/sunqe: Add missing net_device_ops entries.David S. Miller2009-03-234-0/+11
| | | | | | | | | | | | Noticed by Stephen Hemminger. Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2009-03-2311-62/+113
|\ \ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ucc_geth.c
| * | ucc_geth: Fix oops when using fixed-link supportAnton Vorontsov2009-03-232-26/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b1c4a9dddf09fe99b8f88252718ac5b357363dc4 ("ucc_geth: Change uec phy id to the same format as gianfar's") introduced a regression in the ucc_geth driver that causes this oops when fixed-link is used: Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xc0151270 Oops: Kernel access of bad area, sig: 11 [#1] TMCUTU NIP: c0151270 LR: c0151270 CTR: c0017760 REGS: cf81fa60 TRAP: 0300 Not tainted (2.6.29-rc8) MSR: 00009032 <EE,ME,IR,DR> CR: 24024042 XER: 20000000 DAR: 00000000, DSISR: 20000000 TASK = cf81cba0[1] 'swapper' THREAD: cf81e000 GPR00: c0151270 cf81fb10 cf81cba0 00000000 c0272e20 c025f354 00001e80 cf86b08c GPR08: d1068200 cffffb74 06000000 d106c200 42024042 10085148 0fffd000 0ffc81a0 GPR16: 00000001 00000001 00000000 007ffeb0 00000000 0000c000 cf83f36c cf83f000 GPR24: 00000030 cf83f360 cf81fb20 00000000 d106c200 20000000 00001e80 cf83f360 NIP [c0151270] ucc_geth_open+0x330/0x1efc LR [c0151270] ucc_geth_open+0x330/0x1efc Call Trace: [cf81fb10] [c0151270] ucc_geth_open+0x330/0x1efc (unreliable) [cf81fba0] [c0187638] dev_open+0xbc/0x12c [cf81fbc0] [c0187e38] dev_change_flags+0x8c/0x1b0 This patch fixes the issue by removing offending (and somewhat duplicate) code from init_phy() routine, and changes _probe() function to use uec_mdio_bus_name(). Also, since we fully construct phy_bus_id in the _probe() routine, we no longer need ->phy_address and ->mdio_bus fields in ucc_geth_info structure. I wish the patch would be a bit shorter, but it seems like the only way to fix the issue in a sane way. Luckily, the patch has been tested with real PHYs and fixed-link, so no further regressions expected. Reported-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Tested-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | dm9000: locking bugfixDavid Brownell2009-03-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a locking bug in the dm9000 driver. It calls request_irq() without setting IRQF_DISABLED ... which is correct for handlers that support IRQ sharing, since that behavior is not guaranteed for shared IRQs. However, its IRQ handler then wrongly assumes that IRQs are blocked. So the fix just uses the right spinlock primitives in the IRQ handler. NOTE: this is a classic example of the type of bug which lockdep currently masks by forcibly setting IRQF_DISABLED on IRQ handlers that did not request that flag. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: update dnet.c for bus_id removalStephen Rothwell2009-03-231-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | dnet: DNET should depend on HAS_IOMEMIlya Yanok2009-03-221-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | dca: add missing copyright/license headersMaciej Sosnowski2009-03-212-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | In two dca files copyright and license headers are missing. This patch adds them there. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | Merge branch 'master' of ↵David S. Miller2009-03-201-0/+11
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| | * | nl80211: Check that function pointer != NULL before using itJouni Malinen2009-03-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NL80211_CMD_GET_MESH_PARAMS and NL80211_CMD_SET_MESH_PARAMS handlers did not verify whether a function pointer is NULL (not supported by the driver) before trying to call the function. The former nl80211 command is available for unprivileged users, too, so this can potentially allow normal users to kill networking (or worse..) if mac80211 is built without CONFIG_MAC80211_MESH=y. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | | sungem: missing net_device_opsStephen Hemminger2009-03-201-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sungem driver only got partially converted to net_device_ops. Since this could cause bugs, please push this to 2.6.29 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycleSathya Perla2009-03-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a patch to reconfigure vlan-ids during an i/f down/up cycle Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | be2net: replenish when posting to rx-queue is starved in out of mem conditionsSathya Perla2009-03-202-21/+30
| |/ / | | | | | | | | | | | | | | | | | | | | | This is a patch to replenish the rx-queue when it is in a starved state (due to out-of-mem conditions) Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | sunqe: Convert to net_device_ops.David S. Miller2009-03-231-5/+9
| | | | | | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | | sunlance: Convert to net_device_ops.David S. Miller2009-03-231-5/+9
| | | | | | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | | sunbmac: Convert to net_device_ops.David S. Miller2009-03-231-9/+10
| | | | | | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | | myri_sbus: Convert to net_device_ops.David S. Miller2009-03-231-6/+10
| | | | | | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | | atl1c: remove duplicated #includeHuang Weiyi2009-03-231-1/+0Star
| | | | | | | | | | | | | | | | | | | | | Remove duplicated #include in drivers/net/atl1c/atl1c.h. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | spider_net: Fix build.David S. Miller2009-03-231-9/+9
| | | | | | | | | | | | | | | | | | Based upon a report by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
* | | tcp: Discard segments that ack data not yet sentJohn Dykstra2009-03-231-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discard incoming packets whose ack field iincludes data not yet sent. This is consistent with RFC 793 Section 3.9. Change tcp_ack() to distinguish between too-small and too-large ack field values. Keep segments with too-large ack fields out of the fast path, and change slow path to discard them. Reported-by: Oliver Zheng <mailinglists+netdev@oliverzheng.com> Signed-off-by: John Dykstra <john.dykstra1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Adding licensing to bnx2x_init_values.hEilon Greenstein2009-03-231-1/+17
| | | | | | | | | | | | | | | Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netdev: expose net_device_ops compat as config optionStephen Hemminger2009-03-222-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that most network device drivers in (all but one in x86_64 allmodconfig) support net_device_ops. Expose it as a configuration parameter. Still need to address even older 32 bit drivers, and other arch before compatiablity can be scheduled for removal in some future release. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | hostap: convert to net_device_opsStephen Hemminger2009-03-222-18/+52
| | | | | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | hostap: convert to internal net_device_statsStephen Hemminger2009-03-225-33/+11Star
| | | | | | | | | | | | | | | | | | | | | Use pre-existing net_device_stats in network_device struct. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipw2200: convert to net_device_opsStephen Hemminger2009-03-221-8/+22
| | | | | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipw2100: convert to net_device_opsStephen Hemminger2009-03-221-5/+12
| | | | | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipw2x00: convert infrastructure for use by net_device_opsStephen Hemminger2009-03-223-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Expose routines so drivers can hook. Only set ptrs in netdev if using old compat code. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipw2x00: convert to internal net_device_statsStephen Hemminger2009-03-226-77/+49Star
| | | | | | | | | | | | | | | | | | | | | | | | Replace struct in ieee with current net_device_stats, so no longer need get_stats hook Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | libertas: convert to net_device_opsStephen Hemminger2009-03-221-16/+29
| | | | | | | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>