1. 21 Jun, 2017 29 commits
  2. 20 Jun, 2017 11 commits
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2017-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · f5c30647
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2017-06-20 (mlx5 IPoIB updates)
      
      This series includes updates to mlx5 IPoIB netdevice driver (mlx5i),
      
      1. We move ipoib files into separate directory, to allow it to grow
         separately in its own space
      2. Remove HW update carrier logic from IPoIB and VF representors profiles.
      3. Add basic ethtool support. (Rings options/statistics and driver info).
      4. Change MTU support.
      5. Xmit path statistics reporting.
      6. add PTP support.
      
      For the new ethtool ops, PTP (ioctl) and change_mtu ndos in IPoIB, we didn't add new
      implementation or new logic, we only reused those callbacks from the already existing
      mlx5e (ethernet netdevice profile) and exposed them in IPoIB netdevice/ethtool ops.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5c30647
    • David S. Miller's avatar
      Merge branch 's390-net-updates-part-2' · 8abd5599
      David S. Miller authored
      Julian Wiedmann says:
      
      ====================
      s390/net updates, part 2 (v2)
      
      thanks for the feedback. Here's an updated patchset that honours
      the reverse christmas tree and drops the __packed attribute. Please apply.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8abd5599
    • Julian Wiedmann's avatar
      s390/qeth: use diag26c to get MAC address on L2 · ec61bd2f
      Julian Wiedmann authored
      When a s390 guest runs on a z/VM host that's part of a SSI cluster,
      it can be migrated to a different host. In this case, the MAC address
      it originally obtained on the old host may be re-assigned to a new
      guest. This would result in address conflicts between the two guests.
      
      When running as z/VM guest, use the diag26c MAC Service to obtain
      a hypervisor-managed MAC address. The MAC Service is SSI-aware, and
      won't re-assign the address after the guest is migrated to a new host.
      
      This patch adds support for the z/VM MAC Service on L2 devices.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Acked-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec61bd2f
    • Julian Wiedmann's avatar
      s390/diag: add diag26c support · 1b030478
      Julian Wiedmann authored
      Implement support for the hypervisor diagnose 0x26c
      ('Access Certain System Information').
      It passes a request buffer and a subfunction code, and receives
      a response buffer and a return code.
      
      Also add the scaffolding for the 'MAC Services' subfunction.
      It may be used by network devices to obtain a hypervisor-managed
      MAC address.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Acked-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b030478
    • Julian Wiedmann's avatar
      s390/qeth: fix packing buffer statistics · 3cdc8a25
      Julian Wiedmann authored
      There's two spots in qeth_send_packet() where we don't accurately
      account for transmitted packing buffers in qeth's performance
      statistics:
      
      1) when flushing the current buffer due to insufficient size,
         and the next buffer is not EMPTY, we need to account for that
         flushed buffer.
      2) when synchronizing with the TX completion code, we reset
         flush_count and thus forget to account for any previously
         flushed buffers.
      Reported-by: default avatarNils Hoppmann <niho@de.ibm.com>
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3cdc8a25
    • Kittipon Meesompop's avatar
      s390/qeth: add ipa return codes for bridgeport · 2063a5f5
      Kittipon Meesompop authored
      add ipa return codes for Bridgeport (HiperSockets and OSA) according to
      system level design.
      Signed-off-by: default avatarKittipon Meesompop <kmeesomp@linux.vnet.ibm.com>
      Reviewed-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Reviewed-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2063a5f5
    • Xin Long's avatar
      sctp: handle errors when updating asoc · 5ee8aa68
      Xin Long authored
      It's a bad thing not to handle errors when updating asoc. The memory
      allocation failure in any of the functions called in sctp_assoc_update()
      would cause sctp to work unexpectedly.
      
      This patch is to fix it by aborting the asoc and reporting the error when
      any of these functions fails.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ee8aa68
    • Xin Long's avatar
      sctp: uncork the old asoc before changing to the new one · 8cd5c25f
      Xin Long authored
      local_cork is used to decide if it should uncork asoc outq after processing
      some cmds, and it is set when replying or sending msgs. local_cork should
      always have the same value with current asoc q->cork in some way.
      
      The thing is when changing to a new asoc by cmd SET_ASOC, local_cork may
      not be consistent with the current asoc any more. The cmd seqs can be:
      
        SCTP_CMD_UPDATE_ASSOC (asoc)
        SCTP_CMD_REPLY (asoc)
        SCTP_CMD_SET_ASOC (new_asoc)
        SCTP_CMD_DELETE_TCB (new_asoc)
        SCTP_CMD_SET_ASOC (asoc)
        SCTP_CMD_REPLY (asoc)
      
      The 1st REPLY makes OLD asoc q->cork and local_cork both are 1, and the cmd
      DELETE_TCB clears NEW asoc q->cork and local_cork. After asoc goes back to
      OLD asoc, q->cork is still 1 while local_cork is 0. The 2nd REPLY will not
      set local_cork because q->cork is already set and it can't be uncorked and
      sent out because of this.
      
      To keep local_cork consistent with the current asoc q->cork, this patch is
      to uncork the old asoc if local_cork is set before changing to the new one.
      
      Note that the above cmd seqs will be used in the next patch when updating
      asoc and handling errors in it.
      Suggested-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8cd5c25f
    • Xin Long's avatar
      dccp: call inet_add_protocol after register_pernet_subsys in dccp_v6_init · a0f9a4c2
      Xin Long authored
      Patch "call inet_add_protocol after register_pernet_subsys in dccp_v4_init"
      fixed a null pointer dereference issue for dccp_ipv4 module.
      
      The same fix is needed for dccp_ipv6 module.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0f9a4c2
    • Xin Long's avatar
      dccp: call inet_add_protocol after register_pernet_subsys in dccp_v4_init · d5494acb
      Xin Long authored
      Now dccp_ipv4 works as a kernel module. During loading this module, if
      one dccp packet is being recieved after inet_add_protocol but before
      register_pernet_subsys in which v4_ctl_sk is initialized, a null pointer
      dereference may be triggered because of init_net.dccp.v4_ctl_sk is 0x0.
      
      Jianlin found this issue when the following call trace occurred:
      
      [  171.950177] BUG: unable to handle kernel NULL pointer dereference at 0000000000000110
      [  171.951007] IP: [<ffffffffc0558364>] dccp_v4_ctl_send_reset+0xc4/0x220 [dccp_ipv4]
      [...]
      [  171.984629] Call Trace:
      [  171.984859]  <IRQ>
      [  171.985061]
      [  171.985213]  [<ffffffffc0559a53>] dccp_v4_rcv+0x383/0x3f9 [dccp_ipv4]
      [  171.985711]  [<ffffffff815ca054>] ip_local_deliver_finish+0xb4/0x1f0
      [  171.986309]  [<ffffffff815ca339>] ip_local_deliver+0x59/0xd0
      [  171.986852]  [<ffffffff810cd7a4>] ? update_curr+0x104/0x190
      [  171.986956]  [<ffffffff815c9cda>] ip_rcv_finish+0x8a/0x350
      [  171.986956]  [<ffffffff815ca666>] ip_rcv+0x2b6/0x410
      [  171.986956]  [<ffffffff810c83b4>] ? task_cputime+0x44/0x80
      [  171.986956]  [<ffffffff81586f22>] __netif_receive_skb_core+0x572/0x7c0
      [  171.986956]  [<ffffffff810d2c51>] ? trigger_load_balance+0x61/0x1e0
      [  171.986956]  [<ffffffff81587188>] __netif_receive_skb+0x18/0x60
      [  171.986956]  [<ffffffff8158841e>] process_backlog+0xae/0x180
      [  171.986956]  [<ffffffff8158799d>] net_rx_action+0x16d/0x380
      [  171.986956]  [<ffffffff81090b7f>] __do_softirq+0xef/0x280
      [  171.986956]  [<ffffffff816b6a1c>] call_softirq+0x1c/0x30
      
      This patch is to move inet_add_protocol after register_pernet_subsys in
      dccp_v4_init, so that v4_ctl_sk is initialized before any incoming dccp
      packets are processed.
      Reported-by: default avatarJianlin Shi <jishi@redhat.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d5494acb
    • Govindarajulu Varadarajan's avatar
      enic: Fix format truncation warning · 7044f429
      Govindarajulu Varadarajan authored
      With -Wformat-truncation, gcc throws the following warning.
      
      Fix this by increasing the size of devname to accommodate 15 character
      netdev interface name and description.
      
      Remove length format precision for %s. We can fit entire name.
      
      Also increment the version.
      
      drivers/net/ethernet/cisco/enic/enic_main.c: In function ‘enic_open’:
      drivers/net/ethernet/cisco/enic/enic_main.c:1740:15: warning: ‘%u’ directive output may be truncated writing between 1 and 2 bytes into a region of size between 1 and 12 [-Wformat-truncation=]
           "%.11s-rx-%u", netdev->name, i);
                     ^~
      drivers/net/ethernet/cisco/enic/enic_main.c:1740:5: note: directive argument in the range [0, 16]
           "%.11s-rx-%u", netdev->name, i);
           ^~~~~~~~~~~~~
      drivers/net/ethernet/cisco/enic/enic_main.c:1738:4: note: ‘snprintf’ output between 6 and 18 bytes into a destination of size 16
          snprintf(enic->msix[intr].devname,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           sizeof(enic->msix[intr].devname),
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           "%.11s-rx-%u", netdev->name, i);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarGovindarajulu Varadarajan <gvaradar@cisco.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7044f429