1. 19 11月, 2018 8 次提交
  2. 18 11月, 2018 29 次提交
  3. 17 11月, 2018 3 次提交
    • D
      Merge branch 'net-sched-gred-introduce-per-virtual-queue-attributes' · b8b9618a
      David S. Miller 提交于
      Jakub Kicinski says:
      
      ====================
      net: sched: gred: introduce per-virtual queue attributes
      
      This series updates the GRED Qdisc.  The Qdisc matches nfp offload very
      well, but before we can offload it there are a number of improvements
      to make.
      
      First few patches add extack messages to the Qdisc and pass extack
      to netlink validation.
      
      Next a new netlink attribute group is added, to allow GRED to be
      extended more easily.  Currently GRED passes C structures as attributes,
      and even an array of C structs for virtual queue configuration.  User
      space has hard coded the expected length of that array, so adding new
      fields is not possible.
      
      New two-level attribute group is added:
      
        [TCA_GRED_VQ_LIST]
          [TCA_GRED_VQ_ENTRY]
            [TCA_GRED_VQ_DP]
            [TCA_GRED_VQ_FLAGS]
            [TCA_GRED_VQ_STAT_*]
          [TCA_GRED_VQ_ENTRY]
            [TCA_GRED_VQ_DP]
            [TCA_GRED_VQ_FLAGS]
            [TCA_GRED_VQ_STAT_*]
          [TCA_GRED_VQ_ENTRY]
             ...
      
      Statistics are dump only. Patch 4 switches the byte counts to be 64 bit,
      and patch 5 introduces the new stats attributes for dump.  Patch 6
      switches RED flags to be per-virtual queue, and patch 7 allows them
      to be dumped and set at virtual queue granularity.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8b9618a
    • J
      net: sched: gred: allow manipulating per-DP RED flags · 72111015
      Jakub Kicinski 提交于
      Allow users to set and dump RED flags (ECN enabled and harddrop)
      on per-virtual queue basis.  Validation of attributes is split
      from changes to make sure we won't have to undo previous operations
      when we find out configuration is invalid.
      
      The objective is to allow changing per-Qdisc parameters without
      overwriting the per-vq configured flags.
      
      Old user space will not pass the TCA_GRED_VQ_FLAGS attribute and
      per-Qdisc flags will always get propagated to the virtual queues.
      
      New user space which wants to make use of per-vq flags should set
      per-Qdisc flags to 0 and then configure per-vq flags as it
      sees fit.  Once per-vq flags are set per-Qdisc flags can't be
      changed to non-zero.  Vice versa - if the per-Qdisc flags are
      non-zero the TCA_GRED_VQ_FLAGS attribute has to either be omitted
      or set to the same value as per-Qdisc flags.
      
      Update per-Qdisc parameters:
      per-Qdisc | per-VQ | result
              0 |      0 | all vq flags updated
      	0 |  non-0 | error (vq flags in use)
          non-0 |      0 | -- impossible --
          non-0 |  non-0 | all vq flags updated
      
      Update per-VQ state (flags parameter not specified):
         no change to flags
      
      Update per-VQ state (flags parameter set):
      per-Qdisc | per-VQ | result
              0 |   any  | per-vq flags updated
          non-0 |      0 | -- impossible --
          non-0 |  non-0 | error (per-Qdisc flags in use)
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72111015
    • J
      net: sched: gred: store red flags per virtual queue · 25fc1989
      Jakub Kicinski 提交于
      Right now ECN marking and HARD drop (the common RED flags) can only
      be configured for the entire Qdisc.  In preparation for per-vq flags
      store the values in the virtual queue structure.  Setting per-vq
      flags will only be allowed when no flags are set for the entire Qdisc.
      For the new flags we will also make sure undefined bits are 0.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25fc1989