Skip to content
Commit 02eca50c authored by Asias He's avatar Asias He Committed by Will Deacon
Browse files

kvm tools: Rework on virtio transport abstraction.



This patch reworks on virtio transport abstraction.

* Move virtio transport operations to virtio operations and drop
  virtio/trans.c This makes the abstraction much cleaner.

* Rename struct virtio_trans to struct virtio_device

  struct virtio_trans {
       void                    *virtio;
       enum virtio_trans_type  type;
       struct virtio_trans_ops *trans_ops;
       struct virtio_ops       *virtio_ops;
  };

  struct virtio_device {
       void                    *virtio;
       struct virtio_ops       *ops;
  };

  The virtio_trans struct is bit confusing since it also includes virtio
  operations.

* Introduce virtio_init()
  To init device, e.g.
  Before:
	virtio_trans_init()
	ndev->vtrans.trans_ops->init()
	ndev->vtrans.virtio_ops = &net_dev_virtio_ops
  After:
	virtio_init()

Signed-off-by: default avatarAsias He <asias.hejun@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 9ff91339
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment