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=RIv0boK0; 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 341365A004C for ; Thu, 17 Oct 2024 13:25:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729164313; 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=Hgvh197zJOiHF3xYf9KPO4PMemaKO5P5g9vlTs8Afgw=; b=RIv0boK0p8wPuPHLs/VyxgsqB/VQYSGvwnL5RGpNTkrlPxF5NiCRqvsK8KYSLe0/H1w6Vp ZlP6MajMAJBVISIH9Ip3s9xii6TZ4DEz2mHEb3yCT8BHhixKNQPPggEMYU4IEtDgTTaxtG KdYhD1wiNsAzIjOCWK11WyJEc2v9s8s= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-hyAD1IuaMBqBNndUlfwT9w-1; Thu, 17 Oct 2024 07:25:11 -0400 X-MC-Unique: hyAD1IuaMBqBNndUlfwT9w-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4315ad4938fso3962545e9.0 for ; Thu, 17 Oct 2024 04:25:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729164310; x=1729769110; 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=Hgvh197zJOiHF3xYf9KPO4PMemaKO5P5g9vlTs8Afgw=; b=FXGd9XVpts+LavkOZhLCf3bFxUWTAfyo1R7Rm2VMKPDFTr8nXEmlz8FUysdhMA5YJa Ye3If3xm9Psbg4J9Ew27iZbaCPNxXb5/CsUf6a0mvZ6XHRYX+YYj3iGmnyZkAvl8w6g5 tkmFk2VR2/qWnCk3MgQx4QEBLrY5uXXDQcyJpAd6aruqlOKHKp4F/wHHLsMrmGdyQ6hs Eiq/gG8z3XPj5phD1VROWato0P66iAr/r6ODpikmVV8xT9L5P0nQZyRJ4SBdN+cYi9uB +TdLuC1TOscjBuyWhYFP2sgaZ4dlfZVY/UzsF1TYbDdDH9kDBAcnUQksvWRXq0ljnDoP jWrw== X-Forwarded-Encrypted: i=1; AJvYcCVg7cfgGOmzbBfbZr7igxl3U9PVe5nuaYK8LWSqo0WpO13ZmtbvXym4q0xGh5LxZzjSPXF8VB4OCog=@passt.top X-Gm-Message-State: AOJu0Ywa1vqPu1WhRiQ+ZpBj/3s23PatmDAwIRSuyqCmUMJiyRFyPz4c D5JjVyvpPZhwka0os8y3xyy3vQpAD6/KZvtugy6ItGBVy5jSdQ3iVU1cbOF83+xk3pK4edxJnT7 z7Ff1CbckevAOaInD5XzdaO9k3GC9noN56wo8rlU4CXasSpip/g== X-Received: by 2002:adf:f84b:0:b0:37d:238:983 with SMTP id ffacd0b85a97d-37d86bbf5ebmr4207012f8f.22.1729164309880; Thu, 17 Oct 2024 04:25:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTlgrAOvzR+ydD9b9bVKTt45qNIXEJdh3W5b11S4iFQA9n92aIyU2YoKDmq5gYCsO0GHg5AQ== X-Received: by 2002:adf:f84b:0:b0:37d:238:983 with SMTP id ffacd0b85a97d-37d86bbf5ebmr4206999f8f.22.1729164309430; Thu, 17 Oct 2024 04:25:09 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa882acsm6959789f8f.38.2024.10.17.04.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 04:25:08 -0700 (PDT) Date: Thu, 17 Oct 2024 13:25:03 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v8 7/8] vhost-user: add vhost-user Message-ID: <20241017132503.0d174463@elisabeth> In-Reply-To: <20241017021031.1adb421e@elisabeth> References: <20241010122903.1188992-1-lvivier@redhat.com> <20241010122903.1188992-8-lvivier@redhat.com> <20241015215438.1595b4d7@elisabeth> <20241017021031.1adb421e@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: B5WOGXQZDVKX2PIY2KNZZ6NDOYTPDJAZ X-Message-ID-Hash: B5WOGXQZDVKX2PIY2KNZZ6NDOYTPDJAZ 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: David Gibson , 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 Thu, 17 Oct 2024 02:10:31 +0200 Stefano Brivio wrote: > 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. ...Laurent, let me know if I should dig into this any further. For reference, the kernel commit introducing SO_PEEK_OFF support for TCP on IPv6 is be9a4fb831b8 ("tcp: add SO_PEEK_OFF socket option tor TCPv6"). Without that commit, passt won't set peek_offset_cap. It was added in 6.11-rc5, so it's part of kernel-6.11.3-200.fc40 (latest stable kernel) for Fedora 40. passt will print "SO_PEEK_OFF supported" if you run it with -d -f. -- Stefano