diff options
Diffstat (limited to 'kernel/xpp/xframe_queue.c')
-rw-r--r-- | kernel/xpp/xframe_queue.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/kernel/xpp/xframe_queue.c b/kernel/xpp/xframe_queue.c index a62e850..7d9c098 100644 --- a/kernel/xpp/xframe_queue.c +++ b/kernel/xpp/xframe_queue.c @@ -2,7 +2,7 @@ #include "xbus-core.h" #include "zap_debug.h" -extern int print_dbg; +extern int debug; static xframe_t *transport_alloc_xframe(xbus_t *xbus, gfp_t gfp_flags); static void transport_free_xframe(xbus_t *xbus, xframe_t *xframe); @@ -53,7 +53,7 @@ bool xframe_enqueue(struct xframe_queue *q, xframe_t *xframe) return ret; } -xframe_t *__xframe_dequeue(struct xframe_queue *q) +static xframe_t *__xframe_dequeue(struct xframe_queue *q) { xframe_t *frm = NULL; struct list_head *h; @@ -174,11 +174,17 @@ static bool xframe_queue_adjust(struct xframe_queue *q) //XBUS_INFO(xbus, "%s(%d): Allocate one\n", q->name, delta); xframe = transport_alloc_xframe(xbus, GFP_ATOMIC); if(!xframe) { - XBUS_ERR(xbus, "%s: failed frame allocation\n", q->name); + static int rate_limit; + + if((rate_limit++ % 3001) == 0) + XBUS_ERR(xbus, "%s: failed frame allocation\n", q->name); goto out; } if(!__xframe_enqueue(q, xframe)) { - XBUS_ERR(xbus, "%s: failed enqueueing frame\n", q->name); + static int rate_limit; + + if((rate_limit++ % 3001) == 0) + XBUS_ERR(xbus, "%s: failed enqueueing frame\n", q->name); transport_free_xframe(xbus, xframe); goto out; } @@ -187,7 +193,10 @@ static bool xframe_queue_adjust(struct xframe_queue *q) //XBUS_INFO(xbus, "%s(%d): Free one\n", q->name, delta); xframe = __xframe_dequeue(q); if(!xframe) { - XBUS_ERR(xbus, "%s: failed dequeueing frame\n", q->name); + static int rate_limit; + + if((rate_limit++ % 3001) == 0) + XBUS_ERR(xbus, "%s: failed dequeueing frame\n", q->name); goto out; } transport_free_xframe(xbus, xframe); |