http_static: Fix timeout on large files
http_static: Fix timeout on large files

When trying to read files that are larger than the fifo
a timeout was reached on client side leading to an abort of the request
and a retry (sending another GET command).

The svm fifo notification request was set to notify when the fifo is no
longer full, this lead to an inefficient loop of sending small amounts
of data each time with a large overhead of context switch and waiting
for the next notification, eventually leading to a timeout.

Modifying the trigger on the svm-fifo to be notified on a preset threshold
value enabled sending larger amounts of data between context switches and
sending large files more efficiently. This solved the timeout issue.

In addition, cap the max write from application to 4MB to avoid running
into a case of trying to allocate chunks that are too large.

Reproduce:
Server:
http static server www-root /var/www/data uri tcp://0.0.0.0/80 cache-size 5m fifo-size 300

Client:
wget http://11.0.0.2/file_of_size_32M

Type: fix
Change-Id: Idfceedffd935da9486cde820e9dca5dad69d9ca5
Signed-off-by: Yuval Caduri <310cc13cb5040ea2b9e15a1fd409d8edf63be5b2@marvell.com>
Signed-off-by: Michal Kalderon <91d456e42522e6a4b7f2235f03844e0d31a422d1@marvell.com>

chrisy/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,FDio/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp