event/dlb2: add port unlink and unlinks in progress
[dpdk.git] / drivers / event / dlb2 / pf / dlb2_pf.c
index 37be4b1..33ea73e 100644 (file)
@@ -454,6 +454,55 @@ dlb2_pf_map_qid(struct dlb2_hw_dev *handle,
        return ret;
 }
 
+static int
+dlb2_pf_unmap_qid(struct dlb2_hw_dev *handle,
+                 struct dlb2_unmap_qid_args *cfg)
+{
+       struct dlb2_dev *dlb2_dev = (struct dlb2_dev *)handle->pf_dev;
+       struct dlb2_cmd_response response = {0};
+       int ret;
+
+       DLB2_INFO(dev->dlb2_device, "Entering %s()\n", __func__);
+
+       ret = dlb2_hw_unmap_qid(&dlb2_dev->hw,
+                               handle->domain_id,
+                               cfg,
+                               &response,
+                               false,
+                               0);
+
+       cfg->response = response;
+
+       DLB2_INFO(dev->dlb2_device, "Exiting %s() with ret=%d\n",
+                 __func__, ret);
+
+       return ret;
+}
+
+static int
+dlb2_pf_pending_port_unmaps(struct dlb2_hw_dev *handle,
+                           struct dlb2_pending_port_unmaps_args *args)
+{
+       struct dlb2_dev *dlb2_dev = (struct dlb2_dev *)handle->pf_dev;
+       struct dlb2_cmd_response response = {0};
+       int ret;
+
+       DLB2_INFO(dev->dlb2_device, "Entering %s()\n", __func__);
+
+       ret = dlb2_hw_pending_port_unmaps(&dlb2_dev->hw,
+                                         handle->domain_id,
+                                         args,
+                                         &response,
+                                         false,
+                                         0);
+
+       args->response = response;
+
+       DLB2_INFO(dev->dlb2_device, "Exiting %s() with ret=%d\n",
+                 __func__, ret);
+
+       return ret;
+}
 static void
 dlb2_pf_iface_fn_ptrs_init(void)
 {
@@ -470,6 +519,8 @@ dlb2_pf_iface_fn_ptrs_init(void)
        dlb2_iface_dir_queue_create = dlb2_pf_dir_queue_create;
        dlb2_iface_dir_port_create = dlb2_pf_dir_port_create;
        dlb2_iface_map_qid = dlb2_pf_map_qid;
+       dlb2_iface_unmap_qid = dlb2_pf_unmap_qid;
+       dlb2_iface_pending_port_unmaps = dlb2_pf_pending_port_unmaps;
        dlb2_iface_get_sn_allocation = dlb2_pf_get_sn_allocation;
        dlb2_iface_set_sn_allocation = dlb2_pf_set_sn_allocation;
        dlb2_iface_get_sn_occupancy = dlb2_pf_get_sn_occupancy;