1. 19 Feb, 2024 2 commits
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next · 06d53b03
      David S. Miller authored
      -queue
      
      Tony Nguyen says:
      
      ====================
      i40e: Simplify VSI and VEB handling
      
      Ivan Vecera says:
      
      The series simplifies handling of VSIs and VEBs by introducing for-each
      iterating macros, 'find' helper functions. Also removes the VEB
      recursion because the VEBs cannot have sub-VEBs according datasheet and
      fixes the support for floating VEBs.
      
      The series content:
      Patch 1 - Uses existing helper function for find FDIR VSI instead of loop
      Patch 2 - Adds and uses macros to iterate VSI and VEB arrays
      Patch 3 - Adds 2 helper functions to find VSIs and VEBs by their SEID
      Patch 4 - Fixes broken support for floating VEBs
      Patch 5 - Removes VEB recursion and simplifies VEB handling
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06d53b03
    • Jiri Pirko's avatar
      tools: ynl: don't access uninitialized attr_space variable · d0bcc15c
      Jiri Pirko authored
      If message contains unknown attribute and user passes
      "--process-unknown" command line option, _decode() gets called with space
      arg set to None. In that case, attr_space variable is not initialized
      used which leads to following trace:
      
      Traceback (most recent call last):
        File "./tools/net/ynl/cli.py", line 77, in <module>
          main()
        File "./tools/net/ynl/cli.py", line 68, in main
          reply = ynl.dump(args.dump, attrs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "tools/net/ynl/lib/ynl.py", line 909, in dump
          return self._op(method, vals, [], dump=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "tools/net/ynl/lib/ynl.py", line 894, in _op
          rsp_msg = self._decode(decoded.raw_attrs, op.attr_set.name)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "tools/net/ynl/lib/ynl.py", line 639, in _decode
          self._rsp_add(rsp, attr_name, None, self._decode_unknown(attr))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "tools/net/ynl/lib/ynl.py", line 569, in _decode_unknown
          return self._decode(NlAttrs(attr.raw), None)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "tools/net/ynl/lib/ynl.py", line 630, in _decode
          search_attrs = SpaceAttrs(attr_space, rsp, outer_attrs)
                                    ^^^^^^^^^^
      UnboundLocalError: cannot access local variable 'attr_space' where it is not associated with a value
      
      Fix this by moving search_attrs assignment under the if statement
      above it to make sure attr_space is initialized.
      
      Fixes: bf8b8323 ("tools/net/ynl: Support sub-messages in nested attribute spaces")
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0bcc15c
  2. 18 Feb, 2024 3 commits
  3. 17 Feb, 2024 6 commits
  4. 16 Feb, 2024 29 commits