[PATCH v2] ci: test stdatomic API

2023-10-17 Thread David Marchand
Add some compilation tests with C11 atomics enabled. The headers check can't be enabled (as gcc and clang don't provide stdatomic before C++23). Signed-off-by: David Marchand Reviewed-by: Aaron Conole --- Changelog from v1: - following Thomas offlist review, tweaked coverage in

Re: [PATCH v4 0/7] document and simplify use of cmdline

2023-10-17 Thread David Marchand
1) instances.append(process_command(tokens.strip().split(), cfile, comment.strip())) print(f'static __rte_used cmdline_parse_ctx_t {ctxname}[] = {{') Which translates as: cmd_brief:help # help: Show help help section # help: Show help > > The "cmdline" example itself, is not converted over, as it should > probably remain as a simple example of direct library use without the > script. +1 -- David Marchand

Re: [PATCH 0/2] fix enable_stdatomic=true build with clang

2023-10-16 Thread David Marchand
On Mon, Oct 16, 2023 at 9:07 PM David Marchand wrote: > > On Mon, Oct 16, 2023 at 8:53 PM Tyler Retzlaff > wrote: > > > > We are temporarily exposed while the CI is enabled that tests > > CC=clang && -Denable_stdatomic. > > > > In the meantime tw

Re: [PATCH 0/2] fix enable_stdatomic=true build with clang

2023-10-16 Thread David Marchand
f (2): > power: fix use of rte stdatomic > event/cnxk: remove single use of rte stdatomic Thank you for the fixes. Reviewed-by: David Marchand -- David Marchand

[PATCH] net/bonding: fix link status callback stop

2023-10-16 Thread David Marchand
If a bonding port gets released, a link status alarm callback still referenced the ethdev port that may be reused later. Cancel this callback when stopping the port. Bugzilla ID: 1301 Fixes: a45b288ef21a ("bond: support link status polling") Cc: sta...@dpdk.org Signed-off-by: Davi

Re: [PATCH] net/iavf: fix pkt len check

2023-10-16 Thread David Marchand
On Mon, Oct 16, 2023 at 3:37 AM Dexia Li wrote: > > Thanks for your commit. > It works for me. > Thanks for confirming, I marked this patch as rejected. -- David Marchand

Re: [PATCH v3] bus/cdx: provide driver flag for optional resource mapping

2023-10-13 Thread David Marchand
> Will analyze it further and send another rev of this patch. External drivers should be supported with current code. DPDK must be built with enable_driver_sdk option, and the external driver code can include bus_cdx_driver.h. Possibly compiling this code with -DENABLE_INTERNAL_API cflag will be necessary. -- David Marchand

Re: [PATCH] net/iavf: fix pkt len check

2023-10-13 Thread David Marchand
e patches will make it to the main dpdk repo soon. Please double check they work for you. Thanks. -- David Marchand

Re: [PATCH v1] doc: update QAT kernel module entry

2023-10-13 Thread David Marchand
ht Fixes: tag. The commit that introduced first this reference to qat_401xxx is f4eac3a09c51 ("common/qat: enable GEN4 b devices"). > > Signed-off-by: Brian Dooley Otherwise, lgtm. Cc: Ciara for info. -- David Marchand

Re: [PATCH v2 0/3] example/l3fwd: relax l3fwd rx RSS/Offload if needed

2023-10-13 Thread David Marchand
ndalone v1 patch). In the cover letter, please provide a changelog of the differences between revisions. If you think it is better, you may put a more detailed changelog in each patch commitlog (as annotations, after ---). Thanks. -- David Marchand

Re: [PATCH v3 0/5] document and simplify use of cmdline

2023-10-12 Thread David Marchand
delete mode 100644 examples/bond/main.h > delete mode 100644 examples/multi_process/hotplug_mp/commands.h > create mode 100644 examples/multi_process/hotplug_mp/commands.list > delete mode 100644 examples/multi_process/simple_mp/mp_commands.h > create mode 100644 examples/multi_process/simple_mp/mp_commands.list > > -- > 2.39.2 > -- David Marchand

Re: [PATCH v8 0/3] Add dispatcher library

2023-10-12 Thread David Marchand
cher_lib.rst > create mode 100644 lib/dispatcher/meson.build > create mode 100644 lib/dispatcher/rte_dispatcher.c > create mode 100644 lib/dispatcher/rte_dispatcher.h > create mode 100644 lib/dispatcher/version.map > Thanks for this latest revision, it lgtm. I fixed a few grammar issues in the documentation and used simple .. note:: blocks to be consistent with the rest of our docs. Applied, thanks Mattias. -- David Marchand

Re: [PATCH 0/2] simplify building x86 code with AVX2 support

2023-10-12 Thread David Marchand
series. It still applies fine, I ran my checks and I see nothing wrong with the series. Applied, thanks for the cleanup. -- David Marchand

Re: [PATCH] bus/vmbus: add support allow/block scan mode

2023-10-12 Thread David Marchand
On Thu, Jun 9, 2022 at 10:46 AM Xiaoming Jiang wrote: > > bus/vmbus: add support allow/block scan mode > > Signed-off-by: Xiaoming Jiang Acked-by: Long Li Acked-by: Huisong Li Applied, thanks Xiaoming. -- David Marchand

Re: [PATCH] ethdev: clarify device queue state after start and stop

