+#endif
+ }
+
+ return rc;
+}
+
+#if (TF_EM_ALLOC == 1)
+static int
+tf_em_move_callback(void *user_data,
+ uint64_t entry_data,
+ uint32_t new_index)
+{
+ int rc;
+ struct tf *tfp = (struct tf *)user_data;
+ struct tf_move_em_entry_parms parms;
+ struct tf_dev_info *dev;
+ struct tf_session *tfs;
+
+ memset(&parms, 0, sizeof(parms));
+
+ parms.tbl_scope_id = 0;
+ parms.flow_handle = entry_data;
+ parms.new_index = new_index;
+ TF_GET_DIR_FROM_FLOW_ID(entry_data, parms.dir);
+ parms.mem = TF_MEM_INTERNAL;
+
+ /* Retrieve the session information */
+ rc = tf_session_get_session(tfp, &tfs);
+ if (rc) {
+ TFP_DRV_LOG(ERR,
+ "%s: Failed to lookup session, rc:%s\n",
+ tf_dir_2_str(parms.dir),
+ strerror(-rc));
+ return rc;
+ }
+
+ /* Retrieve the device information */
+ rc = tf_session_get_device(tfs, &dev);
+ if (rc) {
+ TFP_DRV_LOG(ERR,
+ "%s: Failed to lookup device, rc:%s\n",
+ tf_dir_2_str(parms.dir),
+ strerror(-rc));
+ return rc;
+ }
+
+ if (dev->ops->tf_dev_move_int_em_entry != NULL)
+ rc = dev->ops->tf_dev_move_int_em_entry(tfp, &parms);
+ else
+ rc = -EOPNOTSUPP;