summaryrefslogtreecommitdiff
path: root/include/openvswitch/token-bucket.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-09-20 11:38:59 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-09-20 11:38:59 -0700
commitda20d36266cf64ad48c960a072d4ae58b76bcb65 (patch)
tree9e81d0dbfad8e0c59e1efc496966ff1daacfebfe /include/openvswitch/token-bucket.h
parentccb3bc08876dbcfc0365a71e1e0566f9096461d6 (diff)
downloadopenvswitch-da20d36266cf64ad48c960a072d4ae58b76bcb65.tar.gz
token-bucket: Add token_bucket_wait_at().
Having the caller of token_bucket_wait() indicated in the log messages makes debugging easier. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openvswitch/token-bucket.h')
-rw-r--r--include/openvswitch/token-bucket.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/openvswitch/token-bucket.h b/include/openvswitch/token-bucket.h
index bbcde84e0..6bb6040f5 100644
--- a/include/openvswitch/token-bucket.h
+++ b/include/openvswitch/token-bucket.h
@@ -37,6 +37,9 @@ void token_bucket_init(struct token_bucket *,
void token_bucket_set(struct token_bucket *,
unsigned int rate, unsigned int burst);
bool token_bucket_withdraw(struct token_bucket *, unsigned int n);
-void token_bucket_wait(struct token_bucket *, unsigned int n);
+void token_bucket_wait_at(struct token_bucket *, unsigned int n,
+ const char *where);
+#define token_bucket_wait(bucket, n) \
+ token_bucket_wait_at(bucket, n, OVS_SOURCE_LOCATOR)
#endif /* token-bucket.h */