mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
vhost/vsock: fix packet delivery order to monitoring devices
[ Upstream commit 107bc0766b
]
We want to deliver packets to monitoring devices before it is
put in the virtqueue, to avoid that replies can appear in the
packet capture before the transmitted packet.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5765f42d9f
commit
486a24502c
1 changed files with 5 additions and 5 deletions
|
@ -182,14 +182,14 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock,
|
|||
break;
|
||||
}
|
||||
|
||||
vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len);
|
||||
added = true;
|
||||
|
||||
/* Deliver to monitoring devices all correctly transmitted
|
||||
* packets.
|
||||
/* Deliver to monitoring devices all packets that we
|
||||
* will transmit.
|
||||
*/
|
||||
virtio_transport_deliver_tap_pkt(pkt);
|
||||
|
||||
vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len);
|
||||
added = true;
|
||||
|
||||
pkt->off += payload_len;
|
||||
total_len += payload_len;
|
||||
|
||||
|
|
Loading…
Reference in a new issue