1. 14 Mar, 2018 10 commits
    • Ursula Braun's avatar
      net/smc: pay attention to MAX_ORDER for CQ entries · c9f4c6cf
      Ursula Braun authored
      smc allocates a certain number of CQ entries for used RoCE devices. For
      mlx5 devices the chosen constant number results in a large allocation
      causing this warning:
      
      [13355.124656] WARNING: CPU: 3 PID: 16535 at mm/page_alloc.c:3883 __alloc_pages_nodemask+0x2be/0x10c0
      [13355.124657] Modules linked in: smc_diag(O) smc(O) xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter mlx5_ib ib_core sunrpc mlx5_core s390_trng rng_core ghash_s390 prng aes_s390 des_s390 des_generic sha512_s390 sha256_s390 sha1_s390 sha_common ptp pps_core eadm_sch dm_multipath dm_mod vhost_net tun vhost tap sch_fq_codel kvm ip_tables x_tables autofs4 [last unloaded: smc]
      [13355.124672] CPU: 3 PID: 16535 Comm: kworker/3:0 Tainted: G           O    4.14.0uschi #1
      [13355.124673] Hardware name: IBM 3906 M04 704 (LPAR)
      [13355.124675] Workqueue: events smc_listen_work [smc]
      [13355.124677] task: 00000000e2f22100 task.stack: 0000000084720000
      [13355.124678] Krnl PSW : 0704c00180000000 000000000029da76 (__alloc_pages_nodemask+0x2be/0x10c0)
      [13355.124681]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
      [13355.124682] Krnl GPRS: 0000000000000000 00550e00014080c0 0000000000000000 0000000000000001
      [13355.124684]            000000000029d8b6 00000000f3bfd710 0000000000000000 00000000014080c0
      [13355.124685]            0000000000000009 00000000ec277a00 0000000000200000 0000000000000000
      [13355.124686]            0000000000000000 00000000000001ff 000000000029d8b6 0000000084723720
      [13355.124708] Krnl Code: 000000000029da6a: a7110200		tmll	%r1,512
                                000000000029da6e: a774ff29		brc	7,29d8c0
                               #000000000029da72: a7f40001		brc	15,29da74
                               >000000000029da76: a7f4ff25		brc	15,29d8c0
                                000000000029da7a: a7380000		lhi	%r3,0
                                000000000029da7e: a7f4fef1		brc	15,29d860
                                000000000029da82: 5820f0c4		l	%r2,196(%r15)
                                000000000029da86: a53e0048		llilh	%r3,72
      [13355.124720] Call Trace:
      [13355.124722] ([<000000000029d8b6>] __alloc_pages_nodemask+0xfe/0x10c0)
      [13355.124724]  [<000000000013bd1e>] s390_dma_alloc+0x6e/0x148
      [13355.124733]  [<000003ff802eeba6>] mlx5_dma_zalloc_coherent_node+0x8e/0xe0 [mlx5_core]
      [13355.124740]  [<000003ff802eee18>] mlx5_buf_alloc_node+0x70/0x108 [mlx5_core]
      [13355.124744]  [<000003ff804eb410>] mlx5_ib_create_cq+0x558/0x898 [mlx5_ib]
      [13355.124749]  [<000003ff80407d40>] ib_create_cq+0x48/0x88 [ib_core]
      [13355.124751]  [<000003ff80109fba>] smc_ib_setup_per_ibdev+0x52/0x118 [smc]
      [13355.124753]  [<000003ff8010bcb6>] smc_conn_create+0x65e/0x728 [smc]
      [13355.124755]  [<000003ff801081a2>] smc_listen_work+0x2d2/0x540 [smc]
      [13355.124756]  [<0000000000162c66>] process_one_work+0x1be/0x440
      [13355.124758]  [<0000000000162f40>] worker_thread+0x58/0x458
      [13355.124759]  [<0000000000169e7e>] kthread+0x14e/0x168
      [13355.124760]  [<00000000009ce8be>] kernel_thread_starter+0x6/0xc
      [13355.124762]  [<00000000009ce8b8>] kernel_thread_starter+0x0/0xc
      [13355.124762] Last Breaking-Event-Address:
      [13355.124764]  [<000000000029da72>] __alloc_pages_nodemask+0x2ba/0x10c0
      [13355.124764] ---[ end trace 34be38b581c0b585 ]---
      
      This patch reduces the smc constant for the maximum number of allocated
      completion queue entries SMC_MAX_CQE by 2 to avoid high round up values
      in the mlx5 code, and reduces the number of allocated completion queue
      entries even more, if the final allocation for an mlx5 device hits the
      MAX_ORDER limit.
      Reported-by: default avatarIhnken Menssen <menssen@de.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c9f4c6cf
    • Veerasenareddy Burru's avatar
      liquidio: Add support for liquidio 10GBase-T NIC · 5677629a
      Veerasenareddy Burru authored
      Added ethtool changes to show port type as TP (Twisted Pair) for
      10GBASE-T ports. Same driver and firmware works for liquidio NIC with
      SFP+ ports or TP ports.
      Signed-off-by: default avatarVeerasenareddy Burru <veerasenareddy.burru@cavium.com>
      Signed-off-by: default avatarFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5677629a
    • Jason Wang's avatar
      tuntap: XDP_TX can use native XDP · 59655a5b
      Jason Wang authored
      Now we have ndo_xdp_xmit, switch to use it instead of the slow generic
      XDP TX routine. XDP_TX on TAP gets ~20% improvements from ~1.5Mpps to
      ~1.8Mpps on 2.60GHz Core(TM) i7-5600U.
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59655a5b
    • David S. Miller's avatar
      Merge branch 'sfc-support-FEC-configuration' · 815df9ac
      David S. Miller authored
      Edward Cree says:
      
      ====================
      sfc: support FEC configuration
      
      Implements the ethtool get & set fecparam operations.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      815df9ac
    • Edward Cree's avatar
      sfc: support FEC configuration through ethtool · 7f61e6c6
      Edward Cree authored
      As well as 'auto' and the forced 'off', 'rs' and 'baser' states, we also
       handle combinations of settings (since the fecparam->fec field is a
       bitmask), where auto|rs and auto|baser specify a preferred FEC mode but
       will fall back to the other if the cable or link partner doesn't support
       it.  rs|baser (with or without auto bit) means prefer FEC even where
       auto wouldn't use it, but let FW choose which encoding to use.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f61e6c6
    • Edward Cree's avatar
      sfc: update MCDI protocol headers · f215347c
      Edward Cree authored
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f215347c
    • John Allen's avatar
      ibmvnic: Fix reset return from closed state · e676d81c
      John Allen authored
      The case in which we handle a reset from the state where the device is
      closed seems to be bugged for all types of reset. For most types of reset
      we currently exit the reset routine correctly, but don't set the state to
      indicate that we are back in the "closed" state. For some specific cases,
      we don't exit the reset routine at all and resetting will cause a closed
      device to be opened.
      
      This patch fixes the problem by unconditionally checking the reset_state
      and correctly setting the adapter state before returning.
      Signed-off-by: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e676d81c
    • Willem de Bruijn's avatar
      sock: remove zerocopy sockopt restriction on closed tcp state · ced68234
      Willem de Bruijn authored
      Socket option SO_ZEROCOPY determines whether the kernel ignores or
      processes flag MSG_ZEROCOPY on subsequent send calls. This to avoid
      changing behavior for legacy processes.
      
      Limiting the state change to closed sockets is annoying with passive
      sockets and not necessary for correctness. Once created, zerocopy skbs
      are processed based on their private state, not this socket flag.
      
      Remove the constraint.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ced68234
    • Gustavo A. R. Silva's avatar
      pktgen: Fix memory leak in pktgen_if_write · 29d1df72
      Gustavo A. R. Silva authored
      _buf_ is an array and the one that must be freed is _tp_ instead.
      
      Fixes: a870a02c ("pktgen: use dynamic allocation for debug print buffer")
      Reported-by: default avatarWang Jian <jianjian.wang1@gmail.com>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29d1df72
    • Arnd Bergmann's avatar
      pktgen: use dynamic allocation for debug print buffer · a870a02c
      Arnd Bergmann authored
      After the removal of the VLA, we get a harmless warning about a large
      stack frame:
      
      net/core/pktgen.c: In function 'pktgen_if_write':
      net/core/pktgen.c:1710:1: error: the frame size of 1076 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      The function was previously shown to be safe despite hitting
      the 1024 bye warning level. To get rid of the annoyging warning,
      while keeping it readable, this changes it to use strndup_user().
      
      Obviously this is not a fast path, so the kmalloc() overhead
      can be disregarded.
      
      Fixes: 35951393 ("pktgen: Remove VLA usage")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a870a02c
  2. 13 Mar, 2018 18 commits
  3. 12 Mar, 2018 12 commits