summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-08-21 14:41:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-04 14:51:55 +0100
commit2d484ce0a878567e8fef8c8484b21531abf77f46 (patch)
treef2247b747d6bd52a1acaa4a66d003d2598bf2c13 /ipc
parentf8e70fa84f769416d54199bb2b80d745705b4a59 (diff)
downloadlinux-stable-2d484ce0a878567e8fef8c8484b21531abf77f46.tar.gz
linux-stable-2d484ce0a878567e8fef8c8484b21531abf77f46.tar.bz2
linux-stable-2d484ce0a878567e8fef8c8484b21531abf77f46.zip
net/mlx5: WQ, fixes for fragmented WQ buffers API
[ Upstream commit 37fdffb217a45609edccbb8b407d031143f551c0 ] mlx5e netdevice used to calculate fragment edges by a call to mlx5_wq_cyc_get_frag_size(). This calculation did not give the correct indication for queues smaller than a PAGE_SIZE, (broken by default on PowerPC, where PAGE_SIZE == 64KB). Here it is replaced by the correct new calls/API. Since (TX/RX) Work Queues buffers are fragmented, here we introduce changes to the API in core driver, so that it gets a stride index and returns the index of last stride on same fragment, and an additional wrapping function that returns the number of physically contiguous strides that can be written contiguously to the work queue. This obsoletes the following API functions, and their buggy usage in EN driver: * mlx5_wq_cyc_get_frag_size() * mlx5_wq_cyc_ctr2fragix() The new API improves modularity and hides the details of such calculation for mlx5e netdevice and mlx5_ib rdma drivers. New calculation is also more efficient, and improves performance as follows: Packet rate test: pktgen, UDP / IPv4, 64byte, single ring, 8K ring size. Before: 16,477,619 pps After: 17,085,793 pps 3.7% improvement Fixes: 3a2f70331226 ("net/mlx5: Use order-0 allocations for all WQ types") Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions