1. 20 Feb, 2020 6 commits
  2. 19 Feb, 2020 24 commits
    • Sasha Neftin's avatar
      igc: Add dump options · 9c384ee3
      Sasha Neftin authored
      Placeholder for debugging functionality.
      In this patch, we add some registers and rings summary dumps.
      Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9c384ee3
    • Sasha Neftin's avatar
      igc: Complete to commit Add legacy power management support · 8594a7f3
      Sasha Neftin authored
      commit 9513d2a5 ("igc: Add legacy power management support")
      Add power management resume and schedule suspend requests.
      Add power management get and put synchronization.
      Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      8594a7f3
    • Chen Zhou's avatar
      igc: make non-global functions static · 38db952b
      Chen Zhou authored
      Fix sparse warning:
      drivers/net/ethernet/intel/igc/igc_ptp.c:512:6:
      	warning: symbol 'igc_ptp_tx_work' was not declared. Should it be static?
      drivers/net/ethernet/intel/igc/igc_ptp.c:644:6:
      	warning: symbol 'igc_ptp_suspend' was not declared. Should it be static?
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarChen Zhou <chenzhou10@huawei.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      38db952b
    • Jia-Ju Bai's avatar
      net: intel: e1000e: fix possible sleep-in-atomic-context bugs in e1000e_get_hw_semaphore() · 2e05f756
      Jia-Ju Bai authored
      The driver may sleep while holding a spinlock.
      The function call path (from bottom to top) in Linux 4.19 is:
      
      drivers/net/ethernet/intel/e1000e/mac.c, 1366:
      	usleep_range in e1000e_get_hw_semaphore
      drivers/net/ethernet/intel/e1000e/80003es2lan.c, 322:
      	e1000e_get_hw_semaphore in e1000_release_swfw_sync_80003es2lan
      drivers/net/ethernet/intel/e1000e/80003es2lan.c, 197:
      	e1000_release_swfw_sync_80003es2lan in e1000_release_phy_80003es2lan
      drivers/net/ethernet/intel/e1000e/netdev.c, 4883:
      	(FUNC_PTR) e1000_release_phy_80003es2lan in e1000e_update_phy_stats
      drivers/net/ethernet/intel/e1000e/netdev.c, 4917:
      	e1000e_update_phy_stats in e1000e_update_stats
      drivers/net/ethernet/intel/e1000e/netdev.c, 5945:
      	e1000e_update_stats in e1000e_get_stats64
      drivers/net/ethernet/intel/e1000e/netdev.c, 5944:
      	spin_lock in e1000e_get_stats64
      
      drivers/net/ethernet/intel/e1000e/mac.c, 1384:
      	usleep_range in e1000e_get_hw_semaphore
      drivers/net/ethernet/intel/e1000e/80003es2lan.c, 322:
      	e1000e_get_hw_semaphore in e1000_release_swfw_sync_80003es2lan
      drivers/net/ethernet/intel/e1000e/80003es2lan.c, 197:
      	e1000_release_swfw_sync_80003es2lan in e1000_release_phy_80003es2lan
      drivers/net/ethernet/intel/e1000e/netdev.c, 4883:
      	(FUNC_PTR) e1000_release_phy_80003es2lan in e1000e_update_phy_stats
      drivers/net/ethernet/intel/e1000e/netdev.c, 4917:
      	e1000e_update_phy_stats in e1000e_update_stats
      drivers/net/ethernet/intel/e1000e/netdev.c, 5945:
      	e1000e_update_stats in e1000e_get_stats64
      drivers/net/ethernet/intel/e1000e/netdev.c, 5944:
      	spin_lock in e1000e_get_stats64
      
      (FUNC_PTR) means a function pointer is called.
      
      To fix these bugs, usleep_range() is replaced with udelay().
      
      These bugs are found by a static analysis tool STCheck written by myself.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2e05f756
    • Ben Dooks (Codethink)'s avatar
      e1000e: fix missing cpu_to_le64 on buffer_addr · 99fe61b2
      Ben Dooks (Codethink) authored
      The following warning suggests there is a missing cpu_to_le64() in
      the e1000_flush_tx_ring() function (it is also the behaviour
      elsewhere in the driver to do cpu_to_le64() on the buffer_addr
      when setting it)
      
      drivers/net/ethernet/intel/e1000e/netdev.c:3813:30: warning: incorrect type in assignment (different base types)
      drivers/net/ethernet/intel/e1000e/netdev.c:3813:30:    expected restricted __le64 [usertype] buffer_addr
      drivers/net/ethernet/intel/e1000e/netdev.c:3813:30:    got unsigned long long [usertype] dma
      Signed-off-by: default avatarBen Dooks (Codethink) <ben.dooks@codethink.co.uk>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      99fe61b2
    • Lorenzo Bianconi's avatar
      net: mvneta: align xdp stats naming scheme to mlx5 driver · 7d51a015
      Lorenzo Bianconi authored
      Introduce "rx" prefix in the name scheme for xdp counters
      on rx path.
      Differentiate between XDP_TX and ndo_xdp_xmit counters
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d51a015
    • David S. Miller's avatar
      Merge branch 'octeontx2-af-Cleanup-changes' · c3d5e561
      David S. Miller authored
      Sunil Goutham says:
      
      ====================
      octeontx2-af: Cleanup changes
      
      These patches cleanup AF driver by removing unnecessary function
      exports and cleanup repititive logic.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3d5e561
    • Sunil Goutham's avatar
      octeontx2-af: Cleanup nixlf and blkaddr retrieval logic · 52ccbdac
      Sunil Goutham authored
      Cleanedup repititive nixlf and blkaddr retrieving logic
      is various mailbox handlers throughout the rvu_nix.c file.
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52ccbdac
    • Sunil Goutham's avatar
      octeontx2-af: Cleanup CGX config permission checks · 6fd2a71b
      Sunil Goutham authored
      Most of the CGX register config is restricted to mapped RVU PFs,
      this patch cleans up these permission checks spread across
      the rvu_cgx.c file by moving the checks to a common fn().
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6fd2a71b
    • Sunil Goutham's avatar
      octeontx2-af: Remove unnecessary export symbols in CGX driver · 07a835d9
      Sunil Goutham authored
      Since CGX driver and AF driver are built into a single module
      the export symbols in CGX driver are not needed. This patch
      gets rid of them.
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07a835d9
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2020-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · d631f96d
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      This series adds two moderate updates and some misc small patches to
      mlx5 driver.
      
      1) From Aya, Add the missing devlink health dump callbacks support for
      both rx and tx health reporters.
      
      First patch of the series is extending devlink API to set binary fmsg
      data.
      
      All others patches in the series are adding the mlx5 devlink health
      callbacks support and the needed FW commands.
      
      2) Also from Aya, Support for FEC modes based on 50G per lane links.
      Part of this series, Aya adds one missing link mode define "FEC_LLRS"
      to include/uapi/linux/ethtool.h.
      
      3) From Joe, Use proper logging and tracing line terminations
      
      4) From Christophe, Remove a useless 'drain_workqueue()'
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d631f96d
    • Christophe JAILLET's avatar
      net/mlx5: Remove a useless 'drain_workqueue()' call in 'mlx5e_ipsec_cleanup()' · 0120936a
      Christophe JAILLET authored
      'destroy_workqueue()' already calls 'drain_workqueue()', there is no need
      to call it explicitly.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      0120936a
    • Aya Levin's avatar
      net/mlx5e: Add support for FEC modes based on 50G per lane links · b5ede32d
      Aya Levin authored
      Introduce new FEC modes:
      - RS-FEC-(544,514)
      - LL_RS-FEC-(272,257+1)
      Add support in ethtool for set and get callbacks for the new modes
      above. While RS-FEC-(544,514) is mapped to exsiting RS FEC mode,
      LL_RS-FEC-(272,257+1) is mapped to a new ethtool link mode: LL-RS.
      
      Add support for FEC on 50G per lane link modes up to 400G. The new link
      modes uses a u16 fields instead of u8 fields for the legacy link modes.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      b5ede32d
    • Aya Levin's avatar
      ethtool: Add support for low latency RS FEC · f623e597
      Aya Levin authored
      Add support for low latency Reed Solomon FEC as LLRS.
      
      The LL-FEC is defined by the 25G/50G ethernet consortium,
      in the document titled "Low Latency Reed Solomon Forward Error Correction"
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      CC: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      f623e597
    • Aya Levin's avatar
      net/mlxe5: Separate between FEC and current speed · 3c19208e
      Aya Levin authored
      FEC mode is per link type, not necessary per speed. This patch access
      FEC register by link modes instead of speeds. This patch will allow
      further enhacment of link modes supporting FEC with the same speed
      (different lane type).
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      3c19208e
    • Aya Levin's avatar
      net/mlx5e: Advertise globaly supported FEC modes · 2132b71f
      Aya Levin authored
      Ethtool advertise supported link modes on an interface. Per each FEC
      mode, query if there is a link type which supports it. If so, add this
      FEC mode to the supported FEC modes list. Prior to this patch, ethtool
      advertised only the supported FEC modes on the current link type.
      Add an explicit mapping between internal FEC modes and ethtool link mode
      bits. With this change, adding new FEC modes in the downstream patch
      would be easier.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      2132b71f
    • Aya Levin's avatar
      net/mlx5e: Enforce setting of a single FEC mode · 4bd9d507
      Aya Levin authored
      Ethtool command allow setting of several FEC modes in a single set
      command. The driver can only set a single FEC mode at a time. With this
      patch driver will reply not-supported on setting several FEC modes.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      4bd9d507
    • Aya Levin's avatar
      net/mlx5e: Set FEC to auto when configured mode is not supported · 511aa2aa
      Aya Levin authored
      When configuring FEC mode, driver tries to set it for all available
      link types. If a link type doesn't support a FEC mode, set this link
      type to auto (FW best effort). Prior to this patch, when a link type
      didn't support a FEC mode is was set to no FEC.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      511aa2aa
    • Joe Perches's avatar
      mlx5: Use proper logging and tracing line terminations · b21aef7e
      Joe Perches authored
      netdev_err should use newline termination but mlx5_health_report
      is used in a trace output function devlink_health_report where
      no newline should be used.
      
      Remove the newlines from a couple formats and add a format string
      of "%s\n" to the netdev_err call to not directly output the
      logging string.
      
      Also use snprintf to avoid any possible output string overrun.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      b21aef7e
    • Aya Levin's avatar
      net/mlx5e: Support dump callback in RX reporter · 0f56d3c5
      Aya Levin authored
      Add support for SQ's FW dump on RX reporter's events. Use Resource dump
      API to retrieve the relevant data: RX slice, RQ dump, RX buffer and
      ICOSQ dump (depends on the error). Wrap it in formatted messages and
      store the binary output in devlink core.
      
      Example:
      $ devlink health dump show pci/0000:00:0b.0 reporter rx
      RX Slice:
         data:
           00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
           22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
           00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
           ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
           00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
           22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
           00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
           ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
           00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
        RQs:
          RQ:
            rqn: 1512
            data:
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
          RQ:
            rqn: 1517
            data:
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
      
      $ devlink health dump show pci/0000:00:0b.0 reporter rx -jp
      {
          "RX Slice": {
          	"data":[ 0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,128,0,1,0,0,0,0,173,222]
          },
          "RQs": [ {
                  "RQ": {
                      "index": 1512,
                      "data": [ 0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,128,0,1,0,0,0,0,173,222]
                  }
              },{
                  "RQ": {
                      "index": 1517,
                      "data": [ 0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,128,0,1,0,0,0,0,173]
                  }
              } ]
      }
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      0f56d3c5
    • Aya Levin's avatar
      net/mlx5e: Support dump callback in TX reporter · 5f29458b
      Aya Levin authored
      Add support for SQ's FW dump on TX reporter's events. Use Resource dump
      API to retrieve the relevant data: SX slice, SQ dump and SQ buffer. Wrap
      it in formatted messages and store the binary output in devlink core.
      
      Example:
      $ devlink health dump show pci/0000:00:0b.0 reporter tx
      SX Slice:
         data:
           00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
           22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
           00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
           ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
           00 02 01 00 00 00 00 80 00 01 00 00 00 00 ad de
           22 01 00 00 00 00 ad de 00 20 40 90 81 88 ff ff
           00 00 00 00 00 00 00 00 15 00 15 00 00 00 00 00
           ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
           00 00 00 00 00 00 00 80 81 ae 41 06 00 ea ff ff
        SQs:
          SQ:
            index: 1511
            data:
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 02 01 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 20 40 90 81 88 ff ff
              00 00 00 00 00 00 00 00 15 00 15 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 80 81 ae 41 06 00 ea ff ff
          SQ:
            index: 1516
            data:
              00 00 00 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 02 01 00 00 00 00 80 00 01 00 00 00 00 ad de
              22 01 00 00 00 00 ad de 00 20 40 90 81 88 ff ff
              00 00 00 00 00 00 00 00 15 00 15 00 00 00 00 00
              ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00
              00 00 00 00 00 00 00 80 81 ae 41 06 00 ea ff ff
      
      $ devlink health dump show pci/0000:00:0b.0 reporter tx -jp
      {
          "SX Slice": {
          	"data": [ 0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,32,64,144,129,136,255,255,0,0,0,0,0,0,0,0,21,0,21,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,129,174,65,6,0,234,255,255],
          	},
          "SQs": [ {
                  "SQ": {
                      "index": 1511,
                      "data": [ 0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,32,64,144,129,136,255,255,0,0,0,0,0,0,0,0,21,0,21,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,129,174,65,6,0,234,255,255]
                  }
              },{
                  "SQ": {
                      "index": 1516,
                      "data": [ 0,0,0,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,128,0,1,0,0,0,0,173,222,34,1,0,0,0,0,173,222,0,32,64,144,129,136,255,255,0,0,0,0,0,0,0,0,21,0,21,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,129,174,65,6,0,234,255,255]
                  }
              } ]
      }
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      5f29458b
    • Aya Levin's avatar
      net/mlx5e: Gather reporters APIs together · 0a56be3c
      Aya Levin authored
      Assemble all the API's to ease insertion of dump callbacks in the
      following patches in the set.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      0a56be3c
    • Aya Levin's avatar
      net/mlx5: Add support for resource dump · 12206b17
      Aya Levin authored
      On driver load:
      - Initialize resource dump data structure and memory access tools (mkey
        & pd).
      - Read the resource dump's menu which contains the FW segment
        identifier. Each record is identified by the segment name (ASCII).
      
      During the driver's course of life, users (like reporters) may request
      dumps per segment. The user should create a command providing the
      segment identifier (SW enumeration) and command keys. In return, the
      user receives a command context. In order to receive the dump, the user
      should supply the command context and a memory (aligned to a PAGE) on
      which the dump content will be written. Since the dump may be larger
      than the given memory, the user may resubmit the command until received
      an indication of end-of-dump. It is the user's responsibility to destroy
      the command.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      12206b17
    • Aya Levin's avatar
      devlink: Force enclosing array on binary fmsg data · 573ed90a
      Aya Levin authored
      Add a new API for start/end binary array brackets [] to force array
      around binary data as required from JSON. With this restriction, re-open
      API to set binary fmsg data.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      573ed90a
  3. 18 Feb, 2020 8 commits
    • Edward Cree's avatar
      sfc: elide assignment of skb · 00796b92
      Edward Cree authored
      Instead of assigning skb = segments before the loop, just pass
       segments directly as the first argument to skb_list_walk_safe().
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00796b92
    • Fabio Estevam's avatar
      net: fec: Prevent unbind operation · 272bb0e9
      Fabio Estevam authored
      After performing an unbind/bind operation the network is no longer
      functional on i.MX6 (which has a single FEC instance):
      
      # echo 2188000.ethernet > /sys/bus/platform/drivers/fec/unbind
      # echo 2188000.ethernet > /sys/bus/platform/drivers/fec/bind
      [   10.756519] pps pps0: new PPS source ptp0
      [   10.792626] libphy: fec_enet_mii_bus: probed
      [   10.799330] fec 2188000.ethernet eth0: registered PHC device 1
      # udhcpc -i eth0
      udhcpc: started, v1.31.1
      [   14.985211] fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
      [   14.993140] libphy: PHY fixed-0:00 not found
      [   14.997643] fec 2188000.ethernet eth0: could not attach to PHY
      
      On SoCs with two FEC instances there are some cases where one FEC instance
      depends on the other one being present. One such example is i.MX28, which
      has the following FEC dependency as noted in the comments:
      
      	/*
      	 * The i.MX28 dual fec interfaces are not equal.
      	 * Here are the differences:
      	 *
      	 *  - fec0 supports MII & RMII modes while fec1 only supports RMII
      	 *  - fec0 acts as the 1588 time master while fec1 is slave
      	 *  - external phys can only be configured by fec0
      	 *
      	 * That is to say fec1 can not work independently. It only works
      	 * when fec0 is working. The reason behind this design is that the
      	 * second interface is added primarily for Switch mode.
      	 *
      	 * Because of the last point above, both phys are attached on fec0
      	 * mdio interface in board design, and need to be configured by
      	 * fec0 mii_bus.
      	 */
      
      Prevent the unbind operation to avoid these issues.
      Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      272bb0e9
    • YueHaibing's avatar
      net: ena: remove set but not used variable 'hash_key' · b182a667
      YueHaibing authored
      drivers/net/ethernet/amazon/ena/ena_com.c: In function ena_com_hash_key_allocate:
      drivers/net/ethernet/amazon/ena/ena_com.c:1070:50:
       warning: variable hash_key set but not used [-Wunused-but-set-variable]
      
      commit 6a4f7dc8 ("net: ena: rss: do not allocate key when not supported")
      introduced this, but not used, so remove it.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b182a667
    • Gustavo A. R. Silva's avatar
      net: netlink: Replace zero-length array with flexible-array member · 2b738124
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b738124
    • Gustavo A. R. Silva's avatar
      net: switchdev: Replace zero-length array with flexible-array member · fbfc8502
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbfc8502
    • Gustavo A. R. Silva's avatar
      bpf, sockmap: Replace zero-length array with flexible-array member · 45a4296b
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45a4296b
    • Gustavo A. R. Silva's avatar
      NFC: digital: Replace zero-length array with flexible-array member · 9814428a
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9814428a
    • Gustavo A. R. Silva's avatar
      net: usb: cdc-phonet: Replace zero-length array with flexible-array member · dc3cc347
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc3cc347
  4. 17 Feb, 2020 2 commits