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 9191C5A0274 for ; Mon, 12 Feb 2024 00:19:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707693539; 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=uEgw92cL9IoP7vhUjU65zut6pLjA3P3svjt247wbVn4=; b=e/bYCZQE1ZyKR+r9e7stQH7WNnZ0/5Jrx8DcLcy7IeYt5GCgjBXhsrBRrT34D8Jf48oTgB fJRToGZmebjB5bfibzKjEq2bu1RqEmaF9kSJ7PgOwFqToOcXeE0TX174y6UPYFlLeD/EOB OKz53z2KIqlDKukcOMB6ldrMnMYznQs= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-231-hZntMqRxNHmMsgUAoK_5Ww-1; Sun, 11 Feb 2024 18:18:57 -0500 X-MC-Unique: hZntMqRxNHmMsgUAoK_5Ww-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a3be1158916so90214466b.1 for ; Sun, 11 Feb 2024 15:18:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707693536; x=1708298336; 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=uEgw92cL9IoP7vhUjU65zut6pLjA3P3svjt247wbVn4=; b=ip7+vhJQLbZT3PGcrk42My9B16r24MOdVLbEuHrjGDvE4l6tQQfx/ymjOf0z3WgJGp jX/kcPJnA1gp01py7j1oNFDEQsuQ24OLltczKlNWrKbXGcMSes9o/d42XMeCYUNAvynp nwqZaRoYUBE8Lb5uTDKkUsQXvCILcTQyOwlKbw8kowCJFg6gszUZAabxUvxWsbMsmxcm bmm5FK59xwxvkD83GKeOnOJ87EfqqS2Z4zS2VPqRTWxsg6wYkv1SCUF0M4VEagbsJ/l6 4Bap0k0j44HP2DGGCHXlKGcnp2Jr5bApLlCSNDx4YxnIh//HwhlkVh29n4jtwtFfMxYK Gazw== X-Gm-Message-State: AOJu0Yw3sdp+dBC1XSVkyR++fRAqvJJKPswcmZFq2s7jO5WZFAPH7ayC K0WOFABNzIOVYyYsCl3qSGvrftr3iDYdnaAceBaKOcQPFsxKpOp8eKW8uSjaM2FnQkefVU4oJnX pzGeWowEDBmNqZRr5a/gZm+2ONYp0VTI7fTWxduONRgNiwzThrA== X-Received: by 2002:a17:906:684a:b0:a3c:9470:2a25 with SMTP id a10-20020a170906684a00b00a3c94702a25mr1109536ejs.14.1707693536776; Sun, 11 Feb 2024 15:18:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjms5siO0P5hjgCXgyx9Ge5YpCkRygzcd+QQRpRZq8bZmgMWmlqexCngYllwaLRyeyKA3y/w== X-Received: by 2002:a17:906:684a:b0:a3c:9470:2a25 with SMTP id a10-20020a170906684a00b00a3c94702a25mr1109529ejs.14.1707693536534; Sun, 11 Feb 2024 15:18:56 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVeIDzLYaB9jeJd7U7Zpk5gEIX9LzI54hiVpZNF0CSahjxgJ1lOqNTEB/Q7rbAzP14ppMJpYxhSNuv8fbYAR8DigrCy Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id re9-20020a170906d8c900b00a386a32a9d9sm3276340ejb.194.2024.02.11.15.18.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2024 15:18:55 -0800 (PST) Date: Mon, 12 Feb 2024 00:18:22 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 18/24] vhost-user: introduce virtio API Message-ID: <20240212001822.218862ff@elisabeth> In-Reply-To: References: <20240202141151.3762941-1-lvivier@redhat.com> <20240202141151.3762941-19-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.1.1 (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: DFNRIHAPXTOV7PW3FOPBGMQY2T32VVNY X-Message-ID-Hash: DFNRIHAPXTOV7PW3FOPBGMQY2T32VVNY 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: Laurent Vivier , 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 Tue, 6 Feb 2024 14:51:31 +1100 David Gibson wrote: > On Fri, Feb 02, 2024 at 03:11:45PM +0100, Laurent Vivier wrote: > > Add virtio.c and virtio.h that define the functions needed > > to manage virtqueues. > > > > Signed-off-by: Laurent Vivier > > When importing a batch of code from outside, I think we need to choose > between one of two extremes: > > 1) Treat this as a "vendored" dependency. Keep the imported code > byte-for-byte identical to the original source, and possibly have > some integration glue in different files > > 2) Fully assimilate: treat this as our own code, inspired by the > original source. Rewrite as much as we need to match our own > conventions. > > Currently, this is somewhere in between: we have some changes for the > passt tree (e.g. tab indents), but other things retain qemu style > (e.g. CamelCase, typedefs, and braces around single line clauses). I'd rather pick 2) if possible, in the hope that we can cut down on lines of code, but I haven't really checked how much we use of this. -- Stefano