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 952565A004E for ; Thu, 13 Jun 2024 14:37:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718282222; 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; bh=cOtl2DnCA0a6+ExxD8t4AO0YZhtQjL/eA4jUi0+eByM=; b=fx0nDw6E7+D0LQwQPsVTdiAOO/50rMF0J/JA7cSvUF+TdmsUx5fDPkFb1J6tKVPHCZ799f EU4j2T8Qt9iF2uedty/LIwFEiu01sQqrig1ruyPmRP3LyTCe4F+me01Hlk/3K+G3yq+yy8 dKSD4quoyHLzE3xjbuJQkrLhvoFoI1E= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-209-amr8AiKsOWG2bLV0fpL8Gg-1; Thu, 13 Jun 2024 08:36:59 -0400 X-MC-Unique: amr8AiKsOWG2bLV0fpL8Gg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 40ABA19560B1 for ; Thu, 13 Jun 2024 12:36:58 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.193.78]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C9F919560AA; Thu, 13 Jun 2024 12:36:56 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v7 0/8] Add vhost-user support to passt (part 2) Date: Thu, 13 Jun 2024 14:36:47 +0200 Message-ID: <20240613123655.1362065-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: H55QPHFVHDNGSHN46FRIDWGGGJU66PTY X-Message-ID-Hash: H55QPHFVHDNGSHN46FRIDWGGGJU66PTY X-MailFrom: lvivier@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 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: Extract buffers management code from tcp.c and move=0D it to tcp_buf.c=0D tcp.c keeps all the generic code and will be also used by=0D the vhost-user functions.=0D =0D Also compare mode to MODE_PASTA, as we will manage vhost-user=0D mode (MODE_VU) like MODE_PASST.=0D =0D v7:=0D - update comments (tap_flush_pools(), func and line)=0D - drop "-L4" in tcp_buf.c header=0D - fix *optlen initializatio=0D - fix tcp4_flags_used/tcp6_flags_used value on error=0D - fix seq_to_tap value=0D =0D v6:=0D - reorder declarations, align summing, add curly brackets=0D - rename tap_handler_all() to tap_handler()=0D - rename packet_add_all_do() to tap_add_packet=0D and remove func and line.=0D - rename pool_flush_all() to tap_flush_pools()=0D - rename tcp_fill_flag_header() to tcp_prepare_flags()=0D - set optlen to 0 in tcp_prepare_flags()=0D =0D v5:=0D - remove:=0D [PATCH v4 01/10] tcp: inline tcp_l2_buf_fill_headers()=0D - merge=0D [PATCH v4 09/10] tcp: remove tap_hdr parameter=0D into tcp: extract buffer management from tcp_send_flag()=0D - update comments=0D =0D v4:=0D - remove "tcp: extract buffer management from tcp_conn_tap_mss()"=0D as the MSS size can be the same between socket and vhost-user.=0D - rename tcp_send_flag() and tcp_data_from_sock() to=0D tcp_buf_send_flag() and tcp_buf_data_from_sock()=0D =0D v3:=0D - add 3 new patches=0D tap: use in->buf_size rather than sizeof(pkt_buf)=0D tcp: remove tap_hdr parameter=0D iov: remove iov_copy()=0D =0D v2:=0D - compare to MODE_PASTA in conf_open_files() too=0D - move taph out of udp_update_hdr4()/udp_update_hdr6()=0D =0D Laurent Vivier (8):=0D tcp: extract buffer management from tcp_send_flag()=0D tcp: move buffers management functions to their own file=0D tap: refactor packets handling functions=0D udp: refactor UDP header update functions=0D udp: rename udp_sock_handler() to udp_buf_sock_handler()=0D vhost-user: compare mode MODE_PASTA and not MODE_PASST=0D iov: remove iov_copy()=0D tap: use in->buf_size rather than sizeof(pkt_buf)=0D =0D Makefile | 5 +-=0D conf.c | 14 +-=0D iov.c | 39 ----=0D iov.h | 3 -=0D isolation.c | 10 +-=0D passt.c | 4 +-=0D tap.c | 132 ++++++-----=0D tap.h | 3 +=0D tcp.c | 580 ++++---------------------------------------------=0D tcp_buf.c | 519 +++++++++++++++++++++++++++++++++++++++++++=0D tcp_buf.h | 16 ++=0D tcp_internal.h | 96 ++++++++=0D udp.c | 68 +++---=0D udp.h | 2 +-=0D 14 files changed, 803 insertions(+), 688 deletions(-)=0D create mode 100644 tcp_buf.c=0D create mode 100644 tcp_buf.h=0D create mode 100644 tcp_internal.h=0D =0D --=20=0D 2.45.2=0D =0D