04 Apr, 2018

1 commit

  • Pull networking updates from David Miller:

    1) Support offloading wireless authentication to userspace via
    NL80211_CMD_EXTERNAL_AUTH, from Srinivas Dasari.

    2) A lot of work on network namespace setup/teardown from Kirill Tkhai.
    Setup and cleanup of namespaces now all run asynchronously and thus
    performance is significantly increased.

    3) Add rx/tx timestamping support to mv88e6xxx driver, from Brandon
    Streiff.

    4) Support zerocopy on RDS sockets, from Sowmini Varadhan.

    5) Use denser instruction encoding in x86 eBPF JIT, from Daniel
    Borkmann.

    6) Support hw offload of vlan filtering in mvpp2 dreiver, from Maxime
    Chevallier.

    7) Support grafting of child qdiscs in mlxsw driver, from Nogah
    Frankel.

    8) Add packet forwarding tests to selftests, from Ido Schimmel.

    9) Deal with sub-optimal GSO packets better in BBR congestion control,
    from Eric Dumazet.

    10) Support 5-tuple hashing in ipv6 multipath routing, from David Ahern.

    11) Add path MTU tests to selftests, from Stefano Brivio.

    12) Various bits of IPSEC offloading support for mlx5, from Aviad
    Yehezkel, Yossi Kuperman, and Saeed Mahameed.

    13) Support RSS spreading on ntuple filters in SFC driver, from Edward
    Cree.

    14) Lots of sockmap work from John Fastabend. Applications can use eBPF
    to filter sendmsg and sendpage operations.

    15) In-kernel receive TLS support, from Dave Watson.

    16) Add XDP support to ixgbevf, this is significant because it should
    allow optimized XDP usage in various cloud environments. From Tony
    Nguyen.

    17) Add new Intel E800 series "ice" ethernet driver, from Anirudh
    Venkataramanan et al.

    18) IP fragmentation match offload support in nfp driver, from Pieter
    Jansen van Vuuren.

    19) Support XDP redirect in i40e driver, from Björn Töpel.

    20) Add BPF_RAW_TRACEPOINT program type for accessing the arguments of
    tracepoints in their raw form, from Alexei Starovoitov.

    21) Lots of striding RQ improvements to mlx5 driver with many
    performance improvements, from Tariq Toukan.

    22) Use rhashtable for inet frag reassembly, from Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1678 commits)
    net: mvneta: improve suspend/resume
    net: mvneta: split rxq/txq init and txq deinit into SW and HW parts
    ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh
    net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
    net: bgmac: Correctly annotate register space
    route: check sysctl_fib_multipath_use_neigh earlier than hash
    fix typo in command value in drivers/net/phy/mdio-bitbang.
    sky2: Increase D3 delay to sky2 stops working after suspend
    net/mlx5e: Set EQE based as default TX interrupt moderation mode
    ibmvnic: Disable irqs before exiting reset from closed state
    net: sched: do not emit messages while holding spinlock
    vlan: also check phy_driver ts_info for vlan's real device
    Bluetooth: Mark expected switch fall-throughs
    Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for BTUSB_QCA_ROME
    Bluetooth: btrsi: remove unused including
    Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4
    sh_eth: kill useless check in __sh_eth_get_regs()
    sh_eth: add sh_eth_cpu_data::no_xdfar flag
    ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()
    ipv4: factorize sk_wmem_alloc updates done by __ip_append_data()
    ...

    Linus Torvalds
     

30 Mar, 2018

2 commits


29 Mar, 2018

1 commit


28 Mar, 2018

1 commit


20 Mar, 2018

