DPDK: Upgrade to 22.11.6.

This commit is contained in:
jfb8856606 2024-10-17 10:26:34 +00:00
parent 1152067e93
commit f27ff49313
587 changed files with 12082 additions and 7742 deletions

View File

@ -1 +1 @@
22.11.3
22.11.6

View File

@ -1,364 +0,0 @@
The Meson build system
Version: 0.56.2
Source dir: /data/f-stack/dpdk
Build dir: /data/f-stack/dpdk/build
Build type: native build
Program cat found: YES (/usr/bin/cat)
Project name: DPDK
Project version: 22.11.3
C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)")
C linker for the host machine: cc ld.bfd 2.27-34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program pkg-config found: YES (/usr/local/bin/pkg-config)
Program check-symbols.sh found: YES (/data/f-stack/dpdk/buildtools/check-symbols.sh)
Program options-ibverbs-static.sh found: YES (/data/f-stack/dpdk/buildtools/options-ibverbs-static.sh)
Program objdump found: YES (/usr/bin/objdump)
Program python3 found: YES (/usr/bin/python3)
Program cat found: YES (/usr/bin/cat)
Program ../buildtools/symlink-drivers-solibs.sh found: YES (/bin/sh /data/f-stack/dpdk/config/../buildtools/symlink-drivers-solibs.sh)
Checking for size of "void *" : 8
Checking for size of "void *" : 8
Library m found: YES
Library numa found: YES
Has header "numaif.h" : YES
Library fdt found: NO
Library execinfo found: NO
Has header "execinfo.h" : YES
Found pkg-config: /usr/local/bin/pkg-config (0.29.2)
Run-time dependency libarchive found: NO (tried pkgconfig)
Run-time dependency libbsd found: NO (tried pkgconfig)
Run-time dependency jansson found: NO (tried pkgconfig)
Run-time dependency openssl found: NO (tried pkgconfig)
Run-time dependency libpcap found: NO (tried pkgconfig)
Library pcap found: NO
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wdeprecated: YES
Compiler for C supports arguments -Wformat: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-address-of-packed-member: NO
Compiler for C supports arguments -Wno-packed-not-aligned: NO
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -mavx512f: NO
Fetching value of define "__SSE4_2__" : 1
Fetching value of define "__AES__" : 1
Fetching value of define "__AVX__" : 1
Fetching value of define "__AVX2__" : 1
Fetching value of define "__AVX512BW__" :
Fetching value of define "__AVX512CD__" :
Fetching value of define "__AVX512DQ__" :
Fetching value of define "__AVX512F__" :
Fetching value of define "__AVX512VL__" :
Fetching value of define "__PCLMUL__" : 1
Fetching value of define "__RDRND__" : 1
Fetching value of define "__RDSEED__" : 1
Fetching value of define "__VPCLMULQDQ__" :
Compiler for C supports arguments -Wno-format-truncation: NO
Checking for function "getentropy" : NO
Fetching value of define "__PCLMUL__" : 1 (cached)
Fetching value of define "__AVX512F__" : (cached)
Compiler for C supports arguments -mpclmul: YES
Compiler for C supports arguments -maes: YES
Compiler for C supports arguments -mavx512f: NO (cached)
Fetching value of define "__AVX2__" : 1 (cached)
Fetching value of define "__AVX512F__" : (cached)
Fetching value of define "__AVX512VL__" : (cached)
Fetching value of define "__AVX512CD__" : (cached)
Fetching value of define "__AVX512BW__" : (cached)
Compiler for C supports arguments -mavx512f -mavx512vl -mavx512cd -mavx512bw: NO
Run-time dependency libelf found: NO (tried pkgconfig)
lib/bpf/meson.build:36: WARNING: libelf is missing, rte_bpf_elf_load API will be disabled
lib/bpf/meson.build:43: WARNING: libpcap is missing, rte_bpf_convert API will be disabled
Fetching value of define "__AVX512F__" : (cached)
Fetching value of define "__AVX512DQ__" : (cached)
Fetching value of define "__AVX512IFMA__" :
Compiler for C supports arguments -mavx512f -mavx512dq -mavx512ifma: NO
Compiler for C supports arguments -Wno-cast-qual: YES
Has header "linux/userfaultfd.h" : YES
Fetching value of define "__AVX512F__" : (cached)
Fetching value of define "__AVX512DQ__" : (cached)
Compiler for C supports arguments -mavx512f -mavx512dq: NO
Compiler for C supports arguments -Wno-format-truncation: NO (cached)
Compiler for C supports arguments -Wno-cast-qual: YES (cached)
Compiler for C supports arguments -Wno-pointer-arith: YES
Compiler for C supports arguments -Wno-pointer-to-int-cast: YES
Run-time dependency libmusdk found: NO (tried pkgconfig)
Compiler for C supports arguments -Wno-cast-qual: YES (cached)
Compiler for C supports arguments -Wno-pointer-arith: YES (cached)
Compiler for C supports arguments -std=c11: YES
Compiler for C supports arguments -Wno-strict-prototypes: YES
Compiler for C supports arguments -D_BSD_SOURCE: YES
Compiler for C supports arguments -D_DEFAULT_SOURCE: YES
Compiler for C supports arguments -D_XOPEN_SOURCE=600: YES
Run-time dependency libmlx5 found: NO (tried pkgconfig)
Library mlx5 found: NO
Configuring mlx5_autoconf.h using configuration
Run-time dependency libcrypto found: NO (tried pkgconfig)
Library IPSec_MB found: NO
Run-time dependency libcrypto found: NO (tried pkgconfig)
Compiler for C supports arguments -Wdisabled-optimization: YES
Compiler for C supports arguments -Waggregate-return: YES
Compiler for C supports arguments -Wbad-function-cast: YES
Compiler for C supports arguments -Wno-sign-compare: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-unused-variable: YES
Compiler for C supports arguments -Wno-empty-body: YES
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Compiler for C supports arguments -Wno-pointer-arith: YES (cached)
Compiler for C supports arguments -Wno-pointer-arith: YES (cached)
Run-time dependency libxdp found: NO (tried pkgconfig)
Run-time dependency libbpf found: NO (tried pkgconfig)
Library bpf found: NO
Has header "linux/if_xdp.h" : NO
Run-time dependency zlib found: NO (tried pkgconfig)
Compiler for C supports arguments -DSUPPORT_CFA_HW_ALL=1: YES
Fetching value of define "__AVX2__" : 1 (cached)
Compiler for C supports arguments -flax-vector-conversions: YES
Compiler for C supports arguments -Wno-strict-aliasing: YES
Compiler for C supports arguments -Wno-pointer-arith: YES (cached)
Compiler for C supports arguments -Wno-uninitialized: YES
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-misleading-indentation: NO
Compiler for C supports arguments -Wno-implicit-fallthrough: NO
Fetching value of define "__AVX2__" : 1 (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-unused-value: YES
Compiler for C supports arguments -Wno-strict-aliasing: YES (cached)
Compiler for C supports arguments -Wno-format-extra-args: YES
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-implicit-fallthrough: NO (cached)
Compiler for C supports arguments -Wno-sign-compare: YES (cached)
Compiler for C supports arguments -Wno-unused-value: YES (cached)
Compiler for C supports arguments -Wno-format: YES
Compiler for C supports arguments -Wno-format-security: YES
Compiler for C supports arguments -Wno-format-nonliteral: YES
Compiler for C supports arguments -Wno-strict-aliasing: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Fetching value of define "__AVX2__" : 1 (cached)
Fetching value of define "__AVX512F__" : (cached)
Compiler for C supports arguments -mavx512f: NO (cached)
Fetching value of define "__AVX2__" : 1 (cached)
Fetching value of define "__AVX512F__" : (cached)
Compiler for C supports arguments -mavx512f: NO (cached)
Compiler for C supports arguments -Wno-unused-value: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Fetching value of define "__AVX2__" : 1 (cached)
Fetching value of define "__AVX512F__" : (cached)
Compiler for C supports arguments -mavx512f: NO (cached)
Fetching value of define "__AVX512F__" : (cached)
Compiler for C supports arguments -mavx512f: NO (cached)
Compiler for C supports arguments -Wno-unused-value: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Message: Disabling kni [drivers/net/kni]: missing internal dependency "kni"
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libibverbs found: NO (tried pkgconfig and cmake)
Library ibverbs found: NO
Run-time dependency libmlx4 found: NO (tried pkgconfig)
Library mlx4 found: NO
Message: Disabling mlx5 [drivers/net/mlx5]: missing internal dependency "common_mlx5"
Run-time dependency libmusdk found: NO (tried pkgconfig)
Run-time dependency libmusdk found: NO (tried pkgconfig)
Run-time dependency netcope-common found: NO (tried pkgconfig)
Compiler for C supports arguments -Wno-pointer-arith: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-sign-compare: YES (cached)
Compiler for C supports arguments -Wno-missing-prototypes: YES
Compiler for C supports arguments -Wno-cast-qual: YES (cached)
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-strict-aliasing: YES (cached)
Compiler for C supports arguments -Wno-missing-prototypes: YES (cached)
Compiler for C supports arguments -Wno-unused-value: YES (cached)
Compiler for C supports arguments -Wno-format-nonliteral: YES (cached)
Compiler for C supports arguments -Wno-shift-negative-value: NO
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-missing-declarations: YES
Compiler for C supports arguments -Wno-maybe-uninitialized: YES
Compiler for C supports arguments -Wno-strict-prototypes: YES (cached)
Compiler for C supports arguments -Wno-shift-negative-value: NO (cached)
Compiler for C supports arguments -Wno-implicit-fallthrough: NO (cached)
Compiler for C supports arguments -Wno-format-extra-args: YES (cached)
Compiler for C supports arguments -Wno-visibility: NO
Compiler for C supports arguments -Wno-empty-body: YES (cached)
Compiler for C supports arguments -Wno-invalid-source-encoding: NO
Compiler for C supports arguments -Wno-sometimes-uninitialized: NO
Compiler for C supports arguments -Wno-pointer-bool-conversion: NO
Compiler for C supports arguments -Wno-format-nonliteral: YES (cached)
Compiler for C supports arguments -Wno-strict-aliasing: YES (cached)
Compiler for C supports arguments -Wdisabled-optimization: YES (cached)
Compiler for C supports arguments -Waggregate-return: YES (cached)
Compiler for C supports arguments -Wbad-function-cast: YES (cached)
Library atomic found: YES
Header <linux/pkt_cls.h> has symbol "TCA_FLOWER_UNSPEC" : YES
Header <linux/pkt_cls.h> has symbol "TCA_FLOWER_KEY_VLAN_PRIO" : YES
Header <linux/pkt_cls.h> has symbol "TCA_BPF_UNSPEC" : YES
Header <linux/pkt_cls.h> has symbol "TCA_BPF_FD" : NO
Header <linux/tc_act/tc_bpf.h> has symbol "TCA_ACT_BPF_UNSPEC" : NO
Header <linux/tc_act/tc_bpf.h> has symbol "TCA_ACT_BPF_FD" : NO
Configuring tap_autoconf.h using configuration
Compiler for C supports arguments -fno-prefetch-loop-arrays: YES
Compiler for C supports arguments -Wno-maybe-uninitialized: YES (cached)
Compiler for C supports arguments -D_BSD_SOURCE: YES (cached)
Compiler for C supports arguments -D_DEFAULT_SOURCE: YES (cached)
Compiler for C supports arguments -D_XOPEN_SOURCE=600: YES (cached)
Compiler for C supports arguments -mavx512f: NO (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-unused-value: YES (cached)
Compiler for C supports arguments -Wno-strict-aliasing: YES (cached)
Compiler for C supports arguments -Wno-format-extra-args: YES (cached)
Run-time dependency libaarch64crypto found: NO (tried pkgconfig)
Run-time dependency libcrypto found: NO (tried pkgconfig)
Library IPSec_MB found: NO
Message: Disabling mlx5 [drivers/crypto/mlx5]: missing internal dependency "common_mlx5"
Run-time dependency libmusdk found: NO (tried pkgconfig)
Run-time dependency libcrypto found: NO (tried pkgconfig)
Run-time dependency libwd_crypto found: NO (tried pkgconfig)
Run-time dependency libwd found: NO (tried pkgconfig)
Run-time dependency libisal found: NO (tried pkgconfig)
Message: Disabling mlx5 [drivers/compress/mlx5]: missing internal dependency "common_mlx5"
Run-time dependency zlib found: NO (tried pkgconfig)
Message: Disabling mlx5 [drivers/regex/mlx5]: missing internal dependency "common_mlx5"
Library rxp_compiler found: NO
Message: Disabling mlx5 [drivers/vdpa/mlx5]: missing internal dependency "common_mlx5"
Compiler for C supports arguments -flax-vector-conversions: YES (cached)
Compiler for C supports arguments -Wno-strict-aliasing: YES (cached)
Fetching value of define "__AVX512VL__" : (cached)
Compiler for C supports arguments -mavx512vl: NO
Compiler for C supports arguments -Wno-format-nonliteral: YES (cached)
Run-time dependency flexran_sdk_turbo found: NO (tried pkgconfig and cmake)
Run-time dependency flexran_sdk_ldpc_decoder_5gnr found: NO (tried pkgconfig and cmake)
Has header "cuda.h" : NO
Compiler for C supports arguments -Wno-format-truncation: NO (cached)
Run-time dependency zlib found: NO (tried pkgconfig)
Message: hugepage availability: true
Program test_telemetry.sh found: YES (/data/f-stack/dpdk/app/test/test_telemetry.sh)
Program doxygen found: NO
Program sphinx-build found: NO
Configuring rte_build_config.h using configuration
Message:
=================
Applications Enabled
=================
apps:
pdump, proc-info, test-acl, test-bbdev, test-cmdline, test-compress-perf, test-crypto-perf, test-eventdev,
test-fib, test-flow-perf, test-gpudev, test-pipeline, test-pmd, test-regex, test-sad, test-security-perf,
Message:
=================
Libraries Enabled
=================
libs:
kvargs, telemetry, eal, ring, rcu, mempool, mbuf, net,
meter, ethdev, pci, cmdline, metrics, hash, timer, acl,
bbdev, bitratestats, bpf, cfgfile, compressdev, cryptodev, distributor, efd,
eventdev, gpudev, gro, gso, ip_frag, jobstats, latencystats, lpm,
member, pcapng, power, rawdev, regexdev, dmadev, rib, reorder,
sched, security, stack, vhost, ipsec, fib, port, pdump,
table, pipeline, graph, node,
Message:
===============
Drivers Enabled
===============
common:
cpt, dpaax, iavf, idpf, octeontx, cnxk, qat, sfc_efx,
bus:
auxiliary, dpaa, fslmc, ifpga, pci, vdev, vmbus,
mempool:
bucket, cnxk, dpaa, dpaa2, octeontx, ring, stack,
dma:
cnxk, dpaa, dpaa2, hisilicon, idxd, ioat, skeleton,
net:
af_packet, ark, atlantic, avp, axgbe, bnxt, bond, cnxk,
cxgbe, dpaa, dpaa2, e1000, ena, enetc, enetfec, enic,
failsafe, fm10k, gve, hinic, hns3, i40e, iavf, ice,
idpf, igc, ionic, ixgbe, liquidio, memif, netvsc, nfp,
ngbe, null, octeontx, octeon_ep, pfe, qede, ring, softnic,
tap, thunderx, txgbe, vdev_netvsc, vhost, virtio, vmxnet3,
raw:
cnxk_bphy, cnxk_gpio, dpaa2_cmdif, ntb, skeleton,
crypto:
bcmfs, caam_jr, cnxk, dpaa_sec, dpaa2_sec, nitrox, null, octeontx,
scheduler, virtio,
compress:
octeontx,
regex:
cn9k,
vdpa:
ifc, sfc,
event:
cnxk, dlb2, dpaa, dpaa2, dsw, opdl, skeleton, sw,
octeontx,
baseband:
acc, fpga_5gnr_fec, fpga_lte_fec, la12xx, null, turbo_sw,
gpu:
Message:
=================
Content Skipped
=================
apps:
dumpcap: missing dependency, "libpcap"
libs:
kni: explicitly disabled via build config (deprecated lib)
flow_classify: explicitly disabled via build config (deprecated lib)
drivers:
common/mvep: missing dependency, "libmusdk"
common/mlx5: missing dependency, "mlx5"
crypto/qat: missing dependency, libcrypto
net/af_xdp: missing header, "linux/if_xdp.h"
net/bnx2x: missing dependency, "zlib"
net/ipn3ke: missing dependency, "libfdt"
net/kni: missing internal dependency, "kni" (deprecated lib)
net/mana: missing dependency, "ibverbs"
net/mlx4: missing dependency, "mlx4"
net/mlx5: missing internal dependency, "common_mlx5"
net/mvneta: missing dependency, "libmusdk"
net/mvpp2: missing dependency, "libmusdk"
net/nfb: missing dependency, "libnfb"
net/pcap: missing dependency, "libpcap"
net/sfc: broken dependency, "libatomic"
raw/ifpga: missing dependency, "libfdt"
crypto/armv8: missing dependency, "libAArch64crypto"
crypto/ccp: missing dependency, "libcrypto"
crypto/ipsec_mb: missing dependency, "libIPSec_MB"
crypto/mlx5: missing internal dependency, "common_mlx5"
crypto/mvsam: missing dependency, "libmusdk"
crypto/openssl: missing dependency, "libcrypto"
crypto/uadk: missing dependency, "libwd"
compress/isal: missing dependency, "libisal"
compress/mlx5: missing internal dependency, "common_mlx5"
compress/zlib: missing dependency, "zlib"
regex/mlx5: missing internal dependency, "common_mlx5"
vdpa/mlx5: missing internal dependency, "common_mlx5"
gpu/cuda: missing dependency, "cuda.h"
Build targets in project: 901
Found ninja-1.10.2 at /usr/bin/ninja

View File

@ -44,7 +44,6 @@
#include <pcap/pcap.h>
#include <pcap/bpf.h>
#define RING_NAME "capture-ring"
#define MONITOR_INTERVAL (500 * 1000)
#define MBUF_POOL_CACHE_SIZE 32
#define BURST_SIZE 32
@ -547,6 +546,11 @@ static void dpdk_init(void)
eal_argv[i++] = strdup(file_prefix);
}
for (i = 0; i < (unsigned int)eal_argc; i++) {
if (eal_argv[i] == NULL)
rte_panic("No memory\n");
}
if (rte_eal_init(eal_argc, eal_argv) < 0)
rte_exit(EXIT_FAILURE, "EAL init failed: is primary process running?\n");
}
@ -555,6 +559,7 @@ static void dpdk_init(void)
static struct rte_ring *create_ring(void)
{
struct rte_ring *ring;
char ring_name[RTE_RING_NAMESIZE];
size_t size, log2;
/* Find next power of 2 >= size. */
@ -568,31 +573,31 @@ static struct rte_ring *create_ring(void)
ring_size = size;
}
ring = rte_ring_lookup(RING_NAME);
if (ring == NULL) {
ring = rte_ring_create(RING_NAME, ring_size,
rte_socket_id(), 0);
if (ring == NULL)
rte_exit(EXIT_FAILURE, "Could not create ring :%s\n",
rte_strerror(rte_errno));
}
/* Want one ring per invocation of program */
snprintf(ring_name, sizeof(ring_name),
"dumpcap-%d", getpid());
ring = rte_ring_create(ring_name, ring_size,
rte_socket_id(), 0);
if (ring == NULL)
rte_exit(EXIT_FAILURE, "Could not create ring :%s\n",
rte_strerror(rte_errno));
return ring;
}
static struct rte_mempool *create_mempool(void)
{
static const char pool_name[] = "capture_mbufs";
char pool_name[RTE_MEMPOOL_NAMESIZE];
size_t num_mbufs = 2 * ring_size;
struct rte_mempool *mp;
mp = rte_mempool_lookup(pool_name);
if (mp)
return mp;
snprintf(pool_name, sizeof(pool_name), "capture_%d", getpid());
mp = rte_pktmbuf_pool_create_by_ops(pool_name, num_mbufs,
MBUF_POOL_CACHE_SIZE, 0,
rte_pcapng_mbuf_size(snaplen),
rte_socket_id(), "ring_mp_sc");
rte_socket_id(), "ring_mp_mc");
if (mp == NULL)
rte_exit(EXIT_FAILURE,
"Mempool (%s) creation failed: %s\n", pool_name,
@ -800,6 +805,11 @@ int main(int argc, char **argv)
{
struct rte_ring *r;
struct rte_mempool *mp;
struct sigaction action = {
.sa_flags = SA_RESTART,
.sa_handler = signal_handler,
};
struct sigaction origaction;
dumpcap_out_t out;
char *p;
@ -827,6 +837,14 @@ int main(int argc, char **argv)
if (TAILQ_EMPTY(&interfaces))
set_default_interface();
sigemptyset(&action.sa_mask);
sigaction(SIGTERM, &action, NULL);
sigaction(SIGINT, &action, NULL);
sigaction(SIGPIPE, &action, NULL);
sigaction(SIGHUP, NULL, &origaction);
if (origaction.sa_handler == SIG_DFL)
sigaction(SIGHUP, &action, NULL);
r = create_ring();
mp = create_mempool();
out = create_output();

View File

@ -83,7 +83,7 @@ foreach app:apps
if not build
if reason != ''
dpdk_apps_disabled += app
set_variable(app.underscorify() + '_disable_reason', reason)
set_variable('app_' + app.underscorify() + '_disable_reason', reason)
endif
continue
endif

View File

@ -171,6 +171,9 @@ parse_device_id(const char *key __rte_unused, const char *value,
struct pdump_tuples *pt = extra_args;
pt->device_id = strdup(value);
if (pt->device_id == NULL)
return -1;
pt->dump_by_type = DEVICE_ID;
return 0;
@ -568,13 +571,9 @@ disable_primary_monitor(void)
}
static void
signal_handler(int sig_num)
signal_handler(int sig_num __rte_unused)
{
if (sig_num == SIGINT) {
printf("\n\nSignal %d received, preparing to exit...\n",
sig_num);
quit_signal = 1;
}
quit_signal = 1;
}
static inline int
@ -971,6 +970,11 @@ enable_primary_monitor(void)
int
main(int argc, char **argv)
{
struct sigaction action = {
.sa_flags = SA_RESTART,
.sa_handler = signal_handler,
};
struct sigaction origaction;
int diag;
int ret;
int i;
@ -979,8 +983,14 @@ main(int argc, char **argv)
char mp_flag[] = "--proc-type=secondary";
char *argp[argc + 2];
/* catch ctrl-c so we can print on exit */
signal(SIGINT, signal_handler);
/* catch ctrl-c so we can cleanup on exit */
sigemptyset(&action.sa_mask);
sigaction(SIGTERM, &action, NULL);
sigaction(SIGINT, &action, NULL);
sigaction(SIGPIPE, &action, NULL);
sigaction(SIGHUP, NULL, &origaction);
if (origaction.sa_handler == SIG_DFL)
sigaction(SIGHUP, &action, NULL);
argp[0] = argv[0];
argp[1] = n_flag;

View File

@ -19,7 +19,6 @@
#include <rte_common.h>
#include <rte_debug.h>
#include <rte_ethdev.h>
#include <rte_malloc.h>
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_launch.h>
@ -132,6 +131,8 @@ struct desc_param {
static struct desc_param rx_desc_param;
static struct desc_param tx_desc_param;
#define RSS_HASH_KEY_SIZE 64
/* display usage */
static void
proc_info_usage(const char *prgname)
@ -719,24 +720,23 @@ metrics_display(int port_id)
return;
}
metrics = rte_malloc("proc_info_metrics",
sizeof(struct rte_metric_value) * len, 0);
metrics = malloc(sizeof(struct rte_metric_value) * len);
if (metrics == NULL) {
printf("Cannot allocate memory for metrics\n");
return;
}
names = rte_malloc(NULL, sizeof(struct rte_metric_name) * len, 0);
names = malloc(sizeof(struct rte_metric_name) * len);
if (names == NULL) {
printf("Cannot allocate memory for metrics names\n");
rte_free(metrics);
free(metrics);
return;
}
if (len != rte_metrics_get_names(names, len)) {
printf("Cannot get metrics names\n");
rte_free(metrics);
rte_free(names);
free(metrics);
free(names);
return;
}
@ -748,8 +748,8 @@ metrics_display(int port_id)
ret = rte_metrics_get_values(port_id, metrics, len);
if (ret < 0 || ret > len) {
printf("Cannot get metrics values\n");
rte_free(metrics);
rte_free(names);
free(metrics);
free(names);
return;
}
@ -758,8 +758,8 @@ metrics_display(int port_id)
printf("%s: %"PRIu64"\n", names[i].name, metrics[i].value);
printf("%s############################\n", nic_stats_border);
rte_free(metrics);
rte_free(names);
free(metrics);
free(names);
}
#endif
@ -823,6 +823,7 @@ show_port(void)
struct rte_eth_fc_conf fc_conf;
struct rte_ether_addr mac;
struct rte_eth_dev_owner owner;
uint8_t rss_key[RSS_HASH_KEY_SIZE];
/* Skip if port is not in mask */
if ((enabled_port_mask & (1ul << i)) == 0)
@ -981,17 +982,18 @@ show_port(void)
printf("\n");
}
rss_conf.rss_key = rss_key;
rss_conf.rss_key_len = dev_info.hash_key_size;
ret = rte_eth_dev_rss_hash_conf_get(i, &rss_conf);
if (ret == 0) {
if (rss_conf.rss_key) {
printf(" - RSS\n");
printf("\t -- RSS len %u key (hex):",
rss_conf.rss_key_len);
for (k = 0; k < rss_conf.rss_key_len; k++)
printf(" %x", rss_conf.rss_key[k]);
printf("\t -- hf 0x%"PRIx64"\n",
rss_conf.rss_hf);
}
printf(" - RSS info\n");
printf("\t -- key len : %u\n",
rss_conf.rss_key_len);
printf("\t -- key (hex) : ");
for (k = 0; k < rss_conf.rss_key_len; k++)
printf("%02x", rss_conf.rss_key[k]);
printf("\n\t -- hash function : 0x%"PRIx64"\n",
rss_conf.rss_hf);
}
#ifdef RTE_LIB_SECURITY

View File

@ -23,6 +23,6 @@ endif
if dpdk_conf.has('RTE_BASEBAND_ACC')
deps += ['baseband_acc']
endif
if dpdk_conf.has('RTE_LIBRTE_PMD_BBDEV_LA12XX')
if dpdk_conf.has('RTE_BASEBAND_LA12XX')
deps += ['baseband_la12xx']
endif

View File

@ -91,21 +91,18 @@ for vector in args.test_vector:
params_string = " ".join(call_params)
print("Executing: {}".format(params_string))
app_proc = subprocess.Popen(call_params)
if args.timeout > 0:
timer = Timer(args.timeout, kill, [app_proc])
timer.start()
try:
app_proc.communicate()
except:
print("Error: failed to execute: {}".format(params_string))
finally:
timer.cancel()
if app_proc.returncode != 0:
exit_status = 1
print("ERROR TestCase failed. Failed test for vector {}. Return code: {}".format(
vector, app_proc.returncode))
output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True)
except subprocess.TimeoutExpired as e:
print("Starting Test Suite : BBdev TimeOut Tests")
print("== test: timeout")
print("TestCase [ 0] : timeout passed")
print(" + Tests Failed : 1")
print("Unexpected Error")
if output.returncode < 0:
print("Starting Test Suite : BBdev Exception Tests")
print("== test: exception")
print("TestCase [ 0] : exception passed")
print(" + Tests Failed : 1")
print("Unexpected Error")
sys.exit(exit_status)

