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 689465A02C8 for ; Tue, 30 Apr 2024 20:49:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714502963; 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=39Jw/6t7iQTGqMwGArl33iX0Z/DanTOETZtaI7B7JKY=; b=U2Z+82wzJBrjWjKjxE7sa7FEbCXXitbPJJl9EjSakehJLjucxxdjm1dQE9ItomG5dTf2Z6 0OZT9s39yiOwQVJHGIyUAuD4nC4VVrjzfz9U07V7oGe3DGPNIV5c7GtyQHkULpGGIGllGW B67KaFoLfGuve0ySfbYCa9tuLKx5axo= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-330-Qi_utXnVN9a1nXMmHpJzLw-1; Tue, 30 Apr 2024 14:49:21 -0400 X-MC-Unique: Qi_utXnVN9a1nXMmHpJzLw-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2db6fbc1dedso58455501fa.3 for ; Tue, 30 Apr 2024 11:49:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714502960; x=1715107760; 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=39Jw/6t7iQTGqMwGArl33iX0Z/DanTOETZtaI7B7JKY=; b=jjAKGN05aApKe5/Ox6G7jVQMBU2IC5yMWs62cwJ34l0lKxAwvlLk/BG0Q2pv/As6V0 ssSjMMkZ3sI0N4UayOVsT7rjqIS1DFBClU45Ud3w0Y1oPFqVQUD6JA2hpAoYcLLiDa4S YqwgIQDw89btQNk06hjAXRIdT2n6hn82dTA7dQoIumcAirGI8Df9cSK3ehvQAOwu2vqi f9DMUG5U0kBxv2yK249ZYKoz0sM74CiJM9c8o62epnz2hGlA3kotv3jGyKyzGMejRHKx 5CEo9g7l51DH5NYg5rgo/kTunx9++DDpDPD/3tVrhC36YRYQ+Umw7OZHkxUHATp1q13I HI7w== X-Gm-Message-State: AOJu0Yw+W3PDpq+lMsG7PGcPM2raCjIagNpmzgwCRgGAwTAhf47RLV4Y 9hNFYaQgRQS1cXXU5PcvC1BLls69WHBnCjRL83gsOmbZyE76daR+AXcBQMXiW83YMpMHXLxM9gh G7puE3qBGiBplBMf/1CuotY64UdiHrRg6gUZinLS8FWjBQ9Y8jw== X-Received: by 2002:a2e:a612:0:b0:2db:a9c9:4c5e with SMTP id v18-20020a2ea612000000b002dba9c94c5emr396596ljp.21.1714502959957; Tue, 30 Apr 2024 11:49:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtYS9QE3/5IHjI7SA51JM6pA1KoboX4uQPZjViCcs/hKX+VF2iFsS+W88wsZmR1tq+vN8pbA== X-Received: by 2002:a2e:a612:0:b0:2db:a9c9:4c5e with SMTP id v18-20020a2ea612000000b002dba9c94c5emr396470ljp.21.1714502954749; Tue, 30 Apr 2024 11:49:14 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id ku2-20020a170907788200b00a58c0c48756sm6031109ejc.32.2024.04.30.11.49.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2024 11:49:14 -0700 (PDT) Date: Tue, 30 Apr 2024 20:48:40 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 7/7] tcp: Update tap specific header too in tcp_fill_headers[46]() Message-ID: <20240430204809.52711861@elisabeth> In-Reply-To: <20240429070933.1366881-8-david@gibson.dropbear.id.au> References: <20240429070933.1366881-1-david@gibson.dropbear.id.au> <20240429070933.1366881-8-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; 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: A46ZBRB3OFYVKST4RJYMCUNIS6GYDPB3 X-Message-ID-Hash: A46ZBRB3OFYVKST4RJYMCUNIS6GYDPB3 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, Laurent Vivier 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 Mon, 29 Apr 2024 17:09:33 +1000 David Gibson wrote: > tcp_fill_headers[46]() fill most of the headers, but the tap specific > header (the frame length for qemu sockets) is filled in afterwards. > Filling this as well: > * Removes a little redundancy between the tcp_send_flag() and > tcp_data_to_tap() path > * Makes calculation of the correct length a little easier > * Removes the now misleadingly named 'vnet_len' variable in > tcp_send_flag() > > Signed-off-by: David Gibson > --- > tcp.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/tcp.c b/tcp.c > index 27c06958..01987c04 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -1321,6 +1321,7 @@ static void tcp_fill_header(struct tcphdr *th, > * tcp_fill_headers4() - Fill 802.3, IPv4, TCP headers in pre-cooked buffers > * @c: Execution context > * @conn: Connection pointer > + * @taph: TAP backend specific header Here and below: s/TAP/tap/. Other than the minor comments I shared the series looks good to me (and looks like a big improvement in terms of possible sources of confusion). -- Stefano