8 commits

  • This adds the test script I am currently using to validate
    the latest sockmap changes. Shortly sockmap will be ported
    to selftests and these will be run from the infrastructure
    there. Until then add the script here so we have a coverage
    checklist when porting into selftests.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • This adds an option to test the msg_pull_data helper. This
    uses two options txmsg_start and txmsg_end to let the user
    specify start and end bytes to pull.

    The options can be used with txmsg_apply, txmsg_cork options
    as well as with any of the basic tests, txmsg, txmsg_redir and
    txmsg_drop (plus noisy variants) to run pull_data inline with
    those tests. By giving user direct control over the variables
    we can easily do negative testing as well as positive tests.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Add tests for SK_DROP.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Add sample application support for the bpf_msg_cork_bytes helper. This
    lets the user specify how many bytes each verdict should apply to.

    Similar to apply_bytes() tests these can be run as a stand-alone test
    when used without other options or inline with other tests by using
    the txmsg_cork option along with any of the basic tests txmsg,
    txmsg_redir, txmsg_drop.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • This adds an option to test the apply_bytes helper. This option lets
    the user specify an int on the command line specifying how much data
    each verdict should apply to.

    When this is set a map entry is set with the bytes input by the user
    and then the specified program --txmsg or --txmsg_redir will use the
    value and set the applied data. If no other option is set then a
    default --txmsg_apply program is run. This program will drop pkts
    if an error is detected on the bytes map lookup. Useful to verify
    the map lookup and apply helper are working and causing a hard
    error if it is not.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • To verify data is not being dropped or corrupted this adds an option
    to verify test-patterns on recv.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • To exercise TX ULP sendpage implementation we need a test that does
    a sendfile. Add sendfile test option here.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Add sockmap option to use SK_MSG program types.

    Signed-off-by: John Fastabend
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann

    John Fastabend
     

16 Mar, 2018

2 commits

  • The Tile architecture port was added by Chris Metcalf in 2010, and
    maintained until early 2018 when he orphaned it due to his departure
    from Mellanox, and nobody else stepped up to maintain it. The product
    line is still around in the form of the BlueField SoC, but no longer
    uses the Tile architecture.

    There are also still products for sale with Tile-GX SoCs, notably the
    Mikrotik CCR router family. The products all use old (linux-3.3) kernels
    with lots of patches and won't be upgraded by their manufacturers. There
    have been efforts to port both OpenWRT and Debian to these, but both
    projects have stalled and are very unlikely to be continued in the future.

    Given that we are reasonably sure that nobody is still using the port
    with an upstream kernel any more, it seems better to remove it now while
    the port is in a good shape than to let it bitrot for a few years first.

    Cc: Chris Metcalf
    Cc: John Paul Adrian Glaubitz
    Link: http://www.mellanox.com/page/npu_multicore_overview
    Link: https://jenkins.debian.net/view/rebootstrap/job/rebootstrap_tilegx_gcc7/
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • The Analog Devices Blackfin port was added in 2007 and was rather
    active for a while, but all work on it has come to a standstill
    over time, as Analog have changed their product line-up.

    Aaron Wu confirmed that the architecture port is no longer relevant,
    and multiple people suggested removing blackfin independently because
    of some of its oddities like a non-working SMP port, and the amount of
    duplication between the chip variants, which cause extra work when
    doing cross-architecture changes.

    Link: https://docs.blackfin.uclinux.org/
    Acked-by: Aaron Wu
    Acked-by: Bryan Wu
    Cc: Steven Miao
    Cc: Mike Frysinger
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

08 Mar, 2018

1 commit

  • This commit adds additional test in the trace_event example, by
    attaching the bpf program to MEM_UOPS_RETIRED.LOCK_LOADS event with
    PERF_SAMPLE_ADDR requested, and print the lock address value read from
    the bpf program to trace_pipe.

    Signed-off-by: Teng Qin
    Signed-off-by: Daniel Borkmann

    Teng Qin
     

06 Mar, 2018

1 commit


05 Mar, 2018

1 commit


02 Mar, 2018

1 commit

  • test_cgrp2_sock.sh and test_cgrp2_sock2.sh tests keep the program
    attached to cgroup even after completion.
    Using detach functionality of test_cgrp2_sock in both scripts.

    Signed-off-by: Prashant Bhole
    Acked-by: David Ahern
    Signed-off-by: Daniel Borkmann

    Prashant Bhole
     

28 Feb, 2018

1 commit


26 Feb, 2018

