1. 10 May, 2016 23 commits
  2. 09 May, 2016 17 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e800072c
      David S. Miller authored
      In netdevice.h we removed the structure in net-next that is being
      changes in 'net'.  In macsec.c and rtnetlink.c we have overlaps
      between fixes in 'net' and the u64 attribute changes in 'net-next'.
      
      The mlx5 conflicts have to do with vxlan support dependencies.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e800072c
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · b507146b
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes the following issues:
      
         - bug in ahash SG list walking that may lead to crashes
      
         - resource leak in qat
      
         - missing RSA dependency that causes it to fail"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: rsa - select crypto mgr dependency
        crypto: hash - Fix page length clamping in hash walk
        crypto: qat - fix adf_ctl_drv.c:undefined reference to adf_init_pf_wq
        crypto: qat - fix invalid pf2vf_resp_wq logic
      b507146b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 26acc792
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Check klogctl failure correctly, from Colin Ian King.
      
       2) Prevent OOM when under memory pressure in flowcache, from Steffen
          Klassert.
      
       3) Fix info leak in llc and rtnetlink ifmap code, from Kangjie Lu.
      
       4) Memory barrier and multicast handling fixes in bnxt_en, from Michael
          Chan.
      
       5) Endianness bug in mlx5, from Daniel Jurgens.
      
       6) Fix disconnect handling in VSOCK, from Ian Campbell.
      
       7) Fix locking of netdev list walking in get_bridge_ifindices(), from
          Nikolay Aleksandrov.
      
       8) Bridge multicast MLD parser can look at wrong packet offsets, fix
          from Linus Lüssing.
      
       9) Fix chip hang in qede driver, from Sudarsana Reddy Kalluru.
      
      10) Fix missing setting of encapsulation before inner handling completes
          in udp_offload code, from Jarno Rajahalme.
      
      11) Missing rollbacks during LAG join and flood configuration failures
          in mlxsw driver, from Ido Schimmel.
      
      12) Fix error code checks in netxen driver, from Dan Carpenter.
      
      13) Fix key size in new macsec driver, from Sabrina Dubroca.
      
      14) Fix mlx5/VXLAN dependencies, from Arnd Bergmann.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits)
        net/mlx5e: make VXLAN support conditional
        Revert "net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue"
        macsec: key identifier is 128 bits, not 64
        Documentation/networking: more accurate LCO explanation
        macvtap: segmented packet is consumed
        tools: bpf_jit_disasm: check for klogctl failure
        qede: uninitialized variable in qede_start_xmit()
        netxen: netxen_rom_fast_read() doesn't return -1
        netxen: reversed condition in netxen_nic_set_link_parameters()
        netxen: fix error handling in netxen_get_flash_block()
        mlxsw: spectrum: Add missing rollback in flood configuration
        mlxsw: spectrum: Fix rollback order in LAG join failure
        udp_offload: Set encapsulation before inner completes.
        udp_tunnel: Remove redundant udp_tunnel_gro_complete().
        qede: prevent chip hang when increasing channels
        net: ipv6: tcp reset, icmp need to consider L3 domain
        bridge: fix igmp / mld query parsing
        net: bridge: fix old ioctl unlocked net device walk
        VSOCK: do not disconnect socket when peer has shutdown SEND only
        net/mlx4_en: Fix endianness bug in IPV6 csum calculation
        ...
      26acc792
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · e8ed77df
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following large patchset contains Netfilter updates for your
      net-next tree. My initial intention was to send you this in two goes but
      when I looked back twice I already had this burden on top of me.
      
      Several updates for IPVS from Marco Angaroni:
      
      1) Allow SIP connections originating from real-servers to be load
         balanced by the SIP persistence engine as is already implemented
         in the other direction.
      
      2) Release connections immediately for One-packet-scheduling (OPS)
         in IPVS, instead of making it via timer and rcu callback.
      
      3) Skip deleting conntracks for each one packet in OPS, and don't call
         nf_conntrack_alter_reply() since no reply is expected.
      
      4) Enable drop on exhaustion for OPS + SIP persistence.
      
      Miscelaneous conntrack updates from Florian Westphal, including fix for
      hash resize:
      
      5) Move conntrack generation counter out of conntrack pernet structure
         since this is only used by the init_ns to allow hash resizing.
      
      6) Use get_random_once() from packet path to collect hash random seed
          instead of our compound.
      
      7) Don't disable BH from ____nf_conntrack_find() for statistics,
         use NF_CT_STAT_INC_ATOMIC() instead.
      
      8) Fix lookup race during conntrack hash resizing.
      
      9) Introduce clash resolution on conntrack insertion for connectionless
         protocol.
      
      Then, Florian's netns rework to get rid of per-netns conntrack table,
      thus we use one single table for them all. There was consensus on this
      change during the NFWS 2015 and, on top of that, it has recently been
      pointed as a source of multiple problems from unpriviledged netns:
      
      11) Use a single conntrack hashtable for all namespaces. Include netns
          in object comparisons and make it part of the hash calculation.
          Adapt early_drop() to consider netns.
      
      12) Use single expectation and NAT hashtable for all namespaces.
      
      13) Use a single slab cache for all namespaces for conntrack objects.
      
      14) Skip full table scanning from nf_ct_iterate_cleanup() if the pernet
          conntrack counter tells us the table is empty (ie. equals zero).
      
      Fixes for nf_tables interval set element handling, support to set
      conntrack connlabels and allow set names up to 32 bytes.
      
      15) Parse element flags from element deletion path and pass it up to the
          backend set implementation.
      
      16) Allow adjacent intervals in the rbtree set type for dynamic interval
          updates.
      
      17) Add support to set connlabel from nf_tables, from Florian Westphal.
      
      18) Allow set names up to 32 bytes in nf_tables.
      
      Several x_tables fixes and updates:
      
      19) Fix incorrect use of IS_ERR_VALUE() in x_tables, original patch
          from Andrzej Hajda.
      
      And finally, miscelaneous netfilter updates such as:
      
      20) Disable automatic helper assignment by default. Note this proc knob
          was introduced by a9006892 ("netfilter: nf_ct_helper: allow to
          disable automatic helper assignment") 4 years ago to start moving
          towards explicit conntrack helper configuration via iptables CT
          target.
      
      21) Get rid of obsolete and inconsistent debugging instrumentation
          in x_tables.
      
      22) Remove unnecessary check for null after ip6_route_output().
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8ed77df
    • Josh Poimboeuf's avatar
      compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16() · 8634de6d
      Josh Poimboeuf authored
      gcc support for __builtin_bswap16() was supposedly added for powerpc in
      gcc 4.6, and was then later added for other architectures in gcc 4.8.
      
      However, Stephen Rothwell reported that attempting to use it on powerpc
      in gcc 4.6 fails with:
      
        lib/vsprintf.c:160:2: error: initializer element is not constant
        lib/vsprintf.c:160:2: error: (near initialization for 'decpair[0]')
        lib/vsprintf.c:160:2: error: initializer element is not constant
        lib/vsprintf.c:160:2: error: (near initialization for 'decpair[1]')
        ...
      
      I'm not entirely sure what those errors mean, but I don't see them on
      gcc 4.8.  So let's consider gcc 4.8 to be the official starting point
      for __builtin_bswap16().
      
      Arnd Bergmann adds:
       "I found the commit in gcc-4.8 that replaced the powerpc-specific
        implementation of __builtin_bswap16 with an architecture-independent
        one.  Apparently the powerpc version (gcc-4.6 and 4.7) just mapped to
        the lhbrx/sthbrx instructions, so it ended up not being a constant,
        though the intent of the patch was mainly to add support for the
        builtin to x86:
      
          https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624
      
        has the patch that went into gcc-4.8 and more information."
      
      Fixes: 7322dd75 ("byteswap: try to avoid __builtin_constant_p gcc bug")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Tested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8634de6d
    • David S. Miller's avatar
      Merge branch 'dsa-mv88e6xxx-monolithic' · e26522cd
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: dsa: mv88e6xxx: turn into monolithic driver
      
      This patchset merges all mv88e6* drivers supported by the shared
      mv88e6xxx code into a single mv88e6xxx DSA switch driver.
      
      Some flags are added to describe the capabilities of a switch model,
      such as the presence of a PPU, EEPROM, some old or new registers, etc.
      
      First these flags are used to conditionally support the same set of
      functions in every driver, then specific driver files are removed in
      favor of the common mv88e6xxx driver.
      
      Only the merge of driver specific setup code assumes a few differences.
      If these differences such as frames priorities are really needed for
      some models, they can easily be brought back in a future patch.
      
      Some inconsistencies might show up, such as the need for
      MV88E6XXX_FLAG_PPU and MV88E6XXX_FLAG_PPU_ACTIVE flags. But this
      patchset does not aim to fix them yet. A future patch can do that if
      they end up being unwanted.
      
      The patchset has been tested on interconnected 88E6352 and 88E6185.
      
      Changes v1 -> v2:
        - add missing MV88E6XXX_FLAG_EEPROM flag checks
        - remove a few remaining _ prefixes
        - remove MV88E6XXX_FLAG_CORE_TAG_TYPE which is a specific default
      
      Changes RFC -> v1:
        - introduce flags in a separate patch
        - do not refactor anything yet
        - do not add new functions prefixed with _
        - drop packet discarding and mentioned tested platforms
        - factorize family flags
        - update text for NET_DSA_MV88E6XXX Kconfig entry
      ====================
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e26522cd
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize the switch driver · f81ec90f
      Vivien Didelot authored
      Now that all drivers support the same set of functions and the same
      setup code, drop every model-specific DSA switch driver and replace them
      with a common mv88e6xxx driver.
      
      This merges the info tables into one, removes the function exports, the
      model-specific files, and update the defconfigs.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f81ec90f
    • Vivien Didelot's avatar
      net: dsa: mv88e6131: use EDSA tag protocol · b9729e53
      Vivien Didelot authored
      6131 is the only driver to set the tag protocol to DSA_TAG_PROTO_DSA.
      Since it works fine with DSA_TAG_PROTO_EDSA, change its value, like all
      other mv88e6xxx drivers.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9729e53
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize switch setup · a1a6a4d1
      Vivien Didelot authored
      Provide a shared mv88e6xxx_setup function to the drivers.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1a6a4d1
    • Vivien Didelot's avatar
      net: dsa: mv88e6131: drop frames priorities setup · 8698fd95
      Vivien Didelot authored
      6131 is the only driver which setups the priority of IGMP/MLD snoop
      frames and ARP frames to the highest setting. Drop such change until we
      figure out a common configuration for all switch models.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8698fd95
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize GLOBAL_CONTROL_2 setup · 50484ff4
      Vivien Didelot authored
      All switch models setup the GLOBAL_CONTROL_2 register with slightly
      differences.
      
      Since the cascade mode is valid even in a single chip setup, factorize
      such configuration.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50484ff4
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize GLOBAL_MONITOR_CONTROL setup · b0745e87
      Vivien Didelot authored
      All switch drivers configure the GLOBAL_MONITOR_CONTROL register with
      slightly changes.
      
      Assume the setup of the upstream port, and configure it as the port to
      which ingress and egress and ARP monitor frames are to be sent.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0745e87
    • Vivien Didelot's avatar
      net: dsa: mv88e6131: drop VLAN Ethertype setup · 709643aa
      Vivien Didelot authored
      The 6131 switch models have a Core Tag Type register. Their setup code
      is setting it to 0x8100, which is the reset default.
      
      Drop this specific part which is correctly configured on reset anyway.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      709643aa
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize GLOBAL_CONTROL setup · 119477bd
      Vivien Didelot authored
      All switch models configure the GLOBAL_CONTROL register with slightly
      differences.
      
      Discarding packets with excessive collisions
      (GLOBAL_CONTROL_DISCARD_EXCESS) is specific to 6352 and similar
      switches, and setting a maximum frame size
      (GLOBAL_CONTROL_MAX_FRAME_1632) is specific to 6185 and similar
      switches.
      
      As we are centralizing the chips setup, skip these settings and don't
      discard any frames yet, until we found out that such discarding by the
      hardware is necessary.
      
      Assume a common setup to enable the PHY Polling Unit if present, don't
      discard any packets, and mask all interrupt sources.
      
      Tested on 88E6352 and 88E6185.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      119477bd
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize global setup · 08a01261
      Vivien Didelot authored
      Every driver is calling mv88e6xxx_setup_global after
      mv88e6xxx_setup_common. Call the former in the latter.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      08a01261
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize switch reset · 552238b5
      Vivien Didelot authored
      Add a MV88E6XXX_FLAG_PPU_ACTIVE flag to describe how to reset the
      switch, and merge the reset call to the common setup code.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      552238b5
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: factorize ATU access · 2672f825
      Vivien Didelot authored
      Add a MV88E6XXX_FLAG_ATU flag to identify switch models with an Address
      Translation Unit.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2672f825