diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2014-06-25 20:41:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-27 12:50:55 -0700 |
commit | 067608e9d019d6477fd45dd948e81af0e5bf599f (patch) | |
tree | cb6cdf5cd95365a97087e9baae2cb4e96a12710a /net/tipc/socket.c | |
parent | 16e166b88cdfd508b88934ec0c8a0ec97e6b30f8 (diff) | |
download | linux-067608e9d019d6477fd45dd948e81af0e5bf599f.tar.gz linux-067608e9d019d6477fd45dd948e81af0e5bf599f.tar.bz2 linux-067608e9d019d6477fd45dd948e81af0e5bf599f.zip |
tipc: introduce direct iovec to buffer chain fragmentation function
Fragmentation at message sending is currently performed in two
places in link.c, depending on whether data to be transmitted
is delivered in the form of an iovec or as a big sk_buff. Those
functions are also tightly entangled with the send functions
that are using them.
We now introduce a re-entrant, standalone function, tipc_msg_build2(),
that builds a packet chain directly from an iovec. Each fragment is
sized according to the MTU value given by the caller, and is prepended
with a correctly built fragment header, when needed. The function is
independent from who is calling and where the chain will be delivered,
as long as the caller is able to indicate a correct MTU.
The function is tested, but not called by anybody yet. Since it is
incompatible with the existing tipc_msg_build(), and we cannot yet
remove that function, we have given it a temporary name.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
0 files changed, 0 insertions, 0 deletions