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

Stephen Hemminger stephen at networkplumber.org
Fri Jan 4 20:32:05 CET 2019


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

> +	role = MEMIF_ROLE_SLAVE;
> +	flags = 0;
> +	id = 0;
> +	buffer_size = 2048;
> +	log2_ring_size = 10;
> +	nrxq = 1;
> +	ntxq = 1;
> +	socket_filename = ETH_MEMIF_DEFAULT_SOCKET_FILENAME;
> +	secret = NULL;
> +	eth_addr = NULL;

Minor nit, since you initialize some of the values when declaring them.
Why not move all these initializations up to where the declaration is.
Just makes everything more compact.


> +	/* create interface */
> +	ret =
> +	    memif_create(vdev, role, id, flags, socket_filename, log2_ring_size,
> +			 nrxq, ntxq, buffer_size, secret, eth_addr);
> +

Another nit, why split the line like this? Instead of:
	ret = memif_create(vdev, role, id, flags, socket_filename,
			   log2_ring_size, nrxq, ntxq, buffer_size, secret, eth_addr);



More information about the dev mailing list