• Jon Paul Maloy's avatar
    tipc: introduce direct iovec to buffer chain fragmentation function · 067608e9
    Jon Paul Maloy authored
    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: default avatarJon Maloy <jon.maloy@ericsson.com>
    Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    067608e9
msg.c 9.05 KB