> -----Original Message-----
> From: Daly, Lee
> Sent: Tuesday, April 17, 2018 2:35 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Tucker, Greg B
> <greg.b.tuc...@intel.com>; Jain, Deepak K <deepak.k.j...@intel.com>; Trahe,
> Fiona <fiona.tr...@intel.com>; Daly, Lee <lee.d...@intel.com>
> Subject: [PATCH v3 02/11] compress/isal: add pmd device init and de-init
> 
> Signed-off-by: Lee Daly <lee.d...@intel.com>

...

> +++ b/drivers/compress/isal/isal_compress_pmd.c
> @@ -3,20 +3,102 @@
>   */
> 
>  #include <rte_bus_vdev.h>
> +#include <rte_common.h>
> +#include <rte_malloc.h>
>  #include <rte_compressdev_pmd.h>
> 
> +#include "isal_compress_pmd_private.h"
> +
> +int isal_logtype_driver;
> +
> +/* Enqueue burst */
> +static uint16_t
> +isal_comp_pmd_enqueue_burst(void *queue_pair __rte_unused,
> +                     struct rte_comp_op **ops __rte_unused,
> +                     uint16_t nb_ops __rte_unused)
> +{
> +     uint16_t num_enq = 0;
> +
> +     return num_enq;
> +}
> +
> +/* Dequeue burst */
> +static uint16_t
> +isal_comp_pmd_dequeue_burst(void *queue_pair __rte_unused,
> +             struct rte_comp_op **ops __rte_unused,
> +             uint16_t nb_ops __rte_unused)
> +{
> +     uint16_t nb_dequeued = 0;
> +
> +     return nb_dequeued;
> +}

Since you have a separate patch implementing these two functions 
(enqueue/dequeuer),
I would directly declare them in that patch. Therefore, also remove the 
function pointers setting
in compdev_isal_create and leave it for that patch.

> +
> +/* Create ISA-L compression device */
> +static int
> +compdev_isal_create(const char *name, struct rte_vdev_device *vdev,
> +             struct rte_compressdev_pmd_init_params *init_params) {
> +     struct rte_compressdev *dev;
> +
> +     dev = rte_compressdev_pmd_create(name, &vdev->device,
> +                     sizeof(struct isal_comp_private), init_params);
> +     if (dev == NULL) {
> +             ISAL_PMD_LOG(ERR, "failed to create compressdev vdev");
> +             return -EFAULT;
> +     }
> +
> +     dev->dev_ops = isal_compress_pmd_ops;
> +
> +     /* register rx/tx burst functions for data path */
> +     dev->dequeue_burst = isal_comp_pmd_dequeue_burst;
> +     dev->enqueue_burst = isal_comp_pmd_enqueue_burst;
> +
> +     return 0;


Reply via email to