On Mon, Apr 27, 2020 at 1:19 PM Yonghong Song wrote:
>
> A new bpf command BPF_ITER_CREATE is added.
>
> The anonymous bpf iterator is seq_file based.
> The seq_file private data are referenced by targets.
> The bpf_iter infrastructure allocated additional space
> at seq_file->private after the sp
On Tue, Apr 28, 2020 at 11:49:34PM -0700, Alexei Starovoitov wrote:
> On Tue, Apr 28, 2020 at 11:47 PM Christoph Hellwig wrote:
> >
> > On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > Today's linux-next merge of the akpm-current tree got a conflict in:
>
On 4/28/20 11:34 PM, Martin KaFai Lau wrote:
On Tue, Apr 28, 2020 at 11:20:30PM -0700, Yonghong Song wrote:
On 4/28/20 11:08 PM, Andrii Nakryiko wrote:
On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
On 4/28/20 6:15 PM, Yonghong Son
On Tue, Apr 28, 2020 at 11:47 PM Christoph Hellwig wrote:
>
> On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > Today's linux-next merge of the akpm-current tree got a conflict in:
> >
> > kernel/sysctl.c
> >
> > between commit:
> >
> > f461d2dcd511 ("sysctl
On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> kernel/sysctl.c
>
> between commit:
>
> f461d2dcd511 ("sysctl: avoid forward declarations")
>
> from the bpf-next tree and commits:
Hmm,
Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
~/selftests/bpf# ./test_progs -t enable_stats -v
test_enable_stats:PASS:skel_open_and_load 0 nsec
test_enable_stats:PASS:get_stats_fd 0 nsec
test_enable_stats:PASS:attach_raw_tp 0 nsec
test_enable_stats:PASS:get_prog_info 0 nse
bpf_enable_stats() is added to enable given stats.
Signed-off-by: Song Liu
---
tools/lib/bpf/bpf.c | 10 ++
tools/lib/bpf/bpf.h | 1 +
tools/lib/bpf/libbpf.map | 1 +
3 files changed, 12 insertions(+)
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 8f2f0958d446.
Currently, sysctl kernel.bpf_stats_enabled controls BPF runtime stats.
Typical userspace tools use kernel.bpf_stats_enabled as follows:
1. Enable kernel.bpf_stats_enabled;
2. Check program run_time_ns;
3. Sleep for the monitoring period;
4. Check program run_time_ns again, calculate the di
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
kernel/sysctl.c
between commit:
f461d2dcd511 ("sysctl: avoid forward declarations")
from the bpf-next tree and commits:
0fe73f87ba37 ("parisc: add sysctl file interface panic_on_stackoverflow")
631b6d13906c (
run_time_ns is a useful stats for BPF programs. However, it is gated by
sysctl kernel.bpf_stats_enabled. When multiple user space tools are
toggling kernl.bpf_stats_enabled at the same time, they may confuse each
other.
Solve this problem with a new BPF command BPF_ENABLE_STATS.
Changes v7 => v8:
Tue, Apr 28, 2020 at 10:43:24PM CEST, jacob.e.kel...@intel.com wrote:
>Add support to request that a new snapshot be taken immediately for
>a devlink region. To avoid confusion, the desired snapshot id must be
>provided.
>
>Note that if a region does not support snapshots on demand, the kernel
>wil
On 4/28/20 11:40 PM, Andrii Nakryiko wrote:
On Tue, Apr 28, 2020 at 11:30 PM Alexei Starovoitov wrote:
On 4/28/20 11:20 PM, Yonghong Song wrote:
On 4/28/20 11:08 PM, Andrii Nakryiko wrote:
On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
On 4/28/20 7:44 PM, Alexei Starovoitov
On Tue, Apr 28, 2020 at 11:32:15PM -0700, Andrii Nakryiko wrote:
> On Tue, Apr 28, 2020 at 10:59 PM Martin KaFai Lau wrote:
> >
> > On Tue, Apr 28, 2020 at 10:04:54PM -0700, Yonghong Song wrote:
> > >
> > >
> > > On 4/28/20 6:32 PM, Martin KaFai Lau wrote:
> > > > On Mon, Apr 27, 2020 at 01:12:41P
On Tue, Apr 28, 2020 at 11:30 PM Alexei Starovoitov wrote:
>
> On 4/28/20 11:20 PM, Yonghong Song wrote:
> >
> >
> > On 4/28/20 11:08 PM, Andrii Nakryiko wrote:
> >> On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
> >>>
> >>>
> >>>
> >>> On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
>
On Tue, Apr 28, 2020 at 11:20:30PM -0700, Yonghong Song wrote:
>
>
> On 4/28/20 11:08 PM, Andrii Nakryiko wrote:
> > On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
> > >
> > >
> > >
> > > On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
> > > > On 4/28/20 6:15 PM, Yonghong Song wrote:
> >
On Tue, Apr 28, 2020 at 10:59 PM Martin KaFai Lau wrote:
>
> On Tue, Apr 28, 2020 at 10:04:54PM -0700, Yonghong Song wrote:
> >
> >
> > On 4/28/20 6:32 PM, Martin KaFai Lau wrote:
> > > On Mon, Apr 27, 2020 at 01:12:41PM -0700, Yonghong Song wrote:
> > > > Added BPF_LINK_UPDATE support for tracing
On 4/28/20 11:20 PM, Yonghong Song wrote:
On 4/28/20 11:08 PM, Andrii Nakryiko wrote:
On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
On 4/28/20 6:15 PM, Yonghong Song wrote:
On 4/28/20 5:48 PM, Alexei Starovoitov wrote:
On 4/28/20
On Mon, Apr 27, 2020 at 1:13 PM Yonghong Song wrote:
>
> Given a bpf program, the step to create an anonymous bpf iterator is:
> - create a bpf_iter_link, which combines bpf program and the target.
> In the future, there could be more information recorded in the link.
> A link_fd will be
On 4/28/20 11:08 PM, Andrii Nakryiko wrote:
On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
On 4/28/20 6:15 PM, Yonghong Song wrote:
On 4/28/20 5:48 PM, Alexei Starovoitov wrote:
On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
+pro
On Tue, Apr 28, 2020 at 10:10 PM Yonghong Song wrote:
>
>
>
> On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
> > On 4/28/20 6:15 PM, Yonghong Song wrote:
> >>
> >>
> >> On 4/28/20 5:48 PM, Alexei Starovoitov wrote:
> >>> On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
> > +prog = bpf_iter_get_p
On Mon, Apr 27, 2020 at 1:18 PM Yonghong Song wrote:
>
> The bpf_map iterator is implemented.
> The bpf program is called at seq_ops show() and stop() functions.
> bpf_iter_get_prog() will retrieve bpf program and other
> parameters during seq_file object traversal. In show() function,
> bpf progr
On Tue, Apr 28, 2020 at 10:04:54PM -0700, Yonghong Song wrote:
>
>
> On 4/28/20 6:32 PM, Martin KaFai Lau wrote:
> > On Mon, Apr 27, 2020 at 01:12:41PM -0700, Yonghong Song wrote:
> > > Added BPF_LINK_UPDATE support for tracing/iter programs.
> > > This way, a file based bpf iterator, which holds
Wed, Apr 29, 2020 at 03:42:48AM CEST, k...@kernel.org wrote:
>Currently users have to choose a free snapshot id before
>calling DEVLINK_CMD_REGION_NEW. This is potentially racy
>and inconvenient.
>
>Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try
>to allocate id automatically. Send a mess
On Mon, Apr 27, 2020 at 01:12:42PM -0700, Yonghong Song wrote:
> A new bpf command BPF_ITER_CREATE is added.
>
> The anonymous bpf iterator is seq_file based.
> The seq_file private data are referenced by targets.
> The bpf_iter infrastructure allocated additional space
> at seq_file->private afte
On Mon, Apr 27, 2020 at 1:13 PM Yonghong Song wrote:
>
> Refactor assignment of "net" in seq_net_private structure
> in proc_net.c to a helper function. The helper later will
> be used by bpfdump.
typo: bpfdump -> bpf_iter ?
Otherwise:
Acked-by: Andrii Nakryiko
>
> Signed-off-by: Yonghong Son
On Mon, Apr 27, 2020 at 03:48:07PM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Apr 27, 2020 at 08:02:38PM +0530, Calvin Johnson wrote:
> > On Mon, Apr 27, 2020 at 02:58:20PM +0100, Russell King - ARM Linux admin
> > wrote:
> > > On Mon, Apr 27, 2020 at 06:54:06PM +0530, Calvin Johnson w
> On Apr 28, 2020, at 10:32 PM, Andrii Nakryiko
> wrote:
>
> On Tue, Apr 28, 2020 at 8:59 PM Song Liu wrote:
>>
>> bpf_enable_stats() is added to enable given stats.
>>
>> Signed-off-by: Song Liu
>> ---
>> tools/lib/bpf/bpf.c | 10 ++
>> tools/lib/bpf/bpf.h | 1 +
>> tool
Stanislav Fomichev wrote:
> Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the
> 'struct bpf_sock_ops' context in BPF_PROG_TYPE_CGROUP_SOCKOPT program.
> Let's generalize them and make the first argument be 'struct bpf_sock'.
> That way, in the future, we can allow those helpers in
On Tue, Apr 28, 2020 at 8:59 PM Song Liu wrote:
>
> bpf_enable_stats() is added to enable given stats.
>
> Signed-off-by: Song Liu
> ---
> tools/lib/bpf/bpf.c | 10 ++
> tools/lib/bpf/bpf.h | 1 +
> tools/lib/bpf/libbpf.map | 5 +
> 3 files changed, 16 insertions(+)
>
> d
> On Apr 28, 2020, at 9:57 PM, Alexei Starovoitov
> wrote:
>
> On Tue, Apr 28, 2020 at 08:58:41PM -0700, Song Liu wrote:
>> +
>> +skel = test_enable_stats__open_and_load();
>> +if (CHECK(!skel, "skel_open_and_load", "skeleton open/load failed\n"))
>> +return;
>> +
>> +
On 4/28/20 7:44 PM, Alexei Starovoitov wrote:
On 4/28/20 6:15 PM, Yonghong Song wrote:
On 4/28/20 5:48 PM, Alexei Starovoitov wrote:
On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
+ prog = bpf_iter_get_prog(seq, sizeof(struct
bpf_iter_seq_map_info),
+ &meta.session_id, &m
On 4/28/20 6:32 PM, Martin KaFai Lau wrote:
On Mon, Apr 27, 2020 at 01:12:41PM -0700, Yonghong Song wrote:
Added BPF_LINK_UPDATE support for tracing/iter programs.
This way, a file based bpf iterator, which holds a reference
to the link, can have its bpf program updated without
creating new f
On Tue, Apr 28, 2020 at 08:58:41PM -0700, Song Liu wrote:
> +
> + skel = test_enable_stats__open_and_load();
> + if (CHECK(!skel, "skel_open_and_load", "skeleton open/load failed\n"))
> + return;
> +
> + stats_fd = bpf_enable_stats(BPF_STATS_RUNTIME_CNT);
Just realized that
On Tue, Apr 28, 2020 at 09:31:10PM -0700, Joe Perches wrote:
> On Wed, 2020-04-29 at 00:04 -0400, Rylan Dmello wrote:
> > Fix checkpatch.pl warnings:
> >
> > WARNING: Avoid multiple line dereference - prefer 'qdev->func'
> > WARNING: Avoid multiple line dereference - prefer 'qdev->flags'
>
>
On 4/28/2020 9:38 PM, Oleksij Rempel wrote:
> @Rob, thank you for the review.
>
> @David, should I send fixes or reworked initial patches?
You need to send incremental patches, once David applies the patches,
they are part of the git history for the trees he maintains.
--
Florian
On Tue, Apr 28, 2020 at 08:58:39PM -0700, Song Liu wrote:
> +
> +static int bpf_enable_stats(union bpf_attr *attr)
> +{
CHECK_ATTR() is missing which makes it non-extensible.
> + switch (attr->enable_stats.type) {
> + case BPF_STATS_RUNTIME_CNT:
> + return bpf_enable_runtime_s
@Rob, thank you for the review.
@David, should I send fixes or reworked initial patches?
On Tue, Apr 28, 2020 at 12:30:06PM -0500, Rob Herring wrote:
> On Fri, Mar 13, 2020 at 12:23 AM Oleksij Rempel
> wrote:
> >
> > Document the NXP TJA11xx PHY bindings.
>
> Given the discussion, I'd marked t
On Wed, 2020-04-29 at 00:04 -0400, Rylan Dmello wrote:
> Fix checkpatch.pl warnings:
>
> WARNING: Avoid multiple line dereference - prefer 'qdev->func'
> WARNING: Avoid multiple line dereference - prefer 'qdev->flags'
Assuming you are doing this for exercise:
It'd be better to unindent all t
On 4/28/2020 4:06 PM, Michael Walle wrote:
> This PHY has two PHY IDs depending on its mode. Adjust the mask so that
> it includes both IDs.
>
> Signed-off-by: Michael Walle
Reviewed-by: Florian Fainelli
For future submissions to netdev, if you have a patch count > 1, please
include a cover
fix coccinelle warning, use ARRAY_SIZE
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use
ARRAY_SIZE
--
v1-->v2:
remove cmd_number
Reported-by: Hulk Robot
Signed-off-by: Zou Wei
---
drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 8 +++-
1 file changed,
Fix checkpatch.pl check:
CHECK: Alignment should match open parenthesis
Signed-off-by: Rylan Dmello
---
drivers/staging/qlge/qlge_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 0edeea525f
Fix checkpatch.pl warning:
WARNING: suspect code indent for conditional statements (16, 23)
Signed-off-by: Rylan Dmello
---
drivers/staging/qlge/qlge_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.
Fix checkpatch.pl warnings:
WARNING: Avoid multiple line dereference - prefer 'qdev->func'
WARNING: Avoid multiple line dereference - prefer 'qdev->flags'
Signed-off-by: Rylan Dmello
---
drivers/staging/qlge/qlge_main.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --
Currently, sysctl kernel.bpf_stats_enabled controls BPF runtime stats.
Typical userspace tools use kernel.bpf_stats_enabled as follows:
1. Enable kernel.bpf_stats_enabled;
2. Check program run_time_ns;
3. Sleep for the monitoring period;
4. Check program run_time_ns again, calculate the di
run_time_ns is a useful stats for BPF programs. However, it is gated by
sysctl kernel.bpf_stats_enabled. When multiple user space tools are
toggling kernl.bpf_stats_enabled at the same time, they may confuse each
other.
Solve this problem with a new BPF command BPF_ENABLE_STATS.
Changes v6 => v7:
Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
~/selftests/bpf# ./test_progs -t enable_stats -v
test_enable_stats:PASS:skel_open_and_load 0 nsec
test_enable_stats:PASS:get_stats_fd 0 nsec
test_enable_stats:PASS:attach_raw_tp 0 nsec
test_enable_stats:PASS:get_prog_info 0 nse
bpf_enable_stats() is added to enable given stats.
Signed-off-by: Song Liu
---
tools/lib/bpf/bpf.c | 10 ++
tools/lib/bpf/bpf.h | 1 +
tools/lib/bpf/libbpf.map | 5 +
3 files changed, 16 insertions(+)
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 5cc1b0785
Hi Joe,
Thanks for your comments, I will modify and send the v2
On 2020/4/29 11:23, Joe Perches wrote:
On Wed, 2020-04-29 at 11:15 +0800, Zou Wei wrote:
fix coccinelle warning, use ARRAY_SIZE
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use
ARRAY_SIZE
Reported-by: Hulk
From: Yonglong Liu
This patch adds support for reading the optical module eeprom
info via "ethtool -m".
Signed-off-by: Yonglong Liu
Signed-off-by: Huazhong Tan
---
V2: replace self-defined macro with the SFF8024_ID_* in sfp.h
suggested by Jakub Kicinski.
---
drivers/net/ethernet/hisilicon
From: David Miller Sent: Wednesday, April 29, 2020 11:35
AM
> From: Andy Duan
> Date: Wed, 29 Apr 2020 01:55:35 +
>
> > From: David Miller Sent: Wednesday, April 29,
> > 2020 5:34 AM
> >> From: Andrew Lunn
> >> Date: Tue, 28 Apr 2020 19:58:33 +0200
> >>
> >> > The change to polled IO for
From: Andy Duan
Date: Wed, 29 Apr 2020 01:55:35 +
> From: David Miller Sent: Wednesday, April 29, 2020 5:34
> AM
>> From: Andrew Lunn
>> Date: Tue, 28 Apr 2020 19:58:33 +0200
>>
>> > The change to polled IO for MDIO completion assumes that MII events
>> > are only generated for MDIO trans
On Tue, Apr 28, 2020 at 11:57:19AM -0700, Stanislav Fomichev wrote:
> Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the
> 'struct bpf_sock_ops' context in BPF_PROG_TYPE_CGROUP_SOCKOPT program.
> Let's generalize them and make the first argument be 'struct bpf_sock'.
> That way, in
Fixes coccicheck warnings:
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:452:17-24: WARNING
opportunity for kmemdup
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:458:23-30: WARNING
opportunity for kmemdup
Reported-by: Hulk Robot
Signed-off-by: Zou Wei
---
drivers/net/ethernet/huawe
On Wed, 2020-04-29 at 11:15 +0800, Zou Wei wrote:
> fix coccinelle warning, use ARRAY_SIZE
>
> drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use
> ARRAY_SIZE
>
> Reported-by: Hulk Robot
> Signed-off-by: Zou Wei
> ---
> drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 3
fix coccinelle warning, use ARRAY_SIZE
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use
ARRAY_SIZE
Reported-by: Hulk Robot
Signed-off-by: Zou Wei
---
drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dr
syzbot suspects this bug was fixed by commit:
commit 0d1c3530e1bd38382edef72591b78e877e0edcd3
Author: Cong Wang
Date: Thu Mar 12 05:42:28 2020 +
net_sched: keep alloc_hash updated after hash allocation
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15e7415410
start c
On Tue, Apr 28, 2020 at 06:21:00PM -0700, Andrii Nakryiko wrote:
> Add necessary infra to build selftests with ASAN (or any other sanitizer). Fix
> a bunch of found memory leaks and other memory access issues.
>
> v1->v2:
> - don't add ASAN flavor, but allow extra flags for build (Alexei);
> -
platform_get_resource() may fail and return NULL, so we should
better check it's return value to avoid a NULL pointer dereference
since devm_ioremap() does not check input parameters for null.
This is detected by Coccinelle semantic patch.
@@
expression pdev, res, n, t, e, e1, e2;
@@
res = \(pla
On 4/28/20 6:15 PM, Yonghong Song wrote:
On 4/28/20 5:48 PM, Alexei Starovoitov wrote:
On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
+ prog = bpf_iter_get_prog(seq, sizeof(struct
bpf_iter_seq_map_info),
+ &meta.session_id, &meta.seq_num,
+ v == (void *)0);
F
Hi Sam,
On Sat, Apr 25, 2020 at 8:53 PM Sam Ravnborg wrote:
>
> Hi Masahiro
>
> On Thu, Apr 23, 2020 at 04:39:13PM +0900, Masahiro Yamada wrote:
> >
> > Several Makefiles use 'hostprogs' for building the code for
> > the host architecture is not appropriate.
> >
> > This is just because Kbuild do
> On Apr 28, 2020, at 5:43 PM, Alexei Starovoitov
> wrote:
>
> On Tue, Apr 28, 2020 at 05:33:54PM -0700, Yonghong Song wrote:
>>
>>
>> On 4/28/20 5:29 PM, Song Liu wrote:
>>> Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
>>>
>>> ~/selftests/bpf# ./test_progs -t ena
Commit d5b90e99e1d5 ("devlink: report 0 after hitting end in region read")
fixed region dump, but region read still returns a spurious error:
$ devlink region read netdevsim/netdevsim1/dummy snapshot 0 addr 0 len 128
a6 f4 c4 1c 21 35 95 a6 9d 34 c3 5b 87 5b 35 79
0010
From: David Miller Sent: Wednesday, April 29, 2020 5:34 AM
> From: Andrew Lunn
> Date: Tue, 28 Apr 2020 19:58:33 +0200
>
> > The change to polled IO for MDIO completion assumes that MII events
> > are only generated for MDIO transactions. However on some SoCs writing
> > to the MII_SPEED registe
On Wed, Apr 29, 2020 at 03:38:43AM +0300, Kirill A. Shutemov wrote:
> On Wed, Feb 13, 2019 at 02:55:40AM +0100, Jesper Dangaard Brouer wrote:
> > The page_pool API is using page->private to store DMA addresses.
> > As pointed out by David Miller we can't use that on 32-bit architectures
> > with 64
From: Andrew Lunn Sent: Wednesday, April 29, 2020 1:59 AM
> The change to polled IO for MDIO completion assumes that MII events are
> only generated for MDIO transactions. However on some SoCs writing to the
> MII_SPEED register can also trigger an MII event. As a result, the next MDIO
> read has
Fix sparse warnings:
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c:601:6: warning: symbol
'dump_mox_reg' was not declared. Should it be static?
Reported-by: Hulk Robot
Signed-off-by: Zheng Bin
---
drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c | 2 +-
1 file changed, 1 insertion(+), 1
On 2020/4/29 2:49, Jakub Kicinski wrote:
On Tue, 28 Apr 2020 19:58:25 +0800 Huazhong Tan wrote:
From: Yonglong Liu
This patch adds support for reading the optical module eeprom
info via "ethtool -m".
Signed-off-by: Yonglong Liu
Signed-off-by: Huazhong Tan
diff --git a/drivers/net/ethe
Currently users have to choose a free snapshot id before
calling DEVLINK_CMD_REGION_NEW. This is potentially racy
and inconvenient.
Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try
to allocate id automatically. Send a message back to the
caller with the snapshot info.
The message carryin
From: Andrew Lunn Sent: Wednesday, April 29, 2020 2:02 AM
> On Tue, Apr 28, 2020 at 07:58:33PM +0200, Andrew Lunn wrote:
> > The change to polled IO for MDIO completion assumes that MII events
> > are only generated for MDIO transactions. However on some SoCs writing
> > to the MII_SPEED register
On Mon, Apr 27, 2020 at 01:12:41PM -0700, Yonghong Song wrote:
> Added BPF_LINK_UPDATE support for tracing/iter programs.
> This way, a file based bpf iterator, which holds a reference
> to the link, can have its bpf program updated without
> creating new files.
>
> Signed-off-by: Yonghong Song
>
On 4/28/20 5:54 PM, Martin KaFai Lau wrote:
On Mon, Apr 27, 2020 at 01:12:39PM -0700, Yonghong Song wrote:
A bpf_iter program is a tracing program with attach type
BPF_TRACE_ITER. The load attribute
attach_btf_id
is used by the verifier against a particular kernel function,
e.g., __bpf_ite
Fold stand-alone test_hashmap test into test_progs.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/.gitignore| 2 -
tools/testing/selftests/bpf/Makefile | 2 +-
.../{test_hashmap.c => prog_tests/hashmap.c} | 280 +-
3 files changed, 140 inser
Free test selector substrings, which were strdup()'ed.
Fixes: b65053cd94f4 ("selftests/bpf: Add whitelist/blacklist of test names to
test_progs")
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/test_progs.c | 20
1 file changed, 16 insertions(+), 4 deletions(
Another one found by AddressSanitizer. input_len is bigger than actually
initialized data size.
Fixes: c7566a69695c ("selftests/bpf: Add field existence CO-RE relocs tests")
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/prog_tests/core_reloc.c | 2 +-
1 file changed, 1 insertion
Ensure that test runner flavors include their own skeletons from /
directory. Previously, skeletons generated for no-flavor test_progs were used.
Apart from fixing correctness, this also makes it possible to compile only
flavors individually:
$ make clean && make test_progs-no_alu32
... now su
If condition is inverted, but it's also just not necessary.
Cc: Carlos Neira
Fixes: 1c1052e0140a ("tools/testing/selftests/bpf: Add self-tests for new
helper bpf_get_ns_current_pid_tgid.")
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c | 5 +
Add ability to specify extra compiler flags with SAN_CFLAGS for compilation of
all user-space C files. This allows to build all of selftest programs with,
e.g., custom sanitizer flags, without requiring support for such sanitizers
from anyone compiling selftest/bpf.
As an example, to compile ever
AddressSanitizer assumes that all memory dereferences are done against memory
allocated by sanitizer's malloc()/free() code and not touched by anyone else.
Seems like this doesn't hold for perf buffer memory. Disable instrumentation
on perf buffer callback function.
Signed-off-by: Andrii Nakryiko
getline() allocates string, which has to be freed.
Cc: Song Liu
Fixes: 81f77fd0deeb ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID")
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/test_progs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftest
BTF object wasn't freed.
Cc: KP Singh
Fixes: a6ed02cac690 ("libbpf: Load btf_vmlinux only once per object.")
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 8e
With recent changes, runqslower is being copied into selftests/bpf root
directory. So add it into .gitignore.
Cc: Veronika Kabatova
Fixes: b26d1e2b6028 ("selftests/bpf: Copy runqslower to OUTPUT directory")
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/.gitignore | 2 +-
1 file
Fix memory leak in hashmap_clear() not freeing hashmap_entry structs for each
of the remaining entries. Also NULL-out bucket list to prevent possible
double-free between hashmap__clear() and hashmap__free().
Running test_progs-asan flavor clearly showed this problem.
Cc: Alston Tang
Reported-by:
Add necessary infra to build selftests with ASAN (or any other sanitizer). Fix
a bunch of found memory leaks and other memory access issues.
v1->v2:
- don't add ASAN flavor, but allow extra flags for build (Alexei);
- fix few more found issues, which somehow were missed first time.
Andrii Nak
On Mon, Apr 27, 2020 at 01:12:40PM -0700, Yonghong Song wrote:
> Given a bpf program, the step to create an anonymous bpf iterator is:
> - create a bpf_iter_link, which combines bpf program and the target.
> In the future, there could be more information recorded in the link.
> A link_fd
On 4/28/20 5:48 PM, Alexei Starovoitov wrote:
On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
+ prog = bpf_iter_get_prog(seq, sizeof(struct bpf_iter_seq_map_info),
+ &meta.session_id, &meta.seq_num,
+ v == (void *)0);
From looking at seq_file.c, when will show
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:792:6: warning: variable
‘func_id’ set but not used [-Wunused-but-set-variable]
It is introduced by commit 7dd29ee12865 ("hinic:
add sriov feature support"), but never used,
so remove it.
Reported-by:
On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
On Mon, Apr 27, 2020 at 01:12:37PM -0700, Yonghong Song wrote:
The bpf_map iterator is implemented.
The bpf program is called at seq_ops show() and stop() functions.
bpf_iter_get_prog() will retrieve bpf program and other
parameters during seq_file
Hello,
syzbot found the following crash on:
HEAD commit:3f2eaebb bpf, riscv: Fix tail call count off by one in RV3..
git tree: bpf-next
console output: https://syzkaller.appspot.com/x/log.txt?x=120d180810
kernel config: https://syzkaller.appspot.com/x/.config?x=3b755b963c64ac09
das
On Mon, Apr 27, 2020 at 01:12:39PM -0700, Yonghong Song wrote:
> A bpf_iter program is a tracing program with attach type
> BPF_TRACE_ITER. The load attribute
> attach_btf_id
> is used by the verifier against a particular kernel function,
> e.g., __bpf_iter__bpf_map in our previous bpf_map iterat
On 4/28/20 5:37 PM, Martin KaFai Lau wrote:
+ prog = bpf_iter_get_prog(seq, sizeof(struct bpf_iter_seq_map_info),
+&meta.session_id, &meta.seq_num,
+v == (void *)0);
From looking at seq_file.c, when will show() be called with
On Tue, Apr 28, 2020 at 05:33:54PM -0700, Yonghong Song wrote:
>
>
> On 4/28/20 5:29 PM, Song Liu wrote:
> > Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
> >
> > ~/selftests/bpf# ./test_progs -t enable_stats -v
> > test_enable_stats:PASS:skel_open_and_load 0 nsec
> > t
On Wed, Feb 13, 2019 at 02:55:40AM +0100, Jesper Dangaard Brouer wrote:
> The page_pool API is using page->private to store DMA addresses.
> As pointed out by David Miller we can't use that on 32-bit architectures
> with 64-bit DMA
>
> This patch adds a new dma_addr_t struct to allow storing DMA a
On Mon, Apr 27, 2020 at 01:12:37PM -0700, Yonghong Song wrote:
> The bpf_map iterator is implemented.
> The bpf program is called at seq_ops show() and stop() functions.
> bpf_iter_get_prog() will retrieve bpf program and other
> parameters during seq_file object traversal. In show() function,
> bp
On Tue, Apr 28, 2020 at 05:27:36PM -0700, Andrii Nakryiko wrote:
> This patch set teaches libbpf how to declare and initialize ARRAY_OF_MAPS and
> HASH_OF_MAPS maps. See patch #3 for all the details.
>
> Patch #1 refactors parsing BTF definition of map to re-use it cleanly for
> inner map definiti
On 4/28/20 5:29 PM, Song Liu wrote:
Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
~/selftests/bpf# ./test_progs -t enable_stats -v
test_enable_stats:PASS:skel_open_and_load 0 nsec
test_enable_stats:PASS:get_stats_fd 0 nsec
test_enable_stats:PASS:attach_raw_tp 0 nsec
On Tue, Apr 28, 2020 at 05:16:04PM -0700, Andrii Nakryiko wrote:
> This patch series adds various observability APIs to bpf_link:
> - each bpf_link now gets ID, similar to bpf_map and bpf_prog, by which
> user-space can iterate over all existing bpf_links and create limited FD
> from ID;
run_time_ns is a useful stats for BPF programs. However, it is gated by
sysctl kernel.bpf_stats_enabled. When multiple user space tools are
toggling kernl.bpf_stats_enabled at the same time, they may confuse each
other.
Solve this problem with a new BPF command BPF_ENABLE_STATS.
Changes v5 => v6:
Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
~/selftests/bpf# ./test_progs -t enable_stats -v
test_enable_stats:PASS:skel_open_and_load 0 nsec
test_enable_stats:PASS:get_stats_fd 0 nsec
test_enable_stats:PASS:attach_raw_tp 0 nsec
test_enable_stats:PASS:get_prog_info 0 ns
Currently, sysctl kernel.bpf_stats_enabled controls BPF runtime stats.
Typical userspace tools use kernel.bpf_stats_enabled as follows:
1. Enable kernel.bpf_stats_enabled;
2. Check program run_time_ns;
3. Sleep for the monitoring period;
4. Check program run_time_ns again, calculate the di
bpf_enable_stats() is added to enable given stats.
Signed-off-by: Song Liu
---
tools/lib/bpf/bpf.c | 10 ++
tools/lib/bpf/bpf.h | 1 +
tools/lib/bpf/libbpf.map | 5 +
3 files changed, 16 insertions(+)
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 5cc1b0785
1 - 100 of 349 matches
Mail list logo