From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 0D5B71B729 for ; Thu, 10 Jan 2019 18:35:02 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A937C21F48; Thu, 10 Jan 2019 12:35:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 10 Jan 2019 12:35:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=trRF8HmYSs3vOYoSnVkwCT7prycb8C3xXGWH7w5+x1M=; b=AqeYXJByMVjt vpk1H1GlHkwThazcTJjvAMtNFMqUrlqY9OdF2M0/uAie9WPA6iyrw+njkBZ3bGk6 eYh6BFAIogV1Kd3T4HftsW4lKmdNk9eIwdCBakpLtNWmwRcIFnVz/+fnjSps0nNb QvdWMcfHJ4M/13JW31/gyUna3YhJD2A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=trRF8HmYSs3vOYoSnVkwCT7prycb8C3xXGWH7w5+x 1M=; b=dFxFEAO2cvrdt5s5c/Z41c0U4JCOJ06B1SNOWRKg6zRB4rRTUnL4FP08Z 5efJaPLCBDhwA1PKDs30FkeUrYsO0ri5uWlTI+TiqXv28LruMaB4a5lE3+Ygt3vc VJZSZuRTsIqcM+7SLoMsqGckLIjBXcFmKHKagpEv3m6IPFZn2NuSisFcfs5dkm/u 8UPFLFMH7GvRqfZEVNI6Y61UbWkGsZJTopxHj8BK60WQN7iNk7Fu2Doqi+xvE/hj LHe2EluwplTOGl0gp2DuXbvaZTuCo4NILXxfqXdmI5ZA6HSnAeD0FweeIrcjui+O Ty+XkMKTX/4vByg3b1zfmVxdEuf8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrfeefgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 469A91026D; Thu, 10 Jan 2019 12:35:00 -0500 (EST) From: Thomas Monjalon To: Harry van Haaren Cc: dev@dpdk.org, reshma.pattan@intel.com, cristian.dumitrescu@intel.com, olivier.matz@6wind.com Date: Thu, 10 Jan 2019 18:34:58 +0100 Message-ID: <1558979.Xtpf54c0cE@xps> In-Reply-To: <20190110165051.4859-1-harry.van.haaren@intel.com> References: <20190110165051.4859-1-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mbuf: fix compile by making sched struct visible X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 17:35:02 -0000 10/01/2019 17:50, Harry van Haaren: > Although C compilation works with the struct rte_mbuf_sched > declared inside the struct rte_mbuf namespace, C++ fails to > compile. This fix moves the rte_mbuf_sched struct up to the > global namespace, instead of declaring it inside the struct > mbuf namespace. > > The struct rte_mbuf_sched is being used on the stack in > rte_mbuf_sched_get() and as a cast in _set(). For this > reason, it must be exposed as an available type. > > Fixes: 5d3f72100904 ("mbuf: implement generic format for sched field") > > Signed-off-by: Harry van Haaren > > --- > > Cc: reshma.pattan@intel.com > Cc: cristian.dumitrescu@intel.com > Cc: thomas@monjalon.net > > Hey folks, > > Currently the mbuf header will fail to compile with a C++ compiler, > this patch is one possible solution. I'm not particularly happy with > this as a fix as it reduces mbuf struct readability, however it does > resolve the issue. What are the other possible solutions?