From: Ido Schimmel
Jiri says:
Add 400Gbps bits to ethtool and introduce support in mlxsw. These modes
are supported by the Spectrum-2 switch ASIC.
Jiri Pirko (2):
ethtool: Add support for 400Gbps (50Gbps per lane) link modes
mlxsw: spectrum: Add support for 400Gbps (50Gbps per lane) link mo
From: Jiri Pirko
Extend speed support with 400Gbps
Signed-off-by: Jiri Pirko
Signed-off-by: Ido Schimmel
---
drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 +
.../net/ethernet/mellanox/mlxsw/spectrum.c| 52 +++
2 files changed, 43 insertions(+), 10 deletions(-)
diff -
From: Jiri Pirko
Signed-off-by: Jiri Pirko
Signed-off-by: Ido Schimmel
---
drivers/net/phy/phy-core.c | 10 +-
include/uapi/linux/ethtool.h | 6 ++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index 941266
On Wed, 9 Oct 2019 15:41:03 -0700, Eric Dumazet wrote:
> sk->sk_backlog.len can be written by BH handlers, and read
> from process contexts in a lockless way.
>
> Note the write side should also use WRITE_ONCE() or a variant.
> We need some agreement about the best way to do this.
>
> syzbot rep
On Wed, 9 Oct 2019 15:32:35 -0700, Eric Dumazet wrote:
> sock_rcvlowat() or int_sk_rcvlowat() might be called without the socket
> lock for example from tcp_poll().
>
> Use READ_ONCE() to document the fact that other cpus might change
> sk->sk_rcvlowat under us and avoid KCSAN splats.
>
> Use WR
On Wed, 9 Oct 2019 15:21:13 -0700, Eric Dumazet wrote:
> sk_add_backlog() callers usually read sk->sk_rcvbuf without
> owning the socket lock. This means sk_rcvbuf value can
> be changed by other cpus, and KCSAN complains.
>
> Add READ_ONCE() annotations to document the lockless nature
> of these
On Wed, 9 Oct 2019 14:51:20 -0700, Eric Dumazet wrote:
> reqsk_queue_empty() is called from inet_csk_listen_poll() while
> other cpus might write ->rskq_accept_head value.
>
> Use {READ|WRITE}_ONCE() to avoid compiler tricks
> and potential KCSAN splats.
>
> Fixes: fff1f3001cc5 ("tcp: add a spin
On Wed, 9 Oct 2019 15:10:15 -0700, Eric Dumazet wrote:
> tcp_memory_pressure is read without holding any lock,
> and its value could be changed on other cpus.
>
> Use READ_ONCE() to annotate these lockless reads.
>
> The write side is already using atomic ops.
>
> Fixes: b8da51ebb1aa ("tcp: int
On Wed, Oct 9, 2019 at 9:25 PM Andrii Nakryiko wrote:
>
> Fix typo in struct xpd_md, generated from bpf_helpers_doc.py, which is
> causing compilation warnings for programs using bpf_helpers.h
>
> Fixes: 7a387bed47f7 ("scripts/bpf: teach bpf_helpers_doc.py to dump BPF
> helper definitions")
> Sig
On Wed, Oct 09, 2019 at 10:03:43AM +0200, Toke Høiland-Jørgensen wrote:
> Alexei Starovoitov writes:
>
> > Please implement proper indirect calls and jumps.
>
> I am still not convinced this will actually solve our problem; but OK, I
> can give it a shot.
If you're not convinced let's talk abou
On Wed, 9 Oct 2019 12:55:53 -0700, Eric Dumazet wrote:
> As mentioned in
> https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
> a C compiler can legally transform :
>
> if (memory_pressure && *memory_pressure)
> *memory_pressure = 0;
>
> to :
>
> i
On Wed, Oct 09, 2019 at 08:29:51AM -0700, Pravin Shelar wrote:
> On Mon, Oct 7, 2019 at 9:41 PM Martin Varghese
> wrote:
> >
> > From: Martin Varghese
> >
> > The openvswitch was supporting a MPLS label depth of 1 in the ingress
> > direction though the userspace OVS supports a max depth of 3 lab
On Wed, 9 Oct 2019 09:20:02 -0700, Eric Dumazet wrote:
> As mentioned in
> https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
> a C compiler can legally transform
>
> if (e->queue_index != queue_index)
> e->queue_index = queue_index;
>
> to :
>
>
On 10/9/19 9:24 PM, Jakub Kicinski wrote:
> On Wed, 9 Oct 2019 09:19:13 -0700, Eric Dumazet wrote:
>> As hinted by KCSAN, we need at least one READ_ONCE()
>> to prevent a compiler optimization.
>>
>> More details on :
>> https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-impro
Fix typo in struct xpd_md, generated from bpf_helpers_doc.py, which is
causing compilation warnings for programs using bpf_helpers.h
Fixes: 7a387bed47f7 ("scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper
definitions")
Signed-off-by: Andrii Nakryiko
---
scripts/bpf_helpers_doc.py | 2 +-
On Wed, 9 Oct 2019 09:19:13 -0700, Eric Dumazet wrote:
> As hinted by KCSAN, we need at least one READ_ONCE()
> to prevent a compiler optimization.
>
> More details on :
> https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
>
> [...]
>
> Fixes: cc16921351d8
Pointer to BTF object is a pointer to kernel object or NULL.
The memory access in the interpreter has to be done via probe_kernel_read
to avoid page faults.
Signed-off-by: Alexei Starovoitov
Acked-by: Andrii Nakryiko
---
include/linux/filter.h | 3 +++
kernel/bpf/core.c | 19 +
Pointer to BTF object is a pointer to kernel object or NULL.
Such pointers can only be used by BPF_LDX instructions.
The verifier changed their opcode from LDX|MEM|size
to LDX|PROBE_MEM|size to make JITing easier.
The number of entries in extable is the number of BPF_LDX insns
that access kernel me
Disallow bpf_probe_read() and bpf_probe_read_str() helpers in
raw_tracepoint bpf programs that use in-kernel BTF to track
types of memory accesses.
Signed-off-by: Alexei Starovoitov
---
kernel/trace/bpf_trace.c | 4
1 file changed, 4 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/ke
libbpf analyzes bpf C program, searches in-kernel BTF for given type name
and stores it into expected_attach_type.
The kernel verifier expects this btf_id to point to something like:
typedef void (*btf_trace_kfree_skb)(void *, struct sk_buff *skb, void *loc);
which represents signature of raw_trace
On Wed, 9 Oct 2019 20:18:28 +0800, Hangbin Liu wrote:
> Before reading the team port list, we need to acquire the RCU read lock.
> Also change list_for_each_entry() to list_for_each_entry_rcu().
>
> v2:
> repost the patch to net-next and remove fixes flag as this is a cosmetic
> change.
>
> Sugg
For raw tracepoint program types libbpf will try to find
btf_id of raw tracepoint in vmlinux's BTF.
It's a responsiblity of bpf program author to annotate the program
with SEC("raw_tracepoint/name") where "name" is a valid raw tracepoint.
If "name" is indeed a valid raw tracepoint then in-kernel BT
BTF type id specified at program load time has all
necessary information to attach that program to raw tracepoint.
Use kernel type name to find raw tracepoint.
Signed-off-by: Alexei Starovoitov
---
kernel/bpf/syscall.c | 67 +---
1 file changed, 44 inserti
Load basic cls_bpf program.
Load raw_tracepoint program and attach to kfree_skb raw tracepoint.
Trigger cls_bpf via prog_test_run.
At the end of test_run kernel will call kfree_skb
which will trigger trace_kfree_skb tracepoint.
Which will call our raw_tracepoint program.
Which will take that skb an
Add attach_btf_id attribute to prog_load command.
It's similar to existing expected_attach_type attribute which is
used in several cgroup based program types.
Unfortunately expected_attach_type is ignored for
tracing programs and cannot be reused for new purpose.
Hence introduce attach_btf_id to ve
Introduce new helper that reuses existing skb perf_event output
implementation, but can be called from raw_tracepoint programs
that receive 'struct sk_buff *' as tracepoint argument or
can walk other kernel data structures to skb pointer.
In order to do that teach verifier to resolve true C types
If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux'
for further use by the verifier.
In-kernel BTF is trusted just like kallsyms and other build artifacts
embedded into vmlinux.
Yet run this BTF image through BTF verifier to make sure
that it is valid and it wasn't mangled during
When pahole converts dwarf to btf it emits only used types.
Wrap existing bpf helper functions into typedef and use it in
typecast to make gcc emits this type into dwarf.
Then pahole will convert it to btf.
The "btf_#name_of_helper" types will be used to figure out
types of arguments of bpf helpers
v1->v2:
- addressed feedback from Andrii and Eric. Thanks a lot for review!
- added missing check at raw_tp attach time.
- Andrii noticed that expected_attach_type cannot be reused.
Had to introduce new field to bpf_attr.
- cleaned up logging nicely by introducing bpf_log() helper.
- rebased.
Re
When pahole converts dwarf to btf it emits only used types.
Wrap existing __bpf_trace_##template() function into
btf_trace_##template typedef and use it in type cast to
make gcc emits this type into dwarf. Then pahole will convert it to btf.
The "btf_trace_" prefix will be used to identify BTF enab
On Wed, 9 Oct 2019 11:19:10 +0200, Nicolas Dichtel wrote:
> The flag NLM_F_ECHO aims to reply to the user the message notified to all
> listeners.
> It was not the case with the command RTM_NEWNSID, let's fix this.
>
> Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids")
> Re
On 2019/10/10 上午12:20, Eric Dumazet wrote:
As mentioned in
https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
a C compiler can legally transform
if (e->queue_index != queue_index)
e->queue_index = queue_index;
to :
e->queue_index = queue
On 10/8/19 10:10 PM, Andrii Nakryiko wrote:
> for_each_member(i, t, member) {
> if (moff + msize <= off)
> continue; /* no overlap with member, yet, keep iterating */
> if (moff >= off + size)
> break; /* won't find anything, field is already too far */
>
> /* over
On Wed, 9 Oct 2019 13:04:44 +0200, Jiri Pirko wrote:
> From: Jiri Pirko
>
> Implement "empty" and "dummy" reporters. The first one is really simple
> and does nothing. The other one has debugfs files to trigger breakage
> and it is able to do recovery. The ops also implement dummy fmsg
> content
On 10/9/19 1:51 PM, Martin Lau wrote:
>> err = btf_check_all_metas(env);
>> +if (err)
>> +goto errout;
>> +
> Considering btf_vmlinux is already safe, any concern in making an extra
> call to btf_check_all_types()?
Only concern is additional memory resolved_* arrays will take.
The
On Wed, 9 Oct 2019 13:04:43 +0200, Jiri Pirko wrote:
> From: Jiri Pirko
>
> During health reporter operations, driver might want to fill-up
> the extack message, so propagate extack down to the health reporter ops.
>
> Signed-off-by: Jiri Pirko
I wonder how useful this is for non-testing :( W
On Wed, 9 Oct 2019 10:07:42 +0200, Karsten Graul wrote:
> First set of patches to improve termination handling.
Applied, thanks.
Out of curiosity why does net/sock.h have to include net/smc.h?
This SMC-specific series causes half of the kernel to rebuild 🤨
On Tue, 8 Oct 2019 21:03:14 -0700, Randy Dunlap wrote:
> From: Randy Dunlap
>
> Lots of fixes to kernel-doc in structs, enums, and functions.
> Also add header files that are being used but not yet #included.
>
> Signed-off-by: Randy Dunlap
> Cc: Yamin Friedman
> Cc: Tal Gilboa
> Cc: Saeed Ma
On Wed, 9 Oct 2019 10:04:38 +0200, Karsten Graul wrote:
> Fixes for -net, more info in commit logs.
Please write a sentence or two describing the nature of the fixes.
This message ends up in merge commits in the tree, pointing at the
commits themselves is unhelpful.
Please provide Fixes tags poi
On Tue, 8 Oct 2019 16:20:07 -0700, Vinicius Costa Gomes wrote:
> When configuring a taprio instance if "flags" is not specified (or
> it's zero), taprio currently replies with an "Invalid argument" error.
>
> So, set the return value to zero after we are done with all the
> checks.
>
> Fixes: 9c
On 2019/10/5 10:06, Yunsheng Lin wrote:
> On 2019/9/30 17:27, Jiri Pirko wrote:
>> Sun, Sep 29, 2019 at 02:13:43PM CEST, linyunsh...@huawei.com wrote:
>>> This patch adds the devlink health dump support for hw mac tbl,
>>> which helps to debug some hardware packet switching problem or
>>> misconfig
On Wed, Oct 9, 2019 at 12:12 PM Samudrala, Sridhar
wrote:
> >> 34.57% xdpsock xdpsock [.] main
> >> 17.19% ksoftirqd/1 [kernel.vmlinux] [k] ___bpf_prog_run
> >> 13.12% xdpsock [kernel.vmlinux] [k] ___bpf_prog_run
> >
> > That must be a bad joke.
>
On 10/9/19 3:06 PM, Josh Hunt wrote:
Repost from a series by Alexander Duyck to add UDP segmentation offload
support to the igb driver:
https://lore.kernel.org/netdev/20180504003916.4769.66271.stgit@localhost.localdomain/
CC: Alexander Duyck
CC: Willem de Bruijn
Signed-off-by: Josh Hunt
---
On Tue, 8 Oct 2019 18:21:05 +0200, Julian Wiedmann wrote:
> Hi Dave,
>
> please apply the following two patches to your net tree.
>
> Alexandra fixes two issues in the initialization code for vnicc cmds.
> One is an uninitialized variable when a cmd fails, the other that we
> wouldn't recover co
On 10/9/19 5:39 PM, Samudrala, Sridhar wrote:
On 10/9/2019 3:06 PM, Josh Hunt wrote:
Based on a series from Alexander Duyck this change adds UDP segmentation
offload support to the i40e driver.
CC: Alexander Duyck
CC: Willem de Bruijn
Signed-off-by: Josh Hunt
---
drivers/net/ethernet/int
On Tue, 8 Oct 2019 08:39:04 -0700, Randy Dunlap wrote:
> From: Randy Dunlap
>
> Fix kernel-doc warnings in phylink.c:
>
> ../drivers/net/phy/phylink.c:595: warning: Function parameter or member
> 'config' not described in 'phylink_create'
> ../drivers/net/phy/phylink.c:595: warning: Excess func
On 10/9/2019 3:06 PM, Josh Hunt wrote:
Based on a series from Alexander Duyck this change adds UDP segmentation
offload support to the i40e driver.
CC: Alexander Duyck
CC: Willem de Bruijn
Signed-off-by: Josh Hunt
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
drivers/net/ether
On Wed, Oct 9, 2019 at 4:15 PM Mahesh Bandewar wrote:
>
> While invalidating the dst, we assign backhole_netdev instead of
> loopback device. However, this device does not have idev pointer
> and hence no ip6_ptr even if IPv6 is enabled. Possibly this has
> triggered the syzbot reported crash.
>
>
On Tue, 8 Oct 2019 19:27:32 +0800, Xin Long wrote:
> There are 4 events defined in rfc5061 missed in linux sctp:
> SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED, SCTP_ADDR_MADE_PRIM and
> SCTP_SEND_FAILED_EVENT.
>
> This patchset is to add them up.
Applied, thanks.
On Tue, 8 Oct 2019 19:09:23 +0800, Xin Long wrote:
> This patch is to fix a NULL-ptr deref in selinux_socket_connect_helper:
>
> [...] kasan: GPF could be caused by NULL-ptr deref or user memory access
> [...] RIP: 0010:selinux_socket_connect_helper+0x94/0x460
> [...] Call Trace:
> [...]
Add basic XDP support to mvneta driver for devices that rely on software
buffer management. Currently supported verdicts are:
- XDP_DROP
- XDP_PASS
- XDP_REDIRECT
- XDP_ABORTED
Signed-off-by: Lorenzo Bianconi
---
drivers/net/ethernet/marvell/mvneta.c | 144 --
1 file chan
This will ensure that any new TSO related flags added (which
would be part of ALL_TSO mask and IPvlan driver doesn't need
to update every time new flag gets added.
Signed-off-by: Mahesh Bandewar
Suggested-by: Eric Dumazet
---
drivers/net/ipvlan/ipvlan_main.c | 4 ++--
1 file changed, 2 insertio
Implement XDP_TX verdict and ndo_xdp_xmit net_device_ops function
pointer
Signed-off-by: Lorenzo Bianconi
---
drivers/net/ethernet/marvell/mvneta.c | 126 --
1 file changed, 119 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c
b/drivers/n
Use the page_pool api for allocations and DMA handling instead of
__dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page().
Pages are unmapped using page_pool_release_page before packets
go into the network stack.
The page_pool API offers buffer recycling capabilities for XDP but
allocat
Introduce mvneta_update_stats routine to collect {rx/tx} statistics
(packets and bytes). This is a preliminary patch to add XDP support to
mvneta driver
Signed-off-by: Lorenzo Bianconi
---
drivers/net/ethernet/marvell/mvneta.c | 41 +--
1 file changed, 20 insertions(+), 2
Allow tx buffer array to contain both skb and xdp buffers in order to
enable xdp frame recycling adding XDP_TX verdict support
Signed-off-by: Lorenzo Bianconi
---
drivers/net/ethernet/marvell/mvneta.c | 66 +--
1 file changed, 43 insertions(+), 23 deletions(-)
diff --git
Refactor mvneta_rx_swbm code introducing mvneta_swbm_rx_frame and
mvneta_swbm_add_rx_fragment routines. Rely on build_skb in oreder to
allocate skb since the previous patch introduced buffer recycling using
the page_pool API.
This patch fixes even an issue in the original driver where dma buffers
a
Move data buffer prefetch in mvneta_swbm_rx_frame after
dma_sync_single_range_for_cpu
Signed-off-by: Ilias Apalodimas
Signed-off-by: Jesper Dangaard Brouer
Signed-off-by: Lorenzo Bianconi
---
drivers/net/ethernet/marvell/mvneta.c | 16
1 file changed, 8 insertions(+), 8 deleti
mvneta driver can run on not cache coherent devices so it is
necessary to sync dma buffers before sending them to the device
in order to avoid memory corruption. This patch introduce a performance
penalty and it is necessary to introduce a more sophisticated logic
in order to avoid dma sync as much
Add XDP support to mvneta driver for devices that rely on software
buffer management. Supported verdicts are:
- XDP_DROP
- XDP_PASS
- XDP_REDIRECT
- XDP_TX
Moreover set ndo_xdp_xmit net_device_ops function pointer in order to support
redirecting from other device (e.g. virtio-net).
Convert mvneta d
While invalidating the dst, we assign backhole_netdev instead of
loopback device. However, this device does not have idev pointer
and hence no ip6_ptr even if IPv6 is enabled. Possibly this has
triggered the syzbot reported crash.
The syzbot report does not have reproducer, however, this is the
on
On Mon, 7 Oct 2019 15:43:01 -0700, Eric Dumazet wrote:
> syzbot got a NULL dereference in bond_update_slave_arr() [1],
> happening after a failure to allocate bond->slave_arr
>
> A workqueue (bond_slave_arr_handler) is supposed to retry
> the allocation later, but if the slave is removed before
>
On Wed, Oct 9, 2019 at 3:49 PM Alexei Starovoitov
wrote:
>
> On Tue, Oct 8, 2019 at 4:12 PM Andrii Nakryiko wrote:
> >
> > Fix BTF-to-C logic of handling padding at the end of a struct. Fix existing
> > test that should have captured this. Also move test_btf_dump into a
> > test_progs
> > test t
If ULP is used on a listening socket, icsk_ulp_ops and icsk_ulp_data are
copied when the listener is cloned. Sometimes the clone is immediately
deleted, which will invoke the release op on the clone and likely
corrupt the listening socket's icsk_ulp_data.
The clone operation is invoked immediately
Add enum value for MPTCP and update config dependencies
Signed-off-by: Mat Martineau
Signed-off-by: Matthieu Baerts
---
include/linux/skbuff.h | 3 +++
include/net/mptcp.h| 27 +++
net/core/skbuff.c | 7 +++
3 files changed, 37 insertions(+)
create mode 1
Match the 16-bit width of skbuff->protocol. Fills an 8-bit hole so
sizeof(struct sock) does not change.
Signed-off-by: Mat Martineau
---
include/net/sock.h | 4 ++--
include/trace/events/sock.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/sock.h b/i
The MPTCP extension data needs to be preserved as it passes through the
TCP stack. Make sure that these skbs are not appended to others during
coalesce or collapse, so the data remains associated with the payload of
the given skb.
Signed-off-by: Mat Martineau
---
include/net/mptcp.h | 16 +
MPTCP will make use of tcp_send_mss() and tcp_push() when sending
data to specific TCP subflows.
tcp_request_sock_ipv4_ops will be referenced during TCP subflow
creation.
Signed-off-by: Mat Martineau
Signed-off-by: Peter Krystad
---
include/net/tcp.h | 5 +
net/ipv4/tcp.c | 6 +++---
The SACK code would potentially add four bytes to the expected
TCP option size even if all option space was already used.
Signed-off-by: Mat Martineau
---
net/ipv4/tcp_output.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8469a109f0aa
From: Paolo Abeni
Otherwise we will find stray/unexpected/old extensions
value on next iteration.
On tcp_write_xmit() we can end-up splitting an already queued
skb in two parts, via tso_fragment(). The newly created skb
can be allocated via the tx cache and the mptcp stack will not
be aware of i
The MPTCP upstreaming community has prepared a net-next RFCv3 patch
set for review. The scope of this patch set is limited to prerequisite
TCP core changes so we can get focused feedback in these areas.
In this patch set we introduce some MPTCP definitions, additional ULP
and skb extension featu
To open a MPTCP socket with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP),
IPPROTO_MPTCP needs a value that differs from IPPROTO_TCP. The existing
IPPROTO numbers mostly map directly to IANA-specified protocol numbers.
MPTCP does not have a protocol number allocated because MPTCP packets
use the TCP
TCP option 30 is allocated for MPTCP by the IANA.
Signed-off-by: Mat Martineau
---
include/net/tcp.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index c9a3f9688223..382e245a7909 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -182,6 +182,7
SK_PROTOCOL_MAX is only used in two places, for DECNet and AX.25. The
limits have more to do with the those protocol definitions than they do
with the data type of sk_protocol, so remove SK_PROTOCOL_MAX and use
U8_MAX directly.
Signed-off-by: Mat Martineau
---
include/net/sock.h | 1 -
net/a
On Thu, 10 Oct 2019 at 01:14, Jakub Kicinski
wrote:
>
> On Tue, 8 Oct 2019 17:42:59 +0100, Mark Brown wrote:
> > On Tue, Oct 08, 2019 at 03:58:51PM +0300, Vladimir Oltean wrote:
> >
> > > Dave, do you think you can somehow integrate this patch into net-next
> > > as well, so that I can send some f
On Tue, Oct 8, 2019 at 4:12 PM Andrii Nakryiko wrote:
>
> Fix BTF-to-C logic of handling padding at the end of a struct. Fix existing
> test that should have captured this. Also move test_btf_dump into a test_progs
> test to leverage common infrastructure.
Applied.
But I see some build weirdness.
On Wed, Oct 9, 2019 at 3:08 PM Josh Hunt wrote:
>
> Alexander Duyck posted a series in 2018 proposing adding UDP segmentation
> offload support to ixgbe and ixgbevf, but those patches were never
> accepted:
>
> https://lore.kernel.org/netdev/20180504003556.4769.11407.stgit@localhost.localdomain/
>
sk->sk_backlog.len can be written by BH handlers, and read
from process contexts in a lockless way.
Note the write side should also use WRITE_ONCE() or a variant.
We need some agreement about the best way to do this.
syzbot reported :
BUG: KCSAN: data-race in tcp_add_backlog / tcp_grow_window.is
sock_rcvlowat() or int_sk_rcvlowat() might be called without the socket
lock for example from tcp_poll().
Use READ_ONCE() to document the fact that other cpus might change
sk->sk_rcvlowat under us and avoid KCSAN splats.
Use WRITE_ONCE() on write sides too.
Signed-off-by: Eric Dumazet
---
incl
sk_add_backlog() callers usually read sk->sk_rcvbuf without
owning the socket lock. This means sk_rcvbuf value can
be changed by other cpus, and KCSAN complains.
Add READ_ONCE() annotations to document the lockless nature
of these reads.
Note that writes over sk_rcvbuf should also use WRITE_ONCE(
On Tue, 8 Oct 2019 17:42:59 +0100, Mark Brown wrote:
> On Tue, Oct 08, 2019 at 03:58:51PM +0300, Vladimir Oltean wrote:
>
> > Dave, do you think you can somehow integrate this patch into net-next
> > as well, so that I can send some further patches that depend on the
> > newly introduced ptp_sts m
tcp_memory_pressure is read without holding any lock,
and its value could be changed on other cpus.
Use READ_ONCE() to annotate these lockless reads.
The write side is already using atomic ops.
Fixes: b8da51ebb1aa ("tcp: introduce tcp_under_memory_pressure()")
Signed-off-by: Eric Dumazet
---
i
Alexander Duyck posted a series in 2018 proposing adding UDP segmentation
offload support to ixgbe and ixgbevf, but those patches were never
accepted:
https://lore.kernel.org/netdev/20180504003556.4769.11407.stgit@localhost.localdomain/
This series is a repost of his ixgbe patch along with a simi
Repost from a series by Alexander Duyck to add UDP segmentation offload
support to the igb driver:
https://lore.kernel.org/netdev/20180504003916.4769.66271.stgit@localhost.localdomain/
CC: Alexander Duyck
CC: Willem de Bruijn
Signed-off-by: Josh Hunt
---
drivers/net/ethernet/intel/ixgbe/ixgbe_
Based on a series from Alexander Duyck this change adds UDP segmentation
offload support to the igb driver.
CC: Alexander Duyck
CC: Willem de Bruijn
Signed-off-by: Josh Hunt
---
drivers/net/ethernet/intel/igb/e1000_82575.h | 1 +
drivers/net/ethernet/intel/igb/igb_main.c| 23 +
Based on a series from Alexander Duyck this change adds UDP segmentation
offload support to the i40e driver.
CC: Alexander Duyck
CC: Willem de Bruijn
Signed-off-by: Josh Hunt
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 +---
On Wed, 9 Oct 2019 22:34:13 +0300, Ido Schimmel wrote:
> On Wed, Oct 09, 2019 at 12:06:21PM -0700, Jakub Kicinski wrote:
> > make htmldocs complains:
> > Documentation/networking/devlink-trap.rst:175: WARNING: unknown document:
> > /devlink-trap-netdevsim
> >
> > make the path relative.
> >
> >
reqsk_queue_empty() is called from inet_csk_listen_poll() while
other cpus might write ->rskq_accept_head value.
Use {READ|WRITE}_ONCE() to avoid compiler tricks
and potential KCSAN splats.
Fixes: fff1f3001cc5 ("tcp: add a spinlock to protect struct request_sock_queue")
Signed-off-by: Eric Dumaze
On Wed, Oct 09, 2019 at 09:19:13AM -0700, Eric Dumazet wrote:
> As hinted by KCSAN, we need at least one READ_ONCE()
> to prevent a compiler optimization.
>
> More details on :
> https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
>
> sysbot report :
> BUG: KC
Added test case for layered IP operation for a single source IP4/IP6
address and a single destination IP4/IP6 address.
Signed-off-by: Roman Mashak
---
.../tc-testing/tc-tests/actions/pedit.json | 101 -
1 file changed, 100 insertions(+), 1 deletion(-)
diff --git a/to
On Fri, Oct 04, 2019 at 10:03:07PM -0700, Alexei Starovoitov wrote:
> If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux'
> for further use by the verifier.
> In-kernel BTF is trusted just like kallsyms and other build artifacts
> embedded into vmlinux.
> Yet run this BTF image t
On Wed, Oct 09, 2019 at 12:50:10PM -0700, Andrii Nakryiko wrote:
> On Wed, Oct 9, 2019 at 10:45 AM Carlos Antonio Neira Bustos
> wrote:
> >
> > On Wed, Oct 09, 2019 at 09:14:42AM -0700, Andrii Nakryiko wrote:
> > > On Wed, Oct 9, 2019 at 8:27 AM Carlos Neira
> > > wrote:
> > > >
> > > > New bpf
Add tests checking that verifier does proper constant propagation for
read-only maps. If constant propagation didn't work, skipp_loop and
part_loop BPF programs would be rejected due to BPF verifier otherwise
not being able to prove they ever complete. With constant propagation,
though, they are su
With BPF maps supporting direct map access (currently, array_map w/ single
element, used for global data) that are read-only both from system call and
BPF side, it's possible for BPF verifier to track its contents as known
constants.
Now it's possible for user-space control app to pre-initialize r
Maps that are read-only both from BPF program side and user space side
have their contents constant, so verifier can track referenced values
precisely and use that knowledge for dead code elimination, branch
pruning, etc. This patch teaches BPF verifier how to do this.
Signed-off-by: Andrii Nakryi
On 10/9/19 11:01 AM, Andrii Nakryiko wrote:
> On Fri, Oct 4, 2019 at 10:04 PM Alexei Starovoitov wrote:
>>
>> Introduce new helper that reuses existing skb perf_event output
>> implementation, but can be called from raw_tracepoint programs
>> that receive 'struct sk_buff *' as tracepoint argument
As mentioned in
https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
a C compiler can legally transform :
if (memory_pressure && *memory_pressure)
*memory_pressure = 0;
to :
if (memory_pressure)
*memory_pressure = 0;
Fixes: 0604475119de ("tcp
On Wed, Oct 9, 2019 at 10:45 AM Carlos Antonio Neira Bustos
wrote:
>
> On Wed, Oct 09, 2019 at 09:14:42AM -0700, Andrii Nakryiko wrote:
> > On Wed, Oct 9, 2019 at 8:27 AM Carlos Neira wrote:
> > >
> > > New bpf helper bpf_get_ns_current_pid_tgid,
> > > This helper will return pid and tgid from cu
On 10/8/19 10:29 PM, Andrii Nakryiko wrote:
> On Fri, Oct 4, 2019 at 10:04 PM Alexei Starovoitov wrote:
>>
>> Disallow bpf_probe_read() and bpf_probe_read_str() helpers in
>> raw_tracepoint bpf programs that use in-kernel BTF to track
>> types of memory accesses.
>>
>> Signed-off-by: Alexei Starov
On Wed, Oct 09, 2019 at 12:06:21PM -0700, Jakub Kicinski wrote:
> make htmldocs complains:
> Documentation/networking/devlink-trap.rst:175: WARNING: unknown document:
> /devlink-trap-netdevsim
>
> make the path relative.
>
> Fixes: 9e0874570488 ("Documentation: Add description of netdevsim traps
1 - 100 of 190 matches
Mail list logo