[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specif
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specified Connection |
Date: |
Wed, 15 Nov 2017 18:57:52 +0000 |
On 14 November 2017 at 02:11, Jason Wang <address@hidden> wrote:
> From: Mao Zhongyi <address@hidden>
>
> A package from pri_indev or sec_indev only belongs to a particular
> Connection, so we only need to compare the package in the specified
> Connection's primary_list and secondary_list, rather than for each
> the whole Connection list to compare. This is time-consuming and
> unnecessary.
>
> Less checkpoint more efficiency.
>
> Cc: Zhang Chen <address@hidden>
> Cc: Li Zhijian <address@hidden>
> Cc: Jason Wang <address@hidden>
> Signed-off-by: Mao Zhongyi <address@hidden>
> Signed-off-by: Jason Wang <address@hidden>
> ---
> net/colo-compare.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index 54b6347..5d2429b 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -136,7 +136,7 @@ static int colo_insert_packet(GQueue *queue, Packet *pkt)
> * Return 0 on success, if return -1 means the pkt
> * is unsupported(arp and ipv6) and will be sent later
> */
> -static int packet_enqueue(CompareState *s, int mode)
> +static int packet_enqueue(CompareState *s, int mode, Connection **con)
> {
> ConnectionKey key;
> Packet *pkt = NULL;
> @@ -179,6 +179,7 @@ static int packet_enqueue(CompareState *s, int mode)
> "drop packet");
> }
> }
> + con = &conn;
>
> return 0;
> }
Coverity points out that this looks a bit fishy --
presumably you meant
*con = conn;
? The statement you have now doesn't do anything, since
'con' is unused after you change it.
(CID 1382804.)
thanks
-- PMM
- [Qemu-devel] [PULL 0/8] Net patches, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 1/8] net: fix check for number of parameters to -netdev socket, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 2/8] colo-compare: Insert packet into the suitable position of packet queue directly, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specified Connection, Jason Wang, 2017/11/13
- Re: [Qemu-devel] [PULL 3/8] colo-compare: compare the packet in a specified Connection,
Peter Maydell <=
- [Qemu-devel] [PULL 4/8] colo-compare: Fix comments, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 6/8] Fix eepro100 simple transmission mode, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 5/8] colo: Consolidate the duplicate code chunk into a routine, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 7/8] Add new PCI ID for i82559a, Jason Wang, 2017/11/13
- [Qemu-devel] [PULL 8/8] net/socket: fix coverity issue, Jason Wang, 2017/11/13
- Re: [Qemu-devel] [PULL 0/8] Net patches, Peter Maydell, 2017/11/14