| 775 | } |
| 776 | |
| 777 | static __rte_always_inline uint8_t |
| 778 | vhost_crypto_check_cipher_request(struct virtio_crypto_cipher_data_req *req) |
| 779 | { |
| 780 | if (likely((req->para.iv_len <= VHOST_CRYPTO_MAX_IV_LEN) && |
| 781 | (req->para.src_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) && |
| 782 | (req->para.dst_data_len >= req->para.src_data_len) && |
| 783 | (req->para.dst_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE))) |
| 784 | return VIRTIO_CRYPTO_OK; |
| 785 | return VIRTIO_CRYPTO_BADMSG; |
| 786 | } |
| 787 | |
| 788 | static __rte_always_inline uint8_t |
| 789 | prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, |
no outgoing calls
no test coverage detected