summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-04-20 07:51:28 +0200
committerTom Gundersen <teg@jklm.no>2014-04-20 10:28:28 +0200
commit6190b9f9d2574428d560458a99f2838041cfdaac (patch)
tree39a8371fc0e78f272960ab37fe35da62721915a1
parent66aaf85e178492c27f699d9c94c84a98466a1435 (diff)
sd-rtnl: log when queues are exhausted
-rw-r--r--src/libsystemd/sd-rtnl/sd-rtnl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 8650f550f7..543bad9f4f 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -203,8 +203,10 @@ int sd_rtnl_send(sd_rtnl *nl,
}
} else {
/* append to queue */
- if (nl->wqueue_size >= RTNL_WQUEUE_MAX)
+ if (nl->wqueue_size >= RTNL_WQUEUE_MAX) {
+ log_debug("rtnl: exhausted the write queue size (%d)", RTNL_WQUEUE_MAX);
return -ENOBUFS;
+ }
if (!GREEDY_REALLOC(nl->wqueue, nl->wqueue_allocated, nl->wqueue_size + 1))
return -ENOMEM;
@@ -221,8 +223,10 @@ int sd_rtnl_send(sd_rtnl *nl,
int rtnl_rqueue_make_room(sd_rtnl *rtnl) {
assert(rtnl);
- if (rtnl->rqueue_size >= RTNL_RQUEUE_MAX)
+ if (rtnl->rqueue_size >= RTNL_RQUEUE_MAX) {
+ log_debug("rtnl: exhausted the read queue size (%d)", RTNL_RQUEUE_MAX);
return -ENOBUFS;
+ }
if (!GREEDY_REALLOC(rtnl->rqueue, rtnl->rqueue_allocated, rtnl->rqueue_size + 1))
return -ENOMEM;
@@ -233,8 +237,10 @@ int rtnl_rqueue_make_room(sd_rtnl *rtnl) {
int rtnl_rqueue_partial_make_room(sd_rtnl *rtnl) {
assert(rtnl);
- if (rtnl->rqueue_partial_size >= RTNL_RQUEUE_MAX)
+ if (rtnl->rqueue_partial_size >= RTNL_RQUEUE_MAX) {
+ log_debug("rtnl: exhausted the partial read queue size (%d)", RTNL_RQUEUE_MAX);
return -ENOBUFS;
+ }
if (!GREEDY_REALLOC(rtnl->rqueue_partial, rtnl->rqueue_partial_allocated,
rtnl->rqueue_partial_size + 1))