2023-10-12 Thread David Marchand
deferred_start queue status test */ > + TEST_CASES_END() /**< NULL terminate unit test array */ > + } > +}; > + > +static int > +test_ethdev_api(void) > +{ > + rte_log_set_global_level(RTE_LOG_DEBUG); > + rte_log_set_level(RTE_LOGTYPE_EAL, RTE_LOG_DEBUG); > + > + return unit_test_suite_runner(ðdev_api_testsuite); > +} > + > +REGISTER_TEST_COMMAND(ethdev_api, test_ethdev_api); REGISTER_FAST_TEST or REGISTER_DRIVER_TEST. > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index 8542257721c9..6441fe049b06 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -2812,6 +2812,9 @@ int rte_eth_dev_tx_queue_stop(uint16_t port_id, > uint16_t tx_queue_id); > * Device RTE_ETH_DEV_NOLIVE_MAC_ADDR flag causes MAC address to be set > before > * PMD port start callback function is invoked. > * > + * All device queues (except form deferred start queues) status should be > + * `RTE_ETH_QUEUE_STATE_STARTED` after start. > + * > * On success, all basic functions exported by the Ethernet API (link status, > * receive/transmit, and so on) can be invoked. > * > @@ -2828,6 +2831,8 @@ int rte_eth_dev_start(uint16_t port_id); > * Stop an Ethernet device. The device can be restarted with a call to > * rte_eth_dev_start() > * > + * All device queues status should be `RTE_ETH_QUEUE_STATE_STOPPED` after > stop. > + * > * @param port_id > * The port identifier of the Ethernet device. > * @return > -- > 2.34.1 > The rest lgtm. -- David Marchand

Re: [PATCH v5 1/3] lib: introduce dispatcher library

2023-10-11 Thread David Marchand
rte_panic with the error message. There is also libc assert(). RTE_ASSERT is more of a debug macro since it is under a build option. But by making the library "panic" on some assertion, I have followup comments: - what is the point of returning an int for rte_dispatcher_start() / rte_dispatcher_stop()? - rte_dispatcher_start() and rte_dispatcher_stop() (doxygen) documentation needs updating, as they can't return anything but 0. -- David Marchand

Re: [PATCH] doc: sort build and EAL features in the release notes

2023-10-11 Thread David Marchand
On Wed, Oct 11, 2023 at 9:54 AM Thomas Monjalon wrote: > > When adding build and EAL features in 23.11, > the format and sorting order was unusual. Indeed, my bad. > This change is making these features similar as others. > > Signed-off-by: Thomas Monjalon Acked-by: David

Re: [PATCH] eventdev: fix symbol export for port maintenance

2023-10-11 Thread David Marchand
On Wed, Oct 11, 2023 at 8:51 AM Jerin Jacob wrote: > On Tue, Oct 10, 2023 at 7:30 PM David Marchand > wrote: > > > > Trying to call rte_event_maintain out of the eventdev library triggers > > a link failure, as the tracepoint symbol associated to this inline >

Re: [PATCH] common/qat: enable gen4 c devices

2023-10-11 Thread David Marchand
++ > > > > Is there such a kernel module named qat_402xxx upstream? > > I can only find qat_4xxx. > > > Good catch, you're right, there is no kernel module 402xxx. > These devices fall under the original 4xxx driver. > Will update here, and send a fix for the 401xxx entry later. I noticed this patch for 402xxx pulled in the main branch. Don't forget to send the fix on 401xxx entry please. -- David Marchand

Re: [PATCH] doc: remove confusing command to send patch

2023-10-11 Thread David Marchand
slates to an empty To: list if you follow the example command line: git send-email --to-cmd ./devtools/get-maintainer.sh --cc dev@dpdk.org 000*.patch We could add a default list of recipients if no maintainer is found by the script. And the next question is who should be in that list.. -- David Marchand

Re: [PATCH v6 2/3] test: add dispatcher test suite

2023-10-11 Thread David Marchand
On Wed, Oct 11, 2023 at 8:28 AM Mattias Rönnblom wrote: > > On 2023-10-10 13:56, David Marchand wrote: > > On Mon, Oct 9, 2023 at 8:22 PM Mattias Rönnblom > > wrote: > >> +static int > >> +test_dispatcher(void) > >> +{ > >

Re: [PATCH] eventdev: fix symbol export for port maintenance

2023-10-11 Thread David Marchand
Jerin, On Wed, Oct 11, 2023 at 9:03 AM David Marchand wrote: > > On Wed, Oct 11, 2023 at 8:47 AM Mattias Rönnblom > wrote: > > > > On 2023-10-10 16:00, David Marchand wrote: > > > Trying to call rte_event_maintain out of the eventdev library triggers > >

Re: [PATCH] eventdev: fix symbol export for port maintenance

2023-10-11 Thread David Marchand
Hello Jerin, On Wed, Oct 11, 2023 at 8:51 AM Jerin Jacob wrote: > > On Tue, Oct 10, 2023 at 7:30 PM David Marchand > wrote: > > > > Trying to call rte_event_maintain out of the eventdev library triggers > > a link failure, as the tracepoint symbol associated to thi

Re: [PATCH] eventdev: fix symbol export for port maintenance

2023-10-11 Thread David Marchand
On Wed, Oct 11, 2023 at 8:47 AM Mattias Rönnblom wrote: > > On 2023-10-10 16:00, David Marchand wrote: > > Trying to call rte_event_maintain out of the eventdev library triggers > > a link failure, as the tracepoint symbol associated to this inline > > helper was not

Re: [PATCH v6 2/3] test: add dispatcher test suite

2023-10-10 Thread David Marchand
https://patchwork.dpdk.org/project/dpdk/patch/20231010140029.66159-1-david.march...@redhat.com/ Thanks. -- David Marchand

[PATCH] eventdev: fix symbol export for port maintenance

2023-10-10 Thread David Marchand
Trying to call rte_event_maintain out of the eventdev library triggers a link failure, as the tracepoint symbol associated to this inline helper was not exported. Fixes: 54f17843a887 ("eventdev: add port maintenance API") Cc: sta...@dpdk.org Signed-off-by: David Marchand --- Caught

Re: [PATCH v6 3/3] doc: add dispatcher programming guide

2023-10-10 Thread David Marchand
x in those Ubuntu containers. This is pseudo-code / close to C, so we could probably mark this block as "C", but "none" works fine too. WDYT? -- David Marchand

Re: [PATCH v6 2/3] test: add dispatcher test suite

2023-10-10 Thread David Marchand
NUM_SERVICE_CORES + 1); + return TEST_SKIPPED; + } + return unit_test_suite_runner(&test_suite); } This should avoid the failures we get with some CI env. (additionnally, I tested this on my laptop and the test runs fine) -- David Marchand

Re: [PATCH v3] hash: fix SSE comparison

