summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netfilter: ip6t_eui: fix read outside array boundsPatrick McHardy2009-08-311-7/+2
| | | | | | | | | Use memcmp() instead of open coded comparison that reads one byte past the intended end. Based on patch from Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
* netfilter: nf_conntrack: netns fix re reliable conntrack event deliveryAlexey Dobriyan2009-08-311-3/+3
| | | | | | | | Conntracks in netns other than init_net dying list were never killed. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Patrick McHardy <kaber@trash.net>
* ipvs: Use atomic operations atomiclySimon Horman2009-08-312-6/+7
| | | | | | | | | | A pointed out by Shin Hong, IPVS doesn't always use atomic operations in an atomic manner. While this seems unlikely to be manifest in strange behaviour, it seems appropriate to clean this up. Cc: shin hong <hongshin@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Patrick McHardy <kaber@trash.net>
* netfilter: nfnetlink: constify message attributes and headersPatrick McHardy2009-08-259-35/+55
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* netlink: constify nlmsghdr argumentsPatrick McHardy2009-08-255-12/+13
| | | | | | | | Consitfy nlmsghdr arguments to a couple of functions as preparation for the next patch, which will constify the netlink message data in all nfnetlink users. Signed-off-by: Patrick McHardy <kaber@trash.net>
* netfilter: nf_conntrack: log packets dropped by helpersPatrick McHardy2009-08-252-2/+10
| | | | | | | | Log packets dropped by helpers using the netfilter logging API. This is useful in combination with nfnetlink_log to analyze those packets in userspace for debugging. Signed-off-by: Patrick McHardy <kaber@trash.net>
* netfilter: bridge: refcount fixEric Dumazet2009-08-241-1/+1
| | | | | | | | | | | | | commit f216f082b2b37c4943f1e7c393e2786648d48f6f ([NETFILTER]: bridge netfilter: deal with martians correctly) added a refcount leak on in_dev. Instead of using in_dev_get(), we can use __in_dev_get_rcu(), as netfilter hooks are running under rcu_read_lock(), as pointed by Patrick. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
* netfilter: nf_nat: fix inverted logic for persistent NAT mappingsMaximilian Engelhardt2009-08-241-1/+1
| | | | | | | | | | | | | | | | | Kernel 2.6.30 introduced a patch [1] for the persistent option in the netfilter SNAT target. This is exactly what we need here so I had a quick look at the code and noticed that the patch is wrong. The logic is simply inverted. The patch below fixes this. Also note that because of this the default behavior of the SNAT target has changed since kernel 2.6.30 as it now ignores the destination IP in choosing the source IP for nating (which should only be the case if the persistent option is set). [1] http://git.eu.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=98d500d66cb7940747b424b245fc6a51ecfbf005 Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
* netfilter: xtables: mark initial tables constantJan Engelhardt2009-08-2422-37/+42
| | | | | | | The inputted table is never modified, so should be considered const. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
* Merge branch 'master' of git://dev.medozas.de/linuxPatrick McHardy2009-08-1079-1719/+210
|\
| * netfilter: xtables: check for standard verdicts in policiesJan Engelhardt2009-08-103-6/+57
| | | | | | | | | | | | | | | | | | | | This adds the second check that Rusty wanted to have a long time ago. :-) Base chain policies must have absolute verdicts that cease processing in the table, otherwise rule execution may continue in an unexpected spurious fashion (e.g. next chain that follows in memory). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: check for unconditionality of policiesJan Engelhardt2009-08-103-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a check that iptables's original author Rusty set forth in a FIXME comment. Underflows in iptables are better known as chain policies, and are required to be unconditional or there would be a stochastical chance for the policy rule to be skipped if it does not match. If that were to happen, rule execution would continue in an unexpected spurious fashion. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: ignore unassigned hooks in check_entry_size_and_hooksJan Engelhardt2009-08-103-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The "hook_entry" and "underflow" array contains values even for hooks not provided, such as PREROUTING in conjunction with the "filter" table. Usually, the values point to whatever the next rule is. For the upcoming unconditionality and underflow checking patches however, we must not inspect that arbitrary rule. Skipping unassigned hooks seems like a good idea, also because newinfo->hook_entry and newinfo->underflow will then continue to have the poison value for detecting abnormalities. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: use memcmp in unconditional checkJan Engelhardt2009-08-103-23/+9
| | | | | | | | | | | | | | | | | | Instead of inspecting each u32/char open-coded, clean up and make use of memcmp. On some arches, memcmp is implemented as assembly or GCC's __builtin_memcmp which can possibly take advantages of known alignment. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: iptables: remove unused datalen variableJan Engelhardt2009-08-101-4/+0
| | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: realign struct xt_target_paramJan Engelhardt2009-08-101-1/+1
| | | | | | | | | | | | | | This commit gets rid of a padding hole as reported by pahole(1). Saves 8 bytes on x86_64. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: switch table AFs to nfprotoJan Engelhardt2009-08-109-9/+9
| | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: switch hook PFs to nfprotoJan Engelhardt2009-08-1011-36/+36
| | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: conntrack: switch hook PFs to nfprotoJan Engelhardt2009-08-102-10/+10
| | | | | | | | | | | | | | Simple substitution to indicate that the fields indeed use the NFPROTO_ space. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove redirecting header filesJan Engelhardt2009-08-1042-618/+5
| | | | | | | | | | | | | | | | When IPv4 and IPv6 matches were unified approx. 3.5 years ago, they received new header filenames (e.g. xt_CLASSIFY.h). Let's remove the old ones now. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_owner v0Jan Engelhardt2009-08-105-158/+12
| | | | | | | | | | | | Superseded by xt_owner v1 (v2.6.24-2388-g0265ab4). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_mark v0Jan Engelhardt2009-08-103-84/+10
| | | | | | | | | | | | Superseded by xt_mark v1 (v2.6.24-2922-g17b0d7e). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_iprange v0Jan Engelhardt2009-08-104-69/+2
| | | | | | | | | | | | Superseded by xt_iprange v1 (v2.6.24-2928-g1a50c5a1). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_conntrack v0Jan Engelhardt2009-08-103-193/+1
| | | | | | | | | | | | Superseded by xt_conntrack v1 (v2.6.24-2921-g64eb12f). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_connmark v0Jan Engelhardt2009-08-103-98/+11
| | | | | | | | | | | | Superseded by xt_connmark v1 (v2.6.24-2919-g96e3227). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_MARK v0, v1Jan Engelhardt2009-08-103-174/+9
| | | | | | | | | | | | Superseded by xt_MARK v2 (v2.6.24-2918-ge0a812a). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_CONNMARK v0Jan Engelhardt2009-08-103-132/+11
| | | | | | | | | | | | Superseded by xt_CONNMARK v1 (v2.6.24-2917-g0dc8c76). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * netfilter: xtables: remove xt_TOS v0Jan Engelhardt2009-08-106-93/+0
| | | | | | | | | | | | Superseded by xt_TOS v1 (v2.6.24-2396-g5c350e5). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* | netfilter: ebtables: Use %pM conversion specifierTobias Klauser2009-08-101-22/+7
| | | | | | | | | | | | | | | | ebt_log uses its own implementation of print_mac to print MAC addresses. This patch converts it to use the %pM conversion specifier for printk. Signed-off-by: Tobias Klauser <klto@zhaw.ch> Signed-off-by: Patrick McHardy <kaber@trash.net>
* | netfilter: nf_conntrack: add SCTP support for SO_ORIGINAL_DSTRafael Laufer2009-08-101-4/+4
|/ | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* net: Avoid enqueuing skb for default qdiscsKrishna Kumar2009-08-064-51/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_queue_xmit enqueue's a skb and calls qdisc_run which dequeue's the skb and xmits it. In most cases, the skb that is enqueue'd is the same one that is dequeue'd (unless the queue gets stopped or multiple cpu's write to the same queue and ends in a race with qdisc_run). For default qdiscs, we can remove the redundant enqueue/dequeue and simply xmit the skb since the default qdisc is work-conserving. The patch uses a new flag - TCQ_F_CAN_BYPASS to identify the default fast queue. The controversial part of the patch is incrementing qlen when a skb is requeued - this is to avoid checks like the second line below: + } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) && >> !q->gso_skb && + !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) { Results of a 2 hour testing for multiple netperf sessions (1, 2, 4, 8, 12 sessions on a 4 cpu system-X). The BW numbers are aggregate Mb/s across iterations tested with this version on System-X boxes with Chelsio 10gbps cards: ---------------------------------- Size | ORG BW NEW BW | ---------------------------------- 128K | 156964 159381 | 256K | 158650 162042 | ---------------------------------- Changes from ver1: 1. Move sch_direct_xmit declaration from sch_generic.h to pkt_sched.h 2. Update qdisc basic statistics for direct xmit path. 3. Set qlen to zero in qdisc_reset. 4. Changed some function names to more meaningful ones. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlx4_en: Not using Shared Receive QueuesYevgeny Petrilin2009-08-065-73/+26
| | | | | | | | | We use 1:1 mapping between QPs and SRQs on receive side, so additional indirection level not required. Allocated the receive buffers for the RSS QPs. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlx4_en: Using real number of rings as RSS map sizeYevgeny Petrilin2009-08-064-41/+16
| | | | | | | | | There is no point in using more QPs then actual number of receive rings. If the RSS function for two streams gives the same result modulo number of rings, they will arrive to the same RX ring anyway. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlx4_en: Adaptive moderation policy changeYevgeny Petrilin2009-08-061-3/+9
| | | | | | | | | | If the net device is identified as "sender" (number of sent packets is higher then the number of received packets and the incoming packets are small), set the moderation time to its low limit. We do it because the incoming packets are acks, and we don't want to delay them Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: smsc911x: switch to new dev_pm_opsDaniel Mack2009-08-061-11/+20
| | | | | | | | | | Hibernation is unsupported for now, which meets the actual implementation in the driver. For free/thaw, the chip's D2 state should be entered. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tc35815: Use 0 RxFragSize.MinFrag value for non-packing modeAtsushi Nemoto2009-08-061-2/+0
| | | | | | | | | | | The datasheet say "When not enabling packing, the MinFrag value must remain at 0". Do not set value to RxFragSize register if TC35815_USE_PACKEDBUFFER disabled. This is not a bugfix. No real problem reported on this. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* tc35815: Fix rx_missed_errors countAtsushi Nemoto2009-08-061-1/+1
| | | | | | | | The Miss_Cnt register is cleared by reading. Accumulate its value to rx_missed_errors count. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* tc35815: Increase timeout for mdioAtsushi Nemoto2009-08-061-2/+4
| | | | | | | | | The current timeout value is too short for very high-load condition which jiffies might jump up in busy-loop. Also add minimum delay before checking completion of MDIO. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* tc35815: Improve BLEx / FDAEx handlingAtsushi Nemoto2009-08-061-34/+26
| | | | | | | | | Clear Int_BLEx / Int_FDAEx after (not before) processing Rx interrupt. This will reduce number of unnecessary interrupts. Also print rx error messages only if netif_msg_rx_err() enabled. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* tc35815: Disable StripCRCAtsushi Nemoto2009-08-061-3/+4
| | | | | | | | | | | | It seems Rx_StripCRC cause trouble on recovering from the BLEx (Buffer List Exhaust) or FDAEx (Free Descriptor Area Exhaust) condition. Do not use it. Also bump version number up. Reported-by: Ralf Roesch <ralf.roesch@rw-gmbh.de> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-08-0696-797/+2758
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * ath9k: fix compile warning on ath9k_hw_AR9287_check_eeprom()Luis R. Rodriguez2009-08-041-4/+9
| | | | | | | | | | | | | | | | | | | | CC [M] drivers/net/wireless/ath/ath9k/eeprom.o drivers/net/wireless/ath/ath9k/eeprom.c: In function ‘ath9k_hw_AR9287_check_eeprom’: drivers/net/wireless/ath/ath9k/eeprom.c:2866: warning: comparison of distinct pointer types lacks a cast Cc: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: FIF_PSPOLL filter flagIgor Perminov2009-08-044-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an interface is configured in the AP mode, the mac80211 implementation doesn't inform the driver to receive PS Poll frames. It leads to inability to communicate with power-saving stations reliably. The FIF_CONTROL flag isn't passed by mac80211 to ieee80211_ops.configure_filter when an interface is in the AP mode. And it's ok, because we don't want to receive ACK frames and other control ones, but only PS Poll ones. This patch introduces the FIF_PSPOLL filter flag in addition to FIF_CONTROL, which means for the driver "pass PS Poll frames". This flag is passed to the driver: A) When an interface is configured in the AP mode. B) In all cases, when the FIF_CONTROL flag was passed earlier (in addition to it). Signed-off-by: Igor Perminov <igor.perminov@inbox.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: cancel xmit poll work at stop() callbackLuis R. Rodriguez2009-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We forgot to cancel this work at the stop() callback. ------------[ cut here ]------------ WARNING: at net/mac80211/util.c:511 ieee80211_queue_delayed_work+0x3a/0x40 [mac80211]() Hardware name: 6460DWU queueing ieee80211 work while going to suspend Modules linked in: <-- snip --> Pid: 5124, comm: phy0 Tainted: G W 2.6.31-rc3-wl #4 Call Trace: [<ffffffffa03adcda>] ? ieee80211_queue_delayed_work+0x3a/0x40 [mac80211] [<ffffffff810552b8>] warn_slowpath_common+0x78/0xd0 [<ffffffff81055394>] warn_slowpath_fmt+0x64/0x70 [<ffffffff814ed2c9>] ? thread_return+0x3e/0x635 [<ffffffffa03adcda>] ieee80211_queue_delayed_work+0x3a/0x40 [mac80211] [<ffffffffa0297690>] ath_tx_complete_poll_work+0xc0/0x100 [ath9k] [<ffffffffa02975d0>] ? ath_tx_complete_poll_work+0x0/0x100 [ath9k] [<ffffffff81069b68>] worker_thread+0x178/0x260 [<ffffffff8106ecc0>] ? autoremove_wake_function+0x0/0x40 [<ffffffff810699f0>] ? worker_thread+0x0/0x260 [<ffffffff8106e89e>] kthread+0x9e/0xb0 [<ffffffff8101302a>] child_rip+0xa/0x20 [<ffffffff8106e800>] ? kthread+0x0/0xb0 [<ffffffff81013020>] ? child_rip+0x0/0x20 Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: add initial hardware support for ar9271Luis R. Rodriguez2009-08-044-40/+314
| | | | | | | | | | | | | | | | | | | | We will finalize this after some driver core changes, for now we leave this unsupported. Cc: Stephen Chen <stephen.chen@atheros.com> Cc: Zhifeng Cai <zhifeng.cai@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: add initvals and registry definitions for AR9271Luis R. Rodriguez2009-08-043-0/+694
| | | | | | | | | | | | | | Cc: Stephen Chen <stephen.chen@atheros.com> Cc: Zhifeng Cai <zhifeng.cai@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: add ar9271 revision and subrevision ID helpersLuis R. Rodriguez2009-08-041-0/+12
| | | | | | | | | | | | | | | | | | These will be used later to add support for ar9271. Cc: Stephen Chen <stephen.chen@atheros.com> Cc: Zhifeng Cai <zhifeng.cai@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Remove _t postfix for ar9287_eeprom structureLuis R. Rodriguez2009-08-043-12/+12
| | | | | | | | | | | | | | | | We don't use typdefs on ath9k, remove that _t. Cc: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: remove spurious check for channel on keycache resetLuis R. Rodriguez2009-08-041-3/+0
| | | | | | | | | | | | | | | | ath9k_hw_keyreset() has a spurious check for ah->curchan.. remove it. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: remove dangling error check on keycache reset on hw initLuis R. Rodriguez2009-08-041-3/+0
| | | | | | | | | | | | | | | | | | The keycache reset will not fail as right above we ensure to set the sc->keymax to be <= ah->caps.keycache_size. Just remove this dangling check. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud