Skip to content

Commit 4b05018

Browse files
committed
DPDK: update to 18.11.5.
1 parent 7b0de5a commit 4b05018

File tree

384 files changed

+4027
-2613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

384 files changed

+4027
-2613
lines changed

dpdk/app/meson.build

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ lib_execinfo = cc.find_library('execinfo', required: false)
1313

1414
default_cflags = machine_args
1515

16-
# specify -D_GNU_SOURCE unconditionally
17-
default_cflags += '-D_GNU_SOURCE'
18-
1916
foreach app:apps
2017
build = true
2118
name = app

dpdk/app/test-crypto-perf/cperf_test_latency.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ cperf_latency_test_runner(void *arg)
128128
uint8_t burst_size_idx = 0;
129129
uint32_t imix_idx = 0;
130130

131-
static int only_once;
131+
static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
132132

133133
if (ctx == NULL)
134134
return 0;
@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)
310310
time_min = tunit*(double)(tsc_min) / tsc_hz;
311311

312312
if (ctx->options->csv) {
313-
if (!only_once)
313+
if (rte_atomic16_test_and_set(&display_once))
314314
printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, "
315315
"Packet Size, cycles, time (us)");
316316

@@ -325,7 +325,6 @@ cperf_latency_test_runner(void *arg)
325325
/ tsc_hz);
326326