2023-10-10 Thread David Marchand
elog and other notes on a patch should not be in the commitlog itself, but should go after ---. https://doc.dpdk.org/guides/contributing/patches.html#creating-patches > > > > Signed-off-by: Feifei Wang > > Signed-off-by: Jieqiang Wang > > Reviewed-by: Ruifeng Wang > Acked-by: Bruce Richardson Applied, thanks Jieqiang and Bruce. -- David Marchand

Re: [PATCH] random: clarify PRNG MT safety guarantees

2023-10-10 Thread David Marchand
n-EAL threads calling > > PRNG functions in rte_random.h. > > > > Clarify that rte_srand() is not MT safe in regards to calls to > > rte_rand_max() and rte_drand(). > > > > Suggested-by: Stephen Hemminger > > Signed-off-by: Mattias Rönnblom > Acked-by: Morten Brørup Applied, thanks Mattias. -- David Marchand

Re: [PATCH v3] power: support amd-pstate cpufreq driver

2023-10-10 Thread David Marchand
ort for amd-pstate driver. > > Signed-off-by: Sivaprasad Tummala > Acked-by: Anatoly Burakov Applied, thanks. -- David Marchand

Re: [PATCH v6 3/3] power: amd power monitor support

2023-10-10 Thread David Marchand
* For more information about usage of these instructions, please refer to > + * AMD64 Architecture Programmer’s Manual. > + */ > +static void amd_monitorx(volatile void *addr) > +{ > +#if defined(__MWAITX__) This part probably breaks build with MSVC. I could not determine whether MSVC supports this intrinsic. I'll rely on Tyler to fix it later. Series applied. -- David Marchand

Re: [PATCH v6 1/3] eal: add x86 cpuid support for monitorx

2023-10-10 Thread David Marchand
e rerun was fine. I'll go ahead with this series. -- David Marchand

Re: [PATCH v3] vhost: add IRQ suppression

2023-10-10 Thread David Marchand
pressure. > > Signed-off-by: Maxime Coquelin This looks like a good idea. Reviewed-by: David Marchand -- David Marchand

[PATCH] doc/guides: refer to generic binding devices section

2023-10-06 Thread David Marchand
Rather than copy/paste everywhere how to bind a device and create VF devices, refer to the Linux GSG section about it. Signed-off-by: David Marchand --- doc/guides/bbdevs/acc100.rst| 73 ++--- doc/guides/bbdevs/fpga_5gnr_fec.rst | 71

Re: [dpdk-dev] [PATCH v6] crypto/ccp: move device from vdev to PCI

2023-10-06 Thread David Marchand
md.c: CCP_LOG_ERR("failed to create cryptodev vdev"); Can you send fixes? Thanks. -- David Marchand

Re: [PATCH v4 2/2] eal: annotate rte_memseg_list_walk()

2023-10-06 Thread David Marchand
es applied, thanks Artemy. -- David Marchand

Re: [PATCH] gpu/cuda: fix getenv related build error

2023-10-06 Thread David Marchand
tion. > > Fixes: ca12f5e8a7db ("gpu/cuda: mark unused GDRCopy functions parameters") > > Signed-off-by: Levend Sayar Applied, thanks Levend. -- David Marchand

Re: [PATCH] build: deprecate enable_kmods option

2023-10-06 Thread David Marchand
oo, since use of > out-of-tree modules for Linux is not something the DPDK project wants to > pursue in future. > > Signed-off-by: Bruce Richardson > Acked-by: Stephen Hemminger > Acked-by: Morten Brørup > Acked-by: Thomas Monjalon Acked-by: David Marchand Applied, thanks Bruce. -- David Marchand

Re: [PATCH] random: clarify PRNG MT safety guarantees

2023-10-06 Thread David Marchand
t; Suggested-by: Stephen Hemminger > Signed-off-by: Mattias Rönnblom Should it be backported along 3a4e21301c7a ("random: initialize state for unregistered non-EAL threads") ? -- David Marchand

Re: [PATCH 4/4] pcapng: move timestamp calculation into pdump

2023-10-06 Thread David Marchand
On Wed, Oct 4, 2023 at 7:13 PM Stephen Hemminger wrote: > > On Mon, 2 Oct 2023 10:15:25 +0200 > David Marchand wrote: > > > > > > > > Bugzilla ID: 1291 ? > > > > This patch (and patch 3) updates some pcapng API, is it worth a RN update? > >

Re: [PATCH v2 1/2] power: refactor uncore power management interfaces

2023-10-06 Thread David Marchand
> "power_intel_uncore" along with functions. > > Signed-off-by: Sivaprasad Tummala Review please. -- David Marchand

Re: [PATCH v5 2/3] test: add dispatcher test suite

2023-10-06 Thread David Marchand
, test_dispatcher); > > > > We have new macros (see REGISTER_FAST_TEST for example) so a test is > > associated to an existing testsuite. > > I think this test should be part of the fast-test testsuite, wdyt? > > > > > > It needs setup and teardown methods, so I assume a generic test suite > woulnd't do. > > The dispatcher tests do have fairly short run times, so in that sense > they should qualify. So please use REGISTER_FAST_TEST(). Thanks. -- David Marchand

Re: [PATCH v5 1/3] lib: introduce dispatcher library

2023-10-06 Thread David Marchand
state); > >> + RTE_ASSERT(0); > > > > Why not propagating the error to callers? > > > > > > The root cause would be a programming error, hence an assertion is more > appropriate way to deal with the situation. Without building RTE_ENABLE_ASSERT (disabled by default), the code later in this function will still be executed. [snip] > >> +typedef void > >> +(*rte_dispatcher_finalize_t)(uint8_t event_dev_id, uint8_t event_port_id, > >> + void *cb_data); > >> + > >> +/** > >> + * Dispatcher statistics > >> + */ > >> +struct rte_dispatcher_stats { > >> + uint64_t poll_count; > >> + /**< Number of event dequeue calls made toward the event device. */ > > > > We had a number of issues with doxygen post annotations. > > Prefer the prefixed ones. > > > > OK. More readable, too. I just used the postfix syntax since it seemed > the only one used in DPDK. Historically yes, but we started cleaning headers for readability (like in ethdev) and after catching a few errors with postfix comments. -- David Marchand

Re: [PATCH v2] power: support amd-pstate cpufreq driver

2023-10-06 Thread David Marchand
ort for amd-pstate driver. > > Signed-off-by: Sivaprasad Tummala Review please. -- David Marchand

Re: [PATCH v2 2/2] eal: remove NUMFLAGS enumeration

2023-10-06 Thread David Marchand
y) where an ABI issue may be present so I updated the commitlog in this regard. And then I merged this patch, with a few modifications. - removed the deprecation notice and updated RN, - removed leftover "Last item" comments in arch cpuflag headers, I hope everyone is happy with t

Re: [PATCH v5 3/3] power: amd power monitor support

2023-10-06 Thread David Marchand
ummala > Acked-by: Anatoly Burakov This series won't apply cleanly (following MSVC related series merge) and it breaks x86 32bits compilation. http://mails.dpdk.org/archives/test-report/2023-August/442809.html -- David Marchand

Re: [PATCH] gpu/cuda: Add missing stdlib include

2023-10-06 Thread David Marchand
Hello, On Thu, Oct 5, 2023 at 2:44 PM Elena Agostini wrote: > > Ack Please, don't top post. > > > > Thanks > > EA > > > > From: David Marchand > Date: Friday, 29 September 2023 at 16:58 > To: Aaron Conole , John Romein > Cc: dev@dp

Re: [PATCH v9] hash: add XOR32 hash function

2023-10-06 Thread David Marchand
st be announced in the release notes. And this API should be documented either in some doc/guides/ or at least with doxygen (meaning that rte_hash_xor.h must be referenced in doc/api/doxy-api-index.md). Thanks. -- David Marchand

Re: [PATCH] gpu: add support for rtx 6000 variant

2023-10-06 Thread David Marchand
Elena, please work with Cliff on a v2 with a release notes update and ping me or Thomas once the patch is reviewed and ready for merge. Thanks. -- David Marchand

Re: [PATCH] config/x86: config support for AMD EPYC processors

2023-10-06 Thread David Marchand
place. But I didn't find a trace of it. One option that had been discussed in the previous thread was to increase the max number of cores for x86. I am unclear if this option has been properly evaluated/debatted. Can the topic be brought again at techboard? Thanks. -- David Marchand

Re: [PATCH v5 3/3] doc: add dispatcher programming guide

2023-10-05 Thread David Marchand
. > + > +In particular, to avoid jitter, they should have an small upper bound > +for the maximum amount of time spent in a single service function > +call. > + > +An example of scenario with a more CPU-heavy colocated service is a > +low-lcore count deployment, where the event device lacks the > +``RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT`` capability (and thus > +require software to feed incoming packets into the event device). In > +this case, the best performance may be achieved if the Event Ethernet > +RX and/or TX Adapters are mapped to lcores also used by for event > +dispatching, since otherwise the adapter lcores would have a lot of > +idle CPU cycles. > + > +.. rubric:: Footnotes > + > +.. [#Mapping] > + Event routing may reasonably be done based on other ``rte_event`` > + fields (or even event user data). Indeed, that's the very reason to > + have match callback functions, instead of a simple queue > + id-to-handler mapping scheme. Queue id-based routing serves well in > + a simple example. > + > +.. [#Port-MT-Safety] > + This property (which is a feature, not a bug) is inherited from the > + core Eventdev APIs. > diff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst > index 52a6d9e7aa..ab05bd6074 100644 > --- a/doc/guides/prog_guide/index.rst > +++ b/doc/guides/prog_guide/index.rst > @@ -60,6 +60,7 @@ Programmer's Guide > event_ethernet_tx_adapter > event_timer_adapter > event_crypto_adapter > +dispatcher_lib > qos_framework > power_man > packet_classif_access_ctrl > -- > 2.34.1 > -- David Marchand

Re: [PATCH v5 2/3] test: add dispatcher test suite

2023-10-05 Thread David Marchand
c = test_app_stop(test_app); > + RETURN_ON_ERROR(rc); > + > + TEST_ASSERT_EQUAL(stats.ev_drop_count, 1, "Drop count is not one"); > + TEST_ASSERT_EQUAL(stats.ev_dispatch_count, 0, > + "Dispatch count is not zero"); > + TEST_ASSERT(stats.poll_count > 0, "Poll count is zero"); > + > + return TEST_SUCCESS; > +} > + > +#define MORE_THAN_MAX_HANDLERS 1000 > +#define MIN_HANDLERS 32 > + > +static int > +test_many_handler_registrations(void) > +{ > + int rc; > + int num_regs = 0; > + int reg_ids[MORE_THAN_MAX_HANDLERS]; > + int reg_id; > + int i; > + > + rc = test_app_unregister_callbacks(test_app); > + > + RETURN_ON_ERROR(rc); > + > + for (i = 0; i < MORE_THAN_MAX_HANDLERS; i++) { > + reg_id = rte_dispatcher_register(test_app->dispatcher, > +never_match, NULL, > +test_app_never_process, > NULL); > + if (reg_id < 0) > + break; > + > + reg_ids[num_regs++] = reg_id; > + } > + > + TEST_ASSERT_EQUAL(reg_id, -ENOMEM, "Incorrect return code. Expected " > + "%d but was %d", -ENOMEM, reg_id); > + TEST_ASSERT(num_regs >= MIN_HANDLERS, "Registration failed already " > + "after %d handler registrations.", num_regs); > + > + for (i = 0; i < num_regs; i++) { > + rc = rte_dispatcher_unregister(test_app->dispatcher, > + reg_ids[i]); > + TEST_ASSERT_SUCCESS(rc, "Unable to unregister handler %d", > + reg_ids[i]); > + } > + > + return TEST_SUCCESS; > +} > + > +static void > +dummy_finalize(uint8_t event_dev_id __rte_unused, > + uint8_t event_port_id __rte_unused, > + void *cb_data __rte_unused) > +{ > +} > + > +#define MORE_THAN_MAX_FINALIZERS 1000 > +#define MIN_FINALIZERS 16 > + > +static int > +test_many_finalize_registrations(void) > +{ > + int rc; > + int num_regs = 0; > + int reg_ids[MORE_THAN_MAX_FINALIZERS]; > + int reg_id; > + int i; > + > + rc = test_app_unregister_callbacks(test_app); > + > + RETURN_ON_ERROR(rc); > + > + for (i = 0; i < MORE_THAN_MAX_FINALIZERS; i++) { > + reg_id = rte_dispatcher_finalize_register( > + test_app->dispatcher, dummy_finalize, NULL > + ); > + > + if (reg_id < 0) > + break; > + > + reg_ids[num_regs++] = reg_id; > + } > + > + TEST_ASSERT_EQUAL(reg_id, -ENOMEM, "Incorrect return code. Expected " > + "%d but was %d", -ENOMEM, reg_id); > + TEST_ASSERT(num_regs >= MIN_FINALIZERS, "Finalize registration failed > " > + "already after %d registrations.", num_regs); > + > + for (i = 0; i < num_regs; i++) { > + rc = rte_dispatcher_finalize_unregister( > + test_app->dispatcher, reg_ids[i] > + ); > + TEST_ASSERT_SUCCESS(rc, "Unable to unregister finalizer %d", > + reg_ids[i]); > + } > + > + return TEST_SUCCESS; > +} > + > +static struct unit_test_suite test_suite = { > + .suite_name = "Event dispatcher test suite", > + .unit_test_cases = { > + TEST_CASE_ST(test_setup, test_teardown, test_basic), > + TEST_CASE_ST(test_setup, test_teardown, test_drop), > + TEST_CASE_ST(test_setup, test_teardown, > +test_many_handler_registrations), > + TEST_CASE_ST(test_setup, test_teardown, > +test_many_finalize_registrations), > + TEST_CASES_END() > + } > +}; > + > +static int > +test_dispatcher(void) > +{ > + return unit_test_suite_runner(&test_suite); > +} > + > +REGISTER_TEST_COMMAND(dispatcher_autotest, test_dispatcher); We have new macros (see REGISTER_FAST_TEST for example) so a test is associated to an existing testsuite. I think this test should be part of the fast-test testsuite, wdyt? -- David Marchand