View File

@ -366,7 +366,8 @@ test_bbdev_configure_stop_queue(void)
* - queue should be started if deferred_start ==
*/
ts_params->qconf.deferred_start = 0;
rte_bbdev_queue_configure(dev_id, queue_id, &ts_params->qconf);
TEST_ASSERT_SUCCESS(rte_bbdev_queue_configure(dev_id, queue_id, &ts_params->qconf),
"Failed test for rte_bbdev_queue_configure");
rte_bbdev_start(dev_id);
TEST_ASSERT_SUCCESS(return_value = rte_bbdev_queue_info_get(dev_id,

View File

@ -3125,15 +3125,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_dec_ops(
tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(num_to_enq != enq));
enqueued += enq;
/* Write to thread burst_sz current number of enqueued
* descriptors. It ensures that proper number of
* descriptors will be dequeued in callback
@ -3143,6 +3134,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
*/
__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_dec_ops(
tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(num_to_enq != enq));
enqueued += enq;
/* Wait until processing of previous batch is
* completed
*/
@ -3218,14 +3218,6 @@ throughput_intr_lcore_dec(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
enq = 0;
do {
enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(num_to_enq != enq));
enqueued += enq;
/* Write to thread burst_sz current number of enqueued
* descriptors. It ensures that proper number of
* descriptors will be dequeued in callback
@ -3235,6 +3227,14 @@ throughput_intr_lcore_dec(void *arg)
*/
__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
enq = 0;
do {
enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(num_to_enq != enq));
enqueued += enq;
/* Wait until processing of previous batch is
* completed
*/
@ -3304,14 +3304,6 @@ throughput_intr_lcore_enc(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
enq = 0;
do {
enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(enq != num_to_enq));
enqueued += enq;
/* Write to thread burst_sz current number of enqueued
* descriptors. It ensures that proper number of
* descriptors will be dequeued in callback
@ -3321,6 +3313,14 @@ throughput_intr_lcore_enc(void *arg)
*/
__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
enq = 0;
do {
enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(enq != num_to_enq));
enqueued += enq;
/* Wait until processing of previous batch is
* completed
*/
@ -3392,15 +3392,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_enc_ops(
tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(enq != num_to_enq));
enqueued += enq;
/* Write to thread burst_sz current number of enqueued
* descriptors. It ensures that proper number of
* descriptors will be dequeued in callback
@ -3410,6 +3401,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
*/
__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_enc_ops(
tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(enq != num_to_enq));
enqueued += enq;
/* Wait until processing of previous batch is
* completed
*/
@ -3480,14 +3480,6 @@ throughput_intr_lcore_fft(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
enq = 0;
do {
enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(enq != num_to_enq));
enqueued += enq;
/* Write to thread burst_sz current number of enqueued
* descriptors. It ensures that proper number of
* descriptors will be dequeued in callback
@ -3497,6 +3489,14 @@ throughput_intr_lcore_fft(void *arg)
*/
__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
enq = 0;
do {
enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
queue_id, &ops[enqueued],
num_to_enq);
} while (unlikely(enq != num_to_enq));
enqueued += enq;
/* Wait until processing of previous batch is
* completed
*/

View File

@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
uint64_t *tsc_start __rte_unused)
{
uint16_t i;
void *asym_sess = (void *)sess;
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
asym_op->modex.base.length = options->modex_data->base.len;
asym_op->modex.result.data = options->modex_data->result.data;
asym_op->modex.result.length = options->modex_data->result.len;
rte_crypto_op_attach_asym_session(ops[i], asym_sess);
rte_crypto_op_attach_asym_session(ops[i], sess);
}
}
@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_sym_op *sym_op = ops[i]->sym;
void *sec_sess = (void *)sess;
uint32_t buf_sz;
uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
*per_pkt_hfn = options->pdcp_ses_hfn_en ? 0 : PDCP_DEFAULT_HFN;
ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
rte_security_attach_session(ops[i], sec_sess);
rte_security_attach_session(ops[i], sess);
sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
src_buf_offset);
@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
uint16_t iv_offset __rte_unused, uint32_t *imix_idx,
uint64_t *tsc_start)
{
void *sec_sess = sess;
const uint32_t test_buffer_size = options->test_buffer_size;
const uint32_t headroom_sz = options->headroom_sz;
const uint32_t segment_sz = options->segment_sz;
@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
struct rte_mbuf *m = sym_op->m_src;
ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
rte_security_attach_session(ops[i], sec_sess);
rte_security_attach_session(ops[i], sess);
sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
src_buf_offset);

View File

