From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by dpdk.org (Postfix) with ESMTP id EB45A2C4C for ; Mon, 28 Mar 2016 04:43:00 +0200 (CEST) Received: by mail-qk0-f170.google.com with SMTP id o6so94713912qkc.2 for ; Sun, 27 Mar 2016 19:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=6IGlwrd6rfO7gdYGiNgLv+b+NtoomE1NhQ8CHsmFXJg=; b=BuFzijTf5DscWaNTWSpCGdXhzw0GN2+aUhrSZyCZ8HUmop18O61KoegMsAV59GYBC9 rzaE590OWYQYQvAfTZO6wxJChJxsxhrydL6Goe3ymglRw7UfH7XbiAmWsbVdlASXQch6 oIGteYMmaAdUNI2tKCN2rviwRgAWq0hrgFxKo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=6IGlwrd6rfO7gdYGiNgLv+b+NtoomE1NhQ8CHsmFXJg=; b=NOvsgk0KsQ0wr2C88QXUELV4Ct6CbYojS2csfXK36f5ssxu3imJN+31yZ6m7CvrcQS GGrtRhDqdlcleb9a2yBPQWiLz7vklVRuoj5ox3mTCcz0dNy0UOBhUzxdF5bF8ga2+i46 tjYAhusA3M4jm5GWf4jIM/QtCEB2pu00Q3cwvRQX45S4LXjnpi2edNyFfo17fTdt655p RYrha4bKB2ijKSzUBef2aCxy8Gm5N5PvqOpSOUCV0LPQn4Qwlpf2850An+YXMb0+9Mvq jcAQ1+/J10Yn25g3wyJat75MTiWuOsM/SQClRce8b6RAFsS7X7AYfr7GPF+GTRlYEPaw T64w== X-Gm-Message-State: AD7BkJJVGs6b+aVcTeayCJhFo8l9fflsdpdkrTybuGCLvcpDvZax1Rj8zxTjej6uhTCAW0VJC0oeMYu+0Z0JQ78x MIME-Version: 1.0 X-Received: by 10.129.130.196 with SMTP id s187mr12832787ywf.315.1459132980538; Sun, 27 Mar 2016 19:43:00 -0700 (PDT) Received: by 10.37.202.11 with HTTP; Sun, 27 Mar 2016 19:43:00 -0700 (PDT) In-Reply-To: <1458954760-2333-1-git-send-email-viktorin@rehivetech.com> References: <1458954760-2333-1-git-send-email-viktorin@rehivetech.com> Date: Mon, 28 Mar 2016 10:43:00 +0800 Message-ID: From: Jianbo Liu To: Jan Viktorin Cc: dev@dpdk.org, Thomas Monjalon , Stephen Hemminger , Keith Wiles , david.marchand@6wind.com, Jerin Jacob , Bruce Richardson Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [RFC 0/6] Flattened Device Tree access from DPDK 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, 28 Mar 2016 02:43:01 -0000 On 26 March 2016 at 09:12, Jan Viktorin wrote: > Hello, > > while extending the DPDK by a kind of platform devices (for the 16.07), an > access to the FDT might be necessary (or at least very helpful). This patch > series for 16.07 introduces an approach to solve this topic. > > The API is designed from scratch and there is only the Linux backend for it. > The Linux backend can read and traverse the /proc/device-tree structure. The > API, however, stays as independent as possible. It is possible to: > > * open the FDT in a platform independent way (rte_fdt_open/close) > * define a path in the FDT in an abstract way (rte_fdt_path) > * read strings, 32 and 64 bit values, a binary content (rte_fdt_path_readX) > * walk the FDT structure from a selected point (rte_fdt_path_walk) > > I've included unit tests of the API and of the Linux implemention. Some basic > API tests are introduced in the patch 3. Then a simplified device-tree file > structure is added together with more tests testing the Linux backend (4,5). > I've left those 3 patches separated for now but I think they can be aggregated > into a single patch later. > > Here, I've encounter an issue. The testing FDT files (app/test/linux-fdt) need > to be copied (or linked) to the working directory of the _test_ executable. I > have no idea, how to integrate such logic into the build system. > Why not store FDT files in the code, for example, as a group of binary arrays? When test is executed, it firstly creates the files in the working directory from those arrays. Jianbo