vhost-user: remove tap_send_frames_vu()

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>
This commit is contained in:
Laurent Vivier 2024-01-19 13:18:31 +01:00
parent 95aebad0a4
commit 60e35ab2bd
3 changed files with 1 additions and 20 deletions

3
tap.c
View file

@ -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); m = tap_send_frames_passt(c, iov, n);
break; break;
case MODE_VU: case MODE_VU:
m = tap_send_frames_vu(c, iov, n); ASSERT(0);
break;
default: default:
m = 0; m = 0;
break; break;

View file

@ -653,22 +653,6 @@ err:
return offset; 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) static void vu_handle_tx(VuDev *vdev, int index)
{ {
struct ctx *c = (struct ctx *) ((char *)vdev - offsetof(struct ctx, vdev)); struct ctx *c = (struct ctx *) ((char *)vdev - offsetof(struct ctx, vdev));

View file

@ -129,8 +129,6 @@ static inline bool vu_queue_started(const VuVirtq *vq)
return vq->started; 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); int vu_send(const struct ctx *c, const void *data, size_t len);
void vu_print_capabilities(void); void vu_print_capabilities(void);
void vu_init(struct ctx *c); void vu_init(struct ctx *c);