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 D8CE5A0C41; Fri, 16 Apr 2021 09:23:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60CCB141AE9; Fri, 16 Apr 2021 09:23:03 +0200 (CEST) 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 AC383141A95 for ; Fri, 16 Apr 2021 09:23:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618557780; 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=alWpr5DzAGH+V/tHDIlHvWkwmjnb2Rhs1O6iW2KTR/M=; b=exPKrqih+5fPfH2AV6Mi27sPfZNryMcp5OPm2CVp1dfht1A2ISc+P7C9tMQfVAZKjUA3mk uU0ayPOJLeX80HJuYN127XEIZymeBcoIVrDqc3D9xPfpGDzvoumOX0VBGw45zxrC4vg0q6 8D4H8Jfs6UhejPyTR37JnzI6xma48yQ= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-177-kwqd6e4CMYmH7LGPQr3uFw-1; Fri, 16 Apr 2021 03:22:57 -0400 X-MC-Unique: kwqd6e4CMYmH7LGPQr3uFw-1 Received: by mail-ua1-f71.google.com with SMTP id t21-20020ab027950000b02901e849561482so1703340uap.18 for ; Fri, 16 Apr 2021 00:22:57 -0700 (PDT) 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=alWpr5DzAGH+V/tHDIlHvWkwmjnb2Rhs1O6iW2KTR/M=; b=uiNbfuZqT0q7yBOjDzu+Q7aU6zKUo7JLYrbPTf6KzVJkyIU/Y1mLkyYhHyXK+hJzRh hihFS6I5H+ONuHVXmKI0MDDscq2ncRQrB0cRvtNXPe9krWJZLYvxoGlDJAmNa5OqgVL/ 8lDfgFw7rVuTNEfXfO+uHNua+VgpDKZ6pd6kme5BxbcNYjvhEJfeQcFml03MUc/gHWqg NwAntP/Mih33WELTOuc1f2tgrcxzTWYqk13rx4muIcn1rm5HkSCHD04LUhuf9ftwe+qo OMkNadP5UPMFcK0W+M2KsGQ8alHJl1R5+zPmUMJYri/uys/ebS3LrMdA5fIRrzZrg3oK GHVw== X-Gm-Message-State: AOAM5339itQPG58lbnWWZai1nXdgaB1sgwcZoJ9rhCgqD4xaDX8G72AJ MLF/fPoavdrLwr/zPQsrsbyoWwAZ1eo/wrt3zitc7Jf2M+3+HUTqMkkZEGlaZiyZbraT5qpJEeS FMrRC1fDmkzS9NPu/vVU= X-Received: by 2002:a67:87c1:: with SMTP id j184mr5463071vsd.18.1618557776869; Fri, 16 Apr 2021 00:22:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywhmTH6V0xcdquzbXksW7W8PGW14L215JZZ0p56vRGTlX7qhf4V8Hi+QtsbBgSyr5cF5uTMwRWSNCe8PlaYZs= X-Received: by 2002:a67:87c1:: with SMTP id j184mr5463055vsd.18.1618557776676; Fri, 16 Apr 2021 00:22:56 -0700 (PDT) MIME-Version: 1.0 References: <20210414174338.657891-1-thomas@monjalon.net> In-Reply-To: <20210414174338.657891-1-thomas@monjalon.net> From: David Marchand Date: Fri, 16 Apr 2021 09:22:45 +0200 Message-ID: To: Thomas Monjalon Cc: dev , Hemant Agrawal , Sachin Saxena , Rosen Xu , Stephen Hemminger , Long Li , Jay Zhou , Gaetan Rivet , Matan Azrad , Shahaf Shuler , Tianfei zhang , Radha Mohan Chintakuntla , Veerasenareddy Burru , Anatoly Burakov , Nicolas Chautru , Ferruh Yigit , Andrew Rybchenko , Maxime Coquelin , Chenbo Xia 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] eal: remove useless bus API includes 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 Wed, Apr 14, 2021 at 7:45 PM Thomas Monjalon wrote: > > The file rte_bus.h was included in too many files. > > The enum rte_iova_mode is moved from rte_bus.h to rte_eal.h > because it is not specific to the bus layer. > It allows to clean-up more includes of rte_bus.h. > > Some indirect includes had to be added in few files to compensate. mingw compilation is broken. windows/eal.c needs rte_bus.h. > diff --git a/lib/librte_eal/include/rte_bus.h b/lib/librte_eal/include/rte_bus.h > index ebacc7adc3..f59a025955 100644 > --- a/lib/librte_eal/include/rte_bus.h > +++ b/lib/librte_eal/include/rte_bus.h > @@ -28,20 +28,6 @@ extern "C" { > TAILQ_HEAD(rte_bus_list, rte_bus); > > > -/** > - * IOVA mapping mode. > - * > - * IOVA mapping mode is iommu programming mode of a device. > - * That device (for example: IOMMU backed DMA device) based > - * on rte_iova_mode will generate physical or virtual address. > - * > - */ > -enum rte_iova_mode { > - RTE_IOVA_DC = 0, /* Don't care mode */ > - RTE_IOVA_PA = (1 << 0), /* DMA using physical address */ > - RTE_IOVA_VA = (1 << 1) /* DMA using virtual address */ > -}; > - Since you move rte_iova_mode to eal.h, but rte_bus.h still uses this enum, I would expect a #include earlier in this same file. check_includes does not catch this, so there is a path that leads to rte_eal.h inclusion, but I prefer an explicit include. > /** > * Bus specific scan for devices attached on the bus. > * For each bus object, the scan would be responsible for finding devices and -- David Marchand