numam-dpdk/lib
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
..
acl acl: fix rules with 8-byte field size 2022-05-30 23:30:33 +02:00
bbdev lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
bitratestats bitrate: promote free function to stable 2021-10-01 15:31:47 +02:00
bpf bpf: fix build with some libpcap version on FreeBSD 2022-03-14 11:41:52 +01:00
cfgfile version: 21.11-rc0 2021-08-17 08:37:52 +02:00
cmdline lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
compressdev compressdev: fix missing space in log macro 2022-03-15 02:13:57 +01:00
cryptodev replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
distributor distributor: fix potential overflow 2022-02-27 19:06:59 +01:00
dmadev dmadev: add telemetry 2022-06-06 23:31:29 +02:00
eal eal/riscv: support RISC-V architecture 2022-06-08 11:26:20 +02:00
efd efd: fix uninitialized structure 2022-02-27 18:58:47 +01:00
ethdev ethdev: promote port ownership API as stable 2022-06-02 13:38:26 +02:00
eventdev replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
fib lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
flow_classify lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
gpudev gpudev: fix page alignment in communication list 2022-03-09 00:14:55 +01:00
graph graph: remove useless duplicate name check 2022-03-07 20:31:14 +01:00
gro lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
gso mbuf: add namespace to offload flags 2021-10-24 13:37:43 +02:00
hash hash: unify CRC32 selection for x86 and Arm 2022-05-19 10:00:51 -04:00
ip_frag replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
ipsec replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
jobstats lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
kni kni: add missing C++ guards 2022-02-22 14:47:49 +01:00
kvargs lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
latencystats lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
lpm lpm: add scalar version of lookupx4 2022-06-03 11:22:31 +02:00
mbuf mbuf: dump outer VLAN 2022-06-01 11:15:37 +02:00
member lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
mempool lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
meter version: 21.11-rc0 2021-08-17 08:37:52 +02:00
metrics metrics: add missing C++ guards 2022-02-22 14:47:49 +01:00
net ip_frag: add IPv4 options fragment 2022-06-01 08:58:27 +02:00
node lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pcapng pcapng: fix timestamp wrapping in output files 2022-06-01 16:39:25 +02:00
pci lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pdump lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pipeline pipeline: support hash functions 2022-06-01 16:01:37 +02:00
port port: support packet mirroring 2022-06-01 15:04:34 +02:00
power power: add get/set min/max scaling frequencies API 2022-06-04 22:39:49 +02:00
rawdev lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
rcu lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
regexdev build: hide local symbols in shared libraries 2022-03-08 15:22:33 +01:00
reorder lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
rib replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
ring lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
sched sched: enable traffic class oversubscription conditionally 2022-06-01 08:58:27 +02:00
security security: fix SA lifetime comments 2022-04-28 09:26:48 +02:00
stack lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
table replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
telemetry telemetry: add missing C++ guards 2022-02-22 14:47:49 +01:00
timer lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
vhost replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
meson.build build: add definitions for use as Meson subproject 2022-06-07 20:49:20 +02:00