1. 10 Apr, 2024 11 commits
  2. 09 Apr, 2024 24 commits
  3. 08 Apr, 2024 5 commits
    • Bjorn Helgaas's avatar
      igc: Remove redundant runtime resume for ethtool ops · 75f16e06
      Bjorn Helgaas authored
      8c5ad0da ("igc: Add ethtool support") added ethtool_ops.begin() and
      .complete(), which used pm_runtime_get_sync() to resume suspended devices
      before any ethtool_ops callback and allow suspend after it completed.
      
      Subsequently, f32a2137 ("ethtool: runtime-resume netdev parent before
      ethtool ioctl ops") added pm_runtime_get_sync() in the dev_ethtool() path,
      so the device is resumed before any ethtool_ops callback even if the driver
      didn't supply a .begin() callback.
      
      Remove the .begin() and .complete() callbacks, which are now redundant
      because dev_ethtool() already resumes the device.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      75f16e06
    • Bjorn Helgaas's avatar
      igb: Remove redundant runtime resume for ethtool_ops · 461359c4
      Bjorn Helgaas authored
      749ab2cd ("igb: add basic runtime PM support") added
      ethtool_ops.begin() and .complete(), which used pm_runtime_get_sync() to
      resume suspended devices before any ethtool_ops callback and allow suspend
      after it completed.
      
      Subsequently, f32a2137 ("ethtool: runtime-resume netdev parent before
      ethtool ioctl ops") added pm_runtime_get_sync() in the dev_ethtool() path,
      so the device is resumed before any ethtool_ops callback even if the driver
      didn't supply a .begin() callback.
      
      Remove the .begin() and .complete() callbacks, which are now redundant
      because dev_ethtool() already resumes the device.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      461359c4
    • Bjorn Helgaas's avatar
      e1000e: Remove redundant runtime resume for ethtool_ops · b2c28941
      Bjorn Helgaas authored
      e60b22c5 ("e1000e: fix accessing to suspended device") added
      ethtool_ops.begin() and .complete(), which used pm_runtime_get_sync() to
      resume suspended devices before any ethtool_ops callback and allow suspend
      after it completed.
      
      3ef672ab ("e1000e: ethtool unnecessarily takes device out of RPM
      suspend") removed ethtool_ops.begin() and .complete() and instead did
      pm_runtime_get_sync() only in the individual ethtool_ops callbacks that
      access device registers.
      
      Subsequently, f32a2137 ("ethtool: runtime-resume netdev parent before
      ethtool ioctl ops") added pm_runtime_get_sync() in the dev_ethtool() path,
      so the device is resumed before *any* ethtool_ops callback, as it was
      before 3ef672ab.
      
      Remove most runtime resumes from ethtool_ops, which are now redundant
      because the resume has already been done by dev_ethtool().  This is
      essentially a revert of 3ef672ab ("e1000e: ethtool unnecessarily takes
      device out of RPM suspend").
      
      There are a couple subtleties:
      
        - Prior to 3ef672ab, the device was resumed only for the duration of
          a single ethtool callback.  3ef672ab changed e1000_set_phys_id() so
          the device was resumed for ETHTOOL_ID_ACTIVE and remained resumed until
          a subsequent callback for ETHTOOL_ID_INACTIVE.  Preserve that part of
          3ef672ab so the device will not be runtime suspended while in the
          ETHTOOL_ID_ACTIVE state.
      
        - 3ef672ab added "if (!pm_runtime_suspended())" in before reading the
          STATUS register in e1000_get_settings().  This was racy and is now
          unnecessary because dev_ethtool() has resumed the device already, so
          revert that.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b2c28941
    • Heiner Kallweit's avatar
      r8169: add support for RTL8168M · 39f59c72
      Heiner Kallweit authored
      A user reported an unknown chip version. According to the r8168 vendor
      driver it's called RTL8168M, but handling is identical to RTL8168H.
      So let's simply treat it as RTL8168H.
      Tested-by: default avatarЕвгений <octobergun@gmail.com>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39f59c72
    • David S. Miller's avatar
      Merge branch 'devlink-io-eqs' · 358961f5
      David S. Miller authored
      Parav Pandit says:
      
      ====================
      devlink: Add port function attribute for IO EQs
      
      Currently, PCI SFs and VFs use IO event queues to deliver netdev per
      channel events. The number of netdev channels is a function of IO
      event queues. In the second scenario of an RDMA device, the
      completion vectors are also a function of IO event queues. Currently, an
      administrator on the hypervisor has no means to provision the number
      of IO event queues for the SF device or the VF device. Device/firmware
      determines some arbitrary value for these IO event queues. Due to this,
      the SF netdev channels are unpredictable, and consequently, the
      performance is too.
      
      This short series introduces a new port function attribute: max_io_eqs.
      The goal is to provide administrators at the hypervisor level with the
      ability to provision the maximum number of IO event queues for a
      function. This gives the control to the administrator to provision
      right number of IO event queues and have predictable performance.
      
      Examples of when an administrator provisions (set) maximum number of
      IO event queues when using switchdev mode:
      
        $ devlink port show pci/0000:06:00.0/1
            pci/0000:06:00.0/1: type eth netdev enp6s0pf0vf0 flavour pcivf pfnum 0 vfnum 0
                function:
                hw_addr 00:00:00:00:00:00 roce enable max_io_eqs 10
      
        $ devlink port function set pci/0000:06:00.0/1 max_io_eqs 20
      
        $ devlink port show pci/0000:06:00.0/1
            pci/0000:06:00.0/1: type eth netdev enp6s0pf0vf0 flavour pcivf pfnum 0 vfnum 0
                function:
                hw_addr 00:00:00:00:00:00 roce enable max_io_eqs 20
      
      This sets the corresponding maximum IO event queues of the function
      before it is enumerated. Thus, when the VF/SF driver reads the
      capability from the device, it sees the value provisioned by the
      hypervisor. The driver is then able to configure the number of channels
      for the net device, as well as the number of completion vectors
      for the RDMA device. The device/firmware also honors the provisioned
      value, hence any VF/SF driver attempting to create IO EQs
      beyond provisioned value results in an error.
      
      With above setting now, the administrator is able to achieve the 2x
      performance on SFs with 20 channels. In second example when SF was
      provisioned for a container with 2 cpus, the administrator provisioned only
      2 IO event queues, thereby saving device resources.
      
      With the above settings now in place, the administrator achieved 2x
      performance with the SF device with 20 channels. In the second example,
      when the SF was provisioned for a container with 2 CPUs, the administrator
      provisioned only 2 IO event queues, thereby saving device resources.
      
      changelog:
      v2->v3:
      - limited to 80 chars per line in devlink
      - fixed comments from Jakub in mlx5 driver to fix missing mutex unlock
        on error path
      v1->v2:
      - limited comment to 80 chars per line in header file
      - fixed set function variables for reverse christmas tree
      - fixed comments from Kalesh
      - fixed missing kfree in get call
      - returning error code for get cmd failure
      - fixed error msg copy paste error in set on cmd failure
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      358961f5