1 commit

  • CPU is active when have running tasks on it and CPUFreq governor can
    select different operating points (OPP) according to different workload;
    we use 'pstate' to present CPU state which have running tasks with one
    specific OPP. On the other hand, CPU is idle which only idle task on
    it, CPUIdle governor can select one specific idle state to power off
    hardware logics; we use 'cstate' to present CPU idle state.

    Based on trace events 'cpu_idle' and 'cpu_frequency' we can accomplish
    the duration statistics for every state. Every time when CPU enters
    into or exits from idle states, the trace event 'cpu_idle' is recorded;
    trace event 'cpu_frequency' records the event for CPU OPP changing, so
    it's easily to know how long time the CPU stays in the specified OPP,
    and the CPU must be not in any idle state.

    This patch is to utilize the mentioned trace events for pstate and
    cstate statistics. To achieve more accurate profiling data, the program
    uses below sequence to insure CPU running/idle time aren't missed:

    - Before profiling the user space program wakes up all CPUs for once, so
    can avoid to missing account time for CPU staying in idle state for
    long time; the program forces to set 'scaling_max_freq' to lowest
    frequency and then restore 'scaling_max_freq' to highest frequency,
    this can ensure the frequency to be set to lowest frequency and later
    after start to run workload the frequency can be easily to be changed
    to higher frequency;

    - User space program reads map data and update statistics for every 5s,
    so this is same with other sample bpf programs for avoiding big
    overload introduced by bpf program self;

    - When send signal to terminate program, the signal handler wakes up
    all CPUs, set lowest frequency and restore highest frequency to
    'scaling_max_freq'; this is exactly same with the first step so
    avoid to missing account CPU pstate and cstate time during last
    stage. Finally it reports the latest statistics.

    The program has been tested on Hikey board with octa CA53 CPUs, below
    is one example for statistics result, the format mainly follows up
    Jesper Dangaard Brouer suggestion.

    Jesper reminds to 'get printf to pretty print with thousands separators
    use %' and setlocale(LC_NUMERIC, "en_US")', tried three different arm64
    GCC toolchains (5.4.0 20160609, 6.2.1 20161016, 6.3.0 20170516) but all
    of them cannot support printf flag character %' on arm64 platform, so go
    back print number without grouping mode.

    CPU states statistics:
    state(ms) cstate-0 cstate-1 cstate-2 pstate-0 pstate-1 pstate-2 pstate-3 pstate-4
    CPU-0 767 6111 111863 561 31 756 853 190
    CPU-1 241 10606 107956 484 125 646 990 85
    CPU-2 413 19721 98735 636 84 696 757 89
    CPU-3 84 11711 79989 17516 909 4811 5773 341
    CPU-4 152 19610 98229 444 53 649 708 1283
    CPU-5 185 8781 108697 666 91 671 677 1365
    CPU-6 157 21964 95825 581 67 566 684 1284
    CPU-7 125 15238 102704 398 20 665 786 1197

    Cc: Daniel Lezcano
    Cc: Vincent Guittot
    Signed-off-by: Leo Yan
    Signed-off-by: Daniel Borkmann

    Leo Yan
     

23 Feb, 2018

1 commit

  • samples/seccomp relies on the host setting which is not suitable for
    crosscompilation and it actually fails when crosscompiling s390 and
    powerpc all{yes,mod}config on x86_64 with

    samples/seccomp/bpf-helper.h:135:2: error: #error __BITS_PER_LONG value unusable.
    #error __BITS_PER_LONG value unusable.
    ^
    In file included from samples/seccomp/bpf-fancy.c:13:0:
    samples/seccomp/bpf-fancy.c: In function ‘main’:
    samples/seccomp/bpf-fancy.c:38:11: error: ‘__NR_exit’ undeclared (first use in this function)
    SYSCALL(__NR_exit, ALLOW),

    and many others. I am doing these for compile testing and it's been
    quite useful to catch issues. Crosscompiling sample code on the other
    hand doesn't seem all that important so it seems like the easiest way to
    simply disable samples/seccomp when crosscompiling.

    Fixing this properly is not that easy as Kees explains:
    : IIRC, one of the problems is with build ordering problems: the kernel
    : headers used by the samples aren't available when cross compiling.

    Signed-off-by: Michal Hocko
    Signed-off-by: Kees Cook

    Michal Hocko
     

14 Feb, 2018

3 commits


07 Feb, 2018

1 commit

  • The commit c69de58ba84f ("net: erspan: use bitfield instead of
    mask and offset") changes the erspan header to use bitfield, and
    commit d350a823020e ("net: erspan: create erspan metadata uapi header")
    creates a uapi header file. The above two commit breaks the current
    erspan test. This patch fixes it by adapting the above two changes.

    Fixes: ac80c2a165af ("samples/bpf: add erspan v2 sample code")
    Fixes: ef88f89c830f ("samples/bpf: extend test_tunnel_bpf.sh with ERSPAN")
    Signed-off-by: William Tu
    Signed-off-by: David S. Miller

    William Tu
     

05 Feb, 2018

1 commit


03 Feb, 2018

2 commits

  • Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some
    code duplication and benefit of netlink ext ack errors message.

    Signed-off-by: Eric Leblond
    Signed-off-by: Alexei Starovoitov

    Eric Leblond
     
  • Parse netlink ext attribute to get the error message returned by
    the card. Code is partially take from libnl.

    We add netlink.h to the uapi include of tools. And we need to
    avoid include of userspace netlink header to have a successful
    build of sample so nlattr.h has a define to avoid
    the inclusion. Using a direct define could have been an issue
    as NLMSGERR_ATTR_MAX can change in the future.

    We also define SOL_NETLINK if not defined to avoid to have to
    copy socket.h for a fixed value.

    Signed-off-by: Eric Leblond
    Acked-by: Alexei Starovoitov
    Signed-off-by: Alexei Starovoitov

    Eric Leblond
     

02 Feb, 2018

1 commit

  • Pull driver core updates from Greg KH:
    "Here is the set of "big" driver core patches for 4.16-rc1.

    The majority of the work here is in the firmware subsystem, with
    reworks to try to attempt to make the code easier to handle in the
    long run, but no functional change. There's also some tree-wide sysfs
    attribute fixups with lots of acks from the various subsystem
    maintainers, as well as a handful of other normal fixes and changes.

    And finally, some license cleanups for the driver core and sysfs code.

    All have been in linux-next for a while with no reported issues"

    * tag 'driver-core-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (48 commits)
    device property: Define type of PROPERTY_ENRTY_*() macros
    device property: Reuse property_entry_free_data()
    device property: Move property_entry_free_data() upper
    firmware: Fix up docs referring to FIRMWARE_IN_KERNEL
    firmware: Drop FIRMWARE_IN_KERNEL Kconfig option
    USB: serial: keyspan: Drop firmware Kconfig options
    sysfs: remove DEBUG defines
    sysfs: use SPDX identifiers
    drivers: base: add coredump driver ops
    sysfs: add attribute specification for /sysfs/devices/.../coredump
    test_firmware: fix missing unlock on error in config_num_requests_store()
    test_firmware: make local symbol test_fw_config static
    sysfs: turn WARN() into pr_warn()
    firmware: Fix a typo in fallback-mechanisms.rst
    treewide: Use DEVICE_ATTR_WO
    treewide: Use DEVICE_ATTR_RO
    treewide: Use DEVICE_ATTR_RW
    sysfs.h: Use octal permissions
    component: add debugfs support
    bus: simple-pm-bus: convert bool SIMPLE_PM_BUS to tristate
    ...

    Linus Torvalds
     

01 Feb, 2018

2 commits

  • Pull networking updates from David Miller:

    1) Significantly shrink the core networking routing structures. Result
    of http://vger.kernel.org/~davem/seoul2017_netdev_keynote.pdf

    2) Add netdevsim driver for testing various offloads, from Jakub
    Kicinski.

    3) Support cross-chip FDB operations in DSA, from Vivien Didelot.

    4) Add a 2nd listener hash table for TCP, similar to what was done for
    UDP. From Martin KaFai Lau.

    5) Add eBPF based queue selection to tun, from Jason Wang.

    6) Lockless qdisc support, from John Fastabend.

    7) SCTP stream interleave support, from Xin Long.

    8) Smoother TCP receive autotuning, from Eric Dumazet.

    9) Lots of erspan tunneling enhancements, from William Tu.

    10) Add true function call support to BPF, from Alexei Starovoitov.

    11) Add explicit support for GRO HW offloading, from Michael Chan.

    12) Support extack generation in more netlink subsystems. From Alexander
    Aring, Quentin Monnet, and Jakub Kicinski.

    13) Add 1000BaseX, flow control, and EEE support to mvneta driver. From
    Russell King.

    14) Add flow table abstraction to netfilter, from Pablo Neira Ayuso.

    15) Many improvements and simplifications to the NFP driver bpf JIT,
    from Jakub Kicinski.

    16) Support for ipv6 non-equal cost multipath routing, from Ido
    Schimmel.

    17) Add resource abstration to devlink, from Arkadi Sharshevsky.

    18) Packet scheduler classifier shared filter block support, from Jiri
    Pirko.

    19) Avoid locking in act_csum, from Davide Caratti.

    20) devinet_ioctl() simplifications from Al viro.

    21) More TCP bpf improvements from Lawrence Brakmo.

    22) Add support for onlink ipv6 route flag, similar to ipv4, from David
    Ahern.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1925 commits)
    tls: Add support for encryption using async offload accelerator
    ip6mr: fix stale iterator
    net/sched: kconfig: Remove blank help texts
    openvswitch: meter: Use 64-bit arithmetic instead of 32-bit
    tcp_nv: fix potential integer overflow in tcpnv_acked
    r8169: fix RTL8168EP take too long to complete driver initialization.
    qmi_wwan: Add support for Quectel EP06
    rtnetlink: enable IFLA_IF_NETNSID for RTM_NEWLINK
    ipmr: Fix ptrdiff_t print formatting
    ibmvnic: Wait for device response when changing MAC
    qlcnic: fix deadlock bug
    tcp: release sk_frag.page in tcp_disconnect
    ipv4: Get the address of interface correctly.
    net_sched: gen_estimator: fix lockdep splat
    net: macb: Handle HRESP error
    net/mlx5e: IPoIB, Fix copy-paste bug in flow steering refactoring
    ipv6: addrconf: break critical section in addrconf_verify_rtnl()
    ipv6: change route cache aging logic
    i40e/i40evf: Update DESC_NEEDED value to reflect larger value
    bnxt_en: cleanup DIM work on device shutdown
    ...

    Linus Torvalds
     
  • Pull livepatching updates from Jiri Kosina:

    - handle 'infinitely'-long sleeping tasks, from Miroslav Benes

    - remove 'immediate' feature, as it turns out it doesn't provide the
    originally expected semantics, and brings more issues than value

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
    livepatch: add locking to force and signal functions
    livepatch: Remove immediate feature
    livepatch: force transition to finish
    livepatch: send a fake signal to all blocking tasks

    Linus Torvalds
     

