1. 05 Jan, 2016 10 commits
    • Craig Gallek's avatar
      soreuseport: define reuseport groups · ef456144
      Craig Gallek authored
      struct sock_reuseport is an optional shared structure referenced by each
      socket belonging to a reuseport group.  When a socket is bound to an
      address/port not yet in use and the reuseport flag has been set, the
      structure will be allocated and attached to the newly bound socket.
      When subsequent calls to bind are made for the same address/port, the
      shared structure will be updated to include the new socket and the
      newly bound socket will reference the group structure.
      
      Usually, when an incoming packet was destined for a reuseport group,
      all sockets in the same group needed to be considered before a
      dispatching decision was made.  With this structure, an appropriate
      socket can be found after looking up just one socket in the group.
      
      This shared structure will also allow for more complicated decisions to
      be made when selecting a socket (eg a BPF filter).
      
      This work is based off a similar implementation written by
      Ying Cai <ycai@google.com> for implementing policy-based reuseport
      selection.
      Signed-off-by: default avatarCraig Gallek <kraig@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef456144
    • David S. Miller's avatar
      Merge branch 'mlxsw-fixes' · ebb3cf41
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      mlxsw: couple of fixes
      
      Couple of fixes from Ido.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ebb3cf41
    • Ido Schimmel's avatar
      mlxsw: spectrum: Change bridge port attributes only when bridged · 6c72a3d0
      Ido Schimmel authored
      Bridge port attributes are offloaded to hardware when invoked with SELF
      flag set, but it really makes no sense to reflect them when port is not
      bridged.
      
      Allow a user to change these attribute only when port is bridged and
      initialize them correctly when joining or leaving a bridge.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c72a3d0
    • Ido Schimmel's avatar
      mlxsw: spectrum: Set bridge status in appropriate functions · 5a8f4525
      Ido Schimmel authored
      Set the bridge status of physical ports in the appropriate functions, to
      be consistent with LAG join/leave and vPorts joining/leaving bridge.
      
      Also, remove the error messages in these two functions, as we already
      emit errors in both the single functions they call.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a8f4525
    • Ido Schimmel's avatar
      mlxsw: spectrum: Return NOTIFY_BAD on bridge failure · 78124078
      Ido Schimmel authored
      It is possible for us to fail when joining or leaving a bridge, so let
      the user know about that by returning NOTIFY_BAD, as already done for
      LAG join/leave and 802.1D bridges.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78124078
    • Ido Schimmel's avatar
      mlxsw: spectrum: Initialize PVID only once · 7b31abe7
      Ido Schimmel authored
      We set PVID to 1 in mlxsw_sp_port_vlan_init(), so we can remove this
      statement.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b31abe7
    • Julia Lawall's avatar
      chelsio: constify cphy_ops structures · 46f85a92
      Julia Lawall authored
      The cphy_ops structures are never modified, so declare them as const.
      
      Done with the help of Coccinelle.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46f85a92
    • Arnd Bergmann's avatar
      fsl/fman: allow modular build · 46678612
      Arnd Bergmann authored
      ARM allmodconfig fails because of the addition of the FMAN driver:
      
      drivers/built-in.o: In function `dtsec_restart_autoneg':
      binder.c:(.text+0x173328): undefined reference to `mdiobus_read'
      binder.c:(.text+0x173348): undefined reference to `mdiobus_write'
      drivers/built-in.o: In function `dtsec_config':
      binder.c:(.text+0x173d24): undefined reference to `of_phy_find_device'
      drivers/built-in.o: In function `init_phy':
      binder.c:(.text+0x1763b0): undefined reference to `of_phy_connect'
      drivers/built-in.o: In function `stop':
      binder.c:(.text+0x176014): undefined reference to `phy_stop'
      drivers/built-in.o: In function `start':
      binder.c:(.text+0x176078): undefined reference to `phy_start'
      
      The reason is that the driver uses PHYLIB, but that is a loadable
      module here, and fman itself is built-in.
      
      This patch makes it possible to configure fman as a module as well
      so we don't change the status of PHYLIB in an allmodconfig kernel,
      and it adds a 'select PHYLIB' statement to ensure that phylib is
      always built-in when fman is.
      
      The driver uses "builtin_platform_driver(fman_driver);", which means
      it cannot be unloaded, but it's still possible to have it as a loadable
      module that gets loaded once and never removed.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 5adae51a ("fsl/fman: Add FMan MURAM support")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46678612
    • Arnd Bergmann's avatar
      net: make ip6tunnel_xmit definition conditional · 0efeff29
      Arnd Bergmann authored
      Moving the caller of iptunnel_xmit_stats causes a build error in
      randconfig builds that disable CONFIG_INET:
      
      In file included from ../net/xfrm/xfrm_input.c:17:0:
      ../include/net/ip6_tunnel.h: In function 'ip6tunnel_xmit':
      ../include/net/ip6_tunnel.h:93:2: error: implicit declaration of function 'iptunnel_xmit_stats' [-Werror=implicit-function-declaration]
        iptunnel_xmit_stats(dev, pkt_len);
      
      The reason is that the iptunnel_xmit_stats definition is hidden
      inside #ifdef CONFIG_INET but the caller is not. We can change
      one or the other to fix it, and this patch adds a second #ifdef
      around ip6tunnel_xmit() to avoid seeing the invalid call.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 039f5062 ("ip_tunnel: Move stats update to iptunnel_xmit()")
      Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0efeff29
    • David S. Miller's avatar
      Merge tag 'nfc-next-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next · 15ab90f4
      David S. Miller authored
      Samuel Ortiz says:
      
      ====================
      NFC 4.5 pull request
      
      This is the first NFC pull request for 4.5 and it brings:
      
      - A new driver for the STMicroelectronics ST95HF NFC chipset.
        The ST95HF is an NFC digital transceiver with an embedded analog
        front-end and as such relies on the Linux NFC digital
        implementation. This is the 3rd user of the NFC digital stack.
      
      - ACPI support for the ST st-nci and st21nfca drivers.
      
      - A small improvement for the nfcsim driver, as we can now tune
        the Rx delay through sysfs.
      
      - A bunch of minor cleanups and small fixes from Christophe Ricard,
        for a few drivers and the NFC core code.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      15ab90f4
  2. 04 Jan, 2016 18 commits
  3. 31 Dec, 2015 11 commits
  4. 30 Dec, 2015 1 commit
    • Xin Long's avatar
      sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close · 068d8bd3
      Xin Long authored
      In sctp_close, sctp_make_abort_user may return NULL because of memory
      allocation failure. If this happens, it will bypass any state change
      and never free the assoc. The assoc has no chance to be freed and it
      will be kept in memory with the state it had even after the socket is
      closed by sctp_close().
      
      So if sctp_make_abort_user fails to allocate memory, we should abort
      the asoc via sctp_primitive_ABORT as well. Just like the annotation in
      sctp_sf_cookie_wait_prm_abort and sctp_sf_do_9_1_prm_abort said,
      "Even if we can't send the ABORT due to low memory delete the TCB.
      This is a departure from our typical NOMEM handling".
      
      But then the chunk is NULL (low memory) and the SCTP_CMD_REPLY cmd would
      dereference the chunk pointer, and system crash. So we should add
      SCTP_CMD_REPLY cmd only when the chunk is not NULL, just like other
      places where it adds SCTP_CMD_REPLY cmd.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      068d8bd3