From mboxrd@z Thu Jan 1 00:00:00 1970 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 191215A004F for ; Wed, 12 Jun 2024 23:24:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718227458; 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=4pESw345JYYmNkAX0cLe5HV9kkmZM40XE0PqS9DSojE=; b=cMUAR5kU2sE1WGju9a5GVuqv00enCkICt2xM1MnR30nMCSbIjmvrmyrPQRbSPBwCqQMjal ZrUQ+P6GLVByaDEejlljuAkdi/OJG5ztgxAMZ5/4gvFjxbwkbSv0dlef1BFyyDLVX2W8hv 7ofAe+MAhch48PKMClnD0FHGlHY6W6s= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-80-AvNe3pugMO2GtN8YaAVBLQ-1; Wed, 12 Jun 2024 17:24:17 -0400 X-MC-Unique: AvNe3pugMO2GtN8YaAVBLQ-1 Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-3d244239de1so149977b6e.2 for ; Wed, 12 Jun 2024 14:24:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718227456; x=1718832256; 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=4pESw345JYYmNkAX0cLe5HV9kkmZM40XE0PqS9DSojE=; b=V8x5gP5kCnrp3qazb5dkT21HLxmo+WsqywYp6Kjdp8HYs6fM5ye8hs7/5T+0FnS7Zz dR+LhyLIXB/Sj5Hv46bxXdVq8j6dBg05KV92kfcTikq31854MpXF34Hf747KbRYyyqPn YbgZ9qi9B7VbM2yRrtaPY/2Rf1M1q0Oui97VLXZh71NoQGxGKzmHXk3Zd4n93shW0vqr 9A6ouKrQ++FmPgohzH0ABx6Zdct0A1ZAJgqMQGciqIhWE38XCK3TQQOwwrbBqSAxlRUE 1thyf2SixsAc7FS9JlUc+6C1EM/chB69UFPNWdA/ZqnL24USMurdjrbyoH3gp/UJwiUn 3aEQ== X-Gm-Message-State: AOJu0Yz9d4omnmKMxy0gaQ7oRx98jRIMWPVrBM9xg2iWGiqr8CnsPZLW rYaxFyUQuNfTtVKvK0AtFPcDrK1h2+5MRiNUaddFpUChMsY2A+haY8eyh73ZAZVuD++M/y7OkNI 7c12YCQ9wVEuM7Jdnx1VSl9gD1ywONJVO+1yiLlmfhyN5Zaw/gw== X-Received: by 2002:a05:6808:11c7:b0:3d2:359f:65c9 with SMTP id 5614622812f47-3d23e0f269cmr2588587b6e.49.1718227456328; Wed, 12 Jun 2024 14:24:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsnDFYwJ5iB5Lho8QQtck4I9Cmmqw6fZxKUAcxix5/5gy5yz0jeH+ty+hJQEHa5R3ISOPsyQ== X-Received: by 2002:a05:6808:11c7:b0:3d2:359f:65c9 with SMTP id 5614622812f47-3d23e0f269cmr2588573b6e.49.1718227455799; Wed, 12 Jun 2024 14:24:15 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-441ef4f9a9esm63751cf.31.2024.06.12.14.24.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jun 2024 14:24:15 -0700 (PDT) Date: Wed, 12 Jun 2024 23:23:39 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v6 0/8] Add vhost-user support to passt (part 2) Message-ID: <20240612232339.7c936921@elisabeth> In-Reply-To: <20240612193744.4897d940@elisabeth> References: <20240612154734.1044883-1-lvivier@redhat.com> <20240612191617.2ae465a8@elisabeth> <20240612193744.4897d940@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: 73DDLOVD7B6MLNRO5SGXJYKFQZWZC4VQ X-Message-ID-Hash: 73DDLOVD7B6MLNRO5SGXJYKFQZWZC4VQ 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: passt-dev@passt.top, David Gibson 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, 12 Jun 2024 19:37:44 +0200 Stefano Brivio wrote: > On Wed, 12 Jun 2024 19:16:17 +0200 > Stefano Brivio wrote: > > > On Wed, 12 Jun 2024 17:47:26 +0200 > > Laurent Vivier wrote: > > > > > Extract buffers management code from tcp.c and move > > > it to tcp_buf.c > > > tcp.c keeps all the generic code and will be also used by > > > the vhost-user functions. > > > > > > Also compare mode to MODE_PASTA, as we will manage vhost-user > > > mode (MODE_VU) like MODE_PASST. > > > > Something in this series breaks the pasta_podman/bats test, number 19 > > in that script (Single TCP port forwarding, IPv4, tap). I'm bisecting > > now... > > $ git bisect good > 3c6a20486425ed00ba5b631bea11135045794dc2 is the first bad commit > commit 3c6a20486425ed00ba5b631bea11135045794dc2 > Author: Laurent Vivier > Date: Wed Jun 12 17:47:34 2024 +0200 > > tap: use in->buf_size rather than sizeof(pkt_buf) > > buf_size is set to sizeof(pkt_buf) by default. And it seems more correct > to provide the actual size of the buffer. > > Later a buf_size of 0 will allow vhost-user mode to detect > guest memory buffers. > > Signed-off-by: Laurent Vivier > Reviewed-by: David Gibson > Signed-off-by: Stefano Brivio > > tap.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > ...checking that patch now. Ouch, sorry, bad bisect, I forgot to rebuild at every step. The actual issue seems to be in 1/8 (details as a reply to that one): $ git bisect bad fa462103eb219dfb8e6fe7bb25d1707d8a82b2a2 is the first bad commit commit fa462103eb219dfb8e6fe7bb25d1707d8a82b2a2 Author: Laurent Vivier Date: Wed Jun 12 17:47:27 2024 +0200 tcp: extract buffer management from tcp_send_flag() This commit isolates the internal data structure management used for storing data (e.g., tcp4_l2_flags_iov[], tcp6_l2_flags_iov[], tcp4_flags_ip[], tcp4_flags[], ...) from the tcp_send_flag() function. The extracted functionality is relocated to a new function named tcp_fill_flag_header(). tcp_fill_flag_header() is now a generic function that accepts parameters such as struct tcphdr and a data pointer. tcp_send_flag() utilizes this parameter to pass memory pointers from tcp4_l2_flags_iov[] and tcp6_l2_flags_iov[]. This separation sets the stage for utilizing tcp_fill_flag_header() to set the memory provided by the guest via vhost-user in future developments. Signed-off-by: Laurent Vivier Signed-off-by: Stefano Brivio tcp.c | 72 ++++++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 24 deletions(-) -- Stefano