raw/ioat: support limiting queues for idxd PCI device
[dpdk.git] / drivers / common / cpt / cpt_pmd_ops_helper.c
index 09b762f..2cddddf 100644 (file)
@@ -35,8 +35,9 @@ cpt_pmd_ops_helper_get_mlen_sg_mode(void)
 
        len += sizeof(struct cpt_request_info);
        len += CPT_OFFSET_CONTROL_BYTES + CPT_MAX_IV_LEN;
-       len += ROUNDUP8(SG_LIST_HDR_SIZE +
-                       (ROUNDUP4(CPT_MAX_SG_IN_OUT_CNT) >> 2) * SG_ENTRY_SIZE);
+       len += RTE_ALIGN_CEIL((SG_LIST_HDR_SIZE +
+                       (RTE_ALIGN_CEIL(CPT_MAX_SG_IN_OUT_CNT, 4) >> 2) *
+                       SG_ENTRY_SIZE), 8);
        len += 2 * COMPLETION_CODE_SIZE;
        len += 2 * sizeof(cpt_res_s_t);
        return len;