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=KpHcCGV5; dkim-atps=neutral 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 72A105A026E for ; Tue, 15 Oct 2024 00:38:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728945504; 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=39wU4/ghg7LBR4pefA5vImPzHBiT+Y9asoIpYeNlwIc=; b=KpHcCGV5ClsiwpNPOAghbKoloHeJTR7sYjetT7NOu8LroVMKeb6tYk3VCeKGVQq21rIYO2 ygedqpkeR5kYX3orM6sB56jAptOnjL45Ce6zQvi7aHiQ1fwkdEmfowK5oQS5bcijy+47Gu 70ebXchcFUrQSWJS+8aV5F13f2zlIIs= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-439-QLaWjAWLOo6_Jx0vYWPG7A-1; Mon, 14 Oct 2024 18:38:22 -0400 X-MC-Unique: QLaWjAWLOo6_Jx0vYWPG7A-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2e2d3d5fb4eso3951620a91.2 for ; Mon, 14 Oct 2024 15:38:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728945500; x=1729550300; 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=39wU4/ghg7LBR4pefA5vImPzHBiT+Y9asoIpYeNlwIc=; b=YhgnPgVo9MwhOY/xec/ooRGrvG3Hq5QsRGfGh913I0zTTl8QcyxrEaBC5LCFyY9X88 lidZwP9i9ma4is0YZu3wb5w1OMI6e36R20FffFJrklKQr/I4S0Q23goJoChKvbADbDlU ZtImzoRbJfiiRz344keBg0xGtulNKjPdHF+y4MM6BW8bU7bfLItOW204X9/7lNVEq9X4 DhzroEKY6E6xvk9WMmz2Ag6FMgWEdZIHYlL/wC46lVpz3v6drNOWr9h8gBZx8/Vg5I0g iYefayXUfvbBE+qmZCc/ZA1moXv5ya93a/R/Shsvh9CxCoFV4ovaTeJw3ABNDMwV6dnP l+AA== X-Gm-Message-State: AOJu0YyolJ2VviwKs7xVkRiZyIDaqDWxStLxCzyRfRN7CABFjOQo+WAr n3IQPXKU22SR6+Yz0YiYcKHjH6i/Bqsv97LDizDBce7RIHVtq+FEj7ARAd9T+/DuJblOzUSEQ+K prLlzek5Y1lXBzwewKZze7YDEMl5h3Rh3KJbLtXnZtj9iLAePBX+XN5Wg0ptnlkgWSIsfz1prpP q8TNG+ZnOOy5ClyTuBaUbXIEnBktnkhTEv X-Received: by 2002:a17:90b:4ac3:b0:2e2:e2f8:104 with SMTP id 98e67ed59e1d1-2e3152b0097mr10914108a91.8.1728945500146; Mon, 14 Oct 2024 15:38:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDO1KETIxD4UidhrvZQ8QdU07s8w0ufsRxasfglnBzAAnip4mwrEHqz/m8dA7tNdw0iIXzvA== X-Received: by 2002:a17:90b:4ac3:b0:2e2:e2f8:104 with SMTP id 98e67ed59e1d1-2e3152b0097mr10914081a91.8.1728945499642; Mon, 14 Oct 2024 15:38:19 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e392eff82dsm48354a91.26.2024.10.14.15.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 15:38:19 -0700 (PDT) Date: Tue, 15 Oct 2024 00:38:16 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v8 6/8] passt: rename tap_sock_init() to tap_backend_init() Message-ID: <20241015003816.4960314c@elisabeth> In-Reply-To: <20241010122903.1188992-7-lvivier@redhat.com> References: <20241010122903.1188992-1-lvivier@redhat.com> <20241010122903.1188992-7-lvivier@redhat.com> 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: 3NTTMIYVGNUSU22VIXNLBKR72CEIMHSE X-Message-ID-Hash: 3NTTMIYVGNUSU22VIXNLBKR72CEIMHSE 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 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, 10 Oct 2024 14:29:00 +0200 Laurent Vivier wrote: > Extract pool storage initialization loop to tap_sock_update_pool(), > extract QEMU hints to tap_backend_show_hints(). > > Signed-off-by: Laurent Vivier > --- > passt.c | 2 +- > tap.c | 56 +++++++++++++++++++++++++++++++++++++++++--------------- > tap.h | 2 +- > 3 files changed, 43 insertions(+), 17 deletions(-) > > diff --git a/passt.c b/passt.c > index ad6f0bc32df6..79093ee02d62 100644 > --- a/passt.c > +++ b/passt.c > @@ -261,7 +261,7 @@ int main(int argc, char **argv) > > pasta_netns_quit_init(&c); > > - tap_sock_init(&c); > + tap_backend_init(&c); > > secret_init(&c); > > diff --git a/tap.c b/tap.c > index c53a39b79e62..4b826fdf7adc 100644 > --- a/tap.c > +++ b/tap.c > @@ -1188,11 +1188,31 @@ int tap_sock_unix_open(char *sock_path) > return fd; > } > > +/** > + * tap_backend_show_hints() - Give help information to start QEMU > + * @c: Execution context > + */ > +static void tap_backend_show_hints(struct ctx *c) > +{ > + switch(c->mode) { Nit: switch (c->mode) { ... > + case MODE_PASTA: > + /* No hints */ > + break; > + case MODE_PASST: > + info("\nYou can now start qemu (>= 7.2, with commit 13c6be96618c):"); > + info(" kvm ... -device virtio-net-pci,netdev=s -netdev stream,id=s,server=off,addr.type=unix,addr.path=%s", > + c->sock_path); > + info("or qrap, for earlier qemu versions:"); > + info(" ./qrap 5 kvm ... -net socket,fd=5 -net nic,model=virtio"); > + break; > + } > +} The rest, up to this patch, looks good to me. I'm still reviewing 7/8. -- Stefano