@ -516,6 +516,10 @@ parse_test_file(struct cperf_options *opts,
const char *arg)
{
opts->test_file = strdup(arg);
if (opts->test_file == NULL) {
RTE_LOG(ERR, USER1, "Dup vector file failed!\n");
return -1;
}
if (access(opts->test_file, F_OK) != -1)
return 0;
RTE_LOG(ERR, USER1, "Test vector file doesn't exist\n");

View File

@ -49,7 +49,6 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
{
uint16_t mbuf_hdr_size = sizeof(struct rte_mbuf);
uint16_t remaining_segments = segments_nb;
struct rte_mbuf *next_mbuf;
rte_iova_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
mbuf_offset + mbuf_hdr_size;
@ -70,15 +69,15 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
m->nb_segs = segments_nb;
m->port = 0xff;
rte_mbuf_refcnt_set(m, 1);
next_mbuf = (struct rte_mbuf *) ((uint8_t *) m +
mbuf_hdr_size + segment_sz);
m->next = next_mbuf;
m = next_mbuf;
remaining_segments--;
if (remaining_segments > 0) {
m->next = (struct rte_mbuf *)((uint8_t *) m + mbuf_hdr_size + segment_sz);
m = m->next;
} else {
m->next = NULL;
}
} while (remaining_segments > 0);
m->next = NULL;
}
static void
@ -150,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
int ret;
/* Calculate the object size */
uint16_t crypto_op_size = sizeof(struct rte_crypto_op) +
sizeof(struct rte_crypto_sym_op);
uint16_t crypto_op_size = sizeof(struct rte_crypto_op);
uint16_t crypto_op_private_size;
if (options->op_type == CPERF_ASYM_MODEX) {
crypto_op_size += sizeof(struct rte_crypto_asym_op);
snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, "perf_asym_op_pool%u",
rte_socket_id());
*pool = rte_crypto_op_pool_create(
@ -171,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
return 0;
}
crypto_op_size += sizeof(struct rte_crypto_sym_op);
/*
* If doing AES-CCM, IV field needs to be 16 bytes long,
* and AAD field needs to be long enough to have 18 bytes,
@ -227,7 +228,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
(mbuf_size * segments_nb);
params.dst_buf_offset = *dst_buf_offset;
/* Destination buffer will be one segment only */
obj_size += max_size + sizeof(struct rte_mbuf);
obj_size += max_size + sizeof(struct rte_mbuf) +
options->headroom_sz + options->tailroom_sz;
}
*pool = rte_mempool_create_empty(pool_name,
@ -269,7 +271,7 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,
const struct cperf_options *options,
const struct cperf_test_vector *test_vector)
{
uint32_t segment_sz = options->segment_sz;
uint32_t segment_sz = options->segment_sz - options->headroom_sz - options->tailroom_sz;
uint8_t *mbuf_data;
uint8_t *test_data;
uint32_t remaining_bytes = options->max_buffer_size;

View File

@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
{
struct priv_op_data *priv_data;
priv_data = (struct priv_op_data *) (op->sym + 1);
if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
priv_data = (struct priv_op_data *) (op->sym + 1);
else
priv_data = (struct priv_op_data *) (op->asym + 1);
priv_data->result->status = op->status;
priv_data->result->tsc_end = timestamp;
}
@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
ctx->res[tsc_idx].tsc_start = tsc_start;
/*
* Private data structure starts after the end of the
* rte_crypto_sym_op structure.
* rte_crypto_sym_op (or rte_crypto_asym_op) structure.
*/
priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
if (ops[i]->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
else
priv_data = (struct priv_op_data *) (ops[i]->asym + 1);
priv_data->result = (void *)&ctx->res[tsc_idx];
tsc_idx++;
}

View File

@ -111,8 +111,10 @@ cperf_verify_op(struct rte_crypto_op *op,
uint32_t len;
uint16_t nb_segs;
uint8_t *data;
uint32_t cipher_offset, auth_offset;
uint8_t cipher, auth;
uint32_t cipher_offset, auth_offset = 0;
bool cipher = false;
bool digest_verify = false;
bool is_encrypt = false;
int res = 0;
if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS)
@ -150,57 +152,54 @@ cperf_verify_op(struct rte_crypto_op *op,
switch (options->op_type) {
case CPERF_CIPHER_ONLY:
cipher = 1;
cipher = true;
cipher_offset = 0;
auth = 0;
auth_offset = 0;
break;
case CPERF_CIPHER_THEN_AUTH:
cipher = 1;
cipher_offset = 0;
auth = 1;
auth_offset = options->test_buffer_size;
is_encrypt = options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT;
break;
case CPERF_AUTH_ONLY:
cipher = 0;
cipher_offset = 0;
auth = 1;
auth_offset = options->test_buffer_size;
if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) {
auth_offset = options->test_buffer_size;
digest_verify = true;
}
break;
case CPERF_CIPHER_THEN_AUTH:
case CPERF_AUTH_THEN_CIPHER:
cipher = 1;
cipher = true;
cipher_offset = 0;
auth = 1;
auth_offset = options->test_buffer_size;
if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
auth_offset = options->test_buffer_size;
digest_verify = true;
is_encrypt = true;
}
break;
case CPERF_AEAD:
cipher = 1;
cipher = true;
cipher_offset = 0;
auth = 1;
auth_offset = options->test_buffer_size;
if (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) {
auth_offset = options->test_buffer_size;
digest_verify = true;
is_encrypt = true;
}
break;
default:
res = 1;
goto out;
}
if (cipher == 1) {
if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
res += memcmp(data + cipher_offset,
if (cipher) {
if (is_encrypt)
res += !!memcmp(data + cipher_offset,
vector->ciphertext.data,
options->test_buffer_size);
else
res += memcmp(data + cipher_offset,
res += !!memcmp(data + cipher_offset,
vector->plaintext.data,
options->test_buffer_size);
}
if (auth == 1) {
if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
res += memcmp(data + auth_offset,
vector->digest.data,
options->digest_sz);
}
if (digest_verify)
res += !!memcmp(data + auth_offset, vector->digest.data, options->digest_sz);
out:
rte_free(data);
@ -276,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx)
ops_needed, ctx->sess, ctx->options,
ctx->test_vector, iv_offset, &imix_idx, NULL);
/* Populate the mbuf with the test vector, for verification */
for (i = 0; i < ops_needed; i++)
cperf_mbuf_set(ops[i]->sym->m_src,
@ -294,6 +292,17 @@ cperf_verify_test_runner(void *test_ctx)
}
#endif /* CPERF_LINEARIZATION_ENABLE */
/**
* When ops_needed is smaller than ops_enqd, the
* unused ops need to be moved to the front for
* next round use.
*/
if (unlikely(ops_enqd > ops_needed)) {
size_t nb_b_to_mov = ops_unused * sizeof(struct rte_crypto_op *);
memmove(&ops[ops_needed], &ops[ops_enqd], nb_b_to_mov);
}
/* Enqueue burst of ops on crypto device */
ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
ops, burst_size);

View File

@ -10,6 +10,7 @@
#include <string.h>
#include <sys/queue.h>
#include <stdarg.h>
#include <signal.h>
#include <errno.h>
#include <getopt.h>
#include <unistd.h>
@ -41,6 +42,15 @@
#include "main.h"
bool force_quit;
static void
signal_handler(int signum)
{
if (signum == SIGINT || signum == SIGTERM)
force_quit = true;
}
int
main(int argc, char **argv)
{
@ -54,6 +64,10 @@ main(int argc, char **argv)
argc -= ret;
argv += ret;
force_quit = false;
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);
/* Parse application arguments (after the EAL ones) */
ret = app_parse_args(argc, argv);
if (ret < 0) {

View File

@ -60,6 +60,8 @@ struct app_params {
extern struct app_params app;
extern bool force_quit;
int app_parse_args(int argc, char **argv);
void app_print_usage(void);
void app_init(void);

View File

@ -236,14 +236,16 @@ app_main_loop_worker_pipeline_acl(void) {
/* Run-time */
#if APP_FLUSH == 0
for ( ; ; )
while (!force_quit)
rte_pipeline_run(p);
#else
for (i = 0; ; i++) {
i = 0;
while (!force_quit) {
rte_pipeline_run(p);
if ((i & APP_FLUSH) == 0)
rte_pipeline_flush(p);
i++;
}
#endif
}

View File

@ -366,14 +366,16 @@ app_main_loop_worker_pipeline_hash(void) {
/* Run-time */
#if APP_FLUSH == 0
for ( ; ; )
while (!force_quit)
rte_pipeline_run(p);
#else
for (i = 0; ; i++) {
i = 0;
while (!force_quit) {
rte_pipeline_run(p);
if ((i & APP_FLUSH) == 0)
rte_pipeline_flush(p);
i++;
}
#endif
}
@ -411,59 +413,61 @@ app_main_loop_rx_metadata(void) {
RTE_LOG(INFO, USER1, "Core %u is doing RX (with meta-data)\n",
rte_lcore_id());
for (i = 0; ; i = ((i + 1) & (app.n_ports - 1))) {
uint16_t n_mbufs;
while (!force_quit) {
for (i = 0; i < app.n_ports; i++) {
uint16_t n_mbufs;
n_mbufs = rte_eth_rx_burst(
app.ports[i],
0,
app.mbuf_rx.array,
app.burst_size_rx_read);
n_mbufs = rte_eth_rx_burst(
app.ports[i],
0,
app.mbuf_rx.array,
app.burst_size_rx_read);
if (n_mbufs == 0)
continue;
for (j = 0; j < n_mbufs; j++) {
struct rte_mbuf *m;
uint8_t *m_data, *key;
struct rte_ipv4_hdr *ip_hdr;
struct rte_ipv6_hdr *ipv6_hdr;
uint32_t ip_dst;
uint8_t *ipv6_dst;
uint32_t *signature, *k32;
m = app.mbuf_rx.array[j];
m_data = rte_pktmbuf_mtod(m, uint8_t *);
signature = RTE_MBUF_METADATA_UINT32_PTR(m,
APP_METADATA_OFFSET(0));
key = RTE_MBUF_METADATA_UINT8_PTR(m,
APP_METADATA_OFFSET(32));
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
ip_hdr = (struct rte_ipv4_hdr *)
&m_data[sizeof(struct rte_ether_hdr)];
ip_dst = ip_hdr->dst_addr;
k32 = (uint32_t *) key;
k32[0] = ip_dst & 0xFFFFFF00;
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
ipv6_hdr = (struct rte_ipv6_hdr *)
&m_data[sizeof(struct rte_ether_hdr)];
ipv6_dst = ipv6_hdr->dst_addr;
memcpy(key, ipv6_dst, 16);
} else
if (n_mbufs == 0)
continue;
*signature = test_hash(key, NULL, 0, 0);
}
for (j = 0; j < n_mbufs; j++) {
struct rte_mbuf *m;
uint8_t *m_data, *key;
struct rte_ipv4_hdr *ip_hdr;
struct rte_ipv6_hdr *ipv6_hdr;
uint32_t ip_dst;
uint8_t *ipv6_dst;
uint32_t *signature, *k32;
do {
ret = rte_ring_sp_enqueue_bulk(
app.rings_rx[i],
(void **) app.mbuf_rx.array,
n_mbufs,
NULL);
} while (ret == 0);
m = app.mbuf_rx.array[j];
m_data = rte_pktmbuf_mtod(m, uint8_t *);
signature = RTE_MBUF_METADATA_UINT32_PTR(m,
APP_METADATA_OFFSET(0));
key = RTE_MBUF_METADATA_UINT8_PTR(m,
APP_METADATA_OFFSET(32));
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
ip_hdr = (struct rte_ipv4_hdr *)
&m_data[sizeof(struct rte_ether_hdr)];
ip_dst = ip_hdr->dst_addr;
k32 = (uint32_t *) key;
k32[0] = ip_dst & 0xFFFFFF00;
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
ipv6_hdr = (struct rte_ipv6_hdr *)
&m_data[sizeof(struct rte_ether_hdr)];
ipv6_dst = ipv6_hdr->dst_addr;
memcpy(key, ipv6_dst, 16);
} else
continue;
*signature = test_hash(key, NULL, 0, 0);
}
do {
ret = rte_ring_sp_enqueue_bulk(
app.rings_rx[i],
(void **) app.mbuf_rx.array,
n_mbufs,
NULL);
} while (ret == 0 && !force_quit);
}
}
}

View File

@ -160,14 +160,16 @@ app_main_loop_worker_pipeline_lpm(void) {
/* Run-time */
#if APP_FLUSH == 0
for ( ; ; )
while (!force_quit)
rte_pipeline_run(p);
#else
for (i = 0; ; i++) {
i = 0;
while (!force_quit) {
rte_pipeline_run(p);
if ((i & APP_FLUSH) == 0)
rte_pipeline_flush(p);
i++;
}
#endif
}

View File

@ -158,14 +158,16 @@ app_main_loop_worker_pipeline_lpm_ipv6(void) {
/* Run-time */
#if APP_FLUSH == 0
for ( ; ; )
while (!force_quit)
rte_pipeline_run(p);
#else
for (i = 0; ; i++) {
i = 0;
while (!force_quit) {
rte_pipeline_run(p);
if ((i & APP_FLUSH) == 0)
rte_pipeline_flush(p);
i++;
}
#endif
}

View File

@ -122,14 +122,16 @@ app_main_loop_worker_pipeline_stub(void) {
/* Run-time */
#if APP_FLUSH == 0
for ( ; ; )
while (!force_quit)
rte_pipeline_run(p);
#else
for (i = 0; ; i++) {
i = 0;
while (!force_quit) {
rte_pipeline_run(p);
if ((i & APP_FLUSH) == 0)
rte_pipeline_flush(p);
i++;
}
#endif
}

View File

@ -48,24 +48,26 @@ app_main_loop_rx(void) {
RTE_LOG(INFO, USER1, "Core %u is doing RX\n", rte_lcore_id());
for (i = 0; ; i = ((i + 1) & (app.n_ports - 1))) {
uint16_t n_mbufs;
while (!force_quit) {
for (i = 0; i < app.n_ports; i++) {
uint16_t n_mbufs;
n_mbufs = rte_eth_rx_burst(
app.ports[i],
0,
app.mbuf_rx.array,
app.burst_size_rx_read);
n_mbufs = rte_eth_rx_burst(
app.ports[i],
0,
app.mbuf_rx.array,
app.burst_size_rx_read);
if (n_mbufs == 0)
continue;
if (n_mbufs == 0)
continue;
do {
ret = rte_ring_sp_enqueue_bulk(
app.rings_rx[i],
(void **) app.mbuf_rx.array,
n_mbufs, NULL);
} while (ret == 0);
do {
ret = rte_ring_sp_enqueue_bulk(
app.rings_rx[i],
(void **) app.mbuf_rx.array,
n_mbufs, NULL);
} while (ret == 0 && !force_quit);
}
}
}
@ -82,25 +84,27 @@ app_main_loop_worker(void) {
if (worker_mbuf == NULL)
rte_panic("Worker thread: cannot allocate buffer space\n");
for (i = 0; ; i = ((i + 1) & (app.n_ports - 1))) {
int ret;
while (!force_quit) {
for (i = 0; i < app.n_ports; i++) {
int ret;
ret = rte_ring_sc_dequeue_bulk(
app.rings_rx[i],
(void **) worker_mbuf->array,
app.burst_size_worker_read,
NULL);
if (ret == 0)
continue;
do {
ret = rte_ring_sp_enqueue_bulk(
app.rings_tx[i ^ 1],
ret = rte_ring_sc_dequeue_bulk(
app.rings_rx[i],
(void **) worker_mbuf->array,
app.burst_size_worker_write,
app.burst_size_worker_read,
NULL);
} while (ret == 0);
if (ret == 0)
continue;
do {
ret = rte_ring_sp_enqueue_bulk(
app.rings_tx[i ^ 1],
(void **) worker_mbuf->array,
app.burst_size_worker_write,
NULL);
} while (ret == 0 && !force_quit);
}
}
}
@ -110,45 +114,47 @@ app_main_loop_tx(void) {
RTE_LOG(INFO, USER1, "Core %u is doing TX\n", rte_lcore_id());
for (i = 0; ; i = ((i + 1) & (app.n_ports - 1))) {
uint16_t n_mbufs, n_pkts;
int ret;
while (!force_quit) {
for (i = 0; i < app.n_ports; i++) {
uint16_t n_mbufs, n_pkts;
int ret;
n_mbufs = app.mbuf_tx[i].n_mbufs;
n_mbufs = app.mbuf_tx[i].n_mbufs;
ret = rte_ring_sc_dequeue_bulk(
app.rings_tx[i],
(void **) &app.mbuf_tx[i].array[n_mbufs],
app.burst_size_tx_read,
NULL);
ret = rte_ring_sc_dequeue_bulk(
app.rings_tx[i],
(void **) &app.mbuf_tx[i].array[n_mbufs],
app.burst_size_tx_read,
NULL);
if (ret == 0)
continue;
if (ret == 0)
continue;
n_mbufs += app.burst_size_tx_read;
n_mbufs += app.burst_size_tx_read;
if (n_mbufs < app.burst_size_tx_write) {
app.mbuf_tx[i].n_mbufs = n_mbufs;
continue;
}
n_pkts = rte_eth_tx_burst(
app.ports[i],
0,
app.mbuf_tx[i].array,
n_mbufs);
if (n_pkts < n_mbufs) {
uint16_t k;
for (k = n_pkts; k < n_mbufs; k++) {
struct rte_mbuf *pkt_to_free;
pkt_to_free = app.mbuf_tx[i].array[k];
rte_pktmbuf_free(pkt_to_free);
if (n_mbufs < app.burst_size_tx_write) {
app.mbuf_tx[i].n_mbufs = n_mbufs;
continue;
}
}
app.mbuf_tx[i].n_mbufs = 0;
n_pkts = rte_eth_tx_burst(
app.ports[i],
0,
app.mbuf_tx[i].array,
n_mbufs);
if (n_pkts < n_mbufs) {
uint16_t k;
for (k = n_pkts; k < n_mbufs; k++) {
struct rte_mbuf *pkt_to_free;
pkt_to_free = app.mbuf_tx[i].array[k];
rte_pktmbuf_free(pkt_to_free);
}
}
app.mbuf_tx[i].n_mbufs = 0;
}
}
}

View File

@ -139,7 +139,7 @@ static cmdline_parse_token_string_t cmd_load_bpf_prm =
cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
.f = cmd_operate_bpf_ld_parsed,
.data = NULL,
.help_str = "bpf-load rx|tx <port> <queue> <J|M|B> <file_name>",
.help_str = "bpf-load rx|tx <port> <queue> <J|M|-> <file_name>",
.tokens = {
(void *)&cmd_load_bpf_start,
(void *)&cmd_load_bpf_dir,

View File

@ -468,6 +468,12 @@ static void cmd_help_long_parsed(void *parsed_result,
"mac_addr add port (port_id) vf (vf_id) (mac_address)\n"
" Add a MAC address for a VF on the port.\n\n"
"mcast_addr add (port_id) (mcast_addr)\n"
" Add a multicast MAC addresses on port_id.\n\n"
"mcast_addr remove (port_id) (mcast_addr)\n"
" Remove a multicast MAC address from port_id.\n\n"
"set vf mac addr (port_id) (vf_id) (XX:XX:XX:XX:XX:XX)\n"
" Set the MAC address for a VF from the PF.\n\n"
@ -3448,6 +3454,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
nb_item = 0;
char *str2 = strdup(str);
if (str2 == NULL)
return nb_item;
cur = strtok_r(str2, ",", &tmp);
while (cur != NULL) {
parsed_items[nb_item] = get_ptype(cur);
@ -4887,19 +4895,6 @@ cmd_tso_set_parsed(void *parsed_result,
ports[res->port_id].tso_segsz);
}
cmd_config_queue_tx_offloads(&ports[res->port_id]);
/* display warnings if configuration is not supported by the NIC */
ret = eth_dev_info_get_print_err(res->port_id, &dev_info);
if (ret != 0)
return;
if ((ports[res->port_id].tso_segsz != 0) &&
(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_TCP_TSO) == 0) {
fprintf(stderr,
"Warning: TSO enabled but not supported by port %d\n",
res->port_id);
}
cmd_reconfig_device_queue(res->port_id, 1, 1);
}
@ -4957,39 +4952,27 @@ struct cmd_tunnel_tso_set_result {
portid_t port_id;
};
static struct rte_eth_dev_info
check_tunnel_tso_nic_support(portid_t port_id)
static void
check_tunnel_tso_nic_support(portid_t port_id, uint64_t tx_offload_capa)
{
struct rte_eth_dev_info dev_info;
if (eth_dev_info_get_print_err(port_id, &dev_info) != 0)
return dev_info;
if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO))
fprintf(stderr,
"Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\n",
if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO))
printf("Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\n",
port_id);
if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO))
fprintf(stderr,
"Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\n",
if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO))
printf("Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\n",
port_id);
if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO))
fprintf(stderr,
"Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\n",
if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO))
printf("Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\n",
port_id);
if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO))
fprintf(stderr,
"Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\n",
if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO))
printf("Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\n",
port_id);
if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO))
fprintf(stderr,
"Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\n",
if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO))
printf("Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\n",
port_id);
if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO))
fprintf(stderr,
"Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\n",
if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO))
printf("Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\n",
port_id);
return dev_info;
}
static void
@ -4999,6 +4982,13 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
{
struct cmd_tunnel_tso_set_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
uint64_t all_tunnel_tso = RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO;
int ret;
if (port_id_is_invalid(res->port_id, ENABLED_WARN))
return;
@ -5010,28 +5000,19 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
if (!strcmp(res->mode, "set"))
ports[res->port_id].tunnel_tso_segsz = res->tso_segsz;
dev_info = check_tunnel_tso_nic_support(res->port_id);
if (ports[res->port_id].tunnel_tso_segsz == 0) {
ports[res->port_id].dev_conf.txmode.offloads &=
~(RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO);
ports[res->port_id].dev_conf.txmode.offloads &= ~all_tunnel_tso;
printf("TSO for tunneled packets is disabled\n");
} else {
uint64_t tso_offloads = (RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO);
ret = eth_dev_info_get_print_err(res->port_id, &dev_info);
if (ret != 0)
return;
ports[res->port_id].dev_conf.txmode.offloads |=
(tso_offloads & dev_info.tx_offload_capa);
printf("TSO segment size for tunneled packets is %d\n",
ports[res->port_id].tunnel_tso_segsz);
if ((all_tunnel_tso & dev_info.tx_offload_capa) == 0) {
fprintf(stderr, "Error: port=%u don't support tunnel TSO offloads.\n",
res->port_id);
return;
}
/* Below conditions are needed to make it work:
* (1) tunnel TSO is supported by the NIC;
@ -5044,14 +5025,23 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
* is not necessary for IPv6 tunneled pkts because there's no
* checksum in IP header anymore.
*/
if (!ports[res->port_id].parse_tunnel)
if (!ports[res->port_id].parse_tunnel) {
fprintf(stderr,
"Warning: csum parse_tunnel must be set so that tunneled packets are recognized\n");
"Error: csum parse_tunnel must be set so that tunneled packets are recognized\n");
return;
}
if (!(ports[res->port_id].dev_conf.txmode.offloads &
RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM))
RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)) {
fprintf(stderr,
"Warning: csum set outer-ip must be set to hw if outer L3 is IPv4; not necessary for IPv6\n");
"Error: csum set outer-ip must be set to hw if outer L3 is IPv4; not necessary for IPv6\n");
return;
}
check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa);
ports[res->port_id].dev_conf.txmode.offloads |=
(all_tunnel_tso & dev_info.tx_offload_capa);
printf("TSO segment size for tunneled packets is %d\n",
ports[res->port_id].tunnel_tso_segsz);
}
cmd_config_queue_tx_offloads(&ports[res->port_id]);

