[dpdk-dev] [RFC v3] /net: memory interface (memif)

Stephen Hemminger stephen at networkplumber.org
Thu Dec 13 19:07:09 CET 2018


On Thu, 13 Dec 2018 14:30:51 +0100
Jakub Grajciar <jgrajcia at cisco.com> wrote:

> +
> +typedef uint16_t memif_region_index_t;
> +typedef uint32_t memif_region_offset_t;
> +typedef uint64_t memif_region_size_t;
> +typedef uint16_t memif_ring_index_t;
> +typedef uint32_t memif_interface_id_t;
> +typedef uint16_t memif_version_t;
> +typedef uint8_t memif_log2_ring_size_t;
> +

Seems very typedef heavy to me. Having more typedefs
does not improve the readability.


> +typedef struct __attribute__ ((packed)) {

Use __rte_packed rather than attributes directly.

> +typedef struct __attribute__ ((packed)) {
> +	uint8_t if_name[32];
> +} memif_msg_connect_t;
> +

Why magic constant 32? Better to use something like

#define MEMIF_NAMESZ 32

Also, I am confused about how this relates
to DPDK device names and Linux network device names (if at all).


More information about the dev mailing list