27 Jan, 2018

1 commit

  • Do not build lib/bpf/bpf.o with this Makefile but use the one from the
    library directory. This avoid making a buggy bpf.o file (e.g. missing
    symbols).

    This patch is useful if some code (e.g. Landlock tests) needs both the
    bpf.o (from tools/lib/bpf) and the bpf_load.o (from samples/bpf).

    Signed-off-by: Mickaël Salaün
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Signed-off-by: Daniel Borkmann

    Mickaël Salaün
     

24 Jan, 2018

7 commits

  • Avoid extra step of setting limit from cmdline and do it directly in
    the program.

    Signed-off-by: John Fastabend
    Acked-by: Martin KaFai Lau
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Put client sockets in blocking mode otherwise with sendmsg tests
    its easy to overrun the socket buffers which results in the test
    being aborted.

    The original non-blocking was added to handle listen/accept with
    a single thread the client/accepted sockets do not need to be
    non-blocking.

    Signed-off-by: John Fastabend
    Acked-by: Martin KaFai Lau
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Add a base test that does not use BPF hooks to test baseline case.

    Signed-off-by: John Fastabend
    Acked-by: Martin KaFai Lau
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Report bytes/sec sent as well as total bytes. Useful to get rough
    idea how different configurations and usage patterns perform with
    sockmap.

    Signed-off-by: John Fastabend
    Acked-by: Martin KaFai Lau
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • Currently for SENDMSG tests first send completes then recv runs. This
    does not work well for large data sizes and/or many iterations. So
    fork the recv and send handler so that we run both send and recv. In
    the future we can add a parameter to do more than a single fork of
    tx/rx.

    With this we can get many GBps of data which helps exercise the
    sockmap code.

    Signed-off-by: John Fastabend
    Acked-by: Martin KaFai Lau
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • When testing BPF programs using sockmap I often want to have more
    control over how sendmsg is exercised. This becomes even more useful
    as new sockmap program types are added.

    This adds a test type option to select type of test to run. Currently,
    only "ping" and "sendmsg" are supported, but more can be added as
    needed.

    The new help argument gives the following,

    Usage: ./sockmap --cgroup
    options:
    --help -h
    --cgroup -c
    --rate -r
    --verbose -v
    --iov_count -i
    --length -l
    --test -t

    Signed-off-by: John Fastabend
    Signed-off-by: Daniel Borkmann

    John Fastabend
     
  • sockmap sample program takes arguments from cmd line but it reads them
    in using offsets into the array. Because we want to add more arguments
    in the future lets do proper argument handling.

    Also refactor code to pull apart sock init and ping/pong test. This
    allows us to add new tests in the future.

    Signed-off-by: John Fastabend
    Acked-by: Martin KaFai Lau
    Signed-off-by: Daniel Borkmann

    John Fastabend