numam-dpdk/doc/guides/contributing
Michal Mazurek f22e705ebf eal/riscv: support RISC-V architecture
Add all necessary elements for DPDK to compile and run EAL on SiFive
Freedom U740 SoC which is based on SiFive U74-MC (ISA: rv64imafdc)
core complex.

This includes:

- EAL library implementation for rv64imafdc ISA.
- meson build structure for 'riscv' architecture. RTE_ARCH_RISCV define
  is added for architecture identification.
- xmm_t structure operation stubs as there is no vector support in the
  U74 core.

Compilation was tested on Ubuntu and Arch Linux using riscv64 toolchain.
Clang compilation currently not supported due to issues with missing
relocation relaxation.

Two rte_rdtsc() schemes are provided: stable low-resolution using rdtime
(default) and unstable high-resolution using rdcycle. User can override
the scheme by defining RTE_RISCV_RDTSC_USE_HPM=1 during compile time of
both DPDK and the application. The reasoning for this is as follows.
The RISC-V ISA mandates that clock read by rdtime has to be of constant
period and synchronized between all hardware threads within 1 tick
(chapter 10.1 in version 20191213 of RISC-V spec).
However this clock may not be of high-enough frequency for dataplane
uses. I.e. on HiFive Unmatched (FU740) it is 1MHz.
There is a high-resolution alternative in form of rdcycle which is
clocked at the core clock frequency. The drawbacks are that it may be
disabled during sleep (WFI), its frequency might change due to DVFS and
it is core-local and therefore cannot be used as a wall-clock. It can
however be used for micro-benchmarking user applications, similarly to
Aarch64's PMCCNTR PMU counter.

The platform is currently marked as linux-only because rte_cycles
implementation uses the timebase-frequency device-tree node read through
the proc file system. Such approach was chosen because Linux kernel
depends on the presence of this device-tree node.

The i40e PMD driver is disabled on RISC-V as the rv64gc ISA has no vector
operations.

The compilation of following modules has been disabled by this commit
and will be re-enabled in later commits as fixes are introduced:
net/ixgbe, net/memif, net/tap, example/l3fwd.

Sponsored-by: Frank Zhao <frank.zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Michal Mazurek <maz@semihalf.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
2022-06-08 11:26:20 +02:00
..
img doc: update patch cheatsheet to use meson 2020-10-22 22:54:05 +02:00
abi_policy.rst doc: add policy for promotion of experimental API 2021-08-04 12:39:32 +02:00
abi_versioning.rst doc: remove references to the old build system 2021-09-23 08:45:10 +02:00
cheatsheet.rst doc: add SPDX and copyright to contributing guide 2018-08-09 22:48:10 +02:00
coding_style.rst eal: add OS defines for C conditional checks 2022-01-17 19:26:42 +01:00
design.rst eal/riscv: support RISC-V architecture 2022-06-08 11:26:20 +02:00
documentation.rst mempool: deprecate unused physical page defines 2021-10-20 10:03:41 +02:00
index.rst doc: add a guide for developing unit tests 2021-11-26 17:50:09 +01:00
patches.rst doc: add release milestones definition 2021-09-14 18:51:34 +02:00
stable.rst doc: update LTS release cadence 2022-01-11 17:52:11 +01:00
unit_test.rst doc: add details for new test structure 2021-11-26 17:51:17 +01:00
vulnerability.rst doc: clarify experimental API status in security process 2020-05-25 01:06:24 +02:00