1. 20 Feb, 2024 2 commits
    • 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
    • Mina Almasry's avatar
      net: introduce abstraction for network memory · 18ddbf5c
      Mina Almasry authored
      Add the netmem_ref type, an abstraction for network memory.
      
      To add support for new memory types to the net stack, we must first
      abstract the current memory type. Currently parts of the net stack
      use struct page directly:
      
      - page_pool
      - drivers
      - skb_frag_t
      
      Originally the plan was to reuse struct page* for the new memory types,
      and to set the LSB on the page* to indicate it's not really a page.
      However, for compiler type checking we need to introduce a new type.
      
      netmem_ref is introduced to abstract the underlying memory type.
      Currently it's a no-op abstraction that is always a struct page
      underneath. In parallel there is an undergoing effort to add support
      for devmem to the net stack:
      
      https://lore.kernel.org/netdev/20231208005250.2910004-1-almasrymina@google.com/
      
      netmem_ref can be pointers to different underlying memory types, and the
      low bits are set to indicate the memory type. Helpers are provided
      to convert netmem pointers to the underlying memory type (currently only
      struct page). In the devmem series helpers are provided so that calling
      code can use netmem without worrying about the underlying memory type
      unless absolutely necessary.
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      18ddbf5c
  2. 19 Feb, 2024 11 commits
  3. 18 Feb, 2024 3 commits
  4. 17 Feb, 2024 6 commits
  5. 16 Feb, 2024 18 commits