From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B6C2A0A02; Thu, 14 Jan 2021 15:40:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E47281412DA; Thu, 14 Jan 2021 15:40:42 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 431F51412D6 for ; Thu, 14 Jan 2021 15:40:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610635240; 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: in-reply-to:in-reply-to:references:references; bh=j6V9znePDV/8CplaeasZiTVl4DUDP3e1AUXW9ZGqJXg=; b=A5MMJyH/G6xJbxEZRA9QUGkW4YWWtsLK23rzfppkOp3xvuNx/T8tRI5Sj7WXcnO0h/9oTr RdzHj65hjqcxYOfh0gtXWfM+/zg1SlXjNJFwG+XY8CAvfSNU1jnLXUh60Jo+ETlYcL4vY3 3QTT4YmbsSq6KM+61uceACvDcNnFu2Q= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-y0B5xIhINqqN5RsR9FkMkg-1; Thu, 14 Jan 2021 09:40:38 -0500 X-MC-Unique: y0B5xIhINqqN5RsR9FkMkg-1 Received: by mail-vs1-f71.google.com with SMTP id g12so844798vsm.5 for ; Thu, 14 Jan 2021 06:40:38 -0800 (PST) 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=j6V9znePDV/8CplaeasZiTVl4DUDP3e1AUXW9ZGqJXg=; b=YbtmvU81wC1Fav0RepCMoI9DHTFpscLm3YKaCpjnKkKmJ6/w/VNGkEuNiYSr7czT+7 NgxfkcmacrindXTSKvEfuOGHNP0Iuu8yM1o3jvb06hBy4P1uGmvSpolnhthKaumhMC/8 DwLT85Dr9PYOtr6m36qU7DLiae0GZAj2oSq3wQYmZekwKkudSGaLyclEt5kcwdB4tH/Q jhPIJ74S4wfeJey0I9SymL8wXXSr+apg/w2kGC+z+xEyemLSFEubOlpdX3+RJ30D9jUW ige2RlYrVBHEM6935pgCkOo/5jFZiBWXz1DJ2ShfcHYDlHhW/XNxQViaJm04iAnOlFOI JpPA== X-Gm-Message-State: AOAM532JUqx4EcfJztQ0TGiY87XpJbzvainVfhg8lEDUiZ0QqBecA5xC ExHI9ENkvia+xoqoVwzVikj6tkqaXOWtv1YsTWKs1OQ1tdEFqCzRa5G72nRHtlLoEizVkf7HaCB YjAkS48cxhkdp74oh4nk= X-Received: by 2002:a67:87d1:: with SMTP id j200mr7082838vsd.10.1610635238440; Thu, 14 Jan 2021 06:40:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsxR+4yX8REePCYwiaxmvn65htzYq2jty+yvax7+N5CM+qVQLO+GsZs4LBEmAQopFl0MP7D3+C0waFoKZlyfo= X-Received: by 2002:a67:87d1:: with SMTP id j200mr7082813vsd.10.1610635238238; Thu, 14 Jan 2021 06:40:38 -0800 (PST) MIME-Version: 1.0 References: <20201220211405.313012-1-maxime.coquelin@redhat.com> <20201220211405.313012-5-maxime.coquelin@redhat.com> <7a809069-16a3-9c48-0d09-3ba4c8227f48@redhat.com> In-Reply-To: <7a809069-16a3-9c48-0d09-3ba4c8227f48@redhat.com> From: David Marchand Date: Thu, 14 Jan 2021 15:40:26 +0100 Message-ID: To: Maxime Coquelin Cc: dev , "Xia, Chenbo" , Olivier Matz , Adrian Moreno Zapata Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 04/40] net/virtio: introduce PCI device metadata X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Jan 14, 2021 at 12:05 PM Maxime Coquelin wrote: > On 1/5/21 10:16 PM, David Marchand wrote: > > On Sun, Dec 20, 2020 at 10:14 PM Maxime Coquelin > > wrote: > >> > >> This patch initiate refactoring of Virtio PCI, by introducing > >> a new device structure for PCI-specific metadata. > > > > This works, but this patch seems artificial. > > > > The eth_virtio_dev_init expects dev->data->dev_private to be a virtio_hw object. > > You can introduce this later in the series when really needed. > > > > > I propose to squash it into patch 5, which moves PCI specific init to a > dedicated file. > > Is that OK for you? Or leave this commit like this but add a check on the virtio_hw field being the first field of the bus specific objects. Something like: RTE_BUILD_BUG_ON(offsetof(struct virtio_pci_dev, hw) != 0); + the same with virtio_user in the relevant patch. -- David Marchand