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

Function l2fwd_crypto_options_print

dpdk/examples/l2fwd-crypto/main.c:1571–1648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1569}
1570
1571static void
1572l2fwd_crypto_options_print(struct l2fwd_crypto_options *options)
1573{
1574 char string_cipher_op[MAX_STR_LEN];
1575 char string_auth_op[MAX_STR_LEN];
1576 char string_aead_op[MAX_STR_LEN];
1577
1578 if (options->cipher_xform.cipher.op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
1579 strcpy(string_cipher_op, "Encrypt");
1580 else
1581 strcpy(string_cipher_op, "Decrypt");
1582
1583 if (options->auth_xform.auth.op == RTE_CRYPTO_AUTH_OP_GENERATE)
1584 strcpy(string_auth_op, "Auth generate");
1585 else
1586 strcpy(string_auth_op, "Auth verify");
1587
1588 if (options->aead_xform.aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
1589 strcpy(string_aead_op, "Authenticated encryption");
1590 else
1591 strcpy(string_aead_op, "Authenticated decryption");
1592
1593
1594 printf("Options:-\nn");
1595 printf("portmask: %x\n", options->portmask);
1596 printf("ports per lcore: %u\n", options->nb_ports_per_lcore);
1597 printf("refresh period : %u\n", options->refresh_period);
1598 printf("single lcore mode: %s\n",
1599 options->single_lcore ? "enabled" : "disabled");
1600 printf("stats_printing: %s\n",
1601 options->refresh_period == 0 ? "disabled" : "enabled");
1602
1603 printf("sessionless crypto: %s\n",
1604 options->sessionless ? "enabled" : "disabled");
1605
1606 if (options->ckey_param && (options->ckey_random_size != -1))
1607 printf("Cipher key already parsed, ignoring size of random key\n");
1608
1609 if (options->akey_param && (options->akey_random_size != -1))
1610 printf("Auth key already parsed, ignoring size of random key\n");
1611
1612 if (options->cipher_iv_param && (options->cipher_iv_random_size != -1))
1613 printf("Cipher IV already parsed, ignoring size of random IV\n");
1614
1615 if (options->auth_iv_param && (options->auth_iv_random_size != -1))
1616 printf("Auth IV already parsed, ignoring size of random IV\n");
1617
1618 if (options->aad_param && (options->aad_random_size != -1))
1619 printf("AAD already parsed, ignoring size of random AAD\n");
1620
1621 printf("\nCrypto chain: ");
1622 switch (options->xform_chain) {
1623 case L2FWD_CRYPTO_AEAD:
1624 printf("Input --> %s --> Output\n", string_aead_op);
1625 display_aead_info(options);
1626 break;
1627 case L2FWD_CRYPTO_CIPHER_HASH:
1628 printf("Input --> %s --> %s --> Output\n",

Callers 1

l2fwd_main_loopFunction · 0.85

Calls 4

display_aead_infoFunction · 0.85
display_cipher_infoFunction · 0.85
display_auth_infoFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected