| 535 | } |
| 536 | |
| 537 | static __rte_always_inline void * |
| 538 | get_data_ptr(struct vhost_crypto_data_req *vc_req, |
| 539 | struct vhost_crypto_desc *cur_desc, |
| 540 | uint8_t perm) |
| 541 | __rte_shared_locks_required(&vc_req->vq->iotlb_lock) |
| 542 | { |
| 543 | void *data; |
| 544 | uint64_t dlen = cur_desc->len; |
| 545 | |
| 546 | data = IOVA_TO_VVA(void *, vc_req, cur_desc->addr, &dlen, perm); |
| 547 | if (unlikely(!data || dlen != cur_desc->len)) { |
| 548 | VC_LOG_ERR("Failed to map object"); |
| 549 | return NULL; |
| 550 | } |
| 551 | |
| 552 | return data; |
| 553 | } |
| 554 | |
| 555 | static __rte_always_inline uint32_t |
| 556 | copy_data_from_desc(void *dst, struct vhost_crypto_data_req *vc_req, |
no outgoing calls
no test coverage detected