1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2021 Broadcom
6 #include <rte_common.h>
7 #include <rte_cycles.h>
8 #include <rte_malloc.h>
10 #include <rte_alarm.h>
13 #include "bnxt_tf_common.h"
14 #include "ulp_fc_mgr.h"
15 #include "ulp_flow_db.h"
16 #include "ulp_template_db_enum.h"
17 #include "ulp_template_struct.h"
21 ulp_fc_mgr_shadow_mem_alloc(struct hw_fc_mem_info *parms, int size)
27 parms->mem_va = rte_zmalloc("ulp_fc_info",
28 RTE_CACHE_LINE_ROUNDUP(size),
31 BNXT_TF_DBG(ERR, "Allocate failed mem_va\n");
35 rte_mem_lock_page(parms->mem_va);
37 parms->mem_pa = (void *)(uintptr_t)rte_mem_virt2phy(parms->mem_va);
38 if (parms->mem_pa == (void *)RTE_BAD_IOVA) {
39 BNXT_TF_DBG(ERR, "Allocate failed mem_pa\n");
47 ulp_fc_mgr_shadow_mem_free(struct hw_fc_mem_info *parms)
49 rte_free(parms->mem_va);
53 * Allocate and Initialize all Flow Counter Manager resources for this ulp
56 * ctxt [in] The ulp context for the Flow Counter manager.
60 ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
62 struct bnxt_ulp_device_params *dparms;
63 uint32_t dev_id, sw_acc_cntr_tbl_sz, hw_fc_mem_info_sz;
64 struct bnxt_ulp_fc_info *ulp_fc_info;
68 BNXT_TF_DBG(DEBUG, "Invalid ULP CTXT\n");
72 if (bnxt_ulp_cntxt_dev_id_get(ctxt, &dev_id)) {
73 BNXT_TF_DBG(DEBUG, "Failed to get device id\n");
77 dparms = bnxt_ulp_device_params_get(dev_id);
79 BNXT_TF_DBG(DEBUG, "Failed to device parms\n");
83 ulp_fc_info = rte_zmalloc("ulp_fc_info", sizeof(*ulp_fc_info), 0);
87 rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
89 PMD_DRV_LOG(ERR, "Failed to initialize fc mutex\n");
93 /* Add the FC info tbl to the ulp context. */
94 bnxt_ulp_cntxt_ptr2_fc_info_set(ctxt, ulp_fc_info);
96 ulp_fc_info->num_counters = dparms->flow_count_db_entries;
97 if (!ulp_fc_info->num_counters) {
98 /* No need for software counters, call fw directly */
99 BNXT_TF_DBG(DEBUG, "Sw flow counter support not enabled\n");
103 sw_acc_cntr_tbl_sz = sizeof(struct sw_acc_counter) *
104 dparms->flow_count_db_entries;
106 for (i = 0; i < TF_DIR_MAX; i++) {
107 ulp_fc_info->sw_acc_tbl[i] = rte_zmalloc("ulp_sw_acc_cntr_tbl",
108 sw_acc_cntr_tbl_sz, 0);
109 if (!ulp_fc_info->sw_acc_tbl[i])
113 hw_fc_mem_info_sz = sizeof(uint64_t) * dparms->flow_count_db_entries;
115 for (i = 0; i < TF_DIR_MAX; i++) {
116 rc = ulp_fc_mgr_shadow_mem_alloc(&ulp_fc_info->shadow_hw_tbl[i],
125 ulp_fc_mgr_deinit(ctxt);
127 "Failed to allocate memory for fc mgr\n");
133 * Release all resources in the Flow Counter Manager for this ulp context
135 * ctxt [in] The ulp context for the Flow Counter manager
139 ulp_fc_mgr_deinit(struct bnxt_ulp_context *ctxt)
141 struct bnxt_ulp_fc_info *ulp_fc_info;
142 struct hw_fc_mem_info *shd_info;
145 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
150 ulp_fc_mgr_thread_cancel(ctxt);
152 pthread_mutex_destroy(&ulp_fc_info->fc_lock);
154 if (ulp_fc_info->num_counters) {
155 for (i = 0; i < TF_DIR_MAX; i++)
156 rte_free(ulp_fc_info->sw_acc_tbl[i]);
158 for (i = 0; i < TF_DIR_MAX; i++) {
159 shd_info = &ulp_fc_info->shadow_hw_tbl[i];
160 ulp_fc_mgr_shadow_mem_free(shd_info);
164 rte_free(ulp_fc_info);
166 /* Safe to ignore on deinit */
167 (void)bnxt_ulp_cntxt_ptr2_fc_info_set(ctxt, NULL);
173 * Check if the alarm thread that walks through the flows is started
175 * ctxt [in] The ulp context for the flow counter manager
178 bool ulp_fc_mgr_thread_isstarted(struct bnxt_ulp_context *ctxt)
180 struct bnxt_ulp_fc_info *ulp_fc_info;
182 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
185 return !!(ulp_fc_info->flags & ULP_FLAG_FC_THREAD);
191 * Setup the Flow counter timer thread that will fetch/accumulate raw counter
192 * data from the chip's internal flow counters
194 * ctxt [in] The ulp context for the flow counter manager
198 ulp_fc_mgr_thread_start(struct bnxt_ulp_context *ctxt)
200 struct bnxt_ulp_fc_info *ulp_fc_info;
202 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
204 if (ulp_fc_info && !(ulp_fc_info->flags & ULP_FLAG_FC_THREAD)) {
205 rte_eal_alarm_set(US_PER_S * ULP_FC_TIMER,
206 ulp_fc_mgr_alarm_cb, NULL);
207 ulp_fc_info->flags |= ULP_FLAG_FC_THREAD;
214 * Cancel the alarm handler
216 * ctxt [in] The ulp context for the flow counter manager
219 void ulp_fc_mgr_thread_cancel(struct bnxt_ulp_context *ctxt)
221 struct bnxt_ulp_fc_info *ulp_fc_info;
223 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
227 ulp_fc_info->flags &= ~ULP_FLAG_FC_THREAD;
228 rte_eal_alarm_cancel(ulp_fc_mgr_alarm_cb, NULL);
232 * DMA-in the raw counter data from the HW and accumulate in the
233 * local accumulator table using the TF-Core API
235 * tfp [in] The TF-Core context
237 * fc_info [in] The ULP Flow counter info ptr
239 * dir [in] The direction of the flow
241 * num_counters [in] The number of counters
244 __rte_unused static int32_t
245 ulp_bulk_get_flow_stats(struct tf *tfp,
246 struct bnxt_ulp_fc_info *fc_info,
248 struct bnxt_ulp_device_params *dparms)
249 /* MARK AS UNUSED FOR NOW TO AVOID COMPILATION ERRORS TILL API is RESOLVED */
252 struct tf_tbl_get_bulk_parms parms = { 0 };
253 enum tf_tbl_type stype = TF_TBL_TYPE_ACT_STATS_64; /* TBD: Template? */
254 struct sw_acc_counter *sw_acc_tbl_entry = NULL;
255 uint64_t *stats = NULL;
260 parms.starting_idx = fc_info->shadow_hw_tbl[dir].start_idx;
261 parms.num_entries = dparms->flow_count_db_entries / 2; /* direction */
264 * Size of an entry needs to obtained from template
266 parms.entry_sz_in_bytes = sizeof(uint64_t);
267 stats = (uint64_t *)fc_info->shadow_hw_tbl[dir].mem_va;
268 parms.physical_mem_addr = (uint64_t)
269 ((uintptr_t)(fc_info->shadow_hw_tbl[dir].mem_pa));
273 "BULK: Memory not initialized id:0x%x dir:%d\n",
274 parms.starting_idx, dir);
278 rc = tf_tbl_bulk_get(tfp, &parms);
281 "BULK: Get failed for id:0x%x rc:%d\n",
282 parms.starting_idx, rc);
286 for (i = 0; i < parms.num_entries; i++) {
287 /* TBD - Get PKT/BYTE COUNT SHIFT/MASK from Template */
288 sw_acc_tbl_entry = &fc_info->sw_acc_tbl[dir][i];
289 if (!sw_acc_tbl_entry->valid)
291 sw_acc_tbl_entry->pkt_count += FLOW_CNTR_PKTS(stats[i],
293 sw_acc_tbl_entry->byte_count += FLOW_CNTR_BYTES(stats[i],
301 ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
302 struct ulp_flow_db_res_params *res,
303 struct rte_flow_query_count *qcount)
306 struct bnxt_ulp_device_params *dparms;
307 struct tf_get_tbl_entry_parms parms = { 0 };
308 struct tf_set_tbl_entry_parms sparms = { 0 };
309 enum tf_tbl_type stype = TF_TBL_TYPE_ACT_STATS_64;
314 tfp = bnxt_ulp_cntxt_tfp_get(ctxt, BNXT_ULP_SHARED_SESSION_NO);
316 BNXT_TF_DBG(ERR, "Failed to get the truflow pointer\n");
320 if (bnxt_ulp_cntxt_dev_id_get(ctxt, &dev_id)) {
321 BNXT_TF_DBG(DEBUG, "Failed to get device id\n");
322 bnxt_ulp_cntxt_entry_release();
326 dparms = bnxt_ulp_device_params_get(dev_id);
328 BNXT_TF_DBG(DEBUG, "Failed to device parms\n");
329 bnxt_ulp_cntxt_entry_release();
332 parms.dir = res->direction;
334 parms.idx = res->resource_hndl;
335 parms.data_sz_in_bytes = sizeof(uint64_t);
336 parms.data = (uint8_t *)&stats;
337 rc = tf_get_tbl_entry(tfp, &parms);
340 "Get failed for id:0x%x rc:%d\n",
344 qcount->hits = FLOW_CNTR_PKTS(stats, dparms);
346 qcount->hits_set = 1;
347 qcount->bytes = FLOW_CNTR_BYTES(stats, dparms);
349 qcount->bytes_set = 1;
353 sparms.dir = res->direction;
355 sparms.idx = res->resource_hndl;
356 sparms.data = (uint8_t *)&stats;
357 sparms.data_sz_in_bytes = sizeof(uint64_t);
358 rc = tf_set_tbl_entry(tfp, &sparms);
360 PMD_DRV_LOG(ERR, "Set failed for id:0x%x rc:%d\n",
368 static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,
370 struct bnxt_ulp_fc_info *fc_info,
373 struct bnxt_ulp_device_params *dparms)
376 struct tf_get_tbl_entry_parms parms = { 0 };
377 enum tf_tbl_type stype = TF_TBL_TYPE_ACT_STATS_64; /* TBD:Template? */
378 struct sw_acc_counter *sw_acc_tbl_entry = NULL, *t_sw;
380 uint32_t sw_cntr_indx = 0;
384 parms.idx = hw_cntr_id;
387 * Size of an entry needs to obtained from template
389 parms.data_sz_in_bytes = sizeof(uint64_t);
390 parms.data = (uint8_t *)&stats;
391 rc = tf_get_tbl_entry(tfp, &parms);
394 "Get failed for id:0x%x rc:%d\n",
399 /* TBD - Get PKT/BYTE COUNT SHIFT/MASK from Template */
400 sw_cntr_indx = hw_cntr_id - fc_info->shadow_hw_tbl[dir].start_idx;
401 sw_acc_tbl_entry = &fc_info->sw_acc_tbl[dir][sw_cntr_indx];
402 /* Some dpdk applications may accumulate the flow counters while some
403 * may not. In cases where the application is accumulating the counters
404 * the PMD need not do the accumulation itself and viceversa to report
405 * the correct flow counters.
407 if (ctxt->cfg_data->accum_stats) {
408 sw_acc_tbl_entry->pkt_count += FLOW_CNTR_PKTS(stats, dparms);
409 sw_acc_tbl_entry->byte_count += FLOW_CNTR_BYTES(stats, dparms);
411 sw_acc_tbl_entry->pkt_count = FLOW_CNTR_PKTS(stats, dparms);
412 sw_acc_tbl_entry->byte_count = FLOW_CNTR_BYTES(stats, dparms);
415 /* Update the parent counters if it is child flow */
416 if (sw_acc_tbl_entry->parent_flow_id) {
417 /* Update the parent counters */
418 t_sw = sw_acc_tbl_entry;
419 if (ulp_flow_db_parent_flow_count_update(ctxt,
420 t_sw->parent_flow_id,
423 PMD_DRV_LOG(ERR, "Error updating parent counters\n");
431 * Alarm handler that will issue the TF-Core API to fetch
432 * data from the chip's internal flow counters
434 * ctxt [in] The ulp context for the flow counter manager
439 ulp_fc_mgr_alarm_cb(void *arg __rte_unused)
444 struct bnxt_ulp_context *ctxt;
445 struct bnxt_ulp_fc_info *ulp_fc_info;
446 struct bnxt_ulp_device_params *dparms;
448 uint32_t dev_id, hw_cntr_id = 0, num_entries = 0;
450 ctxt = bnxt_ulp_cntxt_entry_acquire();
452 BNXT_TF_DBG(INFO, "could not get the ulp context lock\n");
453 rte_eal_alarm_set(US_PER_S * ULP_FC_TIMER,
454 ulp_fc_mgr_alarm_cb, NULL);
458 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
460 bnxt_ulp_cntxt_entry_release();
464 if (bnxt_ulp_cntxt_dev_id_get(ctxt, &dev_id)) {
465 BNXT_TF_DBG(DEBUG, "Failed to get device id\n");
466 bnxt_ulp_cntxt_entry_release();
470 dparms = bnxt_ulp_device_params_get(dev_id);
472 BNXT_TF_DBG(DEBUG, "Failed to device parms\n");
473 bnxt_ulp_cntxt_entry_release();
477 tfp = bnxt_ulp_cntxt_tfp_get(ctxt, BNXT_ULP_SHARED_SESSION_NO);
479 BNXT_TF_DBG(ERR, "Failed to get the truflow pointer\n");
480 bnxt_ulp_cntxt_entry_release();
485 * Take the fc_lock to ensure no flow is destroyed
486 * during the bulk get
488 if (pthread_mutex_trylock(&ulp_fc_info->fc_lock))
491 if (!ulp_fc_info->num_entries) {
492 pthread_mutex_unlock(&ulp_fc_info->fc_lock);
493 ulp_fc_mgr_thread_cancel(ctxt);
494 bnxt_ulp_cntxt_entry_release();
498 * Commented for now till GET_BULK is resolved, just get the first flow
500 for (i = 0; i < TF_DIR_MAX; i++) {
501 rc = ulp_bulk_get_flow_stats(tfp, ulp_fc_info, i,
502 dparms->flow_count_db_entries);
508 /* reset the parent accumulation counters before accumulation if any */
509 ulp_flow_db_parent_flow_count_reset(ctxt);
511 num_entries = dparms->flow_count_db_entries / 2;
512 for (i = 0; i < TF_DIR_MAX; i++) {
513 for (j = 0; j < num_entries; j++) {
514 if (!ulp_fc_info->sw_acc_tbl[i][j].valid)
516 hw_cntr_id = ulp_fc_info->sw_acc_tbl[i][j].hw_cntr_id;
517 rc = ulp_get_single_flow_stat(ctxt, tfp, ulp_fc_info, i,
524 pthread_mutex_unlock(&ulp_fc_info->fc_lock);
527 * If cmd fails once, no need of
528 * invoking again every second
532 ulp_fc_mgr_thread_cancel(ctxt);
533 bnxt_ulp_cntxt_entry_release();
537 bnxt_ulp_cntxt_entry_release();
538 rte_eal_alarm_set(US_PER_S * ULP_FC_TIMER,
539 ulp_fc_mgr_alarm_cb, NULL);
543 * Set the starting index that indicates the first HW flow
546 * ctxt [in] The ulp context for the flow counter manager
548 * dir [in] The direction of the flow
550 * start_idx [in] The HW flow counter ID
553 bool ulp_fc_mgr_start_idx_isset(struct bnxt_ulp_context *ctxt, enum tf_dir dir)
555 struct bnxt_ulp_fc_info *ulp_fc_info;
557 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
560 return ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set;
566 * Set the starting index that indicates the first HW flow
569 * ctxt [in] The ulp context for the flow counter manager
571 * dir [in] The direction of the flow
573 * start_idx [in] The HW flow counter ID
576 int32_t ulp_fc_mgr_start_idx_set(struct bnxt_ulp_context *ctxt, enum tf_dir dir,
579 struct bnxt_ulp_fc_info *ulp_fc_info;
581 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
586 if (!ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set) {
587 ulp_fc_info->shadow_hw_tbl[dir].start_idx = start_idx;
588 ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set = true;
595 * Set the corresponding SW accumulator table entry based on
596 * the difference between this counter ID and the starting
597 * counter ID. Also, keep track of num of active counter enabled
600 * ctxt [in] The ulp context for the flow counter manager
602 * dir [in] The direction of the flow
604 * hw_cntr_id [in] The HW flow counter ID
607 int32_t ulp_fc_mgr_cntr_set(struct bnxt_ulp_context *ctxt, enum tf_dir dir,
610 struct bnxt_ulp_fc_info *ulp_fc_info;
611 uint32_t sw_cntr_idx;
613 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
617 if (!ulp_fc_info->num_counters)
620 pthread_mutex_lock(&ulp_fc_info->fc_lock);
621 sw_cntr_idx = hw_cntr_id - ulp_fc_info->shadow_hw_tbl[dir].start_idx;
622 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].valid = true;
623 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].hw_cntr_id = hw_cntr_id;
624 ulp_fc_info->num_entries++;
625 pthread_mutex_unlock(&ulp_fc_info->fc_lock);
631 * Reset the corresponding SW accumulator table entry based on
632 * the difference between this counter ID and the starting
635 * ctxt [in] The ulp context for the flow counter manager
637 * dir [in] The direction of the flow
639 * hw_cntr_id [in] The HW flow counter ID
642 int32_t ulp_fc_mgr_cntr_reset(struct bnxt_ulp_context *ctxt, enum tf_dir dir,
645 struct bnxt_ulp_fc_info *ulp_fc_info;
646 uint32_t sw_cntr_idx;
648 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
652 if (!ulp_fc_info->num_counters)
655 pthread_mutex_lock(&ulp_fc_info->fc_lock);
656 sw_cntr_idx = hw_cntr_id - ulp_fc_info->shadow_hw_tbl[dir].start_idx;
657 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].valid = false;
658 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].hw_cntr_id = 0;
659 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].pkt_count = 0;
660 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].byte_count = 0;
661 ulp_fc_info->num_entries--;
662 pthread_mutex_unlock(&ulp_fc_info->fc_lock);
668 * Fill the rte_flow_query_count 'data' argument passed
669 * in the rte_flow_query() with the values obtained and
670 * accumulated locally.
672 * ctxt [in] The ulp context for the flow counter manager
674 * flow_id [in] The HW flow ID
676 * count [out] The rte_flow_query_count 'data' that is set
679 int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
681 struct rte_flow_query_count *count)
684 uint32_t nxt_resource_index = 0;
685 struct bnxt_ulp_fc_info *ulp_fc_info;
686 struct ulp_flow_db_res_params params;
688 uint32_t hw_cntr_id = 0, sw_cntr_idx = 0;
689 struct sw_acc_counter *sw_acc_tbl_entry;
690 bool found_cntr_resource = false;
692 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
696 if (bnxt_ulp_cntxt_acquire_fdb_lock(ctxt))
700 rc = ulp_flow_db_resource_get(ctxt,
701 BNXT_ULP_FDB_TYPE_REGULAR,
705 if (params.resource_func ==
706 BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE &&
707 (params.resource_sub_type ==
708 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT ||
709 params.resource_sub_type ==
710 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_EXT_COUNT ||
711 params.resource_sub_type ==
712 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT_ACC)) {
713 found_cntr_resource = true;
716 } while (!rc && nxt_resource_index);
718 bnxt_ulp_cntxt_release_fdb_lock(ctxt);
720 if (rc || !found_cntr_resource)
723 dir = params.direction;
724 hw_cntr_id = params.resource_hndl;
725 if (params.resource_sub_type ==
726 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT) {
727 if (!ulp_fc_info->num_counters)
728 return ulp_fc_tf_flow_stat_get(ctxt, ¶ms, count);
731 * Think about optimizing with try_lock later
733 pthread_mutex_lock(&ulp_fc_info->fc_lock);
734 sw_cntr_idx = hw_cntr_id -
735 ulp_fc_info->shadow_hw_tbl[dir].start_idx;
736 sw_acc_tbl_entry = &ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx];
737 if (sw_acc_tbl_entry->pkt_count) {
739 count->bytes_set = 1;
740 count->hits = sw_acc_tbl_entry->pkt_count;
741 count->bytes = sw_acc_tbl_entry->byte_count;
744 sw_acc_tbl_entry->pkt_count = 0;
745 sw_acc_tbl_entry->byte_count = 0;
747 pthread_mutex_unlock(&ulp_fc_info->fc_lock);
748 } else if (params.resource_sub_type ==
749 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT_ACC) {
750 /* Get stats from the parent child table */
751 ulp_flow_db_parent_flow_count_get(ctxt, flow_id,
752 &count->hits, &count->bytes,
755 count->bytes_set = 1;
757 /* TBD: Handle External counters */
765 * Set the parent flow if it is SW accumulation counter entry.
767 * ctxt [in] The ulp context for the flow counter manager
769 * dir [in] The direction of the flow
771 * hw_cntr_id [in] The HW flow counter ID
773 * fid [in] parent flow id
776 int32_t ulp_fc_mgr_cntr_parent_flow_set(struct bnxt_ulp_context *ctxt,
781 struct bnxt_ulp_fc_info *ulp_fc_info;
782 uint32_t sw_cntr_idx;
785 ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
789 pthread_mutex_lock(&ulp_fc_info->fc_lock);
790 sw_cntr_idx = hw_cntr_id - ulp_fc_info->shadow_hw_tbl[dir].start_idx;
791 if (ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].valid) {
792 ulp_fc_info->sw_acc_tbl[dir][sw_cntr_idx].parent_flow_id = fid;
794 BNXT_TF_DBG(ERR, "Failed to set parent flow id %x:%x\n",
798 pthread_mutex_unlock(&ulp_fc_info->fc_lock);