Wait, I see that the bvec is still a single array per bio. When you said
a table I thought you meant a 2-dimentional array...
I mean a new 1-d table A has to be created for multiple bios in one rq,
and build it in the following way
rq_for_each_bvec(tmp, rq, rq_iter)
*A = tmp;
Then you can pass A to iov_iter_bvec() & send().
Given it is over TCP, I guess it should be doable for you to preallocate one
256-bvec table in one page for each request, then sets the max segment size as
(unsigned int)-1, and max segment number as 256, the preallocated table
should work anytime.