1. 12 6月, 2013 1 次提交
  2. 11 6月, 2013 4 次提交
  3. 08 6月, 2013 4 次提交
  4. 07 6月, 2013 1 次提交
  5. 05 6月, 2013 1 次提交
  6. 03 6月, 2013 1 次提交
  7. 01 6月, 2013 4 次提交
  8. 31 5月, 2013 4 次提交
  9. 29 5月, 2013 4 次提交
  10. 28 5月, 2013 4 次提交
    • D
      netpoll: remove return value from netpoll_rx_disable() · da6e378b
      dingtianhong 提交于
      The netpoll_rx_disable() will always return 0, it is no use and looks wordy,
      so remove the unnecessary code and get rid of it in _dev_open and _dev_close.
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da6e378b
    • S
      MPLS: Add limited GSO support · 0d89d203
      Simon Horman 提交于
      In the case where a non-MPLS packet is received and an MPLS stack is
      added it may well be the case that the original skb is GSO but the
      NIC used for transmit does not support GSO of MPLS packets.
      
      The aim of this code is to provide GSO in software for MPLS packets
      whose skbs are GSO.
      
      SKB Usage:
      
      When an implementation adds an MPLS stack to a non-MPLS packet it should do
      the following to skb metadata:
      
      * Set skb->inner_protocol to the old non-MPLS ethertype of the packet.
        skb->inner_protocol is added by this patch.
      
      * Set skb->protocol to the new MPLS ethertype of the packet.
      
      * Set skb->network_header to correspond to the
        end of the L3 header, including the MPLS label stack.
      
      I have posted a patch, "[PATCH v3.29] datapath: Add basic MPLS support to
      kernel" which adds MPLS support to the kernel datapath of Open vSwtich.
      That patch sets the above requirements in datapath/actions.c:push_mpls()
      and was used to exercise this code.  The datapath patch is against the Open
      vSwtich tree but it is intended that it be added to the Open vSwtich code
      present in the mainline Linux kernel at some point.
      
      Features:
      
      I believe that the approach that I have taken is at least partially
      consistent with the handling of other protocols.  Jesse, I understand that
      you have some ideas here.  I am more than happy to change my implementation.
      
      This patch adds dev->mpls_features which may be used by devices
      to advertise features supported for MPLS packets.
      
      A new NETIF_F_MPLS_GSO feature is added for devices which support
      hardware MPLS GSO offload.  Currently no devices support this
      and MPLS GSO always falls back to software.
      
      Alternate Implementation:
      
      One possible alternate implementation is to teach netif_skb_features()
      and skb_network_protocol() about MPLS, in a similar way to their
      understanding of VLANs. I believe this would avoid the need
      for net/mpls/mpls_gso.c and in particular the calls to
      __skb_push() and __skb_push() in mpls_gso_segment().
      
      I have decided on the implementation in this patch as it should
      not introduce any overhead in the case where mpls_gso is not compiled
      into the kernel or inserted as a module.
      
      MPLS GSO suggested by Jesse Gross.
      Based in part on "v4 GRE: Add TCP segmentation offload for GRE"
      by Pravin B Shelar.
      
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Pravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d89d203
    • S
      net: Use 16bits for *_headers fields of struct skbuff · 1a37e412
      Simon Horman 提交于
      In order to mitigate ongoing incresase in the size of struct skbuff
      use 16 bit integer offsets rather than pointers for inner_*_headers.
      
      This appears to reduce the size of struct skbuff from 0xd0 to 0xc0
      bytes on x86_64 with the following all unset.
      
      	CONFIG_XFRM
      	CONFIG_NF_CONNTRACK
      	CONFIG_NF_CONNTRACK_MODULE
      	NET_SKBUFF_NF_DEFRAG_NEEDED
      	CONFIG_BRIDGE_NETFILTER
      	CONFIG_NET_SCHED
      	CONFIG_IPV6_NDISC_NODETYPE
      	CONFIG_NET_DMA
      	CONFIG_NETWORK_SECMARK
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a37e412
    • F
      phy: allow drivers to flag a PHY device as internal · 4284b6a5
      Florian Fainelli 提交于
      libphy currently always reports a PHY as an external transceiver from
      the ethtool output. This is inaccurate, because some drivers should be
      able to tell that a PHY device is an internal transceiver of an Ethernet
      MAC. Add a new flag (PHY_IS_INTERNAL) which can be set by PHY drivers
      just like other flags, and a corresponding helper: phy_is_internal()
      which can be used by networking drivers to query if a given
      PHY device is internal.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4284b6a5
  11. 26 5月, 2013 1 次提交
  12. 25 5月, 2013 4 次提交
    • R
      linux/kernel.h: fix kernel-doc warning · 7450231f
      Randy Dunlap 提交于
      Fix kernel-doc warning in <linux/kernel.h>:
      
        Warning(include/linux/kernel.h:590): No description found for parameter 'ip'
      
      scripts/kernel-doc cannot handle macros, functions, or function
      prototypes between the function or macro that is being documented and
      its definition, so move these prototypes above the function that is
      being documented.
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7450231f
    • I
      wait: fix false timeouts when using wait_event_timeout() · 4c663cfc
      Imre Deak 提交于
      Many callers of the wait_event_timeout() and
      wait_event_interruptible_timeout() expect that the return value will be
      positive if the specified condition becomes true before the timeout
      elapses.  However, at the moment this isn't guaranteed.  If the wake-up
      handler is delayed enough, the time remaining until timeout will be
      calculated as 0 - and passed back as a return value - even if the
      condition became true before the timeout has passed.
      
      Fix this by returning at least 1 if the condition becomes true.  This
      semantic is in line with what wait_for_condition_timeout() does; see
      commit bb10ed09 ("sched: fix wait_for_completion_timeout() spurious
      failure under heavy load").
      
      Daniel said "We have 3 instances of this bug in drm/i915.  One case even
      where we switch between the interruptible and not interruptible
      wait_event_timeout variants, foolishly presuming they have the same
      semantics.  I very much like this."
      
      One such bug is reported at
        https://bugs.freedesktop.org/show_bug.cgi?id=64133Signed-off-by: NImre Deak <imre.deak@intel.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NJens Axboe <axboe@kernel.dk>
      Cc: "Paul E.  McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Lukas Czerner <lczerner@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c663cfc
    • A
      rapidio: add enumeration/discovery start from user space · bc8fcfea
      Alexandre Bounine 提交于
      Add RapidIO enumeration/discovery start from user space.  User space
      start allows to defer RapidIO fabric scan until the moment when all
      participating endpoints are initialized avoiding mandatory synchronized
      start of all endpoints (which may be challenging in systems with large
      number of RapidIO endpoints).
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bc8fcfea
    • A
      rapidio: make enumeration/discovery configurable · a11650e1
      Alexandre Bounine 提交于
      Systems that use RapidIO fabric may need to implement their own
      enumeration and discovery methods which are better suitable for needs of
      a target application.
      
      The following set of patches is intended to simplify process of
      introduction of new RapidIO fabric enumeration/discovery methods.
      
      The first patch offers ability to add new RapidIO enumeration/discovery
      methods using kernel configuration options.  This new configuration
      option mechanism allows to select statically linked or modular
      enumeration/discovery method(s) from the list of existing methods or use
      external module(s).
      
      This patch also updates the currently existing enumeration/discovery
      code to be used as a statically linked or modular method.
      
      The corresponding configuration option is named "Basic
      enumeration/discovery" method.  This is the only one configuration
      option available today but new methods are expected to be introduced
      after adoption of provided patches.
      
      The second patch address a long time complaint of RapidIO subsystem
      users regarding fabric enumeration/discovery start sequence.  Existing
      implementation offers only a boot-time enumeration/discovery start which
      requires synchronized boot of all endpoints in RapidIO network.  While
      it works for small closed configurations with limited number of
      endpoints, using this approach in systems with large number of endpoints
      is quite challenging.
      
      To eliminate requirement for synchronized start the second patch
      introduces RapidIO enumeration/discovery start from user space.
      
      For compatibility with the existing RapidIO subsystem implementation,
      automatic boot time enumeration/discovery start can be configured in by
      specifying "rio-scan.scan=1" command line parameter if statically linked
      basic enumeration method is selected.
      
      This patch:
      
      Rework to implement RapidIO enumeration/discovery method selection
      combined with ability to use enumeration/discovery as a kernel module.
      
      This patch adds ability to introduce new RapidIO enumeration/discovery
      methods using kernel configuration options.  Configuration option
      mechanism allows to select statically linked or modular
      enumeration/discovery method from the list of existing methods or use
      external modules.  If a modular enumeration/discovery is selected each
      RapidIO mport device can have its own method attached to it.
      
      The existing enumeration/discovery code was updated to be used as
      statically linked or modular method.  This configuration option is named
      "Basic enumeration/discovery" method.
      
      Several common routines have been moved from rio-scan.c to make them
      available to other enumeration methods and reduce number of exported
      symbols.
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a11650e1
  13. 24 5月, 2013 1 次提交
    • T
      cgroup: fix a subtle bug in descendant pre-order walk · 7805d000
      Tejun Heo 提交于
      When cgroup_next_descendant_pre() initiates a walk, it checks whether
      the subtree root doesn't have any children and if not returns NULL.
      Later code assumes that the subtree isn't empty.  This is broken
      because the subtree may become empty inbetween, which can lead to the
      traversal escaping the subtree by walking to the sibling of the
      subtree root.
      
      There's no reason to have the early exit path.  Remove it along with
      the later assumption that the subtree isn't empty.  This simplifies
      the code a bit and fixes the subtle bug.
      
      While at it, fix the comment of cgroup_for_each_descendant_pre() which
      was incorrectly referring to ->css_offline() instead of
      ->css_online().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NMichal Hocko <mhocko@suse.cz>
      Cc: stable@vger.kernel.org
      7805d000
  14. 23 5月, 2013 3 次提交
    • S
      sched: add cond_resched_rcu() helper · f6f3c437
      Simon Horman 提交于
      This is intended for use in loops which read data protected by RCU and may
      have a large number of iterations.  Such an example is dumping the list of
      connections known to IPVS: ip_vs_conn_array() and ip_vs_conn_seq_next().
      
      The benefits are for CONFIG_PREEMPT_RCU=y where we save CPU cycles
      by moving rcu_read_lock and rcu_read_unlock out of large loops
      but still allowing the current task to be preempted after every
      loop iteration for the CONFIG_PREEMPT_RCU=n case.
      
      The call to cond_resched() is not needed when CONFIG_PREEMPT_RCU=y.
      Thanks to Paul E. McKenney for explaining this and for the
      final version that checks the context with CONFIG_DEBUG_ATOMIC_SLEEP=y
      for all possible configurations.
      
      The function can be empty in the CONFIG_PREEMPT_RCU case,
      rcu_read_lock and rcu_read_unlock are not needed in this case
      because the task can be preempted on indication from scheduler.
      Thanks to Peter Zijlstra for catching this and for his help
      in trying a solution that changes __might_sleep.
      
      Initial cond_resched_rcu_lock() function suggested by Eric Dumazet.
      Tested-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      f6f3c437
    • P
      netfilter: don't panic on error while walking through the init path · 6d11cfdb
      Pablo Neira Ayuso 提交于
      Don't panic if we hit an error while adding the nf_log or pernet
      netfilter support, just bail out.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Acked-by: NGao feng <gaofeng@cn.fujitsu.com>
      6d11cfdb
    • F
      netfilter: add nf_ipv6_ops hook to fix xt_addrtype with IPv6 · 2a7851bf
      Florian Westphal 提交于
      Quoting https://bugzilla.netfilter.org/show_bug.cgi?id=812:
      
      [ ip6tables -m addrtype ]
      When I tried to use in the nat/PREROUTING it messes up the
      routing cache even if the rule didn't matched at all.
      [..]
      If I remove the --limit-iface-in from the non-working scenario, so just
      use the -m addrtype --dst-type LOCAL it works!
      
      This happens when LOCAL type matching is requested with --limit-iface-in,
      and the default ipv6 route is via the interface the packet we test
      arrived on.
      
      Because xt_addrtype uses ip6_route_output, the ipv6 routing implementation
      creates an unwanted cached entry, and the packet won't make it to the
      real/expected destination.
      
      Silently ignoring --limit-iface-in makes the routing work but it breaks
      rule matching (--dst-type LOCAL with limit-iface-in is supposed to only
      match if the dst address is configured on the incoming interface;
      without --limit-iface-in it will match if the address is reachable
      via lo).
      
      The test should call ipv6_chk_addr() instead.  However, this would add
      a link-time dependency on ipv6.
      
      There are two possible solutions:
      
      1) Revert the commit that moved ipt_addrtype to xt_addrtype,
         and put ipv6 specific code into ip6t_addrtype.
      2) add new "nf_ipv6_ops" struct to register pointers to ipv6 functions.
      
      While the former might seem preferable, Pablo pointed out that there
      are more xt modules with link-time dependeny issues regarding ipv6,
      so lets go for 2).
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      2a7851bf
  15. 22 5月, 2013 1 次提交
    • R
      Add include dependencies to <linux/printk.h>. · 154c2670
      Ralf Baechle 提交于
      If <linux/linkage.h> has not been included before <linux/printk.h>,
      a build error like the below one will result:
      
        CC      arch/mips/kernel/idle.o
      In file included from arch/mips/kernel/idle.c:17:0:
      include/linux/printk.h:109:1: error: data definition has no type or storage class [-Werror]
      include/linux/printk.h:109:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
      include/linux/printk.h:110:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
      include/linux/printk.h:110:1: error: expected ‘,’ or ‘;’ before ‘int’
      include/linux/printk.h:114:1: error: data definition has no type or storage class [-Werror]
      include/linux/printk.h:114:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
      include/linux/printk.h:115:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
      include/linux/printk.h:115:1: error: expected ‘,’ or ‘;’ before ‘int’
      include/linux/printk.h:117:1: error: data definition has no type or storage class [-Werror]
      include/linux/printk.h:117:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
      include/linux/printk.h:118:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
      include/linux/printk.h:118:1: error: ‘__cold__’ attribute ignored [-Werror=attributes]
      include/linux/printk.h:118:1: error: expected ‘,’ or ‘;’ before ‘asmlinkage’
      include/linux/printk.h:122:1: error: data definition has no type or storage class [-Werror]
      include/linux/printk.h:122:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
      include/linux/printk.h:123:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
      include/linux/printk.h:123:1: error: ‘__cold__’ attribute ignored [-Werror=attributes]
      include/linux/printk.h:123:1: error: expected ‘,’ or ‘;’ before ‘int’
      In file included from include/linux/kernel.h:14:0,
                       from include/linux/sched.h:15,
                       from arch/mips/kernel/idle.c:18:
      include/linux/dynamic_debug.h: In function ‘ddebug_dyndbg_module_param_cb’:
      include/linux/dynamic_debug.h:124:3: error: implicit declaration of function ‘printk’ [-Werror=implicit-function-declaration]
      
      Fixed by including <linux/linkage.h>.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      154c2670
  16. 21 5月, 2013 2 次提交
    • F
      phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT · 5ea94e76
      Florian Fainelli 提交于
      There is currently no way for an Ethernet MAC driver servicing PHY link
      interrupts to notify this to the PHY state machine without defining its
      own state machine. Since most drivers are not so special, introduce a
      helper: phy_mac_interrupt() which can be called from a link up/down
      interrupt routine to update the PHY state machine. To avoid code
      duplication some refactoring has been done to expose the workqueue and
      its corresponding callback internally.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ea94e76
    • F
      phy: fix the use of PHY_IGNORE_INTERRUPT · 2c7b4921
      Florian Fainelli 提交于
      When a PHY device is registered with the special IRQ value
      PHY_IGNORE_INTERRUPT (-2) it will not properly be handled by the PHY
      library:
      
      - it continues to poll its register, while we do not want this
        because such PHY link events or register changes are serviced by an
        Ethernet MAC
      - it will still try to configure PHY interrupts at the PHY level, such
        interrupts do not exist at the PHY but at the MAC level
      - the state machine only handles PHY_POLL, but should also handle
        PHY_IGNORE_INTERRUPT similarly
      
      This patch updates the PHY state machine and initialization paths to
      account for the specific PHY_IGNORE_INTERRUPT. Based on an earlier patch
      by Thomas Petazzoni, and reworked to add the missing bits. Add a helper
      phy_interrupt_is_valid() which specifically tests for a PHY interrupt
      not to be PHY_POLL or PHY_IGNORE_INTERRUPT and use it throughout the
      code.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c7b4921