View File

@ -2980,7 +2980,7 @@ static const struct token token_list[] = {
[QUEUE_DESTROY] = {
.name = "destroy",
.help = "destroy a flow rule",
.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),
.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_POSTPONE),
NEXT_ENTRY(COMMON_QUEUE_ID)),
.args = ARGS(ARGS_ENTRY(struct buffer, queue)),
.call = parse_qo_destroy,
@ -4772,9 +4772,12 @@ static const struct token token_list[] = {
[ITEM_CONNTRACK] = {
.name = "conntrack",
.help = "conntrack state",
.priv = PRIV_ITEM(CONNTRACK,
sizeof(struct rte_flow_item_conntrack)),
.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
.call = parse_vc,
},
[ITEM_PORT_REPRESENTOR] = {
.name = "port_representor",

View File

@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table,
pattern, pattern_idx, actions, actions_idx, job, &error);
if (!flow) {
uint32_t flow_id = pf->id;
port_queue_flow_destroy(port_id, queue_id, true, 1, &flow_id);
free(pf);
free(job);
return port_flow_complain(&error);
}
@ -4245,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
continue;
printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",
share_group, share_rxq);
printf(" lcore %hhu Port %hu queue %hu\n",
printf(" lcore %u Port %hu queue %hu\n",
src_lc, src_port, src_rxq);
printf(" lcore %hhu Port %hu queue %hu\n",
printf(" lcore %u Port %hu queue %hu\n",
lc_id, fs->rx_port, fs->rx_queue);
printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",
nb_rxq);
@ -4428,7 +4427,6 @@ rss_fwd_config_setup(void)
queueid_t nb_q;
streamid_t sm_id;
int start;
int end;
nb_q = nb_rxq;
if (nb_q > nb_txq)
@ -4436,7 +4434,7 @@ rss_fwd_config_setup(void)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
cur_fwd_config.nb_fwd_streams =
(streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
(streamid_t) (nb_q / num_procs * cur_fwd_config.nb_fwd_ports);
if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
cur_fwd_config.nb_fwd_lcores =
@ -4458,7 +4456,6 @@ rss_fwd_config_setup(void)
* the 2~3 queue for secondary process.
*/
start = proc_id * nb_q / num_procs;
end = start + nb_q / num_procs;
rxp = 0;
rxq = start;
for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
@ -4477,8 +4474,6 @@ rss_fwd_config_setup(void)
continue;
rxp = 0;
rxq++;
if (rxq >= end)
rxq = start;
}
}
@ -4623,7 +4618,7 @@ icmp_echo_config_setup(void)
lcoreid_t lc_id;
uint16_t sm_id;
if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
(nb_txq * nb_fwd_ports);
else

View File

@ -568,21 +568,23 @@ static uint64_t
process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
uint64_t tx_offloads, int tso_enabled, struct rte_mbuf *m)
{
struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
struct rte_ipv6_hdr *ipv6_hdr = outer_l3_hdr;
struct rte_udp_hdr *udp_hdr;
uint64_t ol_flags = 0;
if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
ipv4_hdr->hdr_checksum = 0;
ol_flags |= RTE_MBUF_F_TX_OUTER_IPV4;
if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)
if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
else
} else {
struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
ipv4_hdr->hdr_checksum = 0;
ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
} else
}
} else {
ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
}
if (info->outer_l4_proto != IPPROTO_UDP)
return ol_flags;
@ -595,13 +597,6 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
/* Skip SW outer UDP checksum generation if HW supports it */
if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM) {
if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4))
udp_hdr->dgram_cksum
= rte_ipv4_phdr_cksum(ipv4_hdr, ol_flags);
else
udp_hdr->dgram_cksum
= rte_ipv6_phdr_cksum(ipv6_hdr, ol_flags);
ol_flags |= RTE_MBUF_F_TX_OUTER_UDP_CKSUM;
return ol_flags;
}
@ -867,17 +862,29 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
nb_pkt_per_burst);
inc_rx_burst_stats(fs, nb_rx);
if (unlikely(nb_rx == 0))
return;
if (unlikely(nb_rx == 0)) {
#ifndef RTE_LIB_GRO
return ;
#else
gro_enable = gro_ports[fs->rx_port].enable;
/*
* Check if packets need to be flushed in the GRO context
* due to a timeout.
*
* Continue only in GRO heavyweight mode and if there are
* packets in the GRO context.
*/
if (!gro_enable || (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) ||
(rte_gro_get_pkt_count(current_fwd_lcore()->gro_ctx) == 0))
return ;
#endif
}
fs->rx_packets += nb_rx;
rx_bad_ip_csum = 0;
rx_bad_l4_csum = 0;
rx_bad_outer_l4_csum = 0;
rx_bad_outer_ip_csum = 0;
#ifdef RTE_LIB_GRO
gro_enable = gro_ports[fs->rx_port].enable;
#endif
txp = &ports[fs->tx_port];
tx_offloads = txp->dev_conf.txmode.offloads;
@ -1105,6 +1112,7 @@ tunnel_update:
}
#ifdef RTE_LIB_GRO
gro_enable = gro_ports[fs->rx_port].enable;
if (unlikely(gro_enable)) {
if (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) {
nb_rx = rte_gro_reassemble_burst(pkts_burst, nb_rx,
@ -1124,6 +1132,8 @@ tunnel_update:
gro_pkts_num);
fs->gro_times = 0;
}
if (nb_rx == 0)
return;
}
pkts_ip_csum_recalc(pkts_burst, nb_rx, tx_offloads);

View File

@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
static int
port_ieee1588_fwd_begin(portid_t pi)
{
rte_eth_timesync_enable(pi);
return 0;
int ret;
ret = rte_eth_timesync_enable(pi);
if (ret)
printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
return ret;
}
static void
port_ieee1588_fwd_end(portid_t pi)
{
rte_eth_timesync_disable(pi);
int ret;
ret = rte_eth_timesync_disable(pi);
if (ret)
printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
}
static void

View File

@ -100,10 +100,6 @@ usage(char* progname)
"of peer ports.\n");
printf(" --eth-peer=X,M:M:M:M:M:M: set the MAC address of the X peer "
"port (0 <= X < %d).\n", RTE_MAX_ETHPORTS);
#endif
#ifdef RTE_LIB_LATENCYSTATS
printf(" --latencystats=N: enable latency and jitter statistics "
"monitoring on forwarding lcore id N.\n");
#endif
printf(" --disable-crc-strip: disable CRC stripping by hardware.\n");
printf(" --enable-scatter: enable scattered Rx.\n");
@ -167,8 +163,14 @@ usage(char* progname)
printf(" --disable-device-start: do not automatically start port\n");
printf(" --no-lsc-interrupt: disable link status change interrupt.\n");
printf(" --no-rmv-interrupt: disable device removal interrupt.\n");
#ifdef RTE_LIB_BITRATESTATS
printf(" --bitrate-stats=N: set the logical core N to perform "
"bit-rate calculation.\n");
#endif
#ifdef RTE_LIB_LATENCYSTATS
printf(" --latencystats=N: enable latency and jitter statistics "
"monitoring on forwarding lcore id N.\n");
#endif
printf(" --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed|all>: "
"enable print of designated event or all of them.\n");
printf(" --mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed||all>: "
@ -761,7 +763,7 @@ launch_args_parse(int argc, char** argv)
n = strtoul(optarg, &end, 10);
if ((optarg[0] == '\0') || (end == NULL) ||
(*end != '\0'))
break;
rte_exit(EXIT_FAILURE, "Invalid stats-period value\n");
stats_period = n;
break;
@ -862,8 +864,8 @@ launch_args_parse(int argc, char** argv)
}
if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
n = atoi(optarg);
if (n > 0 && n <= nb_lcores)
nb_fwd_lcores = (uint8_t) n;
if (n > 0 && (lcoreid_t)n <= nb_lcores)
nb_fwd_lcores = (lcoreid_t) n;
else
rte_exit(EXIT_FAILURE,
"nb-cores should be > 0 and <= %d\n",
@ -1113,7 +1115,9 @@ launch_args_parse(int argc, char** argv)
0,
&dev_info);
if (ret != 0)
return;
rte_exit(EXIT_FAILURE, "Failed to get driver "
"recommended burst size, please provide a "
"value between 1 and %d\n", MAX_PKT_BURST);
rec_nb_pkts = dev_info
.default_rxportconf.burst_size;
@ -1465,7 +1469,7 @@ launch_args_parse(int argc, char** argv)
break;
default:
usage(argv[0]);
fprintf(stderr, "Invalid option: %s\n", argv[optind]);
fprintf(stderr, "Invalid option: %s\n", argv[optind - 1]);
rte_exit(EXIT_FAILURE,
"Command line is incomplete or incorrect\n");
break;

View File

@ -11,7 +11,6 @@
#include <fcntl.h>
#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/mman.h>
#include <sys/select.h>
#endif
#include <sys/types.h>
#include <errno.h>
@ -2355,6 +2354,13 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
ports[port_id].rxq[queue_id].state =
rx_qinfo.queue_state;
} else if (rc == -ENOTSUP) {
/*
* Do not change the rxq state for primary process
* to ensure that the PMDs do not implement
* rte_eth_rx_queue_info_get can forward as before.
*/
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
return;
/*
* Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
* to ensure that the PMDs do not implement
@ -2380,6 +2386,13 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
ports[port_id].txq[queue_id].state =
tx_qinfo.queue_state;
} else if (rc == -ENOTSUP) {
/*
* Do not change the txq state for primary process
* to ensure that the PMDs do not implement
* rte_eth_tx_queue_info_get can forward as before.
*/
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
return;
/*
* Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
* to ensure that the PMDs do not implement
@ -2394,12 +2407,15 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
}
static void
update_queue_state(void)
update_queue_state(portid_t pid)
{
portid_t pi;
queueid_t qi;
RTE_ETH_FOREACH_DEV(pi) {
if (pid != pi && pid != (portid_t)RTE_PORT_ALL)
continue;
for (qi = 0; qi < nb_rxq; qi++)
update_rx_queue_state(pi, qi);
for (qi = 0; qi < nb_txq; qi++)
@ -2447,8 +2463,7 @@ start_packet_forwarding(int with_tx_first)
return;
if (stream_init != NULL) {
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
update_queue_state();
update_queue_state(RTE_PORT_ALL);
for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
stream_init(fwd_streams[i]);
}
@ -3211,8 +3226,7 @@ start_port(portid_t pid)
pl[cfg_pi++] = pi;
}
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
update_queue_state();
update_queue_state(pi);
if (at_least_one_port_successfully_started && !no_link_check)
check_all_ports_link_status(RTE_PORT_ALL);
@ -4631,25 +4645,17 @@ main(int argc, char** argv)
}
} else {
char c;
fd_set fds;
printf("Press enter to exit\n");
FD_ZERO(&fds);
FD_SET(0, &fds);
/* wait for signal or enter */
ret = select(1, &fds, NULL, NULL, NULL);
if (ret < 0 && errno != EINTR)
rte_exit(EXIT_FAILURE,
"Select failed: %s\n",
strerror(errno));
/* if got enter then consume it */
if (ret == 1 && read(0, &c, 1) < 0)
rte_exit(EXIT_FAILURE,
"Read failed: %s\n",
while (f_quit == 0) {
/* end-of-file or any character exits loop */
if (read(0, &c, 1) >= 0)
break;
if (errno == EINTR)
continue;
rte_exit(EXIT_FAILURE, "Read failed: %s\n",
strerror(errno));
}
}
}

View File

@ -84,7 +84,7 @@ extern volatile uint8_t f_quit;
/* Maximum number of pools supported per Rx queue */
#define MAX_MEMPOOL 8
typedef uint8_t lcoreid_t;
typedef uint32_t lcoreid_t;
typedef uint16_t portid_t;
typedef uint16_t queueid_t;
typedef uint16_t streamid_t;

View File

