[dpdk-dev] [PATCH v5] net/memif: zero-copy slave

Yigit, Ferruh ferruh.yigit at linux.intel.com
Fri Oct 25 18:44:50 CEST 2019


On 8/22/2019 9:18 AM, Jakub Grajciar wrote:
> Zero-copy slave support for memif PMD.
> Slave interface exposes DPDK memory to
> master interface. Only single file segments
> are supported (EAL option --single-file-segments).
> 
> Signed-off-by: Jakub Grajciar <jgrajcia at cisco.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>

Since bind() issue solved, we can continue with the patch.

<...>

> @@ -131,7 +132,7 @@ struct pmd_process_private {
>   * @param proc_private
>   *   device process private data
>   */
> -void memif_free_regions(struct pmd_process_private *proc_private);
> +void memif_free_regions(struct rte_eth_dev *dev);
> 
>  /**
>   * Finalize connection establishment process. Map shared memory file
> diff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/common/eal_common_mcfg.c
> index 066549432..03d9d472d 100644
> --- a/lib/librte_eal/common/eal_common_mcfg.c
> +++ b/lib/librte_eal/common/eal_common_mcfg.c
> @@ -161,3 +161,10 @@ rte_mcfg_timer_unlock(void)
>  	struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
>  	rte_spinlock_unlock(&mcfg->tlock);
>  }
> +
> +uint32_t
> +rte_mcfg_get_single_file_segments(void)
> +{
> +	struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
> +	return mcfg->single_file_segments;
> +}
> diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h
> index 34b0e44a0..9bb4a57f8 100644
> --- a/lib/librte_eal/common/include/rte_eal_memconfig.h
> +++ b/lib/librte_eal/common/include/rte_eal_memconfig.h
> @@ -109,6 +109,16 @@ __rte_experimental
>  void
>  rte_mcfg_timer_unlock(void);
> 
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Get the single_file_segments parameter value from memory configuration.
> + */
> +__rte_experimental
> +uint32_t
> +rte_mcfg_get_single_file_segments(void);
> +
>  #ifdef __cplusplus
>  }
>  #endif
> diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
> index 7cbf82d37..c2b9d473f 100644
> --- a/lib/librte_eal/rte_eal_version.map
> +++ b/lib/librte_eal/rte_eal_version.map
> @@ -418,5 +418,6 @@ EXPERIMENTAL {
>  	rte_lcore_to_cpu_id;
>  	rte_mcfg_timer_lock;
>  	rte_mcfg_timer_unlock;
> +	rte_mcfg_get_single_file_segments;

This should be moved to 19.11 block in experimental

cc'ed Dave for eal part,
@Dave, change looks straight forward but can you please check/comment?



More information about the dev mailing list