+ rc = tfp_get_pf(tfp, &pf);
+ if (rc) {
+ TFP_DRV_LOG(ERR,
+ "EEM: PF query error rc:%s\n",
+ strerror(-rc));
+ goto cleanup;
+ }
+
+ /* Get Table Scope control block from the session pool */
+ aparms.rm_db = ext_db->eem_db[TF_DIR_RX];
+ aparms.subtype = TF_EM_TBL_TYPE_TBL_SCOPE;
+ aparms.index = (uint32_t *)&parms->tbl_scope_id;
+ rc = tf_rm_allocate(&aparms);
+ if (rc) {
+ TFP_DRV_LOG(ERR,
+ "Failed to allocate table scope\n");
+ goto cleanup;
+ }
+
+ /* Create tbl_scope, initialize and attach to the session */
+ cparms.nitems = 1;
+ cparms.size = sizeof(struct tf_tbl_scope_cb);
+ cparms.alignment = 0;
+ rc = tfp_calloc(&cparms);
+ if (rc) {
+ /* Log error */
+ TFP_DRV_LOG(ERR,
+ "Failed to allocate session table scope, rc:%s\n",
+ strerror(-rc));
+ goto cleanup;
+ }
+
+ tbl_scope_cb = cparms.mem_va;