1. 01 Oct, 2017 5 commits
    • Colin Ian King's avatar
      net_sched: remove redundant assignment to ret · b1c49d14
      Colin Ian King authored
      The assignment of -EINVAL to variable ret is redundant as it
      is being overwritten on the following error exit paths or
      to the return value from the following call to basic_set_parms.
      Fix this up by removing it. Cleans up clang warning message:
      
      net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read
      
      Fixes: 1d8134fe ("net_sched: use idr to allocate basic filter handles")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1c49d14
    • Colin Ian King's avatar
      net: ipmr: make function ipmr_notifier_init static · ef739d8a
      Colin Ian King authored
      The function ipmr_notifier_init is local to the source and does
      not need to be in global scope, so make it static.
      
      Cleans up sparse warning:
      warning: symbol 'ipmr_notifier_init' was not declared. Should it be static?
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef739d8a
    • Mick Tarsel's avatar
      ibmvnic: Set state UP · e876a8a7
      Mick Tarsel authored
      State is initially reported as UNKNOWN. Before register call
      netif_carrier_off(). Once the device is opened, call netif_carrier_on() in
      order to set the state to UP.
      Signed-off-by: default avatarMick Tarsel <mjtarsel@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e876a8a7
    • Florian Fainelli's avatar
      Revert "net: dsa: bcm_sf2: Defer port enabling to calling port_enable" · 21a2774e
      Florian Fainelli authored
      This reverts commit e85ec74a ("net: dsa: bcm_sf2: Defer port
      enabling to calling port_enable") because this now makes an unbind
      followed by a bind to fail connecting to the ingrated PHY.
      
      What this patch missed is that we need the PHY to be enabled with
      bcm_sf2_gphy_enable_set() before probing it on the MDIO bus. This is
      correctly done in the ops->setup() function, but by the time
      ops->port_enable() runs, this is too late. Upon unbind we would power
      down the PHY, and so when we would bind again, the PHY would be left
      powered off.
      
      Fixes: e85ec74a ("net: dsa: bcm_sf2: Defer port enabling to calling port_enable")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21a2774e
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · a6992ebe
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2017-09-29
      
      This series contains updates to i40e and i40evf only.
      
      Jake provides several of the changes starting with the renaming of a
      variable to clarify what the value is actually calculating. Found we
      were misusing the __I40E_RECOVERY_PENDING bit to determine when we
      should actually request a new IRQ in i40e_setup_misc_vector(), which
      lead to a design mistake, so to resolve the issue, use a separate
      state bit for miscellaneous IRQ setup and fix up the design while we
      are at it.  Cleaned up the old legacy PM support in the driver since
      we support the newer generic PM callbacks.  Fixed a failure to
      hibernate issue, where on some platforms with a large number of CPUs,
      we would allocate many IRQ vectors which we would try to migrate to
      CPU0 when hibernating.
      
      Sudheer cleans up a check for unqualified module inside i40e_up_complete()
      because the link state information is in flux at time, so log messages
      are getting logged with incorrect link state information.  Also provided
      additional log message cleanups and simplify member variable access in
      the printing of the link messages.
      
      Mariusz relaxes the firmware check since Fortville and Fort Park NICs
      can and do have different firmware versions, so only warn for older
      Fortville firmware.  Fixed an errata with a flow director statistic that
      was not wrapping as expected, simply reset after reading.
      
      Mitch prevents consternation by lowering the log level to debug on a
      message seen regularly on VF reset or unload, which is meaningless under
      normal circumstances.  Refactor the firmware version checking since
      Fortville and Fort Park devices can have different firmware versions.
      
      Alan fixes a ring to vector mapping, where the past implementation
      attempted to map each Tx and Rx ring to its own vector, however we use
      combined queues so we should be mapping the Tx/Rx rings together on one
      vector.  Adds the ability for the VF to request a different number of
      queues allocated to it.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6992ebe
  2. 30 Sep, 2017 3 commits
    • Colin Ian King's avatar
      mkiss: remove redundant check on len being zero · 45c1fd61
      Colin Ian King authored
      The check on len is redundant as it is always greater than 1,
      so just remove it and make the printk less complex.
      
      Detected by CoverityScan, CID#1226729 ("Logically dead code")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45c1fd61
    • Maciej Żenczykowski's avatar
      net-ipv6: add support for sockopt(SOL_IPV6, IPV6_FREEBIND) · 84e14fe3
      Maciej Żenczykowski authored
      So far we've been relying on sockopt(SOL_IP, IP_FREEBIND) being usable
      even on IPv6 sockets.
      
      However, it turns out it is perfectly reasonable to want to set freebind
      on an AF_INET6 SOCK_RAW socket - but there is no way to set any SOL_IP
      socket option on such a socket (they're all blindly errored out).
      
      One use case for this is to allow spoofing src ip on a raw socket
      via sendmsg cmsg.
      
      Tested:
        built, and booted
        # python
        >>> import socket
        >>> SOL_IP = socket.SOL_IP
        >>> SOL_IPV6 = socket.IPPROTO_IPV6
        >>> IP_FREEBIND = 15
        >>> IPV6_FREEBIND = 78
        >>> s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, 0)
        >>> s.getsockopt(SOL_IP, IP_FREEBIND)
        0
        >>> s.getsockopt(SOL_IPV6, IPV6_FREEBIND)
        0
        >>> s.setsockopt(SOL_IPV6, IPV6_FREEBIND, 1)
        >>> s.getsockopt(SOL_IP, IP_FREEBIND)
        1
        >>> s.getsockopt(SOL_IPV6, IPV6_FREEBIND)
        1
      Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84e14fe3
    • Mike Manning's avatar
      net: ipv6: send NS for DAD when link operationally up · 1f372c7b
      Mike Manning authored
      The NS for DAD are sent on admin up as long as a valid qdisc is found.
      A race condition exists by which these packets will not egress the
      interface if the operational state of the lower device is not yet up.
      The solution is to delay DAD until the link is operationally up
      according to RFC2863. Rather than only doing this, follow the existing
      code checks by deferring IPv6 device initialization altogether. The fix
      allows DAD on devices like tunnels that are controlled by userspace
      control plane. The fix has no impact on regular deployments, but means
      that there is no IPv6 connectivity until the port has been opened in
      the case of port-based network access control, which should be
      desirable.
      Signed-off-by: default avatarMike Manning <mmanning@brocade.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f372c7b
  3. 29 Sep, 2017 25 commits
  4. 28 Sep, 2017 7 commits