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.129.124]) by passt.top (Postfix) with ESMTP id C65F15A026E for ; Fri, 19 Apr 2024 12:41:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713523265; 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=PtBuHqkJiNzXqPLsdzVMKpcgkewgxJ2EWD059bHbBEA=; b=bu9lV7Se0EaiNmeF9MFR9CziMuJTpN4MRTRxwJ6yI03HkKa379MK8VbLqgTA2e7nC22ISB ODuNoq1wTyouybQeJ2sqAaUhREdinBKeUI3CPI4925/NMalFopvftTknrgYhJe0Rq5mzS+ wOFU2psEYwmjj/fdTt3k6ixxO7yZvZQ= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-1Zg-bqm9NW-15g3tOyIw6w-1; Fri, 19 Apr 2024 06:41:03 -0400 X-MC-Unique: 1Zg-bqm9NW-15g3tOyIw6w-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a54c11dccfaso112626166b.2 for ; Fri, 19 Apr 2024 03:41:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713523262; x=1714128062; 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=PtBuHqkJiNzXqPLsdzVMKpcgkewgxJ2EWD059bHbBEA=; b=ENRf9lqaEp6QmANtq81WoHh8HCr/V88rGF8vDEi4vIUQRz+oOVwL6o9sW2AoaqZ1b9 c3XOwbw/h57sohWyhvHznk38z/8WW1jRPEu0D14tCPO3jTL0pTDPXU6PJiS+6E45dRoE r6UZB2IJ+KUUuibd6U6UzBuA3wBHdPFF3tl1W/NNmUsg9wzDnfVH9C9XXAAZ0twmrSxT CzCqjiOYCchY4FwxBQvl9uT/uOSw5/VjfFoWtJ1hQx5xUJHFXMzKL8rqA4YmKU8G31+Z zVzx16mU3/FMmwbBSL89BhcxgMpe0D1TzIl9hvK4KyNmcO140cLJtShhvUjBUS3PuBXe m4gw== X-Gm-Message-State: AOJu0Yy/2bIbBKfiLw6ZJuClLZJbYF7qgFd9E3bdxEBjHJJbH0v4R6xx 4wWPnsn4TpeGThEEGjQkQEWAAvFRtbC/S3q2YKpiFBh0sU9/tYN+ye+8BxtgVkw3bL0dCNHCmGl zmms1Sx0VhKtUZOTsS8V4H8jdWj1ThUXImFI0vwMiKC6IPtqmMQ== X-Received: by 2002:a17:906:fb9a:b0:a55:5faf:ab04 with SMTP id lr26-20020a170906fb9a00b00a555fafab04mr1383919ejb.44.1713523262522; Fri, 19 Apr 2024 03:41:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyPt1XJTCv/9AiYx14uycQve1+10dvAjx/rGABR0uhVHCOpzDjGNrbeRwcGaVO4RQkKLChZQ== X-Received: by 2002:a17:906:fb9a:b0:a55:5faf:ab04 with SMTP id lr26-20020a170906fb9a00b00a555fafab04mr1383905ejb.44.1713523262017; Fri, 19 Apr 2024 03:41:02 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id d8-20020a170906344800b00a4e2dc1283asm2031853ejb.50.2024.04.19.03.41.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2024 03:41:01 -0700 (PDT) Date: Fri, 19 Apr 2024 12:40:28 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [RFC v5] tcp: Replace TCP buffer structure by an iovec array Message-ID: <20240419124028.567b54c1@elisabeth> In-Reply-To: <20240415170137.664509-1-lvivier@redhat.com> References: <20240415170137.664509-1-lvivier@redhat.com> 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: UVF6RXEDRNJR7ZOMANBYLLTZ5MBQ5HPU X-Message-ID-Hash: UVF6RXEDRNJR7ZOMANBYLLTZ5MBQ5HPU 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 Mon, 15 Apr 2024 19:01:37 +0200 Laurent Vivier wrote: > To be able to provide pointers to TCP headers and IP headers without > worrying about alignment in the structure, split the structure into > several arrays and point to each part of the frame using an iovec array. > > Using iovec also allows us to simply ignore the first entry when the > vnet length header is not needed. > > Signed-off-by: Laurent Vivier > Reviewed-by: David Gibson > --- > > Notes: > v5: > - reformat MSS4/MSS6 macros > - update structures comments > - use IP_MAX_MTU > - rename TCP_IOV_TAP to TCP_IOV_VLEN > - s/ethernet/Ethernet/ > - split loop in tcp_sock4_iov_init() and tcp_sock6_iov_init() > - use intermediate variable vnet_len in tcp_data_to_tap() Applied. -- Stefano