1. 09 8月, 2019 1 次提交
  2. 04 8月, 2019 2 次提交
  3. 02 7月, 2019 1 次提交
  4. 31 5月, 2019 1 次提交
  5. 29 5月, 2019 1 次提交
  6. 25 5月, 2019 1 次提交
    • W
      selftests/net: SO_TXTIME with ETF and FQ · af5136f9
      Willem de Bruijn 提交于
      The SO_TXTIME API enables packet tranmission with delayed delivery.
      This is currently supported by the ETF and FQ packet schedulers.
      
      Evaluate the interface with both schedulers. Install the scheduler
      and send a variety of packets streams: without delay, with one
      delayed packet, with multiple ordered delays and with reordering.
      Verify that packets are released by the scheduler in expected order.
      
      The ETF qdisc requires a timestamp in the future on every packet. It
      needs a delay on the qdisc else the packet is dropped on dequeue for
      having a delivery time in the past. The test value is experimentally
      derived. ETF requires clock_id CLOCK_TAI. It checks this base and
      drops for non-conformance.
      
      The FQ qdisc expects clock_id CLOCK_MONOTONIC, the base used by TCP
      as of commit fb420d5d ("tcp/fq: move back to CLOCK_MONOTONIC").
      Within a flow there is an expecation of ordered delivery, as shown by
      delivery times of test 4. The FQ qdisc does not require all packets to
      have timestamps and does not drop for non-conformance.
      
      The large (msec) delays are chosen to avoid flakiness.
      
      	Output:
      
      	SO_TXTIME ipv6 clock monotonic
      	payload:a delay:28 expected:0 (us)
      
      	SO_TXTIME ipv4 clock monotonic
      	payload:a delay:38 expected:0 (us)
      
      	SO_TXTIME ipv6 clock monotonic
      	payload:a delay:40 expected:0 (us)
      
      	SO_TXTIME ipv4 clock monotonic
      	payload:a delay:33 expected:0 (us)
      
      	SO_TXTIME ipv6 clock monotonic
      	payload:a delay:10120 expected:10000 (us)
      
      	SO_TXTIME ipv4 clock monotonic
      	payload:a delay:10102 expected:10000 (us)
      
      	[.. etc ..]
      
      	OK. All tests passed
      
      Changes v1->v2: update commit message output
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af5136f9
  7. 28 1月, 2019 1 次提交
    • F
      selftests: net: use LDLIBS instead of LDFLAGS · 870f193d
      Fathi Boudra 提交于
      reuseport_bpf_numa fails to build due to undefined reference errors:
      
       aarch64-linaro-linux-gcc
       --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall
       -Wl,--no-as-needed -O2 -g -I../../../../usr/include/  -Wl,-O1
       -Wl,--hash-style=gnu -Wl,--as-needed -lnuma  reuseport_bpf_numa.c
       -o
       /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa
       /tmp/ccfUuExT.o: In function `send_from_node':
       /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138:
       undefined reference to `numa_run_on_node'
       /tmp/ccfUuExT.o: In function `main':
       /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230:
       undefined reference to `numa_available'
       /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233:
       undefined reference to `numa_max_node'
      
      It's GNU Make and linker specific.
      
      The default Makefile rule looks like:
      
      $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS)
      
      When linking is done by gcc itself, no issue, but when it needs to be passed
      to proper ld, only LDLIBS follows and then ld cannot know what libs to link
      with.
      
      More detail:
      https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
      
      LDFLAGS
      Extra flags to give to compilers when they are supposed to invoke the linker,
      ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
      instead.
      
      LDLIBS
      Library flags or names given to compilers when they are supposed to invoke the
      linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
      LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS
      variable.
      
      https://lkml.org/lkml/2010/2/10/362
      
      tools/perf: libraries must come after objects
      
      Link order matters, use LDLIBS instead of LDFLAGS to properly link against
      libnuma.
      Signed-off-by: NFathi Boudra <fathi.boudra@linaro.org>
      Signed-off-by: NShuah Khan <shuah@kernel.org>
      870f193d
  8. 19 12月, 2018 1 次提交
  9. 15 12月, 2018 1 次提交
  10. 04 12月, 2018 1 次提交
  11. 25 11月, 2018 1 次提交
    • W
      selftests/net: add txring_overwrite · 358be656
      Willem de Bruijn 提交于
      Packet sockets with PACKET_TX_RING send skbs with user data in frags.
      
      Before commit 5cd8d46e ("packet: copy user buffers before orphan
      or clone") ring slots could be released prematurely, possibly allowing
      a process to overwrite data still in flight.
      
      This test opens two packet sockets, one to send and one to read.
      The sender has a tx ring of one slot. It sends two packets with
      different payload, then reads both and verifies their payload.
      
      Before the above commit, both receive calls return the same data as
      the send calls use the same buffer. From the commit, the clone
      needed for looping onto a packet socket triggers an skb_copy_ubufs
      to create a private copy. The separate sends each arrive correctly.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      358be656
  12. 09 11月, 2018 1 次提交
  13. 08 11月, 2018 2 次提交
  14. 05 9月, 2018 1 次提交
  15. 30 8月, 2018 1 次提交
  16. 17 7月, 2018 1 次提交
  17. 04 6月, 2018 2 次提交
    • W
      selftests/net: add packet socket packet_snd test · 75f0139f
      Willem de Bruijn 提交于
      Add regression tests for PF_PACKET transmission using packet_snd.
      
      The TPACKET ring interface has tests for transmission and reception.
      This is an initial stab at the same for the send call based interface.
      
      Packets are sent over loopback, then read twice. The entire packet is
      read from another packet socket and compared. The packet is also
      verified to arrive at a UDP socket for protocol conformance.
      
      The test sends a packet over loopback, testing the following options
      (not the full cross-product):
      
      - SOCK_DGRAM
      - SOCK_RAW
      - vlan tag
      - qdisc bypass
      - bind() and sendto()
      - virtio_net_hdr
      - csum offload (NOT actual csum feature, ignored on loopback)
      - gso
      
      Besides these basic functionality tests, the test runs from a set
      of bounds checks, positive and negative. Running over loopback, which
      has dev->min_header_len, it cannot generate variable length hhlen.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75f0139f
    • W
      selftests/net: enable msg_zerocopy test · 830669e6
      Willem de Bruijn 提交于
      The existing msg_zerocopy test takes additional protocol arguments.
      Add a variant that takes no arguments and runs all supported variants.
      Call this from kselftest.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      830669e6
  18. 24 5月, 2018 1 次提交
  19. 08 5月, 2018 2 次提交
  20. 02 5月, 2018 1 次提交
  21. 28 4月, 2018 1 次提交
  22. 27 4月, 2018 2 次提交
  23. 17 4月, 2018 1 次提交
  24. 13 4月, 2018 1 次提交
  25. 08 3月, 2018 1 次提交
  26. 28 2月, 2018 1 次提交
  27. 08 1月, 2018 1 次提交
  28. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  29. 20 9月, 2017 2 次提交
  30. 11 8月, 2017 1 次提交
  31. 04 8月, 2017 1 次提交
    • W
      test: add msg_zerocopy test · 07b65c5b
      Willem de Bruijn 提交于
      Introduce regression test for msg_zerocopy feature. Send traffic from
      one process to another with and without zerocopy.
      
      Evaluate tcp, udp, raw and packet sockets, including variants
      - udp: corking and corking with mixed copy/zerocopy calls
      - raw: with and without hdrincl
      - packet: at both raw and dgram level
      
      Test on both ipv4 and ipv6, optionally with ethtool changes to
      disable scatter-gather, tx checksum or tso offload. All of these
      can affect zerocopy behavior.
      
      The regression test can be run on a single machine if over a veth
      pair. Then skb_orphan_frags_rx must be modified to be identical to
      skb_orphan_frags to allow forwarding zerocopy locally.
      
      The msg_zerocopy.sh script will setup the veth pair in network
      namespaces and run all tests.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07b65c5b
  32. 24 6月, 2017 1 次提交
  33. 05 4月, 2017 1 次提交
  34. 06 1月, 2017 1 次提交