event/dpaa2: remove link from info structure
authorAshish Jain <ashish.jain@nxp.com>
Wed, 9 May 2018 09:20:53 +0000 (14:50 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Thu, 10 May 2018 12:03:47 +0000 (14:03 +0200)
Removing use of link data under evq_info_t structure which was
used to check whether the the associated evq has been linked
or not. Since, an evq can be linked to multiple event ports,
thus setting the link variable only allowed the first event
port to be associated with the evq. This led to huge performance
drop in case of multiple event ports as I/O only worked on
first event port associated with the evq.

Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
Cc: stable@dpdk.org
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/event/dpaa2/dpaa2_eventdev.c
drivers/event/dpaa2/dpaa2_eventdev.h

index 08388c7..cd801bf 100644 (file)
@@ -460,7 +460,6 @@ dpaa2_eventdev_port_unlink(struct rte_eventdev *dev, void *port,
                dpio_remove_static_dequeue_channel(dpaa2_portal->dpio_dev->dpio,
                                        0, dpaa2_portal->dpio_dev->token,
                        evq_info->dpcon->dpcon_id);
-               evq_info->link = 0;
        }
 
        return (int)nb_unlinks;
@@ -481,8 +480,6 @@ dpaa2_eventdev_port_link(struct rte_eventdev *dev, void *port,
 
        for (i = 0; i < nb_links; i++) {
                evq_info = &priv->evq_info[queues[i]];
-               if (evq_info->link)
-                       continue;
 
                ret = dpio_add_static_dequeue_channel(
                        dpaa2_portal->dpio_dev->dpio,
@@ -497,7 +494,6 @@ dpaa2_eventdev_port_link(struct rte_eventdev *dev, void *port,
                qbman_swp_push_set(dpaa2_portal->dpio_dev->sw_portal,
                                   channel_index, 1);
                evq_info->dpcon->channel_index = channel_index;
-               evq_info->link = 1;
        }
 
        RTE_SET_USED(priorities);
@@ -511,7 +507,6 @@ err:
                dpio_remove_static_dequeue_channel(dpaa2_portal->dpio_dev->dpio,
                                        0, dpaa2_portal->dpio_dev->token,
                        evq_info->dpcon->dpcon_id);
-               evq_info->link = 0;
        }
        return ret;
 }
index 91c8f2a..229f66a 100644 (file)
@@ -63,7 +63,6 @@ struct evq_info_t {
        struct dpaa2_dpci_dev *dpci;
        /* Configuration provided by the user */
        uint32_t event_queue_cfg;
-       uint8_t link;
 };
 
 struct dpaa2_eventdev {