Skip to content
  1. Jun 14, 2017
  2. Jun 13, 2017
  3. Jun 12, 2017
  4. Jun 11, 2017
    • Majd Dibbiny's avatar
      net/mlx5: Enable 4K UAR only when page size is bigger than 4K · 91828bd8
      Majd Dibbiny authored
      When the page size isn't bigger than 4K, there is no added value of enabling 4K
      UAR feature in the Firmware.
      
      Modified the condition of enabling the 4K UAR accordingly.
      
      Fixes: f502d834
      
       ("net/mlx5: Activate support for 4K UARs")
      Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      91828bd8
    • Tal Gilboa's avatar
      net/mlx5e: Fix wrong indications in DIM due to counter wraparound · 53acd76c
      Tal Gilboa authored
      DIM (Dynamically-tuned Interrupt Moderation) is a mechanism designed for
      changing the channel interrupt moderation values in order to reduce CPU
      overhead for all traffic types.
      Each iteration of the algorithm, DIM calculates the difference in
      throughput, packet rate and interrupt rate from last iteration in order
      to make a decision. DIM relies on counters for each metric. When these
      counters get to their type's max value they wraparound. In this case
      the delta between 'end' and 'start' samples is negative and when
      translated to unsigned integers - very high. This results in a false
      indication to the algorithm and might result in a wrong decision.
      
      The fix calculates the 'distance' between 'end' and 'start' samples in a
      cyclic way around the relevant type's max value. It can also be viewed as
      an absolute value around the type's max value instead of around 0.
      
      Testing show higher stability in DIM profile selection and no wraparound
      issues.
      
      Fixes: cb3c7fd4
      
       ("net/mlx5e: Support adaptive RX coalescing")
      Signed-off-by: default avatarTal Gilboa <talgi@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      53acd76c
    • Tal Gilboa's avatar
      net/mlx5e: Added BW check for DIM decision mechanism · c3164d2f
      Tal Gilboa authored
      DIM (Dynamically-tuned Interrupt Moderation) is a mechanism designed for
      changing the channel interrupt moderation values in order to reduce CPU
      overhead for all traffic types.
      Until now only interrupt and packet rate were sampled.
      We found a scenario on which we get a false indication since a change in
      DIM caused more aggregation and reduced packet rate while increasing BW.
      
      We now regard a change as succesfull iff:
      current_BW > (prev_BW + threshold) or
      current_BW ~= prev_BW and current_PR > (prev_PR + threshold) or
      current_BW ~= prev_BW and current_PR ~= prev_PR and
          current_IR < (prev_IR - threshold)
      Where BW = Bandwidth, PR = Packet rate and IR = Interrupt rate
      
      Improvements (ConnectX-4Lx 25GbE, single RX queue, LRO off)
          --------------------------------------------------
          packet size | before[Mb/s] | after[Mb/s] | gain  |
          2B          | 343.4        | 359.4       |  4.5% |
          16B         | 2739.7       | 2814.8      |  2.7% |
          64B         | 9739         | 10185.3     |  4.5% |
      
      Fixes: cb3c7fd4
      
       ("net/mlx5e: Support adaptive RX coalescing")
      Signed-off-by: default avatarTal Gilboa <talgi@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      c3164d2f
    • Huy Nguyen's avatar
      net/mlx5: Remove several module events out of ethtool stats · f729860a
      Huy Nguyen authored
      Remove the following module event counters out of ethtool stats. The
      reason for removing these event counters is that these events do not
      occur without techinician's intervention.
        module_pwr_budget_exd
        module_long_range
        module_no_eeprom
        module_enforce_part
        module_unknown_id
        module_unknown_status
        module_plug
      
      Fixes: bedb7c90
      
       ("net/mlx5e: Add port module event counters to ethtool stats")
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Reviewed by: Gal Pressman <galp@mellanox.com>
      
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      f729860a
    • Mohamad Haj Yahia's avatar
      net/mlx5: Continue health polling until it is explicitly stopped · 3fece5d6
      Mohamad Haj Yahia authored
      The issue is that when we get an assert we will stop polling the health
      and thus we cant enter error state when we have a real health issue.
      
      Fixes: fd76ee4d
      
       ('net/mlx5_core: Fix internal error detection conditions')
      Signed-off-by: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
      Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      3fece5d6
    • Mohamad Haj Yahia's avatar
      net/mlx5: Fix create vport flow table flow · 57f35c93
      Mohamad Haj Yahia authored
      Send vport number to the create flow table inner method instead of
      ignoring the vport argument and sending always 0.
      
      Fixes: b3ba5149
      
       ('net/mlx5: Refactor create flow table method to accept underlay QP')
      Signed-off-by: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      57f35c93
    • David S. Miller's avatar
      Merge branch 'mvpp2-fixes' · b87fa0fa
      David S. Miller authored
      
      
      Thomas Petazzoni says:
      
      ====================
      net: mvpp2: driver fixes
      
      As requested, here is a series of patches containing only bug fixes
      for the mvpp2 driver. It is based on the latest "net" branch.
      
      Changes since v1:
      
       - Fixed a build breakage that occurred when only PATCH 1 was only,
         and not later patches in the series. Was reported by the kbuild
         report on the first submission.
      
       - Added Tested-by from Marc Zyngier on PATCH 2.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b87fa0fa
    • Thomas Petazzoni's avatar
      net: mvpp2: use {get, put}_cpu() instead of smp_processor_id() · a704bb5c
      Thomas Petazzoni authored
      
      
      smp_processor_id() should not be used in migration-enabled contexts. We
      originally thought it was OK in the specific situation of this driver,
      but it was wrong, and calling smp_processor_id() in a migration-enabled
      context prints a big fat warning when CONFIG_DEBUG_PREEMPT=y.
      
      Therefore, this commit replaces the smp_processor_id() in
      migration-enabled contexts by the appropriate get_cpu/put_cpu sections.
      
      Reported-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Fixes: a786841d
      
       ("net: mvpp2: handle register mapping and access for PPv2.2")
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Tested-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a704bb5c
    • Thomas Petazzoni's avatar
      net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get} · 56b8aae9
      Thomas Petazzoni authored
      This commit removes the useless remove
      mvpp2_bm_cookie_{build,pool_get} functions. All what
      mvpp2_bm_cookie_build() was doing is compute a 32-bit value by
      concatenating the pool number and the CPU number... only to get the pool
      number re-extracted by mvpp2_bm_cookie_pool_get() later on.
      
      Instead, just get the pool number directly from RX descriptor status,
      and pass it to mvpp2_pool_refill() and mvpp2_rx_refill().
      
      This has the added benefit of dropping a smp_processor_id() call in a
      migration-enabled context, which is wrong, and is the original
      motivation for making this change.
      
      Fixes: 3f518509
      
       ("ethernet: Add new driver for Marvell Armada 375 network unit")
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56b8aae9
    • Jia-Ju Bai's avatar
      net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse · 343eba69
      Jia-Ju Bai authored
      
      
      The kernel may sleep under a rcu read lock in tipc_msg_reverse, and the
      function call path is:
      tipc_l2_rcv_msg (acquire the lock by rcu_read_lock)
        tipc_rcv
          tipc_sk_rcv
            tipc_msg_reverse
              pskb_expand_head(GFP_KERNEL) --> may sleep
      tipc_node_broadcast
        tipc_node_xmit_skb
          tipc_node_xmit
            tipc_sk_rcv
              tipc_msg_reverse
                pskb_expand_head(GFP_KERNEL) --> may sleep
      
      To fix it, "GFP_KERNEL" is replaced with "GFP_ATOMIC".
      
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      343eba69
    • Jia-Ju Bai's avatar
      net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx · f146e872
      Jia-Ju Bai authored
      
      
      The kernel may sleep under a rcu read lock in cfpkt_create_pfx, and the
      function call path is:
      cfcnfg_linkup_rsp (acquire the lock by rcu_read_lock)
        cfctrl_linkdown_req
          cfpkt_create
            cfpkt_create_pfx
              alloc_skb(GFP_KERNEL) --> may sleep
      cfserl_receive (acquire the lock by rcu_read_lock)
        cfpkt_split
          cfpkt_create_pfx
            alloc_skb(GFP_KERNEL) --> may sleep
      
      There is "in_interrupt" in cfpkt_create_pfx to decide use "GFP_KERNEL" or
      "GFP_ATOMIC". In this situation, "GFP_KERNEL" is used because the function
      is called under a rcu read lock, instead in interrupt.
      
      To fix it, only "GFP_ATOMIC" is used in cfpkt_create_pfx.
      
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f146e872