mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says: ==================== pull-request: bpf-next 2018-07-03 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Various improvements to bpftool and libbpf, that is, bpftool build speed improvements, missing BPF program types added for detection by section name, ability to load programs from '.text' section is made to work again, and better bash completion handling, from Jakub. 2) Improvements to nfp JIT's map read handling which allows for optimizing memcpy from map to packet, from Jiong. 3) New BPF sample is added which demonstrates XDP in combination with bpf_perf_event_output() helper to sample packets on all CPUs, from Toke. 4) Add a new BPF kselftest case for tracking connect(2) BPF hooks infrastructure in combination with TFO, from Andrey. 5) Extend the XDP/BPF xdp_rxq_info sample code with a cmdline option to read payload from packet data in order to use it for benchmarking. Also for '--action XDP_TX' option implement swapping of MAC addresses to avoid drops on some hardware seen during testing, from Jesper. ==================== Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
commit
b68034087a
18 changed files with 471 additions and 49 deletions
|
|
@ -23,7 +23,7 @@ endif
|
|||
|
||||
LIBBPF = $(BPF_PATH)libbpf.a
|
||||
|
||||
BPFTOOL_VERSION=$(shell make --no-print-directory -sC ../../.. kernelversion)
|
||||
BPFTOOL_VERSION := $(shell make --no-print-directory -sC ../../.. kernelversion)
|
||||
|
||||
$(LIBBPF): FORCE
|
||||
$(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT)
|
||||
|
|
|
|||
|
|
@ -153,6 +153,13 @@ _bpftool()
|
|||
local cur prev words objword
|
||||
_init_completion || return
|
||||
|
||||
# Deal with options
|
||||
if [[ ${words[cword]} == -* ]]; then
|
||||
local c='--version --json --pretty --bpffs'
|
||||
COMPREPLY=( $( compgen -W "$c" -- "$cur" ) )
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Deal with simplest keywords
|
||||
case $prev in
|
||||
help|hex|opcodes|visual)
|
||||
|
|
@ -172,20 +179,23 @@ _bpftool()
|
|||
;;
|
||||
esac
|
||||
|
||||
# Search for object and command
|
||||
local object command cmdword
|
||||
for (( cmdword=1; cmdword < ${#words[@]}-1; cmdword++ )); do
|
||||
[[ -n $object ]] && command=${words[cmdword]} && break
|
||||
[[ ${words[cmdword]} != -* ]] && object=${words[cmdword]}
|
||||
# Remove all options so completions don't have to deal with them.
|
||||
local i
|
||||
for (( i=1; i < ${#words[@]}; )); do
|
||||
if [[ ${words[i]::1} == - ]]; then
|
||||
words=( "${words[@]:0:i}" "${words[@]:i+1}" )
|
||||
[[ $i -le $cword ]] && cword=$(( cword - 1 ))
|
||||
else
|
||||
i=$(( ++i ))
|
||||
fi
|
||||
done
|
||||
cur=${words[cword]}
|
||||
prev=${words[cword - 1]}
|
||||
|
||||
if [[ -z $object ]]; then
|
||||
local object=${words[1]} command=${words[2]}
|
||||
|
||||
if [[ -z $object || $cword -eq 1 ]]; then
|
||||
case $cur in
|
||||
-*)
|
||||
local c='--version --json --pretty'
|
||||
COMPREPLY=( $( compgen -W "$c" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=( $( compgen -W "$( bpftool help 2>&1 | \
|
||||
command sed \
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Author: Jakub Kicinski <[email protected]> */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Netronome Systems, Inc.
|
||||
* Copyright (C) 2017-2018 Netronome Systems, Inc.
|
||||
*
|
||||
* This software is dual licensed under the GNU General License Version 2,
|
||||
* June 1991 as shown in the file COPYING in the top-level directory of this
|
||||
|
|
@ -31,8 +31,6 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Author: Jakub Kicinski <[email protected]> */
|
||||
|
||||
#include <bfd.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Author: Jakub Kicinski <[email protected]> */
|
||||
|
||||
#ifndef __BPF_TOOL_H
|
||||
#define __BPF_TOOL_H
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Author: Jakub Kicinski <[email protected]> */
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Netronome Systems, Inc.
|
||||
* Copyright (C) 2017-2018 Netronome Systems, Inc.
|
||||
*
|
||||
* This software is dual licensed under the GNU General License Version 2,
|
||||
* June 1991 as shown in the file COPYING in the top-level directory of this
|
||||
|
|
@ -31,8 +31,6 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Author: Jakub Kicinski <[email protected]> */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue