With disabling bh in the whole sctp_get_port_local(), when
snum == 0 and too many ports have been used, the do-while
loop will take the cpu for a long time and cause cpu stuck:
[ ] watchdog: BUG: soft lockup - CPU#11 stuck for 22s!
[ ] RIP: 0010:native_queued_spin_lock_slowpath+0x4de/0x940
[
On Thu, Aug 20, 2020 at 9:13 PM Eric Dumazet wrote:
>
>
>
> On 8/19/20 11:48 PM, Xin Long wrote:
> > With disabling bh in the whole sctp_get_port_local(), when
> > snum == 0 and too many ports have been used, the do-while
> > loop will take the cpu for a long time and cause cpu stuck:
> >
> > [
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
On 8/20/20 11:33 PM, Andrii Nakryiko wrote:
On Thu, Aug 20, 2020 at 3:50 PM Yonghong Song wrote:
For bpf_map_elem and bpf_sk_local_storage bpf iterators,
additional map_id should be shown for fdinfo and
userspace query. For example, the following is for
a bpf_map_elem iterator.
$ cat /pr
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
On 8/20/20 11:31 PM, Andrii Nakryiko wrote:
On Thu, Aug 20, 2020 at 3:50 PM Yonghong Song wrote:
This patch implemented bpf_link callback functions
show_fdinfo and fill_link_info to support link_query
interface.
The general interface for show_fdinfo and fill_link_info
will print/fill the t
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
On Thu, Aug 20, 2020 at 3:50 PM Yonghong Song wrote:
>
> The link query for bpf iterators is implemented.
> Besides being shown to the user what bpf iterator
> the link represents, the target_name is also used
> to filter out what additional information should be
> printed out, e.g., whether map_i
On Thu, Aug 20, 2020 at 3:50 PM Yonghong Song wrote:
>
> For bpf_map_elem and bpf_sk_local_storage bpf iterators,
> additional map_id should be shown for fdinfo and
> userspace query. For example, the following is for
> a bpf_map_elem iterator.
> $ cat /proc/1753/fdinfo/9
> pos:0
> flags
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
On Thu, Aug 20, 2020 at 3:50 PM Yonghong Song wrote:
>
> This patch implemented bpf_link callback functions
> show_fdinfo and fill_link_info to support link_query
> interface.
>
> The general interface for show_fdinfo and fill_link_info
> will print/fill the target_name. Each targets can
> registe
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
On 8/20/20 10:28 PM, Jianlin Lv wrote:
bpf_devel_QA.rst:152 The subject prefix information is not accurate, it
should be 'PATCH bpf-next v2'
Also update LLVM version info and add information about
‘-DLLVM_TARGETS_TO_BUILD’ to prompt the developer to build the desired
target.
Signed-off-by: J
On Thu, Aug 20, 2020 at 6:29 PM Carlos Neira wrote:
>
> Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs.
> This change folds test cases into test_progs.
>
> Changes from V6:
> - Rebased changes.
>
> Signed-off-by: Carlos Neira
> ---
Acked-by: Andrii Nakryiko
> tools/
On 8/20/20 5:28 PM, Udip Pant wrote:
This adds a selftest that tests the behavior when a freplace target program
attempts to make a write access on a packet. The expectation is that the read
or write
access is granted based on the program type of the linked program and
not itself (which is of
On 8/20/20 11:13 PM, Yonghong Song wrote:
On 8/20/20 5:28 PM, Udip Pant wrote:
While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we
need to check the program type of the target program to grant the read /
write access to the packet data.
The BPF_PROG_TYPE_EXT type can be u
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-
On 8/20/20 5:28 PM, Udip Pant wrote:
While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we
need to check the program type of the target program to grant the read /
write access to the packet data.
The BPF_PROG_TYPE_EXT type can be used to extend types such as XDP, SKB
and othe
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
Hello,
syzbot found the following issue on:
HEAD commit:18445bf4 Merge tag 'spi-fix-v5.9-rc1' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=162cbd7a90
kernel config: https://syzkaller.appspot.com/x/.config?x=a0437fdd630bee11
das
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
---
drivers/net/wirele
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1]
https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-
dst/src is used multiple times in vxlan_xmit_one function as the variable
name, although its scope is different, but it reduces the readability and
it is unnecessary to use intermediate variables here;
This patch reduces unnecessary assignments and removes redundant variables
Signed-off-by: Jianli
bpf_devel_QA.rst:152 The subject prefix information is not accurate, it
should be 'PATCH bpf-next v2'
Also update LLVM version info and add information about
‘-DLLVM_TARGETS_TO_BUILD’ to prompt the developer to build the desired
target.
Signed-off-by: Jianlin Lv
---
Documentation/bpf/bpf_devel_
On 2020-08-21 11:08 +0800, Coiby Xu wrote:
[...]
> > > diff --git a/drivers/staging/qlge/qlge_health.h
> > > b/drivers/staging/qlge/qlge_health.h
> > > new file mode 100644
> > > index ..07d3bafab845
> > > --- /dev/null
> > > +++ b/drivers/staging/qlge/qlge_health.h
> > > @@ -0,0 +1,2
On 8/20/20 9:36 PM, Stephen Hemminger wrote:
On Thu, 20 Aug 2020 20:52:02 -0700
Roopa Prabhu wrote:
+ if (tb[IFLA_PROTO_DOWN]) {
+ if (rta_getattr_u8(tb[IFLA_PROTO_DOWN]))
+ print_bool(PRINT_ANY,
+"proto_down", " protodown
On 8/20/20 9:46 AM, Christophe JAILLET wrote:
The wrappers in include/linux/pci-dma-compat.h should go away.
The patch has been generated with the coccinelle script below and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.
The only file where some GFP_ fl
On Thu, 20 Aug 2020 20:52:02 -0700
Roopa Prabhu wrote:
> + if (tb[IFLA_PROTO_DOWN]) {
> + if (rta_getattr_u8(tb[IFLA_PROTO_DOWN]))
> + print_bool(PRINT_ANY,
> +"proto_down", " protodown on ", true);
In general my preference is t
From: Roopa Prabhu
This patch adds support for recently
added link IFLA_PROTO_DOWN_REASON attribute.
IFLA_PROTO_DOWN_REASON enumerates reasons
for the already existing IFLA_PROTO_DOWN link
attribute.
$ cat /etc/iproute2/protodown_reasons.d/r.conf
0 mlag
1 evpn
2 vrrp
3 psecurity
$ ip link set d
On Sun, Aug 16, 2020 at 11:57:17AM +0900, Benjamin Poirier wrote:
On 2020-08-15 00:06 +0800, Coiby Xu wrote:
The related code are not necessary because,
- Device status and general registers can be obtained by ethtool.
- Coredump can be done via devlink health reporter.
- Structure related to th
On Sun, Aug 16, 2020 at 11:56:40AM +0900, Benjamin Poirier wrote:
On 2020-08-15 00:05 +0800, Coiby Xu wrote:
Initialize devlink health dump framework for the dlge driver so the
coredump could be done via devlink.
Signed-off-by: Coiby Xu
---
drivers/staging/qlge/Makefile | 2 +-
drivers/
On 2020/8/21 0:02, Jakub Kicinski wrote:
> On Thu, 20 Aug 2020 20:14:32 +0800 Luo bin wrote:
>> +static int hinic_dbg_help(struct hinic_dev *nic_dev, const char *cmd_buf)
>> +{
>> +netif_info(nic_dev, drv, nic_dev->netdev, "Available commands:\n");
>> +netif_info(nic_dev, drv, nic_dev->netd
Add a set of APIs to perf_buffer manage to allow applications to integrate
perf buffer polling into existing epoll-based infrastructure. One example is
applications using libevent already and wanting to plug perf_buffer polling,
instead of relying on perf_buffer__poll() and waste an extra thread to
This patch fixes two main problems seen when removing NetLabel
mappings: memory leaks and potentially extra audit noise.
The memory leaks are caused by not properly free'ing the mapping's
address selector struct when free'ing the entire entry as well as
not properly cleaning up a temporary mapping
Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs.
This change folds test cases into test_progs.
Changes from V6:
- Rebased changes.
Signed-off-by: Carlos Neira
---
tools/testing/selftests/bpf/.gitignore| 1 -
tools/testing/selftests/bpf/Makefile | 3
Add generic VF privilege defines as trust flags, ifla_vf_trust_flags
struct and validation by the kernel of flags configured by drivers.
These are all for use with granular VF Trust flags feature. See known
limitations and gaps in the cover message.
Signed-off-by: Carolyn Wyborny
---
include/l
Implement granular VF trust flags feature in the igb driver. See
known limitations and gaps in cover message.
Signed-off-by: Carolyn Wyborny
---
drivers/net/ethernet/intel/igb/igb.h |2 +-
drivers/net/ethernet/intel/igb/igb_main.c | 21 +++--
2 files changed, 12 inse
Proposal for Granular VF Trust Flags for SR-IOV
I would like to propose extending the concept of VF trust in a more
granular way by creating VF trust flags. VF Trust Flags would allow more
flexibility in assigning privileges to VF's administratively in SR-IOV.
Users are asking for more configurati
Hi all,
After merging the bpf-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:
Auto-detecting system features:
...libelf: [ [31mOFF[m ]
... zlib: [ [31mOFF[m ]
... bpf: [ [32mon[m ]
No li
This adds a selftest that tests the behavior when a freplace target program
attempts to make a write access on a packet. The expectation is that the read
or write
access is granted based on the program type of the linked program and
not itself (which is of type, for e.g., BPF_PROG_TYPE_EXT).
This
While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we
need to check the program type of the target program to grant the read /
write access to the packet data.
The BPF_PROG_TYPE_EXT type can be used to extend types such as XDP, SKB
and others. Since the BPF_PROG_TYPE_EXT program ty
On Fri, 21 Aug 2020 02:04:39 +0300 Vladimir Oltean wrote:
> On Thu, Jul 30, 2020 at 05:30:59PM -0700, Jakub Kicinski wrote:
> > On Thu, 30 Jul 2020 18:53:58 -0400 David Thompson wrote:
> > > +
> > > + /* Tell networking subsystem to poll GigE driver */
> > > + napi_schedule(&priv->napi);
> >
>
Hello,
syzbot found the following issue on:
HEAD commit:9123e3a7 Linux 5.9-rc1
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=144c0c8990
kernel config: https://syzkaller.appspot.com/x/.config?x=3d400a47d1416652
dashboard link: https://syzkaller.appspot
From: Yuusuke Ashizuka
Date: Thu, 20 Aug 2020 18:43:07 +0900
> When this driver is built as a module, I cannot rmmod it after insmoding
> it.
> This is because that this driver calls ravb_mdio_init() at the time of
> probe, and module->refcnt is incremented by alloc_mdio_bitbang() called
> after
From: Luke Hsiao
For TCP tx zero-copy, the kernel notifies the process of completions by
queuing completion notifications on the socket error queue. This patch
allows reading these notifications via recvmsg to support TCP tx
zero-copy.
Ancillary data was originally disallowed due to privilege es
From: Luke Hsiao
Currently, io_uring's recvmsg subscribes to both POLLERR and POLLIN. In
the context of TCP tx zero-copy, this is inefficient since we are only
reading the error queue and not using recvmsg to read POLLIN responses.
This patch was tested by using a simple sending program to call
From: Luke Hsiao
This patch series adds support for reading MSG_ERRQUEUE using the
io_uring interface. Support for this operation allows io_uring to serve
as an alternative to epoll + recvmsg for reading notification
completions for TCP tx zerocopy.
The first patch allows ancillary data to be r
From: Xin Long
Date: Thu, 20 Aug 2020 15:34:47 +0800
> b->media->send_msg() requires rcu_read_lock(), as we can see
> elsewhere in tipc, tipc_bearer_xmit, tipc_bearer_xmit_skb
> and tipc_bearer_bc_xmit().
>
> Syzbot has reported this issue as:
>
> net/tipc/bearer.c:466 suspicious rcu_derefer
From: Alaa Hleihel
Date: Wed, 19 Aug 2020 18:24:10 +0300
> tcf_ct_handle_fragments() shouldn't free the skb when ip_defrag() call
> fails. Otherwise, we will cause a double-free bug.
> In such cases, just return the error to the caller.
>
> Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct")
From: David Laight
Date: Wed, 19 Aug 2020 14:40:52 +
>
> The number of output and input streams was never being reduced, eg when
> processing received INIT or INIT_ACK chunks.
> The effect is that DATA chunks can be sent with invalid stream ids
> and then discarded by the remote system.
>
>
From: Lijun Pan
Date: Wed, 19 Aug 2020 17:52:22 -0500
> This patch series refactor reset_init and init functions,
> and make some other cosmetic changes to make the code
> easier to read and debug. v2 removes __func__ and v1's 1/5.
Series applied, thank you.
On Thu, Aug 20, 2020 at 4:13 PM Andrii Nakryiko wrote:
>
> Complete multi-prog sections and multi sub-prog support in libbpf by properly
> adjusting .BTF.ext's line and function information. Mark exposed
> btf_ext__reloc_func_info() and btf_ext__reloc_func_info() APIs as deprecated.
> These APIs h
From: Geert Uytterhoeven
Date: Wed, 19 Aug 2020 14:45:39 +0200
> - Remove pinctrl consumer properties, as they are handled by core
> dt-schema,
> - Document missing properties,
> - Document missing PHY child node,
> - Add "additionalProperties: false".
>
> Signed-off-by: Geert Uytter
From: Wang Hai
Date: Wed, 19 Aug 2020 10:46:45 +0800
> Remove linux/notifier.h which is included more than once
>
> Reported-by: Hulk Robot
> Signed-off-by: Wang Hai
Applied to net-next, thank you.
From: Mark Tomlinson
Date: Wed, 19 Aug 2020 13:53:58 +1200
> When receiving an IPv4 packet inside an IPv6 GRE packet, and the
> IP6_TNL_F_RCV_DSCP_COPY flag is set on the tunnel, the IPv4 header would
> get corrupted. This is due to the common ip6_tnl_rcv() function assuming
> that the inner head
On Thu, Aug 20, 2020 at 4:13 PM Andrii Nakryiko wrote:
>
> Add a selftest excercising bpf-to-bpf subprogram calls, as well as multiple
> entry-point BPF programs per section. Also make sure that BPF CO-RE works for
> such set ups both for sub-programs and for multi-entry sections.
>
> Signed-off-b
From: Vishal Kulkarni
Date: Wed, 19 Aug 2020 00:25:03 +0530
> Set IP protocol mask only when IP protocol field is set.
> This will allow flow-type ether with vlan rule which don't have
> protocol field to apply.
>
> ethtool -N ens5f4 flow-type ether proto 0x8100 vlan 0x600\
> m 0x1FFF action 3 l
From: Haiyang Zhang
Date: Thu, 20 Aug 2020 14:53:13 -0700
> This patch set includes two fixes for the select_queue process.
Series applied, thank you.
From: Alex Dewar
Date: Thu, 20 Aug 2020 19:32:58 +0100
> In st_nci_hci_connectivity_event_received(), the return value of
> devm_kzalloc() is unnecessarily cast from void*. Remove cast.
>
> Issue identified with Coccinelle.
>
> Signed-off-by: Alex Dewar
Applied.
From: Alex Dewar
Date: Thu, 20 Aug 2020 19:38:36 +0100
> In st21nfca_connectivity_event_received(), the return value of
> devm_kzalloc() is unnecessarily cast from void*. Remove cast.
>
> Issue identified with Coccinelle.
>
> Signed-off-by: Alex Dewar
Applied.
On Thu, Aug 20, 2020 at 03:39:21PM -0700, Mat Martineau wrote:
>
> On Thu, 20 Aug 2020, Martin KaFai Lau wrote:
>
> > The bpf prog needs to parse the SYN header to learn what options have
> > been sent by the peer's bpf-prog before writing its options into SYNACK.
> > This patch adds a "syn_skb"
From: Alex Dewar
Date: Thu, 20 Aug 2020 18:47:25 +0100
> In qed_rdma_destroy_cq() the result of dma_alloc_coherent() is cast from
> void* unnecessarily. Remove cast.
>
> Issue identified with Coccinelle.
>
> Signed-off-by: Alex Dewar
Applied to net-next, thanks.
From: Eric Dumazet
Date: Thu, 20 Aug 2020 10:11:15 -0700
> This series updates tcp_mmap reference tool to use best pratices.
>
> First patch is using madvise(MADV_DONTNEED) to decrease pressure
> on the socket lock.
>
> Last patches try to use huge pages when available.
Series applied, thanks
This patch implements general and correct logic for bpf-to-bpf sub-program
calls. Only sub-programs used (called into) from entry-point (main) BPF
program are going to be appended at the end of main BPF program. This ensures
that BPF verifier won't encounter any dead code due to copying unreference
Adjust struct_ops handling code to work with multi-program ELF sections
properly.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 26 --
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2151bb
bpf_program__title() is deprecated, switch to bpf_program__section_name() and
avoid compilation warnings.
Signed-off-by: Andrii Nakryiko
---
tools/bpf/bpftool/prog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index
Add a selftest excercising bpf-to-bpf subprogram calls, as well as multiple
entry-point BPF programs per section. Also make sure that BPF CO-RE works for
such set ups both for sub-programs and for multi-entry sections.
Signed-off-by: Andrii Nakryiko
---
.../selftests/bpf/prog_tests/subprogs.c
Remove all uses of bpf_program__title() and
bpf_program__find_program_by_title().
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/flow_dissector_load.h | 8 +++-
.../testing/selftests/bpf/prog_tests/reference_tracking.c | 2 +-
tools/testing/selftests/bpf/test_socket_c
Fix up CO-RE relocation code to handle relocations against ELF sections
containing multiple BPF programs. This requires lookup of a BPF program by its
section name and instruction index it contains. While it could have been done
as a simple loop, it could run into performance issues pretty quickly,
There are clearly 4 subtests, so make it official.
Signed-off-by: Andrii Nakryiko
---
.../testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
b/tools/testing/self
Complete multi-prog sections and multi sub-prog support in libbpf by properly
adjusting .BTF.ext's line and function information. Mark exposed
btf_ext__reloc_func_info() and btf_ext__reloc_func_info() APIs as deprecated.
These APIs have simplistic assumption that all sub-programs are going to be
ap
BPF program title is ambigious and misleading term. It is ELF section name, so
let's just call it that and deprecate bpf_program__title() API in favor of
bpf_program__section_name().
Additionally, using bpf_object__find_program_by_title() is now inherently
dangerous and ambiguous, as multiple BPF
Make libbpf logs follow similar pattern and provide more context like section
name or program name, where appropriate. Also, add BPF_INSN_SZ constant and
use it throughout to clean up code a little bit. This commit doesn't have any
functional changes and just removes some code changes out of the wa
From: Eric Dumazet
Date: Thu, 20 Aug 2020 08:43:59 -0700
> Currently, tcp sendmsg(MSG_ZEROCOPY) is building skbs with order-0 fragments.
> Compared to standard sendmsg(), these skbs usually contain up to 16 fragments
> on arches with 4KB page sizes, instead of two.
>
> This adds considerable cos
libbpf ELF parsing logic might need symbols available before ELF parsing is
completed, so we need to make sure that symbols table section is found in
a separate pass before all the subsequent sections are processed.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 40 +
Teach libbpf how to parse code sections into potentially multiple bpf_program
instances, based on ELF FUNC symbols. Each BPF program will keep track of its
position within containing ELF section for translating section instruction
offsets into program instruction offsets: regardless of BPF program'
Skip and don't log ELF sections that libbpf knows about and ignores during ELF
processing. This allows to not unnecessarily log details about those ELF
sections and cleans up libbpf debug log. Ignored sections include DWARF data,
string table, empty .text section and few special (e.g., .llvm_addrsi
Currently, libbpf supports a limited form of BPF-to-BPF subprogram calls. The
restriction is that entry-point BPF program should use *all* of defined
sub-programs in BPF .o file. If any of the subprograms is not used, such
entry-point BPF program will be rejected by verifier as containing unreachab
Factor out common ELF operations done throughout the libbpf. This simplifies
usage across multiple places in libbpf, as well as hide error reporting from
higher-level functions and make error logging more consistent.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 367 +++
There is no need to re-build BPF object files if any of the sources of libbpf
change. So record more precise dependency only on libbpf/bpf_*.h headers. This
eliminates unnecessary re-builds.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 2 +-
1 file changed, 1 inserti
__noinline is pretty frequently used, especially with BPF subprograms, so add
them along the __always_inline, for user convenience and completeness.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_helpers.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/lib/bpf/bpf_helpers.h b
On Thu, Jul 30, 2020 at 05:30:59PM -0700, Jakub Kicinski wrote:
> On Thu, 30 Jul 2020 18:53:58 -0400 David Thompson wrote:
> > +
> > + /* Tell networking subsystem to poll GigE driver */
> > + napi_schedule(&priv->napi);
>
> _irqoff
Hmm, I wouldn't be so sure about this particular advice. Wit
From: Simon Horman
Date: Thu, 20 Aug 2020 16:39:36 +0200
> Louis says:
>
> Add new feature to the Netronome flower driver to enable QinQ offload.
> This needed a bit of gymnastics in order to not break compatibility with
> older firmware as the flow key sent to the firmware had to be updated
> i
This patch implemented bpf_link callback functions
show_fdinfo and fill_link_info to support link_query
interface.
The general interface for show_fdinfo and fill_link_info
will print/fill the target_name. Each targets can
register show_fdinfo and fill_link_info callbacks
to print/fill more target
The link query for bpf iterators is implemented.
Besides being shown to the user what bpf iterator
the link represents, the target_name is also used
to filter out what additional information should be
printed out, e.g., whether map_id should be shown or not.
The following is an example of bpf_iter
"link" has been an important concept for bpf ecosystem to connect
bpf program with other properties. Currently, the information related
information can be queried from userspace through bpf command
BPF_LINK_GET_NEXT_ID, BPF_LINK_GET_FD_BY_ID and BPF_OBJ_GET_INFO_BY_FD.
The information is also avail
For bpf_map_elem and bpf_sk_local_storage bpf iterators,
additional map_id should be shown for fdinfo and
userspace query. For example, the following is for
a bpf_map_elem iterator.
$ cat /proc/1753/fdinfo/9
pos:0
flags: 0200
mnt_id: 14
link_type: iter
link_id:34
From: David Thompson
Date: Thu, 20 Aug 2020 18:51:39 +
> When I wrote the Kconfig definition I was thinking that "INET" is an
> obvious functional dependency for an Ethernet driver.
People can and should be able to use your driver even if ipv4/ipv6 is
disabled, don't you think?
> Yes, the m
From: Antony Antony
Date: Thu, 20 Aug 2020 20:35:49 +0200
> Redacting secret is a FIPS 140-2 requirement.
Why not control this via the kernel lockdown mode rather than making
an ad-hoc API for this?
On Thu, 20 Aug 2020, Martin KaFai Lau wrote:
The bpf prog needs to parse the SYN header to learn what options have
been sent by the peer's bpf-prog before writing its options into SYNACK.
This patch adds a "syn_skb" arg to tcp_make_synack() and send_synack().
This syn_skb will eventually be ma
On Thu, Aug 20, 2020 at 09:15:30AM -0700, Yonghong Song wrote:
>
>
> On 8/20/20 8:07 AM, Jakub Kicinski wrote:
> > On Wed, 19 Aug 2020 17:13:23 -0700 Yonghong Song wrote:
> > > + fill_link_info = iter_link->tinfo->reg_info->fill_link_info;
> > > + if (fill_link_info)
> > > + return fill_l
On Thu, Aug 20, 2020 at 3:29 AM Jakub Sitnicki wrote:
>
> On Tue, Aug 18, 2020 at 08:19 PM CEST, Alexei Starovoitov wrote:
> > On Tue, Aug 18, 2020 at 8:49 AM Jakub Sitnicki wrote:
> >> : rcu_read_lock();
> >> : run_array =
> >> rcu_der
On Tue, Aug 18, 2020 at 10:12:05AM +0100, Alan Maguire wrote:
>
> Fair enough. I'm thinking a helper like
>
> long bpf_btf_snprintf(char *str, u32 str_size, struct btf_ptr *ptr,
> u32 ptr_size, u64 flags);
>
> Then the user can choose perf event or ringbuf interfaces
> to sha
On Thu, Aug 20, 2020 at 7:27 AM Carlos Neira wrote:
>
> Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs.
> This change folds both tests into test_progs.
>
> Changes from V5:
> - Fold both tests into test_progs.
>
> Signed-off-by: Carlos Neira
It doesn't apply. Pls rebas
netvsc_vf_xmit() / dev_queue_xmit() will call VF NIC’s ndo_select_queue
or netdev_pick_tx() again. They will use skb_get_rx_queue() to get the
queue number, so the “skb->queue_mapping - 1” will be used. This may
cause the last queue of VF not been used.
Use skb_record_rx_queue() here, so that the
1 - 100 of 309 matches
Mail list logo