Re: [PATCH v5 1/3] lib: introduce dispatcher library

2023-10-05 Thread David Marchand
tcher_finalize_t finalize_fun, > + void *finalize_data); > + > +/** > + * Unregister a finalize callback. > + * > + * This function may be called by any thread (including unregistered > + * non-EAL threads), but not while the dispatcher is running on > + * any service lcore. > + * > + * @param dispatcher > + * The dispatcher instance. > + * > + * @param reg_id > + * The finalize registration id returned by the original > + * rte_dispatcher_finalize_register() call. > + * > + * @return > + * - 0: Success > + * - -EINVAL: The @c reg_id parameter was invalid. > + */ > +__rte_experimental > +int > +rte_dispatcher_finalize_unregister(struct rte_dispatcher *dispatcher, > + int reg_id); > + > +/** > + * Start a dispatcher instance. > + * > + * Enables the dispatcher service. > + * > + * The underlying event device must have been started prior to calling > + * rte_dispatcher_start(). > + * > + * For the dispatcher to actually perform work (i.e., dispatch > + * events), its service must have been mapped to one or more service > + * lcores, and its service run state set to '1'. A dispatcher's > + * service is retrieved using rte_dispatcher_service_id_get(). > + * > + * Each service lcore to which the dispatcher is mapped should > + * have at least one event port configured. Such configuration is > + * performed by calling rte_dispatcher_bind_port_to_lcore(), prior to > + * starting the dispatcher. > + * > + * @param dispatcher > + * The dispatcher instance. > + * > + * @return > + * - 0: Success > + * - <0: Error code on failure > + */ > +__rte_experimental > +int > +rte_dispatcher_start(struct rte_dispatcher *dispatcher); > + > +/** > + * Stop a running dispatcher instance. > + * > + * Disables the dispatcher service. > + * > + * @param dispatcher > + * The dispatcher instance. > + * > + * @return > + * - 0: Success > + * - -EINVAL: Invalid @c id. > + */ > +__rte_experimental > +int > +rte_dispatcher_stop(struct rte_dispatcher *dispatcher); > + > +/** > + * Retrieve statistics for a dispatcher instance. > + * > + * This function is MT safe and may be called by any thread > + * (including unregistered non-EAL threads). > + * > + * @param dispatcher > + * The dispatcher instance. > + * @param[out] stats > + * A pointer to a structure to fill with statistics. > + */ > +__rte_experimental > +void > +rte_dispatcher_stats_get(const struct rte_dispatcher *dispatcher, > +struct rte_dispatcher_stats *stats); > + > +/** > + * Reset statistics for a dispatcher instance. > + * > + * This function may be called by any thread (including unregistered > + * non-EAL threads), but may not produce the correct result if the > + * dispatcher is running on any service lcore. > + * > + * @param dispatcher > + * The dispatcher instance. > + */ > +__rte_experimental > +void > +rte_dispatcher_stats_reset(struct rte_dispatcher *dispatcher); > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif /* __RTE_DISPATCHER__ */ > diff --git a/lib/dispatcher/version.map b/lib/dispatcher/version.map > new file mode 100644 > index 00..8f9ad96522 > --- /dev/null > +++ b/lib/dispatcher/version.map > @@ -0,0 +1,20 @@ > +EXPERIMENTAL { > + global: > + > + # added in 23.11 > + rte_dispatcher_create; > + rte_dispatcher_free; > + rte_dispatcher_service_id_get; > + rte_dispatcher_bind_port_to_lcore; > + rte_dispatcher_unbind_port_from_lcore; > + rte_dispatcher_register; > + rte_dispatcher_unregister; > + rte_dispatcher_finalize_register; > + rte_dispatcher_finalize_unregister; > + rte_dispatcher_start; > + rte_dispatcher_stop; > + rte_dispatcher_stats_get; > + rte_dispatcher_stats_reset; Sort alphabetically please. > + > + local: *; > +}; > diff --git a/lib/meson.build b/lib/meson.build > index 099b0ed18a..3093b338d2 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -35,6 +35,7 @@ libraries = [ > 'distributor', > 'efd', > 'eventdev', > +'dispatcher', # dispatcher depends on eventdev > 'gpudev', > 'gro', > 'gso', > @@ -81,6 +82,7 @@ optional_libs = [ > 'cfgfile', > 'compressdev', > 'cryptodev', > +'dispatcher', > 'distributor', > 'dmadev', > 'efd', > -- > 2.34.1 > -- David Marchand

Re: [PATCH] mem: allow using ASan in multi-process mode

2023-10-04 Thread David Marchand
k, would unit tests (that were marked failing with ASan) be ok now? See REGISTER_FAST_TEST macro in app/test. Thanks for working on this topic. -- David Marchand

Re: [PATCH v3] bus/cdx: provide driver flag for optional resource mapping

2023-10-04 Thread David Marchand
need to export this function. What kind of applications / in which usecase, one would need to map the device resources? Except a driver? -- David Marchand

Re: [PATCH] bus/dpaa: fix outside array bounds error with GCC v13

2023-10-04 Thread David Marchand
mant Agrawal > Acked-by: Jerin Jacob Applied, thanks. -- David Marchand

Re: [PATCH v2] net/axgbe: use CPUID to identify cpu

2023-10-04 Thread David Marchand
#define __cpuid (n, a, b, c, d) With a space in this macro definition, the precompiler will think that it must replace the __cpuid token as literally (n, a, b, c, d). -- David Marchand

Re: [PATCH v2 1/2] random: initialize the random state for non-EAL threads

2023-10-04 Thread David Marchand
d having the same sequence */ > > - for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) > > + for (lcore_id = 0; lcore_id < RTE_DIM(rand_states); lcore_id++) > > __rte_srand_lfsr258(seed + lcore_id, &rand_states[lcore_id]); > > } > > &g

