Define a macro to be reused in the different parts of the code.
Useful for the next patches where we add more arrays to manage also
translations with user VA.
Suggested-by: Eugenio Perez Martin <eperezma@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <
20230404131326.44403-5-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 
        return ret;
 }
 
+#define IOTLB_IOV_STRIDE 16
+
 static inline int copy_from_iotlb(const struct vringh *vrh, void *dst,
                                  void *src, size_t len)
 {
        u64 total_translated = 0;
 
        while (total_translated < len) {
-               struct bio_vec iov[16];
+               struct bio_vec iov[IOTLB_IOV_STRIDE];
                struct iov_iter iter;
                u64 translated;
                int ret;
        u64 total_translated = 0;
 
        while (total_translated < len) {
-               struct bio_vec iov[16];
+               struct bio_vec iov[IOTLB_IOV_STRIDE];
                struct iov_iter iter;
                u64 translated;
                int ret;