From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mta-us-central-02.viasat.com (mta-us-central-02.viasat.com [8.37.103.59]) by dpdk.org (Postfix) with ESMTP id 36AB7201 for ; Tue, 13 Nov 2018 23:08:53 +0100 (CET) Received: from pps.filterd (wdc1mta01.viasat.com [127.0.0.1]) by wdc1mta01.viasat.com (8.16.0.22/8.16.0.22) with SMTP id wADM1JE7014925; Tue, 13 Nov 2018 22:08:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=viasat.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=fqswADf0Qc1ryxLzS/37FArinBSayNHXm9ZxetueejA=; b=0TP/lMwpoSwkY0ESxXHgl3AOzeajvffv+SP7dQWTIE+0mUdbH94KTabV+EBl2cUG5Y75 UO0Ep+UTr6wzvrKIw31zfH6aE6MJvFy33lj8lRUH6o7WwmuLQaQ/J23ggp5s4uVj0+F2 CmmMuH3esnbr4zUgU9IZCoawIvC3KQ38tZ6qvI+Ytl51jPP8GOTFwXiIJ2cI8c6huWH1 RQjkkfNljZaW/Kq4nDkMA0K+qLfZOqsUDOUpUz7Sv+UxGJr0snpVTqP0Ik9vGFuTXA0G +mudM+6pJgefmMBJ26YtUogFVMWgcfHxqGbucANsSS1gzOT74d991Iwv/vO47CxOd6dL nA== From: "Burdick, Cliff" To: Thomas Monjalon CC: "Burakov, Anatoly" , "dev@dpdk.org" , "bruce.richardson@intel.com" Thread-Topic: [dpdk-dev] [PATCH 1/1] eal: Don't fail secondary if primary is missing tailqs Thread-Index: AdR632/vnvJ3U124TOeqdBTRFJxhhAAjX12AAACgVoAAAhyMkAALanuAAA4AxoD//5prAIAAGvTA Date: Tue, 13 Nov 2018 22:08:52 +0000 Message-ID: <03A7D9A58FAFB54FBB01FEE199D7308A0134B8F4C4@wdc1exchmbxp02.hq.corp.viasat.com> References: <03A7D9A58FAFB54FBB01FEE199D7308A0134B8EE1F@wdc1exchmbxp02.hq.corp.viasat.com> <7642123.6x7mORRspS@xps> <03A7D9A58FAFB54FBB01FEE199D7308A0134B8F23C@wdc1exchmbxp02.hq.corp.viasat.com> <2172258.pSIRIAPMh3@xps> In-Reply-To: <2172258.pSIRIAPMh3@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-13_15:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130197 Subject: Re: [dpdk-dev] [PATCH 1/1] eal: Don't fail secondary if primary is missing tailqs 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: Tue, 13 Nov 2018 22:08:54 -0000 -----Original Message----- From: Thomas Monjalon [mailto:thomas@monjalon.net]=20 Sent: Tuesday, November 13, 2018 8:44 AM To: Burdick, Cliff Cc: Burakov, Anatoly; dev@dpdk.org; bruce.richardson@intel.com Subject: Re: [dpdk-dev] [PATCH 1/1] eal: Don't fail secondary if primary is= missing tailqs 13/11/2018 17:38, Burdick, Cliff: >=20 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Tuesday, November 13, 2018 8:07 AM > To: Burdick, Cliff > Cc: Burakov, Anatoly; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/1] eal: Don't fail secondary if=20 > primary is missing tailqs >=20 > 13/11/2018 16:45, Burdick, Cliff: > > From: Burakov, Anatoly [mailto:anatoly.burakov@intel.com] > > > On 13-Nov-18 9:21 AM, Thomas Monjalon wrote: > > > > 13/11/2018 00:33, Burdick, Cliff: > > > >> This patch was submitted by Jean Tourrilhes over two years ago,=20 > > > >> but didn't receive any responses. I hit the same issue recently=20 > > > >> when trying to use cgo (Golang) as a primary process linked to=20 > > > >> libdpdk.a against a C++ application linked against the same=20 > > > >> library.> > > > > > >=20 > > > > The question is to know why you don't have the same constructors=20 > > > > in primary and seconday? > > >=20 > > > I've hit similar things in the past. I believe it was caused by our b= uild system stripping out unused libraries (such as rte_hash) from the bina= ry and thus not calling the constructor in the primary, but doing so in the= secondary (or something to that effect). > > > In any case, this is caused by linking different number of libraries = to primary and secondary, and should probably be fixed in the build system,= not in the tailqs code (unless we specifically support having different li= nked libraries to primary and secondary?). > >=20 > > Right, I think the original author of the patch stated the reasons in t= he link I provided. The build system seems like the most appropriate place = to fix it, but the patch got me going quickly. I think the question is whet= her you want DPDK to support these other ways of linking. I'm certainly not= the first to use cgo, since there's a virtual switch project doing the sam= e: > >=20 > > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_lago > > pu=20 > > s_vsw&d=3DDwICAg&c=3Djcv3orpCsv7C4ly8-ubDoUfrxF5xIGWmptxGWP5vi5w&r=3Dm1= RLQ > > OG=20 > > Okz9MauvVLZmiGtyWc5mA7DejbPFNE1IDj-4&m=3DhQqVCNwW7eoEzB_hLFK97i8idS8FI > > qX oPeclwsIZq7Y&s=3DBMoBlwkqljwWIBY3SE3pPMCfVnOUlDuZLrno4-SojKM&e=3D > >=20 > > They don't use primary/secondary processes, though, so the issue is nev= er hit. I'm in a situation where using cgo seemed like the easiest path to = accomplish what I'm doing since I needed specialized libraries for it that = were not available in C/C++. At some point I bet someone would use Cython t= o start linking against DPDK as well, and we'd likely run into the same iss= ue. >=20 > >For sure, we want to support using DPDK with cgo or cython. > >But it is not clear what is the relation with not having the same compil= ation for primary and secondary. Please could you elaborate? >=20 > Hi Thomas, I think Jean explained it well here:=20 > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__dev.dpdk.narkive. > com_ZM3a7QD1_dpdk-2Ddev-2Dbug-2Dstatic-2Dconstructors-2Dconsidered-2De > vil&d=3DDwICAg&c=3Djcv3orpCsv7C4ly8-ubDoUfrxF5xIGWmptxGWP5vi5w&r=3Dm1RLQO= GOk > z9MauvVLZmiGtyWc5mA7DejbPFNE1IDj-4&m=3DC69wDgrjDX8_oXp1M_3bnmWOOZdGqwBBG > 9vzkyGDWGQ&s=3DYYn2N7WrzJpH1ptNrLZad0nPAQdrUyqBckk2uFuWYPQ&e=3D >=20 > "The build system of the application does not have all the subtelties=20 > of the DPDK build system, and ends up including *all* the=20 > constructors, wether they are used or not in the code. Moreover, they=20 > are included in a different order. Actually, by default the builds=20 > include no constructors at all (which is a big fail), so the library=20 > needs to be included with --whole-archive (see Snort DPDK=20 > instructions)." >=20 > I will get to the bottom of my exact case to understand what's happening,= but my primary application is a cgo application that I'm linking to by usi= ng almost exactly the same flags that are used in the DPDK build system to = build examples. The DPDK libraries I'm linking against is a single location= for both primary and secondary; in other words, I don't build DPDK twice.= =20 > OK I understand, thanks. > You had alluded to a pkg-config for DPDK in the 2015 thread, which cgo ca= n use, but I don't know if that ever was implemented. Cgo can use pkg-confi= g if it's available, otherwise the only tools are specifying LDFLAGS and CF= LAGS into their build system. >Yes, the right answer is still pkg-config :) The good news is that it is n= ow implemented thanks to the meson build system: > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__git.dpdk.org_dpdk_t= ree_doc_build-2Dsdk-2Dmeson.txt-23n182&d=3DDwICAg&c=3Djcv3orpCsv7C4ly8-ubDo= UfrxF5xIGWmptxGWP5vi5w&r=3Dm1RLQOGOkz9MauvVLZmiGtyWc5mA7DejbPFNE1IDj->4&m= =3DC69wDgrjDX8_oXp1M_3bnmWOOZdGqwBBG9vzkyGDWGQ&s=3DoC86KD_RJ1T6rfzi3x5zFT1R= i13ELpKmsyFqpgDbgFg&e=3D Hi Thomas, are there instructions on how to use pkg-config to build the mlx= 4/5 PMD? I noticed a patch was submitted in September to add support for it= , but that link you provided on using meson doesn't say how to build specif= ic drivers. It appears to be disabled by default.