From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JNWrp3OG; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id B09405A0262 for ; Thu, 17 Oct 2024 02:10:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729123841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ph6CcuodHzJ8yl2w6Fy6YJ4yzEOBr8NuPxD+8tqRheA=; b=JNWrp3OGW+6Y5qK2iJV3jzEOHDnZa5JjzshdKK+CQOce+jpvylPyKbCZPqW5rkImqy+bM5 Xy13ycJlKt28ZGHsCZi0HKoohB48PI+Ys/ckhQ7foiaMmW85vDqAXhjcf2HjANyqYcAFFh WxJ69JdbZeOe/f7vIknOzXmAkQlWJ94= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-316-BxU_zN1fOEyxICWws0PNiQ-1; Wed, 16 Oct 2024 20:10:39 -0400 X-MC-Unique: BxU_zN1fOEyxICWws0PNiQ-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4315b7b0c16so199765e9.1 for ; Wed, 16 Oct 2024 17:10:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729123837; x=1729728637; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ph6CcuodHzJ8yl2w6Fy6YJ4yzEOBr8NuPxD+8tqRheA=; b=AE0mI4IwIZmbT57tGBFLrHcb5aiOJ9yYnjU+8aogFyxN86I+PgudHwysDLgeqyQq7e OWtGrKtA+xKTxA8VpNDPPHxqJb1ywjq5dkiRUMCPU+B0J/5x2AU4jEw6AykQtJffwA42 VJ7KxysmyWRRbkahle3vJiXVY2jOUzbLcNT+ovKjswV+uII4qWYOBeLFj/QV0eDb4RUb h0jEGV+2np56KBE9bo94B6sDBwuZ4tKlGujWVRCs8HUtCeiTKk+/TiDhj4ILZ2gNrRco NT+bqyu1QWyZgat9yifnUCr21bFF9JqUSLm8+ciWDqS1FvrwOTWKjHOBwr4OJ89jXSTd XVgQ== X-Forwarded-Encrypted: i=1; AJvYcCX4n7tRZD17ZeSNpwbAmwV/QMzwnEByxj7fc42ledEChNIoGLs/yc/ArLflMFnrni21Z13byy9Pofc=@passt.top X-Gm-Message-State: AOJu0Yw1V/84IVtwKZm8Xl/zkruQnKDkqY69/9xUT0FkX6yzeNOTbr5P fH6oH9wmHblHHe97cZ1sHft63FHO0LRK6fJlq4Vc+TWlOXUo6JJbqGZL76HKw6ISQuxlek14Qwb aSq7Y57oUpk9VP5Hu97zNCWQxxyMTS+DkwIeDkPxhLgk0Wgom2A== X-Received: by 2002:a05:600c:1594:b0:431:3933:1d30 with SMTP id 5b1f17b1804b1-4314a295980mr47531215e9.5.1729123836804; Wed, 16 Oct 2024 17:10:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHC2QjJ1fvOX3lYm8NZYE4gjpX4eZFHEY1aPwzduH/OPz4o6kuNzBDmt9klvCOAaSGjaygyMw== X-Received: by 2002:a05:600c:1594:b0:431:3933:1d30 with SMTP id 5b1f17b1804b1-4314a295980mr47531105e9.5.1729123836358; Wed, 16 Oct 2024 17:10:36 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43158c3bc75sm8146785e9.12.2024.10.16.17.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 17:10:34 -0700 (PDT) Date: Thu, 17 Oct 2024 02:10:31 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v8 7/8] vhost-user: add vhost-user Message-ID: <20241017021031.1adb421e@elisabeth> In-Reply-To: References: <20241010122903.1188992-1-lvivier@redhat.com> <20241010122903.1188992-8-lvivier@redhat.com> <20241015215438.1595b4d7@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: MPSR2T434UVFMV4N5XFIFVCFO5ZNP4KF X-Message-ID-Hash: MPSR2T434UVFMV4N5XFIFVCFO5ZNP4KF X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier , passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 16 Oct 2024 11:41:34 +1100 David Gibson wrote: > On Tue, Oct 15, 2024 at 09:54:38PM +0200, Stefano Brivio wrote: > > [Still partial review] > [snip] > > > + if (peek_offset_cap) > > > + already_sent = 0; > > > + > > > + iov_vu[0].iov_base = tcp_buf_discard; > > > + iov_vu[0].iov_len = already_sent; > > > > I think I had a similar comment to a previous revision. Now, I haven't > > tested this (yet) on a kernel with support for SO_PEEK_OFF on TCP, but > > I think this should eventually follow the same logic as the (updated) > > tcp_buf_data_from_sock(): we should use tcp_buf_discard only if > > (!peek_offset_cap). > > > > It's fine to always initialise VIRTQUEUE_MAX_SIZE iov_vu items, > > starting from 1, for simplicity. But I'm not sure if it's safe to pass a > > zero iov_len if (peek_offset_cap). > > > I'll test that (unless you already did) -- if it works, we can fix this > > up later as well. > > I believe I tested it at some point, and I think we're already using > it somewhere. I tested it again just to be sure on a recent net.git kernel: sometimes the first test in passt_vu_in_ns/tcp, "TCP/IPv4: host to guest: big transfer" hangs on my setup, sometimes it's the "TCP/IPv4: ns to guest (using loopback address): big transfer" test instead. I can reproduce at least one of the two issues consistently (tests stopped 5 times out of 5). The socat client completes the transfer, the server is still waiting for something. I haven't taken captures yet or tried to re-send from the client. It all works (consistently) with an older kernel without support for SO_PEEK_OFF on TCP, but also on this kernel if I force peek_offset_cap to false in tcp_init(). -- Stefano