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

Function ccp_perform_passthru

dpdk/drivers/crypto/ccp/ccp_crypto.c:1506–1553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1504}
1505
1506static void
1507ccp_perform_passthru(struct ccp_passthru *pst,
1508 struct ccp_queue *cmd_q)
1509{
1510 struct ccp_desc *desc;
1511 union ccp_function function;
1512
1513 desc = &cmd_q->qbase_desc[cmd_q->qidx];
1514
1515 CCP_CMD_ENGINE(desc) = CCP_ENGINE_PASSTHRU;
1516
1517 CCP_CMD_SOC(desc) = 0;
1518 CCP_CMD_IOC(desc) = 0;
1519 CCP_CMD_INIT(desc) = 0;
1520 CCP_CMD_EOM(desc) = 0;
1521 CCP_CMD_PROT(desc) = 0;
1522
1523 function.raw = 0;
1524 CCP_PT_BYTESWAP(&function) = pst->byte_swap;
1525 CCP_PT_BITWISE(&function) = pst->bit_mod;
1526 CCP_CMD_FUNCTION(desc) = function.raw;
1527
1528 CCP_CMD_LEN(desc) = pst->len;
1529
1530 if (pst->dir) {
1531 CCP_CMD_SRC_LO(desc) = (uint32_t)(pst->src_addr);
1532 CCP_CMD_SRC_HI(desc) = high32_value(pst->src_addr);
1533 CCP_CMD_SRC_MEM(desc) = CCP_MEMTYPE_SYSTEM;
1534
1535 CCP_CMD_DST_LO(desc) = (uint32_t)(pst->dest_addr);
1536 CCP_CMD_DST_HI(desc) = 0;
1537 CCP_CMD_DST_MEM(desc) = CCP_MEMTYPE_SB;
1538
1539 if (pst->bit_mod != CCP_PASSTHRU_BITWISE_NOOP)
1540 CCP_CMD_LSB_ID(desc) = cmd_q->sb_key;
1541 } else {
1542
1543 CCP_CMD_SRC_LO(desc) = (uint32_t)(pst->src_addr);
1544 CCP_CMD_SRC_HI(desc) = 0;
1545 CCP_CMD_SRC_MEM(desc) = CCP_MEMTYPE_SB;
1546
1547 CCP_CMD_DST_LO(desc) = (uint32_t)(pst->dest_addr);
1548 CCP_CMD_DST_HI(desc) = high32_value(pst->dest_addr);
1549 CCP_CMD_DST_MEM(desc) = CCP_MEMTYPE_SYSTEM;
1550 }
1551
1552 cmd_q->qidx = (cmd_q->qidx + 1) % COMMANDS_PER_QUEUE;
1553}
1554
1555static int
1556ccp_perform_hmac(struct rte_crypto_op *op,

Callers 7

ccp_perform_hmacFunction · 0.85
ccp_perform_shaFunction · 0.85
ccp_perform_sha3_hmacFunction · 0.85
ccp_perform_aes_cmacFunction · 0.85
ccp_perform_aesFunction · 0.85
ccp_perform_3desFunction · 0.85
ccp_perform_aes_gcmFunction · 0.85

Calls 1

high32_valueFunction · 0.70

Tested by

no test coverage detected