[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Pack
From: |
Jason Wang |
Subject: |
Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Packet Caching and Framework of IPv4 |
Date: |
Mon, 1 Feb 2016 17:22:05 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 02/01/2016 04:02 PM, Wei Xu wrote:
[...]
>>
>>> + return NULL;
>>> + }
>>> +
>>> + chain->proto = proto;
>>> + chain->do_receive = virtio_net_rsc_receive4;
>>> +
>>> + QTAILQ_INIT(&chain->buffers);
>>> + QTAILQ_INSERT_TAIL(&n->rsc_chains, chain, next);
>>> + return chain;
>>> +}
>> Better to split the chain initialization from lookup. And we can
>> initialize ipv4 chain during initialization.
>
> Since the allocation happens really seldom, is it ok to keep the
> mechanism to make the logic clean?
Ok for now.