public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v10 07/12] vhost-user: add vhost-user
Date: Wed, 13 Nov 2024 08:13:43 +0100	[thread overview]
Message-ID: <b5d91187-bc62-41df-b987-a657ed8abfed@redhat.com> (raw)
In-Reply-To: <ZzFwLMtiWHjPkqQD@zatzit>

On 11/11/2024 03:47, David Gibson wrote:
>> +			if (flow_sidx_valid(sidx)) {
>> +				flow_sidx_t fromsidx = flow_sidx_opposite(sidx);
>> +				struct udp_flow *uflow = udp_at_sidx(sidx);
>> +
>> +				flow_err(uflow,
>> +					"No support for forwarding UDP from %s to %s",
>> +					pif_name(pif_at_sidx(fromsidx)),
>> +					pif_name(pif));
>> +			} else {
>> +				debug("Discarding 1 datagram without flow");
>> +			}
>> +
>> +			continue;
>> +		}
>> +
>> +		toside = flowside_at_sidx(sidx);
>> +
>> +		v6 = !(inany_v4(&toside->eaddr) && inany_v4(&toside->oaddr));
>> +
>> +		iov_used = udp_vu_sock_recv(c, ref.fd, events, v6, &dlen);
>> +		if (iov_used <= 0)
>> +			break;
>> +
>> +		udp_vu_prepare(c, toside, dlen);
>> +		if (*c->pcap) {
>> +			udp_vu_csum(toside, iov_used);
>> +			pcap_iov(iov_vu, iov_used,
>> +				 sizeof(struct virtio_net_hdr_mrg_rxbuf));
>> +		}
>> +		vu_flush(vdev, vq, elem, iov_used);
> Do you really want to flush on every datagram?

To do like that avoids complexity in the code, but you're right it could be improved but I 
would prefer to do that once this series is merged with a follow up code. This kind of 
change is prone to introduce bugs...

Thanks,
Laurent


  reply	other threads:[~2024-11-13  7:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 10:37 [PATCH v10 00/12] Add vhost-user support to passt. (part 3) Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 01/12] packet: replace struct desc by struct iovec Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 02/12] vhost-user: introduce virtio API Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 03/12] vhost-user: introduce vhost-user API Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 04/12] udp: Prepare udp.c to be shared with vhost-user Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 05/12] tcp: Export headers functions Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 06/12] passt: rename tap_sock_init() to tap_backend_init() Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 07/12] vhost-user: add vhost-user Laurent Vivier
2024-11-11  2:47   ` David Gibson
2024-11-13  7:13     ` Laurent Vivier [this message]
2024-11-14  4:33       ` David Gibson
2024-11-08 10:37 ` [PATCH v10 08/12] test: Add tests for passt in vhost-user mode Laurent Vivier
2024-11-11  2:48   ` David Gibson
2024-11-08 10:37 ` [PATCH v10 09/12] tcp: Use only netinet/tcp.h instead of linux/tcp.h Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 10/12] tcp_vu: Share more header construction between IPv4 and IPv6 paths Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 11/12] tcp: Move tcp_l2_buf_fill_headers() to tcp_buf.c Laurent Vivier
2024-11-08 10:37 ` [PATCH v10 12/12] tcp: Adjust iov_len before filling headers Laurent Vivier
2024-11-08 11:27 ` [PATCH v10 00/12] Add vhost-user support to passt. (part 3) Stefano Brivio
2024-11-08 12:51   ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b5d91187-bc62-41df-b987-a657ed8abfed@redhat.com \
    --to=lvivier@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).