On Tue, Oct 5, 2021 at 12:43 PM Kevin Traynor <[email protected]> wrote:
> > @@ -489,6 +498,11 @@ dpdk_init__(const struct smap *ovs_other_config)
> > }
> > }
> >
> > +#pragma GCC diagnostic push
> > +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> > + unixctl_command_register("dpdk/lcores-list", "", 0, 0,
>
> typo here
Ack.
>
> Just to note as it is DPDK lcore list, it won't show pmd threads after
> RTE_LCORE_MAX has been reached. It might be worth adding note to OVS
> command documentation.
I can add a warning if the lcore-list command notices that the set of
cores in pmd-cpu-mask is larger than list of NON EAL lcores.
>
> Those pmds threads will also not get an lcore when others have been
> removed. Though these items are based on pmds > RTE_LCORE_MAX which is a
> very unlikely corner case.
Good catch!
I'll fix this.
>
> > + dpdk_unixctl_mem_stream, rte_lcore_dump);
> > +#pragma GCC diagnostic pop
> > unixctl_command_register("dpdk/log-list", "", 0, 0,
> > dpdk_unixctl_mem_stream, rte_log_dump);
> > unixctl_command_register("dpdk/log-set", "{level | pattern:level}", 0,
> > @@ -572,11 +586,43 @@ dpdk_available(void)
> > }
> >
> > void
> > -dpdk_set_lcore_id(unsigned cpu)
> > +dpdk_init_thread_context(unsigned cpu)
> > {
> > /* NON_PMD_CORE_ID is reserved for use by non pmd threads. */
> > ovs_assert(cpu != NON_PMD_CORE_ID);
> > - RTE_PER_LCORE(_lcore_id) = cpu;
> > +
> > + if (!dpdk_available()) {
> > + return;
> > + }
> > +
> > +#pragma GCC diagnostic push
> > +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> > + if (rte_thread_register() < 0) {
> > +#pragma GCC diagnostic pop
> > + VLOG_WARN("This OVS pmd thread will share resources with the
> > non-pmd "
> > + "thread: %s.", rte_strerror(rte_errno));
>
> It would be good to tell the OVS user what the impact is for them here.
I'll reword.
>
> Also, the strerror is low level and it's not really clear from an OVS
> perspective how it relates e.g. it can say "Cannot allocate memory" when
> RTE_LCORE_MAX reached which sounds fatal, but in this case is not for OVS.
DPDK EAL logs already provide some info, I'll drop the error string from dpdk.
--
David Marchand
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev