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.

Reply via email to