On 29 Sep 2026, at 10:34, David Marchand wrote:

> Introduce struct dpdk_mp_config to pass mempool parameters (name, mtu,
> socket_id, queue sizes) to dpdk_mp_create() and dpdk_mp_get() instead
> of passing the full netdev_dpdk object.
>
> This decouples mempool creation from the netdev_dpdk internals and
> will allow splitting the parts that are common between ethernet and
> vhost ports and the parts that are not.
>
> Signed-off-by: David Marchand <[email protected]>

Hi David, see two comments below.

//Eelco

> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 4c34372389..1e0dd9a492 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -740,12 +740,22 @@ dpdk_mp_sweep(void) OVS_REQUIRES(dpdk_mp_mutex)
>      }
>  }
>
> +struct dpdk_mp_config {
> +    char *name;

Maybe make this a const?

> +    int mtu;
> +    int socket_id;
> +    int n_rxq;
> +    int rxq_size;
> +    int n_txq;
> +    int txq_size;
> +};
> +

[...]

> @@ -6323,6 +6334,7 @@ static int
>  netdev_dpdk_eth_reconfigure(struct netdev *netdev)
>  {
>      struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
> +    struct dpdk_mp_config mp_cfg;
>      bool pending_reset;
>      bool try_rx_steer;
>      int err = 0;
> @@ -6370,7 +6382,16 @@ retry:
>
>      dev->started = false;
>
> -    err = netdev_dpdk_mempool_configure(dev);
> +    mp_cfg = (struct dpdk_mp_config){

Missing space between cast () and {.

> +        .name = dev->up.name,
> +        .mtu = dev->requested_mtu,
> +        .socket_id = dev->requested_socket_id,
> +        .n_rxq = dev->requested_n_rxq,
> +        .rxq_size = dev->requested_rxq_size,
> +        .n_txq = dev->requested_n_txq,
> +        .txq_size = dev->requested_txq_size,
> +    };
> +    err = netdev_dpdk_mempool_configure(dev, &mp_cfg);
>      if (err && err != EEXIST) {
>          goto out;
>      }

[...]

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to