@ -15,7 +15,6 @@ test_sources = files(
'test_barrier.c',
'test_bitops.c',
'test_bitmap.c',
'test_bpf.c',
'test_byteorder.c',
'test_cksum.c',
'test_cksum_perf.c',
@ -161,8 +160,6 @@ fast_tests = [
['acl_autotest', true, true],
['atomic_autotest', false, true],
['bitmap_autotest', true, true],
['bpf_autotest', true, true],
['bpf_convert_autotest', true, true],
['bitops_autotest', true, true],
['byteorder_autotest', true, true],
['cksum_autotest', true, true],
@ -190,7 +187,6 @@ fast_tests = [
['fib_autotest', true, true],
['fib6_autotest', true, true],
['func_reentrancy_autotest', false, true],
['graph_autotest', true, true],
['hash_autotest', true, true],
['interrupt_autotest', true, true],
['ipfrag_autotest', false, true],
@ -297,7 +293,6 @@ perf_test_names = [
'trace_perf_autotest',
'ipsec_perf_autotest',
'thash_perf_autotest',
'graph_perf_autotest',
]
driver_test_names = [
@ -323,6 +318,10 @@ driver_test_names = [
dump_test_names = []
if not is_windows
fast_tests += [['graph_autotest', true, true]]
perf_test_names += 'graph_perf_autotest'
driver_test_names += [
'cryptodev_openssl_asym_autotest',
'eventdev_selftest_octeontx',
@ -428,6 +427,14 @@ if dpdk_conf.has('RTE_HAS_LIBPCAP')
endif
endif
if arch_subdir != 'x86' or dpdk_conf.get('RTE_ARCH_64')
test_sources += 'test_bpf.c'
fast_tests += [
['bpf_autotest', true, true],
['bpf_convert_autotest', true, true],
]
endif
if cc.has_argument('-Wno-format-truncation')
cflags += '-Wno-format-truncation'
endif
@ -472,15 +479,21 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
# some perf tests (eg: memcpy perf autotest)take very long
# to complete, so timeout to 10 minutes
timeout_seconds = 600
timeout_seconds_fast = 10
test_no_huge_args = ['--no-huge', '-m', '2048']
has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
if not has_hugepage
if arch_subdir == 'ppc'
# On ppc64, without huge pages, PA would be the default but fails like:
# EAL: Cannot use IOVA as 'PA' since physical addresses are not available
test_no_huge_args += '--iova-mode=va'
endif
endif
foreach arg : fast_tests
test_args = []

View File

@ -17,6 +17,7 @@
#include <dirent.h>
#include <rte_string_fns.h> /* strlcpy */
#include <rte_devargs.h>
#ifdef RTE_EXEC_ENV_FREEBSD
#define self "curproc"
@ -34,6 +35,34 @@ extern uint16_t flag_for_send_pkts;
#endif
#endif
#define PREFIX_ALLOW "--allow="
static int
add_parameter_allow(char **argv, int max_capacity)
{
struct rte_devargs *devargs;
int count = 0;
RTE_EAL_DEVARGS_FOREACH(NULL, devargs) {
if (strlen(devargs->name) == 0)
continue;
if (devargs->data == NULL || strlen(devargs->data) == 0) {
if (asprintf(&argv[count], PREFIX_ALLOW"%s", devargs->name) < 0)
break;
} else {
if (asprintf(&argv[count], PREFIX_ALLOW"%s,%s",
devargs->name, devargs->data) < 0)
break;
}
if (++count == max_capacity)
break;
}
return count;
}
/*
* launches a second copy of the test process using the given argv parameters,
* which should include argv[0] as the process name. To identify in the
@ -43,8 +72,10 @@ extern uint16_t flag_for_send_pkts;
static inline int
process_dup(const char *const argv[], int numargs, const char *env_value)
{
int num;
char *argv_cpy[numargs + 1];
int num = 0;
char **argv_cpy;
int allow_num;
int argv_num;
int i, status;
char path[32];
#ifdef RTE_LIB_PDUMP
@ -58,11 +89,21 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
if (pid < 0)
return -1;
else if (pid == 0) {
allow_num = rte_devargs_type_count(RTE_DEVTYPE_ALLOWED);
argv_num = numargs + allow_num + 1;
argv_cpy = calloc(argv_num, sizeof(char *));
if (!argv_cpy)
rte_panic("Memory allocation failed\n");
/* make a copy of the arguments to be passed to exec */
for (i = 0; i < numargs; i++)
for (i = 0; i < numargs; i++) {
argv_cpy[i] = strdup(argv[i]);
argv_cpy[i] = NULL;
num = numargs;
if (argv_cpy[i] == NULL)
rte_panic("Error dup args\n");
}
if (allow_num > 0)
num = add_parameter_allow(&argv_cpy[i], allow_num);
num += numargs;
#ifdef RTE_EXEC_ENV_LINUX
{

View File

@ -343,11 +343,13 @@ unit_test_suite_runner(struct unit_test_suite *suite)
if (test_success == TEST_SUCCESS)
suite->succeeded++;
else if (test_success == TEST_SKIPPED)
else if (test_success == TEST_SKIPPED) {
suite->skipped++;
else if (test_success == -ENOTSUP)
suite->executed--;
} else if (test_success == -ENOTSUP) {
suite->unsupported++;
else
suite->executed--;
} else
suite->failed++;
} else if (test_success == -ENOTSUP) {
suite->unsupported++;

View File

@ -127,7 +127,7 @@ struct unit_test_case {
{ setup, teardown, NULL, testcase, #testcase, 1, data }
#define TEST_CASE_NAMED_ST(name, setup, teardown, testcase) \
{ setup, teardown, NULL, testcase, name, 1, NULL }
{ setup, teardown, testcase, NULL, name, 1, NULL }
#define TEST_CASE_NAMED_WITH_DATA(name, setup, teardown, testcase, data) \
{ setup, teardown, NULL, testcase, name, 1, data }

View File

@ -3341,6 +3341,7 @@ test_bpf_filter_sanity(pcap_t *pcap)
struct rte_ipv4_hdr ip_hdr;
} *hdr;
memset(&mb, 0, sizeof(mb));
dummy_mbuf_prep(&mb, tbuf, sizeof(tbuf), plen);
m = &mb;

View File

@ -168,7 +168,7 @@ test_cfgfile_invalid_section_header(void)
struct rte_cfgfile *cfgfile;
cfgfile = rte_cfgfile_load(CFG_FILES_ETC "/invalid_section.ini", 0);
TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
return 0;
}
@ -185,7 +185,7 @@ test_cfgfile_invalid_comment(void)
cfgfile = rte_cfgfile_load_with_params(CFG_FILES_ETC "/sample2.ini", 0,
&params);
TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
return 0;
}
@ -196,7 +196,7 @@ test_cfgfile_invalid_key_value_pair(void)
struct rte_cfgfile *cfgfile;
cfgfile = rte_cfgfile_load(CFG_FILES_ETC "/empty_key_value.ini", 0);
TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
return 0;
}
@ -236,7 +236,7 @@ test_cfgfile_missing_section(void)
struct rte_cfgfile *cfgfile;
cfgfile = rte_cfgfile_load(CFG_FILES_ETC "/missing_section.ini", 0);
TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
return 0;
}

View File

@ -194,6 +194,8 @@ post_process_raw_dp_op(void *user_data, uint32_t index __rte_unused,
static struct crypto_testsuite_params testsuite_params = { NULL };
struct crypto_testsuite_params *p_testsuite_params = &testsuite_params;
static struct crypto_unittest_params unittest_params;
static bool enq_cb_called;
static bool deq_cb_called;
void
process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@ -6258,6 +6260,9 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
tdata->digest.len) < 0)
return TEST_SKIPPED;
if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
return TEST_SKIPPED;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
uint64_t feat_flags = dev_info.feature_flags;
@ -7636,6 +7641,9 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
if (global_api_test_type == CRYPTODEV_RAW_API_TEST)
return TEST_SKIPPED;
if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
return TEST_SKIPPED;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
uint64_t feat_flags = dev_info.feature_flags;
@ -8608,7 +8616,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
/* Out of place support */
if (oop) {
/*
* For out-op-place we need to alloc another mbuf
* For out-of-place we need to alloc another mbuf
*/
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
rte_pktmbuf_append(ut_params->obuf, output_vec_len);
@ -8817,7 +8825,7 @@ test_pdcp_proto_SGL(int i, int oop,
/* Out of place support */
if (oop) {
/*
* For out-op-place we need to alloc another mbuf
* For out-of-place we need to alloc another mbuf
*/
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
rte_pktmbuf_append(ut_params->obuf, frag_size_oop);
@ -9822,7 +9830,7 @@ test_ipsec_ah_proto_all(const struct ipsec_test_flags *flags)
}
static int
test_ipsec_proto_display_list(const void *data __rte_unused)
test_ipsec_proto_display_list(void)
{
struct ipsec_test_flags flags;
@ -9834,7 +9842,7 @@ test_ipsec_proto_display_list(const void *data __rte_unused)
}
static int
test_ipsec_proto_ah_tunnel_ipv4(const void *data __rte_unused)
test_ipsec_proto_ah_tunnel_ipv4(void)
{
struct ipsec_test_flags flags;
@ -9847,7 +9855,7 @@ test_ipsec_proto_ah_tunnel_ipv4(const void *data __rte_unused)
}
static int
test_ipsec_proto_ah_transport_ipv4(const void *data __rte_unused)
test_ipsec_proto_ah_transport_ipv4(void)
{
struct ipsec_test_flags flags;
@ -9860,7 +9868,7 @@ test_ipsec_proto_ah_transport_ipv4(const void *data __rte_unused)
}
static int
test_ipsec_proto_iv_gen(const void *data __rte_unused)
test_ipsec_proto_iv_gen(void)
{
struct ipsec_test_flags flags;
@ -9872,7 +9880,7 @@ test_ipsec_proto_iv_gen(const void *data __rte_unused)
}
static int
test_ipsec_proto_sa_exp_pkts_soft(const void *data __rte_unused)
test_ipsec_proto_sa_exp_pkts_soft(void)
{
struct ipsec_test_flags flags;
@ -9884,7 +9892,7 @@ test_ipsec_proto_sa_exp_pkts_soft(const void *data __rte_unused)
}
static int
test_ipsec_proto_sa_exp_pkts_hard(const void *data __rte_unused)
test_ipsec_proto_sa_exp_pkts_hard(void)
{
struct ipsec_test_flags flags;
@ -9896,7 +9904,7 @@ test_ipsec_proto_sa_exp_pkts_hard(const void *data __rte_unused)
}
static int
test_ipsec_proto_err_icv_corrupt(const void *data __rte_unused)
test_ipsec_proto_err_icv_corrupt(void)
{
struct ipsec_test_flags flags;
@ -9908,7 +9916,7 @@ test_ipsec_proto_err_icv_corrupt(const void *data __rte_unused)
}
static int
test_ipsec_proto_udp_encap_custom_ports(const void *data __rte_unused)
test_ipsec_proto_udp_encap_custom_ports(void)
{
struct ipsec_test_flags flags;
@ -9925,7 +9933,7 @@ test_ipsec_proto_udp_encap_custom_ports(const void *data __rte_unused)
}
static int
test_ipsec_proto_udp_encap(const void *data __rte_unused)
test_ipsec_proto_udp_encap(void)
{
struct ipsec_test_flags flags;
@ -9937,7 +9945,7 @@ test_ipsec_proto_udp_encap(const void *data __rte_unused)
}
static int
test_ipsec_proto_tunnel_src_dst_addr_verify(const void *data __rte_unused)
test_ipsec_proto_tunnel_src_dst_addr_verify(void)
{
struct ipsec_test_flags flags;
@ -9949,7 +9957,7 @@ test_ipsec_proto_tunnel_src_dst_addr_verify(const void *data __rte_unused)
}
static int
test_ipsec_proto_tunnel_dst_addr_verify(const void *data __rte_unused)
test_ipsec_proto_tunnel_dst_addr_verify(void)
{
struct ipsec_test_flags flags;
@ -9961,7 +9969,7 @@ test_ipsec_proto_tunnel_dst_addr_verify(const void *data __rte_unused)
}
static int
test_ipsec_proto_udp_ports_verify(const void *data __rte_unused)
test_ipsec_proto_udp_ports_verify(void)
{
struct ipsec_test_flags flags;
@ -9974,7 +9982,7 @@ test_ipsec_proto_udp_ports_verify(const void *data __rte_unused)
}
static int
test_ipsec_proto_inner_ip_csum(const void *data __rte_unused)
test_ipsec_proto_inner_ip_csum(void)
{
struct ipsec_test_flags flags;
@ -9986,7 +9994,7 @@ test_ipsec_proto_inner_ip_csum(const void *data __rte_unused)
}
static int
test_ipsec_proto_inner_l4_csum(const void *data __rte_unused)
test_ipsec_proto_inner_l4_csum(void)
{
struct ipsec_test_flags flags;
@ -9998,7 +10006,7 @@ test_ipsec_proto_inner_l4_csum(const void *data __rte_unused)
}
static int
test_ipsec_proto_tunnel_v4_in_v4(const void *data __rte_unused)
test_ipsec_proto_tunnel_v4_in_v4(void)
{
struct ipsec_test_flags flags;
@ -10011,7 +10019,7 @@ test_ipsec_proto_tunnel_v4_in_v4(const void *data __rte_unused)
}
static int
test_ipsec_proto_tunnel_v6_in_v6(const void *data __rte_unused)
test_ipsec_proto_tunnel_v6_in_v6(void)
{
struct ipsec_test_flags flags;
@ -10024,7 +10032,7 @@ test_ipsec_proto_tunnel_v6_in_v6(const void *data __rte_unused)
}
static int
test_ipsec_proto_tunnel_v4_in_v6(const void *data __rte_unused)
test_ipsec_proto_tunnel_v4_in_v6(void)
{
struct ipsec_test_flags flags;
@ -10037,7 +10045,7 @@ test_ipsec_proto_tunnel_v4_in_v6(const void *data __rte_unused)
}
static int
test_ipsec_proto_tunnel_v6_in_v4(const void *data __rte_unused)
test_ipsec_proto_tunnel_v6_in_v4(void)
{
struct ipsec_test_flags flags;
@ -10050,7 +10058,7 @@ test_ipsec_proto_tunnel_v6_in_v4(const void *data __rte_unused)
}
static int
test_ipsec_proto_transport_v4(const void *data __rte_unused)
test_ipsec_proto_transport_v4(void)
{
struct ipsec_test_flags flags;
@ -10063,7 +10071,7 @@ test_ipsec_proto_transport_v4(const void *data __rte_unused)
}
static int
test_ipsec_proto_transport_l4_csum(const void *data __rte_unused)
test_ipsec_proto_transport_l4_csum(void)
{
struct ipsec_test_flags flags = {
.l4_csum = true,
@ -10074,7 +10082,7 @@ test_ipsec_proto_transport_l4_csum(const void *data __rte_unused)
}
static int
test_ipsec_proto_stats(const void *data __rte_unused)
test_ipsec_proto_stats(void)
{
struct ipsec_test_flags flags;
@ -10086,7 +10094,7 @@ test_ipsec_proto_stats(const void *data __rte_unused)
}
static int
test_ipsec_proto_pkt_fragment(const void *data __rte_unused)
test_ipsec_proto_pkt_fragment(void)
{
struct ipsec_test_flags flags;
@ -10099,7 +10107,7 @@ test_ipsec_proto_pkt_fragment(const void *data __rte_unused)
}
static int
test_ipsec_proto_copy_df_inner_0(const void *data __rte_unused)
test_ipsec_proto_copy_df_inner_0(void)
{
struct ipsec_test_flags flags;
@ -10111,7 +10119,7 @@ test_ipsec_proto_copy_df_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_proto_copy_df_inner_1(const void *data __rte_unused)
test_ipsec_proto_copy_df_inner_1(void)
{
struct ipsec_test_flags flags;
@ -10123,7 +10131,7 @@ test_ipsec_proto_copy_df_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_proto_set_df_0_inner_1(const void *data __rte_unused)
test_ipsec_proto_set_df_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -10135,7 +10143,7 @@ test_ipsec_proto_set_df_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_proto_set_df_1_inner_0(const void *data __rte_unused)
test_ipsec_proto_set_df_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -10147,7 +10155,7 @@ test_ipsec_proto_set_df_1_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv4_copy_dscp_inner_0(const void *data __rte_unused)
test_ipsec_proto_ipv4_copy_dscp_inner_0(void)
{
struct ipsec_test_flags flags;
@ -10159,7 +10167,7 @@ test_ipsec_proto_ipv4_copy_dscp_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv4_copy_dscp_inner_1(const void *data __rte_unused)
test_ipsec_proto_ipv4_copy_dscp_inner_1(void)
{
struct ipsec_test_flags flags;
@ -10171,7 +10179,7 @@ test_ipsec_proto_ipv4_copy_dscp_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv4_set_dscp_0_inner_1(const void *data __rte_unused)
test_ipsec_proto_ipv4_set_dscp_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -10187,7 +10195,7 @@ test_ipsec_proto_ipv4_set_dscp_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv4_set_dscp_1_inner_0(const void *data __rte_unused)
test_ipsec_proto_ipv4_set_dscp_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -10203,7 +10211,7 @@ test_ipsec_proto_ipv4_set_dscp_1_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv6_copy_dscp_inner_0(const void *data __rte_unused)
test_ipsec_proto_ipv6_copy_dscp_inner_0(void)
{
struct ipsec_test_flags flags;
@ -10217,7 +10225,7 @@ test_ipsec_proto_ipv6_copy_dscp_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv6_copy_dscp_inner_1(const void *data __rte_unused)
test_ipsec_proto_ipv6_copy_dscp_inner_1(void)
{
struct ipsec_test_flags flags;
@ -10231,7 +10239,7 @@ test_ipsec_proto_ipv6_copy_dscp_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv6_set_dscp_0_inner_1(const void *data __rte_unused)
test_ipsec_proto_ipv6_set_dscp_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -10249,7 +10257,7 @@ test_ipsec_proto_ipv6_set_dscp_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv6_set_dscp_1_inner_0(const void *data __rte_unused)
test_ipsec_proto_ipv6_set_dscp_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -10455,7 +10463,7 @@ test_PDCP_PROTO_all(void)
}
static int
test_ipsec_proto_ipv4_ttl_decrement(const void *data __rte_unused)
test_ipsec_proto_ipv4_ttl_decrement(void)
{
struct ipsec_test_flags flags = {
.dec_ttl_or_hop_limit = true
@ -10465,7 +10473,7 @@ test_ipsec_proto_ipv4_ttl_decrement(const void *data __rte_unused)
}
static int
test_ipsec_proto_ipv6_hop_limit_decrement(const void *data __rte_unused)
test_ipsec_proto_ipv6_hop_limit_decrement(void)
{
struct ipsec_test_flags flags = {
.ipv6 = true,
@ -12601,6 +12609,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
RTE_SET_USED(ops);
RTE_SET_USED(user_param);
enq_cb_called = true;
printf("crypto enqueue callback called\n");
return nb_ops;
}
@ -12614,21 +12623,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
RTE_SET_USED(ops);
RTE_SET_USED(user_param);
deq_cb_called = true;
printf("crypto dequeue callback called\n");
return nb_ops;
}
/*
* Thread using enqueue/dequeue callback with RCU.
* Process enqueue/dequeue NULL crypto request to verify callback with RCU.
*/
static int
test_enqdeq_callback_thread(void *arg)
test_enqdeq_callback_null_cipher(void)
{
RTE_SET_USED(arg);
/* DP thread calls rte_cryptodev_enqueue_burst()/
* rte_cryptodev_dequeue_burst() and invokes callback.
*/
test_null_burst_operation();
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
/* Setup Cipher Parameters */
ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
ut_params->cipher_xform.next = &ut_params->auth_xform;
ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
/* Setup Auth Parameters */
ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
ut_params->auth_xform.next = NULL;
ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
/* Create Crypto session */
ut_params->sess = rte_cryptodev_sym_session_create(ts_params->valid_devs[0],
&ut_params->auth_xform, ts_params->session_mpool);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC);
TEST_ASSERT_NOT_NULL(ut_params->op, "Failed to allocate symmetric crypto op");
/* Allocate mbuf */
ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
TEST_ASSERT_NOT_NULL(ut_params->ibuf, "Failed to allocate mbuf");
/* Append some random data */
TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(ut_params->ibuf, sizeof(unsigned int)),
"no room to append data");
rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
ut_params->op->sym->m_src = ut_params->ibuf;
/* Process crypto operation */
TEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0], ut_params->op),
"failed to process sym crypto op");
return 0;
}
@ -12636,6 +12682,7 @@ static int
test_enq_callback_setup(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct rte_cryptodev_sym_capability_idx cap_idx;
struct rte_cryptodev_info dev_info;
struct rte_cryptodev_qp_conf qp_conf = {
.nb_descriptors = MAX_NUM_OPS_INFLIGHT
@ -12643,6 +12690,19 @@ test_enq_callback_setup(void)
struct rte_cryptodev_cb *cb;
uint16_t qp_id = 0;
int j = 0;
/* Verify the crypto capabilities for which enqueue/dequeue is done. */
cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
&cap_idx) == NULL)
return TEST_SKIPPED;
cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL;
if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
&cap_idx) == NULL)
return TEST_SKIPPED;
/* Stop the device in case it's started so it can be configured */
rte_cryptodev_stop(ts_params->valid_devs[0]);
@ -12666,9 +12726,16 @@ test_enq_callback_setup(void)
qp_conf.nb_descriptors, qp_id,
ts_params->valid_devs[0]);
enq_cb_called = false;
/* Test with invalid crypto device */
cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_enq_callback, NULL);
if (rte_errno == ENOTSUP) {
RTE_LOG(ERR, USER1, "%s line %d: "
"rte_cryptodev_add_enq_callback() "
"Not supported, skipped\n", __func__, __LINE__);
return TEST_SKIPPED;
}
TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
"cryptodev %u did not fail",
qp_id, RTE_CRYPTO_MAX_DEVS);
@ -12698,12 +12765,11 @@ test_enq_callback_setup(void)
rte_cryptodev_start(ts_params->valid_devs[0]);
/* Launch a thread */
rte_eal_remote_launch(test_enqdeq_callback_thread, NULL,
rte_get_next_lcore(-1, 1, 0));
TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto Processing failed");
/* Wait until reader exited. */
rte_eal_mp_wait_lcore();
/* Wait until callback not called. */
while (!enq_cb_called && (j++ < 10))
rte_delay_ms(10);
/* Test with invalid crypto device */
TEST_ASSERT_FAIL(rte_cryptodev_remove_enq_callback(
@ -12728,6 +12794,8 @@ test_enq_callback_setup(void)
"qp %u on cryptodev %u",
qp_id, ts_params->valid_devs[0]);
TEST_ASSERT(enq_cb_called == true, "Crypto enqueue callback not called");
return TEST_SUCCESS;
}
@ -12735,6 +12803,7 @@ static int
test_deq_callback_setup(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct rte_cryptodev_sym_capability_idx cap_idx;
struct rte_cryptodev_info dev_info;
struct rte_cryptodev_qp_conf qp_conf = {
.nb_descriptors = MAX_NUM_OPS_INFLIGHT
@ -12742,6 +12811,19 @@ test_deq_callback_setup(void)
struct rte_cryptodev_cb *cb;
uint16_t qp_id = 0;
int j = 0;
/* Verify the crypto capabilities for which enqueue/dequeue is done. */
cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
&cap_idx) == NULL)
return TEST_SKIPPED;
cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL;
if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
&cap_idx) == NULL)
return TEST_SKIPPED;
/* Stop the device in case it's started so it can be configured */
rte_cryptodev_stop(ts_params->valid_devs[0]);
@ -12765,9 +12847,16 @@ test_deq_callback_setup(void)
qp_conf.nb_descriptors, qp_id,
ts_params->valid_devs[0]);
deq_cb_called = false;
/* Test with invalid crypto device */
cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_deq_callback, NULL);
if (rte_errno == ENOTSUP) {
RTE_LOG(ERR, USER1, "%s line %d: "
"rte_cryptodev_add_deq_callback() "
"Not supported, skipped\n", __func__, __LINE__);
return TEST_SKIPPED;
}
TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
"cryptodev %u did not fail",
qp_id, RTE_CRYPTO_MAX_DEVS);
@ -12797,12 +12886,11 @@ test_deq_callback_setup(void)
rte_cryptodev_start(ts_params->valid_devs[0]);
/* Launch a thread */
rte_eal_remote_launch(test_enqdeq_callback_thread, NULL,
rte_get_next_lcore(-1, 1, 0));
TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto processing failed");
/* Wait until reader exited. */
rte_eal_mp_wait_lcore();
/* Wait until callback not called. */
while (!deq_cb_called && (j++ < 10))
rte_delay_ms(10);
/* Test with invalid crypto device */
TEST_ASSERT_FAIL(rte_cryptodev_remove_deq_callback(
@ -12827,6 +12915,8 @@ test_deq_callback_setup(void)
"qp %u on cryptodev %u",
qp_id, ts_params->valid_devs[0]);
TEST_ASSERT(deq_cb_called == true, "Crypto dequeue callback not called");
return TEST_SUCCESS;
}
@ -13003,7 +13093,7 @@ test_AES_GMAC_authentication(const struct gmac_test_data *tdata)
retval = create_gmac_session(ts_params->valid_devs[0],
tdata, RTE_CRYPTO_AUTH_OP_GENERATE);
if (retval == -ENOTSUP)
if (retval == TEST_SKIPPED)
return TEST_SKIPPED;
if (retval < 0)
return retval;
@ -13134,7 +13224,7 @@ test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata)
retval = create_gmac_session(ts_params->valid_devs[0],
tdata, RTE_CRYPTO_AUTH_OP_VERIFY);
if (retval == -ENOTSUP)
if (retval == TEST_SKIPPED)
return TEST_SKIPPED;
if (retval < 0)
return retval;
@ -13263,7 +13353,7 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
retval = create_gmac_session(ts_params->valid_devs[0],
tdata, RTE_CRYPTO_AUTH_OP_GENERATE);
if (retval == -ENOTSUP)
if (retval == TEST_SKIPPED)
return TEST_SKIPPED;
if (retval < 0)
return retval;
@ -13880,7 +13970,7 @@ test_authentication_verify_fail_when_data_corruption(
reference,
RTE_CRYPTO_AUTH_OP_VERIFY);
if (retval == -ENOTSUP)
if (retval == TEST_SKIPPED)
return TEST_SKIPPED;
if (retval < 0)
return retval;
@ -13967,6 +14057,8 @@ test_authentication_verify_GMAC_fail_when_corruption(
reference,
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_CIPHER_OP_DECRYPT);
if (retval == TEST_SKIPPED)
return TEST_SKIPPED;
if (retval < 0)
return retval;
@ -14057,8 +14149,7 @@ test_authenticated_decryption_fail_when_corruption(
reference,
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_CIPHER_OP_DECRYPT);
if (retval == -ENOTSUP)
if (retval == TEST_SKIPPED)
return TEST_SKIPPED;
if (retval < 0)
return retval;
@ -14532,7 +14623,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
}
/*
* For out-op-place we need to alloc another mbuf
* For out-of-place we need to alloc another mbuf
*/
if (oop) {
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);

