From: Jan Viktorin <viktorin@rehivetech.com>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Keith Wiles <keith.wiles@intel.com>,
david.marchand@6wind.com, jianbo.liu@linaro.org,
jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com,
Jan Viktorin <viktorin@rehivetech.com>
Subject: [dpdk-dev] [RFC 0/6] Flattened Device Tree access from DPDK
Date: Sat, 26 Mar 2016 02:12:40 +0100 [thread overview]
Message-ID: <1458954760-2333-9-git-send-email-viktorin@rehivetech.com> (raw)
In-Reply-To: <1458954760-2333-1-git-send-email-viktorin@rehivetech.com>
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.
The API provides a very limited set of access functions. I think, it's as
minimalistic as possible while enabling all necessary operations a PMD driver
would need. However, some higher level functions would be helpful, too.
The patch series is still missing some bits (eg. better error logging).
Any comments and suggestions are welcome...
Regards
Jan
Jan Viktorin (6):
eal/fdt: introduce Flattened Device Tree API
eal/fdt: implement FDT API for Linux
eal/fdt: test FDT API
eal/fdt: add testing FDT of xgene-1 got from Linux runtime
eal/fdt: test FDT for Linux on real data source
eal/fdt: export for dpdk 16.07
app/test/Makefile | 1 +
app/test/linux-fdt/xgene1/#address-cells | Bin 0 -> 4 bytes
app/test/linux-fdt/xgene1/#size-cells | Bin 0 -> 4 bytes
app/test/linux-fdt/xgene1/compatible | Bin 0 -> 28 bytes
app/test/linux-fdt/xgene1/model | Bin 0 -> 25 bytes
.../xgene1/soc/ethernet@17020000/local-mac-address | Bin 0 -> 6 bytes
.../linux-fdt/xgene1/soc/ethernet@17020000/reg | Bin 0 -> 48 bytes
app/test/test_fdt.c | 484 +++++++++++++++++++++
lib/librte_eal/common/Makefile | 2 +-
lib/librte_eal/common/eal_common_fdt.c | 317 ++++++++++++++
lib/librte_eal/common/include/rte_fdt.h | 185 ++++++++
lib/librte_eal/linuxapp/eal/Makefile | 3 +
lib/librte_eal/linuxapp/eal/eal_fdt.c | 336 ++++++++++++++
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 20 +
14 files changed, 1347 insertions(+), 1 deletion(-)
create mode 100644 app/test/linux-fdt/xgene1/#address-cells
create mode 100644 app/test/linux-fdt/xgene1/#size-cells
create mode 100644 app/test/linux-fdt/xgene1/compatible
create mode 100644 app/test/linux-fdt/xgene1/model
create mode 100644 app/test/linux-fdt/xgene1/soc/ethernet@17020000/local-mac-address
create mode 100644 app/test/linux-fdt/xgene1/soc/ethernet@17020000/reg
create mode 100644 app/test/test_fdt.c
create mode 100644 lib/librte_eal/common/eal_common_fdt.c
create mode 100644 lib/librte_eal/common/include/rte_fdt.h
create mode 100644 lib/librte_eal/linuxapp/eal/eal_fdt.c
--
2.7.0
next prev parent reply other threads:[~2016-03-26 1:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-26 1:12 Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 1/6] eal/fdt: introduce Flattened Device Tree API Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 2/6] eal/fdt: implement FDT API for Linux Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 3/6] eal/fdt: test FDT API Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 4/6] eal/fdt: add testing FDT of xgene-1 got from Linux runtime Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 5/6] eal/fdt: test FDT for Linux on real data source Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 5/6] eal/fdt: test Linux implementation on xgene-1 FDT Jan Viktorin
2016-03-26 1:12 ` [dpdk-dev] [RFC 6/6] eal/fdt: export for dpdk 16.07 Jan Viktorin
2016-03-26 1:12 ` Jan Viktorin [this message]
2016-03-28 2:43 ` [dpdk-dev] [RFC 0/6] Flattened Device Tree access from DPDK Jianbo Liu
2016-03-29 10:34 ` Jan Viktorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458954760-2333-9-git-send-email-viktorin@rehivetech.com \
--to=viktorin@rehivetech.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jianbo.liu@linaro.org \
--cc=keith.wiles@intel.com \
--cc=stephen@networkplumber.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).