1. 17 Mar, 2021 4 commits
    • Alexander Duyck's avatar
      nfp: Replace nfp_pr_et with ethtool_sprintf · 6a143a7c
      Alexander Duyck authored
      The nfp_pr_et function is nearly identical to ethtool_sprintf except for
      the fact that it passes the pointer by value and as a return whereas
      ethtool_sprintf passes it as a pointer.
      
      Since they are so close just update nfp to make use of ethtool_sprintf
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a143a7c
    • Alexander Duyck's avatar
      intel: Update drivers to use ethtool_sprintf · c8d4725e
      Alexander Duyck authored
      Update the Intel drivers to make use of ethtool_sprintf. The general idea
      is to reduce code size and overhead by replacing the repeated pattern of
      string printf statements and ETH_STRING_LEN counter increments.
      Signed-off-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Acked-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8d4725e
    • Alexander Duyck's avatar
      ethtool: Add common function for filling out strings · 7888fe53
      Alexander Duyck authored
      Add a function to handle the common pattern of printing a string into the
      ethtool strings interface and incrementing the string pointer by the
      ETH_GSTRING_LEN. Most of the drivers end up doing this and several have
      implemented their own versions of this function so it would make sense to
      consolidate on one implementation.
      Signed-off-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7888fe53
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2021-03-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 0c88eda9
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2021-03-16
      
      mlx5 uplink representor netdev persistence.
      
      Before this patchset we used to have separate netdevs for Native NIC mode
      and Switchdev mode (uplink representor netdev), meaning that if user
      switches modes between Native to Switchdev and vice versa, the driver
      would cleanup the current netdev representor and create a new one for the
      new mode, such behavior created an administrative nightmare for users,
      where users need to be aware of such loss of both data path and control
      path configurations, e.g. netdev attributes and arp/route tables,
      where the later is more painful.
      
      A simple solution for this is not to replace the netdev in first place
      and use a single netdev to serve the uplink/physical port whether it is
      in switchdev mode or native mode.
      
      We already have different HW profiles for each netdev mode, in this series
      we just replace the HW profile on the fly and we keep the same netdev
      attached.
      
      Refactoring: Some refactoring has been made to overcome some technical
      difficulties
      1) The netdev is created with the maximum amount of tx/rx queues to serve
      the two profiles.
      
      2) Some ndos are not supported in some modes, so we added a mode check for
         such cases, e.g legacy sriov ndos must be blocked in switchdev mode.
      
      3) Some mlx5 netdev private attributes need to be moved out of profiles
         and kept in a persistent place, where the netdev is created
         e.g devlink port and other global HW resources
      
      4) The netdev devlink port is now always registered with the switch id
      
      Implementation: the last three patches implement the mechanism now as the
      netdev can be shared.
      
      5) Don't recreate the netdev on switchdev mode changes
      6) Prevent changing switchdev mode when some netdev operations
      are active, mostly when TC rules are being processed.
      This is required since the netdev is kept registered while switchdev mode
      can be changed.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c88eda9
  2. 16 Mar, 2021 36 commits