hsa: proxy wnd update only if enough space is available
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2874d3afbf4cc89209b605c35ca4a5bc5b6868b3
This commit is contained in:

committed by
Dave Barach

parent
8dc954a4e7
commit
b71ef86c74
@@ -271,8 +271,16 @@ proxy_tx_callback (session_t * proxy_s)
|
||||
session_handle_t handle;
|
||||
proxy_session_t *ps;
|
||||
session_t *ao_s;
|
||||
u32 min_free;
|
||||
uword *p;
|
||||
|
||||
min_free = clib_min (proxy_s->tx_fifo->nitems >> 3, 128 << 10);
|
||||
if (svm_fifo_max_enqueue (proxy_s->tx_fifo) < min_free)
|
||||
{
|
||||
svm_fifo_add_want_deq_ntf (proxy_s->tx_fifo, SVM_FIFO_WANT_DEQ_NOTIF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
clib_spinlock_lock_if_init (&pm->sessions_lock);
|
||||
|
||||
handle = session_handle (proxy_s);
|
||||
@@ -414,8 +422,16 @@ active_open_tx_callback (session_t * ao_s)
|
||||
session_handle_t handle;
|
||||
proxy_session_t *ps;
|
||||
session_t *proxy_s;
|
||||
u32 min_free;
|
||||
uword *p;
|
||||
|
||||
min_free = clib_min (ao_s->tx_fifo->nitems >> 3, 128 << 10);
|
||||
if (svm_fifo_max_enqueue (ao_s->tx_fifo) < min_free)
|
||||
{
|
||||
svm_fifo_add_want_deq_ntf (ao_s->tx_fifo, SVM_FIFO_WANT_DEQ_NOTIF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
clib_spinlock_lock_if_init (&pm->sessions_lock);
|
||||
|
||||
handle = session_handle (ao_s);
|
||||
|
Reference in New Issue
Block a user