Lines Matching full: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
130 req = otx2_mbox_alloc_msg_mcs_intr_notify(rvu, pf); in mcs_notify_pfvf()
131 if (!req) { in mcs_notify_pfvf()
136 req->mcs_id = event->mcs_id; in mcs_notify_pfvf()
137 req->intr_mask = event->intr_mask; in mcs_notify_pfvf()
138 req->sa_id = event->sa_id; in mcs_notify_pfvf()
139 req->hdr.pcifunc = event->pcifunc; in mcs_notify_pfvf()
140 req->lmac_id = event->lmac_id; in mcs_notify_pfvf()
178 struct mcs_intr_cfg *req, in rvu_mbox_handler_mcs_intr_cfg() argument
181 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_intr_cfg()
185 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_intr_cfg()
188 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_intr_cfg()
197 pfvf->intr_mask = req->intr_mask; in rvu_mbox_handler_mcs_intr_cfg()
203 struct msg_req *req, in rvu_mbox_handler_mcs_get_hw_info() argument
221 int rvu_mbox_handler_mcs_port_reset(struct rvu *rvu, struct mcs_port_reset_req *req, in rvu_mbox_handler_mcs_port_reset() argument
226 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_port_reset()
229 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_port_reset()
231 mcs_reset_port(mcs, req->port_id, req->reset); in rvu_mbox_handler_mcs_port_reset()
237 struct mcs_clear_stats *req, in rvu_mbox_handler_mcs_clear_stats() argument
240 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_clear_stats()
243 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_clear_stats()
246 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_clear_stats()
249 if (req->all) in rvu_mbox_handler_mcs_clear_stats()
250 mcs_clear_all_stats(mcs, pcifunc, req->dir); in rvu_mbox_handler_mcs_clear_stats()
252 mcs_clear_stats(mcs, req->type, req->id, req->dir); in rvu_mbox_handler_mcs_clear_stats()
259 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_flowid_stats() argument
264 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_flowid_stats()
267 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_flowid_stats()
277 mcs_get_flowid_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_flowid_stats()
290 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_secy_stats() argument
294 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_secy_stats()
297 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_secy_stats()
304 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_get_secy_stats()
305 mcs_get_rx_secy_stats(mcs, rsp, req->id); in rvu_mbox_handler_mcs_get_secy_stats()
307 mcs_get_tx_secy_stats(mcs, rsp, req->id); in rvu_mbox_handler_mcs_get_secy_stats()
318 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_sc_stats() argument
323 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_sc_stats()
326 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_sc_stats()
332 mcs_get_sc_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_sc_stats()
342 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_sa_stats() argument
347 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_sa_stats()
350 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_sa_stats()
356 mcs_get_sa_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_sa_stats()
366 struct mcs_stats_req *req, in rvu_mbox_handler_mcs_get_port_stats() argument
371 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_get_port_stats()
374 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_get_port_stats()
380 mcs_get_port_stats(mcs, rsp, req->id, req->dir); in rvu_mbox_handler_mcs_get_port_stats()
390 struct mcs_set_active_lmac *req, in rvu_mbox_handler_mcs_set_active_lmac() argument
395 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_set_active_lmac()
398 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_set_active_lmac()
402 mcs->hw->lmac_bmap = req->lmac_bmap; in rvu_mbox_handler_mcs_set_active_lmac()
403 mcs_set_lmac_channels(req->mcs_id, req->chan_base); in rvu_mbox_handler_mcs_set_active_lmac()
407 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
412 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_port_cfg_set()
415 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_port_cfg_set()
417 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()
420 mcs_set_port_cfg(mcs, req); in rvu_mbox_handler_mcs_port_cfg_set()
425 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
430 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_port_cfg_get()
433 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_port_cfg_get()
435 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()
438 mcs_get_port_cfg(mcs, req, rsp); in rvu_mbox_handler_mcs_port_cfg_get()
443 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
448 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_custom_tag_cfg_get()
451 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_custom_tag_cfg_get()
453 mcs_get_custom_tag_cfg(mcs, req, rsp); in rvu_mbox_handler_mcs_custom_tag_cfg_get()
480 struct mcs_flowid_ena_dis_entry *req, in rvu_mbox_handler_mcs_flowid_ena_entry() argument
485 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_flowid_ena_entry()
488 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_flowid_ena_entry()
489 mcs_ena_dis_flowid_entry(mcs, req->flow_id, req->dir, req->ena); in rvu_mbox_handler_mcs_flowid_ena_entry()
494 struct mcs_pn_table_write_req *req, in rvu_mbox_handler_mcs_pn_table_write() argument
499 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_pn_table_write()
502 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_pn_table_write()
503 mcs_pn_table_write(mcs, req->pn_id, req->next_pn, req->dir); in rvu_mbox_handler_mcs_pn_table_write()
508 struct mcs_set_pn_threshold *req, in rvu_mbox_handler_mcs_set_pn_threshold() argument
513 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_set_pn_threshold()
516 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_set_pn_threshold()
518 mcs_pn_threshold_set(mcs, req); in rvu_mbox_handler_mcs_set_pn_threshold()
524 struct mcs_rx_sc_sa_map *req, in rvu_mbox_handler_mcs_rx_sc_sa_map_write() argument
529 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_rx_sc_sa_map_write()
532 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_rx_sc_sa_map_write()
533 mcs->mcs_ops->mcs_rx_sa_mem_map_write(mcs, req); in rvu_mbox_handler_mcs_rx_sc_sa_map_write()
538 struct mcs_tx_sc_sa_map *req, in rvu_mbox_handler_mcs_tx_sc_sa_map_write() argument
543 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
546 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
547 mcs->mcs_ops->mcs_tx_sa_mem_map_write(mcs, req); in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
548 mcs->tx_sa_active[req->sc_id] = req->tx_sa_active; in rvu_mbox_handler_mcs_tx_sc_sa_map_write()
554 struct mcs_sa_plcy_write_req *req, in rvu_mbox_handler_mcs_sa_plcy_write() argument
560 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_sa_plcy_write()
563 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_sa_plcy_write()
565 for (i = 0; i < req->sa_cnt; i++) in rvu_mbox_handler_mcs_sa_plcy_write()
566 mcs_sa_plcy_write(mcs, &req->plcy[i][0], in rvu_mbox_handler_mcs_sa_plcy_write()
567 req->sa_index[i], req->dir); in rvu_mbox_handler_mcs_sa_plcy_write()
572 struct mcs_rx_sc_cam_write_req *req, in rvu_mbox_handler_mcs_rx_sc_cam_write() argument
577 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_rx_sc_cam_write()
580 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_rx_sc_cam_write()
581 mcs_rx_sc_cam_write(mcs, req->sci, req->secy_id, req->sc_id); in rvu_mbox_handler_mcs_rx_sc_cam_write()
586 struct mcs_secy_plcy_write_req *req, in rvu_mbox_handler_mcs_secy_plcy_write() argument
590 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_secy_plcy_write()
593 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_secy_plcy_write()
595 mcs_secy_plcy_write(mcs, req->plcy, in rvu_mbox_handler_mcs_secy_plcy_write()
596 req->secy_id, req->dir); in rvu_mbox_handler_mcs_secy_plcy_write()
601 struct mcs_flowid_entry_write_req *req, in rvu_mbox_handler_mcs_flowid_entry_write() argument
607 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_flowid_entry_write()
610 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_flowid_entry_write()
613 mcs_flowid_entry_write(mcs, req->data, req->mask, in rvu_mbox_handler_mcs_flowid_entry_write()
614 req->flow_id, req->dir); in rvu_mbox_handler_mcs_flowid_entry_write()
615 map.secy = req->secy_id; in rvu_mbox_handler_mcs_flowid_entry_write()
616 map.sc = req->sc_id; in rvu_mbox_handler_mcs_flowid_entry_write()
617 map.ctrl_pkt = req->ctrl_pkt; in rvu_mbox_handler_mcs_flowid_entry_write()
618 map.flow_id = req->flow_id; in rvu_mbox_handler_mcs_flowid_entry_write()
619 map.sci = req->sci; in rvu_mbox_handler_mcs_flowid_entry_write()
620 mcs->mcs_ops->mcs_flowid_secy_map(mcs, &map, req->dir); in rvu_mbox_handler_mcs_flowid_entry_write()
621 if (req->ena) in rvu_mbox_handler_mcs_flowid_entry_write()
622 mcs_ena_dis_flowid_entry(mcs, req->flow_id, in rvu_mbox_handler_mcs_flowid_entry_write()
623 req->dir, true); in rvu_mbox_handler_mcs_flowid_entry_write()
628 struct mcs_free_rsrc_req *req, in rvu_mbox_handler_mcs_free_resources() argument
631 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_free_resources()
636 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_free_resources()
639 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_free_resources()
641 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_free_resources()
648 if (req->all) { in rvu_mbox_handler_mcs_free_resources()
649 rc = mcs_free_all_rsrc(mcs, req->dir, pcifunc); in rvu_mbox_handler_mcs_free_resources()
653 switch (req->rsrc_type) { in rvu_mbox_handler_mcs_free_resources()
655 rc = mcs_free_rsrc(&map->flow_ids, map->flowid2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
656 mcs_ena_dis_flowid_entry(mcs, req->rsrc_id, req->dir, false); in rvu_mbox_handler_mcs_free_resources()
659 rc = mcs_free_rsrc(&map->secy, map->secy2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
660 mcs_clear_secy_plcy(mcs, req->rsrc_id, req->dir); in rvu_mbox_handler_mcs_free_resources()
663 rc = mcs_free_rsrc(&map->sc, map->sc2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
665 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_free_resources()
666 mcs_ena_dis_sc_cam_entry(mcs, req->rsrc_id, false); in rvu_mbox_handler_mcs_free_resources()
669 rc = mcs_free_rsrc(&map->sa, map->sa2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources()
678 struct mcs_alloc_rsrc_req *req, in rvu_mbox_handler_mcs_alloc_resources() argument
681 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_alloc_resources()
686 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_alloc_resources()
689 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_alloc_resources()
691 if (req->dir == MCS_RX) in rvu_mbox_handler_mcs_alloc_resources()
698 if (req->all) { in rvu_mbox_handler_mcs_alloc_resources()
704 pcifunc, req->dir); in rvu_mbox_handler_mcs_alloc_resources()
708 switch (req->rsrc_type) { in rvu_mbox_handler_mcs_alloc_resources()
710 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
719 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
728 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
737 for (i = 0; i < req->rsrc_cnt; i++) { in rvu_mbox_handler_mcs_alloc_resources()
747 rsp->rsrc_type = req->rsrc_type; in rvu_mbox_handler_mcs_alloc_resources()
748 rsp->dir = req->dir; in rvu_mbox_handler_mcs_alloc_resources()
749 rsp->mcs_id = req->mcs_id; in rvu_mbox_handler_mcs_alloc_resources()
750 rsp->all = req->all; in rvu_mbox_handler_mcs_alloc_resources()
760 struct mcs_alloc_ctrl_pkt_rule_req *req, in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule() argument
763 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
769 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
772 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
774 map = (req->dir == MCS_RX) ? &mcs->rx : &mcs->tx; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
778 switch (req->rule_type) { in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
802 rsp->rule_type = req->rule_type; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
803 rsp->dir = req->dir; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
804 rsp->mcs_id = req->mcs_id; in rvu_mbox_handler_mcs_alloc_ctrl_pkt_rule()
817 struct mcs_free_ctrl_pkt_rule_req *req, in rvu_mbox_handler_mcs_free_ctrl_pkt_rule() argument
823 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_free_ctrl_pkt_rule()
826 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_free_ctrl_pkt_rule()
830 rc = mcs_free_ctrlpktrule(mcs, req); in rvu_mbox_handler_mcs_free_ctrl_pkt_rule()
838 struct mcs_ctrl_pkt_rule_write_req *req, in rvu_mbox_handler_mcs_ctrl_pkt_rule_write() argument
844 if (req->mcs_id >= rvu->mcs_blk_cnt) in rvu_mbox_handler_mcs_ctrl_pkt_rule_write()
847 mcs = mcs_get_pdata(req->mcs_id); in rvu_mbox_handler_mcs_ctrl_pkt_rule_write()
849 rc = mcs_ctrlpktrule_write(mcs, req); in rvu_mbox_handler_mcs_ctrl_pkt_rule_write()