[dpdk-dev] [PATCH v6 02/14] net/avf: initialization of avf PMD

Stephen Hemminger stephen at networkplumber.org
Wed Jan 10 18:17:33 CET 2018


On Wed, 10 Jan 2018 14:15:49 +0800
Wenzhuo Lu <wenzhuo.lu at intel.com> wrote:

> +/* spinlock func for base code */
> +void
> +avf_init_spinlock_d(struct avf_spinlock *sp)
> +{
> +	rte_spinlock_init(&sp->spinlock);
> +}
> +
> +void
> +avf_acquire_spinlock_d(struct avf_spinlock *sp)
> +{
> +	rte_spinlock_lock(&sp->spinlock);
> +}
> +
> +void
> +avf_release_spinlock_d(struct avf_spinlock *sp)
> +{
> +	rte_spinlock_unlock(&sp->spinlock);
> +}
> +
> +void
> +avf_destroy_spinlock_d(__rte_unused struct avf_spinlock *sp)
> +{
> +}

You might want to inline these (in a header file) if in critical path.


More information about the dev mailing list