1. 29 Nov, 2022 27 commits
  2. 28 Nov, 2022 2 commits
  3. 25 Nov, 2022 11 commits
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · a6e3d86e
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2022-11-23 (ice)
      
      This series contains updates to ice driver only.
      
      Karol adjusts check of PTP hardware to wait longer but check more often.
      
      Brett removes use of driver defined link speed; instead using the values
      from ethtool.h, utilizing static tables for indexing.
      
      Ben adds tracking of stats in order to accumulate reported statistics that
      were previously reset by hardware.
      
      Marcin fixes issues setting RXDID when queues are asymmetric.
      
      Anatolii re-introduces use of define over magic number; ICE_RLAN_BASE_S.
      ---
      v3:
       - Dropped, previous, patch 2
      v2:
      Patch 5
       - Convert some allocations to non-managed
       - Remove combined error checking; add error checks for each call
       - Remove excess NULL checks
       - Remove unnecessary NULL sets and newlines
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6e3d86e
    • David S. Miller's avatar
      Merge branch 'net-remove-kmap_atomic' · bed6e865
      David S. Miller authored
      Anirudh Venkataramanan says:
      
      ====================
      net: Remove uses of kmap_atomic()
      
      kmap_atomic() is being deprecated. This little series replaces the last
      few uses of kmap_atomic() in the networking subsystem.
      
      This series triggered a suggestion [1] that perhaps the Sun Cassini,
      LDOM Virtual Switch Driver and the LDOM virtual network drivers should be
      removed completely. I plan to do this in a follow up patchset. For
      completeness, this series still includes kmap_atomic() conversions that
      apply to the above referenced drivers. If for some reason we choose to not
      remove these drivers, at least they won't be using kmap_atomic() anymore.
      
      Also, the following maintainer entries for the Chelsio driver seem to be
      defunct:
      
        Vinay Kumar Yadav <vinay.yadav@chelsio.com>
        Rohit Maheshwari <rohitm@chelsio.com>
      
      I can submit a follow up patch to remove these entries, but thought
      maybe the folks over at Chelsio would want to look into this first.
      
      Changes v1 -> v2:
        Use memcpy_from_page() in patches 2/6 and 4/6
        Add new patch for the thunderbolt driver
        Update commit messages and cover letter
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bed6e865
    • Anirudh Venkataramanan's avatar
      net: thunderbolt: Use kmap_local_page() instead of kmap_atomic() · c3a8d375
      Anirudh Venkataramanan authored
      kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace
      kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local()
      respectively.
      
      Note that kmap_atomic() disables preemption and page-fault processing, but
      kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has
      to check if the code being executed between the map/unmap implicitly
      depends on page-faults and/or preemption being disabled. If yes, then code
      to disable page-faults and/or preemption should also be added for
      functional correctness. That however doesn't appear to be the case here,
      so just kmap_local_page() is used.
      
      Also note that the page being mapped is not allocated by the driver, and so
      the driver doesn't know if the page is in normal memory. This is the reason
      kmap_local_page() is used as opposed to page_address().
      
      I don't have hardware, so this change has only been compile tested.
      
      Cc: Michael Jamet <michael.jamet@intel.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
      Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3a8d375
    • Anirudh Venkataramanan's avatar
      sunvnet: Use kmap_local_page() instead of kmap_atomic() · 350d3513
      Anirudh Venkataramanan authored
      kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace
      kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local()
      respectively.
      
      Note that kmap_atomic() disables preemption and page-fault processing, but
      kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has
      to check if the code being executed between the map/unmap implicitly
      depends on page-faults and/or preemption being disabled. If yes, then code
      to disable page-faults and/or preemption should also be added for
      functional correctness. That however doesn't appear to be the case here,
      so just kmap_local_page() is used.
      
      Also note that the page being mapped is not allocated by the driver, and so
      the driver doesn't know if the page is in normal memory. This is the reason
      kmap_local_page() is used as opposed to page_address().
      
      I don't have hardware, so this change has only been compile tested.
      
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
      Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      350d3513
    • Anirudh Venkataramanan's avatar
      cassini: Use memcpy_from_page() instead of k[un]map_atomic() · e3128591
      Anirudh Venkataramanan authored
      kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace
      the map-memcpy-unmap usage pattern (done using k[un]map_atomic()) with
      memcpy_from_page(), which internally uses kmap_local_page() and
      kunmap_local(). This renders the variable 'vaddr' unnecessary, and so
      remove this too.
      
      Note that kmap_atomic() disables preemption and page-fault processing, but
      kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has
      to check if the code being executed between the map/unmap implicitly
      depends on page-faults and/or preemption being disabled. If yes, then code
      to disable page-faults and/or preemption should also be added for
      functional correctness. That however doesn't appear to be the case here,
      so just memcpy_from_page() is used.
      
      Also note that the page being mapped is not allocated by the driver, and so
      the driver doesn't know if the page is in normal memory. This is the reason
      kmap_local_page() is used (via memcpy_from_page()) as opposed to
      page_address().
      
      I don't have hardware, so this change has only been compile tested.
      
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
      Suggested-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
      Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3128591
    • Anirudh Venkataramanan's avatar
      cassini: Use page_address() instead of kmap_atomic() · c1914458
      Anirudh Venkataramanan authored
      Pages for Rx buffers are allocated in cas_page_alloc() using either
      GFP_ATOMIC or GFP_KERNEL. Memory allocated with GFP_KERNEL/GFP_ATOMIC can't
      come from highmem and so there's no need to kmap() them. Just use
      page_address() instead. This makes the variable 'addr' unnecessary, so
      remove it too.
      
      Note that kmap_atomic() disables preemption and page-fault processing,
      but page_address() doesn't. When removing uses of kmap_atomic(), one has to
      check if the code being executed between the map/unmap implicitly depends
      on page-faults and/or preemption being disabled. If yes, then code to
      disable page-faults and/or preemption should also be added for functional
      correctness. That however doesn't appear to be the case here, so just
      page_address() is used.
      
      I don't have hardware, so this change has only been compile tested.
      
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
      Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1914458
    • Anirudh Venkataramanan's avatar
      sfc: Use kmap_local_page() instead of kmap_atomic() · f61e6d3c
      Anirudh Venkataramanan authored
      kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace
      kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local()
      respectively.
      
      Note that kmap_atomic() disables preemption and page-fault processing, but
      kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has
      to check if the code being executed between the map/unmap implicitly
      depends on page-faults and/or preemption being disabled. If yes, then code
      to disable page-faults and/or preemption should also be added for
      functional correctness. That however doesn't appear to be the case here,
      so just kmap_local_page() is used.
      
      Also note that the page being mapped is not allocated by the driver, and so
      the driver doesn't know if the page is in normal memory. This is the reason
      kmap_local_page() is used as opposed to page_address().
      
      I don't have hardware, so this change has only been compile tested.
      
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
      Cc: Edward Cree <ecree.xilinx@gmail.com>
      Cc: Martin Habets <habetsm.xilinx@gmail.com>
      Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Acked-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f61e6d3c
    • Anirudh Venkataramanan's avatar
      ch_ktls: Use memcpy_from_page() instead of k[un]map_atomic() · 51337ef0
      Anirudh Venkataramanan authored
      kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace
      the map-memcpy-unmap usage pattern (done using k[un]map_atomic()) with
      memcpy_from_page(), which internally uses kmap_local_page() and
      kunmap_local(). This renders the variables 'data' and 'vaddr' unnecessary,
      and so remove these too.
      
      Note that kmap_atomic() disables preemption and page-fault processing, but
      kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has
      to check if the code being executed between the map/unmap implicitly
      depends on page-faults and/or preemption being disabled. If yes, then code
      to disable page-faults and/or preemption should also be added for
      functional correctness. That however doesn't appear to be the case here,
      so just memcpy_from_page() is used.
      
      Also note that the page being mapped is not allocated by the driver, and so
      the driver doesn't know if the page is in normal memory. This is the reason
      kmap_local_page() is used (via memcpy_from_page()) as opposed to
      page_address().
      
      I don't have hardware, so this change has only been compile tested.
      
      Cc: Ayush Sawal <ayush.sawal@chelsio.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
      Suggested-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
      Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Acked-by: default avatarAyush Sawal <ayush.sawal@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51337ef0
    • David S. Miller's avatar
      Merge branch 'lan966x-extend-xdp-support' · 8781994a
      David S. Miller authored
      Horatiu Vultur says:
      
      ====================
      net: lan966x: Extend xdp support
      
      Extend the current support of XDP in lan966x with the action XDP_TX and
      XDP_REDIRECT.
      The first patches just prepare the things such that it would be easier
      to add XDP_TX and XDP_REDIRECT actions. Like adding XDP_PACKET_HEADROOM,
      introduce helper functions, use the correct dma_dir for the page pool
      The last 2 patches introduce the XDP actions XDP_TX and XDP_REDIRECT.
      
      v4->v5:
      - add iterator declaration inside for loops
      - move the scope of port inside the function lan966x_fdma_rx_alloc_page_pool
      - create union for skb and xdpf inside struct lan966x_tx_dcb_buf
      
      v3->v4:
      - use napi_consume_skb instead of dev_kfree_skb_any
      - arrange members in struct lan966x_tx_dcb_buf not to have holes
      - fix when xdp program is added the check for determining if page pool
        needs to be recreated was wrong
      - change type for len in lan966x_tx_dcb_buf to u32
      
      v2->v3:
      - make sure to update rxq memory model
      - update the page pool direction if there is any xdp program
      - in case of action XDP_TX give back to reuse the page
      - in case of action XDP_REDIRECT, remap the frame and make sure to
        unmap it when is transmitted.
      
      v1->v2:
      - use skb_reserve of using skb_put and skb_pull
      - make sure that data_len doesn't include XDP_PACKET_HEADROOM
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8781994a
    • Horatiu Vultur's avatar
      net: lan966x: Add support for XDP_REDIRECT · a825b611
      Horatiu Vultur authored
      Extend lan966x XDP support with the action XDP_REDIRECT. This is similar
      with the XDP_TX, so a lot of functionality can be reused.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a825b611
    • Horatiu Vultur's avatar
      net: lan966x: Add support for XDP_TX · 19c6f534
      Horatiu Vultur authored
      Extend lan966x XDP support with the action XDP_TX. In this case when the
      received buffer needs to execute XDP_TX, the buffer will be moved to the
      TX buffers. So a new RX buffer will be allocated.
      When the TX finish with the frame, it would give back the buffer to the
      page pool.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      19c6f534