• Shirley Ma's avatar
    skbuff: skb supports zero-copy buffers · a6686f2f
    Shirley Ma authored
    This patch adds userspace buffers support in skb shared info. A new
    struct skb_ubuf_info is needed to maintain the userspace buffers
    argument and index, a callback is used to notify userspace to release
    the buffers once lower device has done DMA (Last reference to that skb
    has gone).
    
    If there is any userspace apps to reference these userspace buffers,
    then these userspaces buffers will be copied into kernel. This way we
    can prevent userspace apps from holding these userspace buffers too long.
    
    Use destructor_arg to point to the userspace buffer info; a new tx flags
    SKBTX_DEV_ZEROCOPY is added for zero-copy buffer check.
    Signed-off-by: default avatarShirley Ma <xma@...ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a6686f2f
skbuff.c 77.4 KB