327327
}
328-
only_once = 1;
329328
} else {
330329
printf("\n# Device %d on lcore %u\n", ctx->dev_id,
331330
ctx->lcore_id);

dpdk/app/test-crypto-perf/cperf_test_pmd_cyclecount.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"
1717
#define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"
1818
#define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
19-
#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.f3;%.f3;%.f3\n"
19+
#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n"
2020

2121
struct cperf_pmd_cyclecount_ctx {
2222
uint8_t dev_id;
@@ -390,7 +390,7 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx)
390390
state.lcore = rte_lcore_id();
391391
state.linearize = 0;
392392

393-
static int only_once;
393+
static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
394394
static bool warmup = true;
395395

396396
/*
@@ -436,13 +436,12 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx)
436436
}
437437

438438
if (!opts->csv) {
439-
if (!only_once)
439+
if (rte_atomic16_test_and_set(&display_once))
440440
printf(PRETTY_HDR_FMT, "lcore id", "Buf Size",
441441
"Burst Size", "Enqueued",
442442
"Dequeued", "Enq Retries",
443443
"Deq Retries", "Cycles/Op",
444444
"Cycles/Enq", "Cycles/Deq");
445-
only_once = 1;
446445

447446
printf(PRETTY_LINE_FMT, state.ctx->lcore_id,
448447
opts->test_buffer_size, test_burst_size,
@@ -453,13 +452,12 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx)
453452
state.cycles_per_enq,
454453
state.cycles_per_deq);
455454
} else {
456-
if (!only_once)
455+
if (rte_atomic16_test_and_set(&display_once))
457456
printf(CSV_HDR_FMT, "# lcore id", "Buf Size",
458457
"Burst Size", "Enqueued",
459458
"Dequeued", "Enq Retries",
460459
"Deq Retries", "Cycles/Op",
461460
"Cycles/Enq", "Cycles/Deq");
462-
only_once = 1;
463461

464462
printf(CSV_LINE_FMT, state.ctx->lcore_id,
465463
opts->test_buffer_size, test_burst_size,

dpdk/app/test-crypto-perf/cperf_test_throughput.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ cperf_throughput_test_runner(void *test_ctx)
9494
uint8_t burst_size_idx = 0;
9595
uint32_t imix_idx = 0;
9696

97-
static int only_once;
97+
static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
9898

9999
struct rte_crypto_op *ops[ctx->options->max_burst_size];
100100
struct rte_crypto_op *ops_processed[ctx->options->max_burst_size];
@@ -261,13 +261,12 @@ cperf_throughput_test_runner(void *test_ctx)
261261
ctx->options->total_ops);
262262

263263
if (!ctx->options->csv) {
264-
if (!only_once)
264+
if (rte_atomic16_test_and_set(&display_once))
265265
printf("%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n",
266266
"lcore id", "Buf Size", "Burst Size",
267267
"Enqueued", "Dequeued", "Failed Enq",
268268
"Failed Deq", "MOps", "Gbps",
269269
"Cycles/Buf");
270-
only_once = 1;
271270

272271
printf("%12u%12u%12u%12"PRIu64"%12"PRIu64"%12"PRIu64
273272
"%12"PRIu64"%12.4f%12.4f%12.2f\n",
@@ -282,12 +281,11 @@ cperf_throughput_test_runner(void *test_ctx)
282281
throughput_gbps,
283282
cycles_per_packet);
284283
} else {
285-
if (!only_once)
284+
if (rte_atomic16_test_and_set(&display_once))
286285
printf("#lcore id,Buffer Size(B),"
287286
"Burst Size,Enqueued,Dequeued,Failed Enq,"
288287
"Failed Deq,Ops(Millions),Throughput(Gbps),"
289288
"Cycles/Buf\n\n");
290-
only_once = 1;
291289

292290
printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
293291
"%.3f;%.3f;%.3f\n",

dpdk/app/test-crypto-perf/cperf_test_verify.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ cperf_verify_test_runner(void *test_ctx)
232232
uint64_t ops_deqd = 0, ops_deqd_total = 0, ops_deqd_failed = 0;
233233
uint64_t ops_failed = 0;
234234

235-
static int only_once;
235+
static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
236236

237237
uint64_t i;
238238
uint16_t ops_unused = 0;
@@ -375,12 +375,11 @@ cperf_verify_test_runner(void *test_ctx)
375375
}
376376

377377
if (!ctx->options->csv) {
378-
if (!only_once)
378+
if (rte_atomic16_test_and_set(&display_once))
379379
printf("%12s%12s%12s%12s%12s%12s%12s%12s\n\n",
380380
"lcore id", "Buf Size", "Burst size",
381381
"Enqueued", "Dequeued", "Failed Enq",
382382
"Failed Deq", "Failed Ops");
383-
only_once = 1;
384383

385384
printf("%12u%12u%12u%12"PRIu64"%12"PRIu64"%12"PRIu64
386385
"%12"PRIu64"%12"PRIu64"\n",
@@ -393,11 +392,10 @@ cperf_verify_test_runner(void *test_ctx)
393392
ops_deqd_failed,
394393
ops_failed);
395394
} else {
396-
if (!only_once)
395+
if (rte_atomic16_test_and_set(&display_once))
397396
printf("\n# lcore id, Buffer Size(B), "
398397
"Burst Size,Enqueued,Dequeued,Failed Enq,"
399398
"Failed Deq,Failed Ops\n");
400-
only_once = 1;
401399

402400
printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
403401
"%"PRIu64"\n",

dpdk/app/test-crypto-perf/main.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,12 @@ main(int argc, char **argv)
627627

628628
if (i == total_nb_qps)
629629
break;
630-
rte_eal_wait_lcore(lcore_id);
630+
ret |= rte_eal_wait_lcore(lcore_id);
631631
i++;
632632
}
633+
634+
if (ret != EXIT_SUCCESS)
635+
goto err;
633636
} else {
634637

635638
/* Get next size from range or list */
@@ -654,10 +657,13 @@ main(int argc, char **argv)
654657

655658
if (i == total_nb_qps)
656659
break;
657-
rte_eal_wait_lcore(lcore_id);
660+
ret |= rte_eal_wait_lcore(lcore_id);
658661
i++;
659662
}
660663

664+
if (ret != EXIT_SUCCESS)
665+
goto err;
666+
661667
/* Get next size from range or list */
662668
if (opts.inc_buffer_size != 0)
663669
opts.test_buffer_size += opts.inc_buffer_size;

dpdk/app/test-eventdev/test_order_common.c

