1. 07 May, 2024 20 commits
  2. 06 May, 2024 8 commits
  3. 05 May, 2024 10 commits
  4. 03 May, 2024 2 commits
    • Mina Almasry's avatar
      Revert "net: mirror skb frag ref/unref helpers" · 173e7622
      Mina Almasry authored
      This reverts commit a580ea99.
      
      This revert is to resolve Dragos's report of page_pool leak here:
      https://lore.kernel.org/lkml/20240424165646.1625690-2-dtatulea@nvidia.com/
      
      The reverted patch interacts very badly with commit 2cc3aeb5 ("skbuff:
      Fix a potential race while recycling page_pool packets"). The reverted
      commit hopes that the pp_recycle + is_pp_page variables do not change
      between the skb_frag_ref and skb_frag_unref operation. If such a change
      occurs, the skb_frag_ref/unref will not operate on the same reference type.
      In the case of Dragos's report, the grabbed ref was a pp ref, but the unref
      was a page ref, because the pp_recycle setting on the skb was changed.
      
      Attempting to fix this issue on the fly is risky. Lets revert and I hope
      to reland this with better understanding and testing to ensure we don't
      regress some edge case while streamlining skb reffing.
      
      Fixes: a580ea99 ("net: mirror skb frag ref/unref helpers")
      Reported-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
      Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
      Link: https://lore.kernel.org/r/20240502175423.2456544-1-almasrymina@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      173e7622
    • David Wei's avatar
      bnxt: fix bnxt_get_avail_msix() returning negative values · 5bfadc57
      David Wei authored
      Current net-next/main does not boot for older chipsets e.g. Stratus.
      
      Sample dmesg:
      [   11.368315] bnxt_en 0000:02:00.0 (unnamed net_device) (uninitialized): Able to reserve only 0 out of 9 requested RX rings
      [   11.390181] bnxt_en 0000:02:00.0 (unnamed net_device) (uninitialized): Unable to reserve tx rings
      [   11.438780] bnxt_en 0000:02:00.0 (unnamed net_device) (uninitialized): 2nd rings reservation failed.
      [   11.487559] bnxt_en 0000:02:00.0 (unnamed net_device) (uninitialized): Not enough rings available.
      [   11.506012] bnxt_en 0000:02:00.0: probe with driver bnxt_en failed with error -12
      
      This is caused by bnxt_get_avail_msix() returning a negative value for
      these chipsets not using the new resource manager i.e. !BNXT_NEW_RM.
      This in turn causes hwr.cp in __bnxt_reserve_rings() to be set to 0.
      
      In the current call stack, __bnxt_reserve_rings() is called from
      bnxt_set_dflt_rings() before bnxt_init_int_mode(). Therefore,
      bp->total_irqs is always 0 and for !BNXT_NEW_RM bnxt_get_avail_msix()
      always returns a negative number.
      
      Historically, MSIX vectors were requested by the RoCE driver during
      run-time and bnxt_get_avail_msix() was used for this purpose. Today,
      RoCE MSIX vectors are statically allocated. bnxt_get_avail_msix() should
      only be called for the BNXT_NEW_RM() case to reserve the MSIX ahead of
      time for RoCE use.
      
      bnxt_get_avail_msix() is also be simplified to handle the BNXT_NEW_RM()
      case only.
      
      Fixes: d630624e ("bnxt_en: Utilize ulp client resources if RoCE is not registered")
      Signed-off-by: default avatarDavid Wei <dw@davidwei.uk>
      Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Link: https://lore.kernel.org/r/20240502203757.3761827-1-dw@davidwei.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5bfadc57