Lines Matching refs:req
21 struct _req_type *req; \
23 req = (struct _req_type *)otx2_mbox_alloc_msg_rsp( \
26 if (!req) \
28 req->hdr.sig = OTX2_MBOX_REQ_SIG; \
29 req->hdr.id = _id; \
30 return req; \
73 struct mcs_set_lmac_mode *req, in rvu_mbox_handler_mcs_set_lmac_mode() argument
78 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_set_lmac_mode()
81 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_set_lmac_mode()
83 if (BIT_ULL(req->lmac_id) & mcs->hw->lmac_bmap) in rvu_mbox_handler_mcs_set_lmac_mode()
84 mcs_set_lmac_mode(mcs, req->lmac_id, req->mode); in rvu_mbox_handler_mcs_set_lmac_mode()
123 struct mcs_intr_info *req; in mcs_notify_pfvf() local
128 req = otx2_mbox_alloc_msg_mcs_intr_notify(rvu, pf); in mcs_notify_pfvf()
129 if (!req) in mcs_notify_pfvf()
132 req->mcs_id = event->mcs_id; in mcs_notify_pfvf()
133 req->intr_mask = event->intr_mask; in mcs_notify_pfvf()
134 req->sa_id = event->sa_id; in mcs_notify_pfvf()
135 req->hdr.pcifunc = event->pcifunc; in mcs_notify_pfvf()
136 req->lmac_id = event->lmac_id; in mcs_notify_pfvf()
173 struct mcs_intr_cfg *req, in rvu_mbox_handler_mcs_intr_cfg() argument
176 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_intr_cfg()
180 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_intr_cfg()
183 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_intr_cfg()
192 pfvf->intr_mask = req->intr_mask; in rvu_mbox_handler_mcs_intr_cfg()
198 struct msg_req *req, in rvu_mbox_handler_mcs_get_hw_info() argument
216 int rvu_mbox_handler_mcs_port_reset(struct rvu *rvu, struct mcs_port_reset_req *req, in rvu_mbox_handler_mcs_port_reset() argument
221 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_port_reset()
224 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_port_reset()
226 mcs_reset_port(mcs, req->port_id, req->reset); in rvu_mbox_handler_mcs_port_reset()
232 struct mcs_clear_stats *req, in rvu_mbox_handler_mcs_clear_stats() argument
235 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_clear_stats()
238 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_clear_stats()
241 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_clear_stats()
244 if (req->all) in rvu_mbox_handler_mcs_clear_stats()
245 mcs_clear_all_stats(mcs, pcifunc, req->dir); in rvu_mbox_handler_mcs_clear_stats()
247 mcs_clear_stats(mcs, req->type, req->id, req->dir); in rvu_mbox_handler_mcs_clear_stats()
254 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_flowid_stats() argument
259 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_flowid_stats()
262 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_flowid_stats()
272 mcs_get_flowid_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_flowid_stats()
285 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_secy_stats() argument
289 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_secy_stats()
292 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_secy_stats()
299 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_get_secy_stats()
300 mcs_get_rx_secy_stats(mcs, rsp, req->id); in rvu_mbox_handler_mcs_get_secy_stats()
302 mcs_get_tx_secy_stats(mcs, rsp, req->id); in rvu_mbox_handler_mcs_get_secy_stats()
313 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_sc_stats() argument
318 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_sc_stats()
321 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_sc_stats()
327 mcs_get_sc_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_sc_stats()
337 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_sa_stats() argument
342 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_sa_stats()
345 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_sa_stats()
351 mcs_get_sa_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_sa_stats()
361 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_port_stats() argument
366 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_port_stats()
369 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_port_stats()
375 mcs_get_port_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_port_stats()
385 struct mcs_set_active_lmac *req, in rvu_mbox_handler_mcs_set_active_lmac() argument
390 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_set_active_lmac()
393 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_set_active_lmac()
397 mcs->hw->lmac_bmap = req->lmac_bmap; in rvu_mbox_handler_mcs_set_active_lmac()
398 mcs_set_lmac_channels(req->mcs_id, req->chan_base); in rvu_mbox_handler_mcs_set_active_lmac()
402 int rvu_mbox_handler_mcs_port_cfg_set(struct rvu *rvu, struct mcs_port_cfg_set_req *req, in rvu_mbox_handler_mcs_port_cfg_set() argument
407 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_port_cfg_set()
410 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_port_cfg_set()
412 if (mcs->hw->lmac_cnt <= req->port_id || !(mcs->hw->lmac_bmap & BIT_ULL(req->port_id))) in rvu_mbox_handler_mcs_port_cfg_set()
415 mcs_set_port_cfg(mcs, req); in rvu_mbox_handler_mcs_port_cfg_set()
420 int rvu_mbox_handler_mcs_port_cfg_get(struct rvu *rvu, struct mcs_port_cfg_get_req *req, in rvu_mbox_handler_mcs_port_cfg_get() argument
425 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_port_cfg_get()
428 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_port_cfg_get()
430 if (mcs->hw->lmac_cnt <= req->port_id || !(mcs->hw->lmac_bmap & BIT_ULL(req->port_id))) in rvu_mbox_handler_mcs_port_cfg_get()
433 mcs_get_port_cfg(mcs, req, rsp); in rvu_mbox_handler_mcs_port_cfg_get()
438 int rvu_mbox_handler_mcs_custom_tag_cfg_get(struct rvu *rvu, struct mcs_custom_tag_cfg_get_req *req, in rvu_mbox_handler_mcs_custom_tag_cfg_get() argument
443 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_custom_tag_cfg_get()
446 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_custom_tag_cfg_get()
448 mcs_get_custom_tag_cfg(mcs, req, rsp); in rvu_mbox_handler_mcs_custom_tag_cfg_get()
475 struct mcs_flowid_ena_dis_entry *req, in rvu_mbox_handler_mcs_flowid_ena_entry() argument
480 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_flowid_ena_entry()
483 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_flowid_ena_entry()
484 mcs_ena_dis_flowid_entry(mcs, req->flow_id, req->dir, req->ena); in rvu_mbox_handler_mcs_flowid_ena_entry()
489 struct mcs_pn_table_write_req *req, in rvu_mbox_handler_mcs_pn_table_write() argument
494 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_pn_table_write()
497 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_pn_table_write()
498 mcs_pn_table_write(mcs, req->pn_id, req->next_pn, req->dir); in rvu_mbox_handler_mcs_pn_table_write()
503 struct mcs_set_pn_threshold *req, in rvu_mbox_handler_mcs_set_pn_threshold() argument
508 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_set_pn_threshold()
511 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_set_pn_threshold()
513 mcs_pn_threshold_set(mcs, req); in rvu_mbox_handler_mcs_set_pn_threshold()
519 struct mcs_rx_sc_sa_map *req, in rvu_mbox_handler_mcs_rx_sc_sa_map_write() argument
524 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_rx_sc_sa_map_write()
527 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_rx_sc_sa_map_write()
528 mcs->mcs_ops->mcs_rx_sa_mem_map_write(mcs, req); in rvu_mbox_handler_mcs_rx_sc_sa_map_write()
533 struct mcs_tx_sc_sa_map *req, in rvu_mbox_handler_mcs_tx_sc_sa_map_write() argument
538 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
541 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
542 mcs->mcs_ops->mcs_tx_sa_mem_map_write(mcs, req); in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
543 mcs->tx_sa_active[req->sc_id] = req->tx_sa_active; in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
549 struct mcs_sa_plcy_write_req *req, in rvu_mbox_handler_mcs_sa_plcy_write() argument
555 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_sa_plcy_write()
558 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_sa_plcy_write()
560 for (i = 0; i < req->sa_cnt; i++) in rvu_mbox_handler_mcs_sa_plcy_write()
561 mcs_sa_plcy_write(mcs, &req->plcy[i][0], in rvu_mbox_handler_mcs_sa_plcy_write()
562 req->sa_index[i], req->dir); in rvu_mbox_handler_mcs_sa_plcy_write()
567 struct mcs_rx_sc_cam_write_req *req, in rvu_mbox_handler_mcs_rx_sc_cam_write() argument
572 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_rx_sc_cam_write()
575 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_rx_sc_cam_write()
576 mcs_rx_sc_cam_write(mcs, req->sci, req->secy_id, req->sc_id); in rvu_mbox_handler_mcs_rx_sc_cam_write()
581 struct mcs_secy_plcy_write_req *req, in rvu_mbox_handler_mcs_secy_plcy_write() argument
585 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_secy_plcy_write()
588 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_secy_plcy_write()
590 mcs_secy_plcy_write(mcs, req->plcy, in rvu_mbox_handler_mcs_secy_plcy_write()
591 req->secy_id, req->dir); in rvu_mbox_handler_mcs_secy_plcy_write()
596 struct mcs_flowid_entry_write_req *req, in rvu_mbox_handler_mcs_flowid_entry_write() argument
602 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_flowid_entry_write()
605 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_flowid_entry_write()
608 mcs_flowid_entry_write(mcs, req->data, req->mask, in rvu_mbox_handler_mcs_flowid_entry_write()
609 req->flow_id, req->dir); in rvu_mbox_handler_mcs_flowid_entry_write()
610 map.secy = req->secy_id; in rvu_mbox_handler_mcs_flowid_entry_write()
611 map.sc = req->sc_id; in rvu_mbox_handler_mcs_flowid_entry_write()
612 map.ctrl_pkt = req->ctrl_pkt; in rvu_mbox_handler_mcs_flowid_entry_write()
613 map.flow_id = req->flow_id; in rvu_mbox_handler_mcs_flowid_entry_write()
614 map.sci = req->sci; in rvu_mbox_handler_mcs_flowid_entry_write()
615 mcs->mcs_ops->mcs_flowid_secy_map(mcs, &map, req->dir); in rvu_mbox_handler_mcs_flowid_entry_write()
616 if (req->ena) in rvu_mbox_handler_mcs_flowid_entry_write()
617 mcs_ena_dis_flowid_entry(mcs, req->flow_id, in rvu_mbox_handler_mcs_flowid_entry_write()
618 req->dir, true); in rvu_mbox_handler_mcs_flowid_entry_write()
623 struct mcs_free_rsrc_req *req, in rvu_mbox_handler_mcs_free_resources() argument
626 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_free_resources()
631 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_free_resources()
634 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_free_resources()
636 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_free_resources()
643 if (req->all) { in rvu_mbox_handler_mcs_free_resources()
644 rc = mcs_free_all_rsrc(mcs, req->dir, pcifunc); in rvu_mbox_handler_mcs_free_resources()
648 switch (req->rsrc_type) { in rvu_mbox_handler_mcs_free_resources()
650 rc = mcs_free_rsrc(&map->flow_ids, map->flowid2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
651 mcs_ena_dis_flowid_entry(mcs, req->rsrc_id, req->dir, false); in rvu_mbox_handler_mcs_free_resources()
654 rc = mcs_free_rsrc(&map->secy, map->secy2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
655 mcs_clear_secy_plcy(mcs, req->rsrc_id, req->dir); in rvu_mbox_handler_mcs_free_resources()
658 rc = mcs_free_rsrc(&map->sc, map->sc2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
660 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_free_resources()
661 mcs_ena_dis_sc_cam_entry(mcs, req->rsrc_id, false); in rvu_mbox_handler_mcs_free_resources()
664 rc = mcs_free_rsrc(&map->sa, map->sa2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
673 struct mcs_alloc_rsrc_req *req, in rvu_mbox_handler_mcs_alloc_resources() argument
676 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_alloc_resources()
681 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_alloc_resources()
684 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_alloc_resources()
686 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_alloc_resources()
693 if (req->all) { in rvu_mbox_handler_mcs_alloc_resources()
699 pcifunc, req->dir); in rvu_mbox_handler_mcs_alloc_resources()
703 switch (req->rsrc_type) { in rvu_mbox_handler_mcs_alloc_resources()
705 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
714 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
723 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
732 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
742 rsp->rsrc_type = req->rsrc_type; in rvu_mbox_handler_mcs_alloc_resources()
743 rsp->dir = req->dir; in rvu_mbox_handler_mcs_alloc_resources()
744 rsp->mcs_id = req->mcs_id; in rvu_mbox_handler_mcs_alloc_resources()
745 rsp->all = req->all; in rvu_mbox_handler_mcs_alloc_resources()
755 struct mcs_alloc_ctrl_pkt_rule_req *req, in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule() argument
758 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
764 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
767 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
769 map = (req->dir == MCS_RX) ? &mcs->rx : &mcs->tx; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
773 switch (req->rule_type) { in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
797 rsp->rule_type = req->rule_type; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
798 rsp->dir = req->dir; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
799 rsp->mcs_id = req->mcs_id; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
812 struct mcs_free_ctrl_pkt_rule_req *req, in rvu_mbox_handler_mcs_free_ctrl_pkt_rule() argument
818 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_free_ctrl_pkt_rule()
821 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_free_ctrl_pkt_rule()
825 rc = mcs_free_ctrlpktrule(mcs, req); in rvu_mbox_handler_mcs_free_ctrl_pkt_rule()
833 struct mcs_ctrl_pkt_rule_write_req *req, in rvu_mbox_handler_mcs_ctrl_pkt_rule_write() argument
839 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_ctrl_pkt_rule_write()
842 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_ctrl_pkt_rule_write()
844 rc = mcs_ctrlpktrule_write(mcs, req); in rvu_mbox_handler_mcs_ctrl_pkt_rule_write()