View File

@ -54,11 +54,15 @@ union test_case_structure {
struct rsa_test_data_2 rsa_data;
};
struct vector_details {
uint32_t vector_size;
const void *address;
};
struct test_cases_array {
uint32_t size;
const void *address[TEST_VECTOR_SIZE];
struct vector_details details[TEST_VECTOR_SIZE];
};
static struct test_cases_array test_vector = {0, { NULL } };
static struct test_cases_array test_vector = {0, {} };
static uint32_t test_index;
@ -513,14 +517,14 @@ error_exit:
}
static int
test_one_case(const void *test_case, int sessionless)
test_one_case(struct vector_details test_case, int sessionless)
{
int status = TEST_SUCCESS, i = 0;
char test_msg[ASYM_TEST_MSG_LEN + 1];
/* Map the case to union */
union test_case_structure tc;
memcpy(&tc, test_case, sizeof(tc));
rte_memcpy(&tc, test_case.address, RTE_MIN(sizeof(tc), test_case.vector_size));
if (tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_MODEX
|| tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_MODINV) {
@ -572,7 +576,8 @@ load_test_vectors(void)
"TEST_VECTOR_SIZE too small\n");
return -1;
}
test_vector.address[test_vector.size] = &modex_test_case[i];
test_vector.details[test_vector.size].address = &modex_test_case[i];
test_vector.details[test_vector.size].vector_size = sizeof(modex_test_case[i]);
test_vector.size++;
}
/* Load MODINV vector*/
@ -583,7 +588,8 @@ load_test_vectors(void)
"TEST_VECTOR_SIZE too small\n");
return -1;
}
test_vector.address[test_vector.size] = &modinv_test_case[i];
test_vector.details[test_vector.size].address = &modinv_test_case[i];
test_vector.details[test_vector.size].vector_size = sizeof(modinv_test_case[i]);
test_vector.size++;
}
/* Load RSA vector*/
@ -594,7 +600,8 @@ load_test_vectors(void)
"TEST_VECTOR_SIZE too small\n");
return -1;
}
test_vector.address[test_vector.size] = &rsa_test_case_list[i];
test_vector.details[test_vector.size].address = &rsa_test_case_list[i];
test_vector.details[test_vector.size].vector_size = sizeof(rsa_test_case_list[i]);
test_vector.size++;
}
return 0;
@ -619,12 +626,12 @@ test_one_by_one(void)
/* Go through all test cases */
test_index = 0;
for (i = 0; i < test_vector.size; i++) {
if (test_one_case(test_vector.address[i], 0) != TEST_SUCCESS)
if (test_one_case(test_vector.details[i], 0) != TEST_SUCCESS)
status = TEST_FAILED;
}
if (sessionless) {
for (i = 0; i < test_vector.size; i++) {
if (test_one_case(test_vector.address[i], 1)
if (test_one_case(test_vector.details[i], 1)
!= TEST_SUCCESS)
status = TEST_FAILED;
}
@ -946,8 +953,6 @@ ut_setup_asym(void)
qp_id, ts_params->valid_devs[0]);
}
rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
/* Start the device */
TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),
"Failed to start cryptodev %u",
@ -960,9 +965,6 @@ static void
ut_teardown_asym(void)
{
struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
struct rte_cryptodev_stats stats;
rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
/* Stop the device */
rte_cryptodev_stop(ts_params->valid_devs[0]);
@ -1021,7 +1023,7 @@ test_capability(void)
RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {
RTE_LOG(INFO, USER1,
"Device doesn't support asymmetric. Test Skipped\n");
return TEST_SUCCESS;
return TEST_SKIPPED;
}
/* print xform capability */
@ -1036,6 +1038,7 @@ test_capability(void)
capa = rte_cryptodev_asym_capability_get(dev_id,
(const struct
rte_cryptodev_asym_capability_idx *) &idx);
TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
print_asym_capa(capa);
}
}
@ -1602,7 +1605,7 @@ error_exit:
}
static int
test_dh_keygenration(void)
test_dh_key_generation(void)
{
int status;
@ -2204,7 +2207,7 @@ static struct unit_test_suite cryptodev_openssl_asym_testsuite = {
TEST_CASE_ST(ut_setup_asym, ut_teardown_asym, test_capability),
TEST_CASE_ST(ut_setup_asym, ut_teardown_asym, test_dsa),
TEST_CASE_ST(ut_setup_asym, ut_teardown_asym,
test_dh_keygenration),
test_dh_key_generation),
TEST_CASE_ST(ut_setup_asym, ut_teardown_asym, test_rsa_enc_dec),
TEST_CASE_ST(ut_setup_asym, ut_teardown_asym,
test_rsa_sign_verify),

View File

@ -478,8 +478,10 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_snow_test_case_1 = {
},
.cipher_iv = {
.data = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
.len = 0,
.len = 16,
},
.cipher = {
.len_bits = 516 << 3,
@ -917,8 +919,10 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_zuc_test_case_1 = {
},
.cipher_iv = {
.data = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
.len = 0,
.len = 16,
},
.cipher = {
.len_bits = 516 << 3,

View File

@ -671,7 +671,7 @@ test_missing_c_flag(void)
launch_proc(argv26) == 0 || launch_proc(argv27) == 0 ||
launch_proc(argv28) == 0 || launch_proc(argv30) == 0) {
printf("Error - "
"process ran without error with invalid --lcore flag\n");
"process ran without error with invalid --lcores flag\n");
return -1;
}

View File

@ -958,11 +958,10 @@ configure_cryptodev(void)
return TEST_FAILED;
}
/* Create a NULL crypto device */
nb_devs = rte_cryptodev_device_count_by_driver(
rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_NULL_PMD)));
nb_devs = rte_cryptodev_count();
if (!nb_devs) {
/* Create a NULL crypto device */
ret = rte_vdev_init(
RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);

View File

@ -482,6 +482,10 @@ tx_adapter_service(void)
int internal_port;
uint32_t cap;
/* Initialize mbufs */
for (i = 0; i < RING_SIZE; i++)
rte_pktmbuf_reset(&bufs[i]);
memset(&dev_conf, 0, sizeof(dev_conf));
err = rte_event_eth_tx_adapter_caps_get(TEST_DEV_ID, TEST_ETHDEV_ID,
&cap);

View File

@ -33,9 +33,15 @@ testsuite_setup(void)
uint8_t count;
count = rte_event_dev_count();
if (!count) {
int ret;
printf("Failed to find a valid event device,"
" testing with event_skeleton device\n");
return rte_vdev_init("event_skeleton", NULL);
" trying with event_skeleton device\n");
ret = rte_vdev_init("event_skeleton", NULL);
if (ret != 0) {
printf("No event device, skipping\n");
return TEST_SKIPPED;
}
}
return TEST_SUCCESS;
}

View File

