numam-dpdk/examples
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
..
bbdev_app fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
bond examples/bond: fix invalid use of trylock 2022-04-14 14:38:20 +02:00
bpf mbuf: add namespace to offload flags 2021-10-24 13:37:43 +02:00
cmdline doc: use code snippets in sample app guides 2021-07-31 15:42:43 +02:00
distributor examples/distributor: reduce Tx queue number to 1 2022-03-08 12:38:39 +01:00
dma examples/dma: add force minimal copy size parameter 2022-06-06 23:32:32 +02:00
ethtool fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
eventdev_pipeline examples: use event port quiescing 2022-05-17 16:43:30 +02:00
fips_validation examples/fips_validation: add parsing for AES-CBC 2022-06-01 16:26:35 +02:00
flow_classify examples/flow_classify: fix failure message 2022-03-08 14:17:27 +01:00
flow_filtering examples/flow_filtering: enhance code snippet readability 2021-11-16 16:22:26 +01:00
helloworld doc: use code snippets in sample app guides 2021-07-31 15:42:43 +02:00
ip_fragmentation mbuf: add namespace to offload flags 2021-10-24 13:37:43 +02:00
ip_pipeline remove unnecessary null checks 2022-02-12 12:07:48 +01:00
ip_reassembly replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
ipsec-secgw examples/ipsec-secgw: support XCBC-MAC/DES-CBC 2022-06-01 16:26:35 +02:00
ipv4_multicast ethdev: add namespace 2021-10-22 18:15:38 +02:00
kni examples/kni: add missing trailing newline in log 2022-03-08 14:27:11 +01:00
l2fwd examples/l2fwd: add promiscuous mode option 2021-10-25 22:31:53 +02:00
l2fwd-cat remove unnecessary null checks 2022-02-12 12:07:48 +01:00
l2fwd-crypto examples/l2fwd-crypto: add signal handler for exit 2022-06-01 16:26:35 +02:00
l2fwd-event examples: use event port quiescing 2022-05-17 16:43:30 +02:00
l2fwd-jobstats fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
l2fwd-keepalive eal: remove FINISHED lcore state 2021-10-25 18:20:59 +02:00
l3fwd eal/riscv: support RISC-V architecture 2022-06-08 11:26:20 +02:00
l3fwd-acl fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
l3fwd-graph ethdev: add namespace 2021-10-22 18:15:38 +02:00
l3fwd-power examples/l3fwd_power: add configuration options 2022-06-04 22:41:24 +02:00
link_status_interrupt ethdev: add namespace 2021-10-22 18:15:38 +02:00
multi_process examples/multi_process: make RSS and checksum optional 2022-03-08 14:20:11 +01:00
ntb fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
packet_ordering fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
pipeline examples/pipeline: fix build 2022-06-07 13:12:19 +02:00
ptpclient replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
qos_meter mbuf: add namespace to offload flags 2021-10-24 13:37:43 +02:00
qos_sched examples/qos_sched: fix core mask overflow 2022-02-25 10:39:26 +01:00
rxtx_callbacks ethdev: add namespace 2021-10-22 18:15:38 +02:00
server_node_efd fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
service_cores examples/service_cores: fix lcore count check 2021-09-16 17:31:03 +02:00
skeleton fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
timer doc: use code snippets in sample app guides 2021-07-31 15:42:43 +02:00
vdpa examples/vdpa: support virtio block device 2022-06-01 11:50:10 +02:00
vhost examples/vhost: fix crash when no VMDq 2022-06-01 11:50:10 +02:00
vhost_blk vhost: refactor messages handlers declaration 2022-05-09 21:39:42 +02:00
vhost_crypto examples: skip build when missing dependencies 2021-11-10 11:42:34 +01:00
vm_power_manager lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
vmdq fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
vmdq_dcb ethdev: add namespace 2021-10-22 18:15:38 +02:00
meson.build examples/performance-thread: remove 2022-01-20 14:30:59 +01:00