Skip to content

Commit

Permalink
prov/efa: Update data types for various IOV operations
Browse files Browse the repository at this point in the history
In accordance with various changes in #10096

Signed-off-by: Darryl Abbate <drl@amazon.com>
  • Loading branch information
darrylabbate authored and shijin-aws committed Aug 1, 2024
1 parent 591094d commit 1a16ab1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions prov/efa/src/efa_hmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ int efa_domain_hmem_support_init_all(struct efa_domain *efa_domain)
* @param[in] iov_count Number of IOV structures in IOV array
* @return number of bytes copied on success, or a negative error code
*/
ssize_t efa_copy_from_hmem_iov(void **desc, char *buff, int buff_size,
const struct iovec *hmem_iov, int iov_count)
ssize_t efa_copy_from_hmem_iov(void **desc, char *buff, size_t buff_size,
const struct iovec *hmem_iov, size_t iov_count)
{
int i, ret = -1;
size_t data_size = 0;
int ret = -1;
size_t i, data_size = 0;

for (i = 0; i < iov_count; i++) {
if (data_size + hmem_iov[i].iov_len > buff_size) {
Expand Down Expand Up @@ -283,9 +283,10 @@ ssize_t efa_copy_from_hmem_iov(void **desc, char *buff, int buff_size,
* @return number of bytes copied on success, or a negative error code
*/
ssize_t efa_copy_to_hmem_iov(void **desc, struct iovec *hmem_iov,
int iov_count, char *buff, int buff_size)
size_t iov_count, char *buff, size_t buff_size)
{
int i, ret, bytes_remaining = buff_size, size;
int ret;
size_t i, bytes_remaining = buff_size, size;

for (i = 0; i < iov_count && bytes_remaining; i++) {
size = hmem_iov[i].iov_len;
Expand Down
4 changes: 2 additions & 2 deletions prov/efa/src/efa_hmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ static inline int efa_copy_to_hmem(void *desc, void *dest, const void *buff, siz
return ofi_copy_to_hmem(iface, device, dest, buff, size);
};

ssize_t efa_copy_from_hmem_iov(void **desc, char *buff, int buff_size, const struct iovec *hmem_iov, int iov_count);
ssize_t efa_copy_to_hmem_iov(void **desc, struct iovec *hmem_iov, int iov_count, char *buff, int buff_size);
ssize_t efa_copy_from_hmem_iov(void **desc, char *buff, size_t buff_size, const struct iovec *hmem_iov, size_t iov_count);
ssize_t efa_copy_to_hmem_iov(void **desc, struct iovec *hmem_iov, size_t iov_count, char *buff, size_t buff_size);
#endif
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ ssize_t efa_rdm_pke_copy_payload_to_ope(struct efa_rdm_pke *pke,
struct efa_mr *desc;
struct efa_rdm_ep *ep;
size_t segment_offset;
ssize_t bytes_copied;
size_t bytes_copied;

ep = pke->ep;
assert(ep);
Expand Down

0 comments on commit 1a16ab1

Please sign in to comment.