[dpdk-dev] [RFC PATCH 3/7] lib/librte_vhost: Add an abstraction layer tointerpret messages
mukawa at igel.co.jp
Mon Nov 10 09:44:16 CET 2014
(2014/11/10 17:07), Xie, Huawei wrote:
> Here all layer 2 implementations are required to return same type of vhost_net_device_ops function pointers to
> layer 1, so layer 1 need to do some kind of preprocessing of its message or wrap some private message ctx in like vhost_device_ctx,
> and then pass the message to layer2.
> But as we have a more common layer 3, virtio-net layer, how about we put common message handler in virtio net layer as much as possible,
> and different layer 2 only do the local message preprocessing, and then pass common message format to layer 3?
> I think we at least need to define functional pointers between layer 2 and layer 3.
> Layer 1 and layer 2 actually are sub layers of the same layer. It is that layer(cuse/user) implementation's choice whether to provide an interface between
> them, and the interface could be different in terms of function prototype.
> Let us say we are to implement a new vhost, I only care the common interface provided by layer 3. I don't want to register another callbacks for my driver which
> are used by myself only.
> Let us think more about this.
With my RFC implementation, sometimes Layer1 directly calls Layer2-a or
It may be fast a bit, but may not be well abstracted because Layer1
doesn't call virtio common layer sometimes.
Anyway, I guess it's nice to change implementation as you mentioned.
We don't need speed while initialization. Let's take well abstracted
More information about the dev