aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2011-12-05infiniband: addr: Consolidate code to fetch neighbour hardware address from dst.David Miller1-26/+21
IPV4 should do exactly what the IPV6 code does here, which is use the neighbour obtained via the dst entry. And now that the two code paths do the same thing, use a common helper function to perform the operation. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Roland Dreier <roland@purestorage.com>
2011-12-05net: Rename dst_get_neighbour{, _raw} to dst_get_neighbour_noref{, _raw}.David Miller29-58/+58
To reflect the fact that a refrence is not obtained to the resulting neighbour entry. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Roland Dreier <roland@purestorage.com>
2011-12-04tcp: tcp_sendmsg() page recyclingEric Dumazet1-1/+6
If our TCP_PAGE(sk) is not shared (page_count() == 1), we can set page offset to 0. This permits better filling of the pages on small to medium tcp writes. "tbench 16" results on my dev server (2x4x2 machine) : Before : 3072 MB/s After : 3146 MB/s (2.4 % gain) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04tcp: take care of misalignmentsEric Dumazet3-8/+24
We discovered that TCP stack could retransmit misaligned skbs if a malicious peer acknowledged sub MSS frame. This currently can happen only if output interface is non SG enabled : If SG is enabled, tcp builds headless skbs (all payload is included in fragments), so the tcp trimming process only removes parts of skb fragments, header stay aligned. Some arches cant handle misalignments, so force a head reallocation and shrink headroom to MAX_TCP_HEADER. Dont care about misaligments on x86 and PPC (or other arches setting NET_IP_ALIGN to 0) This patch introduces __pskb_copy() which can specify the headroom of new head, and pskb_copy() becomes a wrapper on top of __pskb_copy() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04sfc: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer3-4/+4
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04ll_temac: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer1-1/+1
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04enic: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer1-1/+1
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04bnx2x: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer2-3/+3
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-04tcp: drop SYN+FIN messagesEric Dumazet1-0/+2
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag 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>
2011-12-03ipv6: Kill ndisc_get_neigh() inline helper.David S. Miller2-12/+4
It's only used in net/ipv6/route.c and the NULL device check is superfluous for all of the existing call sites. Just expand the __ndisc_lookup_errno() call at each location. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-03ipv6: Various cleanups in route.cDavid S. Miller1-47/+48
1) x == NULL --> !x 2) x != NULL --> x 3) (x&BIT) --> (x & BIT) 4) (BIT1|BIT2) --> (BIT1 | BIT2) 5) proper argument and struct member alignment Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-03ipv6: Various cleanups in ip6_route.cDavid S. Miller1-59/+56
1) x == NULL --> !x 2) x != NULL --> x 3) if() --> if () 4) while() --> while () 5) (x & BIT) == 0 --> !(x & BIT) 6) (x&BIT) --> (x & BIT) 7) x=y --> x = y 8) (BIT1|BIT2) --> (BIT1 | BIT2) 9) if ((x & BIT)) --> if (x & BIT) 10) proper argument and struct member alignment Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-03net: Add Open vSwitch kernel components.Jesse Gross20-0/+5874
Open vSwitch is a multilayer Ethernet switch targeted at virtualized environments. In addition to supporting a variety of features expected in a traditional hardware switch, it enables fine-grained programmatic extension and flow-based control of the network. This control is useful in a wide variety of applications but is particularly important in multi-server virtualization deployments, which are often characterized by highly dynamic endpoints and the need to maintain logical abstractions for multiple tenants. The Open vSwitch datapath provides an in-kernel fast path for packet forwarding. It is complemented by a userspace daemon, ovs-vswitchd, which is able to accept configuration from a variety of sources and translate it into packet processing rules. See http://openvswitch.org for more information and userspace utilities. Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-12-03ipv6: Add fragment reporting to ipv6_skip_exthdr().Jesse Gross17-19/+45
While parsing through IPv6 extension headers, fragment headers are skipped making them invisible to the caller. This reports the fragment offset of the last header in order to make it possible to determine whether the packet is fragmented and, if so whether it is a first or last fragment. Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-12-03vlan: Move vlan_set_encap_proto() to vlan header filePravin B Shelar2-33/+34
Open vSwitch needs this function for vlan handling. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-12-03genetlink: Add rcu_dereference_genl and genl_dereference.Jesse Gross1-0/+21
This adds rcu_dereference_genl and genl_dereference, which are genl variants of the RTNL functions to enforce proper locking with lockdep and sparse. Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-12-03genetlink: Add lockdep_genl_is_held().Pravin B Shelar2-0/+11
Open vSwitch uses genl_mutex locking to protect datapath data-structures like flow-table, flow-actions. Following patch adds lockdep_genl_is_held() which is used for rcu annotation to prove locking. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-12-03genetlink: Add genl_notify()Pravin B Shelar2-0/+15
Open vSwitch uses Generic Netlink interface for communication between userspace and kernel module. genl_notify() is used for sending notification back to userspace. genl_notify() is analogous to rtnl_notify() but uses genl_sock instead of rtnl. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-12-02atm: clip: Remove code commented out since eternity.David S. Miller1-9/+0
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-02forcedeath: Fix bql support for forcedeathIgor Maravic1-2/+3
Moved netdev_completed_queue() out of while loop in function nv_tx_done_optimized(). Because this function was in while loop, BUG_ON(count > dql->num_queued - dql->num_completed) was hit in dql_completed(). Signed-off-by: Igor Maravic <igorm@etf.rs> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-02niu: Fix typo in comment.David S. Miller1-1/+1
Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01netfilter: Remove ADVANCED dependency from NF_CONNTRACK_NETBIOS_NSDavid S. Miller1-1/+0
firewalld in Fedora 16 needs this. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01niu: Add support for byte queue limits.David S. Miller1-1/+11
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01niu: Remove redundant PHY ID test.David S. Miller1-2/+4
Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01ipv4: flush route cache after change accept_localPeter Pan(潘卫平)1-0/+5
After reset ipv4_devconf->data[IPV4_DEVCONF_ACCEPT_LOCAL] to 0, we should flush route cache, or it will continue receive packets with local source address, which should be dropped. Signed-off-by: Weiping Pan <panweiping3@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01sch_red: fix red_changeEric Dumazet1-2/+2
Le mercredi 30 novembre 2011 à 14:36 -0800, Stephen Hemminger a écrit : > (Almost) nobody uses RED because they can't figure it out. > According to Wikipedia, VJ says that: > "there are not one, but two bugs in classic RED." RED is useful for high throughput routers, I doubt many linux machines act as such devices. I was considering adding Adaptative RED (Sally Floyd, Ramakrishna Gummadi, Scott Shender), August 2001 In this version, maxp is dynamic (from 1% to 50%), and user only have to setup min_th (target average queue size) (max_th and wq (burst in linux RED) are automatically setup) By the way it seems we have a small bug in red_change() if (skb_queue_empty(&sch->q)) red_end_of_idle_period(&q->parms); First, if queue is empty, we should call red_start_of_idle_period(&q->parms); Second, since we dont use anymore sch->q, but q->qdisc, the test is meaningless. Oh well... [PATCH] sch_red: fix red_change() Now RED is classful, we must check q->qdisc->q.qlen, and if queue is empty, we start an idle period, not end it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01Linux 3.2-rc4Linus Torvalds1-1/+1
2011-12-01ocfs2: avoid unaligned access to dqc_bitmapAkinobu Mita2-5/+52
The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned, but not 64-bit aligned. The dqc_bitmap is accessed by ocfs2_set_bit(), ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit(). These are wrapper macros for ext2_*_bit() which need to take an unsigned long aligned address (though some architectures are able to handle unaligned address correctly) So some 64bit architectures may not be able to access the dqc_bitmap correctly. This avoids such unaligned access by using another wrapper functions for ext2_*_bit(). The code is taken from fs/ext4/mballoc.c which also need to handle unaligned bitmap access. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-12-01dccp: Fix compile warning in probe code.David S. Miller1-2/+12
Commit 1386be55e32a3c5d8ef4a2b243c530a7b664c02c ("dccp: fix auto-loading of dccp(_probe)") fixed a bug but created a new compiler warning: net/dccp/probe.c: In function ‘dccpprobe_init’: net/dccp/probe.c:166:2: warning: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand [-Wparentheses] try_then_request_module() is built for situations where the "existence" test is some lookup function that returns a non-NULL object on success, and with a reference count of some kind held. Here we're looking for a success return of zero from the jprobe registry. Instead of fighting the way try_then_request_module() works, simply open code what we want to happen in a local helper function. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01net: Make ndo_neigh_destroy return void.David S. Miller1-1/+1
The return value isn't used. Suggested by Ben Hucthings. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01Revert "udp: remove redundant variable"David S. Miller2-14/+16
This reverts commit 81d54ec8479a2c695760da81f05b5a9fb2dbe40a. If we take the "try_again" goto, due to a checksum error, the 'len' has already been truncated. So we won't compute the same values as the original code did. Reported-by: paul bilke <fsmail@conspiracy.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01bridge: master device stuck in no-carrier state forever when in user-stp modeVitalii Demianets2-15/+20
When in user-stp mode, bridge master do not follow state of its slaves, so after the following sequence of events it can stuck forever in no-carrier state: 1) turn stp off 2) put all slaves down - master device will follow their state and also go in no-carrier state 3) turn stp on with bridge-stp script returning 0 (go to the user-stp mode) Now bridge master won't follow slaves' state and will never reach running state. This patch solves the problem by making user-stp and kernel-stp behavior similar regarding master following slaves' states. Signed-off-by: Vitalii Demianets <vitas@nppfactor.kiev.ua> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01ipv4: Perform peer validation on cached route lookup.David S. Miller1-7/+19
Otherwise we won't notice the peer GENID change. Reported-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01ipv4: use a 64bit load/store in output pathEric Dumazet2-5/+21
gcc compiler is smart enough to use a single load/store if we memcpy(dptr, sptr, 8) on x86_64, regardless of CONFIG_CC_OPTIMIZE_FOR_SIZE In IP header, daddr immediately follows saddr, this wont change in the future. We only need to make sure our flowi4 (saddr,daddr) fields wont break the rule. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01dccp: Evaluate ip_hdr() only once in dccp_v4_route_skb().David S. Miller1-2/+3
This also works around a bogus gcc warning generated by an upcoming patch from Eric Dumazet that rearranges the layout of struct flowi4. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01powerpc: tqm8548/tqm8xx: add and update CAN device nodesWolfgang Grandegger3-10/+53
This patch enables or updates support for the CC770 and AN82527 CAN controller on the TQM8548 and TQM8xx boards. CC: devicetree-discuss@lists.ozlabs.org CC: linuxppc-dev@ozlabs.org CC: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01can: cc770: add platform bus driver for the CC770 and AN82527Wolfgang Grandegger4-0/+333
This driver works with both, static platform data and device tree bindings. It has been tested on a TQM855L board with two AN82527 CAN controllers on the local bus. CC: Devicetree-discuss@lists.ozlabs.org CC: linuxppc-dev@ozlabs.org CC: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01can: cc770: add legacy ISA bus driver for the CC770 and AN82527Wolfgang Grandegger3-0/+379
This patch adds support for legacy Bosch CC770 and Intel AN82527 CAN controllers on the ISA or PC-104 bus. The I/O port or memory address and the IRQ number must be specified via module parameters: insmod cc770_isa.ko port=0x310,0x380 irq=7,11 for ISA devices using I/O ports or: insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 for memory mapped ISA devices. Indirect access via address and data port is supported as well: insmod cc770_isa.ko port=0x310,0x380 indirect=1 irq=7,11 Furthermore, the following mode parameter can be defined: clk: External oscillator clock frequency (default=16000000 [16 MHz]) cir: CPU interface register (default=0x40 [DSC]) bcr: Bus configuration register (default=0x40 [CBY]) cor: Clockout register (default=0x00) Note: for clk, cir, bcr and cor, the first argument re-defines the default for all other devices, e.g.: insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000 is equivalent to insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000,24000000 Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01can: cc770: add driver core for the Bosch CC770 and Intel AN82527Wolfgang Grandegger7-0/+1130
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01icplus: mdio_write(), remove unnecessary for loopPatrick Kelle1-10/+3
At this point the variable j is always set to 7 and the code within the loop has to run only once anyway. As suggested by David Miller: "You can simply this even further since p[7] is what is used here, and this means len is one, the inner loop therefore executes only once, and the p[7].field value is not used (it's zero in the table) and the write to it is completely thrown away." Signed-off-by: Patrick Kelle <patrick.kelle81@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01net: net_device flags is an unsigned intEric Dumazet1-7/+7
commit b00055aacdb ([NET] core: add RFC2863 operstate) changed net_device flags from unsigned short to unsigned int. Some core functions still assume its an unsigned short. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01dsa: Include linux/if_ether.h to fix build errorAxel Lin1-0/+1
Include linux/if_ether.h to fix below build errors: CC arch/arm/mach-kirkwood/common.o In file included from arch/arm/mach-kirkwood/common.c:19: include/net/dsa.h: In function 'dsa_uses_dsa_tags': include/net/dsa.h:192: error: 'ETH_P_DSA' undeclared (first use in this function) include/net/dsa.h:192: error: (Each undeclared identifier is reported only once include/net/dsa.h:192: error: for each function it appears in.) include/net/dsa.h: In function 'dsa_uses_trailer_tags': include/net/dsa.h:197: error: 'ETH_P_TRAILER' undeclared (first use in this function) make[1]: *** [arch/arm/mach-kirkwood/common.o] Error 1 make: *** [arch/arm/mach-kirkwood] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01netem: fix build error on 32bit archesEric Dumazet1-1/+4
ERROR: "__udivdi3" [net/sched/sch_netem.ko] undefined! Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-01Btrfs: fix meta data raid-repair merge problemJan Schmidt1-7/+20
Commit 4a54c8c16 introduced raid-repair, killing the individual readpage_io_failed_hook entries from inode.c and disk-io.c. Commit 4bb31e92 introduced new readahead code, adding a readpage_io_failed_hook to disk-io.c. The raid-repair commit had logic to disable raid-repair, if readpage_io_failed_hook is set. Thus, the readahead commit effectively disabled raid-repair for meta data. This commit changes the logic to always attempt raid-repair when needed and call the readpage_io_failed_hook in case raid-repair fails. This is much more straight forward and should have been like that from the beginning. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Reported-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-11-30net/core: fix rollback handler in register_netdevice_notifierRongQing.Li1-1/+2
Within nested statements, the break statement terminates only the do, for, switch, or while statement that immediately encloses it, So replace the break with goto. Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-30caif: Remove unused attributes from struct cflayersjur.brandeland@stericsson.com1-4/+0
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-30caif: Remove unused enum and parameter in cfserlsjur.brandeland@stericsson.com4-19/+4
Remove unused enum cfcnfg_phy_type and the parameter to cfserl_create. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-30caif: Restructure how link caif link layer enrollsjur.brandeland@stericsson.com4-90/+132
Enrolling CAIF link layers are refactored. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-30caif: Allow cfpkt_extr_head to process empty messagesjur.brandeland@stericsson.com1-1/+2
Allow NULL pointer in cfpkt_extr_head in order to skip past header data. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-30sch_red: fix red_calc_qavg_from_idle_timeEric Dumazet1-9/+6
Since commit a4a710c4a7490587 (pkt_sched: Change PSCHED_SHIFT from 10 to 6) it seems RED/GRED are broken. red_calc_qavg_from_idle_time() computes a delay in us units, but this delay is now 16 times bigger than real delay, so the final qavg result smaller than expected. Use standard kernel time services since there is no need to obfuscate them. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>