1. 11 Jun, 2017 6 commits
    • 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
  2. 10 Jun, 2017 13 commits
  3. 09 Jun, 2017 14 commits
  4. 08 Jun, 2017 7 commits
    • David Ahern's avatar
      net: vrf: Make add_fib_rules per network namespace flag · 097d3c95
      David Ahern authored
      Commit 1aa6c4f6 ("net: vrf: Add l3mdev rules on first device create")
      adds the l3mdev FIB rule the first time a VRF device is created. However,
      it only creates the rule once and only in the namespace the first device
      is created - which may not be init_net. Fix by using the net_generic
      capability to make the add_fib_rules flag per network namespace.
      
      Fixes: 1aa6c4f6 ("net: vrf: Add l3mdev rules on first device create")
      Reported-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      097d3c95
    • Daniel Borkmann's avatar
      bpf, tests: fix endianness selection · 78a5a93c
      Daniel Borkmann authored
      I noticed that test_l4lb was failing in selftests:
      
        # ./test_progs
        test_pkt_access:PASS:ipv4 77 nsec
        test_pkt_access:PASS:ipv6 44 nsec
        test_xdp:PASS:ipv4 2933 nsec
        test_xdp:PASS:ipv6 1500 nsec
        test_l4lb:PASS:ipv4 377 nsec
        test_l4lb:PASS:ipv6 544 nsec
        test_l4lb:FAIL:stats 6297600000 200000
        test_tcp_estats:PASS: 0 nsec
        Summary: 7 PASSED, 1 FAILED
      
      Tracking down the issue actually revealed that endianness selection
      in bpf_endian.h is broken when compiled with clang with bpf target.
      test_pkt_access.c, test_l4lb.c is compiled with __BYTE_ORDER as
      __BIG_ENDIAN, test_xdp.c as __LITTLE_ENDIAN! test_l4lb noticeably
      fails, because the test accounts bytes via bpf_ntohs(ip6h->payload_len)
      and bpf_ntohs(iph->tot_len), and compares them against a defined
      value and given a wrong endianness, the test outcome is different,
      of course.
      
      Turns out that there are actually two bugs: i) when we do __BYTE_ORDER
      comparison with __LITTLE_ENDIAN/__BIG_ENDIAN, then depending on the
      include order we see different outcomes. Reason is that __BYTE_ORDER
      is undefined due to missing endian.h include. Before we include the
      asm/byteorder.h (e.g. through linux/in.h), then __BYTE_ORDER equals
      __LITTLE_ENDIAN since both are undefined, after the include which
      correctly pulls in linux/byteorder/little_endian.h, __LITTLE_ENDIAN
      is defined, but given __BYTE_ORDER is still undefined, we match on
      __BYTE_ORDER equals to __BIG_ENDIAN since __BIG_ENDIAN is also
      undefined at that point, sigh. ii) But even that would be wrong,
      since when compiling the test cases with clang, one can select between
      bpfeb and bpfel targets for cross compilation. Hence, we can also not
      rely on what the system's endian.h provides, but we need to look at
      the compiler's defined endianness. The compiler defines __BYTE_ORDER__,
      and we can match __ORDER_LITTLE_ENDIAN__ and __ORDER_BIG_ENDIAN__,
      which also reflects targets bpf (native), bpfel, bpfeb correctly,
      thus really only rely on that. After patch:
      
        # ./test_progs
        test_pkt_access:PASS:ipv4 74 nsec
        test_pkt_access:PASS:ipv6 42 nsec
        test_xdp:PASS:ipv4 2340 nsec
        test_xdp:PASS:ipv6 1461 nsec
        test_l4lb:PASS:ipv4 400 nsec
        test_l4lb:PASS:ipv6 530 nsec
        test_tcp_estats:PASS: 0 nsec
        Summary: 7 PASSED, 0 FAILED
      
      Fixes: 43bcf707 ("bpf: fix _htons occurences in test_progs")
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78a5a93c
    • Nicolas Dichtel's avatar
      ethtool.h: remind to update 802.3ad when adding new speeds · 297fb414
      Nicolas Dichtel authored
      Each time a new speed is added, the bonding 802.3ad isn't updated. Add a
      comment to remind the developer to update this driver.
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      297fb414
    • Nicolas Dichtel's avatar
      bonding: fix 802.3ad support for 14G speed · 3fcd64cf
      Nicolas Dichtel authored
      This patch adds 14 Gbps enum definition, and fixes
      aggregated bandwidth calculation based on above slave links.
      
      Fixes: 0d7e2d21 ("IB/ipoib: add get_link_ksettings in ethtool")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fcd64cf
    • Thibaut Collet's avatar
      bonding: fix 802.3ad support for 5G and 50G speeds · c7c55067
      Thibaut Collet authored
      This patch adds [5|50] Gbps enum definition, and fixes
      aggregated bandwidth calculation based on above slave links.
      
      Fixes: c9a70d43 ("net-next: ethtool: Added port speed macros.")
      Signed-off-by: default avatarThibaut Collet <thibaut.collet@6wind.com>
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7c55067
    • Nicolas Dichtel's avatar
      openvswitch: warn about missing first netlink attribute · daa6630a
      Nicolas Dichtel authored
      The first netlink attribute (value 0) must always be defined
      as none/unspec.
      
      Because we cannot change an existing UAPI, I add a comment to point the
      mistake and avoid to propagate it in a new ovs API in the future.
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      daa6630a
    • Arnd Bergmann's avatar
      ila_xlat: add missing hash secret initialization · 0db47e3d
      Arnd Bergmann authored
      While discussing the possible merits of clang warning about unused initialized
      functions, I found one function that was clearly meant to be called but
      never actually is.
      
      __ila_hash_secret_init() initializes the hash value for the ila locator,
      apparently this is intended to prevent hash collision attacks, but this ends
      up being a read-only zero constant since there is no caller. I could find
      no indication of why it was never called, the earliest patch submission
      for the module already was like this. If my interpretation is right, we
      certainly want to backport the patch to stable kernels as well.
      
      I considered adding it to the ila_xlat_init callback, but for best effect
      the random data is read as late as possible, just before it is first used.
      The underlying net_get_random_once() is already highly optimized to avoid
      overhead when called frequently.
      
      Fixes: 7f00feaf ("ila: Add generic ILA translation facility")
      Cc: stable@vger.kernel.org
      Link: https://www.spinics.net/lists/kernel/msg2527243.htmlSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0db47e3d