Go to file
David S. Miller 8bde261e53 mlx5-updates-2018-03-30
This series contains updates to mlx5 core and mlx5e netdev drivers.
 The main highlight of this series is the RX optimizations for striding RQ path,
 introduced by Tariq.
 
 First Four patches are trivial misc cleanups.
  - Spelling mistake fix
  - Dead code removal
  - Warning messages
 
 RX optimizations for striding RQ:
 
 1) RX refactoring, cleanups and micro optimizations
    - MTU calculation simplifications, obsoletes some WQEs-to-packets translation
      functions and helps delete ~60 LOC.
    - Do not busy-wait a pending UMR completion.
    - post the new values of UMR WQE inline, instead of using a data pointer.
    - use pre-initialized structures to save calculations in datapath.
 
 2) Use linear SKB in Striding RQ "build_skb", (Using linear SKB has many advantages):
     - Saves a memcpy of the headers.
     - No page-boundary checks in datapath.
     - No filler CQEs.
     - Significantly smaller CQ.
     - SKB data continuously resides in linear part, and not split to
       small amount (linear part) and large amount (fragment).
       This saves datapath cycles in driver and improves utilization
       of SKB fragments in GRO.
     - The fragments of a resulting GRO SKB follow the IP forwarding
       assumption of equal-size fragments.
 
     implementation details:
     HW writes the packets to the beginning of a stride,
     i.e. does not keep headroom. To overcome this we make sure we can
     extend backwards and use the last bytes of stride i-1.
     Extra care is needed for stride 0 as it has no preceding stride.
     We make sure headroom bytes are available by shifting the buffer
     pointer passed to HW by headroom bytes.
 
     This configuration now becomes default, whenever capable.
     Of course, this implies turning LRO off.
 
     Performance testing:
     ConnectX-5, single core, single RX ring, default MTU.
 
     UDP packet rate, early drop in TC layer:
 
     --------------------------------------------
     | pkt size | before    | after     | ratio |
     --------------------------------------------
     | 1500byte | 4.65 Mpps | 5.96 Mpps | 1.28x |
     |  500byte | 5.23 Mpps | 5.97 Mpps | 1.14x |
     |   64byte | 5.94 Mpps | 5.96 Mpps | 1.00x |
     --------------------------------------------
 
     TCP streams: ~20% gain
 
 3) Support XDP over Striding RQ:
     Now that linear SKB is supported over Striding RQ,
     we can support XDP by setting stride size to PAGE_SIZE
     and headroom to XDP_PACKET_HEADROOM.
 
     Striding RQ is capable of a higher packet-rate than
     conventional RQ.
 
     Performance testing:
     ConnectX-5, 24 rings, default MTU.
     CQE compression ON (to reduce completions BW in PCI).
 
     XDP_DROP packet rate:
     --------------------------------------------------
     | pkt size | XDP rate   | 100GbE linerate | pct% |
     --------------------------------------------------
     |   64byte | 126.2 Mpps |      148.0 Mpps |  85% |
     |  128byte |  80.0 Mpps |       84.8 Mpps |  94% |
     |  256byte |  42.7 Mpps |       42.7 Mpps | 100% |
     |  512byte |  23.4 Mpps |       23.4 Mpps | 100% |
     --------------------------------------------------
 
 4) Remove mlx5 page_ref bulking in Striding RQ and use page_ref_inc only when needed.
    Without this bulking, we have:
     - no atomic ops on WQE allocation or free
     - one atomic op per SKB
     - In the default MTU configuration (1500, stride size is 2K),
       the non-bulking method execute 2 atomic ops as before
     - For larger MTUs with stride size of 4K, non-bulking method
       executes only a single op.
     - For XDP (stride size of 4K, no SKBs), non-bulking have no atomic ops per packet at all.
 
     Performance testing:
     ConnectX-5, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz.
 
     Single core packet rate (64 bytes).
 
     Early drop in TC: no degradation.
 
     XDP_DROP:
     before: 14,270,188 pps
     after:  20,503,603 pps, 43% improvement.
 
 Thanks,
 saeed.
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJavs5fAAoJEEg/ir3gV/o+iXQIAJQ4jcYb5V3AEPqUeiTNOH2h
 e2yyXj2zXNTCl2cekmJriWfQjsA5YizaTNipHb1xR8pznAiIMGmiK5nr8idRY1Qh
 M/awuoxJszj8a+z3SxrL/ilgf4HF/89YEt+5MnU/2ihBC3EGG0UbJ6TAC0cXMzmG
 Xghi5omlCfsqQQkWooxPVSdRXERLsgzo5kjZ2Zpln/GJa0vVPmIV7ojoQQQzFCMf
 eEQzqqEeOk4rk8Z2/5fdsWYjwa2XLnvtUtRBKX/hxCd2zYrFpGUxkzsT/Mikeu+Z
 AZAJA4yfHs3dKS3T4CaKDBqhUVxdAsuecT9JlqzgLVEbmw7YypacrPT0TBBsJcI=
 =qnbR
 -----END PGP SIGNATURE-----

Merge tag 'mlx5-updates-2018-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5-updates-2018-03-30

This series contains updates to mlx5 core and mlx5e netdev drivers.
The main highlight of this series is the RX optimizations for striding RQ path,
introduced by Tariq.

First Four patches are trivial misc cleanups.
 - Spelling mistake fix
 - Dead code removal
 - Warning messages

RX optimizations for striding RQ:

1) RX refactoring, cleanups and micro optimizations
   - MTU calculation simplifications, obsoletes some WQEs-to-packets translation
     functions and helps delete ~60 LOC.
   - Do not busy-wait a pending UMR completion.
   - post the new values of UMR WQE inline, instead of using a data pointer.
   - use pre-initialized structures to save calculations in datapath.

