1. 02 May, 2015 7 commits
    • Simon Horman's avatar
      net: rocker: Use ether_addr_equal · 629161f6
      Simon Horman authored
      A small cleanup to make use of the ether_addr_equal helper.
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarScott Feldman <sfeldma@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      629161f6
    • David S. Miller's avatar
      Merge branch 'rt6_pmtu' · 36c82963
      David S. Miller authored
      Martin KaFai Lau says:
      
      ====================
      ipv6: Stop /128 route from disappearing after pmtu update
      
      The series is separated from another patch series,
      'ipv6: Only create RTF_CACHE route after encountering pmtu exception',
      which can be found here:
      http://thread.gmane.org/gmane.linux.network/359140
      
      This series focus on fixing the /128 route issues.  It is currently targeted
      for net-next due to the number of code churn but it is also applicable
      to net (should be without conflict).  The original reported problem can be
      found here:
      http://thread.gmane.org/gmane.linux.network/348138
      
      Patch 01 and 02 are to prepare the fib6 search to expect both the
      RTF_CACHE clone and its original route exist at the same fib6_node.
      
      Patch 03 fixes the /128 route disappearing bug.
      
      Patch 04 and 05 stop rt6_info from using the inet_peer's metrics to
      avoid the /128 routes (like the /128 clone and its original route)
      from stepping on each others' metrics.
      
      The second patch is by 'Steffen Klassert <steffen.klassert@secunet.com>'
      which I pulled off from netdev.  The third patch is also mostly by
      Steffen with one minor optimization.
      
      Many thanks to Hannes Frederic Sowa <hannes@stressinduktion.org> on
      reviewing the patches and giving advice.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36c82963
    • Martin KaFai Lau's avatar
      ipv6: Remove DST_METRICS_FORCE_OVERWRITE and _rt6i_peer · afc4eef8
      Martin KaFai Lau authored
      _rt6i_peer is no longer needed after the last patch,
      'ipv6: Stop rt6_info from using inet_peer's metrics'.
      
      DST_METRICS_FORCE_OVERWRITE is added by
      commit e5fd387a ("ipv6: do not overwrite inetpeer metrics prematurely").
      Since inetpeer is no longer used for metrics, this bit is also not needed.
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Reviewed-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Cc: Michal Kubeček <mkubecek@suse.cz>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      afc4eef8
    • Martin KaFai Lau's avatar
      ipv6: Stop rt6_info from using inet_peer's metrics · 4b32b5ad
      Martin KaFai Lau authored
      inet_peer is indexed by the dst address alone.  However, the fib6 tree
      could have multiple routing entries (rt6_info) for the same dst. For
      example,
      1. A /128 dst via multiple gateways.
      2. A RTF_CACHE route cloned from a /128 route.
      
      In the above cases, all of them will share the same metrics and
      step on each other.
      
      This patch will steer away from inet_peer's metrics and use
      dst_cow_metrics_generic() for everything.
      
      Change Highlights:
      1. Remove rt6_cow_metrics() which currently acquires metrics from
         inet_peer for DST_HOST route (i.e. /128 route).
      2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
         full size metrics just to override the RTAX_MTU.
      3. After (2), the RTF_CACHE route can also share the metrics with its
         dst.from route, by:
         dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
      4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route.  Instead,
         directly clone from rt->dst.
      
         [ Currently, cloning from another RTF_CACHE is only possible during
           rt6_do_redirect().  Also, the old clone is removed from the tree
           immediately after the new clone is added. ]
      
         In case of cloning from an older redirect RTF_CACHE, it should work as
         before.
      
         In case of cloning from an older pmtu RTF_CACHE, this patch will forget
         the pmtu and re-learn it (if there is any) from the redirected route.
      
      The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
      in the next cleanup patch.
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Reviewed-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b32b5ad
    • Martin KaFai Lau's avatar
      ipv6: Stop /128 route from disappearing after pmtu update · 653437d0
      Martin KaFai Lau authored
      This patch is mostly from Steffen Klassert <steffen.klassert@secunet.com>.
      I only removed the (rt6->rt6i_dst.plen == 128) check from
      ip6_rt_update_pmtu() because the (rt6->rt6i_flags & RTF_CACHE) test
      has already implied it.
      
      This patch:
      1. Create RTF_CACHE route for /128 non local route
      2. After (1), all routes that allow pmtu update should have a RTF_CACHE
         clone.  Hence, stop updating MTU for any non RTF_CACHE route.
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Reviewed-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      653437d0
    • Steffen Klassert's avatar
      ipv6: Extend the route lookups to low priority metrics. · 9fbdcfaf
      Steffen Klassert authored
      We search only for routes with highest priority metric in
      find_rr_leaf(). However if one of these routes is marked
      as invalid, we may fail to find a route even if there is
      a appropriate route with lower priority. Then we loose
      connectivity until the garbage collector deletes the
      invalid route. This typically happens if a host route
      expires afer a pmtu event. Fix this by searching also
      for routes with a lower priority metric.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Reviewed-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9fbdcfaf
    • Martin KaFai Lau's avatar
      ipv6: Consider RTF_CACHE when searching the fib6 tree · 1f56a01f
      Martin KaFai Lau authored
      It is a prep work for the later bug-fix patch which will stop /128 route
      from disappearing after pmtu update.
      
      The later bug-fix patch will allow a /128 route and its RTF_CACHE clone
      both exist at the same fib6_node.  To do this, we need to prepare the
      existing fib6 tree search to expect RTF_CACHE for /128 route.
      
      Note that the fn->leaf is sorted by rt6i_metric.  Hence,
      RTF_CACHE (if there is any) is always at the front.  This property
      leads to the following:
      
      1. When doing ip6_route_del(), it should honor the RTF_CACHE flag which
         the caller is used to ask for deleting clone or non-clone.
         The rtm_to_fib6_config() should also check the RTM_F_CLONED and
         then set RTF_CACHE accordingly so that:
         - 'ip -6 r del...' will make ip6_route_del() to delete a route
           and all its clones. Note that its clones is flushed by fib6_del()
         - 'ip -6 r flush table cache' will make ip6_route_del() to
            only delete clone(s).
      
      2. Exclude RTF_CACHE from addrconf_get_prefix_route() which
         should not configure on a cloned route.
      
      3. No change is need for rt6_device_match() since it currently could
         return a RTF_CACHE clone route, so the later bug-fix patch will not
         affect it.
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Reviewed-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f56a01f
  2. 01 May, 2015 2 commits
  3. 30 Apr, 2015 12 commits
  4. 29 Apr, 2015 5 commits
  5. 27 Apr, 2015 14 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2decb268
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) mlx4 doesn't check fully for supported valid RSS hash function, fix
          from Amir Vadai
      
       2) Off by one in ibmveth_change_mtu(), from David Gibson
      
       3) Prevent altera chip from reporting false error interrupts in some
          circumstances, from Chee Nouk Phoon
      
       4) Get rid of that stupid endless loop trying to allocate a FIN packet
          in TCP, and in the process kill deadlocks.  From Eric Dumazet
      
       5) Fix get_rps_cpus() crash due to wrong invalid-cpu value, also from
          Eric Dumazet
      
       6) Fix two bugs in async rhashtable resizing, from Thomas Graf
      
       7) Fix topology server listener socket namespace bug in TIPC, from Ying
          Xue
      
       8) Add some missing HAS_DMA kconfig dependencies, from Geert
          Uytterhoeven
      
       9) bgmac driver intends to force re-polling but does so by returning
          the wrong value from it's ->poll() handler.  Fix from Rafał Miłecki
      
      10) When the creater of an rhashtable configures a max size for it,
          don't bark in the logs and drop insertions when that is exceeded.
          Fix from Johannes Berg
      
      11) Recover from out of order packets in ppp mppe properly, from Sylvain
          Rochet
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits)
        bnx2x: really disable TPA if 'disable_tpa' option is set
        net:treewide: Fix typo in drivers/net
        net/mlx4_en: Prevent setting invalid RSS hash function
        mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions
        netfilter; Add some missing default cases to switch statements in nft_reject.
        ppp: mppe: discard late packet in stateless mode
        ppp: mppe: sanity error path rework
        net/bonding: Make DRV macros private
        net: rfs: fix crash in get_rps_cpus()
        altera tse: add support for fixed-links.
        pxa168: fix double deallocation of managed resources
        net: fix crash in build_skb()
        net: eth: altera: Resolve false errors from MSGDMA to TSE
        ehea: Fix memory hook reference counting crashes
        net/tg3: Release IRQs on permanent error
        net: mdio-gpio: support access that may sleep
        inet: fix possible panic in reqsk_queue_unlink()
        rhashtable: don't attempt to grow when at max_size
        bgmac: fix requests for extra polling calls from NAPI
        tcp: avoid looping in tcp_send_fin()
        ...
      2decb268
    • Michal Schmidt's avatar
      bnx2x: really disable TPA if 'disable_tpa' option is set · 22a8f237
      Michal Schmidt authored
      bnx2x's 'disable_tpa=1' module option is not respected properly and TPA
      (transparent packet aggregation) remains enabled. Even though the
      module option causes LRO to be disabled, TPA is enabled in GRO mode.
      
      Additionally, disabling GRO via ethtool then has no effect. One can
      still observe tpa_* statistics increase and large packets being received
      in tcpdump.
      
      The bug was an unintended consequence of commit aebf6244 "bnx2x: Be
      more forgiving toward SW GRO".
      
      Fix it by following the bp->disable_tpa flag when initializing fp's.
      Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22a8f237
    • Masanari Iida's avatar
      net:treewide: Fix typo in drivers/net · 94435f76
      Masanari Iida authored
      This patch fix spelling typo in printk.
      Signed-off-by: default avatarMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94435f76
    • Amir Vadai's avatar
      net/mlx4_en: Prevent setting invalid RSS hash function · b3706909
      Amir Vadai authored
      mlx4_en_check_rxfh_func() was checking for hardware support before
      setting a known RSS hash function, but didn't do any check before
      setting unknown RSS hash function. Need to make it fail on such values.
      In this occasion, moved the actual setting of the new value from the
      check function into mlx4_en_set_rxfh().
      
      Fixes: 947cbb0a ("net/mlx4_en: Support for configurable RSS hash function")
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3706909
    • Rojhalat Ibrahim's avatar
      mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions · 33df10e2
      Rojhalat Ibrahim authored
      Use the new gpiod_get_array and gpiod_put_array functions
      (added to mainline in the v4.1 merge window) for obtaining and
      disposing of GPIO descriptors.
      
      Cc: David Miller <davem@davemloft.net>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarRojhalat Ibrahim <imr@rtschenk.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33df10e2
    • David S. Miller's avatar
      netfilter; Add some missing default cases to switch statements in nft_reject. · 129d23a5
      David S. Miller authored
      This fixes:
      
      ====================
      net/netfilter/nft_reject.c: In function ‘nft_reject_dump’:
      net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswitch]
        switch (priv->type) {
        ^
      net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_ICMPX_UNREACH’ not handled in switch [-Wswi\
      tch]
      net/netfilter/nft_reject_inet.c: In function ‘nft_reject_inet_dump’:
      net/netfilter/nft_reject_inet.c:105:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswi\
      tch]
        switch (priv->type) {
        ^
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      129d23a5
    • David S. Miller's avatar
      Merge branch 'ppp_mppe_desync' · 8e9b29cc
      David S. Miller authored
      Sylvain Rochet says:
      
      ====================
      ppp: mppe: fixes MPPE desync on links which don't guarantee packet ordering
      
      I am currently having an issue with PPP over L2TP (UDP) and MPPE in
      stateless mode (default mode), UDP does not guarantee packet ordering so
      we might get out of order packet. MPPE needs to be continuously synched
      so we should drop late UDP packet.
      
      I added a printk on the number of time we rekeyed in MPPE decompressor,
      this is what we currently have if we receive a slightly out of order UDP
      packet:
      
      [1731001.049206] mppe_decompress[1]: ccount 1559
      [1731001.049216] mppe_decompress[1]: rekeyed 1 times
      
      [1731001.049228] mppe_decompress[1]: ccount 1560
      [1731001.049232] mppe_decompress[1]: rekeyed 1 times
      
      [1731001.050170] mppe_decompress[1]: ccount 1562
      [1731001.050182] mppe_decompress[1]: rekeyed 2 times
      
      [1731001.050191] mppe_decompress[1]: ccount 1561
      [1731001.062576] mppe_decompress[1]: rekeyed 4095 times
                                                   ^^^^
      This is obviously wrong, we missed packet 1561 and we already rekeyed 2
      times for 1562 we previously received, we can't recover the decryption
      key we need for 1561, we should drop it instead of rekeying 4095 times.
      
      This patch series drop any packet with are not within the 4096/2 forward
      window.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e9b29cc
    • Sylvain Rochet's avatar
      ppp: mppe: discard late packet in stateless mode · 03654763
      Sylvain Rochet authored
      When PPP is used over a link which does not guarantee packet ordering,
      we might get late MPPE packets. This is a problem because MPPE must be
      kept synchronized and the current implementation does not drop them and
      rekey 4095 times instead of 0, which is wrong.
      
      In order to prevent rekeying about a whole count space times (~ 4095
      times), drop packets which are not within the forward 4096/2 window and
      increase sanity error counter.
      Signed-off-by: default avatarSylvain Rochet <sylvain.rochet@finsecur.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03654763
    • Sylvain Rochet's avatar
      ppp: mppe: sanity error path rework · 32530189
      Sylvain Rochet authored
      We are going to need sanity error path a little further, rework to be
      able to use the sanity error path anywhere in decompressor.
      Signed-off-by: default avatarSylvain Rochet <sylvain.rochet@finsecur.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32530189
    • Matan Barak's avatar
      net/bonding: Make DRV macros private · 73b5a6f2
      Matan Barak authored
      The bonding modules currently defines four macros with
      general names that pollute the global namespace:
      DRV_VERSION
      DRV_RELDATE
      DRV_NAME
      DRV_DESCRIPTION
      
      Fixing that by defining a private bonding_priv.h
      header files which includes those defines.
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      73b5a6f2
    • Linus Torvalds's avatar
      Linux 4.1-rc1 · b787f68c
      Linus Torvalds authored
      b787f68c
    • Andy Lutomirski's avatar
      x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue · 61f01dd9
      Andy Lutomirski authored
      AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET with
      SS == 0 results in an invalid usermode state in which SS is apparently
      equal to __USER_DS but causes #SS if used.
      
      Work around the issue by setting SS to __KERNEL_DS __switch_to, thus
      ensuring that SYSRET never happens with SS set to NULL.
      
      This was exposed by a recent vDSO cleanup.
      
      Fixes: e7d6eefa x86/vdso32/syscall.S: Do not load __USER32_DS to %ss
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Peter Anvin <hpa@zytor.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      61f01dd9
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 1190944f
      Linus Torvalds authored
      Pull intel drm fixes from Dave Airlie.
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg
        drm/i915: Workaround to avoid lite restore with HEAD==TAIL
        drm/i915: cope with large i2c transfers
      1190944f
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/intel-iommu · 9f86262d
      Linus Torvalds authored
      Pull intel iommu updates from David Woodhouse:
       "This lays a little of the groundwork for upcoming Shared Virtual
        Memory support — fixing some bogus #defines for capability bits and
        adding the new ones, and starting to use the new wider page tables
        where we can, in anticipation of actually filling in the new fields
        therein.
      
        It also allows graphics devices to be assigned to VM guests again.
        This got broken in 3.17 by disallowing assignment of RMRR-afflicted
        devices.  Like USB, we do understand why there's an RMRR for graphics
        devices — and unlike USB, it's actually sane.  So we can make an
        exception for graphics devices, just as we do USB controllers.
      
        Finally, tone down the warning about the X2APIC_OPT_OUT bit, due to
        persistent requests.  X2APIC_OPT_OUT was added to the spec as a nasty
        hack to allow broken BIOSes to forbid us from using X2APIC when they
        do stupid and invasive things and would break if we did.
      
        Someone noticed that since Windows doesn't have full IOMMU support for
        DMA protection, setting the X2APIC_OPT_OUT bit made Windows avoid
        initialising the IOMMU on the graphics unit altogether.
      
        This means that it would be available for use in "driver mode", where
        the IOMMU registers are made available through a BAR of the graphics
        device and the graphics driver can do SVM all for itself.
      
        So they started setting the X2APIC_OPT_OUT bit on *all* platforms with
        SVM capabilities.  And even the platforms which *might*, if the
        planets had been aligned correctly, possibly have had SVM capability
        but which in practice actually don't"
      
      * git://git.infradead.org/intel-iommu:
        iommu/vt-d: support extended root and context entries
        iommu/vt-d: Add new extended capabilities from v2.3 VT-d specification
        iommu/vt-d: Allow RMRR on graphics devices too
        iommu/vt-d: Print x2apic opt out info instead of printing a warning
        iommu/vt-d: kill bogus ecap_niotlb_iunits()
      9f86262d