+21-11
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ order_producer(void *arg)
6767
int
6868
order_opt_check(struct evt_options *opt)
6969
{
70+
if (opt->prod_type != EVT_PROD_TYPE_SYNT) {
71+
evt_err("Invalid producer type");
72+
return -EINVAL;
73+
}
74+
7075
/* 1 producer + N workers + 1 master */
7176
if (rte_lcore_count() < 3) {
7277
evt_err("test need minimum 3 lcores");
@@ -298,12 +303,23 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
298303
int ret;
299304
uint8_t port;
300305
struct test_order *t = evt_test_priv(test);
306+
struct rte_event_dev_info dev_info;
307+
308+
memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
309+
ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
310+
if (ret) {
311+
evt_err("failed to get eventdev info %d", opt->dev_id);
312+
return ret;
313+
}
314+
315+
if (opt->wkr_deq_dep > dev_info.max_event_port_dequeue_depth)
316+
opt->wkr_deq_dep = dev_info.max_event_port_dequeue_depth;
301317

302318
/* port configuration */
303-
const struct rte_event_port_conf wkr_p_conf = {
319+
const struct rte_event_port_conf p_conf = {
304320
.dequeue_depth = opt->wkr_deq_dep,
305-
.enqueue_depth = 64,
306-
.new_event_threshold = 4096,
321+
.enqueue_depth = dev_info.max_event_port_dequeue_depth,
322+
.new_event_threshold = dev_info.max_num_events,
307323
};
308324

309325
/* setup one port per worker, linking to all queues */
@@ -314,7 +330,7 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
314330
w->port_id = port;
315331
w->t = t;
316332

317-
ret = rte_event_port_setup(opt->dev_id, port, &wkr_p_conf);
333+
ret = rte_event_port_setup(opt->dev_id, port, &p_conf);
318334
if (ret) {
319335
evt_err("failed to setup port %d", port);
320336
return ret;
@@ -326,20 +342,14 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
326342
return -EINVAL;
327343
}
328344
}
329-
/* port for producer, no links */
330-
const struct rte_event_port_conf prod_conf = {
331-
.dequeue_depth = 8,
332-
.enqueue_depth = 32,
333-
.new_event_threshold = 1200,
334-
};
335345
struct prod_data *p = &t->prod;
336346

337347
p->dev_id = opt->dev_id;
338348
p->port_id = port; /* last port */
339349
p->queue_id = 0;
340350
p->t = t;
341351

342-
ret = rte_event_port_setup(opt->dev_id, port, &prod_conf);
352+
ret = rte_event_port_setup(opt->dev_id, port, &p_conf);
343353
if (ret) {
344354
evt_err("failed to setup producer port %d", port);
345355
return ret;

dpdk/app/test-eventdev/test_perf_common.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues)
583583
return -1;
584584
}
585585

586-
if (opt->prod_type == EVT_PROD_TYPE_SYNT) {
586+
if (opt->prod_type == EVT_PROD_TYPE_SYNT ||
587+
opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) {
587588
/* Validate producer lcores */
588589
if (evt_lcores_has_overlap(opt->plcores,
589590
rte_get_master_lcore())) {

dpdk/app/test-pmd/cmdline.c

+26-7
Original file line numberDiff line numberDiff line change
@@ -2042,6 +2042,7 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
20422042
{
20432043
struct cmd_config_rx_mode_flag *res = parsed_result;
20442044
portid_t pid;
2045+
int k;
20452046

20462047
if (!all_ports_stopped()) {
20472048
printf("Please stop all ports first\n");
@@ -2142,6 +2143,10 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
21422143
return;
21432144
}
21442145
port->dev_conf.rxmode.offloads = rx_offloads;
2146+
/* Apply Rx offloads configuration */
2147+
for (k = 0; k < port->dev_info.max_rx_queues; k++)
2148+
port->rx_conf[k].offloads =
2149+
port->dev_conf.rxmode.offloads;
21452150
}
21462151

21472152
init_port_config();
@@ -4354,6 +4359,17 @@ csum_show(int port_id)
43544359
}
43554360
}
43564361

4362+
static void
4363+
cmd_config_queue_tx_offloads(struct rte_port *port)
4364+
{
4365+
int k;
4366+
4367+
/* Apply queue tx offloads configuration */
4368+
for (k = 0; k < port->dev_info.max_rx_queues; k++)
4369+
port->tx_conf[k].offloads =
4370+
port->dev_conf.txmode.offloads;
4371+
}
4372+
43574373
static void
43584374
cmd_csum_parsed(void *parsed_result,
43594375
__attribute__((unused)) struct cmdline *cl,
@@ -4438,6 +4454,7 @@ cmd_csum_parsed(void *parsed_result,
44384454
ports[res->port_id].dev_conf.txmode.offloads &=
44394455
(~csum_offloads);
44404456
}
4457+
cmd_config_queue_tx_offloads(&ports[res->port_id]);
44414458
}
44424459
csum_show(res->port_id);
44434460

@@ -4589,6 +4606,7 @@ cmd_tso_set_parsed(void *parsed_result,
45894606
printf("TSO segment size for non-tunneled packets is %d\n",
45904607
ports[res->port_id].tso_segsz);
45914608
}
4609+
cmd_config_queue_tx_offloads(&ports[res->port_id]);
45924610

45934611
/* display warnings if configuration is not supported by the NIC */
45944612
rte_eth_dev_info_get(res->port_id, &dev_info);
@@ -4744,6 +4762,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
47444762
"if outer L3 is IPv4; not necessary for IPv6\n");
47454763
}
47464764

