1. 03 Jul, 2020 20 commits
    • tannerlove's avatar
      selftests/net: add ipv6 test coverage in rxtimestamp test · b0d754ef
      tannerlove authored
      Add the options --ipv4, --ipv6 to specify running over ipv4 and/or
      ipv6. If neither is specified, then run both.
      Signed-off-by: default avatarTanner Love <tannerlove@google.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0d754ef
    • David S. Miller's avatar
      Merge branch 'net-ipa-fix-HOLB-timer-register-use' · a2116491
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: fix HOLB timer register use
      
      The function ipa_reg_init_hol_block_timer_val() generates the value
      to write into the HOL_BLOCK_TIMER endpoint configuration register,
      to represent a given timeout value (in microseconds).  It only
      supports a timer value of 0 though, in part because that's
      sufficient, but mainly because there was some confusion about
      how the register is formatted in newer hardware.
      
      I got clarification about the register format, so this series fixes
      ipa_reg_init_hol_block_timer_val() to work for any supported delay
      value.
      
      The delay is based on the IPA core clock, so determining the value
      to write for a given period requires access to the current core
      clock rate.  So the first patch just creates a new function to
      provide that.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2116491
    • Alex Elder's avatar
      net: ipa: fix HOLB timer calculation · f13a8c31
      Alex Elder authored
      For IPA v4.2, the exact interpretation of the register that defines
      the timeout for avoiding head-of-line blocking was a little unclear.
      We're only assigning a 0 timeout to it right now, so that wasn't
      very important.  But now that I know how it's supposed to work, I'm
      fixing it.
      
      The register represents a tick counter, where each tick is equal to
      128 IPA core clock cycles.  For IPA v3.5.1, the register contains
      a simple counter value.  But for IPA v4.2, the register contains two
      fields, base and scale, which approximate the tick counter as:
          ticks = base << scale
      The base and scale values to use for a given tick count are computed
      using clever bit operations, and measures are taken to make the
      resulting time period as close as possible to that requested.
      
      There's no need for ipa_endpoint_init_hol_block_timer() to return
      an error, so change its return type to void.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f13a8c31
    • Alex Elder's avatar
      net: ipa: introduce ipa_clock_rate() · 78b348f3
      Alex Elder authored
      Create a new function that returns the current rate of the IPA core
      clock.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78b348f3
    • Willem de Bruijn's avatar
      ipv6/ping: set skb->mark on icmpv6 sockets · cd8700e4
      Willem de Bruijn authored
      IPv6 ping sockets route based on fwmark, but do not yet set skb->mark.
      Add this. IPv4 ping sockets also do both.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd8700e4
    • Daniel Drown's avatar
      net/xen-netfront: add kernel TX timestamps · 91ffb9d3
      Daniel Drown authored
      This adds kernel TX timestamps to the xen-netfront driver.  Tested with chrony
      on an AWS EC2 instance.
      Signed-off-by: default avatarDaniel Drown <dan-netdev@drown.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      91ffb9d3
    • Florian Fainelli's avatar
      net: bcmgenet: Allow changing carrier from user-space · 47ff6154
      Florian Fainelli authored
      The GENET driver interfaces with internal MoCA interface as well as
      external MoCA chips like the BCM6802/6803 through a fixed link
      interface. It is desirable for the mocad user-space daemon to be able to
      control the carrier state based upon out of band messages that it
      receives from the MoCA chip.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      47ff6154
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2020-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · de2afdca
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2020-07-02
      
      Rx and Tx devlink health reporters enhancements.
      
      1) Code cleanup
      2) devlink output format improvements
      3) Print more useful info on devlink health diagnose output
      4) TX timeout recovery, on a single SQ recover failure, stop the loop
      and reset all rings (re-open netdev).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de2afdca
    • Aya Levin's avatar
      net/mlx5e: Enhance TX timeout recovery · e6205564
      Aya Levin authored
      Upon a TX timeout handle, if the TX reporter was not able to recover
      from the error, reopen the channels. If tried to reopen channels, do not
      loop over TX queues for timeout.
      
      With that, the reporters state and separation will better
      expose the driver's state.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      e6205564
    • Aya Levin's avatar
      net/mlx5e: Enhance ICOSQ data on RX reporter's diagnose · b8492112
      Aya Levin authored
      When the RQ is in striding RQ mode, it uses the ICOSQ as a helper queue.
      In this mode, RX reporter dumps more info about the ICOSQ and its
      related CQ.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
      RQs:
          channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7
          CQ:
            cqn: 1032 HW status: 0 ci: 0 size: 1024
          EQ:
            eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
          ICOSQ:
            sqn: 2411 HW state: 1 cc: 74 pc: 74 WQE size: 128
            CQ:
              cqn: 1029 cc: 8 size: 128
          channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7
          CQ:
            cqn: 1036 HW status: 0 ci: 0 size: 1024
          EQ:
            eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
          ICOSQ:
            sqn: 2416 HW state: 1 cc: 74 pc: 74 WQE size: 128
            CQ:
              cqn: 1033 cc: 8 size: 128
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      b8492112
    • Aya Levin's avatar
      net/mlx5e: Add EQ info to TX/RX reporter's diagnose · 56837c2a
      Aya Levin authored
      Enhance TX/RX reporter's diagnose to include info about the
      corresponding EQ.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
      RQs:
          channel ix: 0 rqn: 1713 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
           CQ:
             cqn: 1032 HW status: 0 ci: 0 size: 1024
           EQ:
             eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
           channel ix: 1 rqn: 1718 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
           CQ:
             cqn: 1036 HW status: 0 ci: 0 size: 1024
           EQ:
             eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx
      Common Config:
          SQ:
            stride size: 64 size: 1024
            CQ:
              stride size: 64 size: 1024
      SQs:
         channel ix: 0 tc: 0 txq ix: 0 sqn: 1712 HW state: 1 stopped: false cc: 91 pc: 91
         CQ:
           cqn: 1030 HW status: 0 ci: 91 size: 1024
         EQ:
           eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
         channel ix: 1 tc: 0 txq ix: 1 sqn: 1717 HW state: 1 stopped: false cc: 0 pc: 0
         CQ:
           cqn: 1034 HW status: 0 ci: 0 size: 1024
         EQ:
           eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      56837c2a
    • Aya Levin's avatar
      net/mlx5e: Enhance CQ data on diagnose output · 3c9d1699
      Aya Levin authored
      Add CQ's consumer index and size to the CQ's diagnose output retruved on
      RX/TX reporter diadgnose.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
      RQs:
          channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
          CQ:
            cqn: 1032 HW status: 0 ci: 0 size: 1024
          channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
          CQ:
            cqn: 1036 HW status: 0 ci: 0 size: 1024
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx
      Common Config:
          SQ:
            stride size: 64 size: 1024
            CQ:
              stride size: 64 size: 1024
      SQs:
          channel ix: 0 tc: 0 txq ix: 0 sqn: 2412 HW state: 1 stopped: false cc: 0 pc: 0
          CQ:
            cqn: 1030 HW status: 0 ci: 0 size: 1024
          channel ix: 1 tc: 0 txq ix: 1 sqn: 2417 HW state: 1 stopped: false cc: 5 pc: 5
          CQ:
            cqn: 1034 HW status: 0 ci: 5 size: 1024
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      3c9d1699
    • Aya Levin's avatar
      net/mlx5e: Rename reporter's helpers · d5cbedd7
      Aya Levin authored
      Change prefix to match resident file:
      %s/mlx5e_reporter_cq_diagnose/mlx5e_health_cq_diag_fmsg
      %s/mlx5e_reporter_cq_common_diagnose/mlx5e_health_cq_common_diag_fmsg
      %s/mlx5e_reporter_named_obj_nest_start/mlx5e_health_fmsg_named_obj_nest_start
      %s/mlx5e_reporter_named_obj_nest_end/mlx5e_health_fmsg_named_obj_nest_end
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      d5cbedd7
    • Aya Levin's avatar
      net/mlx5e: Add helper to get the RQ WQE counter · de6c6ab7
      Aya Levin authored
      Add a helper which retrieves the RQ's WQE counter. Use this helper in
      the RX reporter diagnose callback.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
        RQ:
           type: 2 stride size: 2048 size: 8
           CQ:
            stride size: 64 size: 1024
      RQs:
         channel ix: 0 rqn: 2113 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
          cqn: 1032 HW status: 0
         channel ix: 1 rqn: 2118 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
          cqn: 1036 HW status: 0
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      de6c6ab7
    • Aya Levin's avatar
      net/mlx5e: Add helper to get RQ WQE's head · fc42d0de
      Aya Levin authored
      Add helper which retrieves the RQ WQE's head. Use this helper in RX
      reporter diagnose callback.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      fc42d0de
    • Aya Levin's avatar
      net/mlx5e: Move RQ helpers to txrx.h · 5d95c816
      Aya Levin authored
      Use txrx.h to contain helper function regarding TX/RX. In the coming
      patches, I will add more RQ helpers.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      5d95c816
    • Aya Levin's avatar
      net/mlx5e: Align RX/TX reporters diagnose output format · 4537f524
      Aya Levin authored
      Change the hierarchy of the RX reporter 'Common config' in the diagnose
      output to match the 'Common config' of the TX reporter which reflects
      that CQ is a helper to the traffic queues.
      
      Before:
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
          CQ:
            stride size: 64 size: 1024
          RQs:
          ...
      
      After:
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
          RQs:
          ...
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      4537f524
    • Aya Levin's avatar
      net/mlx5e: Remove redundant RQ state query · b9961af7
      Aya Levin authored
      When received a CQE error, the driver inspect the syndrome given by the
      firmware. RQ recovery is initiated only as a result of a fatal syndrome;
      syndrome which set the RQ into an error state. Hence no need to query
      the RQ state at the beginning of the recovery process. Add additional
      debug prints before recovering.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      b9961af7
    • Aya Levin's avatar
      net/mlx5e: Add a flush timeout define · e74e28ae
      Aya Levin authored
      During queue's recovery, driver waits for flush. The flush timeout is
      set to 2 seconds. Add a define for this value for the benefit of RX and
      TX reporters.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      e74e28ae
    • Eran Ben Elisha's avatar
      net/mlx5e: Change reporters create functions to return void · b3ea4c4f
      Eran Ben Elisha authored
      Creation of devlink health reporters is not fatal for mlx5e instance load.
      In case of error in reporter's creation, the return value is ignored.
      Change all reporters creation functions to return void.
      
      In addition, with this change, a failure in creating a reporter, will not
      prevent the driver from trying to create the next reporter in the list.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarAya Levin <ayal@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      b3ea4c4f
  2. 02 Jul, 2020 20 commits