Skip to content
Snippets Groups Projects
  1. Jul 03, 2019
    • Stanislav Fomichev's avatar
      samples/bpf: fix tcp_bpf.readme detach command · d78e3f06
      Stanislav Fomichev authored
      
      Copy-paste, should be detach, not attach.
      
      Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      d78e3f06
    • Stanislav Fomichev's avatar
      samples/bpf: add sample program that periodically dumps TCP stats · 39533884
      Stanislav Fomichev authored
      
      Uses new RTT callback to dump stats every second.
      
      $ mkdir -p /tmp/cgroupv2
      $ mount -t cgroup2 none /tmp/cgroupv2
      $ mkdir -p /tmp/cgroupv2/foo
      $ echo $$ >> /tmp/cgroupv2/foo/cgroup.procs
      $ bpftool prog load ./tcp_dumpstats_kern.o /sys/fs/bpf/tcp_prog
      $ bpftool cgroup attach /tmp/cgroupv2/foo sock_ops pinned /sys/fs/bpf/tcp_prog
      $ bpftool prog tracelog
      $ # run neper/netperf/etc
      
      Used neper to compare performance with and without this program attached
      and didn't see any noticeable performance impact.
      
      Sample output:
        <idle>-0     [015] ..s.  2074.128800: 0: dsack_dups=0 delivered=242526
        <idle>-0     [015] ..s.  2074.128808: 0: delivered_ce=0 icsk_retransmits=0
        <idle>-0     [015] ..s.  2075.130133: 0: dsack_dups=0 delivered=323599
        <idle>-0     [015] ..s.  2075.130138: 0: delivered_ce=0 icsk_retransmits=0
        <idle>-0     [005] .Ns.  2076.131440: 0: dsack_dups=0 delivered=404648
        <idle>-0     [005] .Ns.  2076.131447: 0: delivered_ce=0 icsk_retransmits=0
      
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Priyaranjan Jha <priyarjha@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Soheil Hassas Yeganeh <soheil@google.com>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      39533884
    • brakmo's avatar
      bpf: Add support for fq's EDT to HBM · 71634d7f
      brakmo authored
      
      Adds support for fq's Earliest Departure Time to HBM (Host Bandwidth
      Manager). Includes a new BPF program supporting EDT, and also updates
      corresponding programs.
      
      It will drop packets with an EDT of more than 500us in the future
      unless the packet belongs to a flow with less than 2 packets in flight.
      This is done so each flow has at least 2 packets in flight, so they
      will not starve, and also to help prevent delayed ACK timeouts.
      
      It will also work with ECN enabled traffic, where the packets will be
      CE marked if their EDT is more than 50us in the future.
      
      The table below shows some performance numbers. The flows are back to
      back RPCS. One server sending to another, either 2 or 4 flows.
      One flow is a 10KB RPC, the rest are 1MB RPCs. When there are more
      than one flow of a given RPC size, the numbers represent averages.
      
      The rate limit applies to all flows (they are in the same cgroup).
      Tests ending with "-edt" ran with the new BPF program supporting EDT.
      Tests ending with "-hbt" ran on top HBT qdisc with the specified rate
      (i.e. no HBM). The other tests ran with the HBM BPF program included
      in the HBM patch-set.
      
      EDT has limited value when using DCTCP, but it helps in many cases when
      using Cubic. It usually achieves larger link utilization and lower
      99% latencies for the 1MB RPCs.
      HBM ends up queueing a lot of packets with its default parameter values,
      reducing the goodput of the 10KB RPCs and increasing their latency. Also,
      the RTTs seen by the flows are quite large.
      
                               Aggr              10K  10K  10K   1MB  1MB  1MB
               Limit           rate drops  RTT  rate  P90  P99  rate  P90  P99
      Test      rate  Flows    Mbps   %     us  Mbps   us   us  Mbps   ms   ms
      --------  ----  -----    ---- -----  ---  ---- ---- ----  ---- ---- ----
      cubic       1G    2       904  0.02  108   257  511  539   647 13.4 24.5
      cubic-edt   1G    2       982  0.01  156   239  656  967   743 14.0 17.2
      dctcp       1G    2       977  0.00  105   324  408  744   653 14.5 15.9
      dctcp-edt   1G    2       981  0.01  142   321  417  811   660 15.7 17.0
      cubic-htb   1G    2       919  0.00 1825    40 2822 4140   879  9.7  9.9
      
      cubic     200M    2       155  0.30  220    81  532  655    74  283  450
      cubic-edt 200M    2       188  0.02  222    87 1035 1095   101   84   85
      dctcp     200M    2       188  0.03  111    77  912  939   111   76  325
      dctcp-edt 200M    2       188  0.03  217    74 1416 1738   114   76   79
      cubic-htb 200M    2       188  0.00 5015     8 14ms 15ms   180   48   50
      
      cubic       1G    4       952  0.03  110   165  516  546   262   38  154
      cubic-edt   1G    4       973  0.01  190   111 1034 1314   287   65   79
      dctcp       1G    4       951  0.00  103   180  617  905   257   37   38
      dctcp-edt   1G    4       967  0.00  163   151  732 1126   272   43   55
      cubic-htb   1G    4       914  0.00 3249    13  7ms  8ms   300   29   34
      
      cubic       5G    4      4236  0.00  134   305  490  624  1310   10   17
      cubic-edt   5G    4      4865  0.00  156   306  425  759  1520   10   16
      dctcp       5G    4      4936  0.00  128   485  221  409  1484    7    9
      dctcp-edt   5G    4      4924  0.00  148   390  392  623  1508   11   26
      
      v1 -> v2: Incorporated Andrii's suggestions
      v2 -> v3: Incorporated Yonghong's suggestions
      v3 -> v4: Removed credit update that is not needed
      
      Signed-off-by: default avatarLawrence Brakmo <brakmo@fb.com>
      Acked-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      71634d7f
  2. Jul 01, 2019
  3. Jun 27, 2019
  4. Jun 26, 2019
  5. Jun 25, 2019
  6. Jun 24, 2019
  7. Jun 19, 2019
  8. Jun 17, 2019
  9. Jun 15, 2019
    • Masahiro Yamada's avatar
      kbuild: add CONFIG_HEADERS_INSTALL and loosen the dependency of samples · e949f4c2
      Masahiro Yamada authored
      
      Commit 5318321d ("samples: disable CONFIG_SAMPLES for UML") used
      a big hammer to fix the build errors under the samples/ directory.
      Only some samples actually include uapi headers from usr/include.
      
      Introduce CONFIG_HEADERS_INSTALL since 'depends on HEADERS_INSTALL' is
      clearer than 'depends on !UML'. If this option is enabled, uapi headers
      are installed before starting directory descending.
      
      I added 'depends on HEADERS_INSTALL' to per-sample CONFIG options.
      This allows UML to compile some samples.
      
      $ make ARCH=um allmodconfig samples/
        [ snip ]
        CC [M]  samples/configfs/configfs_sample.o
        CC [M]  samples/kfifo/bytestream-example.o
        CC [M]  samples/kfifo/dma-example.o
        CC [M]  samples/kfifo/inttype-example.o
        CC [M]  samples/kfifo/record-example.o
        CC [M]  samples/kobject/kobject-example.o
        CC [M]  samples/kobject/kset-example.o
        CC [M]  samples/trace_events/trace-events-sample.o
        CC [M]  samples/trace_printk/trace-printk.o
        AR      samples/vfio-mdev/built-in.a
        AR      samples/built-in.a
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      e949f4c2
  10. Jun 14, 2019
  11. Jun 11, 2019
  12. Jun 06, 2019
    • Jakub Kicinski's avatar
      samples: bpf: print a warning about headers_install · 07c3bbdb
      Jakub Kicinski authored
      
      It seems like periodically someone posts patches to "fix"
      header includes.  The issue is that samples expect the
      include path to have the uAPI headers (from usr/) first,
      and then tools/ headers, so that locally installed uAPI
      headers take precedence.  This means that if users didn't
      run headers_install they will see all sort of strange
      compilation errors, e.g.:
      
        HOSTCC  samples/bpf/test_lru_dist
        samples/bpf/test_lru_dist.c:39:8: error: redefinition of ‘struct list_head’
         struct list_head {
                ^~~~~~~~~
         In file included from samples/bpf/test_lru_dist.c:9:0:
         ../tools/include/linux/types.h:69:8: note: originally defined here
          struct list_head {
                 ^~~~~~~~~
      
      Try to detect this situation, and print a helpful warning.
      
      v2: just use HOSTCC (Jiong).
      
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      07c3bbdb
  13. Jun 05, 2019
  14. Jun 04, 2019
  15. Jun 03, 2019
  16. May 31, 2019
  17. May 30, 2019
  18. May 28, 2019
  19. May 25, 2019
  20. May 24, 2019
  21. May 21, 2019
Loading