1. 04 2月, 2019 14 次提交
  2. 03 2月, 2019 20 次提交
  3. 02 2月, 2019 6 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · beb73559
      David S. Miller 提交于
      Alexei Starovoitov says:
      
      ====================
      pull-request: bpf-next 2019-02-01
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) introduce bpf_spin_lock, from Alexei.
      
      2) convert xdp samples to libbpf, from Maciej.
      
      3) skip verifier tests for unsupported program/map types, from Stanislav.
      
      4) powerpc64 JIT support for BTF line info, from Sandipan.
      
      5) assorted fixed, from Valdis, Jesper, Jiong.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      beb73559
    • A
      Merge branch 'shifts-cleanup' · 5974b7c1
      Alexei Starovoitov 提交于
      Jiong Wang says:
      
      ====================
      NFP JIT back-end is missing several ALU32 logic shifts support.
      
      Also, shifts with shift amount be zero are not handled properly.
      
      This set cleans up these issues.
      ====================
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      5974b7c1
    • J
      nfp: bpf: complete ALU32 logic shift supports · ac7a1717
      Jiong Wang 提交于
      The following ALU32 logic shift supports are missing:
      
        BPF_ALU | BPF_LSH | BPF_X
        BPF_ALU | BPF_RSH | BPF_X
        BPF_ALU | BPF_RSH | BPF_K
      
      For BPF_RSH | BPF_K, it could be implemented using NFP direct shift
      instruction. For the other BPF_X shifts, NFP indirect shifts sequences need
      to be used.
      
      Separate code-gen hook is assigned to each instruction to make the
      implementation clear.
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NJiong Wang <jiong.wang@netronome.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      ac7a1717
    • J
      nfp: bpf: correct the behavior for shifts by zero · db0a4b3b
      Jiong Wang 提交于
      Shifts by zero do nothing, and should be treated as nops.
      
      Even though compiler is not supposed to generate such instructions and
      manual written assembly is unlikely to have them, but they are legal
      instructions and have defined behavior.
      
      This patch correct existing shifts code-gen to make sure they do nothing
      when shift amount is zero except when the instruction is ALU32 for which
      high bits need to be cleared.
      
      For shift amount bigger than type size, already, NFP JIT back-end errors
      out for immediate shift and only low 5 bits will be taken into account for
      indirect shift which is the same as x86.
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NJiong Wang <jiong.wang@netronome.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      db0a4b3b
    • S
      selftests/bpf: remove generated verifier/tests.h on 'make clean' · 2a118154
      Stanislav Fomichev 提交于
      'make clean' is supposed to remove generated files.
      Signed-off-by: NStanislav Fomichev <sdf@google.com>
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      2a118154
    • D
      Merge branch 'devlink-add-device-driver-information-API' · d6b0a01f
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      d6b0a01f