[PATCH v2 08/73] net/ntnic: add create/destroy implementation for NT flows

Stephen Hemminger stephen at networkplumber.org
Tue Oct 22 19:20:59 CEST 2024


On Tue, 22 Oct 2024 18:54:25 +0200
Serhii Iliushyk <sil-plv at napatech.com> wrote:

> diff --git a/drivers/net/ntnic/include/flow_api.h b/drivers/net/ntnic/include/flow_api.h
> index 748da89262..667dad6d5f 100644
> --- a/drivers/net/ntnic/include/flow_api.h
> +++ b/drivers/net/ntnic/include/flow_api.h
> @@ -68,6 +68,9 @@ struct flow_nic_dev {
>         uint32_t flow_unique_id_counter;
>         /* linked list of all flows created on this NIC */
>         struct flow_handle *flow_base;
> +       /* linked list of all FLM flows created on this NIC */
> +       struct flow_handle *flow_base_flm;
> +       pthread_mutex_t flow_mtx;


Use of pthread_mutex makes the driver unportable to Windows, and
will block the the thread in case of contention. And it will not
handle the case of primary/secondary process.

Prefer use of DPDK spinlock if possible.


More information about the dev mailing list