MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ice_dcf_execute_virtchnl_cmd

Function ice_dcf_execute_virtchnl_cmd

dpdk/drivers/net/ice/ice_dcf.c:553–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551}
552
553int
554ice_dcf_execute_virtchnl_cmd(struct ice_dcf_hw *hw,
555 struct dcf_virtchnl_cmd *cmd)
556{
557 int i = 0;
558 int err;
559
560 if ((cmd->req_msg && !cmd->req_msglen) ||
561 (!cmd->req_msg && cmd->req_msglen) ||
562 (cmd->rsp_msgbuf && !cmd->rsp_buflen) ||
563 (!cmd->rsp_msgbuf && cmd->rsp_buflen))
564 return -EINVAL;
565
566 rte_spinlock_lock(&hw->vc_cmd_send_lock);
567 ice_dcf_vc_cmd_set(hw, cmd);
568
569 err = ice_dcf_vc_cmd_send(hw, cmd);
570 if (err) {
571 PMD_DRV_LOG(ERR, "fail to send cmd %d", cmd->v_op);
572 goto ret;
573 }
574
575 do {
576 if (!cmd->pending)
577 break;
578
579 rte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);
580 } while (i++ < ICE_DCF_ARQ_MAX_RETRIES);
581
582 if (cmd->v_ret != IAVF_SUCCESS) {
583 err = -1;
584 PMD_DRV_LOG(ERR,
585 "No response (%d times) or return failure (%d) for cmd %d",
586 i, cmd->v_ret, cmd->v_op);
587 }
588
589ret:
590 ice_dcf_aq_cmd_clear(hw, cmd);
591 rte_spinlock_unlock(&hw->vc_cmd_send_lock);
592 return err;
593}
594
595int
596ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,

Callers 15

ice_dcf_load_pkgFunction · 0.85
ice_dcf_set_vf_bwFunction · 0.85
ice_dcf_send_aq_cmdFunction · 0.85
ice_dcf_add_del_rss_cfgFunction · 0.85
ice_dcf_set_henaFunction · 0.85
ice_dcf_configure_queuesFunction · 0.85
ice_dcf_config_irq_mapFunction · 0.85
ice_dcf_switch_queueFunction · 0.85

Calls 6

ice_dcf_vc_cmd_setFunction · 0.85
ice_dcf_vc_cmd_sendFunction · 0.85
rte_delay_msFunction · 0.85
ice_dcf_aq_cmd_clearFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected