1. Jul 02, 2020
    • Denis Kirjanov's avatar
      xen networking: add XDP offset adjustment to xen-netback · 1c9535c7
      Denis Kirjanov authored
      
      
      the patch basically adds the offset adjustment and netfront
      state reading to make XDP work on netfront side.
      
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c9535c7
    • Denis Kirjanov's avatar
      xen networking: add basic XDP support for xen-netfront · 6c5aa6fc
      Denis Kirjanov authored
      
      
      The patch adds a basic XDP processing to xen-netfront driver.
      
      We ran an XDP program for an RX response received from netback
      driver. Also we request xen-netback to adjust data offset for
      bpf_xdp_adjust_head() header space for custom headers.
      
      synchronization between frontend and backend parts is done
      by using xenbus state switching:
      Reconfiguring -> Reconfigured- > Connected
      
      UDP packets drop rate using xdp program is around 310 kpps
      using ./pktgen_sample04_many_flows.sh and 160 kpps without the patch.
      
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c5aa6fc
    • Denis Kirjanov's avatar
      xen: netif.h: add a new extra type for XDP · 2cef30d7
      Denis Kirjanov authored
      
      
      The patch adds a new extra type to be able to diffirentiate
      between RX responses on xen-netfront side with the adjusted offset
      required for XDP processing.
      
      The offset value from a guest is passed via xenstore.
      
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2cef30d7
    • David S. Miller's avatar
      Merge branch 'net-ethernet-use-generic-power-management' · 6d79dc67
      David S. Miller authored
      
      
      Vaibhav Gupta says:
      
      ====================
      net: ethernet: use generic power management
      
      Linux Kernel Mentee: Remove Legacy Power Management.
      
      The purpose of this patch series is to remove legacy power management callbacks
      from net ethernet drivers.
      
      The callbacks performing suspend() and resume() operations are still calling
      pci_save_state(), pci_set_power_state(), etc. and handling the power management
      themselves, which is not recommended.
      
      The conversion requires the removal of the those function calls and change the
      callback definition accordingly and make use of dev_pm_ops structure.
      
      All patches are compile-tested only.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d79dc67
    • Vaibhav Gupta's avatar
      natsemi: use generic power management · 40c1b1ee
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable_device, which is not recommended. Hence, removed.
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40c1b1ee
    • Vaibhav Gupta's avatar
      vxge: use generic power management · 4c2ad126
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Use "struct dev_pm_ops" variable to bind the callbacks.
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c2ad126
    • Vaibhav Gupta's avatar
      ksz884x: use generic power management · 64120615
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable_wake(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64120615
    • Vaibhav Gupta's avatar
      mlx4: use generic power management · 0e3e206a
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Use "struct dev_pm_ops" variable to bind the callbacks.
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e3e206a
    • Vaibhav Gupta's avatar
      benet: use generic power management · e9a7f8c5
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable/disable_device(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9a7f8c5
    • Vaibhav Gupta's avatar
      sundance: use generic power management · 78cad4ce
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable/disable_device(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78cad4ce
    • Vaibhav Gupta's avatar
      liquidio: use generic power management · 1c2e4839
      Vaibhav Gupta authored
      
      
      Drivers should not use legacy power management as they have to manage power
      states and related operations, for the device, themselves. This driver was
      handling them with the help of PCI helper functions.
      
      With generic PM, all essentials will be handled by the PCI core. Driver
      needs to do only device-specific operations.
      
      The driver defined empty-body .suspend() and .resume() callbacks earlier.
      They can now be define NULL and bind with "struct dev_pm_ops" variable.
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c2e4839
    • Vaibhav Gupta's avatar
      ena_netdev: use generic power management · 817a89ae
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      817a89ae
    • Vaibhav Gupta's avatar
      starfire: use generic power management · a7c48c72
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_save/restore_sate() and pci_set_power_state().
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7c48c72
    • Vaibhav Gupta's avatar
      ne2k-pci: use generic power management · 33b7a252
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Thus, there is no need to call the PCI helper functions like
      pci_enable/disable_device(), pci_save/restore_sate() and
      pci_set_power_state().
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33b7a252
    • Vaibhav Gupta's avatar
      typhoon: use generic power management · 7b46681c
      Vaibhav Gupta authored
      
      
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      In this driver:
      typhoon_resume() calls typhoon_wakeup() which then calls PCI helper
      functions pci_set_power_state() and pci_restore_state(). The only other
      function, using typhoon_wakeup() is typhoon_open().
      
      Thus remove the pci_*() calls from tyhpoon_wakeup() and place them in
      typhoon_open(), maintaining the order, to retain the normal behavior of
      the function
      
      Now, typhoon_suspend() calls typhoon_sleep() which then calls PCI helper
      functions pci_enable_wake(), pci_disable_device() and
      pci_set_power_state(). Other functions:
       - typhoon_open()
       - typhoon_close()
       - typhoon_init_one()
      are also invoking typhoon_sleep(). Thus, in this case, cannot simply
      move PCI helper functions call.
      
      Hence, define a new function typhoon_sleep_early() which will do all the
      operations, which typhoon_sleep() was doing before calling PCI helper
      functions. Now typhoon_sleep() will call typhoon_sleep_early() to do
      those tasks, hence, the behavior for _open(), _close and _init_one() remain
      unchanged. And typhon_suspend() only requires typhoon_sleep_early().
      
      Compile-tested only.
      
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b46681c
    • Hulk Robot's avatar
      qed: Make symbol 'qed_hw_err_type_descr' static · 4f195d28
      Hulk Robot authored
      
      
      Fix sparse build warning:
      
      drivers/net/ethernet/qlogic/qed/qed_main.c:2480:6: warning:
       symbol 'qed_hw_err_type_descr' was not declared. Should it be static?
      
      Signed-off-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f195d28
    • Colin Ian King's avatar
      net/packet: remove redundant initialization of variable err · 2a6d6c31
      Colin Ian King authored
      
      
      The variable err is being initialized with a value that is never read
      and it is being updated later with a new value.  The initialization is
      redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a6d6c31
  2. Jul 01, 2020