chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
66aaf85
)
sd-rtnl: log when queues are exhausted
author
Tom Gundersen
<teg@jklm.no>
Sun, 20 Apr 2014 05:51:28 +0000
(07:51 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Sun, 20 Apr 2014 08:28:28 +0000
(10:28 +0200)
src/libsystemd/sd-rtnl/sd-rtnl.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-rtnl/sd-rtnl.c
b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 8650f550f7d1f6bcb40b3e34d51894501c73488e..543bad9f4f4447d82abbf62cd01b8440428755a2 100644
(file)
--- 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 */
}
} 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;
return -ENOBUFS;
+ }
if (!GREEDY_REALLOC(nl->wqueue, nl->wqueue_allocated, nl->wqueue_size + 1))
return -ENOMEM;
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);
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;
return -ENOBUFS;
+ }
if (!GREEDY_REALLOC(rtnl->rqueue, rtnl->rqueue_allocated, rtnl->rqueue_size + 1))
return -ENOMEM;
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);
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;
return -ENOBUFS;
+ }
if (!GREEDY_REALLOC(rtnl->rqueue_partial, rtnl->rqueue_partial_allocated,
rtnl->rqueue_partial_size + 1))
if (!GREEDY_REALLOC(rtnl->rqueue_partial, rtnl->rqueue_partial_allocated,
rtnl->rqueue_partial_size + 1))