2) Use linear SKB in Striding RQ "build_skb", (Using linear SKB has many advantages):
    - Saves a memcpy of the headers.
    - No page-boundary checks in datapath.
    - No filler CQEs.
    - Significantly smaller CQ.
    - SKB data continuously resides in linear part, and not split to
      small amount (linear part) and large amount (fragment).
      This saves datapath cycles in driver and improves utilization
      of SKB fragments in GRO.
    - The fragments of a resulting GRO SKB follow the IP forwarding
      assumption of equal-size fragments.

    implementation details:
    HW writes the packets to the beginning of a stride,
    i.e. does not keep headroom. To overcome this we make sure we can
    extend backwards and use the last bytes of stride i-1.
    Extra care is needed for stride 0 as it has no preceding stride.
    We make sure headroom bytes are available by shifting the buffer
    pointer passed to HW by headroom bytes.

    This configuration now becomes default, whenever capable.
    Of course, this implies turning LRO off.

    Performance testing:
    ConnectX-5, single core, single RX ring, default MTU.

    UDP packet rate, early drop in TC layer:

    --------------------------------------------
    | pkt size | before    | after     | ratio |
    --------------------------------------------
    | 1500byte | 4.65 Mpps | 5.96 Mpps | 1.28x |
    |  500byte | 5.23 Mpps | 5.97 Mpps | 1.14x |
    |   64byte | 5.94 Mpps | 5.96 Mpps | 1.00x |
    --------------------------------------------

    TCP streams: ~20% gain

3) Support XDP over Striding RQ:
    Now that linear SKB is supported over Striding RQ,
    we can support XDP by setting stride size to PAGE_SIZE
    and headroom to XDP_PACKET_HEADROOM.

    Striding RQ is capable of a higher packet-rate than
    conventional RQ.

    Performance testing:
    ConnectX-5, 24 rings, default MTU.
    CQE compression ON (to reduce completions BW in PCI).

    XDP_DROP packet rate:
    --------------------------------------------------
    | pkt size | XDP rate   | 100GbE linerate | pct% |
    --------------------------------------------------
    |   64byte | 126.2 Mpps |      148.0 Mpps |  85% |
    |  128byte |  80.0 Mpps |       84.8 Mpps |  94% |
    |  256byte |  42.7 Mpps |       42.7 Mpps | 100% |
    |  512byte |  23.4 Mpps |       23.4 Mpps | 100% |
    --------------------------------------------------

4) Remove mlx5 page_ref bulking in Striding RQ and use page_ref_inc only when needed.
   Without this bulking, we have:
    - no atomic ops on WQE allocation or free
    - one atomic op per SKB
    - In the default MTU configuration (1500, stride size is 2K),
      the non-bulking method execute 2 atomic ops as before
    - For larger MTUs with stride size of 4K, non-bulking method
      executes only a single op.
    - For XDP (stride size of 4K, no SKBs), non-bulking have no atomic ops per packet at all.

    Performance testing:
    ConnectX-5, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz.

    Single core packet rate (64 bytes).

    Early drop in TC: no degradation.

    XDP_DROP:
    before: 14,270,188 pps
    after:  20,503,603 pps, 43% improvement.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-31 22:31:43 -04:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
block for-linus-20180302 2018-03-02 09:35:36 -08:00
certs certs/blacklist_nohashes.c: fix const confusion in certs blacklist 2018-02-21 15:35:43 -08:00
crypto X.509: fix NULL dereference when restricting key with unsupported_sig 2018-02-22 14:38:34 +00:00
Documentation dt-bindings: net: meson-dwmac: add support for the Meson8m2 SoC 2018-03-31 22:17:23 -04:00
drivers mlx5-updates-2018-03-30 2018-03-31 22:31:43 -04:00
firmware kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
fs rxrpc, afs: Use debug_ids rather than pointers in traces 2018-03-27 23:03:00 +01:00
include mlx5-updates-2018-03-30 2018-03-31 22:31:43 -04:00
init jump_label: Explicitly disable jump labels in __init code 2018-02-21 16:54:05 +01:00
ipc vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
kernel net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
lib test_bpf: Fix NULL vs IS_ERR() check in test_skb_segment() 2018-03-29 14:33:29 -04:00
LICENSES LICENSES: Add MPL-1.1 license 2018-01-06 10:59:44 -07:00
mm mm, thp: do not cause memcg oom for thp 2018-03-22 17:07:02 -07:00
net RxRPC development 2018-03-31 22:29:12 -04:00
samples bpf: sockmap test script 2018-03-19 21:14:41 +01:00
scripts kbuild: Handle builtin dtb file names containing hyphens 2018-03-09 01:14:38 +09:00
security security: Remove rtnl_lock() in selinux_xfrm_notify_policyload() 2018-03-29 13:47:53 -04:00
sound ASoC: Fixes for v4.16 2018-03-12 17:30:38 +01:00
tools tc-testing: Add newline when writing test case files 2018-03-30 14:22:51 -04:00
usr initramfs: fix initramfs rebuilds w/ compression after disabling 2017-11-03 07:39:19 -07:00
virt kvm/arm fixes for 4.16, take 2 2018-03-15 21:45:37 +01:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Add hch to .get_maintainer.ignore 2015-08-21 14:30:10 -07:00
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore .gitignore: ignore ASN.1 auto generated files 2018-02-14 21:05:38 +01:00
.mailmap mailmap: update Mark Yao's email address 2018-01-04 16:45:09 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Update my email address from freescale to nxp 2018-03-30 12:57:13 -04:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-22 14:10:29 -07:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.