1. 19 Nov, 2018 7 commits
  2. 18 Nov, 2018 29 commits
  3. 17 Nov, 2018 4 commits
    • Jason Wang's avatar
      tuntap: free XDP dropped packets in a batch · f9e06c45
      Jason Wang authored
      Thanks to the batched XDP buffs through msg_control. Instead of
      calling put_page() for each page which involves a atomic operation,
      let's batch them by record the last page that needs to be freed and
      its refcnt count and free them in a batch.
      
      Testpmd(virtio-user + vhost_net) + XDP_DROP shows 3.8% improvement.
      
      Before: 4.71Mpps
      After : 4.89Mpps
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9e06c45
    • Jason Wang's avatar
      vhost_net: mitigate page reference counting during page frag refill · e4dab1e6
      Jason Wang authored
      We do a get_page() which involves a atomic operation. This patch tries
      to mitigate a per packet atomic operation by maintaining a reference
      bias which is initially USHRT_MAX. Each time a page is got, instead of
      calling get_page() we decrease the bias and when we find it's time to
      use a new page we will decrease the bias at one time through
      __page_cache_drain_cache().
      
      Testpmd(virtio_user + vhost_net) + XDP_DROP on TAP shows about 1.6%
      improvement.
      
      Before: 4.63Mpps
      After:  4.71Mpps
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e4dab1e6
    • David S. Miller's avatar
      Merge branch 'net-sched-gred-introduce-per-virtual-queue-attributes' · b8b9618a
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      b8b9618a
    • Jakub Kicinski's avatar
      net: sched: gred: allow manipulating per-DP RED flags · 72111015
      Jakub Kicinski authored
      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: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72111015