Lines Matching refs:fp

292 static u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp);
960 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_panic_dump() local
976 if (!bp->fp) in bnx2x_panic_dump()
979 if (!fp->rx_cons_sb) in bnx2x_panic_dump()
984 i, fp->rx_bd_prod, fp->rx_bd_cons, in bnx2x_panic_dump()
985 fp->rx_comp_prod, in bnx2x_panic_dump()
986 fp->rx_comp_cons, le16_to_cpu(*fp->rx_cons_sb)); in bnx2x_panic_dump()
988 fp->rx_sge_prod, fp->last_max_sge, in bnx2x_panic_dump()
989 le16_to_cpu(fp->fp_hc_idx)); in bnx2x_panic_dump()
992 for_each_cos_in_tx_queue(fp, cos) in bnx2x_panic_dump()
994 if (!fp->txdata_ptr[cos]) in bnx2x_panic_dump()
997 txdata = *fp->txdata_ptr[cos]; in bnx2x_panic_dump()
1014 if (IS_FCOE_FP(fp)) in bnx2x_panic_dump()
1020 fp->sb_running_index[j], in bnx2x_panic_dump()
1026 fp->sb_index_values[j], in bnx2x_panic_dump()
1044 CSTORM_STATUS_BLOCK_DATA_OFFSET(fp->fw_sb_id) + in bnx2x_panic_dump()
1101 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_panic_dump() local
1103 if (!bp->fp) in bnx2x_panic_dump()
1106 if (!fp->rx_cons_sb) in bnx2x_panic_dump()
1109 start = RX_BD(le16_to_cpu(*fp->rx_cons_sb) - 10); in bnx2x_panic_dump()
1110 end = RX_BD(le16_to_cpu(*fp->rx_cons_sb) + 503); in bnx2x_panic_dump()
1112 u32 *rx_bd = (u32 *)&fp->rx_desc_ring[j]; in bnx2x_panic_dump()
1113 struct sw_rx_bd *sw_bd = &fp->rx_buf_ring[j]; in bnx2x_panic_dump()
1119 start = RX_SGE(fp->rx_sge_prod); in bnx2x_panic_dump()
1120 end = RX_SGE(fp->last_max_sge); in bnx2x_panic_dump()
1122 u32 *rx_sge = (u32 *)&fp->rx_sge_ring[j]; in bnx2x_panic_dump()
1123 struct sw_rx_page *sw_page = &fp->rx_page_ring[j]; in bnx2x_panic_dump()
1129 start = RCQ_BD(fp->rx_comp_cons - 10); in bnx2x_panic_dump()
1130 end = RCQ_BD(fp->rx_comp_cons + 503); in bnx2x_panic_dump()
1132 u32 *cqe = (u32 *)&fp->rx_comp_ring[j]; in bnx2x_panic_dump()
1141 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_panic_dump() local
1143 if (!bp->fp) in bnx2x_panic_dump()
1146 for_each_cos_in_tx_queue(fp, cos) { in bnx2x_panic_dump()
1147 struct bnx2x_fp_txdata *txdata = fp->txdata_ptr[cos]; in bnx2x_panic_dump()
1149 if (!fp->txdata_ptr[cos]) in bnx2x_panic_dump()
1803 void bnx2x_sp_event(struct bnx2x_fastpath *fp, union eth_rx_cqe *rr_cqe) in bnx2x_sp_event() argument
1805 struct bnx2x *bp = fp->bp; in bnx2x_sp_event()
1809 struct bnx2x_queue_sp_obj *q_obj = &bnx2x_sp_obj(bp, fp).q_obj; in bnx2x_sp_event()
1813 fp->index, cid, command, bp->state, in bnx2x_sp_event()
1861 command, fp->index); in bnx2x_sp_event()
1887 if ((drv_cmd == BNX2X_Q_CMD_UPDATE) && (IS_FCOE_FP(fp)) && in bnx2x_sp_event()
1932 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_interrupt() local
1934 mask = 0x2 << (fp->index + CNIC_SUPPORT(bp)); in bnx2x_interrupt()
1937 for_each_cos_in_tx_queue(fp, cos) in bnx2x_interrupt()
1938 prefetch(fp->txdata_ptr[cos]->tx_cons_sb); in bnx2x_interrupt()
1939 prefetch(&fp->sb_running_index[SM_RX_ID]); in bnx2x_interrupt()
1940 napi_schedule_irqoff(&bnx2x_fp(bp, fp->index, napi)); in bnx2x_interrupt()
3090 struct bnx2x_fastpath *fp, in bnx2x_get_common_flags() argument
3121 struct bnx2x_fastpath *fp, in bnx2x_get_q_flags() argument
3130 if (IS_FCOE_FP(fp)) { in bnx2x_get_q_flags()
3136 if (fp->mode != TPA_MODE_DISABLED) { in bnx2x_get_q_flags()
3139 if (fp->mode == TPA_MODE_GRO) in bnx2x_get_q_flags()
3155 return flags | bnx2x_get_common_flags(bp, fp, true); in bnx2x_get_q_flags()
3159 struct bnx2x_fastpath *fp, struct bnx2x_general_setup_params *gen_init, in bnx2x_pf_q_prep_general() argument
3162 gen_init->stat_id = bnx2x_stats_id(fp); in bnx2x_pf_q_prep_general()
3163 gen_init->spcl_id = fp->cl_id; in bnx2x_pf_q_prep_general()
3166 if (IS_FCOE_FP(fp)) in bnx2x_pf_q_prep_general()
3177 struct bnx2x_fastpath *fp, struct rxq_pause_params *pause, in bnx2x_pf_rx_q_prep() argument
3184 if (fp->mode != TPA_MODE_DISABLED) { in bnx2x_pf_rx_q_prep()
3223 rxq_init->dscr_map = fp->rx_desc_mapping; in bnx2x_pf_rx_q_prep()
3224 rxq_init->sge_map = fp->rx_sge_mapping; in bnx2x_pf_rx_q_prep()
3225 rxq_init->rcq_map = fp->rx_comp_mapping; in bnx2x_pf_rx_q_prep()
3226 rxq_init->rcq_np_map = fp->rx_comp_mapping + BCM_PAGE_SIZE; in bnx2x_pf_rx_q_prep()
3231 rxq_init->buf_sz = fp->rx_buf_size - BNX2X_FW_RX_ALIGN_START - in bnx2x_pf_rx_q_prep()
3234 rxq_init->cl_qzone_id = fp->cl_qzone_id; in bnx2x_pf_rx_q_prep()
3249 rxq_init->fw_sb_id = fp->fw_sb_id; in bnx2x_pf_rx_q_prep()
3251 if (IS_FCOE_FP(fp)) in bnx2x_pf_rx_q_prep()
3265 struct bnx2x_fastpath *fp, struct bnx2x_txq_setup_params *txq_init, in bnx2x_pf_tx_q_prep() argument
3268 txq_init->dscr_map = fp->txdata_ptr[cos]->tx_desc_mapping; in bnx2x_pf_tx_q_prep()
3271 txq_init->fw_sb_id = fp->fw_sb_id; in bnx2x_pf_tx_q_prep()
3279 if (IS_FCOE_FP(fp)) { in bnx2x_pf_tx_q_prep()
5365 struct bnx2x_fastpath *fp; in bnx2x_after_function_update() local
5392 fp = &bp->fp[q]; in bnx2x_after_function_update()
5393 queue_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; in bnx2x_after_function_update()
5403 fp = &bp->fp[FCOE_IDX(bp)]; in bnx2x_after_function_update()
5404 queue_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; in bnx2x_after_function_update()
5685 struct bnx2x_fastpath *fp = bnx2x_fcoe_fp(bp); in bnx2x_sp_task() local
5688 (bnx2x_has_rx_work(fp) || bnx2x_has_tx_work(fp))) { in bnx2x_sp_task()
6101 bnx2x_update_coalesce_sb(bp, bp->fp[i].fw_sb_id, in bnx2x_update_coalesce()
6276 return bnx2x_set_q_rx_mode(bp, bp->fp->cl_id, rx_mode_flags, in bnx2x_set_storm_rx_mode()
6320 static inline u8 bnx2x_fp_igu_sb_id(struct bnx2x_fastpath *fp) in bnx2x_fp_igu_sb_id() argument
6322 return fp->bp->igu_base_sb + fp->index + CNIC_SUPPORT(fp->bp); in bnx2x_fp_igu_sb_id()
6325 static inline u8 bnx2x_fp_fw_sb_id(struct bnx2x_fastpath *fp) in bnx2x_fp_fw_sb_id() argument
6327 return fp->bp->base_fw_ndsb + fp->index + CNIC_SUPPORT(fp->bp); in bnx2x_fp_fw_sb_id()
6330 static u8 bnx2x_fp_cl_id(struct bnx2x_fastpath *fp) in bnx2x_fp_cl_id() argument
6332 if (CHIP_IS_E1x(fp->bp)) in bnx2x_fp_cl_id()
6333 return BP_L_ID(fp->bp) + fp->index; in bnx2x_fp_cl_id()
6335 return bnx2x_fp_igu_sb_id(fp); in bnx2x_fp_cl_id()
6340 struct bnx2x_fastpath *fp = &bp->fp[fp_idx]; in bnx2x_init_eth_fp() local
6344 fp->rx_queue = fp_idx; in bnx2x_init_eth_fp()
6345 fp->cid = fp_idx; in bnx2x_init_eth_fp()
6346 fp->cl_id = bnx2x_fp_cl_id(fp); in bnx2x_init_eth_fp()
6347 fp->fw_sb_id = bnx2x_fp_fw_sb_id(fp); in bnx2x_init_eth_fp()
6348 fp->igu_sb_id = bnx2x_fp_igu_sb_id(fp); in bnx2x_init_eth_fp()
6350 fp->cl_qzone_id = bnx2x_fp_qzone_id(fp); in bnx2x_init_eth_fp()
6353 fp->ustorm_rx_prods_offset = bnx2x_rx_ustorm_prods_offset(fp); in bnx2x_init_eth_fp()
6356 fp->rx_cons_sb = BNX2X_RX_SB_INDEX; in bnx2x_init_eth_fp()
6362 BUG_ON(fp->max_cos > BNX2X_MULTI_TX_COS); in bnx2x_init_eth_fp()
6365 for_each_cos_in_tx_queue(fp, cos) { in bnx2x_init_eth_fp()
6366 bnx2x_init_txdata(bp, fp->txdata_ptr[cos], in bnx2x_init_eth_fp()
6367 CID_COS_TO_TX_ONLY_CID(fp->cid, cos, bp), in bnx2x_init_eth_fp()
6368 FP_COS_TO_TXQ(fp, cos, bp), in bnx2x_init_eth_fp()
6369 BNX2X_TX_SB_INDEX_BASE + cos, fp); in bnx2x_init_eth_fp()
6370 cids[cos] = fp->txdata_ptr[cos]->cid; in bnx2x_init_eth_fp()
6377 bnx2x_init_sb(bp, fp->status_blk_mapping, BNX2X_VF_ID_INVALID, false, in bnx2x_init_eth_fp()
6378 fp->fw_sb_id, fp->igu_sb_id); in bnx2x_init_eth_fp()
6379 bnx2x_update_fpsb_idx(fp); in bnx2x_init_eth_fp()
6380 bnx2x_init_queue_obj(bp, &bnx2x_sp_obj(bp, fp).q_obj, fp->cl_id, cids, in bnx2x_init_eth_fp()
6381 fp->max_cos, BP_FUNC(bp), bnx2x_sp(bp, q_rdata), in bnx2x_init_eth_fp()
6387 bnx2x_init_vlan_mac_fp_objs(fp, BNX2X_OBJ_TYPE_RX_TX); in bnx2x_init_eth_fp()
6391 fp_idx, bp, fp->status_blk.e2_sb, fp->cl_id, fp->fw_sb_id, in bnx2x_init_eth_fp()
6392 fp->igu_sb_id); in bnx2x_init_eth_fp()
6429 bnx2x_init_tx_ring_one(bp->fp[i].txdata_ptr[0]); in bnx2x_init_tx_rings_cnic()
6438 for_each_cos_in_tx_queue(&bp->fp[i], cos) in bnx2x_init_tx_rings()
6439 bnx2x_init_tx_ring_one(bp->fp[i].txdata_ptr[cos]); in bnx2x_init_tx_rings()
6444 struct bnx2x_fastpath *fp = bnx2x_fcoe_fp(bp); in bnx2x_init_fcoe_fp() local
6455 fp->cid, FCOE_TXQ_IDX(bp), BNX2X_FCOE_L2_TX_INDEX, in bnx2x_init_fcoe_fp()
6456 fp); in bnx2x_init_fcoe_fp()
6458 DP(NETIF_MSG_IFUP, "created fcoe tx data (fp index %d)\n", fp->index); in bnx2x_init_fcoe_fp()
6461 bnx2x_fcoe(bp, cl_qzone_id) = bnx2x_fp_qzone_id(fp); in bnx2x_init_fcoe_fp()
6464 bnx2x_rx_ustorm_prods_offset(fp); in bnx2x_init_fcoe_fp()
6471 BUG_ON(fp->max_cos != 1); in bnx2x_init_fcoe_fp()
6473 bnx2x_init_queue_obj(bp, &bnx2x_sp_obj(bp, fp).q_obj, fp->cl_id, in bnx2x_init_fcoe_fp()
6474 &fp->cid, 1, BP_FUNC(bp), bnx2x_sp(bp, q_rdata), in bnx2x_init_fcoe_fp()
6479 fp->index, bp, fp->status_blk.e2_sb, fp->cl_id, fp->fw_sb_id, in bnx2x_init_fcoe_fp()
6480 fp->igu_sb_id); in bnx2x_init_fcoe_fp()
8516 bp->fp->index, set); in bnx2x_set_eth_mac()
8523 return bnx2x_setup_queue(bp, &bp->fp[0], true); in bnx2x_setup_leading()
8525 return bnx2x_vfpf_setup_q(bp, &bp->fp[0], true); in bnx2x_setup_leading()
8689 struct bnx2x_fastpath *fp, struct bnx2x_queue_init_params *init_params) in bnx2x_pf_q_prep_init() argument
8695 if (!IS_FCOE_FP(fp)) { in bnx2x_pf_q_prep_init()
8713 fp->fw_sb_id; in bnx2x_pf_q_prep_init()
8724 init_params->max_cos = fp->max_cos; in bnx2x_pf_q_prep_init()
8727 fp->index, init_params->max_cos); in bnx2x_pf_q_prep_init()
8731 cxt_index = fp->txdata_ptr[cos]->cid / ILT_PAGE_CIDS; in bnx2x_pf_q_prep_init()
8732 cxt_offset = fp->txdata_ptr[cos]->cid - (cxt_index * in bnx2x_pf_q_prep_init()
8739 static int bnx2x_setup_tx_only(struct bnx2x *bp, struct bnx2x_fastpath *fp, in bnx2x_setup_tx_only() argument
8750 tx_only_params->flags = bnx2x_get_common_flags(bp, fp, false); in bnx2x_setup_tx_only()
8756 bnx2x_pf_q_prep_general(bp, fp, &tx_only_params->gen_params, tx_index); in bnx2x_setup_tx_only()
8759 bnx2x_pf_tx_q_prep(bp, fp, &tx_only_params->txq_params, tx_index); in bnx2x_setup_tx_only()
8782 int bnx2x_setup_queue(struct bnx2x *bp, struct bnx2x_fastpath *fp, in bnx2x_setup_queue() argument
8793 DP(NETIF_MSG_IFUP, "setting up queue %d\n", fp->index); in bnx2x_setup_queue()
8796 if (!IS_FCOE_FP(fp)) in bnx2x_setup_queue()
8797 bnx2x_ack_sb(bp, fp->igu_sb_id, USTORM_ID, 0, in bnx2x_setup_queue()
8800 q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; in bnx2x_setup_queue()
8805 bnx2x_pf_q_prep_init(bp, fp, &q_params.params.init); in bnx2x_setup_queue()
8813 BNX2X_ERR("Queue(%d) INIT failed\n", fp->index); in bnx2x_setup_queue()
8823 setup_params->flags = bnx2x_get_q_flags(bp, fp, leading); in bnx2x_setup_queue()
8826 bnx2x_pf_q_prep_general(bp, fp, &setup_params->gen_params, in bnx2x_setup_queue()
8829 bnx2x_pf_rx_q_prep(bp, fp, &setup_params->pause_params, in bnx2x_setup_queue()
8832 bnx2x_pf_tx_q_prep(bp, fp, &setup_params->txq_params, in bnx2x_setup_queue()
8838 if (IS_FCOE_FP(fp)) in bnx2x_setup_queue()
8844 BNX2X_ERR("Queue(%d) SETUP failed\n", fp->index); in bnx2x_setup_queue()
8850 tx_index < fp->max_cos; in bnx2x_setup_queue()
8854 rc = bnx2x_setup_tx_only(bp, fp, &q_params, in bnx2x_setup_queue()
8858 fp->index, tx_index); in bnx2x_setup_queue()
8868 struct bnx2x_fastpath *fp = &bp->fp[index]; in bnx2x_stop_queue() local
8873 DP(NETIF_MSG_IFDOWN, "stopping queue %d cid %d\n", index, fp->cid); in bnx2x_stop_queue()
8875 q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; in bnx2x_stop_queue()
8881 tx_index < fp->max_cos; in bnx2x_stop_queue()
8885 txdata = fp->txdata_ptr[tx_index]; in bnx2x_stop_queue()
8946 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_reset_func() local
8948 CSTORM_STATUS_BLOCK_DATA_STATE_OFFSET(fp->fw_sb_id), in bnx2x_reset_func()
9295 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_chip_cleanup() local
9297 for_each_cos_in_tx_queue(fp, cos) in bnx2x_chip_cleanup()
9298 rc = bnx2x_clean_tx_queue(bp, fp->txdata_ptr[cos]); in bnx2x_chip_cleanup()
12773 struct bnx2x_fastpath *fp = &bp->fp[i]; in poll_bnx2x() local
12774 napi_schedule(&bnx2x_fp(bp, fp->index, napi)); in poll_bnx2x()
12827 rc = bnx2x_vfpf_update_vlan(bp, vid, bp->fp->index, add); in __bnx2x_vlan_configure_vid()
14228 bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); in bnx2x_io_slot_reset()
15031 static u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp) in bnx2x_rx_ustorm_prods_offset() argument
15033 struct bnx2x *bp = fp->bp; in bnx2x_rx_ustorm_prods_offset()
15037 return bnx2x_vf_ustorm_prods_offset(bp, fp); in bnx2x_rx_ustorm_prods_offset()
15039 offset += USTORM_RX_PRODS_E2_OFFSET(fp->cl_qzone_id); in bnx2x_rx_ustorm_prods_offset()
15041 offset += USTORM_RX_PRODS_E1X_OFFSET(BP_PORT(bp), fp->cl_id); in bnx2x_rx_ustorm_prods_offset()
15189 struct bnx2x_fastpath *fp = &bp->fp[i]; in bnx2x_enable_ptp_packets() local
15192 q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; in bnx2x_enable_ptp_packets()