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

Function idpf_init_mbx

dpdk/drivers/common/idpf/idpf_common_device.c:126–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124};
125
126static int
127idpf_init_mbx(struct idpf_hw *hw)
128{
129 struct idpf_ctlq_info *ctlq;
130 int ret = 0;
131
132 if (hw->device_id == IDPF_DEV_ID_SRIOV)
133 ret = idpf_ctlq_init(hw, IDPF_CTLQ_NUM, vf_ctlq_info);
134 else
135 ret = idpf_ctlq_init(hw, IDPF_CTLQ_NUM, pf_ctlq_info);
136 if (ret != 0)
137 return ret;
138
139 LIST_FOR_EACH_ENTRY(ctlq, &hw->cq_list_head, struct idpf_ctlq_info, cq_list) {
140 if (ctlq->q_id == IDPF_CTLQ_ID &&
141 ctlq->cq_type == IDPF_CTLQ_TYPE_MAILBOX_TX)
142 hw->asq = ctlq;
143 if (ctlq->q_id == IDPF_CTLQ_ID &&
144 ctlq->cq_type == IDPF_CTLQ_TYPE_MAILBOX_RX)
145 hw->arq = ctlq;
146 }
147
148 if (hw->asq == NULL || hw->arq == NULL) {
149 idpf_ctlq_deinit(hw);
150 ret = -ENOENT;
151 }
152
153 return ret;
154}
155
156static int
157idpf_get_pkt_type(struct idpf_adapter *adapter)

Callers 1

idpf_adapter_initFunction · 0.85

Calls 2

idpf_ctlq_initFunction · 0.85
idpf_ctlq_deinitFunction · 0.85

Tested by

no test coverage detected