[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200421154246.GA47385@stefanha-x1.localdomain>
Date: Tue, 21 Apr 2020 16:42:46 +0100
From: Stefan Hajnoczi <stefanha@...il.com>
To: Stefano Garzarella <sgarzare@...hat.com>
Cc: davem@...emloft.net, Gerard Garcia <ggarcia@...a.uab.cat>,
kvm@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
Stefan Hajnoczi <stefanha@...hat.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net] vsock/virtio: postpone packet delivery to monitoring
devices
On Tue, Apr 21, 2020 at 11:25:27AM +0200, Stefano Garzarella wrote:
> We delivering packets to monitoring devices, before to check if
> the virtqueue has enough space.
"We [are] delivering packets" and "before to check" -> "before
checking". Perhaps it can be rewritten as:
Packets are delivered to monitoring devices before checking if the
virtqueue has enough space.
>
> If the virtqueue is full, the transmitting packet is queued up
> and it will be sent in the next iteration. This causes the same
> packet to be delivered multiple times to monitoring devices.
>
> This patch fixes this issue, postponing the packet delivery
> to monitoring devices, only when it is properly queued in the
s/,//
> virqueue.
s/virqueue/virtqueue/
> @@ -137,6 +135,11 @@ virtio_transport_send_pkt_work(struct work_struct *work)
> break;
> }
>
> + /* Deliver to monitoring devices all correctly transmitted
> + * packets.
> + */
> + virtio_transport_deliver_tap_pkt(pkt);
> +
The device may see the tx packet and therefore receive a reply to it
before we can call virtio_transport_deliver_tap_pkt(). Does this mean
that replies can now appear in the packet capture before the transmitted
packet?
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists