mirror of
https://passt.top/passt
synced 2025-06-05 23:45:34 +02:00
vhost-user: compare mode MODE_PASTA and not MODE_PASST
As we are going to introduce the MODE_VU that will act like the mode MODE_PASST, compare to MODE_PASTA rather than to add a comparison to MODE_VU when we check for MODE_PASST. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
377b666dc9
commit
0c335d751a
6 changed files with 21 additions and 21 deletions
12
tap.c
12
tap.c
|
@ -416,10 +416,10 @@ size_t tap_send_frames(const struct ctx *c, const struct iovec *iov,
|
|||
if (!nframes)
|
||||
return 0;
|
||||
|
||||
if (c->mode == MODE_PASST)
|
||||
m = tap_send_frames_passt(c, iov, bufs_per_frame, nframes);
|
||||
else
|
||||
if (c->mode == MODE_PASTA)
|
||||
m = tap_send_frames_pasta(c, iov, bufs_per_frame, nframes);
|
||||
else
|
||||
m = tap_send_frames_passt(c, iov, bufs_per_frame, nframes);
|
||||
|
||||
if (m < nframes)
|
||||
debug("tap: failed to send %zu frames of %zu",
|
||||
|
@ -1330,7 +1330,9 @@ void tap_sock_init(struct ctx *c)
|
|||
return;
|
||||
}
|
||||
|
||||
if (c->mode == MODE_PASST) {
|
||||
if (c->mode == MODE_PASTA) {
|
||||
tap_sock_tun_init(c);
|
||||
} else {
|
||||
tap_sock_unix_init(c);
|
||||
|
||||
/* In passt mode, we don't know the guest's MAC address until it
|
||||
|
@ -1338,7 +1340,5 @@ void tap_sock_init(struct ctx *c)
|
|||
* first packets will reach it.
|
||||
*/
|
||||
memset(&c->mac_guest, 0xff, sizeof(c->mac_guest));
|
||||
} else {
|
||||
tap_sock_tun_init(c);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue