From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Tariq Toukan <tariqt@mellanox.com>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [pull request][net-next 00/15] Mellanox, mlx5 updates 2018-03-30
Date: Fri, 30 Mar 2018 17:02:37 -0700 [thread overview]
Message-ID: <20180331000252.30480-1-saeedm@mellanox.com> (raw)
Hi Dave,
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.
For more information please see tag log below.
Please pull and let me know if there's any problem.
Thanks,
Saeed.
---
The following changes since commit c0b6edef0bf0e33c12eaf80c676ff09def011518:
tc-testing: Add newline when writing test case files (2018-03-30 14:22:51 -0400)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2018-03-30
for you to fetch changes up to ab966d7e4ff988a48b3ad72e7abf903aa840afd1:
net/mlx5e: RX, Recycle buffer of UMR WQEs (2018-03-30 16:55:07 -0700)
----------------------------------------------------------------
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.
----------------------------------------------------------------
Alaa Hleihel (1):
net/mlx5: Change teardown with force mode failure message to warning
Saeed Mahameed (2):
net/mlx5e: Use eq ptr from cq
net/mlx5: Eliminate query xsrq dead code
Talat Batheesh (1):
net/mlx5e: IPoIB, Fix spelling mistake
Tariq Toukan (11):
net/mlx5e: Save MTU in channels params
net/mlx5e: Derive Striding RQ size from MTU
net/mlx5e: Code movements in RX UMR WQE post
net/mlx5e: Do not busy-wait for UMR completion in Striding RQ
net/mlx5e: Use inline MTTs in UMR WQEs
net/mlx5e: Use linear SKB in Striding RQ
net/mlx5e: Refactor RQ XDP_TX indication
net/mlx5e: Support XDP over Striding RQ
net/mlx5e: Remove page_ref bulking in Striding RQ
net/mlx5e: Keep single pre-initialized UMR WQE per RQ
net/mlx5e: RX, Recycle buffer of UMR WQEs
drivers/net/ethernet/mellanox/mlx5/core/en.h | 115 ++++----
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 79 +-----
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 310 +++++++++++----------
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 284 ++++++++++---------
drivers/net/ethernet/mellanox/mlx5/core/fw.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 27 +-
.../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 21 --
include/linux/mlx5/device.h | 3 +
include/linux/mlx5/mlx5_ifc.h | 7 +-
include/linux/mlx5/transobj.h | 1 -
12 files changed, 409 insertions(+), 447 deletions(-)
next reply other threads:[~2018-03-31 0:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 0:02 Saeed Mahameed [this message]
2018-03-31 0:02 ` [net-next 01/15] net/mlx5e: Use eq ptr from cq Saeed Mahameed
2018-03-31 0:02 ` [net-next 02/15] net/mlx5: Eliminate query xsrq dead code Saeed Mahameed
2018-03-31 0:02 ` [net-next 03/15] net/mlx5: Change teardown with force mode failure message to warning Saeed Mahameed
2018-03-31 0:02 ` [net-next 04/15] net/mlx5e: IPoIB, Fix spelling mistake Saeed Mahameed
2018-03-31 0:02 ` [net-next 05/15] net/mlx5e: Save MTU in channels params Saeed Mahameed
2018-03-31 0:02 ` [net-next 06/15] net/mlx5e: Derive Striding RQ size from MTU Saeed Mahameed
2018-03-31 0:02 ` [net-next 07/15] net/mlx5e: Code movements in RX UMR WQE post Saeed Mahameed
2018-03-31 0:02 ` [net-next 08/15] net/mlx5e: Do not busy-wait for UMR completion in Striding RQ Saeed Mahameed
2018-03-31 0:02 ` [net-next 09/15] net/mlx5e: Use inline MTTs in UMR WQEs Saeed Mahameed
2018-03-31 0:02 ` [net-next 10/15] net/mlx5e: Use linear SKB in Striding RQ Saeed Mahameed
2018-03-31 0:02 ` [net-next 11/15] net/mlx5e: Refactor RQ XDP_TX indication Saeed Mahameed
2018-03-31 0:02 ` [net-next 12/15] net/mlx5e: Support XDP over Striding RQ Saeed Mahameed
2018-03-31 0:02 ` [net-next 13/15] net/mlx5e: Remove page_ref bulking in " Saeed Mahameed
2018-03-31 0:02 ` [net-next 14/15] net/mlx5e: Keep single pre-initialized UMR WQE per RQ Saeed Mahameed
2018-03-31 0:02 ` [net-next 15/15] net/mlx5e: RX, Recycle buffer of UMR WQEs Saeed Mahameed
2018-04-01 2:32 ` [pull request][net-next 00/15] Mellanox, mlx5 updates 2018-03-30 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180331000252.30480-1-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox