mpipe: optimize buffer return mechanism
authorLiming Sun <lsun@ezchip.com>
Fri, 8 Jan 2016 14:30:37 +0000 (09:30 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 15:44:41 +0000 (16:44 +0100)
commitca7e25e63284ce88f98dfda13715090434a51f2a
treedf85faff5ea3ad1771ebaff728f0c2a520d1e87c
parent23f58cd012cb454da0ceb28ddda8b6bb56c91793
mpipe: optimize buffer return mechanism

This submit has changes to optimize the mpipe buffer return. When
a packet is received, instead of allocating and refilling the
buffer stack right away, it tracks the number of pending buffers,
and use HW buffer return as an optimization when the pending
number is below certain threshold, thus save two MMIO writes and
improves performance especially for bidirectional traffic case.

Signed-off-by: Liming Sun <lsun@ezchip.com>
Acked-by: Zhigang Lu <zlu@ezchip.com>
drivers/net/mpipe/mpipe_tilegx.c