linux/drivers/net
Achiad Shochat 88a85f99e5 net/mlx5e: TX latency optimization to save DMA reads
A regular TX WQE execution involves two or more DMA reads -
one to fetch the WQE, and another one per WQE gather entry.

These DMA reads obviously increase the TX latency.
There are two mlx5 mechanisms to bypass these DMA reads:
1) Inline WQE
2) Blue Flame (BF)

An inline WQE contains a whole packet, thus saves the DMA read/s
of the regular WQE gather entry/s. Inline WQE support was already
added in the previous commit.

A BF WQE is written directly to the device I/O mapped memory, thus
enables saving the DMA read that fetches the WQE.

The BF WQE I/O write must be in cache line granularity, thus uses
the CPU write combining mechanism.
A BF WQE I/O write acts also as a TX doorbell for notifying the
device of new TX WQEs.
A BF WQE is written to the same I/O mapped address as the regular TX
doorbell, thus this address is being mapped twice - once by ioremap()
and once by io_mapping_map_wc().

While both mechanisms reduce the TX latency, they both consume more CPU
cycles than a regular WQE:
- A BF WQE must still be written to host memory, in addition to being
  written directly to the device I/O mapped memory.
- An inline WQE involves copying the SKB data into it.

To handle this tradeoff, we introduce here a heuristic algorithm that
strives to avoid using these two mechanisms in case the TX queue is
being back-pressured by the device, and limit their usage rate otherwise.

An inline WQE will always be "Blue Flamed" (written directly to the
device I/O mapped memory) while a BF WQE may not be inlined (may contain
gather entries).

Preliminary testing using netperf UDP_RR shows that the latency goes down
from 17.5us to 16.9us, while the message rate (tested with pktgen) stays
the same.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
History 2015-07-27 00:29:17 -07:00
..
appletalk net/appletalk: LTPC needs virt_to_bus 2015-02-20 16:28:46 -05:00
arcnet drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-23 00:41:16 -07:00
caif caif: remove unused struct member 2015-04-01 12:43:09 -04:00
can can: mcp251x: get regulators optionally 2015-07-16 09:04:22 +02:00
cris eth_v10: remove unnecessary break after return 2014-07-20 21:29:49 -07:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-23 00:41:16 -07:00
ethernet net/mlx5e: TX latency optimization to save DMA reads 2015-07-27 00:29:17 -07:00
fddi fddi: print an address with %p format specifier rather than %x 2015-06-07 00:31:22 -07:00
hamradio NET: hamradio: Fix IP over bpq encapsulation. 2015-07-08 14:09:03 -07:00
hippi PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
hyperv hv_netvsc: Wait for sub-channels to be processed during probe 2015-07-26 16:40:36 -07:00
ieee802154 at86rf230: cleanup start and stop callbacks 2015-06-16 18:55:11 +02:00
ipvlan ipvlan: ignore addresses from ipv6 autoconfiguration 2015-07-15 21:33:40 -07:00
irda irda: irda-usb: use msecs_to_jiffies for conversions 2015-05-25 17:39:21 -04:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-23 00:41:16 -07:00
plip net: plip: slight optimization of addr compare 2013-12-31 16:48:33 -05:00
ppp netfilter: Remove spurios included of netfilter.h 2015-06-18 21:14:32 +02:00
slip net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00
team switchdev: add support for fdb add/del/dump via switchdev_port_obj ops. 2015-05-17 22:49:09 -04:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-23 00:41:16 -07:00
vmxnet3 vmxnet3: prevent receive getting out of sequence on napi poll 2015-07-08 23:36:11 -07:00
wan Doc: z8530book: Fix typo in API-z8530-sync-txdma-open.html 2015-07-10 23:45:31 -07:00
wimax kbuild: remove unnecessary "obj- := dummy.o" trick 2014-10-02 13:55:02 +02:00
wireless * bug fixes specific for 8000 series 2015-07-17 11:19:08 +03:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-23 00:41:16 -07:00
dummy.c dummy: use MODULE_VERSION 2014-12-09 21:51:06 -05:00
eql.c net: better IFF_XMIT_DST_RELEASE support 2014-10-07 13:22:11 -04:00
geneve.c geneve: allow user to specify TOS info for tunnel frames 2015-06-01 17:05:04 -07:00
ifb.c ifb: add multiqueue operation 2015-07-08 16:00:09 -07:00
Kconfig A very significant modification to NTB in this series. 2015-07-04 14:07:47 -07:00
LICENSE.SRC Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
loopback.c net: better IFF_XMIT_DST_RELEASE support 2014-10-07 13:22:11 -04:00
macvlan.c macvlan: Propagate promiscuity setting to lower devices. 2015-05-04 00:14:13 -04:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-13 11:18:25 -07:00
Makefile geneve: add initial netdev driver for GENEVE tunnels 2015-05-13 15:59:13 -04:00
mdio.c mdio: unused ethtool functions 2013-12-26 13:29:35 -05:00
mii.c mii: Handle link state changes for forced modes in mii_check_media() 2015-01-19 15:43:42 -05:00
netconsole.c netconsole: implement extended console support 2015-06-25 17:00:39 -07:00
nlmon.c net: nlmon: flag nlmon devs with LLTX/SG 2014-03-28 16:49:47 -04:00
ntb_netdev.c NTB: Split ntb_hw_intel and ntb_transport drivers 2015-07-04 14:05:49 -04:00
rionet.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
sb1000.c PNP: net/sb1000: Use module_pnp_driver to register driver 2015-03-18 22:39:17 +01:00
Space.c drivers: net: Include new header file in sbni.c 2013-12-19 18:51:20 -05:00
sungem_phy.c sungem: Fix global namespace pollution of phy accessors. 2014-08-27 23:07:12 -07:00
tun.c virtio/vhost: cross endian support 2015-07-03 16:02:25 -07:00
veth.c veth: set iflink to the peer veth 2015-04-02 14:05:01 -04:00
virtio_net.c virtio_net: don't require ANY_LAYOUT with VERSION_1 2015-07-20 12:43:33 -07:00
vxlan.c vxlan: Use proper endian type for vni in vxlan[6]_xmit_skb 2015-07-26 16:33:26 -07:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-01 14:58:07 -07:00