1. 07 Feb, 2019 12 commits
    • Eran Ben Elisha's avatar
      devlink: Add health set command · a1e55ec0
      Eran Ben Elisha authored
      Add devlink health set command, in order to set configuration parameters
      for a specific reporter.
      Supported parameters are:
      - graceful_period: Time interval between auto recoveries (in msec)
      - auto_recover: Determines if the devlink shall execute recover upon
      		receiving error for the reporter
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1e55ec0
    • Eran Ben Elisha's avatar
      devlink: Add health get command · 7afe335a
      Eran Ben Elisha authored
      Add devlink health get command to provide reporter/s data for user space.
      Add the ability to get data per reporter or dump data from all available
      reporters.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7afe335a
    • Eran Ben Elisha's avatar
      devlink: Add health report functionality · c8e1da0b
      Eran Ben Elisha authored
      Upon error discover, every driver can report it to the devlink health
      mechanism via devlink_health_report function, using the appropriate
      reporter registered to it. Driver can pass error specific context which
      will be delivered to it as part of the dump / recovery callbacks.
      
      Once an error is reported, devlink health will do the following actions:
      * A log is being send to the kernel trace events buffer
      * Health status and statistics are being updated for the reporter instance
      * Object dump is being taken and stored at the reporter instance (as long
        as there is no other dump which is already stored)
      * Auto recovery attempt is being done. Depends on:
        - Auto Recovery configuration
        - Grace period vs. Time since last recover
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8e1da0b
    • Eran Ben Elisha's avatar
      devlink: Add health reporter create/destroy functionality · a0bdcc59
      Eran Ben Elisha authored
      Devlink health reporter is an instance for reporting, diagnosing and
      recovering from run time errors discovered by the reporters.
      Define it's data structure and supported operations.
      In addition, expose devlink API to create and destroy a reporter.
      Each devlink instance will hold it's own reporters list.
      
      As part of the allocation, driver shall provide a set of callbacks which
      will be used by devlink in order to handle health reports and user
      commands related to this reporter. In addition, driver is entitled to
      provide some priv pointer, which can be fetched from the reporter by
      devlink_health_reporter_priv function.
      
      For each reporter, devlink will hold a metadata of statistics,
      dump msg and status.
      
      For passing dumps and diagnose data to the user-space, it will use devlink
      fmsg API.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0bdcc59
    • Eran Ben Elisha's avatar
      devlink: Add devlink formatted message (fmsg) API · 1db64e87
      Eran Ben Elisha authored
      Devlink fmsg is a mechanism to pass descriptors between drivers and
      devlink, in json-like format. The API allows the driver to add nested
      attributes such as object, object pair and value array, in addition to
      attributes such as name and value.
      
      Driver can use this API to fill the fmsg context in a format which will be
      translated by the devlink to the netlink message later.
      There is no memory allocation in advance (other than the initial list
      head), and it dynamically allocates messages descriptors and add them to
      the list on the fly.
      
      When it needs to send the data using SKBs to the netlink layer, it
      fragments the data between different SKBs. In order to do this
      fragmentation, it uses virtual nests attributes, to avoid actual
      nesting use which cannot be divided between different SKBs.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1db64e87
    • Moritz Fischer's avatar
      net: phy: fixed_phy: Fix fixed_phy not checking GPIO · 8f289805
      Moritz Fischer authored
      Fix fixed_phy not checking GPIO if no link_update callback
      is registered.
      
      In the original version all users registered a link_update
      callback so the issue was masked.
      
      Fixes: a5597008 ("phy: fixed_phy: Add gpio to determine link up/down.")
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f289805
    • Christian Lamparter's avatar
      net: emac: remove IBM_EMAC_RX_SKB_HEADROOM · 22087d65
      Christian Lamparter authored
      The EMAC driver had a custom IBM_EMAC_RX_SKB_HEADROOM
      Kconfig option that reserved additional skb headroom for RX.
      This patch removes the option and migrates the code
      to use napi_alloc_skb() and netdev_alloc_skb_ip_align()
      in its place.
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22087d65
    • Heiner Kallweit's avatar
      net: phy: improve genphy_c45_read_link · a6e11f6b
      Heiner Kallweit authored
      Let's make genphy_c45_read_link behave the same as genphy_update_link
      and set phydev->link in the function directly. This allows to simplify
      the callers. In addition don't check further devices once we detect
      that at least one device reports link as down.
      
      v2:
      - remove an unused variable
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6e11f6b
    • Ilias Apalodimas's avatar
      net: stmmac: fix ptp timestamping on Rx on gmac4 · 7d8e249f
      Ilias Apalodimas authored
      The current driver only enables Pdelay_Req and Pdelay_Resp when
      HWTSTAMP_FILTER_PTP_V2_EVENT, HWTSTAMP_FILTER_PTP_V1_L4_EVENT or
      HWTSTAMP_FILTER_PTP_V2_L4_EVENT is requested. This results in ptp sync on
      slave mode to report 'received SYNC without timestamp' when using ptp4l.
      
      Although the hardware can support Sync, Pdelay_Req and Pdelay_resp by
      setting bit14 annd bits 17/16 to 01 this leaves Delay_Req timestamps out.
      
      Fix this by enabling all event and general messages timestamps.
      This includes SYNC, Follow_Up, Delay_Req, Delay_Resp, Pdelay_Req,
      Pdelay_Resp and Pdelay_Resp_Follow_Up messages.
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Acked-by: default avatarJose Abreu <joabreu@synopsys.com>
      Tested-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d8e249f
    • Miquel Raynal's avatar
      net: dsa: mv88e6xxx: Prevent suspend to RAM · bcd3d9d9
      Miquel Raynal authored
      On one hand, the mv88e6xxx driver has a work queue called in loop
      which will attempt register accesses after MDIO bus suspension, that
      entirely freezes the platform during suspend.
      
      On the other hand, the DSA core is not ready yet to support suspend to
      RAM operation because so far there is no way to recover reliably the
      switch configuration.
      
      To avoid the kernel to freeze when suspending with a switch driven by
      the mv88e6xxx driver, we choose to prevent the driver suspension and
      in the same way, the whole platform.
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcd3d9d9
    • David S. Miller's avatar
      Merge branch 'for_net-next-5.1/rds-tos-v4' of... · 042a4197
      David S. Miller authored
      Merge branch 'for_net-next-5.1/rds-tos-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux
      
      Santosh Shilimkar says:
      
      ====================
      rds: add tos support
      
      RDS applications make use of tos to classify database traffic.
      This feature has been used in shipping products from 2.6.32 based
      kernels. Its tied with RDS v4.1 protocol version and the compatibility
      gets negotiated as part of connections setup.
      
      Patchset keeps full backward compatibility using existing connection
      negotiation scheme. Currently the feature is exploited by RDMA
      transport and for TCP transport the user tos values are mapped to
      same default class (0).
      
      For RDMA transports, RDMA CM service type API is used to
      set up different SL(service lanes) and the IB fabric is configured
      for tos mapping using Subnet Manager(SL to VL mappings).
      Similarly for ROCE fabric, user priority is mapped with different
      DSCP code points which are associated with different switch queues
      in the fabric.
      
      The original code was developed by Bang Nguyen in downstream kernel back in
      2.6.32 kernel days and it has evolved significantly over period of time.
      
      Thanks to Yanjun for doing testing with various combinations of host like
      v3.1<->v4.1, v4.1.<->v3.1, v4.1 upstream to shipping v4.1 etc etc
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      042a4197
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · e90b1fd8
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2019-02-07
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Add a riscv64 JIT for BPF, from Björn.
      
      2) Implement BTF deduplication algorithm for libbpf which takes BTF type
         information containing duplicate per-compilation unit information and
         reduces it to an equivalent set of BTF types with no duplication and
         without loss of information, from Andrii.
      
      3) Offloaded and native BPF XDP programs can coexist today, enable also
         offloaded and generic ones as well, from Jakub.
      
      4) Expose various BTF related helper functions in libbpf as API which
         are in particular helpful for JITed programs, from Yonghong.
      
      5) Fix the recently added JMP32 code emission in s390x JIT, from Heiko.
      
      6) Fix BPF kselftests' tcp_{server,client}.py to be able to run inside
         a network namespace, also add a fix for libbpf to get libbpf_print()
         working, from Stanislav.
      
      7) Fixes for bpftool documentation, from Prashant.
      
      8) Type cleanup in BPF kselftests' test_maps.c to silence a gcc8 warning,
         from Breno.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e90b1fd8
  2. 06 Feb, 2019 28 commits