Re: [dpdk-dev] [PATCH] common/cnxk: fix direct rte symbol usage

2023-10-04 Thread David Marchand
ad name max length in pthread API is 16 bytes (including the trailing \0). Besides, looking again at this driver, I suspect Thomas missed it because of the plt_ prefix, when doing ce703c47de95 ("eal: force prefix for internal threads"). Converting to the internal API would restrict the name down to 11 bytes (including \0). -- David Marchand

Re: [dpdk-dev] [PATCH] common/cnxk: fix direct rte symbol usage

2023-10-03 Thread David Marchand
ead, > - "outb-poll", nix_inl_outb_poll_thread, inl_dev); > + "outb-soft-exp-poll", nix_inl_outb_poll_thread, > inl_dev); Such a thread name is too long. This is reverting Thomas change. Is this intentional? -- David Marchand

Re: [PATCH v4] bus/pci: fix legacy device IO port map in secondary process

2023-10-03 Thread David Marchand
lt; 0) > + return -1; This check is odd and does not seem related. > + > + ret = rte_vfio_release_device(rte_pci_get_sysfs_path(), pci_addr, > + vfio_dev_fd); > + if (ret < 0) { > + RTE_LOG(ERR, EAL, "Cannot release VFIO device\n"); > + return ret; > + } -- David Marchand

Re: [PATCH 0/2] add checks for tests not in a suite

2023-10-02 Thread David Marchand
suites/meson.build | 13 - > buildtools/get-test-suites.py | 12 +--- > devtools/checkpatches.sh | 8 > 3 files changed, 29 insertions(+), 4 deletions(-) Series applied. Thanks Bruce. -- David Marchand

Re: [PATCH 0/2] add checks for tests not in a suite

2023-10-02 Thread David Marchand
On Wed, Sep 27, 2023 at 10:27 AM Bruce Richardson wrote: > > On Wed, Sep 27, 2023 at 08:30:05AM +0200, David Marchand wrote: > > On Tue, Sep 26, 2023 at 5:01 PM Aaron Conole wrote: > > > David Marchand writes: > > > > On Tue, Sep 19, 2023 at 10:36 A

Re: [PATCH v4] app/test: add support for skipping tests

2023-10-02 Thread David Marchand
1.10s > > > > Ok: 7 > > Expected Fail: 0 > > Fail: 0 > > Unexpected Pass:0 > > Skipped: 2 > > Timeout:0 > > > > Signed-off-by: Bruce Richardson > > Acked-by: Thomas Monjalon > Acked-by: Aaron Conole Applied, thanks. -- David Marchand

Re: [PATCH] rawdev: fix device naming

2023-10-02 Thread David Marchand
On Mon, Jul 24, 2023 at 3:37 PM Tomasz Duszynski wrote: > > Use proper naming when dealing with a raw device. > > Fixes: c88b3f2558ed ("rawdev: introduce raw device library") > Cc: sta...@dpdk.org > > Signed-off-by: Tomasz Duszynski Acked-by: Hemant Agrawal

Re: [PATCH] bus/platform: fix use after free

2023-10-02 Thread David Marchand
On Thu, Aug 24, 2023 at 12:52 PM Tomasz Duszynski wrote: > > Remove device from the list before doing actual cleanup to avoid use > after free. > > Bugzilla ID: 1276 > Fixes: 17c839f74da3 ("bus: add platform bus") > > Signed-off-by: Tomasz Duszynski Applied, thanks. -- David Marchand

Re: [PATCH v1 1/1] eal/random: fix random state initialization for non-eal threads

2023-10-02 Thread David Marchand
for fixing related issues. Stephen alternative patch 1 handles Anatoly fix here. https://patchwork.dpdk.org/project/dpdk/list/?series=29449&state=%2A&archive=both I see Anatoly was acked by Mattias and Morten, though Stephen (RTE_DIM) fix is more elegant. How do you guys want me to proceed? Thanks. -- David Marchand

Re: [PATCH 4/4] pcapng: move timestamp calculation into pdump

2023-10-02 Thread David Marchand
t; Fixes: c882eb544842 ("pcapng: fix timestamp wrapping in output files") Is it worth backporting? I would say no, as some API update was needed to fix the issue. But on the other hand, this is an experimental API, so I prefer to ask. > Signed-off-by: Stephen Hemminger -- David Marchand

