mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
jsonrpc: Add function to update all options at once.
It's useful to have a way to update all the JSON-RPC session options all at once and not call 3 separate functions every time. This may also allow the internals of these options to be better abstracted, i.e. allow users to not know what are these options exactly. Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
@@ -1337,6 +1337,15 @@ jsonrpc_session_set_dscp(struct jsonrpc_session *s, uint8_t dscp)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
jsonrpc_session_set_options(struct jsonrpc_session *s,
|
||||
const struct jsonrpc_session_options *options)
|
||||
{
|
||||
jsonrpc_session_set_max_backoff(s, options->max_backoff);
|
||||
jsonrpc_session_set_probe_interval(s, options->probe_interval);
|
||||
jsonrpc_session_set_dscp(s, options->dscp);
|
||||
}
|
||||
|
||||
/* Sets thresholds for send backlog. If send backlog contains more than
|
||||
* 'max_n_msgs' messages or is larger than 'max_backlog_bytes' bytes,
|
||||
* connection will be closed (then reconnected, if that feature is enabled). */
|
||||
|
Reference in New Issue
Block a user