1. Oct 10, 2023
  2. Oct 09, 2023
  3. Oct 07, 2023
  4. Oct 06, 2023
    • Johannes Berg's avatar
      Merge wireless into wireless-next · 7d6904bf
      Johannes Berg authored
      
      
      Resolve several conflicts, mostly between changes/fixes in
      wireless and the locking rework in wireless-next. One of
      the conflicts actually shows a bug in wireless that we'll
      want to fix separately.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
      7d6904bf
    • Sascha Hauer's avatar
      net: phy: dp83867: Add support for hardware blinking LEDs · 1a489087
      Sascha Hauer authored
      
      
      This implements the led_hw_* hooks to support hardware blinking LEDs on
      the DP83867 phy. The driver supports all LED modes that have a
      corresponding TRIGGER_NETDEV_* define. Error and collision do not have
      a TRIGGER_NETDEV_* define, so these modes are currently not supported.
      
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> #TQMa8MxML/MBa8Mx
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1a489087
    • Kees Cook's avatar
      flow_offload: Annotate struct flow_action_entry with __counted_by · 99474727
      Kees Cook authored
      Prepare for the coming implementation by GCC and Clang of the __counted_by
      attribute. Flexible array members annotated with __counted_by can have
      their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
      array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
      functions).
      
      As found with Coccinelle[1], add __counted_by for struct flow_action_entry.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: netdev@vger.kernel.org
      Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
      
       [1]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99474727
    • Kees Cook's avatar
      net/packet: Annotate struct packet_fanout with __counted_by · b3783e5e
      Kees Cook authored
      Prepare for the coming implementation by GCC and Clang of the __counted_by
      attribute. Flexible array members annotated with __counted_by can have
      their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
      array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
      functions).
      
      As found with Coccinelle[1], add __counted_by for struct packet_fanout.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: Anqi Shen <amy.saq@antgroup.com>
      Cc: netdev@vger.kernel.org
      Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
      
       [1]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3783e5e
    • Jakub Kicinski's avatar
      tools: ynl-gen: use uapi header name for the header guard · 71ce60d3
      Jakub Kicinski authored
      
      
      Chuck points out that we should use the uapi-header property
      when generating the guard. Otherwise we may generate the same
      guard as another file in the tree.
      
      Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71ce60d3
    • David S. Miller's avatar
      Merge branch 'mlxsw-ACL-region' · f739d755
      David S. Miller authored
      
      
      Petr Machata says:
      
      ====================
      mlxsw: Control the order of blocks in ACL region
      
      Amit Cohen writes:
      
      For 12 key blocks in the A-TCAM, rules are split into two records, which
      constitute two lookups. The two records are linked using a
      "large entry key ID".
      
      Due to a Spectrum-4 hardware issue, KVD entries that correspond to key
      blocks 0 to 5 of 12 key blocks will be placed in the same KVD pipe if they
      only differ in their "large entry key ID", as it is ignored. This results
      in a reduced scale, we can insert less than 20k filters and get an error:
      
          $ tc -b flower.batch
          RTNETLINK answers: Input/output error
          We have an error talking to the kernel
      
      To reduce the probability of this issue, we can place key blocks with
      high entropy in blocks 0 to 5. The idea is to place blocks that are often
      changed in blocks 0 to 5, for example, key blocks that match on IPv4
      addresses or the LSBs of IPv6 addresses. Such placement will reduce the
      probability of these blocks to be same.
      
      Mark several blocks with 'high_entropy' flag and place them in blocks 0
      to 5. Note that the list of the blocks is just a suggestion, I will verify
      it with architects.
      
      Currently, there is a one loop that chooses which blocks should be used
      for a given list of elements and fills the blocks - when a block is
      chosen, it fills it in the region. To be able to control the order of
      the blocks, separate between searching blocks and filling them. Several
      pre-changes are required.
      
      Patch set overview:
      Patch #1 marks several blocks with 'high_entropy' flag.
      Patches #2-#4 prepare the code for filling blocks at the end of the search.
      Patch #5 changes the loop to just choose the blocks and fill the blocks at
      the end.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f739d755
    • Amit Cohen's avatar
      mlxsw: core_acl_flex_keys: Fill blocks with high entropy first · c01e2493
      Amit Cohen authored
      
      
      The previous patches prepared the code to allow separating between
      choosing blocks and filling blocks.
      
      Do not add blocks as part of the loop that chooses them. When all the
      required blocks are set in the bitmap 'chosen_blocks_bm', start filling
      blocks. Iterate over the bitmap twice - first add only blocks that are
      marked with 'high_entropy' flag. Then, fill the rest of the blocks.
      
      The idea is to place key blocks with high entropy in blocks 0 to 5. See
      more details in previous patches.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c01e2493
    • Amit Cohen's avatar
      mlxsw: core_acl_flex_keys: Save chosen elements in all blocks per search · 900f4285
      Amit Cohen authored
      
      
      Currently, mlxsw_afk_picker() chooses which blocks will be used for a
      given list of elements, and fills the blocks during the searching - when a
      key block is found with most hits, it adds it and removes the elements from
      the count of hits. This should be changed as we want to be able to choose
      which blocks will be placed in blocks 0 to 5.
      
      To separate between choosing blocks and filling blocks, several pre-changes
      are required. Currently, the indication of whether all elements were
      found in the chosen blocks is by the structure 'key_info->elusage'. This
      structure is updated when block is filled as part of
      mlxsw_afk_picker_key_info_add(). A following patch will call this
      function only after choosing all the blocks. Add a bitmap called
      'elusage_chosen' to store which elements were chosen in the chosen blocks.
      Change the condition in the loop to check elements that were chosen, not
      elements that were already filled in the blocks.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      900f4285
    • Amit Cohen's avatar
      mlxsw: core_acl_flex_keys: Save chosen elements per block · 545535fd
      Amit Cohen authored
      
      
      Currently, mlxsw_afk_picker() chooses which blocks will be used for a
      given list of elements, and fills the blocks during the searching - when a
      key block is found with most hits, it adds it and removes the elements from
      the count of hits. This should be changed as we want to be able to choose
      which blocks will be placed in blocks 0 to 5.
      
      To separate between choosing blocks and filling blocks, several pre-changes
      are required. During the search, the structure 'mlxsw_afk_picker' is
      used per block, it contains how many elements from the required list appear
      in the block. When a block is chosen and filled, this bitmap of elements is
      cleaned. To be able to fill the blocks at the end, add a bitmap called
      'chosen_element' as part of picker. When a block is chosen, copy the
      'element' bitmap to it. Use the new bitmap as part of
      mlxsw_afk_picker_key_info_add(). So later, when filling the block will
      be done at the end of the searching, we will use the copied bitmap that
      contains the elements that should be used in the block.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      545535fd
    • Amit Cohen's avatar
      mlxsw: core_acl_flex_keys: Add a bitmap to save which blocks are chosen · 0a67b7a0
      Amit Cohen authored
      
      
      Currently, mlxsw_afk_picker() chooses which blocks will be used for a
      given list of elements, and fills the blocks during the searching - when a
      key block is found with most hits, it adds it and removes the elements from
      the count of hits. This should be changed as we want to be able to choose
      which blocks will be placed in blocks 0 to 5.
      
      To separate between choosing blocks and filling blocks, several pre-changes
      are required. The indexes of the chosen blocks should be saved, so then
      the relevant blocks will be filled at the end of search.
      
      Allocate a bitmap for chosen blocks, when a block is found with most
      hits, set the relevant bit in the bitmap. This bitmap will be used in a
      following patch.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a67b7a0
    • Amit Cohen's avatar
      mlxsw: Mark high entropy key blocks · cad6431b
      Amit Cohen authored
      
      
      For 12 key blocks in the A-TCAM, rules are split into two records, which
      constitute two lookups. The two records are linked using a
      "large entry key ID".
      
      Due to a Spectrum-4 hardware issue, KVD entries that correspond to key
      blocks 0 to 5 of 12 key blocks A-TCAM entries will be placed in the same
      KVD pipe if they only differ in their "large entry key ID", as it is
      ignored. This results in a reduced scale. To reduce the probability of this
      issue, we can place key blocks with high entropy in blocks 0 to 5. The idea
      is to place blocks that are changed often in blocks 0 to 5, for
      example, key blocks that match on IPv4 addresses or the LSBs of IPv6
      addresses. Such placement will reduce the probability of these blocks to be
      same.
      
      Mark several blocks with 'high_entropy' flag, so later we will take into
      account this flag and place them in blocks 0 to 5.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cad6431b
    • David S. Miller's avatar
      Merge branch 'sfc-conntrack-offloads' · ddb23e34
      David S. Miller authored
      
      
      Edward Cree says:
      
      ====================
      sfc: conntrack offload for tunnels
      
      This series adds support for offloading TC flower rules which require
      both connection tracking and tunnel decapsulation.  Depending on the
      match keys required, the left-hand-side rule may go in either the
      Outer Rule table or the Action Rule table.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ddb23e34