From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 76874C41A for ; Mon, 11 May 2015 15:35:39 +0200 (CEST) Received: by wgbhc8 with SMTP id hc8so28140924wgb.2 for ; Mon, 11 May 2015 06:35:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=VaY030xs2M/DpD3Behy9QvXLGG0BCQSmii0GwVyI9/s=; b=GUAZHDHkWn6gAqz4CMswoHvVpSn6rdjiiYuwLbKU/KWQKDW2/31ezVAHVfxraPOqxU 7zMoPjyw+DE7RoAORvP1fvwUA0JbG1Y588d4bwayq6hfhShpugwtxaja5NDh6/YqY+yt pigPUil3SvgXG10+kgCpMxIcUyDAmfimmmGfNx9RqPplOFnRQ3wcfZdaPuXFJqvhi9G0 zTvZpG9TGyP9cdV13St4nt4c9L4JNbysr8dRv4fv3+1lqkjk+JolIamG4bxLiVwMnbyY ToZKDb2Njiq3iGyaT9qqOQT4I+IbMLVtM/5G7DeCcMj4qyPsEBEHRMY10fgKHi19IJ/g xQtg== X-Gm-Message-State: ALoCoQla2aF6Lfx2swzW7/Z5cg12+Jc2S578/W88AwBxkss1fKpVyxrqelTHsPmFW1M9EWLkUOTv X-Received: by 10.194.133.133 with SMTP id pc5mr19834818wjb.31.1431351339286; Mon, 11 May 2015 06:35:39 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id y7sm22903252wjw.16.2015.05.11.06.35.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2015 06:35:38 -0700 (PDT) From: Thomas Monjalon To: Bruce Richardson Date: Mon, 11 May 2015 15:34:57 +0200 Message-ID: <7341132.VBipIkNxS3@xps13> Organization: 6WIND User-Agent: KMail/4.14.7 (Linux/4.0.1-1-ARCH; KDE/4.14.7; x86_64; ; ) In-Reply-To: <55472B4F.8080507@6wind.com> References: <1429794237-9498-1-git-send-email-bruce.richardson@intel.com> <55472B4F.8080507@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC PATCH 0/8] reduce header dependency on rte_mbuf.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 13:35:39 -0000 > > A large number of our header files and libraries are dependent on one another, > > which can lead to problems with circular dependencies if trying to tie some of > > those libraries together, e.g. when prototyping with pktdev, or other schemes > > to get a common API for ethdev/rings/KNI. :-) > > > > One small way to reduce issues when doing this is to eliminate #includes when > > they are not needed. While most includes in our headers are necessary, one > > common pattern seen is where a library just takes mbufs as part of it's API, > > but does not de-reference those in the header file. In cases like this, it's > > not necessary to include the whole mbuf header file just to allow pointers to > > mbuf structures - a forward declaration of "struct rte_mbuf" will do. > > Including the mbuf header file, also triggers inclusion of the mempool headers > > which causes the inclusion of the ring headers amongst others. > > > > Therefore, I propose changing the header files for our libraries to just use > > the forward declaration instead of the full header inclusion where possible. > > Series > Acked-by: Olivier Matz Applied, thanks