NTB: Add flow control to the ntb_netdev
authorDave Jiang <dave.jiang@intel.com>
Mon, 13 Jul 2015 12:07:17 +0000 (08:07 -0400)
committerJon Mason <jdmason@kudzu.us>
Mon, 7 Sep 2015 19:17:08 +0000 (15:17 -0400)
commite74bfeedad08180b968d8613dcde141ffb0720c3
tree989c37a03defc84cd2db4ed121bf633ebb074632
parent5e9fd733fa34b491e7ac41c91aa42ba0a9d8ea10
NTB: Add flow control to the ntb_netdev

Right now if we push the NTB really hard, we start dropping packets due
to not able to process the packets fast enough. We need to st:qop the
upper layer from flooding us when that happens.

A timer is necessary in order to restart the queue once the resource has
been processed on the receive side. Due to the way NTB is setup, the
resources on the tx side are tied to the processing of the rx side and
there's no async way to know when the rx side has released those
resources.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/net/ntb_netdev.c
drivers/ntb/ntb_transport.c
include/linux/ntb_transport.h