[PATCH bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-16 Thread Song Liu
BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the skb. This patch enables direct access of skb for these programs. In __cgroup_bpf_run_filter_skb(), bpf_compute_data_pointers() is called to compute proper data_end for the BPF program. Signed-off-by: Song Liu ---

[PATCH bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-16 Thread Song Liu
Tests are added to make sure CGROUP_SKB can directly access len, data, and data_end in __sk_buff, but not other fields. Signed-off-by: Song Liu --- tools/testing/selftests/bpf/test_verifier.c | 30 + 1 file changed, 30 insertions(+) diff --git

[PATCH bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-16 Thread Song Liu
This set enables BPF program of type BPF_PROG_TYPE_CGROUP_SKB to access __skb_buff->len/data/data_end directly. Song Liu (2): bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB bpf: add tests for direct packet access from CGROUP_SKB kernel/bpf/cgroup.c | 4

Re: [PATCH bpf-next 00/13] bpf: add btf func info support

2018-10-16 Thread Yonghong Song
On 10/16/18 11:27 AM, Alexei Starovoitov wrote: > On Fri, Oct 12, 2018 at 11:54:20AM -0700, Yonghong Song wrote: >> The BTF support was added to kernel by Commit 69b693f0aefa >> ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced >> .BTF section into ELF file and is primarily >> used

Re: [PATCH bpf-next 05/13] bpf: get better bpf_prog ksyms based on btf func type_id

2018-10-16 Thread Yonghong Song
On 10/16/18 10:59 AM, Alexei Starovoitov wrote: > On Fri, Oct 12, 2018 at 11:54:42AM -0700, Yonghong Song wrote: >> This patch added interface to load a program with the following >> additional information: >> . prog_btf_fd >> . func_info and func_info_len >> where func_info will

Re: [PATCH bpf-next 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-10-16 Thread Yonghong Song
On 10/15/18 3:36 PM, Daniel Borkmann wrote: > On 10/12/2018 08:54 PM, Yonghong Song wrote: > [...] >> +static bool btf_name_valid_identifier(const struct btf *btf, u32 offset) >> +{ >> +/* offset must be valid */ >> +const char *src = >strings[offset]; >> + >> +if (!isalpha(*src) &&

Re: [PATCH bpf-next 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-10-16 Thread Yonghong Song
On 10/15/18 3:30 PM, Daniel Borkmann wrote: > On 10/12/2018 08:54 PM, Yonghong Song wrote: >> This patch adds BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO >> support to the type section. BTF_KIND_FUNC_PROTO is used >> to specify the type of a function pointer. With this, >> BTF has a complete set of C

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Florian Fainelli
On 10/16/2018 5:23 PM, Eric Dumazet wrote: > > > On 10/16/2018 04:08 PM, Florian Fainelli wrote: > >> I had started doing that about a month ago in light of the ixbge >> ndo_poll_controller vs. napi problem, but have not had time to submit >> that series yet: >> >>

Re: [PATCH bpf-next v2 3/7] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-16 Thread Mauricio Vasquez
On 10/16/2018 06:20 PM, Alexei Starovoitov wrote: On Tue, Oct 16, 2018 at 04:16:39PM -0500, Mauricio Vasquez wrote: On 10/11/2018 06:51 PM, Alexei Starovoitov wrote: On Wed, Oct 10, 2018 at 05:50:01PM -0500, Mauricio Vasquez wrote: Does it make sense to you? I reread the other patch, and

Re: [bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread Daniel Borkmann
On 10/16/2018 07:36 PM, John Fastabend wrote: > When converting sockmap to new skmsg generic data structures we missed > that the recvmsg handler did not correctly use sg.size and instead was > using individual elements length. The result is if a sock is closed > with outstanding data we omit the

Re: [bpf-next PATCH 0/3] sockmap support for msg_peek flag

2018-10-16 Thread Daniel Borkmann
On 10/16/2018 08:41 PM, Alexei Starovoitov wrote: > On Tue, Oct 16, 2018 at 11:07:54AM -0700, John Fastabend wrote: >> This adds support for the MSG_PEEK flag when redirecting into an >> ingress psock sk_msg queue. >> >> The first patch adds some base support to the helpers, then the >> feature,

Re: [PATCH bpf-next 05/13] bpf: get better bpf_prog ksyms based on btf func type_id

2018-10-16 Thread Yonghong Song
On 10/15/18 4:12 PM, Martin Lau wrote: > On Fri, Oct 12, 2018 at 11:54:42AM -0700, Yonghong Song wrote: >> This patch added interface to load a program with the following >> additional information: >> . prog_btf_fd >> . func_info and func_info_len >> where func_info will provides

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Eric Dumazet
On 10/16/2018 04:08 PM, Florian Fainelli wrote: > I had started doing that about a month ago in light of the ixbge > ndo_poll_controller vs. napi problem, but have not had time to submit > that series yet: > > https://github.com/ffainelli/linux/commits/napi-check > > feel free to piggy back

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Eric Dumazet
On 10/16/2018 04:03 PM, Stephen Hemminger wrote: > Many drivers have buggy usage of napi_complete_done. > > Might even be worth forcing all network drivers to check the return > value. But fixing 150 broken drivers will be a nuisance. > > diff --git a/include/linux/netdevice.h

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Eric Dumazet
On 10/16/2018 03:17 PM, Stephen Hemminger wrote: > On Tue, 16 Oct 2018 22:37:31 +0200 > Heiner Kallweit wrote: > >> rtl_rx() and rtl_tx() are called only if the respective bits are set >> in the interrupt status register. Under high load NAPI may not be >> able to process all data (work_done

[PATCH net-next 2/2] tcp_bbr: centralize code to set gains

2018-10-16 Thread Neal Cardwell
Centralize the code that sets gains used for computing cwnd and pacing rate. This simplifies the code and makes it easier to change the state machine or (in the future) dynamically change the gain values and ensure that the correct gain values are always used. Signed-off-by: Neal Cardwell

[PATCH net-next 0/2] tcp_bbr: TCP BBR changes for EDT pacing model

2018-10-16 Thread Neal Cardwell
Two small patches for TCP BBR to follow up with Eric's recent work to change the TCP and fq pacing machinery to an "earliest departure time" (EDT) model: - The first patch adjusts the TCP BBR logic to work with the new "earliest departure time" (EDT) pacing model. - The second patch adjusts

[PATCH net-next 1/2] tcp_bbr: adjust TCP BBR for departure time pacing

2018-10-16 Thread Neal Cardwell
Adjust TCP BBR for the new departure time pacing model in the recent commit ab408b6dc7449 ("tcp: switch tcp and sch_fq to new earliest departure time model"). With TSQ and pacing at lower layers, there are often several skbs queued in the pacing layer, and thus there is less data "in the network"

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-16 Thread David Ahern
On 10/15/18 4:33 PM, Song Liu wrote: > I am working with Alexei on the idea of fetching BPF program information via > BPF_OBJ_GET_INFO_BY_FD cmd. I added PERF_RECORD_BPF_EVENT > to perf_event_type, and dumped these events to perf event ring buffer. > > I found that perf will not process event

Re: [PATCH bpf-next v2 3/7] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-16 Thread Alexei Starovoitov
On Tue, Oct 16, 2018 at 04:16:39PM -0500, Mauricio Vasquez wrote: > > > On 10/11/2018 06:51 PM, Alexei Starovoitov wrote: > > On Wed, Oct 10, 2018 at 05:50:01PM -0500, Mauricio Vasquez wrote: > > > > > Does it make sense to you? > > > > I reread the other patch, and found it does NOT use the

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Florian Fainelli
On 10/16/2018 04:03 PM, Stephen Hemminger wrote: > On Tue, 16 Oct 2018 23:17:31 +0200 > Holger Hoffstätte wrote: > >> On 10/16/18 22:37, Heiner Kallweit wrote: >>> rtl_rx() and rtl_tx() are called only if the respective bits are set >>> in the interrupt status register. Under high load NAPI may

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Stephen Hemminger
On Tue, 16 Oct 2018 23:17:31 +0200 Holger Hoffstätte wrote: > On 10/16/18 22:37, Heiner Kallweit wrote: > > rtl_rx() and rtl_tx() are called only if the respective bits are set > > in the interrupt status register. Under high load NAPI may not be > > able to process all data (work_done ==

Re: [bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread Alexei Starovoitov
On Tue, Oct 16, 2018 at 10:36:01AM -0700, John Fastabend wrote: > When converting sockmap to new skmsg generic data structures we missed > that the recvmsg handler did not correctly use sg.size and instead was > using individual elements length. The result is if a sock is closed > with outstanding

Re: [PATCH bpf-next 0/2] nfp: bpf: improve offload checks

2018-10-16 Thread Alexei Starovoitov
On Tue, Oct 16, 2018 at 03:19:08PM -0700, Jakub Kicinski wrote: > Hi, > > this set adds check to make sure offload behaviour is correct. > First when atomic counters are used, we must make sure the map > does not already contain data we did not prepare for holding > atomics. > > Second patch

[PATCH bpf-next 1/2] nfp: bpf: protect against mis-initializing atomic counters

2018-10-16 Thread Jakub Kicinski
Atomic operations on the NFP are currently always in big endian. The driver keeps track of regions of memory storing atomic values and byte swaps them accordingly. There are corner cases where the map values may be initialized before the driver knows they are used as atomic counters. This can

Re: [PATCH bpf-next] libbpf: Per-symbol visibility for DSO

2018-10-16 Thread Alexei Starovoitov
On Mon, Oct 15, 2018 at 10:50:34PM -0700, Andrey Ignatov wrote: > Make global symbols in libbpf DSO hidden by default with > -fvisibility=hidden and export symbols that are part of ABI explicitly > with __attribute__((visibility("default"))). > > This is common practice that should prevent from

[PATCH bpf-next 0/2] nfp: bpf: improve offload checks

2018-10-16 Thread Jakub Kicinski
Hi, this set adds check to make sure offload behaviour is correct. First when atomic counters are used, we must make sure the map does not already contain data we did not prepare for holding atomics. Second patch double checks vNIC capabilities for program offload in case program is shared by

[PATCH bpf-next 2/2] nfp: bpf: double check vNIC capabilities after object sharing

2018-10-16 Thread Jakub Kicinski
Program translation stage checks that program can be offloaded to the netdev which was passed during the load (bpf_attr->prog_ifindex). After program sharing was introduced, however, the netdev on which program is loaded can theoretically be different, and therefore we should recheck the program

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Stephen Hemminger
On Tue, 16 Oct 2018 22:37:31 +0200 Heiner Kallweit wrote: > rtl_rx() and rtl_tx() are called only if the respective bits are set > in the interrupt status register. Under high load NAPI may not be > able to process all data (work_done == budget) and it will schedule > subsequent calls to the

Re: gianfar: Implement MAC reset and reconfig procedure

2018-10-16 Thread Florian Fainelli
On 10/16/2018 02:36 PM, Daniel Walker wrote: > Hi, > > I would like to report an issue in the gianfar driver. The issue is as > follows. > > We have a P2020 board that uses the gianfar driver, and we have a m88e1101 > PHY connect. When the interface is initially brought up traffic flows as >

Re: gianfar: Implement MAC reset and reconfig procedure

2018-10-16 Thread Daniel Walker
Hi, I would like to report an issue in the gianfar driver. The issue is as follows. We have a P2020 board that uses the gianfar driver, and we have a m88e1101 PHY connect. When the interface is initially brought up traffic flows as normal. If you take the interface down then bring it back up

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Holger Hoffstätte
On 10/16/18 22:37, Heiner Kallweit wrote: rtl_rx() and rtl_tx() are called only if the respective bits are set in the interrupt status register. Under high load NAPI may not be able to process all data (work_done == budget) and it will schedule subsequent calls to the poll callback.

Re: [PATCH bpf-next v2 3/7] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-16 Thread Mauricio Vasquez
On 10/11/2018 06:51 PM, Alexei Starovoitov wrote: On Wed, Oct 10, 2018 at 05:50:01PM -0500, Mauricio Vasquez wrote: Does it make sense to you? I reread the other patch, and found it does NOT use the following logic for queue and stack: rcu_read_lock(); ptr

[PATCH net] r8169: fix NAPI handling under high load

2018-10-16 Thread Heiner Kallweit
rtl_rx() and rtl_tx() are called only if the respective bits are set in the interrupt status register. Under high load NAPI may not be able to process all data (work_done == budget) and it will schedule subsequent calls to the poll callback. rtl_ack_events() however resets the bits in the

Re: [PATCH net-next] tcp, ulp: remove socket lock assertion on ULP cleanup

2018-10-16 Thread David Miller
From: Daniel Borkmann Date: Tue, 16 Oct 2018 21:31:35 +0200 > Eric reported that syzkaller triggered a splat in tcp_cleanup_ulp() > where assertion sock_owned_by_me() failed. This happened through > inet_csk_prepare_forced_close() first releasing the socket lock, > then calling into

[PATCH net-next] tcp, ulp: remove socket lock assertion on ULP cleanup

2018-10-16 Thread Daniel Borkmann
Eric reported that syzkaller triggered a splat in tcp_cleanup_ulp() where assertion sock_owned_by_me() failed. This happened through inet_csk_prepare_forced_close() first releasing the socket lock, then calling into tcp_done(newsk) which is called after the inet_csk_prepare_forced_close() and

[PATCH net-next 2/2] sctp: use sk_wmem_queued to check for writable space

2018-10-16 Thread Xin Long
sk->sk_wmem_queued is used to count the size of chunks in out queue while sk->sk_wmem_alloc is for counting the size of chunks has been sent. sctp is increasing both of them before enqueuing the chunks, and using sk->sk_wmem_alloc to check for writable space. However, sk_wmem_alloc is also

[PATCH net-next 1/2] sctp: count both sk and asoc sndbuf with skb truesize and sctp_chunk size

2018-10-16 Thread Xin Long
Now it's confusing that asoc sndbuf_used is doing memory accounting with SCTP_DATA_SNDSIZE(chunk) + sizeof(sk_buff) + sizeof(sctp_chunk) while sk sk_wmem_alloc is doing that with skb->truesize + sizeof(sctp_chunk). It also causes sctp_prsctp_prune to count with a wrong freed memory when

[PATCH net-next 0/2] sctp: fix sk_wmem_queued and use it to check for writable space

2018-10-16 Thread Xin Long
sctp doesn't count and use asoc sndbuf_used, sk sk_wmem_alloc and sk_wmem_queued properly, which also causes some problem. This patchset is to improve it. Xin Long (2): sctp: count both sk and asoc sndbuf with skb truesize and sctp_chunk size sctp: use sk_wmem_queued to check for

[PATCH net] sctp: not free the new asoc when sctp_wait_for_connect returns err

2018-10-16 Thread Xin Long
When sctp_wait_for_connect is called to wait for connect ready for sp->strm_interleave in sctp_sendmsg_to_asoc, a panic could be triggered if cpu is scheduled out and the new asoc is freed elsewhere, as it will return err and later the asoc gets freed again in sctp_sendmsg. [ 285.840764]

Re: [PATCH rdma-next v1 0/4] Scatter to CQE

2018-10-16 Thread Leon Romanovsky
On Tue, Oct 16, 2018 at 02:39:01PM -0400, Doug Ledford wrote: > On Tue, 2018-10-09 at 12:05 +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog v0->v1: > > * Changed patch #3 to use check_mask function from rdma-core instead > > define. > > > >

Re: [bpf-next PATCH 0/3] sockmap support for msg_peek flag

2018-10-16 Thread Alexei Starovoitov
On Tue, Oct 16, 2018 at 11:07:54AM -0700, John Fastabend wrote: > This adds support for the MSG_PEEK flag when redirecting into an > ingress psock sk_msg queue. > > The first patch adds some base support to the helpers, then the > feature, and finally we add an option for the test suite to do > a

Re: [PATCH rdma-next v1 0/4] Scatter to CQE

2018-10-16 Thread Doug Ledford
On Tue, 2018-10-09 at 12:05 +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog v0->v1: > * Changed patch #3 to use check_mask function from rdma-core instead define. > > -- > From Yonatan, > > Scatter to

Re: [PATCH bpf-next 00/13] bpf: add btf func info support

2018-10-16 Thread Alexei Starovoitov
On Fri, Oct 12, 2018 at 11:54:20AM -0700, Yonghong Song wrote: > The BTF support was added to kernel by Commit 69b693f0aefa > ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced > .BTF section into ELF file and is primarily > used for map pretty print. > pahole is used to convert dwarf

[PATCH net] sctp: fix race on sctp_id2asoc

2018-10-16 Thread Marcelo Ricardo Leitner
syzbot reported an use-after-free involving sctp_id2asoc. Dmitry Vyukov helped to root cause it and it is because of reading the asoc after it was freed: CPU 1 CPU 2 (working on socket 1)(working on socket 2)

[bpf-next PATCH 2/3] bpf: sockmap, support for msg_peek in sk_msg with redirect ingress

2018-10-16 Thread John Fastabend
This adds support for the MSG_PEEK flag when doing redirect to ingress and receiving on the sk_msg psock queue. Previously the flag was being ignored which could confuse applications if they expected the flag to work as normal. Signed-off-by: John Fastabend --- include/net/tcp.h |2 +-

[bpf-next PATCH 1/3] bpf: skmsg, improve sk_msg_used_element to work in cork context

2018-10-16 Thread John Fastabend
Currently sk_msg_used_element is only called in zerocopy context where cork is not possible and if this case happens we fallback to copy mode. However the helper is more useful if it works in all contexts. This patch resolved the case where if end == head indicating a full or empty ring the

[bpf-next PATCH 3/3] bpf: sockmap, add msg_peek tests to test_sockmap

2018-10-16 Thread John Fastabend
Add tests that do a MSG_PEEK recv followed by a regular receive to test flag support. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 167 +++- 1 file changed, 115 insertions(+), 52 deletions(-) diff --git

[bpf-next PATCH 0/3] sockmap support for msg_peek flag

2018-10-16 Thread John Fastabend
This adds support for the MSG_PEEK flag when redirecting into an ingress psock sk_msg queue. The first patch adds some base support to the helpers, then the feature, and finally we add an option for the test suite to do a duplicate MSG_PEEK call on every recv to test the feature. With duplicate

Re: [PATCH bpf-next 05/13] bpf: get better bpf_prog ksyms based on btf func type_id

2018-10-16 Thread Alexei Starovoitov
On Fri, Oct 12, 2018 at 11:54:42AM -0700, Yonghong Song wrote: > This patch added interface to load a program with the following > additional information: >. prog_btf_fd >. func_info and func_info_len > where func_info will provides function range and type_id > corresponding to each

Hello My Dear Friend,

2018-10-16 Thread Mr Marc Joseph Hebert
I am Mr Marc Joseph Hebert a I work in the Finance Risk control/Accounts Broker Unit of a prestigious bank in London. Under varying state laws in United Kingdom, financial institutions and other companies are required to turn over any funds considered "abandoned," including uncashed paychecks,

Re: [PATCH net] net/sched: properly init chain in case of multiple control actions

2018-10-16 Thread Davide Caratti
On Mon, 2018-10-15 at 11:31 -0700, Cong Wang wrote: > On Sat, Oct 13, 2018 at 8:23 AM Davide Caratti wrote: > > > > On Fri, 2018-10-12 at 13:57 -0700, Cong Wang wrote: > > > Why not just validate the fallback action in each action init()? > > > For example, checking tcfg_paction in

[bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread John Fastabend
When converting sockmap to new skmsg generic data structures we missed that the recvmsg handler did not correctly use sg.size and instead was using individual elements length. The result is if a sock is closed with outstanding data we omit the call to sk_mem_uncharge() and can get the warning

[PATCH net-next v3 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-16 Thread Gustavo A. R. Silva
Currently, the error handling for the call to function phy_read_paged() doesn't work because *reg_val* is of type u16 (16 bits, unsigned), which makes it impossible for it to hold a value less than 0. Fix this by changing the type of variable *reg_val* to int. Addresses-Coverity-ID: 1473970

[PATCH net] r8169: re-enable MSI-X on RTL8168g

2018-10-16 Thread Heiner Kallweit
Similar to d49c88d7677b ("r8169: Enable MSI-X on RTL8106e") after e9d0ba506ea8 ("PCI: Reprogram bridge prefetch registers on resume") we can safely assume that this also fixes the root cause of the issue worked around by 7c53a722459c ("r8169: don't use MSI-X on RTL8168g"). So let's revert it.

Re: [PATCH net-next 0/5] Align PTT and add various link modes.

2018-10-16 Thread David Miller
From: Rahul Verma Date: Tue, 16 Oct 2018 03:59:17 -0700 > From: Rahul Verma > > This series aligns the ptt propagation as local ptt or global ptt. > Adds new transceiver modes, speed capabilities and board config, > which is utilized to display the enhanced link modes, media types > and speed.

Re: [PATCH net] sctp: get pr_assoc and pr_stream all status with SCTP_PR_SCTP_ALL instead

2018-10-16 Thread David Miller
From: Xin Long Date: Tue, 16 Oct 2018 15:52:02 +0800 > According to rfc7496 section 4.3 or 4.4: > >sprstat_policy: This parameter indicates for which PR-SCTP policy > the user wants the information. It is an error to use > SCTP_PR_SCTP_NONE in sprstat_policy. If

Re: bpfilter causes a leftover kernel process

2018-10-16 Thread Alexei Starovoitov
On Wed, Sep 5, 2018 at 5:05 PM Olivier Brunel wrote: > > You'll see in the end that systemd complains that it can't > unmount /oldroot (EBUSY), aka the root fs; and that's because of the > bpfilter helper, which wasn't killed because it's seen as a kernel > thread due to its empty command line

Reclaiming memory for network interface

2018-10-16 Thread Sujeev Dias
Hi Setup: sdm845 connected to external modem over pcie interface During a data call, we found out we spend more than 25% of cpu for memory ops with io coherency.  That include allocation, freeing, dma mapping, and unmapping.  As we pushing to higher data rate (beyond 7 Gbps), the time we

Re: [PATCH stable 4.9 v2 00/29] backport of IP fragmentation fixes

2018-10-16 Thread Greg Kroah-Hartman
On Mon, Oct 15, 2018 at 10:53:02AM -0700, Eric Dumazet wrote: > On Mon, Oct 15, 2018 at 10:47 AM Florian Fainelli > wrote: > > > > > > > > On 10/10/2018 12:29 PM, Florian Fainelli wrote: > > > This is based on Stephen's v4.14 patches, with the necessary merge > > > conflicts, and the lack of

Re: [PATCH net] net: bpfilter: use get_pid_task instead of pid_task

2018-10-16 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 12:35:10AM +0900, Taehee Yoo wrote: > pid_task() dereferences rcu protected tasks array. > But there is no rcu_read_lock() in shutdown_umh() routine so that > rcu_read_lock() is needed. > get_pid_task() is wrapper function of pid_task. it holds rcu_read_lock() > then calls

[PATCH net] net: bpfilter: use get_pid_task instead of pid_task

2018-10-16 Thread Taehee Yoo
pid_task() dereferences rcu protected tasks array. But there is no rcu_read_lock() in shutdown_umh() routine so that rcu_read_lock() is needed. get_pid_task() is wrapper function of pid_task. it holds rcu_read_lock() then calls pid_task(). if task isn't NULL, it increases reference count of task.

Re: [PATCH bpf-next] bpf, tls: add tls header to tools infrastructure

2018-10-16 Thread Alexei Starovoitov
On Tue, Oct 16, 2018 at 03:59:36PM +0200, Daniel Borkmann wrote: > Andrey reported a build error for the BPF kselftest suite when compiled on > a machine which does not have tls related header bits installed natively: > > test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or

Re: [PATCH net-next v2 0/2] FDDI: DEC FDDIcontroller 700 TURBOchannel adapter support

2018-10-16 Thread Maciej W. Rozycki
On Mon, 15 Oct 2018, David Miller wrote: > Series applied, thank you. Great, thanks! Maciej

[PATCH] net/ipv4: fix tcp_poll for SMC fallback

2018-10-16 Thread Karsten Graul
Commit dd979b4df817 ("net: simplify sock_poll_wait") breaks tcp_poll for SMC fallback: An AF_SMC socket establishes an internal TCP socket for the CLC handshake with the remote peer. Whenever the SMC connection can not be established this CLC socket is used as a fallback. All socket operations

Re: [PATCH bpf-next v2 1/8] tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup

2018-10-16 Thread Daniel Borkmann
On 10/16/2018 04:17 PM, Eric Dumazet wrote: > On 10/12/2018 05:45 PM, Daniel Borkmann wrote: [...] >> diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c >> index a5995bb..34e9635 100644 >> --- a/net/ipv4/tcp_ulp.c >> +++ b/net/ipv4/tcp_ulp.c >> @@ -123,6 +123,8 @@ void tcp_cleanup_ulp(struct

Re: [PATCH bpf-next v2 1/8] tcp, ulp: enforce sock_owned_by_me upon ulp init and cleanup

2018-10-16 Thread Eric Dumazet
Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 12625 Comm: syz-executor3 Not tainted 4.19.0-rc8-next-20181016+ #95 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0

[PATCH bpf-next] bpf, tls: add tls header to tools infrastructure

2018-10-16 Thread Daniel Borkmann
Andrey reported a build error for the BPF kselftest suite when compiled on a machine which does not have tls related header bits installed natively: test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or directory #include ^ compilation terminated. Fix

Re: Fw: [Bug 201423] New: eth0: hw csum failure

2018-10-16 Thread Eric Dumazet
On Mon, Oct 15, 2018 at 11:30 PM Andre Tomt wrote: > > On 15.10.2018 17:41, Eric Dumazet wrote: > > On Mon, Oct 15, 2018 at 8:15 AM Stephen Hemminger > >> Something is changed between 4.17.12 and 4.18, after bisecting the problem > >> I > >> got the following first bad commit: > >> > >> commit

[PATCH 16/16] octeontx2-af: Support for disabling NIX RQ/SQ/CQ contexts

2018-10-16 Thread sunil . kovvuri
From: Geetha sowjanya This patch adds support for a RVU PF/VF to disable all RQ/SQ/CQ contexts of a NIX LF via mbox. This will be used by PF/VF drivers upon teardown or while freeing up HW resources. A HW context which is not INIT'ed cannot be modified and a RVU PF/VF driver may or may not INIT

[PATCH 06/16] octeontx2-af: Enable or disable CGX internal loopback

2018-10-16 Thread sunil . kovvuri
From: Geetha sowjanya Add support to enable or disable internal loopback mode in CGX. New mbox IDs CGX_INTLBK_ENABLE/DISABLE added for this. Signed-off-by: Geetha sowjanya Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/cgx.c| 30

[PATCH 07/16] octeontx2-af: NPA block admin queue init

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Initialize NPA admin queue (AQ) i.e alloc memory for AQ instructions and for the results. All NPA LFs will submit instructions to AQ to init/write/read Aura/Pool contexts and in case of read, get context from result memory. Added some common APIs for allocating memory for a

[PATCH 11/16] octeontx2-af: NIX block admin queue init

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Initialize NIX admin queue (AQ) i.e alloc memory for AQ instructions and for the results. All NIX LFs will submit instructions to AQ to init/write/read RQ/SQ/CQ/RSS contexts and in case of read, get context from result memory. Also before configuring/using NIX block

[PATCH 12/16] octeontx2-af: NIX block LF initialization

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Upon receiving NIX_LF_ALLOC mbox message allocate memory for NIXLF's CQ, SQ, RQ, CINT, QINT and RSS HW contexts and configure respective base iova HW. Enable caching of contexts into NIX NDC. Return SQ buffer (SQB) size, this PF/VF MAC address etc info e.t.c to the mbox msg

[PATCH 13/16] octeontx2-af: NIX LSO config for TSOv4/v6 offload

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Config LSO formats for TSOv4 and TSOv6 offloads. These formats tell HW which fields in the TCP packet's headers have to be updated while performing segmentation offload. Also report PF/VF drivers the LSO format indices as part of response to NIX_LF_ALLOC mbox msg. These

[PATCH 08/16] octeontx2-af: NPA block LF initialization

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Upon receiving NPA_LF_ALLOC mbox message allocate memory for NPALF's aura, pool and qint contexts and configure the same to HW. Enable caching of contexts into NPA NDC. Return pool related info like stack size, num pointers per stack page e.t.c to the mbox msg sender.

[PATCH 14/16] octeontx2-af: Alloc bitmaps for NIX Tx scheduler queues

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Allocate bitmaps and memory for PFVF mapping info for maintaining NIX transmit scheduler queues maintenance. PF/VF drivers will request for alloc, free e.t.c of Tx schedulers via mailbox. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/common.h |

[PATCH 15/16] octeontx2-af: NIX AQ instruction enqueue support

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Add support for a RVU PF/VF to submit instructions to NIX AQ via mbox. Instructions can be to init/write/read RQ/SQ/CQ/RSS contexts. In case of read, context will be returned as part of response to the mbox msg received. Signed-off-by: Sunil Goutham ---

[PATCH 01/16] octeontx2-af: Improve register polling loop

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Instead of looping on a integer timeout, use time_before(jiffies), so that maximum poll time is capped. Signed-off-by: Sunil Goutham Suggested-by: Arnd Bergmann --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 10/16] octeontx2-af: Support for disabling NPA Aura/Pool contexts

2018-10-16 Thread sunil . kovvuri
From: Geetha sowjanya This patch adds support for a RVU PF/VF to disable all Aura/Pool contexts of a NPA LF via mbox. This will be used by PF/VF drivers upon teardown or while freeing up HW resources. A HW context which is not INIT'ed cannot be modified and a RVU PF/VF driver may or may not

[PATCH 04/16] octeontx2-af: Support for MAC address filters in CGX

2018-10-16 Thread sunil . kovvuri
From: Vidhya Raman This patch adds support for setting MAC address filters in CGX for PF interfaces. Also PF interfaces can be put in promiscuous mode. Dataplane PFs access this functionality using mailbox messages to the AF driver. Signed-off-by: Vidhya Raman Signed-off-by: Stanislaw Kardach

[PATCH 09/16] octeontx2-af: NPA AQ instruction enqueue support

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Add support for a RVU PF/VF to submit instructions to NPA AQ via mbox. Instructions can be to init/write/read Aura/Pool/Qint contexts. In case of read, context will be returned as part of response to the mbox msg received. Signed-off-by: Sunil Goutham ---

[PATCH 00/16] octeontx2-af: NPA and NIX blocks initialization

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham This patchset is a continuation to earlier submitted patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. octeontx2-af: Add RVU Admin Function driver https://www.spinics.net/lists/netdev/msg528272.html

[PATCH 05/16] octeontx2-af: Forward CGX link notifications to PFs

2018-10-16 Thread sunil . kovvuri
From: Linu Cherian Upon receiving notification from firmware the CGX event handler in the AF driver gets the current link info such as status, speed, duplex etc from CGX driver and sends it across to PFs who have registered to receive such notifications. To support above - Mbox messaging

[PATCH 02/16] octeontx2-af: CGX Rx/Tx enable/disable mbox handlers

2018-10-16 Thread sunil . kovvuri
From: Sunil Goutham Added new mailbox msgs for RVU PF/VFs to request AF to enable/disable their mapped CGX::LMAC Rx & Tx. Signed-off-by: Sunil Goutham Signed-off-by: Linu Cherian --- drivers/net/ethernet/marvell/octeontx2/af/cgx.c| 18

[PATCH 03/16] octeontx2-af: Support to retrieve CGX LMAC stats

2018-10-16 Thread sunil . kovvuri
From: Christina Jacob This patch adds support for a RVU PF/VF driver to retrieve it's mapped CGX LMAC Rx and Tx stats from AF via mbox. New mailbox msg is added is added. Signed-off-by: Christina Jacob Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/cgx.c| 22

Re: [PATCH net] sctp: get pr_assoc and pr_stream all status with SCTP_PR_SCTP_ALL instead

2018-10-16 Thread Neil Horman
On Tue, Oct 16, 2018 at 03:52:02PM +0800, Xin Long wrote: > According to rfc7496 section 4.3 or 4.4: > >sprstat_policy: This parameter indicates for which PR-SCTP policy > the user wants the information. It is an error to use > SCTP_PR_SCTP_NONE in sprstat_policy. If

[PATCH net-next 4/5] qede: Check available link modes before link set from ethtool.

2018-10-16 Thread Rahul Verma
From: Rahul Verma Set link mode after checking available "supported" link caps of the port. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 64 + 1 file changed, 45 insertions(+), 19

[PATCH net-next 5/5] qed: Prevent link getting down in case of autoneg-off.

2018-10-16 Thread Rahul Verma
From: Rahul Verma Newly added link modes are required to be added during setting link modes. If the new link mode is not available during qed_set_link, it may cause link getting down due to empty supported capability, being passed to MFW, after setting

[PATCH net-next 3/5] qed: Add supported link and advertise link to display in ethtool.

2018-10-16 Thread Rahul Verma
From: Rahul Verma Added transceiver type, speed capability and board types in HSI, are utilizing to display the accurate link information in ethtool. Signed-off-by: Rahul Verma Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_main.c | 199

[PATCH net-next 1/5] qed: Align local and global PTT to propagate through the APIs.

2018-10-16 Thread Rahul Verma
From: Rahul Verma Align the use of local PTT to propagate through the qed_mcp* API's. Global ptt should not be used. Register access should be done through layers. Register address is mapped into a PTT, PF translation table. Several interface functions require a PTT to

[PATCH net-next 0/5] Align PTT and add various link modes.

2018-10-16 Thread Rahul Verma
From: Rahul Verma This series aligns the ptt propagation as local ptt or global ptt. Adds new transceiver modes, speed capabilities and board config, which is utilized to display the enhanced link modes, media types and speed. Enhances the link with detailed information. Rahul Verma (5): qed:

[PATCH net-next 2/5] qed: Added supported transceiver modes, speed capability and board config to HSI.

2018-10-16 Thread Rahul Verma
From: Rahul Verma Added transceiver modes with different speed and media type, speed capability and supported board types in HSI, which will be utilizing to display correct specification of link modes and speed type. Signed-off-by: Rahul Verma Signed-off-by:

[PATCH 1/2] arm64: dts: clearfog-gt-8k: fix USB regulator gpio polarity

2018-10-16 Thread Baruch Siach
The fixed regulator driver ignores the gpio flags, so this change has no practical effect in the current implementation. Fix it anyway to correct the hardware description. Signed-off-by: Baruch Siach --- arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts | 2 +- 1 file changed, 1

[PATCH 2/2] arm64: dts: clearfog-gt-8k: 1G eth PHY reset signal

2018-10-16 Thread Baruch Siach
This reset signal controls the Marvell 1512 1G PHY. Note that current implementation queries the PHY over the MDIO bus (get_phy_device() call from of_mdiobus_register_phy()) before reset signal deassert. If the PHY reset signal is asserted at boot time, PHY registration fails. So current code

Re: crash in xt_policy due to skb_dst_drop() in nf_ct_frag6_gather()

2018-10-16 Thread Maciej Żenczykowski
4.19-rc8 - pass 4.14.76 - pass 4.9.133 - fail 4.9.133 + revert of ad8b1ffc3efae2f65080bdb11145c87d299b8f9a - pass On Tue, Oct 16, 2018 at 2:41 AM Maciej Żenczykowski wrote: > > (and v4.9.133 latest 4.9 LTS fails the same way, but curiously 4.19-rc8 > doesn't)

Re: crash in xt_policy due to skb_dst_drop() in nf_ct_frag6_gather()

2018-10-16 Thread Maciej Żenczykowski
(and v4.9.133 latest 4.9 LTS fails the same way, but curiously 4.19-rc8 doesn't)

Re: crash in xt_policy due to skb_dst_drop() in nf_ct_frag6_gather()

2018-10-16 Thread Maciej Żenczykowski
> That is not supposed to happen. # uname -a Linux (none) 4.9.119 #3 Tue Oct 16 02:34:36 PDT 2018 x86_64 GNU/Linux root@(none)# ip6tables -A OUTPUT -m policy --dir out --pol ipsec root@(none)# python -c "import os, socket; ip='0001';

Re: [PATCH] net-xfrm: add build time cfg option to PF_KEY SHA256 to use RFC4868-compliant truncation

2018-10-16 Thread Lorenzo Colitti
On Tue, Oct 16, 2018 at 5:06 PM Maciej Żenczykowski wrote: > +config XFRM_HMAC_SHA256_RFC4868 > + bool "Strict RFC4868 hmac(sha256) 128-bit truncation" > + depends on XFRM_ALGO > + default n > + ---help--- > + Support strict RFC4868 hmac(sha256) 128-bit truncation

Re: crash in xt_policy due to skb_dst_drop() in nf_ct_frag6_gather()

2018-10-16 Thread Florian Westphal
Maciej Żenczykowski wrote: I am currently travelling and not able to investigate until next week. > commit ad8b1ffc3efae2f65080bdb11145c87d299b8f9a > Author: Florian Westphal > netfilter: ipv6: nf_defrag: drop skb dst before queueing > > +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c > @@

  1   2   >