1. 30 Sep, 2016 1 commit
    • Eric Dumazet's avatar
      softirq: Let ksoftirqd do its job · 4cd13c21
      Eric Dumazet authored
      A while back, Paolo and Hannes sent an RFC patch adding threaded-able
      napi poll loop support : (https://patchwork.ozlabs.org/patch/620657/)
      
      The problem seems to be that softirqs are very aggressive and are often
      handled by the current process, even if we are under stress and that
      ksoftirqd was scheduled, so that innocent threads would have more chance
      to make progress.
      
      This patch makes sure that if ksoftirq is running, we let it
      perform the softirq work.
      
      Jonathan Corbet summarized the issue in https://lwn.net/Articles/687617/
      
      Tested:
      
       - NIC receiving traffic handled by CPU 0
       - UDP receiver running on CPU 0, using a single UDP socket.
       - Incoming flood of UDP packets targeting the UDP socket.
      
      Before the patch, the UDP receiver could almost never get CPU cycles and
      could only receive ~2,000 packets per second.
      
      After the patch, CPU cycles are split 50/50 between user application and
      ksoftirqd/0, and we can effectively read ~900,000 packets per second,
      a huge improvement in DOS situation. (Note that more packets are now
      dropped by the NIC itself, since the BH handlers get less CPU cycles to
      drain RX ring buffer)
      
      Since the load runs in well identified threads context, an admin can
      more easily tune process scheduling parameters if needed.
      Reported-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reported-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Hannes Frederic Sowa <hannes@redhat.com>
      Cc: Jesper Dangaard Brouer <jbrouer@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1472665349.14381.356.camel@edumazet-glaptop3.roam.corp.google.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4cd13c21
  2. 25 Sep, 2016 1 commit
  3. 22 Sep, 2016 1 commit
  4. 21 Sep, 2016 4 commits
  5. 20 Sep, 2016 3 commits
    • Paul Burton's avatar
      irqchip/mips-gic: Use for_each_set_bit to iterate over local IRQs · 0f4ed158
      Paul Burton authored
      The MIPS GIC driver has previously iterated over bits set in a bitmap
      representing pending local IRQs by calling find_first_bit, clearing that
      bit then calling find_first_bit again until all bits are clear. If
      multiple interrupts are pending then this is wasteful, as find_first_bit
      will have to loop over the whole bitmap from the start. Use the
      for_each_set_bit macro which performs exactly what we need here instead.
      It will use find_next_bit and thus only scan over the relevant part of
      the bitmap, and it makes the intent of the code clearer.
      
      This makes the same change for local interrupts that commit cae750ba
      ("irqchip: mips-gic: Use for_each_set_bit to iterate over IRQs") made
      for shared interrupts.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/20160913165427.31686-1-paul.burton@imgtec.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      0f4ed158
    • Thomas Gleixner's avatar
      Merge branch 'irq/urgent' into irq/core · 464b5847
      Thomas Gleixner authored
      Merge urgent fixes so pending patches for 4.9 can be applied.
      464b5847
    • Paul Burton's avatar
      irqchip/mips-gic: Fix local interrupts · e875bd66
      Paul Burton authored
      Since the device hierarchy domain was added by commit c98c1822
      ("irqchip/mips-gic: Add device hierarchy domain"), GIC local interrupts
      have been broken.
      
      Users attempting to setup a per-cpu local IRQ, for example the GIC timer
      clock events code in drivers/clocksource/mips-gic-timer.c, the
      setup_percpu_irq function would refuse with -EINVAL because the GIC
      irqchip driver never called irq_set_percpu_devid so the
      IRQ_PER_CPU_DEVID flag was never set for the IRQ. This happens because
      irq_set_percpu_devid was being called from the gic_irq_domain_map
      function which is no longer called.
      
      Doing only that runs into further problems because gic_dev_domain_alloc
      set the struct irq_chip for all interrupts, local or shared, to
      gic_level_irq_controller despite that only being suitable for shared
      interrupts. The typical outcome of this is that gic_level_irq_controller
      callback functions are called for local interrupts, and then hwirq
      number calculations overflow & the driver ends up attempting to access
      some invalid register with an address calculated from an invalid hwirq
      number. Best case scenario is that this then leads to a bus error. This
      is fixed by abstracting the setup of the hwirq & chip to a new function
      gic_setup_dev_chip which is used by both the root GIC IRQ domain & the
      device domain.
      
      Finally, decoding local interrupts failed because gic_dev_domain_alloc
      only called irq_domain_alloc_irqs_parent for shared interrupts. Local
      ones were therefore never associated with hwirqs in the root GIC IRQ
      domain and the virq in gic_handle_local_int would always be 0. This is
      fixed by calling irq_domain_alloc_irqs_parent unconditionally & having
      gic_irq_domain_alloc handle both local & shared interrupts, which is
      easy due to the aforementioned abstraction of chip setup into
      gic_setup_dev_chip.
      
      This fixes use of the MIPS GIC timer for clock events, which has been
      broken since c98c1822 ("irqchip/mips-gic: Add device hierarchy
      domain") but hadn't been noticed due to a silent fallback to the MIPS
      coprocessor 0 count/compare clock events device.
      
      Fixes: c98c1822 ("irqchip/mips-gic: Add device hierarchy domain")
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Qais Yousef <qsyousef@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/20160913165335.31389-1-paul.burton@imgtec.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      e875bd66
  6. 19 Sep, 2016 3 commits
    • James Morse's avatar
      irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning · 727653d6
      James Morse authored
      gic_raise_softirq() walks the list of cpus using for_each_cpu(), it calls
      gic_compute_target_list() which advances the iterator by the number of
      CPUs in the cluster.
      
      If gic_compute_target_list() reaches the last CPU it leaves the iterator
      pointing at the last CPU. This means the next time round the for_each_cpu()
      loop cpumask_next() will be called with an invalid CPU.
      
      This triggers a warning when built with CONFIG_DEBUG_PER_CPU_MAPS:
      [    3.077738] GICv3: CPU1: found redistributor 1 region 0:0x000000002f120000
      [    3.077943] CPU1: Booted secondary processor [410fd0f0]
      [    3.078542] ------------[ cut here ]------------
      [    3.078746] WARNING: CPU: 1 PID: 0 at ../include/linux/cpumask.h:121 gic_raise_softirq+0x12c/0x170
      [    3.078812] Modules linked in:
      [    3.078869]
      [    3.078930] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.8.0-rc5+ #5188
      [    3.078994] Hardware name: Foundation-v8A (DT)
      [    3.079059] task: ffff80087a1a0080 task.stack: ffff80087a19c000
      [    3.079145] PC is at gic_raise_softirq+0x12c/0x170
      [    3.079226] LR is at gic_raise_softirq+0xa4/0x170
      [    3.079296] pc : [<ffff0000083ead24>] lr : [<ffff0000083eac9c>] pstate: 200001c9
      [    3.081139] Call trace:
      [    3.081202] Exception stack(0xffff80087a19fbe0 to 0xffff80087a19fd10)
      
      [    3.082269] [<ffff0000083ead24>] gic_raise_softirq+0x12c/0x170
      [    3.082354] [<ffff00000808e614>] smp_send_reschedule+0x34/0x40
      [    3.082433] [<ffff0000080e80a0>] resched_curr+0x50/0x88
      [    3.082512] [<ffff0000080e89d0>] check_preempt_curr+0x60/0xd0
      [    3.082593] [<ffff0000080e8a60>] ttwu_do_wakeup+0x20/0xe8
      [    3.082672] [<ffff0000080e8bb8>] ttwu_do_activate+0x90/0xc0
      [    3.082753] [<ffff0000080ea9a4>] try_to_wake_up+0x224/0x370
      [    3.082836] [<ffff0000080eabc8>] default_wake_function+0x10/0x18
      [    3.082920] [<ffff000008103134>] __wake_up_common+0x5c/0xa0
      [    3.083003] [<ffff0000081031f4>] __wake_up_locked+0x14/0x20
      [    3.083086] [<ffff000008103f80>] complete+0x40/0x60
      [    3.083168] [<ffff00000808df7c>] secondary_start_kernel+0x15c/0x1d0
      [    3.083240] [<00000000808911a4>] 0x808911a4
      [    3.113401] Detected PIPT I-cache on CPU2
      
      Avoid updating the iterator if the next call to cpumask_next() would
      cause the for_each_cpu() loop to exit.
      
      There is no change to gic_raise_softirq()'s behaviour, (cpumask_next()s
      eventual call to _find_next_bit() will return early as start >= nbits),
      this patch just silences the warning.
      
      Fixes: 021f6537 ("irqchip: gic-v3: Initial support for GICv3")
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1474306155-3303-1-git-send-email-james.morse@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      727653d6
    • Marc Zyngier's avatar
      genirq: Skip chained interrupt trigger setup if type is IRQ_TYPE_NONE · 1984e075
      Marc Zyngier authored
      There is no point in trying to configure the trigger of a chained
      interrupt if no trigger information has been configured. At best
      this is ignored, and at the worse this confuses the underlying
      irqchip (which is likely not to handle such a thing), and
      unnecessarily alarms the user.
      
      Only apply the configuration if type is not IRQ_TYPE_NONE.
      
      Fixes: 1e12c4a9 ("genirq: Correctly configure the trigger on chained interrupts")
      Reported-and-tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Link: https://lkml.kernel.org/r/CAMuHMdVW1eTn20=EtYcJ8hkVwohaSuH_yQXrY2MGBEvZ8fpFOg@mail.gmail.com
      Link: http://lkml.kernel.org/r/1474274967-15984-1-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1984e075
    • Linus Torvalds's avatar
      Linux 4.8-rc7 · 3be79886
      Linus Torvalds authored
      3be79886
  7. 18 Sep, 2016 7 commits
  8. 17 Sep, 2016 5 commits
  9. 16 Sep, 2016 15 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-4.8-rc6' of git://people.freedesktop.org/~airlied/linux · 5fbf3e32
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Two sets of i915 fixes, one set of vc4 crasher fixes, and a couple of
        atmel fixes.
      
        Nothing too out there at this stage, though I think some people are
        holidaying so it's been quiet enough"
      
      * tag 'drm-fixes-for-4.8-rc6' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: Ignore OpRegion panel type except on select machines
        Revert "drm/i915/psr: Make idle_frames sensible again"
        drm/i915: Restore lost "Initialized i915" welcome message
        drm/vc4: mark vc4_bo_cache_purge() static
        drm/i915: Add GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE to SNB
        drm/i915: disable 48bit full PPGTT when vGPU is active
        drm/i915: enable vGPU detection for all
        drm/atmel-hlcdc: Make ->reset() implementation static
        drm: atmel-hlcdc: Fix vertical scaling
        drm/vc4: Allow some more signals to be packed with uniform resets.
        drm/i915/dvo: Remove dangling call to drm_encoder_cleanup()
      5fbf3e32
    • Linus Torvalds's avatar
      Merge tag 'pm-4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 095f5cfa
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "More annotations of tracepoints in the runtime PM framework to prevent
        RCU from complaining when that code is invoked from the idle path
        (Paul McKenney)"
      
      * tag 'pm-4.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / runtime: Use _rcuidle for runtime suspend tracepoints
      095f5cfa
    • Dave Airlie's avatar
      Merge tag 'drm-vc4-fixes-2016-09-14' of https://github.com/anholt/linux into drm-fixes · 09cb5b78
      Dave Airlie authored
      This pull request brings in a fix for crashes in X on VC4.
      
      * tag 'drm-vc4-fixes-2016-09-14' of https://github.com/anholt/linux:
        drm/vc4: mark vc4_bo_cache_purge() static
        drm/vc4: Allow some more signals to be packed with uniform resets.
      09cb5b78
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2016-09-15' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 9929c097
      Dave Airlie authored
      i915 fixes from Jani.
      
      * tag 'drm-intel-fixes-2016-09-15' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Ignore OpRegion panel type except on select machines
        Revert "drm/i915/psr: Make idle_frames sensible again"
        drm/i915: Restore lost "Initialized i915" welcome message
      9929c097
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · dd5a477c
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "Round three of 4.8 rc fixes.
      
        This is likely the last rdma pull request this cycle.  The new rxe
        driver had a few issues (you probably saw the boot bot bug report) and
        they should be addressed now.  There are a couple other fixes here,
        mainly mlx4.  There are still two outstanding issues that need
        resolved but I don't think their fix will make this kernel cycle.
      
        Summary:
      
         - Various fixes to rdmavt, ipoib, mlx5, mlx4, rxe"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/rdmavt: Don't vfree a kzalloc'ed memory region
        IB/rxe: Fix kmem_cache leak
        IB/rxe: Fix race condition between requester and completer
        IB/rxe: Fix duplicate atomic request handling
        IB/rxe: Fix kernel panic in udp_setup_tunnel
        IB/mlx5: Set source mac address in FTE
        IB/mlx5: Enable MAD_IFC commands for IB ports only
        IB/mlx4: Diagnostic HW counters are not supported in slave mode
        IB/mlx4: Use correct subnet-prefix in QP1 mads under SR-IOV
        IB/mlx4: Fix code indentation in QP1 MAD flow
        IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV
        IB/ipoib: Don't allow MC joins during light MC flush
        IB/rxe: fix GFP_KERNEL in spinlock context
      dd5a477c
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 008f08d6
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Here are a couple of bugfixes for v4.8-rc.
      
        Most of them have actually been around for a while this time but for
        some reason didn't get applied early on.  The shmobile regulator fix
        is the only one that isn't completely obvious.
      
        Device tree changes:
         - archtimer interrupts must be level triggered (multiple platforms)
         - fix for USB and MMC clocks on STiH410
         - fix split DT repository in case of raspberry-pi 3
         - a new use of skeleton.dtsi on arm64 has crept in after that was
           removed.
      
        defconfig updates:
         - xilinx vdma has a new Kconfig symbol name
         - keystone requires CONFIG_NOP_USB_XCEIV since v4.8-rc1
      
        Code fixes:
         - fix regulator quirk on shmobile
         - suspend-to-ram regression on EXYNOS
      
        Maintainer updates:
         - Javier Martinez Canillas is now a reviewer for Samsung EXYNOS"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: keystone: defconfig: Fix USB configuration
        arm64: dts: Fix broken architected timer interrupt trigger
        ARM: multi_v7_defconfig: update XILINX_VDMA
        ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
        ARM: dts: Remove use of skeleton.dtsi from bcm283x.dtsi
        ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
        ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
        ARM: shmobile: fix regulator quirk for Gen2
        ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback
        MAINTAINERS: Add myself as reviewer for Samsung Exynos support
      008f08d6
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · cac4662a
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Most of this update are fixes primarily discovered from testing on the
        older StrongARM 1110 and PXA systems, as a result of recent interest
        from several people in these platforms:
      
         - Locomo interrupt handling incorrectly stores the handler data in
           the chip's private data slot: when Locomo is combined with an
           interrupt controller who's chip uses the chip private data, this
           leads to an oops.
      
         - SA1111 was missing a call to clk_disable() to clean up after a
           failed probe.
      
         - SA1111 and PCMCIA suspend/resume was broken:
      
           The PCMCIA "ds" layer was using the legacy bus suspend/resume
           methods, which the core PM code is no longer calling as a result of
           device_pm_check_callbacks() introduced in commit aa8e54b5
           ("PM / sleep: Go direct_complete if driver has no callbacks").
      
           SA1111 was broken due to changes to PCMCIA which makes PCMCIA
           suspend itself later than the SA1111 code expects, and resume
           before the SA1111 code has initialised access to the pcmcia
           sub-device.
      
         - the default SA1111 interrupt mask polarity got messed up when it
           was converted to use a dynamic interrupt base number for its
           interrupts.
      
         - fix platform_get_irq() error code propagation, which was causing
           problems on platforms where the interrupt may not be available at
            probe time in DT setups.
      
         - fix the lack of clock to PCMCIA code on PXA platforms, which was
           omitted in conversions of PXA to CCF.
      
         - fix an oops in the PXA PCMCIA code caused by a previous commit not
           realising that Lubbock is different from the rest of the PXA PCMCIA
           drivers.
      
         - ensure that SA1111 low-level PCMCIA drivers propagate their error
           codes to the main probe function, rather than the driver silently
           accepting a failure.
      
         - fix the sa11xx debugfs reporting of timing information, which
           always indicated zero due to the clock being a factor of 1000 out.
      
         - fix the polarity of the status change signal reported from the
           sockets.
      
        Lastly, one ARM specific commit from Stefan Agner fixing the LPAE
        cache attributes"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: pxa/lubbock: add pcmcia clock
        ARM: locomo: fix locomo irq handling
        ARM: 8612/1: LPAE: initialize cache policy correctly
        ARM: sa1111: fix missing clk_disable()
        ARM: sa1111: fix pcmcia suspend/resume
        ARM: sa1111: fix pcmcia interrupt mask polarity
        ARM: sa1111: fix error code propagation in sa1111_probe()
        pcmcia: lubbock: fix sockets configuration
        pcmcia: sa1111: fix propagation of lowlevel board init return code
        pcmcia: soc_common: fix SS_STSCHG polarity
        pcmcia: sa11xx_base: add units to the timing information
        pcmcia: sa11xx_base: fix reporting of timing information
        pcmcia: ds: fix suspend/resume
      cac4662a
    • Colin Ian King's avatar
      IB/rdmavt: Don't vfree a kzalloc'ed memory region · e4618d40
      Colin Ian King authored
      The userspace memory region 'mr' is allocated with kzalloc in
      __rvt_alloc_mr  however it is incorrectly being freed with vfree in
      __rvt_free_mr. Fix this by using kfree to free it.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      e4618d40
    • Yonatan Cohen's avatar
      IB/rxe: Fix kmem_cache leak · c1cc72cb
      Yonatan Cohen authored
      Decrement qp reference when handling error path
      in completer to prevent kmem_cache leak.
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      c1cc72cb
    • Yonatan Cohen's avatar
      IB/rxe: Fix race condition between requester and completer · 3050b998
      Yonatan Cohen authored
      rxe_requester() is sending a pkt with rxe_xmit_packet() and
      then calls rxe_update() to update the wqe and qp's psn values.
      But sometimes the response is received before the requester
      had time to update the wqe in which case the completer
      acts on errornous wqe values.
      This fix updates the wqe and qp before actually sending
      the request and rolls back when xmit fails.
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3050b998
    • Yonatan Cohen's avatar
      IB/rxe: Fix duplicate atomic request handling · 90894887
      Yonatan Cohen authored
      When handling ack for atomic opcodes like "fetch&add"
      or "cmp&swp", the method send_atomic_ack() saves the ack
      before sending it, in case it gets lost and never reach the
      requester. In which case the method duplicate_request()
      will need to find it using the duplicated request.psn.
      But send_atomic_ack() used a wrong psn value and thus
      the above ack was never found.
      This fix uses the ack.psn to locate the ack in case
      its needed.
      This fix also copies the ack packet to the skb's control buffer
      since duplicate_request() will need it when calling rxe_xmit_packet()
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      90894887
    • Yonatan Cohen's avatar
      IB/rxe: Fix kernel panic in udp_setup_tunnel · dfdd6158
      Yonatan Cohen authored
      Disable creation of a UDP socket for ipv6 when
      CONFIG_IPV6 is not enabeld. Since udp_sock_create6()
      returns 0 when CONFIG_IPV6 is not set
      
      [   46.888632] IP: [<c220705a>] setup_udp_tunnel_sock+0x6/0x4f
      [   46.891355] *pdpt = 0000000000000000 *pde = f000ff53f000ff53
      [   46.893918] Oops: 0002 [#1] PREEMPT
      [   46.896014] CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-rc4-00001-g8700e3e7 #1
      [   46.900280] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014
      [   46.904905] task: cf06c040 ti: cf05e000 task.ti: cf05e000
      [   46.907854] EIP: 0060:[<c220705a>] EFLAGS: 00210246 CPU: 0
      [   46.911137] EIP is at setup_udp_tunnel_sock+0x6/0x4f
      [   46.914070] EAX: 00000044 EBX: 00000001 ECX: cf05fef0 EDX: ca8142e0
      [   46.917236] ESI: c2c4505b EDI: cf05fef0 EBP: cf05fed0 ESP: cf05fed0
      [   46.919836]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
      [   46.922046] CR0: 80050033 CR2: 000001fc CR3: 02cec000 CR4: 000006b0
      [   46.924550] Stack:
      [   46.926014]  cf05ff10 c1fd4657 ca8142e0 0000000a 00000000 00000000 0000b712 00000008
      [   46.931274]  00000000 6bb5bd01 c1fd48de 00000000 00000000 cf05ff1c 00000000 00000000
      [   46.936122]  cf05ff1c c1fd4bdf 00000000 cf05ff28 c2c4507b ffffffff cf05ff88 c2bf1c74
      [   46.942350] Call Trace:
      [   46.944403]  [<c1fd4657>] rxe_setup_udp_tunnel+0x8f/0x99
      [   46.947689]  [<c1fd48de>] ? net_to_rxe+0x4e/0x4e
      [   46.950567]  [<c1fd4bdf>] rxe_net_init+0xe/0xa4
      [   46.953147]  [<c2c4507b>] rxe_module_init+0x20/0x4c
      [   46.955448]  [<c2bf1c74>] do_one_initcall+0x89/0x113
      [   46.957797]  [<c2bf15eb>] ? set_debug_rodata+0xf/0xf
      [   46.959966]  [<c2bf1dbc>] ? kernel_init_freeable+0xbe/0x15b
      [   46.962262]  [<c2bf1ddc>] kernel_init_freeable+0xde/0x15b
      [   46.964418]  [<c232eb54>] kernel_init+0x8/0xd0
      [   46.966618]  [<c2333122>] ret_from_kernel_thread+0xe/0x24
      [   46.969592]  [<c232eb4c>] ? rest_init+0x6f/0x6f
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      dfdd6158
    • Maor Gottlieb's avatar
      IB/mlx5: Set source mac address in FTE · ee3da804
      Maor Gottlieb authored
      Set the source mac address in the FTE when L2 specification
      is provided.
      
      Fixes: 038d2ef8 ('IB/mlx5: Add flow steering support')
      Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      ee3da804
    • Noa Osherovich's avatar
      IB/mlx5: Enable MAD_IFC commands for IB ports only · 7fae6655
      Noa Osherovich authored
      MAD_IFC command is supported only for physical functions (PF)
      and when physical port is IB. The proposed fix enforces it.
      
      Fixes: d603c809 ("IB/mlx5: Fix decision on using MAD_IFC")
      Reported-by: default avatarDavid Chang <dchang@suse.com>
      Signed-off-by: default avatarNoa Osherovich <noaos@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      7fae6655
    • Kamal Heib's avatar
      IB/mlx4: Diagnostic HW counters are not supported in slave mode · 69d269d3
      Kamal Heib authored
      Modify the mlx4_ib_diag_counters() to avoid the following error in the
      hypervisor when the slave tries to query the hardware counters in SR-IOV
      mode.
      
      mlx4_core 0000:81:00.0: Unknown command:0x30 accepted from slave:1
      
      Fixes: 3f85f2aa ("IB/mlx4: Add diagnostic hardware counters")
      Signed-off-by: default avatarKamal Heib <kamalh@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      69d269d3