• Mina Almasry's avatar
    net: add netmem to skb_frag_t · 21d2e673
    Mina Almasry authored
    Use struct netmem* instead of page in skb_frag_t. Currently struct
    netmem* is always a struct page underneath, but the abstraction
    allows efforts to add support for skb frags not backed by pages.
    
    There is unfortunately 1 instance where the skb_frag_t is assumed to be
    a exactly a bio_vec in kcm. For this case, WARN_ON_ONCE and return error
    before doing a cast.
    
    Add skb[_frag]_fill_netmem_*() and skb_add_rx_frag_netmem() helpers so
    that the API can be used to create netmem skbs.
    Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
    Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    21d2e673
kcmsock.c 42.4 KB