Re: [PATCH] dumpcap: fix mbuf pool ring type

2023-10-02 Thread David Marchand
hat regard). The application was enforcing the use of mempool/ring so far. I think it is safer to go with an explicit rte_pktmbuf_pool_create_by_ops(... "ring_mp_mc"). WDYT? > if (mp == NULL) > rte_exit(EXIT_FAILURE, > "Mempool (%s) creation failed: %s\n", pool_name, > -- > 2.39.2 > Thanks. -- David Marchand

Re: [PATCH] lib/hash: new feature adding existing key

2023-09-29 Thread David Marchand
patch is still relevant, please rebase it and send a new revision. Don't forget to copy the library maintainers. -- David Marchand

Re: [PATCH v9] hash: add XOR32 hash function

2023-09-29 Thread David Marchand
On Tue, Jul 11, 2023 at 12:00 AM Bili Dong wrote: > > An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its > use case in P4. We implement it in this patch so it could be easily > registered in the pipeline later. > > Signed-off-by: Bili Dong Review, please. -- David Marchand

Re: [PATCH 1/1] hash: add SVE support for bulk key lookup

2023-09-29 Thread David Marchand
83/58/27 83/58/29 > 32 84/68/31 84/68/32 > > Signed-off-by: Harjot Singh > Reviewed-by: Nathan Brown > Reviewed-by: Feifei Wang > Reviewed-by: Jieqiang Wang > Reviewed-by: Honnappa Nagarahalli Thanks for the patch, please update the release notes. -- David Marchand

Re: [PATCH] hash: fix SSE comparison

2023-09-29 Thread David Marchand
.@dpdk.org > > Signed-off-by: Feifei Wang > Signed-off-by: Jieqiang Wang > Reviewed-by: Ruifeng Wang A review from this library maintainers please? -- David Marchand

Re: [PATCH v2 0/2] update rsu implementation

2023-09-29 Thread David Marchand
Is this series still relevant? If so, it needs some rebasing. Thanks. -- David Marchand

Re: [PATCH v3] bus/cdx: provide driver flag for optional resource mapping

2023-09-29 Thread David Marchand
ation ABI, if it is only used by drivers? > + * > + * @param dev > + * A pointer to a rte_cdx_device structure describing the device > + * to use. > + * > + * @return > + * 0 on success, negative on error and positive if no driver > + * is found for the device. > + */ > +__rte_experimental > +int rte_cdx_map_device(struct rte_cdx_device *dev); > -- David Marchand

Re: [PATCH] gpu/cuda: fix getenv related build error

2023-09-29 Thread David Marchand
ction. > There was a bug report for this issue: Bugzilla ID: 1133 > Fixes: ca12f5e8a7db ("gpu/cuda: mark unused GDRCopy functions parameters") It is probably worth backporting: Cc: sta...@dpdk.org > > Signed-off-by: Levend Sayar Elena, this is a quick one, review please. -- David Marchand

Re: [PATCH] gpu/cuda: Add missing stdlib include

2023-09-29 Thread David Marchand
patch, it seems to be a duplicate of the prior patch sent by Levend: https://patchwork.dpdk.org/project/dpdk/patch/20230803162512.41396-1-levendsa...@gmail.com/ -- David Marchand

Re: [PATCH] gpu: add support for rtx 6000 variant

2023-09-29 Thread David Marchand
(-) Is this patch still wanted? It seems it fell through the cracks. Cc: maintainers. -- David Marchand

Re: [PATCH] eal/linux: prevent deadlocks on rte init and cleanup

2023-09-29 Thread David Marchand
report and fix and sorry for the late reply. Artemy came with a similar report and a more complete fix. Could you confirm it works for you? https://patchwork.dpdk.org/project/dpdk/list/?series=29463&state=%2A&archive=both Thanks, -- David Marchand

Re: [PATCH 0/2] Add eventdev tests to test suites

2023-09-29 Thread David Marchand
sw: add self tests to fast tests > event/*: add driver selftests to driver-tests suite > > app/test/test_eventdev.c | 10 +- > drivers/event/sw/sw_evdev_selftest.c | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > On the principle, the series lgtm

[PATCH] ci: test stdatomic API

2023-09-29 Thread David Marchand
Add some compilation tests with C11 atomics enabled. The headers check can't be enabled (as gcc and clang don't provide stdatomic before C++23). Signed-off-by: David Marchand --- .ci/linux-build.sh| 6 +- .github/workflows/build.yml | 8 devtools/test-meson

Re: [PATCH v6 0/6] rte atomics API for optional stdatomic

2023-09-29 Thread David Marchand
o things are missing: - add doxygen tags in the new API (this can be fixed later in this release, can you look at it?), - add compilation tests for enable_stdatomic (I'll send a patch soon for devtools and GHA), -- David Marchand

Re: [PATCH v6 1/6] eal: provide rte stdatomics optional atomics API

2023-09-29 Thread David Marchand
On Fri, Sep 29, 2023 at 12:26 PM Thomas Monjalon wrote: > > 29/09/2023 11:34, David Marchand: > > On Fri, Sep 29, 2023 at 11:26 AM Bruce Richardson > > wrote: > > > > > > On Fri, Sep 29, 2023 at 11:02:38AM +0200, David Marchand wrote: > > > >

Re: [PATCH v6 1/6] eal: provide rte stdatomics optional atomics API

2023-09-29 Thread David Marchand
On Fri, Sep 29, 2023 at 11:26 AM Bruce Richardson wrote: > > On Fri, Sep 29, 2023 at 11:02:38AM +0200, David Marchand wrote: > > On Fri, Sep 29, 2023 at 10:54 AM Morten Brørup > > wrote: > > > In my opinion, our move to C11 thus makes RTE_BUILD_BUG_ON obsolete. &g

Re: [PATCH v6 1/6] eal: provide rte stdatomics optional atomics API

2023-09-29 Thread David Marchand
warning: "RTE_BUILD_BUG_ON" is deprecated 239 | RTE_BUILD_BUG_ON(sizeof(pthread_t) > sizeof(uintptr_t)); | ^~~~ -- David Marchand

Re: [PATCH v6 1/6] eal: provide rte stdatomics optional atomics API

2023-09-29 Thread David Marchand
reported no problem as it could not evaluate the expression. At least, with static_assert (iirc, it is new to C11) the compiler complains with a clear "error: expression in static assertion is not constant". We could fix RTE_BUILD_BUG_ON, but I guess the fix would be equivalent to map it to static_assert(!condition). Using language standard constructs seems a better choice. -- David Marchand

Re: [EXT] Re: [PATCH 1/2] app/test: add support for optional dependencies

2023-09-28 Thread David Marchand
ailable, but otherwise won't be involved in enable/disable of specific > > > tests. > > > > > > Signed-off-by: Bruce Richardson > > Reviewed-by: David Marchand > Tested-by: Akhil Goyal Series applied, thanks for the quick fix Bruce. -- David Marchand

Re: [PATCH 1/2] app/test: add support for optional dependencies

2023-09-28 Thread David Marchand
s for linking. > > Resolve this by explicitly providing a list of optional dependencies. > Any items in this list will be added to the dependency list if > available, but otherwise won't be involved in enable/disable of specific > tests. > > Signed-off-by: Bruce Richardson

Re: [EXT] [PATCH] app/test: drop dependency on crypto scheduler driver

2023-09-28 Thread David Marchand
loongarch CI does not seem to agree, can you have a look? > > > > Fixes: 50823f30f0c8 ("test: build using per-file dependencies") > > > > Reported-by: Akhil Goyal > > Signed-off-by: Bruce Richardson > Acked-by: Akhil Goyal -- David Marchand

Re: [PATCH v2] vhost: add IRQ suppression

2023-09-28 Thread David Marchand
> __atomic_fetch_add(&vq->stats.guest_notifications_offloaded, > + 1, __ATOMIC_RELAXED); > + return; > + } > + > + /* Offloading failed, fallback to direct IRQ > injection */ > + __atomic_store_n(&vq->irq_pending, 0, > __ATOMIC_RELEASE); Nit: s/0/false/ > + } else { > + vq->stats.guest_notifications_suppressed++; > + return; > + } > } > > if (dev->backend_ops->inject_irq(dev, vq)) { > -- > 2.41.0 > -- David Marchand

Re: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variant

2023-09-28 Thread David Marchand
really switch to in-tree drivers. On the form of this doc, let me remind that there is a common doc (see _linux_gsg_binding_kernel) and this must be preferred rather than copy/paste those blocks about device binding. Thanks. -- David Marchand

[PATCH v4 3/3] ethdev: cleanup shared data with the last port

2023-09-27 Thread David Marchand
If no port is allocated and no port owner is still registered, ethdev from a primary process may release the memzone used to store port data. This makes it possible for the DPDK memory allocator to release associated resources back to the OS. Signed-off-by: David Marchand Acked-by: Morten Brørup

[PATCH v4 2/3] ethdev: avoid panicking in absence of ethdev shared data

2023-09-27 Thread David Marchand
memzone is available so that upper level API can react accordingly. Signed-off-by: David Marchand --- lib/ethdev/ethdev_driver.c | 23 ++- lib/ethdev/ethdev_private.c | 10 +--- lib/ethdev/ethdev_private.h | 2 +- lib/ethdev/ethdev_trace.h | 6 +++-- lib/ethdev/rte_ethdev.c

[PATCH v4 1/3] ethdev: protect shared memory accesses under one lock

2023-09-27 Thread David Marchand
config (which cannot be freed during a DPDK application lifetime). Signed-off-by: David Marchand Acked-by: Morten Brørup --- Changes since v3: - updated commitlog, --- lib/eal/common/eal_common_mcfg.c| 6 +++ lib/eal/common/eal_memcfg.h | 1 + lib/eal/include/rte_eal_memconfig.h | 4

[PATCH v4 0/3] Release ethdev shared memory on port cleanup

2023-09-27 Thread David Marchand
to shine and give me reasons why we should keep the locks the way they were ;-). And let's see what the CI reports... 1: https://inbox.dpdk.org/dev/20230816153439.551501-12-bruce.richard...@intel.com/T/#m0e4c23f7be80bbdac076a387f4a2f9094dd07e0a -- David Marchand Changes since v3: - up

