1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* Copyright (C) Mellanox Technologies Ltd. 2019. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
/* A direction for copying a data to/from an array of iovec elements */
typedef enum ucs_iov_copy_direction ucs_iov_copy_direction_t;
/* An iterator that should be used by IOV convertor in order to save
* information about the current offset in the destination IOV array */
typedef struct ucs_iov_iter ucs_iov_iter_t;
/**
* Copy a data from iovec [buffer] to buffer [iovec].
*
* @param [in] iov A pointer to an array of iovec elements.
* @param [in] iov_cnt A number of elements in a iov array.
* @param [in] iov_offset An offset in a iov array.
* @param [in] buf A buffer that should be used for copying a data.
* @param [in] max_copye A maximum amount of data that should be copied.
* @param [in] dir Direction that specifies destination and source.
*
* @return The amount, in bytes, of the data that was copied.
*/
size_t ;
/**
* Update an array of iovec elements to consider an already consumed data.
*
* @param [in] iov A pointer to an array of iovec elements.
* @param [in] iov_cnt A number of elements in a iov array.
* @param [in/out] cur_iov_idx A pointer to an index in a iov array from
* which the operation should be started.
* @param [in] consumed An amount of data consumed that should be
* considered in a current iov array.
*/
void ;
/**
* Returns the maximum possible value for the number of IOVs.
* It maybe either value from the system configuration or IOV_MAX
* value or UIO_MAXIOV value or 1024 if nothing is defined.
*
* @return The maximum number of IOVs.
*/
size_t ;