@ -21,23 +21,41 @@ struct fbarray_testsuite_params {
};
static struct fbarray_testsuite_params param;
static struct fbarray_testsuite_params unaligned;
#define FBARRAY_TEST_ARR_NAME "fbarray_autotest"
#define FBARRAY_TEST_LEN 256
#define FBARRAY_UNALIGNED_TEST_ARR_NAME "fbarray_unaligned_autotest"
#define FBARRAY_UNALIGNED_TEST_LEN 60
#define FBARRAY_TEST_ELT_SZ (sizeof(int))
static int autotest_setup(void)
{
return rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
int ret;
ret = rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
if (ret) {
printf("Failed to initialize test array\n");
return -1;
}
ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
if (ret) {
printf("Failed to initialize unaligned test array\n");
rte_fbarray_destroy(&param.arr);
return -1;
}
return 0;
}
static void autotest_teardown(void)
{
rte_fbarray_destroy(&param.arr);
rte_fbarray_destroy(&unaligned.arr);
}
static int init_array(void)
static int init_aligned(void)
{
int i;
for (i = param.start; i <= param.end; i++) {
@ -47,11 +65,35 @@ static int init_array(void)
return 0;
}
static void reset_array(void)
static int init_unaligned(void)
{
int i;
for (i = unaligned.start; i <= unaligned.end; i++) {
if (rte_fbarray_set_used(&unaligned.arr, i))
return -1;
}
return 0;
}
static void reset_aligned(void)
{
int i;
for (i = 0; i < FBARRAY_TEST_LEN; i++)
rte_fbarray_set_free(&param.arr, i);
/* reset param as well */
param.start = -1;
param.end = -1;
}
static void reset_unaligned(void)
{
int i;
for (i = 0; i < FBARRAY_UNALIGNED_TEST_LEN; i++)
rte_fbarray_set_free(&unaligned.arr, i);
/* reset param as well */
unaligned.start = -1;
unaligned.end = -1;
}
static int first_msk_test_setup(void)
@ -59,7 +101,7 @@ static int first_msk_test_setup(void)
/* put all within first mask */
param.start = 3;
param.end = 10;
return init_array();
return init_aligned();
}
static int cross_msk_test_setup(void)
@ -67,7 +109,7 @@ static int cross_msk_test_setup(void)
/* put all within second and third mask */
param.start = 70;
param.end = 160;
return init_array();
return init_aligned();
}
static int multi_msk_test_setup(void)
@ -75,7 +117,7 @@ static int multi_msk_test_setup(void)
/* put all within first and last mask */
param.start = 3;
param.end = FBARRAY_TEST_LEN - 20;
return init_array();
return init_aligned();
}
static int last_msk_test_setup(void)
@ -83,7 +125,7 @@ static int last_msk_test_setup(void)
/* put all within last mask */
param.start = FBARRAY_TEST_LEN - 20;
param.end = FBARRAY_TEST_LEN - 1;
return init_array();
return init_aligned();
}
static int full_msk_test_setup(void)
@ -91,16 +133,31 @@ static int full_msk_test_setup(void)
/* fill entire mask */
param.start = 0;
param.end = FBARRAY_TEST_LEN - 1;
return init_array();
return init_aligned();
}
static int empty_msk_test_setup(void)
static int lookahead_test_setup(void)
{
/* do not fill anything in */
reset_array();
param.start = -1;
param.end = -1;
return 0;
/* set index 64 as used */
param.start = 64;
param.end = 64;
return init_aligned();
}
static int lookbehind_test_setup(void)
{
/* set index 63 as used */
param.start = 63;
param.end = 63;
return init_aligned();
}
static int unaligned_test_setup(void)
{
unaligned.start = 0;
/* leave one free bit at the end */
unaligned.end = FBARRAY_UNALIGNED_TEST_LEN - 2;
return init_unaligned();
}
static int test_invalid(void)
@ -454,7 +511,7 @@ static int test_basic(void)
if (check_free())
return TEST_FAILED;
reset_array();
reset_aligned();
return TEST_SUCCESS;
}
@ -697,6 +754,26 @@ static int test_find(void)
return TEST_SUCCESS;
}
static int test_find_unaligned(void)
{
TEST_ASSERT_EQUAL((int)unaligned.arr.count, unaligned.end - unaligned.start + 1,
"Wrong element count\n");
/* ensure space is free before start */
if (ensure_correct(&unaligned.arr, 0, unaligned.start - 1, false))
return TEST_FAILED;
/* ensure space is occupied where it's supposed to be */
if (ensure_correct(&unaligned.arr, unaligned.start, unaligned.end, true))
return TEST_FAILED;
/* ensure space after end is free as well */
if (ensure_correct(&unaligned.arr, unaligned.end + 1, FBARRAY_UNALIGNED_TEST_LEN - 1,
false))
return TEST_FAILED;
/* test if find_biggest API's work correctly */
if (test_biggest(&unaligned.arr, unaligned.start, unaligned.end))
return TEST_FAILED;
return TEST_SUCCESS;
}
static int test_empty(void)
{
TEST_ASSERT_EQUAL((int)param.arr.count, 0, "Wrong element count\n");
@ -709,6 +786,87 @@ static int test_empty(void)
return TEST_SUCCESS;
}
static int test_lookahead(void)
{
int ret;
/* run regular test first */
ret = test_find();
if (ret != TEST_SUCCESS)
return ret;
/* test if we can find free chunk while not starting with 0 */
TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 1, param.start),
param.start + 1, "Free chunk index is wrong\n");
return TEST_SUCCESS;
}
static int test_lookbehind(void)
{
int ret, free_len = 2;
/* run regular test first */
ret = test_find();
if (ret != TEST_SUCCESS)
return ret;
/* test if we can find free chunk while crossing mask boundary */
TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, param.start + 1, free_len),
param.start - free_len, "Free chunk index is wrong\n");
return TEST_SUCCESS;
}
static int test_lookahead_mask(void)
{
/*
* There is a certain type of lookahead behavior we want to test here,
* namely masking of bits that were scanned with lookahead but that we
* know do not match our criteria. This is achieved in following steps:
*
* 0. Look for a big enough chunk of free space (say, 62 elements)
* 1. Trigger lookahead by breaking a run somewhere inside mask 0
* (indices 0-63)
* 2. Fail lookahead by breaking the run somewhere inside mask 1
* (indices 64-127)
* 3. Ensure that we can still find free space in mask 1 afterwards
*/
/* break run on first mask */
rte_fbarray_set_used(&param.arr, 61);
/* break run on second mask */
rte_fbarray_set_used(&param.arr, 70);
/* we expect to find free space at 71 */
TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 0, 62),
71, "Free chunk index is wrong\n");
return TEST_SUCCESS;
}
static int test_lookbehind_mask(void)
{
/*
* There is a certain type of lookbehind behavior we want to test here,
* namely masking of bits that were scanned with lookbehind but that we
* know do not match our criteria. This is achieved in two steps:
*
* 0. Look for a big enough chunk of free space (say, 62 elements)
* 1. Trigger lookbehind by breaking a run somewhere inside mask 2
* (indices 128-191)
* 2. Fail lookbehind by breaking the run somewhere inside mask 1
* (indices 64-127)
* 3. Ensure that we can still find free space in mask 1 afterwards
*/
/* break run on mask 2 */
rte_fbarray_set_used(&param.arr, 130);
/* break run on mask 1 */
rte_fbarray_set_used(&param.arr, 70);
/* start from 190, we expect to find free space at 8 */
TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, 190, 62),
8, "Free chunk index is wrong\n");
return TEST_SUCCESS;
}
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
@ -717,12 +875,19 @@ static struct unit_test_suite fbarray_test_suite = {
.unit_test_cases = {
TEST_CASE(test_invalid),
TEST_CASE(test_basic),
TEST_CASE_ST(first_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(cross_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(multi_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
TEST_CASE_ST(first_msk_test_setup, reset_aligned, test_find),
TEST_CASE_ST(cross_msk_test_setup, reset_aligned, test_find),
TEST_CASE_ST(multi_msk_test_setup, reset_aligned, test_find),
TEST_CASE_ST(last_msk_test_setup, reset_aligned, test_find),
TEST_CASE_ST(full_msk_test_setup, reset_aligned, test_find),
/* empty test does not need setup */
TEST_CASE_ST(NULL, reset_aligned, test_empty),
TEST_CASE_ST(lookahead_test_setup, reset_aligned, test_lookahead),
TEST_CASE_ST(lookbehind_test_setup, reset_aligned, test_lookbehind),
/* setup for these tests is more complex so do it in test func */
TEST_CASE_ST(NULL, reset_aligned, test_lookahead_mask),
TEST_CASE_ST(NULL, reset_aligned, test_lookbehind_mask),
TEST_CASE_ST(unaligned_test_setup, reset_unaligned, test_find_unaligned),
TEST_CASES_END()
}
};

View File

@ -162,7 +162,7 @@ init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
handle = rte_hash_create(&hash_params);
if (handle == NULL) {
printf("hash creation failed");
printf("hash creation failed\n");
return -1;
}

View File

@ -447,7 +447,8 @@ test_add_already_bonded_slave_to_bonded_device(void)
uint16_t slaves[RTE_MAX_ETHPORTS];
char pmd_name[RTE_ETH_NAME_MAX_LEN];
test_add_slave_to_bonded_device();
TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
"Failed to add member to bonding device");
current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id,
slaves, RTE_MAX_ETHPORTS);
@ -4261,7 +4262,7 @@ test_tlb_tx_burst(void)
burst_size);
TEST_ASSERT_EQUAL(nb_tx, 0, " bad number of packet in burst");
/* Clean ugit checkout masterp and remove slaves from bonded device */
/* Clean up and remove members from bonding device */
return remove_slaves_and_stop_bonded_device();
}

View File

@ -641,8 +641,7 @@ bond_handshake(void)
/* If response didn't send - report failure */
TEST_ASSERT_EQUAL(all_slaves_done, 1, "Bond handshake failed\n");
/* If flags doesn't match - report failure */
return all_slaves_done == 1 ? TEST_SUCCESS : TEST_FAILED;
return TEST_SUCCESS;
}
#define TEST_LACP_SLAVE_COUT RTE_DIM(test_params.slave_ports)

View File

@ -324,7 +324,7 @@ test_propagate(void)
uint8_t n;
struct slave_conf *port;
uint8_t bond_rss_key[40];
struct rte_eth_rss_conf bond_rss_conf;
struct rte_eth_rss_conf bond_rss_conf = {0};
int retval = 0;
uint64_t rss_hf = 0;

View File

@ -2345,16 +2345,13 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
GOTO_FAIL("%s: External buffer is not attached to mbuf\n",
__func__);
/* allocate one more mbuf */
/* allocate one more mbuf, it is attached to the same external buffer */
clone = rte_pktmbuf_clone(m, pktmbuf_pool);
if (clone == NULL)
GOTO_FAIL("%s: mbuf clone allocation failed!\n", __func__);
if (rte_pktmbuf_pkt_len(clone) != 0)
GOTO_FAIL("%s: Bad packet length\n", __func__);
/* attach the same external buffer to the cloned mbuf */
rte_pktmbuf_attach_extbuf(clone, ext_buf_addr, buf_iova, buf_len,
ret_shinfo);
if (clone->ol_flags != RTE_MBUF_F_EXTERNAL)
GOTO_FAIL("%s: External buffer is not attached to mbuf\n",
__func__);

View File

@ -142,7 +142,7 @@ test_power(void)
/* Test setting a valid environment */
ret = rte_power_set_env(envs[i]);
if (ret != 0) {
printf("Unexpectedly unsucceeded on setting a valid environment\n");
printf("Unexpectedly unsuccessful on setting a valid environment\n");
return -1;
}

View File

@ -17,7 +17,7 @@ test_power_intel_uncore(void)
#include <rte_power_intel_uncore.h>
#include <power_common.h>
#define MAX_UNCORE_FREQS 32
#define MAX_UNCORE_FREQS 64
#define VALID_PKG 0
#define VALID_DIE 0

View File

