1. 03 Feb, 2019 12 commits
  2. 02 Feb, 2019 17 commits
  3. 01 Feb, 2019 11 commits
    • Stanislav Fomichev's avatar
      selftests/bpf: remove generated verifier/tests.h on 'make clean' · 2a118154
      Stanislav Fomichev authored
      'make clean' is supposed to remove generated files.
      Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      2a118154
    • David S. Miller's avatar
      Merge branch 'devlink-add-device-driver-information-API' · d6b0a01f
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      devlink: add device (driver) information API
      
      fw_version field in ethtool -i does not suit modern needs with 31
      characters being quite limiting on more complex systems.  There is
      also no distinction between the running and flashed versions of
      the firmware.
      
      Since the driver information pertains to the entire device, rather
      than a particular netdev, it seems wise to move it do devlink, at
      the same time fixing the aforementioned issues.
      
      The new API allows exposing the device serial number and versions
      of the components of the card - both hardware, firmware (running
      and flashed).  Driver authors can choose descriptive identifiers
      for the version fields.  A few version identifiers which seemed
      relevant for most devices have been added to the global devlink
      header.
      
      Example:
      $ devlink dev info pci/0000:05:00.0
      pci/0000:05:00.0:
        driver nfp
        serial_number 16240145
        versions:
          fixed:
            board.id AMDA0099-0001
            board.rev 07
            board.vendor SMA
            board.model carbon
          running:
            fw.mgmt: 010156.010156.010156
            fw.cpld: 0x44
            fw.app: sriov-2.1.16
          stored:
            fw.mgmt: 010158.010158.010158
            fw.cpld: 0x44
            fw.app: sriov-2.1.20
      
      Last patch also includes a compat code for ethtool.  If driver
      reports no fw_version via the traditional ethtool API, ethtool
      can call into devlink and try to cram as many versions as possible
      into the 31 characters.
      
      v4:
       - use IS_REACHABLE instead of IS_ENABLED in last patch.
      
      v3 (Jiri):
       - rename various functions and attributes;
       - break out the version helpers per-type;
       - make the compat code parse a dump instead of special casing
         in each helper;
       - move generic version defines to a separate patch.
      
      v2:
       - rebase.
      
      this non-RFC, v3 some would say:
       - add three more versions in the NFP patches;
       - add last patch (ethool compat) - Andrew & Michal.
      
      RFCv2:
       - use one driver op;
       - allow longer serial number;
       - wrap the skb into an opaque request struct;
       - add some common identifier into the devlink header.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6b0a01f
    • Jakub Kicinski's avatar
      ethtool: add compat for devlink info · ddb6e99e
      Jakub Kicinski authored
      If driver did not fill the fw_version field, try to call into
      the new devlink get_info op and collect the versions that way.
      We assume ethtool was always reporting running versions.
      
      v4:
       - use IS_REACHABLE() to avoid problems with DEVLINK=m (kbuildbot).
      v3 (Jiri):
       - do a dump and then parse it instead of special handling;
       - concatenate all versions (well, all that fit :)).
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ddb6e99e
    • Jakub Kicinski's avatar
      nfp: devlink: report the running and flashed versions · 7c908f46
      Jakub Kicinski authored
      Report versions of firmware components using the new NSP command.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7c908f46
    • Jakub Kicinski's avatar
      nfp: nsp: add support for versions command · b9658840
      Jakub Kicinski authored
      Retrieve the FW versions with the new command.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9658840
    • Jakub Kicinski's avatar
      nfp: devlink: report fixed versions · 937a3e26
      Jakub Kicinski authored
      Report information about the hardware.
      
      RFCv2:
       - add defines for board IDs which are likely to be reusable for
         other drivers (Jiri).
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      937a3e26
    • Jakub Kicinski's avatar
      nfp: devlink: report driver name and serial number · 4adba008
      Jakub Kicinski authored
      Report the basic info through new devlink info API.
      
      RFCv2:
       - add driver name;
       - align serial to core changes.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4adba008
    • Jakub Kicinski's avatar
      devlink: add generic info version names · 785bd550
      Jakub Kicinski authored
      Add defines and docs for generic info versions.
      
      v3:
       - add docs;
       - separate patch (Jiri).
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      785bd550
    • Jakub Kicinski's avatar
      devlink: add version reporting to devlink info API · fc6fae7d
      Jakub Kicinski authored
      ethtool -i has a few fixed-size fields which can be used to report
      firmware version and expansion ROM version. Unfortunately, modern
      hardware has more firmware components. There is usually some
      datapath microcode, management controller, PXE drivers, and a
      CPLD load. Running ethtool -i on modern controllers reveals the
      fact that vendors cram multiple values into firmware version field.
      
      Here are some examples from systems I could lay my hands on quickly:
      
      tg3:  "FFV20.2.17 bc 5720-v1.39"
      i40e: "6.01 0x800034a4 1.1747.0"
      nfp:  "0.0.3.5 0.25 sriov-2.1.16 nic"
      
      Add a new devlink API to allow retrieving multiple versions, and
      provide user-readable name for those versions.
      
      While at it break down the versions into three categories:
       - fixed - this is the board/fixed component version, usually vendors
                 report information like the board version in the PCI VPD,
                 but it will benefit from naming and common API as well;
       - running - this is the running firmware version;
       - stored - this is firmware in the flash, after firmware update
                  this value will reflect the flashed version, while the
                  running version may only be updated after reboot.
      
      v3:
       - add per-type helpers instead of using the special argument (Jiri).
      RFCv2:
       - remove the nesting in attr DEVLINK_ATTR_INFO_VERSIONS (now
         versions are mixed with other info attrs)l
       - have the driver report versions from the same callback as
         other info.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc6fae7d
    • Jakub Kicinski's avatar
      devlink: add device information API · f9cf2288
      Jakub Kicinski authored
      ethtool -i has served us well for a long time, but its showing
      its limitations more and more. The device information should
      also be reported per device not per-netdev.
      
      Lay foundation for a simple devlink-based way of reading device
      info. Add driver name and device serial number as initial pieces
      of information exposed via this new API.
      
      v3:
       - rename helpers (Jiri);
       - rename driver name attr (Jiri);
       - remove double spacing in commit message (Jiri).
      RFC v2:
       - wrap the skb into an opaque structure (Jiri);
       - allow the serial number of be any length (Jiri & Andrew);
       - add driver name (Jonathan).
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9cf2288
    • David S. Miller's avatar
      Merge branch 'selftests-Various-fixes' · 26281e2c
      David S. Miller authored
      Petr Machata says:
      
      ====================
      selftests: Various fixes
      
      This patch set contains various fixes whose common denominator is
      improving quality of forwarding and mlxsw selftests.
      
      Most of the fixes are improvements in determinism (such that timing and
      latency don't impact the test performance). These were prompted by
      regular runs of the test suite on a hardware emulator, the performance
      of which is necessarily lower than that of the real device.
      
      Patches #1 (from Ido), #2 and #3 make changes to ping limits.
      
      Patches #4 and #5 add more sleep in places where things need more time
      to finish.
      
      Patches #6 and #7 fix two tests in the suite of mirror-to-gretap tests
      where underlay involves a VLAN device over an 802.1q bridge.
      
      Patches #8, #9 and #10 fix bugs in mirror-to-gretap test where underlay
      involves a LAG device.
      
      Patch #11 fixes a missed RET initialization in mirror-to-gretap flower
      test.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26281e2c