[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/17] net/colo-compare.c: Fix compare_timeout format issue
From: |
Jason Wang |
Subject: |
[PULL 08/17] net/colo-compare.c: Fix compare_timeout format issue |
Date: |
Wed, 11 Nov 2020 21:11:32 +0800 |
From: Zhang Chen <chen.zhang@intel.com>
This parameter need compare with the return of qemu_clock_get_ms(),
it is uint64_t. So we need fix this issue here.
Fixes: 9cc43c94b31 ("net/colo-compare.c: Expose "compare_timeout" to users")
Reported-by: Derek Su <dereksu@qnap.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
net/colo-compare.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 8d476bb..76b83a9 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -120,7 +120,7 @@ struct CompareState {
SendCo out_sendco;
SendCo notify_sendco;
bool vnet_hdr;
- uint32_t compare_timeout;
+ uint64_t compare_timeout;
uint32_t expired_scan_cycle;
/*
@@ -1076,9 +1076,9 @@ static void compare_get_timeout(Object *obj, Visitor *v,
Error **errp)
{
CompareState *s = COLO_COMPARE(obj);
- uint32_t value = s->compare_timeout;
+ uint64_t value = s->compare_timeout;
- visit_type_uint32(v, name, &value, errp);
+ visit_type_uint64(v, name, &value, errp);
}
static void compare_set_timeout(Object *obj, Visitor *v,
@@ -1141,9 +1141,9 @@ static void set_max_queue_size(Object *obj, Visitor *v,
Error **errp)
{
Error *local_err = NULL;
- uint32_t value;
+ uint64_t value;
- visit_type_uint32(v, name, &value, &local_err);
+ visit_type_uint64(v, name, &value, &local_err);
if (local_err) {
goto out;
}
@@ -1391,7 +1391,7 @@ static void colo_compare_init(Object *obj)
object_property_add_str(obj, "notify_dev",
compare_get_notify_dev, compare_set_notify_dev);
- object_property_add(obj, "compare_timeout", "uint32",
+ object_property_add(obj, "compare_timeout", "uint64",
compare_get_timeout,
compare_set_timeout, NULL, NULL);
--
2.7.4
- [PULL 00/17] Net patches, Jason Wang, 2020/11/11
- [PULL 01/17] virtio-net: Set mac address to hardware if the peer is vdpa, Jason Wang, 2020/11/11
- [PULL 02/17] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup, Jason Wang, 2020/11/11
- [PULL 04/17] Reduce the time of checkpoint for COLO, Jason Wang, 2020/11/11
- [PULL 06/17] colo-compare: fix missing compare_seq initialization, Jason Wang, 2020/11/11
- [PULL 07/17] colo-compare: check mark in mutual exclusion, Jason Wang, 2020/11/11
- [PULL 03/17] Optimize seq_sorter function for colo-compare, Jason Wang, 2020/11/11
- [PULL 05/17] Fix the qemu crash when guest shutdown in COLO mode, Jason Wang, 2020/11/11
- [PULL 08/17] net/colo-compare.c: Fix compare_timeout format issue,
Jason Wang <=
- [PULL 09/17] net/colo-compare.c: Change the timer clock type, Jason Wang, 2020/11/11
- [PULL 10/17] net/colo-compare.c: Add secondary old packet detection, Jason Wang, 2020/11/11
- [PULL 11/17] net/colo-compare.c: Increase default queued packet scan frequency, Jason Wang, 2020/11/11
- [PULL 13/17] net/l2tpv3: Remove redundant check in net_init_l2tpv3(), Jason Wang, 2020/11/11
- [PULL 12/17] net: remove an assert call in eth_get_gso_type, Jason Wang, 2020/11/11
- [PULL 14/17] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer, Jason Wang, 2020/11/11
- [PULL 15/17] hw/net/can/ctucan: Avoid unused value in ctucan_send_ready_buffers(), Jason Wang, 2020/11/11
- [PULL 16/17] hw/net/can/ctucan_core: Handle big-endian hosts, Jason Wang, 2020/11/11
- [PULL 17/17] hw/net/can/ctucan_core: Use stl_le_p to write to tx_buffers, Jason Wang, 2020/11/11
- Re: [PULL 00/17] Net patches, Peter Maydell, 2020/11/11