@ -2065,7 +2065,7 @@ test_ipsec_inline_proto_known_vec_inb(const void *test_data)
}
static int
test_ipsec_inline_proto_display_list(const void *data __rte_unused)
test_ipsec_inline_proto_display_list(void)
{
struct ipsec_test_flags flags;
@ -2078,7 +2078,7 @@ test_ipsec_inline_proto_display_list(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_udp_encap(const void *data __rte_unused)
test_ipsec_inline_proto_udp_encap(void)
{
struct ipsec_test_flags flags;
@ -2091,7 +2091,7 @@ test_ipsec_inline_proto_udp_encap(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_udp_ports_verify(const void *data __rte_unused)
test_ipsec_inline_proto_udp_ports_verify(void)
{
struct ipsec_test_flags flags;
@ -2105,7 +2105,7 @@ test_ipsec_inline_proto_udp_ports_verify(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_err_icv_corrupt(const void *data __rte_unused)
test_ipsec_inline_proto_err_icv_corrupt(void)
{
struct ipsec_test_flags flags;
@ -2118,7 +2118,7 @@ test_ipsec_inline_proto_err_icv_corrupt(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_tunnel_dst_addr_verify(const void *data __rte_unused)
test_ipsec_inline_proto_tunnel_dst_addr_verify(void)
{
struct ipsec_test_flags flags;
@ -2131,7 +2131,7 @@ test_ipsec_inline_proto_tunnel_dst_addr_verify(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_tunnel_src_dst_addr_verify(const void *data __rte_unused)
test_ipsec_inline_proto_tunnel_src_dst_addr_verify(void)
{
struct ipsec_test_flags flags;
@ -2144,7 +2144,7 @@ test_ipsec_inline_proto_tunnel_src_dst_addr_verify(const void *data __rte_unused
}
static int
test_ipsec_inline_proto_inner_ip_csum(const void *data __rte_unused)
test_ipsec_inline_proto_inner_ip_csum(void)
{
struct ipsec_test_flags flags;
@ -2157,7 +2157,7 @@ test_ipsec_inline_proto_inner_ip_csum(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_inner_l4_csum(const void *data __rte_unused)
test_ipsec_inline_proto_inner_l4_csum(void)
{
struct ipsec_test_flags flags;
@ -2170,7 +2170,7 @@ test_ipsec_inline_proto_inner_l4_csum(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_tunnel_v4_in_v4(const void *data __rte_unused)
test_ipsec_inline_proto_tunnel_v4_in_v4(void)
{
struct ipsec_test_flags flags;
@ -2184,7 +2184,7 @@ test_ipsec_inline_proto_tunnel_v4_in_v4(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_tunnel_v6_in_v6(const void *data __rte_unused)
test_ipsec_inline_proto_tunnel_v6_in_v6(void)
{
struct ipsec_test_flags flags;
@ -2198,7 +2198,7 @@ test_ipsec_inline_proto_tunnel_v6_in_v6(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_tunnel_v4_in_v6(const void *data __rte_unused)
test_ipsec_inline_proto_tunnel_v4_in_v6(void)
{
struct ipsec_test_flags flags;
@ -2212,7 +2212,7 @@ test_ipsec_inline_proto_tunnel_v4_in_v6(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_tunnel_v6_in_v4(const void *data __rte_unused)
test_ipsec_inline_proto_tunnel_v6_in_v4(void)
{
struct ipsec_test_flags flags;
@ -2226,7 +2226,7 @@ test_ipsec_inline_proto_tunnel_v6_in_v4(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_transport_v4(const void *data __rte_unused)
test_ipsec_inline_proto_transport_v4(void)
{
struct ipsec_test_flags flags;
@ -2240,7 +2240,7 @@ test_ipsec_inline_proto_transport_v4(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_transport_l4_csum(const void *data __rte_unused)
test_ipsec_inline_proto_transport_l4_csum(void)
{
struct ipsec_test_flags flags = {
.l4_csum = true,
@ -2252,7 +2252,7 @@ test_ipsec_inline_proto_transport_l4_csum(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_stats(const void *data __rte_unused)
test_ipsec_inline_proto_stats(void)
{
struct ipsec_test_flags flags;
@ -2265,7 +2265,7 @@ test_ipsec_inline_proto_stats(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_pkt_fragment(const void *data __rte_unused)
test_ipsec_inline_proto_pkt_fragment(void)
{
struct ipsec_test_flags flags;
@ -2279,7 +2279,7 @@ test_ipsec_inline_proto_pkt_fragment(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_copy_df_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_copy_df_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2292,7 +2292,7 @@ test_ipsec_inline_proto_copy_df_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_copy_df_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_copy_df_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2305,7 +2305,7 @@ test_ipsec_inline_proto_copy_df_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_set_df_0_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_set_df_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2318,7 +2318,7 @@ test_ipsec_inline_proto_set_df_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_set_df_1_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_set_df_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2331,7 +2331,7 @@ test_ipsec_inline_proto_set_df_1_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv4_copy_dscp_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_ipv4_copy_dscp_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2344,7 +2344,7 @@ test_ipsec_inline_proto_ipv4_copy_dscp_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv4_copy_dscp_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_ipv4_copy_dscp_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2357,7 +2357,7 @@ test_ipsec_inline_proto_ipv4_copy_dscp_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv4_set_dscp_0_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_ipv4_set_dscp_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2370,7 +2370,7 @@ test_ipsec_inline_proto_ipv4_set_dscp_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv4_set_dscp_1_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_ipv4_set_dscp_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2383,7 +2383,7 @@ test_ipsec_inline_proto_ipv4_set_dscp_1_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_copy_dscp_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_copy_dscp_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2398,7 +2398,7 @@ test_ipsec_inline_proto_ipv6_copy_dscp_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_copy_dscp_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_copy_dscp_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2413,7 +2413,7 @@ test_ipsec_inline_proto_ipv6_copy_dscp_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_set_dscp_0_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_set_dscp_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2428,7 +2428,7 @@ test_ipsec_inline_proto_ipv6_set_dscp_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_set_dscp_1_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_set_dscp_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2443,7 +2443,7 @@ test_ipsec_inline_proto_ipv6_set_dscp_1_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_copy_flabel_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_copy_flabel_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2457,7 +2457,7 @@ test_ipsec_inline_proto_ipv6_copy_flabel_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_copy_flabel_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_copy_flabel_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2471,7 +2471,7 @@ test_ipsec_inline_proto_ipv6_copy_flabel_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_set_flabel_0_inner_1(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_set_flabel_0_inner_1(void)
{
struct ipsec_test_flags flags;
@ -2485,7 +2485,7 @@ test_ipsec_inline_proto_ipv6_set_flabel_0_inner_1(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_set_flabel_1_inner_0(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_set_flabel_1_inner_0(void)
{
struct ipsec_test_flags flags;
@ -2499,7 +2499,7 @@ test_ipsec_inline_proto_ipv6_set_flabel_1_inner_0(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv4_ttl_decrement(const void *data __rte_unused)
test_ipsec_inline_proto_ipv4_ttl_decrement(void)
{
struct ipsec_test_flags flags = {
.dec_ttl_or_hop_limit = true,
@ -2510,7 +2510,7 @@ test_ipsec_inline_proto_ipv4_ttl_decrement(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_ipv6_hop_limit_decrement(const void *data __rte_unused)
test_ipsec_inline_proto_ipv6_hop_limit_decrement(void)
{
struct ipsec_test_flags flags = {
.ipv6 = true,
@ -2522,7 +2522,7 @@ test_ipsec_inline_proto_ipv6_hop_limit_decrement(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_iv_gen(const void *data __rte_unused)
test_ipsec_inline_proto_iv_gen(void)
{
struct ipsec_test_flags flags;
@ -2535,7 +2535,7 @@ test_ipsec_inline_proto_iv_gen(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_sa_pkt_soft_expiry(const void *data __rte_unused)
test_ipsec_inline_proto_sa_pkt_soft_expiry(void)
{
struct ipsec_test_flags flags = {
.sa_expiry_pkts_soft = true,
@ -2544,7 +2544,7 @@ test_ipsec_inline_proto_sa_pkt_soft_expiry(const void *data __rte_unused)
return test_ipsec_inline_proto_all(&flags);
}
static int
test_ipsec_inline_proto_sa_byte_soft_expiry(const void *data __rte_unused)
test_ipsec_inline_proto_sa_byte_soft_expiry(void)
{
struct ipsec_test_flags flags = {
.sa_expiry_bytes_soft = true,
@ -2554,7 +2554,7 @@ test_ipsec_inline_proto_sa_byte_soft_expiry(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_sa_pkt_hard_expiry(const void *data __rte_unused)
test_ipsec_inline_proto_sa_pkt_hard_expiry(void)
{
struct ipsec_test_flags flags = {
.sa_expiry_pkts_hard = true
@ -2564,7 +2564,7 @@ test_ipsec_inline_proto_sa_pkt_hard_expiry(const void *data __rte_unused)
}
static int
test_ipsec_inline_proto_sa_byte_hard_expiry(const void *data __rte_unused)
test_ipsec_inline_proto_sa_byte_hard_expiry(void)
{
struct ipsec_test_flags flags = {
.sa_expiry_bytes_hard = true

View File

@ -88,7 +88,7 @@ struct ip_reassembly_test_packet pkt_ipv6_udp_p1 = {
.l4_offset = 40,
.data = {
/* IP */
0x60, 0x00, 0x00, 0x00, 0x05, 0xb4, 0x2C, 0x40,
0x60, 0x00, 0x00, 0x00, 0x05, 0xb4, 0x11, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -135,7 +135,7 @@ struct ip_reassembly_test_packet pkt_ipv6_udp_p2 = {
.l4_offset = 40,
.data = {
/* IP */
0x60, 0x00, 0x00, 0x00, 0x11, 0x5a, 0x2c, 0x40,
0x60, 0x00, 0x00, 0x00, 0x11, 0x5a, 0x11, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

View File

@ -6,7 +6,11 @@ check_symbols = find_program('check-symbols.sh')
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
objdump = find_program('objdump', 'llvm-objdump')
python3 = import('python').find_installation(required: false)
python3_required_modules = []
if host_machine.system() != 'windows'
python3_required_modules = ['elftools']
endif
python3 = import('python').find_installation('python3', required: false, modules: python3_required_modules)
if python3.found()
py3 = [python3]
else
@ -39,16 +43,3 @@ else
pmdinfogen += 'elf'
endif
# TODO: starting from Meson 0.51.0 use
# python3 = import('python').find_installation('python',
# modules : python3_required_modules)
python3_required_modules = []
if host_machine.system() != 'windows'
python3_required_modules = ['elftools']
endif
foreach module : python3_required_modules
script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
error('missing python module: @0@'.format(module))
endif
endforeach

View File

@ -6,6 +6,7 @@
import argparse
import ctypes
import json
import re
import sys
import tempfile
@ -66,11 +67,11 @@ class ELFImage:
return [symbol]
return None
def find_by_prefix(self, prefix):
prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix
def find_by_pattern(self, pattern):
pattern = pattern.encode("utf-8") if self._legacy_elftools else pattern
for i in range(self._symtab.num_symbols()):
symbol = self._symtab.get_symbol(i)
if symbol.name.startswith(prefix):
if re.match(pattern, symbol.name):
yield ELFSymbol(self._image, symbol)
@ -97,9 +98,9 @@ class COFFImage:
def is_big_endian(self):
return False
def find_by_prefix(self, prefix):
def find_by_pattern(self, pattern):
for symbol in self._image.symbols:
if symbol.name.startswith(prefix):
if re.match(pattern, symbol.name):
yield COFFSymbol(self._image, symbol)
def find_by_name(self, name):
@ -199,7 +200,7 @@ class Driver:
def load_drivers(image):
drivers = []
for symbol in image.find_by_prefix("this_pmd_name"):
for symbol in image.find_by_pattern("^this_pmd_name[0-9]+$"):
drivers.append(Driver.load(image, symbol))
return drivers

View File

@ -2,18 +2,23 @@
# Copyright(c) 2022 Intel Corporation
message('DPDK subproject linking: ' + get_option('default_library'))
subproject_cflags = ['-include', 'rte_config.h'] + machine_args
if is_freebsd
subproject_cflags += ['-D__BSD_VISIBLE']
endif
if get_option('default_library') == 'static'
dpdk_dep = declare_dependency(
version: meson.project_version(),
dependencies: dpdk_static_lib_deps,
compile_args: subproject_cflags,
# static library deps in DPDK build don't include "link_with" parameters,
# so explicitly link-in both libs and drivers
link_with: dpdk_static_libraries,
link_whole: dpdk_drivers,
link_whole: dpdk_static_libraries + dpdk_drivers,
link_args: dpdk_extra_ldflags)
else
dpdk_dep = declare_dependency(
version: meson.project_version(),
compile_args: subproject_cflags,
# shared library deps include all necessary linking parameters
dependencies: dpdk_shared_lib_deps)
endif

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'arm-linux-gnueabihf-g++']
ar = 'arm-linux-gnueabihf-gcc-ar'
strip = 'arm-linux-gnueabihf-strip'
pkgconfig = 'arm-linux-gnueabihf-pkg-config'
pkg-config = 'arm-linux-gnueabihf-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
as = 'aarch64-linux-gnu-as'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -6,6 +6,7 @@ strip = 'llvm-strip'
llvm-config = 'llvm-config'
pcap-config = 'llvm-config'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
[host_machine]
system = 'linux'

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
as = 'aarch64-linux-gnu-as'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]

View File

@ -43,7 +43,9 @@ implementer_generic = {
},
'generic_aarch32': {
'march': 'armv8-a',
'compiler_options': ['-mfpu=neon'],
'force_march': true,
'march_features': ['simd'],
'compiler_options': ['-mfpu=auto'],
'flags': [
['RTE_ARCH_ARM_NEON_MEMCPY', false],
['RTE_ARCH_STRICT_ALIGN', true],
@ -613,21 +615,25 @@ if update_flags
# probe supported archs and their features
candidate_march = ''
if part_number_config.has_key('march')
supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
'armv8.2-a', 'armv8.1-a', 'armv8-a']
check_compiler_support = false
foreach supported_march: supported_marchs
if supported_march == part_number_config['march']
# start checking from this version downwards
check_compiler_support = true
endif
if (check_compiler_support and
cc.has_argument('-march=' + supported_march))
candidate_march = supported_march
# highest supported march version found
break
endif
endforeach
if part_number_config.get('force_march', false)
candidate_march = part_number_config['march']
else
supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
'armv8.2-a', 'armv8.1-a', 'armv8-a']
check_compiler_support = false
foreach supported_march: supported_marchs
if supported_march == part_number_config['march']
# start checking from this version downwards
check_compiler_support = true
endif
if (check_compiler_support and
cc.has_argument('-march=' + supported_march))
candidate_march = supported_march
# highest supported march version found
break
endif
endforeach
endif
if candidate_march == ''
error('No suitable armv8 march version found.')
endif
@ -659,7 +665,7 @@ if update_flags
# apply supported compiler options
if part_number_config.has_key('compiler_options')
foreach flag: part_number_config['compiler_options']
if cc.has_argument(flag)
if cc.has_multi_arguments(machine_args + [flag])
machine_args += flag
else
warning('Configuration compiler option ' +

View File

@ -91,13 +91,14 @@ else
cpu_instruction_set = 'generic'
endif
endif
if platform == 'native'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'native'
endif
endif
endif
if platform == 'native'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'native'
endif
elif platform == 'generic'
if platform == 'generic'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'generic'
endif
@ -122,7 +123,7 @@ if cpu_instruction_set == 'generic'
elif host_machine.cpu_family().startswith('ppc')
cpu_instruction_set = 'power8'
elif host_machine.cpu_family().startswith('riscv')
cpu_instruction_set = 'riscv'
cpu_instruction_set = 'rv64gc'
endif
endif
@ -146,6 +147,9 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
if not is_windows
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
if cc.has_link_argument('-Wl,--undefined-version')
add_project_link_arguments('-Wl,--undefined-version', language: 'c')
endif
endif
# use pthreads if available for the platform

View File

@ -5,6 +5,7 @@ ld = 'x86_64-w64-mingw32-ld'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
pkg-config = 'x86_64-w64-mingw32-pkg-config'
objdump = 'x86_64-w64-mingw32-objdump'
[host_machine]

View File

@ -165,7 +165,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
uint8_t dl_bandwidth;
uint8_t ul_load_balance;
uint8_t dl_load_balance;
uint16_t flr_time_out;
};
- ``pf_mode_en``: identifies whether only PF is to be used, or the VFs. PF and
@ -191,10 +190,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
If all hardware queues exceeds the watermark, no code blocks will be
streamed in from UL/DL code block FIFO.
- ``flr_time_out``: specifies how many 16.384us to be FLR time out. The
time_out = flr_time_out x 16.384us. For instance, if you want to set 10ms for
the FLR time out then set this setting to 0x262=610.
An example configuration code calling the function ``rte_fpga_5gnr_fec_configure()`` is shown
below:
@ -219,7 +214,7 @@ below:
/* setup FPGA PF */
ret = rte_fpga_5gnr_fec_configure(info->dev_name, &conf);
TEST_ASSERT_SUCCESS(ret,
"Failed to configure 4G FPGA PF for bbdev %s",
"Failed to configure 5GNR FPGA PF for bbdev %s",
info->dev_name);

View File

@ -20,17 +20,17 @@ Supported Feature Flags
- "OOP SGL In SGL Out" feature flag stands for
"Out-of-place Scatter-gather list Input, Scatter-gather list Output",
which means PMD supports different scatter-gather styled input and output buffers
(i.e. both can consists of multiple segments).
(i.e. both can consist of multiple segments).
- "OOP SGL In LB Out" feature flag stands for
"Out-of-place Scatter-gather list Input, Linear Buffers Output",
which means PMD supports input from scatter-gathered styled buffers,
which means PMD supports input from scatter-gather styled buffers,
outputting linear buffers (i.e. single segment).
- "OOP LB In SGL Out" feature flag stands for
"Out-of-place Linear Buffers Input, Scatter-gather list Output",
which means PMD supports input from linear buffer, outputting
scatter-gathered styled buffers.
scatter-gather styled buffers.
- "OOP LB In LB Out" feature flag stands for
"Out-of-place Linear Buffers Input, Linear Buffers Output",

View File

@ -399,9 +399,9 @@ to see the full table)
+-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
| Yes | No | No | 4 | 4xxx | IDZ/ N/A | qat_4xxx | 4xxx | 4940 | 4 | 4941 | 16 |
+-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
| Yes | Yes | Yes | 4 | 401xxx | linux/5.19+ | qat_401xxx | 4xxx | 4942 | 2 | 4943 | 16 |
| Yes | Yes | Yes | 4 | 401xxx | linux/5.19+ | qat_4xxx | 4xxx | 4942 | 2 | 4943 | 16 |
+-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
| Yes | No | No | 4 | 401xxx | IDZ/ N/A | qat_401xxx | 4xxx | 4942 | 2 | 4943 | 16 |
| Yes | No | No | 4 | 401xxx | IDZ/ N/A | qat_4xxx | 4xxx | 4942 | 2 | 4943 | 16 |
+-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
* Note: Symmetric mixed crypto algorithms feature on Gen 2 works only with IDZ driver version 4.9.0+

View File

@ -13,7 +13,6 @@ Supported Kunpeng SoCs
----------------------
* Kunpeng 920
* Kunpeng 930
Device Setup

View File

@ -85,8 +85,7 @@ need to be adjusted in order to ensure normal DPDK operation:
The above limits can usually be adjusted by editing
``/etc/security/limits.conf`` file, and rebooting.
See `Hugepage Mapping <hugepage_mapping>`_
section to learn how these limits affect EAL.
See :ref:`Hugepage Mapping <hugepage_mapping>` section to learn how these limits affect EAL.
Device Control
~~~~~~~~~~~~~~

View File

@ -34,6 +34,17 @@ Supports getting the speed capabilities that the current device is capable of.
* **[related] API**: ``rte_eth_dev_info_get()``.
.. _nic_features_link_speeds_config:
Link speed configuration
------------------------
Supports configurating fixed speed and link autonegotiation.
* **[uses] user config**: ``dev_conf.link_speeds:RTE_ETH_LINK_SPEED_*``.
* **[related] API**: ``rte_eth_dev_configure()``.
.. _nic_features_link_status:
Link status
@ -740,6 +751,19 @@ Supports congestion management.
``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.
.. _nic_features_traffic_manager:
Traffic manager
---------------
Supports Traffic manager.
* **[implements] rte_tm_ops**: ``capabilities_get``, ``shaper_profile_add``,
``hierarchy_commit`` and so on.
* **[related] API**: ``rte_tm_capabilities_get()``, ``rte_tm_shaper_profile_add()``,
``rte_tm_hierarchy_commit()`` and so on.
.. _nic_features_fw_version:
FW version

View File

@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
Link speed configuration = Y
Link status = Y
Link status event = Y
Queue start/stop = Y

View File

@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
Link speed configuration = Y
Link status = Y
Link status event = Y
Rx interrupt = Y

View File

@ -28,6 +28,7 @@ RSS key update = Y
RSS reta update = Y
Inner RSS = Y
Congestion management = Y
Traffic manager = Y
Inline protocol = Y
Flow control = Y
Scattered Rx = Y

View File

@ -8,6 +8,7 @@
;
[Features]
Speed capabilities =
Link speed configuration =
Link status =
Link status event =
Removal event =
@ -42,6 +43,7 @@ VLAN filter =
Flow control =
Rate limitation =
Congestion management =
Traffic manager =
Inline crypto =
Inline protocol =
CRC offload =

View File

@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
Link speed configuration = Y
Link status = Y
Link status event = Y
Burst mode info = Y

View File

@ -17,6 +17,7 @@ Unicast MAC filter = Y
RSS hash = Y
VLAN filter = Y
Flow control = Y
Traffic manager = Y
VLAN offload = Y
L3 checksum offload = Y
L4 checksum offload = Y

View File

@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
Link speed configuration = Y
Link status = Y
Link status event = Y
Rx interrupt = Y
@ -28,6 +29,7 @@ RSS reta update = Y
DCB = Y
VLAN filter = Y
Flow control = Y
Traffic manager = Y
CRC offload = Y
VLAN offload = Y
FEC = Y

View File

@ -5,6 +5,7 @@
;
[Features]
Speed capabilities = Y
Link speed configuration = Y
Link status = Y
Link status event = Y
Rx interrupt = Y
@ -27,6 +28,7 @@ SR-IOV = Y
DCB = Y
VLAN filter = Y
Flow control = Y
Traffic manager = Y
CRC offload = Y
VLAN offload = Y
QinQ offload = P

View File

@ -20,6 +20,8 @@ RSS hash = Y
RSS key update = Y
RSS reta update = Y
VLAN filter = Y
Traffic manager = Y
Inline crypto = Y
CRC offload = Y
VLAN offload = P
L3 checksum offload = P
@ -30,7 +32,6 @@ Inner L4 checksum = P
Packet type parsing = Y
Rx descriptor status = Y
Tx descriptor status = Y
Inline crypto = Y
Basic stats = Y
Multiprocess aware = Y
FreeBSD = Y

View File

@ -8,6 +8,7 @@
;
[Features]
Speed capabilities = Y
Link speed configuration = Y
Link status = Y
Link status event = Y
Rx interrupt = Y
@ -26,6 +27,7 @@ RSS hash = Y
RSS key update = Y
RSS reta update = Y
VLAN filter = Y
Traffic manager = Y
CRC offload = Y
VLAN offload = Y
QinQ offload = P

View File

@ -22,6 +22,7 @@ Promiscuous mode = Y
Allmulticast mode = Y
Unicast MAC filter = Y
VLAN filter = Y
Traffic manager = Y
VLAN offload = Y
Extended stats = Y
Basic stats = Y

Some files were not shown because too many files have changed in this diff Show More