diff options
| author | Jason Wang <[email protected]> | 2020-03-26 14:01:18 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <[email protected]> | 2020-04-01 16:06:26 +0000 |
| commit | 792a4f2ed24fcdf0a1956e84fe2a71ada318ba7c (patch) | |
| tree | 2e6c428495030f0118f14468fc2cdf7f6e649b29 /drivers/vhost/net.c | |
| parent | vhost: refine vhost and vringh kconfig (diff) | |
| download | kernel-792a4f2ed24fcdf0a1956e84fe2a71ada318ba7c.tar.gz kernel-792a4f2ed24fcdf0a1956e84fe2a71ada318ba7c.zip | |
vhost: allow per device message handler
This patch allow device to register its own message handler during
vhost_dev_init(). vDPA device will use it to implement its own DMA
mapping logic.
Signed-off-by: Jason Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'drivers/vhost/net.c')
| -rw-r--r-- | drivers/vhost/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 18e205eeb9af..7b1d2dfec7f2 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1324,7 +1324,8 @@ static int vhost_net_open(struct inode *inode, struct file *f) } vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX, UIO_MAXIOV + VHOST_NET_BATCH, - VHOST_NET_PKT_WEIGHT, VHOST_NET_WEIGHT); + VHOST_NET_PKT_WEIGHT, VHOST_NET_WEIGHT, + NULL); vhost_poll_init(n->poll + VHOST_NET_VQ_TX, handle_tx_net, EPOLLOUT, dev); vhost_poll_init(n->poll + VHOST_NET_VQ_RX, handle_rx_net, EPOLLIN, dev); |
