// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) /* QLogic qed NIC Driver *Copyright(c)2015-2017QLogicCorporation *Copyright(c)2019-2020MarvellInternationalLtd.
*/
p_archipelago = qed_ooo_seek_archipelago(p_hwfn, p_ooo_info, cid); if (unlikely(!p_archipelago)) {
DP_NOTICE(p_hwfn, "Connection %d is not found in OOO list\n", cid); return NULL;
}
switch (p_hwfn->hw_info.personality) { case QED_PCI_ISCSI: case QED_PCI_NVMETCP:
proto = PROTOCOLID_TCP_ULP; break; case QED_PCI_ETH_RDMA: case QED_PCI_ETH_IWARP:
proto = PROTOCOLID_IWARP; break; default:
DP_NOTICE(p_hwfn, "Failed to allocate qed_ooo_info: unknown personality\n"); return -EINVAL;
}
p_ooo_info->p_isles_mem = kcalloc(max_num_isles, sizeof(struct qed_ooo_isle),
GFP_KERNEL); if (!p_ooo_info->p_isles_mem) goto no_isles_mem;
for (i = 0; i < max_num_isles; i++) {
INIT_LIST_HEAD(&p_ooo_info->p_isles_mem[i].buffers_list);
list_add_tail(&p_ooo_info->p_isles_mem[i].list_entry,
&p_ooo_info->free_isles_list);
}
p_ooo_info->p_archipelagos_mem =
kcalloc(max_num_archipelagos, sizeof(struct qed_ooo_archipelago),
GFP_KERNEL); if (!p_ooo_info->p_archipelagos_mem) goto no_archipelagos_mem;
for (i = 0; i < max_num_archipelagos; i++)
INIT_LIST_HEAD(&p_ooo_info->p_archipelagos_mem[i].isles_list);
p_ooo_info->ooo_history.p_cqes =
kcalloc(QED_MAX_NUM_OOO_HISTORY_ENTRIES, sizeof(struct ooo_opaque),
GFP_KERNEL); if (!p_ooo_info->ooo_history.p_cqes) goto no_history_mem;
if (ooo_isle > 1) {
p_prev_isle = qed_ooo_seek_isle(p_hwfn,
p_ooo_info, cid, ooo_isle - 1); if (unlikely(!p_prev_isle)) {
DP_NOTICE(p_hwfn, "Isle %d is not found(cid %d)\n",
ooo_isle - 1, cid); return;
}
}
p_archipelago = qed_ooo_seek_archipelago(p_hwfn, p_ooo_info, cid); if (unlikely(!p_archipelago && ooo_isle != 1)) {
DP_NOTICE(p_hwfn, "Connection %d is not found in OOO list\n", cid); return;
}
if (!list_empty(&p_ooo_info->free_isles_list)) {
p_isle = list_first_entry(&p_ooo_info->free_isles_list, struct qed_ooo_isle, list_entry);
list_del(&p_isle->list_entry); if (unlikely(!list_empty(&p_isle->buffers_list))) {
DP_NOTICE(p_hwfn, "Free isle is not empty\n");
INIT_LIST_HEAD(&p_isle->buffers_list);
}
} else {
DP_NOTICE(p_hwfn, "No more free isles\n"); return;
}
p_right_isle = qed_ooo_seek_isle(p_hwfn, p_ooo_info, cid,
left_isle + 1); if (unlikely(!p_right_isle)) {
DP_NOTICE(p_hwfn, "Right isle %d is not found(cid %d)\n",
left_isle + 1, cid); return;
}
list_del(&p_right_isle->list_entry);
p_ooo_info->cur_isles_number--; if (left_isle) {
p_left_isle = qed_ooo_seek_isle(p_hwfn, p_ooo_info, cid,
left_isle); if (unlikely(!p_left_isle)) {
DP_NOTICE(p_hwfn, "Left isle %d is not found(cid %d)\n",
left_isle, cid); return;
}
list_splice_tail_init(&p_right_isle->buffers_list,
&p_left_isle->buffers_list);
} else {
list_splice_tail_init(&p_right_isle->buffers_list,
&p_ooo_info->ready_buffers_list);
}
list_add_tail(&p_right_isle->list_entry, &p_ooo_info->free_isles_list);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4 Sekunden
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.