[PATCH v2 4/4] net/ice: fix TSO with big segments

2023-09-27 Thread David Marchand
ssage: 2023-09-18T13:34:31.064Z|00020|dpdk(pmd-c31/id:22)|ERR|ice_prep_pkts(): INVALID mbuf: bad data_len=[2962] Remove the check on data_len. Fixes: ccf33dccf7aa ("net/ice: check illegal packet sizes") Cc: sta...@dpdk.org Signed-off-by: David Marchand --- Note: I am still waiti

[PATCH v2 3/4] net/ice: remove log from Tx prepare datapath function

2023-09-27 Thread David Marchand
("net/ice: check illegal packet sizes") Fixes: 688cb2f2c61e ("net/ice: fix scalar Tx path segment") Cc: sta...@dpdk.org Signed-off-by: David Marchand --- drivers/net/ice/ice_rxtx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/

[PATCH v2 2/4] net/iavf: fix TSO with big segments

2023-09-27 Thread David Marchand
ssage: 2023-09-18T14:08:52.739Z|00610|dpdk(pmd-c31/id:11)|ERR|iavf_prep_pkts(): INVALID mbuf: bad data_len=[2962] Remove the check on data_len. Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes") Cc: sta...@dpdk.org Signed-off-by: David Marchand --- Changes since

[PATCH v2 1/4] net/iavf: remove log from Tx prepare datapath function

2023-09-27 Thread David Marchand
: 19ee91c6bd9a ("net/iavf: check illegal packet sizes") Cc: sta...@dpdk.org Signed-off-by: David Marchand --- drivers/net/iavf/iavf_rxtx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 0484988d13..21a06b8351 100644 --- a/driver

<    3   4   5   6   7   8   9   10   11   12   >