1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2020 Broadcom
10 #include "tf_session.h"
19 #include "tf_common.h"
23 tf_open_session(struct tf *tfp,
24 struct tf_open_session_parms *parms)
27 unsigned int domain, bus, slot, device;
28 struct tf_session_open_session_parms oparms;
30 TF_CHECK_PARMS2(tfp, parms);
32 /* Filter out any non-supported device types on the Core
33 * side. It is assumed that the Firmware will be supported if
34 * firmware open session succeeds.
36 if (parms->device_type != TF_DEVICE_TYPE_WH) {
38 "Unsupported device type %d\n",
43 /* Verify control channel and build the beginning of session_id */
44 rc = sscanf(parms->ctrl_chan_name,
52 "Failed to scan device ctrl_chan_name\n");
56 parms->session_id.internal.domain = domain;
57 parms->session_id.internal.bus = bus;
58 parms->session_id.internal.device = device;
59 oparms.open_cfg = parms;
61 /* Session vs session client is decided in
62 * tf_session_open_session()
64 printf("TF_OPEN, %s\n", parms->ctrl_chan_name);
65 rc = tf_session_open_session(tfp, &oparms);
66 /* Logging handled by tf_session_open_session */
71 "domain:%d, bus:%d, device:%d\n",
72 parms->session_id.internal.domain,
73 parms->session_id.internal.bus,
74 parms->session_id.internal.device);
80 tf_attach_session(struct tf *tfp,
81 struct tf_attach_session_parms *parms)
84 unsigned int domain, bus, slot, device;
85 struct tf_session_attach_session_parms aparms;
87 TF_CHECK_PARMS2(tfp, parms);
89 /* Verify control channel */
90 rc = sscanf(parms->ctrl_chan_name,
98 "Failed to scan device ctrl_chan_name\n");
102 /* Verify 'attach' channel */
103 rc = sscanf(parms->attach_chan_name,
111 "Failed to scan device attach_chan_name\n");
115 /* Prepare return value of session_id, using ctrl_chan_name
116 * device values as it becomes the session id.
118 parms->session_id.internal.domain = domain;
119 parms->session_id.internal.bus = bus;
120 parms->session_id.internal.device = device;
121 aparms.attach_cfg = parms;
122 rc = tf_session_attach_session(tfp,
124 /* Logging handled by dev_bind */
129 "Attached to session, session_id:%d\n",
130 parms->session_id.id);
133 "domain:%d, bus:%d, device:%d, fw_session_id:%d\n",
134 parms->session_id.internal.domain,
135 parms->session_id.internal.bus,
136 parms->session_id.internal.device,
137 parms->session_id.internal.fw_session_id);
143 tf_close_session(struct tf *tfp)
146 struct tf_session_close_session_parms cparms = { 0 };
147 union tf_session_id session_id = { 0 };
150 TF_CHECK_PARMS1(tfp);
152 cparms.ref_count = &ref_count;
153 cparms.session_id = &session_id;
154 /* Session vs session client is decided in
155 * tf_session_close_session()
157 rc = tf_session_close_session(tfp,
159 /* Logging handled by tf_session_close_session */
164 "domain:%d, bus:%d, device:%d\n",
165 cparms.session_id->internal.domain,
166 cparms.session_id->internal.bus,
167 cparms.session_id->internal.device);
172 /** insert EM hash entry API
178 int tf_insert_em_entry(struct tf *tfp,
179 struct tf_insert_em_entry_parms *parms)
181 struct tf_session *tfs;
182 struct tf_dev_info *dev;
185 TF_CHECK_PARMS2(tfp, parms);
187 /* Retrieve the session information */
188 rc = tf_session_get_session(tfp, &tfs);
191 "%s: Failed to lookup session, rc:%s\n",
192 tf_dir_2_str(parms->dir),
197 /* Retrieve the device information */
198 rc = tf_session_get_device(tfs, &dev);
201 "%s: Failed to lookup device, rc:%s\n",
202 tf_dir_2_str(parms->dir),
207 if (parms->mem == TF_MEM_EXTERNAL &&
208 dev->ops->tf_dev_insert_ext_em_entry != NULL)
209 rc = dev->ops->tf_dev_insert_ext_em_entry(tfp, parms);
210 else if (parms->mem == TF_MEM_INTERNAL &&
211 dev->ops->tf_dev_insert_int_em_entry != NULL)
212 rc = dev->ops->tf_dev_insert_int_em_entry(tfp, parms);
218 "%s: EM insert failed, rc:%s\n",
219 tf_dir_2_str(parms->dir),
227 /** Delete EM hash entry API
233 int tf_delete_em_entry(struct tf *tfp,
234 struct tf_delete_em_entry_parms *parms)
236 struct tf_session *tfs;
237 struct tf_dev_info *dev;
240 TF_CHECK_PARMS2(tfp, parms);
242 /* Retrieve the session information */
243 rc = tf_session_get_session(tfp, &tfs);
246 "%s: Failed to lookup session, rc:%s\n",
247 tf_dir_2_str(parms->dir),
252 /* Retrieve the device information */
253 rc = tf_session_get_device(tfs, &dev);
256 "%s: Failed to lookup device, rc:%s\n",
257 tf_dir_2_str(parms->dir),
262 if (parms->mem == TF_MEM_EXTERNAL)
263 rc = dev->ops->tf_dev_delete_ext_em_entry(tfp, parms);
264 else if (parms->mem == TF_MEM_INTERNAL)
265 rc = dev->ops->tf_dev_delete_int_em_entry(tfp, parms);
271 "%s: EM delete failed, rc:%s\n",
272 tf_dir_2_str(parms->dir),
281 tf_alloc_identifier(struct tf *tfp,
282 struct tf_alloc_identifier_parms *parms)
285 struct tf_session *tfs;
286 struct tf_dev_info *dev;
287 struct tf_ident_alloc_parms aparms;
290 TF_CHECK_PARMS2(tfp, parms);
292 /* Can't do static initialization due to UT enum check */
293 memset(&aparms, 0, sizeof(struct tf_ident_alloc_parms));
295 /* Retrieve the session information */
296 rc = tf_session_get_session(tfp, &tfs);
299 "%s: Failed to lookup session, rc:%s\n",
300 tf_dir_2_str(parms->dir),
305 /* Retrieve the device information */
306 rc = tf_session_get_device(tfs, &dev);
309 "%s: Failed to lookup device, rc:%s\n",
310 tf_dir_2_str(parms->dir),
315 if (dev->ops->tf_dev_alloc_ident == NULL) {
318 "%s: Operation not supported, rc:%s\n",
319 tf_dir_2_str(parms->dir),
324 aparms.dir = parms->dir;
325 aparms.type = parms->ident_type;
327 rc = dev->ops->tf_dev_alloc_ident(tfp, &aparms);
330 "%s: Identifier allocation failed, rc:%s\n",
331 tf_dir_2_str(parms->dir),
342 tf_free_identifier(struct tf *tfp,
343 struct tf_free_identifier_parms *parms)
346 struct tf_session *tfs;
347 struct tf_dev_info *dev;
348 struct tf_ident_free_parms fparms;
350 TF_CHECK_PARMS2(tfp, parms);
352 /* Can't do static initialization due to UT enum check */
353 memset(&fparms, 0, sizeof(struct tf_ident_free_parms));
355 /* Retrieve the session information */
356 rc = tf_session_get_session(tfp, &tfs);
359 "%s: Failed to lookup session, rc:%s\n",
360 tf_dir_2_str(parms->dir),
365 /* Retrieve the device information */
366 rc = tf_session_get_device(tfs, &dev);
369 "%s: Failed to lookup device, rc:%s\n",
370 tf_dir_2_str(parms->dir),
375 if (dev->ops->tf_dev_free_ident == NULL) {
378 "%s: Operation not supported, rc:%s\n",
379 tf_dir_2_str(parms->dir),
384 fparms.dir = parms->dir;
385 fparms.type = parms->ident_type;
386 fparms.id = parms->id;
387 rc = dev->ops->tf_dev_free_ident(tfp, &fparms);
390 "%s: Identifier free failed, rc:%s\n",
391 tf_dir_2_str(parms->dir),
400 tf_alloc_tcam_entry(struct tf *tfp,
401 struct tf_alloc_tcam_entry_parms *parms)
404 struct tf_session *tfs;
405 struct tf_dev_info *dev;
406 struct tf_tcam_alloc_parms aparms = { 0 };
408 TF_CHECK_PARMS2(tfp, parms);
410 /* Retrieve the session information */
411 rc = tf_session_get_session(tfp, &tfs);
414 "%s: Failed to lookup session, rc:%s\n",
415 tf_dir_2_str(parms->dir),
420 /* Retrieve the device information */
421 rc = tf_session_get_device(tfs, &dev);
424 "%s: Failed to lookup device, rc:%s\n",
425 tf_dir_2_str(parms->dir),
430 if (dev->ops->tf_dev_alloc_tcam == NULL) {
433 "%s: Operation not supported, rc:%s\n",
434 tf_dir_2_str(parms->dir),
439 aparms.dir = parms->dir;
440 aparms.type = parms->tcam_tbl_type;
441 aparms.key_size = TF_BITS2BYTES_WORD_ALIGN(parms->key_sz_in_bits);
442 aparms.priority = parms->priority;
443 rc = dev->ops->tf_dev_alloc_tcam(tfp, &aparms);
446 "%s: TCAM allocation failed, rc:%s\n",
447 tf_dir_2_str(parms->dir),
452 parms->idx = aparms.idx;
458 tf_set_tcam_entry(struct tf *tfp,
459 struct tf_set_tcam_entry_parms *parms)
462 struct tf_session *tfs;
463 struct tf_dev_info *dev;
464 struct tf_tcam_set_parms sparms = { 0 };
466 TF_CHECK_PARMS2(tfp, parms);
468 /* Retrieve the session information */
469 rc = tf_session_get_session(tfp, &tfs);
472 "%s: Failed to lookup session, rc:%s\n",
473 tf_dir_2_str(parms->dir),
478 /* Retrieve the device information */
479 rc = tf_session_get_device(tfs, &dev);
482 "%s: Failed to lookup device, rc:%s\n",
483 tf_dir_2_str(parms->dir),
488 if (dev->ops->tf_dev_set_tcam == NULL) {
491 "%s: Operation not supported, rc:%s\n",
492 tf_dir_2_str(parms->dir),
497 sparms.dir = parms->dir;
498 sparms.type = parms->tcam_tbl_type;
499 sparms.idx = parms->idx;
500 sparms.key = parms->key;
501 sparms.mask = parms->mask;
502 sparms.key_size = TF_BITS2BYTES_WORD_ALIGN(parms->key_sz_in_bits);
503 sparms.result = parms->result;
504 sparms.result_size = TF_BITS2BYTES_WORD_ALIGN(parms->result_sz_in_bits);
506 rc = dev->ops->tf_dev_set_tcam(tfp, &sparms);
509 "%s: TCAM set failed, rc:%s\n",
510 tf_dir_2_str(parms->dir),
519 tf_get_tcam_entry(struct tf *tfp __rte_unused,
520 struct tf_get_tcam_entry_parms *parms __rte_unused)
522 TF_CHECK_PARMS2(tfp, parms);
527 tf_free_tcam_entry(struct tf *tfp,
528 struct tf_free_tcam_entry_parms *parms)
531 struct tf_session *tfs;
532 struct tf_dev_info *dev;
533 struct tf_tcam_free_parms fparms = { 0 };
535 TF_CHECK_PARMS2(tfp, parms);
537 /* Retrieve the session information */
538 rc = tf_session_get_session(tfp, &tfs);
541 "%s: Failed to lookup session, rc:%s\n",
542 tf_dir_2_str(parms->dir),
547 /* Retrieve the device information */
548 rc = tf_session_get_device(tfs, &dev);
551 "%s: Failed to lookup device, rc:%s\n",
552 tf_dir_2_str(parms->dir),
557 if (dev->ops->tf_dev_free_tcam == NULL) {
560 "%s: Operation not supported, rc:%s\n",
561 tf_dir_2_str(parms->dir),
566 fparms.dir = parms->dir;
567 fparms.type = parms->tcam_tbl_type;
568 fparms.idx = parms->idx;
569 rc = dev->ops->tf_dev_free_tcam(tfp, &fparms);
572 "%s: TCAM free failed, rc:%s\n",
573 tf_dir_2_str(parms->dir),
582 tf_alloc_tbl_entry(struct tf *tfp,
583 struct tf_alloc_tbl_entry_parms *parms)
586 struct tf_session *tfs;
587 struct tf_dev_info *dev;
588 struct tf_tbl_alloc_parms aparms;
591 TF_CHECK_PARMS2(tfp, parms);
593 /* Can't do static initialization due to UT enum check */
594 memset(&aparms, 0, sizeof(struct tf_tbl_alloc_parms));
596 /* Retrieve the session information */
597 rc = tf_session_get_session(tfp, &tfs);
600 "%s: Failed to lookup session, rc:%s\n",
601 tf_dir_2_str(parms->dir),
606 /* Retrieve the device information */
607 rc = tf_session_get_device(tfs, &dev);
610 "%s: Failed to lookup device, rc:%s\n",
611 tf_dir_2_str(parms->dir),
616 aparms.dir = parms->dir;
617 aparms.type = parms->type;
619 aparms.tbl_scope_id = parms->tbl_scope_id;
621 if (parms->type == TF_TBL_TYPE_EXT) {
622 if (dev->ops->tf_dev_alloc_ext_tbl == NULL) {
625 "%s: Operation not supported, rc:%s\n",
626 tf_dir_2_str(parms->dir),
631 rc = dev->ops->tf_dev_alloc_ext_tbl(tfp, &aparms);
634 "%s: External table allocation failed, rc:%s\n",
635 tf_dir_2_str(parms->dir),
641 if (dev->ops->tf_dev_alloc_tbl == NULL) {
644 "%s: Operation not supported, rc:%s\n",
645 tf_dir_2_str(parms->dir),
650 rc = dev->ops->tf_dev_alloc_tbl(tfp, &aparms);
653 "%s: Table allocation failed, rc:%s\n",
654 tf_dir_2_str(parms->dir),
666 tf_free_tbl_entry(struct tf *tfp,
667 struct tf_free_tbl_entry_parms *parms)
670 struct tf_session *tfs;
671 struct tf_dev_info *dev;
672 struct tf_tbl_free_parms fparms;
674 TF_CHECK_PARMS2(tfp, parms);
676 /* Can't do static initialization due to UT enum check */
677 memset(&fparms, 0, sizeof(struct tf_tbl_free_parms));
679 /* Retrieve the session information */
680 rc = tf_session_get_session(tfp, &tfs);
683 "%s: Failed to lookup session, rc:%s\n",
684 tf_dir_2_str(parms->dir),
689 /* Retrieve the device information */
690 rc = tf_session_get_device(tfs, &dev);
693 "%s: Failed to lookup device, rc:%s\n",
694 tf_dir_2_str(parms->dir),
699 fparms.dir = parms->dir;
700 fparms.type = parms->type;
701 fparms.idx = parms->idx;
702 fparms.tbl_scope_id = parms->tbl_scope_id;
704 if (parms->type == TF_TBL_TYPE_EXT) {
705 if (dev->ops->tf_dev_free_ext_tbl == NULL) {
708 "%s: Operation not supported, rc:%s\n",
709 tf_dir_2_str(parms->dir),
714 rc = dev->ops->tf_dev_free_ext_tbl(tfp, &fparms);
717 "%s: Table free failed, rc:%s\n",
718 tf_dir_2_str(parms->dir),
723 if (dev->ops->tf_dev_free_tbl == NULL) {
726 "%s: Operation not supported, rc:%s\n",
727 tf_dir_2_str(parms->dir),
732 rc = dev->ops->tf_dev_free_tbl(tfp, &fparms);
735 "%s: Table free failed, rc:%s\n",
736 tf_dir_2_str(parms->dir),
746 tf_set_tbl_entry(struct tf *tfp,
747 struct tf_set_tbl_entry_parms *parms)
750 struct tf_session *tfs;
751 struct tf_dev_info *dev;
752 struct tf_tbl_set_parms sparms;
754 TF_CHECK_PARMS3(tfp, parms, parms->data);
756 /* Can't do static initialization due to UT enum check */
757 memset(&sparms, 0, sizeof(struct tf_tbl_set_parms));
759 /* Retrieve the session information */
760 rc = tf_session_get_session(tfp, &tfs);
763 "%s: Failed to lookup session, rc:%s\n",
764 tf_dir_2_str(parms->dir),
769 /* Retrieve the device information */
770 rc = tf_session_get_device(tfs, &dev);
773 "%s: Failed to lookup device, rc:%s\n",
774 tf_dir_2_str(parms->dir),
779 sparms.dir = parms->dir;
780 sparms.type = parms->type;
781 sparms.data = parms->data;
782 sparms.data_sz_in_bytes = parms->data_sz_in_bytes;
783 sparms.idx = parms->idx;
784 sparms.tbl_scope_id = parms->tbl_scope_id;
786 if (parms->type == TF_TBL_TYPE_EXT) {
787 if (dev->ops->tf_dev_set_ext_tbl == NULL) {
790 "%s: Operation not supported, rc:%s\n",
791 tf_dir_2_str(parms->dir),
796 rc = dev->ops->tf_dev_set_ext_tbl(tfp, &sparms);
799 "%s: Table set failed, rc:%s\n",
800 tf_dir_2_str(parms->dir),
805 if (dev->ops->tf_dev_set_tbl == NULL) {
808 "%s: Operation not supported, rc:%s\n",
809 tf_dir_2_str(parms->dir),
814 rc = dev->ops->tf_dev_set_tbl(tfp, &sparms);
817 "%s: Table set failed, rc:%s\n",
818 tf_dir_2_str(parms->dir),
828 tf_get_tbl_entry(struct tf *tfp,
829 struct tf_get_tbl_entry_parms *parms)
832 struct tf_session *tfs;
833 struct tf_dev_info *dev;
834 struct tf_tbl_get_parms gparms;
836 TF_CHECK_PARMS3(tfp, parms, parms->data);
838 /* Can't do static initialization due to UT enum check */
839 memset(&gparms, 0, sizeof(struct tf_tbl_get_parms));
841 /* Retrieve the session information */
842 rc = tf_session_get_session(tfp, &tfs);
845 "%s: Failed to lookup session, rc:%s\n",
846 tf_dir_2_str(parms->dir),
851 /* Retrieve the device information */
852 rc = tf_session_get_device(tfs, &dev);
855 "%s: Failed to lookup device, rc:%s\n",
856 tf_dir_2_str(parms->dir),
861 if (dev->ops->tf_dev_get_tbl == NULL) {
864 "%s: Operation not supported, rc:%s\n",
865 tf_dir_2_str(parms->dir),
870 gparms.dir = parms->dir;
871 gparms.type = parms->type;
872 gparms.data = parms->data;
873 gparms.data_sz_in_bytes = parms->data_sz_in_bytes;
874 gparms.idx = parms->idx;
875 rc = dev->ops->tf_dev_get_tbl(tfp, &gparms);
878 "%s: Table get failed, rc:%s\n",
879 tf_dir_2_str(parms->dir),
888 tf_bulk_get_tbl_entry(struct tf *tfp,
889 struct tf_bulk_get_tbl_entry_parms *parms)
892 struct tf_session *tfs;
893 struct tf_dev_info *dev;
894 struct tf_tbl_get_bulk_parms bparms;
896 TF_CHECK_PARMS2(tfp, parms);
898 /* Can't do static initialization due to UT enum check */
899 memset(&bparms, 0, sizeof(struct tf_tbl_get_bulk_parms));
901 /* Retrieve the session information */
902 rc = tf_session_get_session(tfp, &tfs);
905 "%s: Failed to lookup session, rc:%s\n",
906 tf_dir_2_str(parms->dir),
911 /* Retrieve the device information */
912 rc = tf_session_get_device(tfs, &dev);
915 "%s: Failed to lookup device, rc:%s\n",
916 tf_dir_2_str(parms->dir),
921 if (parms->type == TF_TBL_TYPE_EXT) {
922 /* Not supported, yet */
925 "%s, External table type not supported, rc:%s\n",
926 tf_dir_2_str(parms->dir),
932 /* Internal table type processing */
934 if (dev->ops->tf_dev_get_bulk_tbl == NULL) {
937 "%s: Operation not supported, rc:%s\n",
938 tf_dir_2_str(parms->dir),
943 bparms.dir = parms->dir;
944 bparms.type = parms->type;
945 bparms.starting_idx = parms->starting_idx;
946 bparms.num_entries = parms->num_entries;
947 bparms.entry_sz_in_bytes = parms->entry_sz_in_bytes;
948 bparms.physical_mem_addr = parms->physical_mem_addr;
949 rc = dev->ops->tf_dev_get_bulk_tbl(tfp, &bparms);
952 "%s: Table get bulk failed, rc:%s\n",
953 tf_dir_2_str(parms->dir),
962 tf_alloc_tbl_scope(struct tf *tfp,
963 struct tf_alloc_tbl_scope_parms *parms)
965 struct tf_session *tfs;
966 struct tf_dev_info *dev;
969 TF_CHECK_PARMS2(tfp, parms);
971 /* Retrieve the session information */
972 rc = tf_session_get_session(tfp, &tfs);
975 "Failed to lookup session, rc:%s\n",
980 /* Retrieve the device information */
981 rc = tf_session_get_device(tfs, &dev);
984 "Failed to lookup device, rc:%s\n",
989 if (dev->ops->tf_dev_alloc_tbl_scope != NULL) {
990 rc = dev->ops->tf_dev_alloc_tbl_scope(tfp, parms);
993 "Alloc table scope not supported by device\n");
1001 tf_free_tbl_scope(struct tf *tfp,
1002 struct tf_free_tbl_scope_parms *parms)
1004 struct tf_session *tfs;
1005 struct tf_dev_info *dev;
1008 TF_CHECK_PARMS2(tfp, parms);
1010 /* Retrieve the session information */
1011 rc = tf_session_get_session(tfp, &tfs);
1014 "Failed to lookup session, rc:%s\n",
1019 /* Retrieve the device information */
1020 rc = tf_session_get_device(tfs, &dev);
1023 "Failed to lookup device, rc:%s\n",
1028 if (dev->ops->tf_dev_free_tbl_scope) {
1029 rc = dev->ops->tf_dev_free_tbl_scope(tfp, parms);
1032 "Free table scope not supported by device\n");
1040 tf_set_if_tbl_entry(struct tf *tfp,
1041 struct tf_set_if_tbl_entry_parms *parms)
1044 struct tf_session *tfs;
1045 struct tf_dev_info *dev;
1046 struct tf_if_tbl_set_parms sparms = { 0 };
1048 TF_CHECK_PARMS2(tfp, parms);
1050 /* Retrieve the session information */
1051 rc = tf_session_get_session(tfp, &tfs);
1054 "%s: Failed to lookup session, rc:%s\n",
1055 tf_dir_2_str(parms->dir),
1060 /* Retrieve the device information */
1061 rc = tf_session_get_device(tfs, &dev);
1064 "%s: Failed to lookup device, rc:%s\n",
1065 tf_dir_2_str(parms->dir),
1070 if (dev->ops->tf_dev_set_if_tbl == NULL) {
1073 "%s: Operation not supported, rc:%s\n",
1074 tf_dir_2_str(parms->dir),
1079 sparms.dir = parms->dir;
1080 sparms.type = parms->type;
1081 sparms.idx = parms->idx;
1082 sparms.data_sz_in_bytes = parms->data_sz_in_bytes;
1083 sparms.data = parms->data;
1085 rc = dev->ops->tf_dev_set_if_tbl(tfp, &sparms);
1088 "%s: If_tbl set failed, rc:%s\n",
1089 tf_dir_2_str(parms->dir),
1098 tf_get_if_tbl_entry(struct tf *tfp,
1099 struct tf_get_if_tbl_entry_parms *parms)
1102 struct tf_session *tfs;
1103 struct tf_dev_info *dev;
1104 struct tf_if_tbl_get_parms gparms = { 0 };
1106 TF_CHECK_PARMS2(tfp, parms);
1108 /* Retrieve the session information */
1109 rc = tf_session_get_session(tfp, &tfs);
1112 "%s: Failed to lookup session, rc:%s\n",
1113 tf_dir_2_str(parms->dir),
1118 /* Retrieve the device information */
1119 rc = tf_session_get_device(tfs, &dev);
1122 "%s: Failed to lookup device, rc:%s\n",
1123 tf_dir_2_str(parms->dir),
1128 if (dev->ops->tf_dev_get_if_tbl == NULL) {
1131 "%s: Operation not supported, rc:%s\n",
1132 tf_dir_2_str(parms->dir),
1137 gparms.dir = parms->dir;
1138 gparms.type = parms->type;
1139 gparms.idx = parms->idx;
1140 gparms.data_sz_in_bytes = parms->data_sz_in_bytes;
1141 gparms.data = parms->data;
1143 rc = dev->ops->tf_dev_get_if_tbl(tfp, &gparms);
1146 "%s: If_tbl get failed, rc:%s\n",
1147 tf_dir_2_str(parms->dir),