From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00047.outbound.protection.outlook.com [40.107.0.47]) by dpdk.org (Postfix) with ESMTP id 880912C2B for ; Thu, 29 Mar 2018 20:12:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+pI4Od4s1HF2oMjB5RwBfDbdV2YacfZ+BQZzlZ+Eu9E=; b=o64ID3/QfB25FC73G/pDrXoHIS5rG1pXST3ujEe3/Hum1wo5ZV9q1xryXgnmSNJjdujhZp+ZtKXISGYwG6CH7zPTs4cQNc6kUL6qWB2IwZu7gMAAvd8u7Qplth611N2UVd4kXfY4GSRSWNuXauKKO1Y3pB7S1hilHqXVehxPejY= Received: from AM2PR04MB0753.eurprd04.prod.outlook.com (10.160.56.141) by AM2PR04MB0963.eurprd04.prod.outlook.com (10.161.71.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.10; Thu, 29 Mar 2018 18:12:30 +0000 Received: from AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::39b9:124d:74b2:5d6]) by AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::39b9:124d:74b2:5d6%6]) with mapi id 15.20.0609.012; Thu, 29 Mar 2018 18:12:29 +0000 From: Hemant Agrawal To: Thomas Monjalon , Ferruh Yigit CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] mk: fix kernel modules build dependency Thread-Index: AQHTx3Q1iTzlII1ESEaJpXoEmOaf4aPnW8sAgAAMXgCAAAGjgIAAAWOAgAACEYCAAALzAIAAE6lw Date: Thu, 29 Mar 2018 18:12:29 +0000 Message-ID: References: <20180329153931.26351-1-thomas@monjalon.net> <2419180.MvykWTCLKm@xps> <0a59c197-0331-a122-f997-b8a77b39e01b@intel.com> <1680117.05lWP9jXLg@xps> In-Reply-To: <1680117.05lWP9jXLg@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-originating-ip: [182.69.144.222] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM2PR04MB0963; 7:CdvRqgEroNfQQ4ZWwtVeNxoXgOikuP3kpFLGn1wQAQ3MZIPYIN/wBQNgxmSKaXO7sLLKtluj8CLrfMqDKXweuweZ8f7QncdULtAZfUctOFVI1XRpj8sjaXtVfygeQdS2v3DI62dbeIaVMZklEUyVSjhRvWaU+RKZ+F72DmavGwHvTY6xYUjiolYzRhJHyJ2OGBiat+MhpBvciXmuDb1lAjmo0ByXFJ/ui6CdpzYpNCUVlHnPiyB/Fk6wYyfuqK/I x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 96e79df8-faba-4689-aa6a-08d595a0a2a4 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0963; x-ms-traffictypediagnostic: AM2PR04MB0963: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM2PR04MB0963; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0963; x-forefront-prvs: 0626C21B10 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(39380400002)(376002)(346002)(189003)(199004)(13464003)(14454004)(110136005)(229853002)(25786009)(4326008)(316002)(478600001)(2906002)(33656002)(8936002)(5660300001)(9686003)(66066001)(53936002)(81166006)(55016002)(81156014)(8676002)(6436002)(97736004)(2900100001)(105586002)(7736002)(305945005)(74316002)(3280700002)(3660700001)(7696005)(476003)(186003)(26005)(6246003)(53546011)(6506007)(76176011)(486005)(106356001)(102836004)(99286004)(93886005)(486005)(11346002)(68736007)(86362001)(6116002)(3846002)(446003)(5250100002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0963; H:AM2PR04MB0753.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 4Z3jrcG88EGKkeqJ6TvdgAKVtglVeE/JYVuxvIFP1AWMThC2ujLpWd+q5ihEY1BTZzdIwCQXvBijuGB8ROFE4oVM+25Q7eiON4/0sSR/5u0g18oiVsQhr3tohbfcrGdrwHcZKciewbLI6CS0QLE/r2UDLWddWE04x51PZUNKojGAmwbQQImhHhbOjkDPOzVWrZPWslknZKY+00b5QtL8eMsmAfUp0w6VyjFOu+lfTgoAB85GVeboFuWSefpWbsIuAbXqbji5XYdZu2Jyz8xkT4Ky5VHy3+Ns3LaDO9FgS2n8y3WptYBvWsKzCEs0fg2gS6/VBR6nPs5/FeRSQnb56g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96e79df8-faba-4689-aa6a-08d595a0a2a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2018 18:12:29.7368 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0963 Subject: Re: [dpdk-dev] [PATCH] mk: fix kernel modules build dependency 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, 29 Mar 2018 18:12:32 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Thursday, March 29, 2018 10:31 PM > To: Ferruh Yigit > Cc: Hemant Agrawal ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] mk: fix kernel modules build dependency > Importance: High >=20 > 29/03/2018 18:50, Ferruh Yigit: > > On 3/29/2018 5:43 PM, Thomas Monjalon wrote: > > > 29/03/2018 18:38, Ferruh Yigit: > > >> On 3/29/2018 5:32 PM, Thomas Monjalon wrote: > > >>> 29/03/2018 17:48, Ferruh Yigit: > > >>>> On 3/29/2018 4:39 PM, Thomas Monjalon wrote: > > >>>>> Some kernel modules may need some header files to be "installed" > > >>>>> in the build directory. > > >>>>> > > >>>>> When running multiple threads of make, kernel modules can try to > > >>>>> be compiled before the lib headers are ready: > > >>>>> make -j3 > > >>>>> kernel/linux/kni/kni_misc.c:19:37: fatal error: > > >>>>> exec-env/rte_kni_common.h: No such file or directory > > >>>> > > >>>> Is there a reason to keep header in eal when module itself moved i= nto > kernel? > > >>> > > >>> It seems you missed my comment below: > > >>> > > >>> On a related note, this header file > > >>> > > >>> lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h > > >>> could be moved to lib/librte_kni/ > > >>> Opinion? > > >> > > >> Ahh, yes we are saying same thing. > > >> But not sure if it should go under lib/librte_kni/ or kernel/linux/k= ni/? > > >> I lean to kernel/linux/kni/. > > > > > > Why in kernel/? > > > > > > Logically, kernel/ depends on lib/ but not the reverse. > > > > > > And regarding the licensing, we avoid BSD files in Linux modules. > > > > From functionality point of view, module provides the functionality > > and it should provide the header, this can be all subjective tough :) > > > > Or in other words, if you have the kernel module, you can write > > another piece of userspace application (without using librte_kni) and i= t will be > functional. > > But if you have the librte_kni only, it won't be functional on its own. > > > > Providing header with kernel enables other userspace app to user KNI. >=20 > So you are saying we should reverse the dependency? > It would mean moving all headers used by kernel modules in kernel/ direct= ory: > - rte_pci_dev_features.h > \- rte_pci_dev_feature_defs.h > - rte_kni_common.h > \- rte_common.h >=20 > Are you sure? >=20 I agree that ideologically the kernel modules shall be self sufficient. However, given the dpdk structure, my original intention was to have usersp= ace self sufficient. The kernel modules may depend on userspace. However, no strong opinion either way. =20