1. 10 Jul, 2020 3 commits
    • Jakub Kicinski's avatar
      udp_tunnel: add central NIC RX port offload infrastructure · cc4e3835
      Jakub Kicinski authored
      Cater to devices which:
       (a) may want to sleep in the callbacks;
       (b) only have IPv4 support;
       (c) need all the programming to happen while the netdev is up.
      
      Drivers attach UDP tunnel offload info struct to their netdevs,
      where they declare how many UDP ports of various tunnel types
      they support. Core takes care of tracking which ports to offload.
      
      Use a fixed-size array since this matches what almost all drivers
      do, and avoids a complexity and uncertainty around memory allocations
      in an atomic context.
      
      Make sure that tunnel drivers don't try to replay the ports when
      new NIC netdev is registered. Automatic replays would mess up
      reference counting, and will be removed completely once all drivers
      are converted.
      
      v4:
       - use a #define NULL to avoid build issues with CONFIG_INET=n.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc4e3835
    • Jakub Kicinski's avatar
      udp_tunnel: re-number the offload tunnel types · 84a4160e
      Jakub Kicinski authored
      Make it possible to use tunnel types as flags more easily.
      There doesn't appear to be any user using the type as an
      array index, so this should make no difference.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84a4160e
    • Jakub Kicinski's avatar
      debugfs: make sure we can remove u32_array files cleanly · a2b992c8
      Jakub Kicinski authored
      debugfs_create_u32_array() allocates a small structure to wrap
      the data and size information about the array. If users ever
      try to remove the file this leads to a leak since nothing ever
      frees this wrapper.
      
      That said there are no upstream users of debugfs_create_u32_array()
      that'd remove a u32 array file (we only have one u32 array user in
      CMA), so there is no real bug here.
      
      Make callers pass a wrapper they allocated. This way the lifetime
      management of the wrapper is on the caller, and we can avoid the
      potential leak in debugfs.
      
      CC: Chucheng Luo <luochucheng@vivo.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2b992c8
  2. 09 Jul, 2020 18 commits
  3. 08 Jul, 2020 19 commits