• S
    skbuff: skb supports zero-copy buffers · a6686f2f
    Shirley Ma 提交于
    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: NShirley Ma <xma@...ibm.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    a6686f2f
skbuff.h 62.7 KB