+static void
+start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id)
+{
+#define THREAD_NAME_LEN 16
+ struct ice_dcf_reset_event_param *param;
+ char name[THREAD_NAME_LEN];
+ pthread_t thread;
+ int ret;
+
+ param = malloc(sizeof(*param));
+ if (!param) {
+ PMD_DRV_LOG(ERR, "Failed to allocate the memory for reset handling");
+ return;
+ }
+
+ param->dcf_hw = dcf_hw;
+ param->vfr = vfr;
+ param->vf_id = vf_id;
+
+ snprintf(name, sizeof(name), "ice-reset-%u", vf_id);
+ ret = rte_ctrl_thread_create(&thread, name, NULL,
+ ice_dcf_vsi_update_service_handler, param);
+ if (ret != 0) {
+ PMD_DRV_LOG(ERR, "Failed to start the thread for reset handling");
+ free(param);
+ }
+}
+
+static uint32_t
+ice_dcf_convert_link_speed(enum virtchnl_link_speed virt_link_speed)
+{
+ uint32_t speed;
+
+ switch (virt_link_speed) {
+ case VIRTCHNL_LINK_SPEED_100MB:
+ speed = 100;
+ break;
+ case VIRTCHNL_LINK_SPEED_1GB:
+ speed = 1000;
+ break;
+ case VIRTCHNL_LINK_SPEED_10GB:
+ speed = 10000;
+ break;
+ case VIRTCHNL_LINK_SPEED_40GB:
+ speed = 40000;
+ break;
+ case VIRTCHNL_LINK_SPEED_20GB:
+ speed = 20000;
+ break;
+ case VIRTCHNL_LINK_SPEED_25GB:
+ speed = 25000;
+ break;
+ case VIRTCHNL_LINK_SPEED_2_5GB:
+ speed = 2500;
+ break;
+ case VIRTCHNL_LINK_SPEED_5GB:
+ speed = 5000;
+ break;
+ default:
+ speed = 0;
+ break;
+ }
+
+ return speed;
+}
+