From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7760BC433E0 for ; Wed, 10 Feb 2021 16:34:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED82064E85 for ; Wed, 10 Feb 2021 16:34:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED82064E85 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9sRH-0002xH-QA for qemu-devel@archiver.kernel.org; Wed, 10 Feb 2021 11:34:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9sPd-00024d-VX for qemu-devel@nongnu.org; Wed, 10 Feb 2021 11:32:22 -0500 Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]:39922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9sPb-0005sy-GN for qemu-devel@nongnu.org; Wed, 10 Feb 2021 11:32:21 -0500 Received: by mail-ua1-x933.google.com with SMTP id t15so752465ual.6 for ; Wed, 10 Feb 2021 08:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ustJfVgqY7lue6RljdneFzEloZ8soH27LZYP3UkSTuk=; b=tarxhW35xcbd62X58Scv9IzrFOYaKauutFf03quVa6C9VXxwk7WGncWkDOYVoqPxqp icq3EQUXUf3BlGFj1x2AFyqiG5mQPws4Y+7thgTs/bOZbkUf7UtPWYyabVOxfuHA10N1 EbkkqA/YylMCcelqD22V+cci1L2ZGB/ytLv2vWIaggXd+L6MXLMVFacGffNROkwiNEFY 102xCxdoyAtF66SZ3P3vM6Le2z12aylf/pGFJEqZruezITpX3YNzMGjPcvtacUcTTPsb AgWqP/VB/MY+eekcrzkMh+C8RK1vyXOEbxrA15JOD589/mIMutc3fc2HTkUFc21RFMOm m6DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ustJfVgqY7lue6RljdneFzEloZ8soH27LZYP3UkSTuk=; b=ZXNgRyiYaLKh+A3KqyISKUQ1JxIWozXl3GaLK/5Kg4Wo/ul6OymvUG8xSYFk7IwGCB SYdkLGrYIJNBC0QROCRy1DxRk8tH/lX2Q0T3bCE1nj+GpTMEhGBjKOvr29mTZckgGDjG yY6ss627NR2KcjVEqKoETjBR6hnCNqskBombKAUFn6XpqL/Gleb9VsPm+Qf4gpKQb9+p wXAY+DuI8VwMTOBMJ9+qjlr1+SZcT7THal2hHE9IancqMcgLG7a6o+B+TwoqMbUMYBcb d2btZy2ykweg+P9Raf1NWGV1VDYjj1H9NVtK34iDhwkMF8aLhrLI+ZV5/TynoJarsz4r dK6Q== X-Gm-Message-State: AOAM532OJMYWa+oAxJWJzyexW72N6d1aJura22dP6KO0cqnYUDnX88TO rCqXde2vzKFemjKcCSxSCcPbBgyfch1eY0QksNdddw== X-Google-Smtp-Source: ABdhPJxts3VvnlCQgfon2rGwh38k719EZWgQ6kagbhayWreOJLOSAgKCsQu5ieG6lsorFjqClVtu2UTgh35Ji8ZQouM= X-Received: by 2002:ab0:6f0d:: with SMTP id r13mr2405313uah.8.1612974738093; Wed, 10 Feb 2021 08:32:18 -0800 (PST) MIME-Version: 1.0 References: <20210203233539.1990032-1-dje@google.com> <20210204100349.GF549438@redhat.com> <20210210093102.GB1240644@redhat.com> In-Reply-To: <20210210093102.GB1240644@redhat.com> From: Doug Evans Date: Wed, 10 Feb 2021 08:31:40 -0800 Message-ID: Subject: Re: [PATCH v3 0/3] To: =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= Cc: QEMU Developers , Samuel Thibault Content-Type: multipart/alternative; boundary="0000000000004c616e05bafdf237" Received-SPF: pass client-ip=2607:f8b0:4864:20::933; envelope-from=dje@google.com; helo=mail-ua1-x933.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000004c616e05bafdf237 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 10, 2021 at 1:31 AM Daniel P. Berrang=C3=A9 wrote: > On Tue, Feb 09, 2021 at 06:16:57PM -0800, Doug Evans wrote: > > On Thu, Feb 4, 2021 at 10:25 AM Doug Evans wrote: > > > > > On Thu, Feb 4, 2021 at 2:03 AM Daniel P. Berrang=C3=A9 > > > > wrote: > > > > > >> On Wed, Feb 03, 2021 at 03:35:36PM -0800, dje--- via wrote: > > >> > Add support for ipv6 host forwarding > > >> > > > >> > This patchset takes the original patch from Maxim, > > >> > https://www.mail-archive.com/qemu-devel@nongnu.org/msg569573.html > > >> > and updates it. > > >> > > > >> > New option: -ipv6-hostfwd > > >> > > > >> > New commands: ipv6_hostfwd_add, ipv6_hostfwd_remove > > >> > > > >> > These are the ipv6 equivalents of their ipv4 counterparts. > > >> > > >> Before I noticed this v3, I send a reply to your v2 sugesting > > >> that we don't need to add any new commands/options. We can > > >> use existing inet_parse() helper function to parse the address > > >> info and transparently support IPv4/6 in the existing commands > > >> and options. This matches normal practice elsewhere in QEMU > > >> for IP dual stack. > > >> > > > > > > I'm all for this, fwiw. > > > > > > > > > I should say I'm all for not adding new commands/options. > > Looking at inet_parse() it cannot be used as-is. > > The question then becomes: Will refactoring it buy enough? > > What's the problem your hitting with inet_parse ? > First, this is the inet_parse() function we're talking about, right? int inet_parse(InetSocketAddress *addr, const char *str, Error **errp) https://gitlab.com/qemu-project/qemu/-/blob/master/util/qemu-sockets.c#L618 --0000000000004c616e05bafdf237 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Feb 10, 2021 at 1:31 AM Daniel P. Berrang=C3=A9 <<= a href=3D"mailto:berrange@redhat.com">berrange@redhat.com> wrote:
On Tue, Feb 09, 2021 at 06:16:57PM -0800, Doug Evans wrote:<= br> > On Thu, Feb 4, 2021 at 10:25 AM Doug Evans <dje@google.com> wrote:
>
> > On Thu, Feb 4, 2021 at 2:03 AM Daniel P. Berrang=C3=A9 <berrange@redhat.com&= gt;
> > wrote:
> >
> >> On Wed, Feb 03, 2021 at 03:35:36PM -0800, dje--- via wrote: > >> > Add support for ipv6 host forwarding
> >> >
> >> > This patchset takes the original patch from Maxim,
> >> > https://www.mail= -archive.com/qemu-devel@nongnu.org/msg569573.html
> >> > and updates it.
> >> >
> >> > New option: -ipv6-hostfwd
> >> >
> >> > New commands: ipv6_hostfwd_add, ipv6_hostfwd_remove
> >> >
> >> > These are the ipv6 equivalents of their ipv4 counterpart= s.
> >>
> >> Before I noticed this v3, I send a reply to your v2 sugesting=
> >> that we don't need to add any new commands/options. We ca= n
> >> use existing inet_parse() helper function to parse the addres= s
> >> info and transparently support IPv4/6 in the existing command= s
> >> and options. This matches normal practice elsewhere in QEMU > >> for IP dual stack.
> >>
> >
> > I'm all for this, fwiw.
> >
>
>
> I should say I'm all for not adding new commands/options.
> Looking at inet_parse() it cannot be used as-is.
> The question then becomes: Will refactoring it buy enough?

What's the problem your hitting with inet_parse ?
=

First, this is the inet_parse() funct= ion we're talking about, right?
int i= net_parse(InetSocketAddress *addr, const char *str, Error **errp)
=

--0000000000004c616e05bafdf237--