1. 11 Aug, 2016 21 commits
  2. 10 Aug, 2016 2 commits
  3. 09 Aug, 2016 4 commits
  4. 08 Aug, 2016 13 commits
    • Nicolas Iooss's avatar
      RDS: add __printf format attribute to error reporting functions · 6cdaf03f
      Nicolas Iooss authored
      This is helpful to detect at compile-time errors related to format
      strings.
      Signed-off-by: default avatarNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cdaf03f
    • Raju Lakkaraju's avatar
      Microsemi VSC 8531/41 PHY Driver · d50736a8
      Raju Lakkaraju authored
      Hello,
      
      I added all review comments and re-sending for review.
      
      >From a5017f5878a92d2acec86a6a29b1498c457cb73a Mon Sep 17 00:00:00 2001
      From: Nagaraju Lakkaraju <Raju.Lakkaraju@microsemi.com>
      Date: Wed, 3 Aug 2016 18:28:24 +0530
      Subject: [PATCH v2] net: phy: Add drivers for Microsemi PHYs
      Signed-off-by: default avatarNagaraju Lakkaraju <Raju.Lakkaraju@microsemi.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d50736a8
    • Julia Lawall's avatar
      net/fsl: use of_property_read_bool · 07bf2e11
      Julia Lawall authored
      Use of_property_read_bool to check for the existence of a property.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e1,e2,x;
      @@
      -	if (of_get_property(e1,e2,NULL))
      -		x = true;
      -	else
      -		x = false;
      +	x = of_property_read_bool(e1,e2);
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07bf2e11
    • Haiyang Zhang's avatar
      hv_netvsc: Add handler for physical link speed change · 7f5d5af0
      Haiyang Zhang authored
      On Hyper-V host 2016 and later, VMs gets an event message of the physical
      link speed when vSwitch is changed. This patch handles this message, so
      the updated link speed can be reported by ethtool.
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f5d5af0
    • Haiyang Zhang's avatar
      hv_netvsc: Add query for initial physical link speed · b37879e6
      Haiyang Zhang authored
      The physical link speed value will be reported by ethtool command.
      The real speed is available from Windows 2016 host or later.
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b37879e6
    • Grygorii Strashko's avatar
      net: ethernet: ti: cpdma: remove used_desc counter · aeec3021
      Grygorii Strashko authored
      The struct cpdma_desc_pool->used_desc field can be safely removed from
      CPDMA driver (and hot patch) because used_descs counter is used just
      for pool consistency check at CPDMA deinitialization and now this
      check can be re-implemnted using gen_pool_size(pool->gen_pool) !=
      gen_pool_avail(pool->gen_pool).
      More over, this will allow to get rid of warnings in
      cpdma_desc_pool_destro()-> WARN_ON(pool->used_desc) which may happen
      because the used_descs is used unprotected, since CPDMA has been
      switched to use genalloc, and may get wrong values on SMP.
      
      Hence, remove used_desc from struct cpdma_desc_pool.
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Reviewed-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aeec3021
    • Michal Soltys's avatar
      net/sched/sch_hfsc.c: remove unused cl_myfadj · 37088f61
      Michal Soltys authored
      The code using this variable has been commented out in the past as it
      was causing issues in upperlimited link-sharing scenarios.
      Signed-off-by: default avatarMichal Soltys <soltys@ziu.info>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37088f61
    • Michal Soltys's avatar
      net/sched/sch_hfsc.c: keep fsc and virtual times in sync; fix an old bug · 678a6241
      Michal Soltys authored
      This patch simplifies how we update fsc and calculate vt from it - while
      keeping the expected functionality identical with how hfsc behaves
      curently. It also fixes a certain issue introduced with
      a very old patch.
      
      The idea is, that instead of correcting cl_vt before fsc curve update
      (rtsc_min) and correcting cl_vt after calculation (rtsc_y2x) to keep
      cl_vt local to the current period - we can simply rely on virtual times
      and curve values always being in sync - analogously to how rsc and usc
      function, except that we use virtual time here.
      
      Why hasn't it been done since the beginning this way ? The likely scenario
      (basing on the code trying to correct curves whenever possible) was to
      keep the virtual times as small as possible - as they have tendency to
      "gallop" forward whenever their siblings and other fair sharing
      subtrees are idling. On top of that, current code is subtly bugged, so
      cumulative time (without any corrections) is always kept and used in
      init_vf() when a new backlog period begins (using cl_cvtoff).
      
      Is cumulative value safe ? Generally yes, though corner cases are easy
      to create. For example consider:
      
      1gbit interface
      some 100kbit leaf, everything else idle
      
      With current tick (64ns) 1s is 15625000 ticks, but the leaf is alone and
      it's virtual time, so in reality it's 10000 times more. ITOW 38 bits are
      needed to hold 1 second. 54 - 1 day, 59 - 1 month, 63 - 1 year (all
      logarithms rounded up). It's getting somewhat dangerous, but also
      requires setup excusing this kind of values not mentioning permanently
      backlogged class for a year. In near most extreme case (10gbit, 10kbit
      leaf), we have "enough" to hold ~13.6 days in 64 bits.
      
      Well, the issue remains mostly theoretical and cl_cvtoff has been
      working fine for all those years. Sensible configuration are de-facto
      immune to this issue, and not so sensible can solve it with a cronjob
      and its period inversely proportional to the insanity of such setup =)
      
      Now let's explain the subtle bug mentioned earlier.
      
      The issue is related to how offsets are kept and how we calculate
      virtual times and update fair service curve(s). The issue itself is
      subtle, but easy to observe with long m1 segments. It was introduced in
      rather old patch:
      
      Commit 99296150: "[NET_SCHED]: O(1) children vtoff adjustment
      in HFSC scheduler"
      
      (available in git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git)
      
      Originally when a new backlog period was started, cl_vtoff of each
      sibling was updated with cl_cvtmax from past period - naturally moving
      all cl_vt to proper starting point. That patch adjusted it so cumulative
      offset is kept in the parent, and there is no need for traversing the
      list (as any subsequent child activation derives new vt from already
      active sibling(s)).
      
      But with this change, cl_vtoff (of each sibling) is no longer persistent
      across the inactivity periods, as it's calculated from parent's
      cl_cvtoff on a new backlog period, conflicting with the following curve
      correction from the previous period:
      
      if (cl->cl_virtual.x == vt) {
              cl->cl_virtual.x -= cl->cl_vtoff;
      	cl->cl_vtoff = 0;
      }
      
      This essentially tries to keep curve as if it was local to the period
      and resets cl_vtoff (cumulative vt offset of the class) to 0 when
      possible (read: when we have an intersection or if a new curve is below
      the old one). But then it's recalculated from cl_cvtoff on next active
      period.  Then rtsc_min() call preceding the above if() doesn't really
      do what we expect it to do in such scenario - as it calculates the
      minimum of corrected curve (from the previous backlog period) and the
      new uncorrected curve (with offset derived from cl_cvtoff).
      
      Example:
      
      tc class add dev $ife parent 1:0 classid 1:1  hfsc ls m2 100mbit ul m2 100mbit
      tc class add dev $ife parent 1:1 classid 1:10 hfsc ls m1 80mbit d 10s m2 20mbit
      tc class add dev $ife parent 1:1 classid 1:11 hfsc ls m2 20mbit
      
      start B, keep it backlogged, let it run 6s (30s worth of vt as A is idle)
      pause B briefly to force cl_cvtoff update in parent (whole 1:1 going idle)
      start A, let it run 10s
      pause A briefly to force rtsc_min()
      
      At this point we would expect A to continue at 20mbit after a brief
      moment of 80mbit. But instead A will use 80mbit for full 10s again. It's
      the effect of first correcting A (during 'start A'), and then - after
      unpausing - calculating rtsc_min() from old corrected and new uncorrected
      curve.
      
      The patch fixes this bug and keepis vt and fsc in sync (virtual times
      are cumulative, not local to the backlog period).
      Signed-off-by: default avatarMichal Soltys <soltys@ziu.info>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      678a6241
    • Wei Yongjun's avatar
      qed: Use DEFINE_SPINLOCK() for spinlock · 0caf5b26
      Wei Yongjun authored
      spinlock can be initialized automatically with DEFINE_SPINLOCK()
      rather than explicitly calling spin_lock_init().
      Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
      Acked-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0caf5b26
    • Hangbin Liu's avatar
      net/multicast: should not send source list records when have filter mode change · a052517a
      Hangbin Liu authored
      Based on RFC3376 5.1 and RFC3810 6.1
      
         If the per-interface listening change that triggers the new report is
         a filter mode change, then the next [Robustness Variable] State
         Change Reports will include a Filter Mode Change Record.  This
         applies even if any number of source list changes occur in that
         period.
      
         Old State         New State         State Change Record Sent
         ---------         ---------         ------------------------
         INCLUDE (A)       EXCLUDE (B)       TO_EX (B)
         EXCLUDE (A)       INCLUDE (B)       TO_IN (B)
      
      So we should not send source-list change if there is a filter-mode change.
      
      Here are two scenarios:
      1. Group deleted and filter mode is EXCLUDE, which means we need send a
         TO_IN { }.
      2. Not group deleted, but has pcm->crcount, which means we need send a
         normal filter-mode-change.
      
      At the same time, if the type is ALLOW or BLOCK, and have psf->sf_crcount,
      we stop add records and decrease sf_crcount directly
      
      Reference: https://www.ietf.org/mail-archive/web/magma/current/msg01274.htmlSigned-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a052517a
    • Philippe Reynes's avatar
      net: ethernet: marvell: mvneta: use new api ethtool_{get|set}_link_ksettings · 013ad40d
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move the mvneta driver to new api {get|set}_link_ksettings.
      
      We use the generic function phy_ethtool_get_link_ksettings,
      and update old mvneta_ethtool_set_settings to the new api.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      013ad40d
    • Philippe Reynes's avatar
      net: ethernet: marvell: mvneta: use phydev from struct net_device · c6c022e3
      Philippe Reynes authored
      The private structure contain a pointer to phydev, but the structure
      net_device already contain such pointer. So we can remove the pointer
      phy_dev in the private structure, and update the driver to use the
      one contained in struct net_device.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6c022e3
    • Philippe Reynes's avatar
      net: ethernet: greth: use phy_ethtool_{get|set}_link_ksettings · 72582fdb
      Philippe Reynes authored
      There are two generics functions phy_ethtool_{get|set}_link_ksettings,
      so we can use them instead of defining the same code in the driver.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72582fdb