1. 25 11月, 2016 10 次提交
  2. 23 11月, 2016 1 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f9aa9dc7
      David S. Miller 提交于
      All conflicts were simple overlapping changes except perhaps
      for the Thunder driver.
      
      That driver has a change_mtu method explicitly for sending
      a message to the hardware.  If that fails it returns an
      error.
      
      Normally a driver doesn't need an ndo_change_mtu method becuase those
      are usually just range changes, which are now handled generically.
      But since this extra operation is needed in the Thunder driver, it has
      to stay.
      
      However, if the message send fails we have to restore the original
      MTU before the change because the entire call chain expects that if
      an error is thrown by ndo_change_mtu then the MTU did not change.
      Therefore code is added to nicvf_change_mtu to remember the original
      MTU, and to restore it upon nicvf_update_hw_max_frs() failue.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9aa9dc7
  3. 22 11月, 2016 29 次提交
    • A
      marvell: mark mvneta and mvpp2 32-bit only · 06b37b65
      Arnd Bergmann 提交于
      Both of these drivers won't work on 64-bit architectures unless they
      are redesigned, since they store a virtual address pointer in a 32-bit
      field of the descriptors:
      
      drivers/net/ethernet/marvell/mvneta_bm.c: In function 'mvneta_bm_construct':
      drivers/net/ethernet/marvell/mvneta_bm.c:103:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_vlan_init':
      drivers/net/ethernet/marvell/mvpp2.c:2563:32: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
      
      This limits the COMPILE_TEST option for the two drivers again to
      only build them on 32-bit. This seems nicer than shutting up the
      warnings, in case we ever actually want to use them on 64-bit,
      as the warnings indicate which parts of the driver are currently
      broken there.
      
      Fixes: a0627f77 ("net: marvell: Allow drivers to be built with COMPILE_TEST")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06b37b65
    • D
      Merge branch 'mlxsw-thermal-zone' · 41f698b0
      David S. Miller 提交于
      Jiri Pirko says:
      
      ====================
      mlxsw: core: Implement thermal zone
      
      Implement thermal zone for mlxsw based HW.
      The first patch is just a register dependency for the second patch.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41f698b0
    • I
      mlxsw: core: Implement thermal zone · a50c1e35
      Ivan Vecera 提交于
      Implement thermal zone for mlxsw based HW. It uses temperature sensor
      provided by ASIC (the same as mlxsw hwmon interface) to report current
      temp to thermal core. The ASIC's PWM is then used to control speed
      of system fans registered as cooling devices.
      Signed-off-by: NIvan Vecera <cera@cera.cz>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a50c1e35
    • J
      mlxsw: reg: Add Management Fan Speed Limit register · 55c63aaa
      Jiri Pirko 提交于
      The MFSL register is used to configure the fan speed event / interrupt
      notification mechanism. Fan speed threshold are defined for both
      under-speed and over-speed.
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55c63aaa
    • D
      Merge branch 'mv88e6390-initial-support' · 29033726
      David S. Miller 提交于
      Andrew Lunn says:
      
      ====================
      Start adding support for mv88e6390
      
      This is the first patchset implementing support for the mv88e6390
      family.  This is a new generation of switch devices and has numerous
      incompatible changes to the registers. These patches allow the switch
      to the detected during probe, and makes the statistics unit work.
      
      These patches are insufficient to make the mv88e6390 functional. More
      patches will follow.
      
      v2:
        Move stats code into global1
        Change DT compatible string to mv88e6190
        Fixed mv88e6351 stats which v1 had broken
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29033726
    • A
      net: dsa: mv88e6xxx: Move g1 stats code in global1.[ch] · 7f9ef3af
      Andrew Lunn 提交于
      Move the stats functions which access global 1 registers into
      global1.c.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f9ef3af
    • A
      net: dsa: mv88e6xxx: Implement mv88e6390 get_stats · e0d8b615
      Andrew Lunn 提交于
      The mv88e6390 uses a different bit to select between bank0 and bank1
      of the statistics. So implement an ops function for this, and pass the
      selector bit to the generic stats read function. Also, the histogram
      selection has moved for the mv88e6390, so abstract its selection as
      well.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0d8b615
    • A
      net: dsa: mv88e6xxx: Add stats_get_stats to ops structure · 052f947f
      Andrew Lunn 提交于
      Different families have different sets of statistics. Abstract this
      using a stats_get_stats op. The mv88e6390 needs a different
      implementation, which will be added later.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      052f947f
    • A
      net: dsa: mv88e6xxx: Add stats_get_sset_count|string to ops structure · dfafe449
      Andrew Lunn 提交于
      Different families have different sets of statistics. Abstract this
      using a stats_get_sset_count and stats_get_strings op. Each stat has a
      bitmap, and the ops implementer uses a bit map mask to count the
      statistics which apply for the family, or return the list of strings.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      v2:
        Rename functions to avoid _ prefix.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dfafe449
    • A
      net: dsa: mv88e6xxx: Add mv88e6390 statistics unit init · de227387
      Andrew Lunn 提交于
      The statistics unit on the mv88e6390 needs the histogram mode to be
      configured in a different register compared to other devices. Add an
      ops to do this.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      v2:
        Rename to mv88e6390_g1_stats_set_histogram
        Move into global1.c
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de227387
    • A
      net: dsa: mv88e6xxx: Add mv88e6390 stats snapshot operation · 79523473
      Andrew Lunn 提交于
      The MV88E6390 has a control register for what the histogram statistics
      actually contain. This means the stat_snapshot method should not set
      this information. So implement the 6390 stats_snapshot function without
      these bits.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79523473
    • A
      net: dsa: mv88e6xxx: Add comment about family a device belongs to · 4b325d8c
      Andrew Lunn 提交于
      Knowing the family of device belongs to helps with picking the ops
      implementation which is appropriate to the device. So add a comment to
      each structure of ops.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b325d8c
    • A
      net: dsa: mv88e6xxx: Abstract stats_snapshot into ops structure · a605a0fe
      Andrew Lunn 提交于
      Taking a stats snapshot differs between same families. Abstract this
      into an ops member. At the same time, move the code into global1.[ch],
      since the registers are in the global1 range.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a605a0fe
    • A
      net: dsa: mv88e6xxx: Add the mv88e6390 family · 1a3b39ec
      Andrew Lunn 提交于
      With the devices added to the tables, the probe will recognize the
      switch. This however is not sufficient to make it work properly, other
      changes are needed because of incompatibilities.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a3b39ec
    • A
      net: dsa: mv88e6xxx: Fix unused variable warning by using variable · 096eea0f
      Andrew Lunn 提交于
      _mv88e6xxx_stats_wait() did not check the return value from
       mv88e6xxx_g1_read(), so the compiler complained about set but unused
       err.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      096eea0f
    • A
      net: dsa: mv88e6xxx: Take switch out of reset before probe · b4308f04
      Andrew Lunn 提交于
      The switch needs to be taken out of reset before we can read its ID
      register on the MDIO bus.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4308f04
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 3b404a51
      Linus Torvalds 提交于
      Pull apparmor bugfix from James Morris:
       "This has a fix for a policy replacement bug that is fairly serious for
        apache mod_apparmor users, as it results in the wrong policy being
        applied on an network facing service"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        apparmor: fix change_hat not finding hat after policy replacement
      3b404a51
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 8d1a2408
      Linus Torvalds 提交于
      Pull sparc fixes from David Miller:
      
       1) With modern networking cards we can run out of 32-bit DMA space, so
          support 64-bit DMA addressing when possible on sparc64. From Dave
          Tushar.
      
       2) Some signal frame validation checks are inverted on sparc32, fix
          from Andreas Larsson.
      
       3) Lockdep tables can get too large in some circumstances on sparc64,
          add a way to adjust the size a bit. From Babu Moger.
      
       4) Fix NUMA node probing on some sun4v systems, from Thomas Tai.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: drop duplicate header scatterlist.h
        lockdep: Limit static allocations if PROVE_LOCKING_SMALL is defined
        config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc
        sunbmac: Fix compiler warning
        sunqe: Fix compiler warnings
        sparc64: Enable 64-bit DMA
        sparc64: Enable sun4v dma ops to use IOMMU v2 APIs
        sparc64: Bind PCIe devices to use IOMMU v2 service
        sparc64: Initialize iommu_map_table and iommu_pool
        sparc64: Add ATU (new IOMMU) support
        sparc64: Add FORCE_MAX_ZONEORDER and default to 13
        sparc64: fix compile warning section mismatch in find_node()
        sparc32: Fix inverted invalid_frame_pointer checks on sigreturns
        sparc64: Fix find_node warning if numa node cannot be found
      8d1a2408
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 27e7ab99
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Clear congestion control state when changing algorithms on an
          existing socket, from Florian Westphal.
      
       2) Fix register bit values in altr_tse_pcs portion of stmmac driver,
          from Jia Jie Ho.
      
       3) Fix PTP handling in stammc driver for GMAC4, from Giuseppe
          CAVALLARO.
      
       4) Fix udplite multicast delivery handling, it ignores the udp_table
          parameter passed into the lookups, from Pablo Neira Ayuso.
      
       5) Synchronize the space estimated by rtnl_vfinfo_size and the space
          actually used by rtnl_fill_vfinfo. From Sabrina Dubroca.
      
       6) Fix memory leak in fib_info when splitting nodes, from Alexander
          Duyck.
      
       7) If a driver does a napi_hash_del() explicitily and not via
          netif_napi_del(), it must perform RCU synchronization as needed. Fix
          this in virtio-net and bnxt drivers, from Eric Dumazet.
      
       8) Likewise, it is not necessary to invoke napi_hash_del() is we are
          also doing neif_napi_del() in the same code path. Remove such calls
          from be2net and cxgb4 drivers, also from Eric Dumazet.
      
       9) Don't allocate an ID in peernet2id_alloc() if the netns is dead,
          from WANG Cong.
      
      10) Fix OF node and device struct leaks in of_mdio, from Johan Hovold.
      
      11) We cannot cache routes in ip6_tunnel when using inherited traffic
          classes, from Paolo Abeni.
      
      12) Fix several crashes and leaks in cpsw driver, from Johan Hovold.
      
      13) Splice operations cannot use freezable blocking calls in AF_UNIX,
          from WANG Cong.
      
      14) Link dump filtering by master device and kind support added an error
          in loop index updates during the dump if we actually do filter, fix
          from Zhang Shengju.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits)
        tcp: zero ca_priv area when switching cc algorithms
        net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit
        ethernet: stmmac: make DWMAC_STM32 depend on it's associated SoC
        tipc: eliminate obsolete socket locking policy description
        rtnl: fix the loop index update error in rtnl_dump_ifinfo()
        l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind()
        net: macb: add check for dma mapping error in start_xmit()
        rtnetlink: fix FDB size computation
        netns: fix get_net_ns_by_fd(int pid) typo
        af_unix: conditionally use freezable blocking calls in read
        net: ethernet: ti: cpsw: fix fixed-link phy probe deferral
        net: ethernet: ti: cpsw: add missing sanity check
        net: ethernet: ti: cpsw: fix secondary-emac probe error path
        net: ethernet: ti: cpsw: fix of_node and phydev leaks
        net: ethernet: ti: cpsw: fix deferred probe
        net: ethernet: ti: cpsw: fix mdio device reference leak
        net: ethernet: ti: cpsw: fix bad register access in probe error path
        net: sky2: Fix shutdown crash
        cfg80211: limit scan results cache size
        net sched filters: pass netlink message flags in event notification
        ...
      27e7ab99
    • B
      net: ieee802154: constify ieee802154_ops structures · e796f49d
      Bhumika Goyal 提交于
      Declare the structure ieee802154_ops as const as it is only passed as an
      argument to the function  ieee802154_alloc_hw. This argument is of type
      const struct ieee802154_ops *, so ieee80254_ops structures having this
      property can be declared as const.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct ieee802154_ops i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      expression e1;
      @@
      ieee802154_alloc_hw(e1,&i@p)
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct ieee802154_ops  i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct ieee802154_ops  i;
      
      The before and after size details of the affected files are:
      
         text	   data	    bss	    dec	    hex	filename
         8669	   1176	     16	   9861	   2685	drivers/net/ieee802154/adf7242.o
         8805	   1048	     16	   9869	   268d	drivers/net/ieee802154/adf7242.o
      
         text	   data	    bss	    dec	    hex	filename
         7211	   2296	     32	   9539	   2543	drivers/net/ieee802154/atusb.o
         7339	   2160	     32	   9531	   253b	drivers/net/ieee802154/atusb.o
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Acked-by: NStefan Schmidt <stefan@osg.samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e796f49d
    • D
      Merge branch 'geneve-lwt-efficiency' · acbec856
      David S. Miller 提交于
      Pravin B Shelar says:
      
      ====================
      geneve: Use LWT more effectively.
      
      Following patch series make use of geneve LWT code path for
      geneve netdev type of device.
      This allows us to simplify geneve module without changing any
      functionality.
      
      v2-v3:
      Rebase against latest net-next.
      
      v1-v2:
      Fix warning reported by kbuild test robot.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acbec856
    • P
      geneve: Optimize geneve device lookup. · 2e0b26e1
      pravin shelar 提交于
      Rather than comparing 64-bit tunnel-id, compare tunnel vni
      which is 24-bit id. This also save conversion from vni
      to tunnel id on each tunnel packet receive.
      Signed-off-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e0b26e1
    • P
      geneve: Remove redundant socket checks. · bcceeec3
      pravin shelar 提交于
      Geneve already has check for device socket in route
      lookup function. So no need to check it in xmit
      function.
      Signed-off-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bcceeec3
    • P
      geneve: Merge ipv4 and ipv6 geneve_build_skb() · c3ef5aa5
      pravin shelar 提交于
      There are minimal difference in building Geneve header
      between ipv4 and ipv6 geneve tunnels. Following patch
      refactors code to unify it.
      Signed-off-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3ef5aa5
    • P
      geneve: Unify LWT and netdev handling. · 9b4437a5
      pravin shelar 提交于
      Current geneve implementation has two separate cases to handle.
      1. netdev xmit
      2. LWT xmit.
      
      In case of netdev, geneve configuration is stored in various
      struct geneve_dev members. For example geneve_addr, ttl, tos,
      label, flags, dst_cache, etc. For LWT ip_tunnel_info is passed
      to the device in ip_tunnel_info.
      
      Following patch uses ip_tunnel_info struct to store almost all
      of configuration of a geneve netdevice. This allows us to unify
      most of geneve driver code around ip_tunnel_info struct.
      This dramatically simplify geneve code, since it does not
      need to handle two different configuration cases. Removes
      duplicate code, single code path can handle either type
      of geneve devices.
      Signed-off-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b4437a5
    • D
      Merge branch 'tcp-cong-undo_cwnd-mandatory' · 9e36ced6
      David S. Miller 提交于
      Florian Westphal says:
      
      ====================
      tcp: make undo_cwnd mandatory for congestion modules
      
      highspeed, illinois, scalable, veno and yeah congestion control algorithms
      don't provide a 'cwnd_undo' function.  This makes the stack default to a
      'reno undo' which doubles cwnd.  However, the ssthresh implementation of
      these algorithms do not halve the slowstart threshold. This causes similar
      issue as the one fixed for dctcp in ce6dd233 ("dctcp: avoid bogus
      doubling of cwnd after loss").
      
      In light of this it seems better to remove the fallback and make undo_cwnd
      mandatory.
      
      First patch fixes those spots where reno undo seems incorrect by providing
      .cwnd_undo functions, second patch removes the fallback.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e36ced6
    • F
      tcp: make undo_cwnd mandatory for congestion modules · e9799183
      Florian Westphal 提交于
      The undo_cwnd fallback in the stack doubles cwnd based on ssthresh,
      which un-does reno halving behaviour.
      
      It seems more appropriate to let congctl algorithms pair .ssthresh
      and .undo_cwnd properly. Add a 'tcp_reno_undo_cwnd' function and wire it
      up for all congestion algorithms that used to rely on the fallback.
      
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9799183
    • F
      tcp: add cwnd_undo functions to various tcp cc algorithms · 85f7e750
      Florian Westphal 提交于
      congestion control algorithms that do not halve cwnd in their .ssthresh
      should provide a .cwnd_undo rather than rely on current fallback which
      assumes reno halving (and thus doubles the cwnd).
      
      All of these do 'something else' in their .ssthresh implementation, thus
      store the cwnd on loss and provide .undo_cwnd to restore it again.
      
      A followup patch will remove the fallback and all algorithms will
      need to provide a .cwnd_undo function.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85f7e750
    • D
      Merge branch 'bridge-igmpv3-mldv2-support' · 2fcb58ab
      David S. Miller 提交于
      Nikolay Aleksandrov says:
      
      ====================
      bridge: add support for IGMPv3 and MLDv2 querier
      
      This patch-set adds support for IGMPv3 and MLDv2 querier in the bridge.
      Two new options which can be toggled via netlink and sysfs are added that
      control the version per-bridge:
       multicast_igmp_version - default 2, can be set to 3
       multicast_mld_version - default 1, can be set to 2 (this option is
                               disabled if CONFIG_IPV6=n)
      
      Note that the names do not include "querier", I think that these options
      can be re-used later as more IGMPv3 support is added to the bridge so we
      can avoid adding more options to switch between v2 and v3 behaviour.
      
      The set uses the already existing br_ip{4,6}_multicast_alloc_query
      functions and adds the appropriate header based on the chosen version.
      
      For the initial support I have removed the compatibility implementation
      (RFC3376 sec 7.3.1, 7.3.2; RFC3810 sec 8.3.1, 8.3.2), because there are
      some details that we need to sort out.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fcb58ab