1. 28 Nov, 2022 2 commits
  2. 25 Nov, 2022 26 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
    • Horatiu Vultur's avatar
      net: lan966x: Update dma_dir of page_pool_params · 560c7223
      Horatiu Vultur authored
      To add support for XDP_TX it is required to be able to write to the DMA
      area therefore it is required that the pages will be mapped using
      DMA_BIDIRECTIONAL flag.
      Therefore check if there are any xdp programs on the interfaces and in
      that case set DMA_BIDRECTIONAL otherwise use DMA_FROM_DEVICE.
      Therefore when a new XDP program is added it is required to redo the
      page_pool.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      560c7223
    • Horatiu Vultur's avatar
      net: lan966x: Update rxq memory model · 77ddda44
      Horatiu Vultur authored
      By default the rxq memory model is MEM_TYPE_PAGE_SHARED but to be able
      to reuse pages on the TX side, when the XDP action XDP_TX it is required
      to update the memory model to PAGE_POOL.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77ddda44
    • Horatiu Vultur's avatar
      net: lan966x: Add len field to lan966x_tx_dcb_buf · 49f5eea8
      Horatiu Vultur authored
      Currently when a frame was transmitted, it is required to unamp the
      frame that was transmitted. The length of the frame was taken from the
      transmitted skb. In the future we might not have an skb, therefore store
      the length skb directly in the lan966x_tx_dcb_buf and use this one to
      unamp the frame.
      While at this, also arrange the members in lan966x_tx_dcb_buf not to
      have any holes.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49f5eea8
    • Horatiu Vultur's avatar
      net: lan966x: Introduce helper functions · 3d66bc57
      Horatiu Vultur authored
      Introduce lan966x_fdma_tx_setup_dcb and lan966x_fdma_tx_start functions
      and use of them inside lan966x_fdma_xmit. There is no functional change
      in here.
      They are introduced to be used when XDP_TX/REDIRECT actions are
      introduced.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d66bc57
    • Horatiu Vultur's avatar
      net: lan966x: Add XDP_PACKET_HEADROOM · 7292bb06
      Horatiu Vultur authored
      Update the page_pool params to allocate XDP_PACKET_HEADROOM space as
      headroom for all received frames.
      This is needed for when the XDP_TX and XDP_REDIRECT are implemented.
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7292bb06
    • Min Li's avatar
      ptp: idt82p33: remove PEROUT_ENABLE_OUTPUT_MASK · 46da4aa2
      Min Li authored
      PEROUT_ENABLE_OUTPUT_MASK was there to allow us to enable/disable
      all the perout pins. But it is not standard procedure, we will
      have to discard it.
      Signed-off-by: default avatarMin Li <min.li.xe@renesas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46da4aa2
    • Min Li's avatar
      ptp: idt82p33: Add PTP_CLK_REQ_EXTTS support · ad3cc776
      Min Li authored
      82P33 family of chips can trigger TOD read/write by external
      signal from one of the IN12/13/14 pins, which are set user
      space programs by calling PTP_PIN_SETFUNC through ptp_ioctl
      Signed-off-by: default avatarMin Li <min.li.xe@renesas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad3cc776
    • David S. Miller's avatar
      Merge branch 'sparx5-tc-protocol-all' · eea7b313
      David S. Miller authored
      Steen Hegelund says:
      
      ====================
      net: TC protocol all support in Sparx5 IS2 VCAP
      
      This provides support for the TC flower filters 'protocol all' clause in
      the Sparx5 IS2 VCAP.
      
      It builds on top of the initial IS2 VCAP support found in these series:
      
      https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/
      https://lore.kernel.org/all/20221109114116.3612477-1-steen.hegelund@microchip.com/
      https://lore.kernel.org/all/20221111130519.1459549-1-steen.hegelund@microchip.com/
      https://lore.kernel.org/all/20221117213114.699375-1-steen.hegelund@microchip.com/
      
      Functionality:
      ==============
      
      As the configuration for the Sparx5 IS2 VCAP consists of one (or more)
      keyset(s) for each lookup/port per traffic classification, it is not
      always possible to cover all protocols with just one ordinary VCAP rule.
      
      To improve this situation the driver will try to find out what keysets a
      rule will need to cover a TC flower "protocol all" filter and then compare
      this set of keysets to what the hardware is currently configured for.
      
      In case multiple keysets are needed then the driver can create a rule per
      rule size (e.g. X6 and X12) and use a mask on the keyset type field to
      allow the VCAP to match more than one keyset with just one rule.
      
      This is possible because the keysets that have the same size typically has
      many keys in common, so the VCAP rule keys can make a common match.
      
      The result is that one TC filter command may create multiple IS2 VCAP rules
      of different sizes that have a type field with a masked type id.
      
      Delivery:
      =========
      
      This is current plan for delivering the full VCAP feature set of Sparx5:
      
      - Sparx5 IS0 VCAP support
      - TC policer and drop action support (depends on the Sparx5 QoS support
        upstreamed separately)
      - Sparx5 ES0 VCAP support
      - TC flower template support
      - TC matchall filter support for mirroring and policing ports
      - TC flower filter mirror action support
      - Sparx5 ES2 VCAP support
      
      Version History:
      ================
      v2      Fixed a NULL return value compiler warning.
              Moved the new vcap_find_actionfield function a bit up in the file.
      
      v1      Initial version
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eea7b313
    • Steen Hegelund's avatar
      net: microchip: sparx5: Add VCAP filter keys KUNIT test · 22f3c325
      Steen Hegelund authored
      This tests the filtering of keys, either dropping unsupported keys or
      dropping keys specified in a list.
      Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22f3c325
    • Steen Hegelund's avatar
      net: microchip: sparx5: Support for displaying a list of keysets · 14b639ca
      Steen Hegelund authored
      This will display a list of keyset in case the type_id field in the VCAP
      rule has been wildcarded.
      Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14b639ca
    • Steen Hegelund's avatar
      net: microchip: sparx5: Support for TC protocol all · 0ca60948
      Steen Hegelund authored
      This allows support of TC protocol all for the Sparx5 IS2 VCAP.
      
      This is done by creating multiple rules that covers the rule size and
      traffic types in the IS2.
      Each rule size (e.g X16 and X6) may have multiple keysets and if there are
      more than one the type field in the VCAP rule will be wildcarded to support
      these keysets.
      Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ca60948
    • Steen Hegelund's avatar
      net: microchip: sparx5: Support for copying and modifying rules in the API · 465a38a2
      Steen Hegelund authored
      This adds support for making a copy of a rule and modify keys and actions
      to differentiate the copy.
      Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      465a38a2
    • Jiapeng Chong's avatar
      lib/test_rhashtable: Remove set but unused variable 'insert_retries' · b084f6cc
      Jiapeng Chong authored
      Variable 'insert_retries' is not effectively used in the function, so
      delete it.
      
      lib/test_rhashtable.c:437:18: warning: variable 'insert_retries' set but not used.
      
      Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3242Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b084f6cc
    • Xu Panda's avatar
      net: stmmac: use sysfs_streq() instead of strncmp() · f72cd76b
      Xu Panda authored
      Replace the open-code with sysfs_streq().
      Signed-off-by: default avatarXu Panda <xu.panda@zte.com.cn>
      Signed-off-by: default avatarYang Yang <yang.yang29@zte.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f72cd76b
    • Frank's avatar
      net: phy: add Motorcomm YT8531S phy id. · 813abcd9
      Frank authored
      We added patch for motorcomm.c to support YT8531S. This patch has
      been tested on AM335x platform which has one YT8531S interface
      card and passed all test cases.
      The tested cases indluding: YT8531S UTP function with support of
      10M/100M/1000M; YT8531S Fiber function with support of 100M/1000M;
      and YT8531S Combo function that supports auto detection of media type.
      
      Since most functions of YT8531S are similar to YT8521 and we reuse some
      codes for YT8521 in the patch file.
      Signed-off-by: default avatarFrank <Frank.Sae@motor-comm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      813abcd9
  3. 24 Nov, 2022 5 commits
  4. 23 Nov, 2022 7 commits