diff options
author | Mao Zhongyi <maozy.fnst@cn.fujitsu.com> | 2017-10-13 14:32:06 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2017-11-13 15:46:37 +0800 |
commit | 8850d4caa7ad3f50adb2dd8d89842c67ae81a4b2 (patch) | |
tree | a0f76e50b46bc843bb22f6564d12e7f5010fb9ff /ui/vnc-enc-zrle-template.c | |
parent | ff86d5762552787f1fcb7da695ec4f8c1be754b4 (diff) | |
download | qemu-8850d4caa7ad3f50adb2dd8d89842c67ae81a4b2.zip qemu-8850d4caa7ad3f50adb2dd8d89842c67ae81a4b2.tar.gz qemu-8850d4caa7ad3f50adb2dd8d89842c67ae81a4b2.tar.bz2 |
colo-compare: Insert packet into the suitable position of packet queue directly
Currently, a packet from pri_dev or sec_dev is fristly pushed at the
tail of the primary or secondary packet queue then sorted by the tcp
sequence number.
Now, this patch use g_queue_insert_sorted to insert the packet directly
into the suitable position to avoid ordering all packets each time when
a new packet is comming, thereby increasing efficiency.
In addition, consolidate the code that add a packet to the list of
Connection (primary or secondary) into a separate routine colo_insert_packet()
since the same chunk of code is called from two place.
Cc: Zhang Chen <zhangckid@gmail.com>
Cc: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Signed-off-by: Zhang Chen <zhangckid@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'ui/vnc-enc-zrle-template.c')
0 files changed, 0 insertions, 0 deletions