aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2024-01-19 13:18:31 +0100
committerLaurent Vivier <lvivier@redhat.com>2024-03-12 13:58:47 +0100
commit60e35ab2bd11b9960f3e9430fe4b259aa3d6c764 (patch)
treeaa53b62f0decab8ce66cece51d2acb560b34f2ad
parent95aebad0a44f6a21d67f1354fd25de052a827f01 (diff)
downloadpasst-vhost-user.tar
passt-vhost-user.tar.gz
passt-vhost-user.tar.bz2
passt-vhost-user.tar.lz
passt-vhost-user.tar.xz
passt-vhost-user.tar.zst
passt-vhost-user.zip
vhost-user: remove tap_send_frames_vu()vhost-user
As TCP and UDP use now directly vhost-user we don't need this function anymore. Other protocols (ICMP, ARP, DHCP, ...) use tap_send()/vu_send() Signed-off-by: Laurent Vivier <lvivier@redhat.com>
-rw-r--r--tap.c3
-rw-r--r--vhost_user.c16
-rw-r--r--vhost_user.h2
3 files changed, 1 insertions, 20 deletions
diff --git a/tap.c b/tap.c
index 3c4a222..e36a903 100644
--- a/tap.c
+++ b/tap.c
@@ -477,8 +477,7 @@ size_t tap_send_frames(const struct ctx *c, const struct iovec *iov, size_t n)
m = tap_send_frames_passt(c, iov, n);
break;
case MODE_VU:
- m = tap_send_frames_vu(c, iov, n);
- break;
+ ASSERT(0);
default:
m = 0;
break;
diff --git a/vhost_user.c b/vhost_user.c
index 9cc07c8..4ceeeb5 100644
--- a/vhost_user.c
+++ b/vhost_user.c
@@ -653,22 +653,6 @@ err:
return offset;
}
-size_t tap_send_frames_vu(const struct ctx *c, const struct iovec *iov, size_t n)
-{
- size_t i;
- int ret;
-
- debug("tap_send_frames_vu n %zd", n);
-
- for (i = 0; i < n; i++) {
- ret = vu_send(c, iov[i].iov_base, iov[i].iov_len);
- if (ret < 0)
- break;
- }
- debug("count %zd", i);
- return i;
-}
-
static void vu_handle_tx(VuDev *vdev, int index)
{
struct ctx *c = (struct ctx *) ((char *)vdev - offsetof(struct ctx, vdev));
diff --git a/vhost_user.h b/vhost_user.h
index 25f0b61..44678dd 100644
--- a/vhost_user.h
+++ b/vhost_user.h
@@ -129,8 +129,6 @@ static inline bool vu_queue_started(const VuVirtq *vq)
return vq->started;
}
-size_t tap_send_frames_vu(const struct ctx *c, const struct iovec *iov,
- size_t n);
int vu_send(const struct ctx *c, const void *data, size_t len);
void vu_print_capabilities(void);
void vu_init(struct ctx *c);