4765+
cmd_config_queue_tx_offloads(&ports[res->port_id]);
47474766
cmd_reconfig_device_queue(res->port_id, 1, 1);
47484767
}
47494768

@@ -8348,32 +8367,32 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
83488367
__attribute__((unused)) void *data)
83498368
{
83508369
int ret = -ENOTSUP;
8351-
uint16_t rx_mode = 0;
8370+
uint16_t vf_rxmode = 0;
83528371
struct cmd_set_vf_rxmode *res = parsed_result;
83538372

83548373
int is_on = (strcmp(res->on, "on") == 0) ? 1 : 0;
83558374
if (!strcmp(res->what,"rxmode")) {
83568375
if (!strcmp(res->mode, "AUPE"))
8357-
rx_mode |= ETH_VMDQ_ACCEPT_UNTAG;
8376+
vf_rxmode |= ETH_VMDQ_ACCEPT_UNTAG;
83588377
else if (!strcmp(res->mode, "ROPE"))
8359-
rx_mode |= ETH_VMDQ_ACCEPT_HASH_UC;
8378+
vf_rxmode |= ETH_VMDQ_ACCEPT_HASH_UC;
83608379
else if (!strcmp(res->mode, "BAM"))
8361-
rx_mode |= ETH_VMDQ_ACCEPT_BROADCAST;
8380+
vf_rxmode |= ETH_VMDQ_ACCEPT_BROADCAST;
83628381
else if (!strncmp(res->mode, "MPE",3))
8363-
rx_mode |= ETH_VMDQ_ACCEPT_MULTICAST;
8382+
vf_rxmode |= ETH_VMDQ_ACCEPT_MULTICAST;
83648383
}
83658384

83668385
RTE_SET_USED(is_on);
83678386

83688387
#ifdef RTE_LIBRTE_IXGBE_PMD
83698388
if (ret == -ENOTSUP)
83708389
ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id,
8371-
rx_mode, (uint8_t)is_on);
8390+
vf_rxmode, (uint8_t)is_on);
83728391
#endif
83738392
#ifdef RTE_LIBRTE_BNXT_PMD
83748393
if (ret == -ENOTSUP)
83758394
ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id,
8376-
rx_mode, (uint8_t)is_on);
8395+
vf_rxmode, (uint8_t)is_on);
83778396
#endif
83788397
if (ret < 0)
83798398
printf("bad VF receive mode parameter, return code = %d \n",

0 commit comments

Comments
 (0)