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

> The mempool related code has no strong ties with the netdev_dpdk object.
> Move this code to a new netdev-dpdk-common.c file for reuse.

Hi David,

Some style consistency issues below, but the change makes sense in general.

//Eelco

> diff --git a/lib/netdev-dpdk-common.c b/lib/netdev-dpdk-common.c

[...]

> +     * positives in this use case and we handle false negatives.
> +     *
> +     * If future implementations of rte_mempool_full() were to change
> +     * it could be possible for a false positive. Even that would
> +     * likely be ok, as there are additional checks during mempool
> +     * freeing but it would make things racey.
> +     */

The closing */ could go at the end of the previous line where
it fits within 79 columns.  There is currently a mix of both
styles across the patch.  Please fix all instances.

[...]

> +                  RTE_CACHE_LINE_SIZE);
> +
> +        /* The size of the mbuf's private area (i.e. area that holds OvS'
> +         * dp_packet data)*/

Add a space before */.

[...]

> diff --git a/lib/netdev-dpdk-common.h b/lib/netdev-dpdk-common.h

[...]

> + * DMA addresses to 4KB.
> + * The minimum mbuf size is limited to avoid scatter behaviour and drop in
> + * performance for standard Ethernet MTU.
> + */

Move end of comment to previous line.

> +/* Max and min number of packets in the mempool. OVS tries to allocate a
> + * mempool with MAX_NB_MBUF: if this fails (because the system doesn't have
> + * enough hugepages) we keep halving the number until the allocation succeeds
> + * or we reach MIN_NB_MBUF */

End comment with a period.

[...]

> +void dpdk_mp_init(const struct smap *ovs_other_config);
> +bool dpdk_mp_per_port_memory(void);
> +struct dpdk_mp * dpdk_mp_get(struct dpdk_mp_config *cfg);

Extra space between * and the function name.

[...]

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

Reply via email to