Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-29 Thread Wang, Dongsheng
On 2018/10/29 20:40, Andrew Lunn wrote: > On Mon, Oct 29, 2018 at 02:39:36AM +, Wang, Dongsheng wrote: >> On 2018/10/26 21:12, Andrew Lunn wrote: >>> On Fri, Oct 26, 2018 at 03:04:25AM +, Wang, Dongsheng wrote: On 2018/10/26 10:37, Timur Tabi wrote: > On 10/25/18 9:18 PM, Wang,

Re: [PATCH net v2] rtnetlink: Disallow FDB configuration for non-Ethernet device

2018-10-29 Thread David Miller
From: Ido Schimmel Date: Mon, 29 Oct 2018 20:36:43 + > When an FDB entry is configured, the address is validated to have the > length of an Ethernet address, but the device for which the address is > configured can be of any type. > > The above can result in the use of uninitialized memory

Re: Latest net-next kernel 4.19.0+

2018-10-29 Thread Eric Dumazet
On 10/29/2018 07:53 PM, Eric Dumazet wrote: > > > On 10/29/2018 07:27 PM, Cong Wang wrote: >> Hi, >> >> On Mon, Oct 29, 2018 at 5:19 PM Paweł Staszewski >> wrote: >>> >>> Sorry not complete - followed by hw csum: >>> >>> [ 342.190831] vlan1490: hw csum failure >>> [ 342.190835] CPU: 52

Re: [PATCH net] sctp: check policy more carefully when getting pr status

2018-10-29 Thread David Miller
From: Xin Long Date: Mon, 29 Oct 2018 23:13:11 +0800 > When getting pr_assocstatus and pr_streamstatus by sctp_getsockopt, > it doesn't correctly process the case when policy is set with > SCTP_PR_SCTP_ALL | SCTP_PR_SCTP_MASK. It even causes a > slab-out-of-bounds in

Re: [PATCH net] sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer

2018-10-29 Thread David Miller
From: Xin Long Date: Mon, 29 Oct 2018 23:10:29 +0800 > If a transport is removed by asconf but there still are some chunks with > this transport queuing on out_chunk_list, later an use-after-free issue > will be caused when accessing this transport from these chunks in > sctp_outq_flush(). > >

Re: [PATCH net 0/2] mlxsw: Couple of fixes

2018-10-29 Thread David Miller
From: Ido Schimmel Date: Mon, 29 Oct 2018 14:26:13 + > First patch makes sure mlxsw does not ignore user requests to delete FDB > entries that were learned by the device. > > Second patch fixes a use-after-free that can be triggered by requesting > a reload via devlink when the previous

[PATCH 1/2] net: add an identifier name for 'struct sock *'

2018-10-29 Thread Bo YU
Fix a warning from checkpatch: function definition argument 'struct sock *' should also have an identifier name in include/net/af_unix.h. Signed-off-by: Bo YU --- include/net/af_unix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/af_unix.h

[PATCH 2/2] net: drop a space before tabs

2018-10-29 Thread Bo YU
Fix a warning from checkpatch.pl:'please no space before tabs' in include/net/af_unix.h Signed-off-by: Bo YU --- include/net/af_unix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/af_unix.h b/include/net/af_unix.h index d53aea859a76..ddbba838d048 100644 ---

Re: [PATCH net] Documentation: ip-sysctl.txt: Document tcp_fwmark_accept

2018-10-29 Thread David Miller
From: Lorenzo Colitti Date: Mon, 29 Oct 2018 09:30:29 +0900 > This patch documents the tcp_fwmark_accept sysctl that was > added in 3.15. > > Signed-off-by: Lorenzo Colitti Applied, thanks Lorenzo.

Re: [PATCH v2] bonding: fix length of actor system

2018-10-29 Thread David Miller
From: Tobias Jungel Date: Sun, 28 Oct 2018 12:54:10 +0100 > The attribute IFLA_BOND_AD_ACTOR_SYSTEM is sent to user space having the > length of sizeof(bond->params.ad_actor_system) which is 8 byte. This > patch aligns the length to ETH_ALEN to have the same MAC address exposed > as using sysfs.

[PATCH 0/2] net: fix warnings in include/net/af_unix.h

2018-10-29 Thread Bo YU
Fix two warnings from checkpatch.pl. Bo YU (2): net: add an identifier name for 'struct sock *' net: drop a space before tabs include/net/af_unix.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-29 Thread David Miller
From: Jeff Barnhill <0xeff...@gmail.com> Date: Sun, 28 Oct 2018 01:51:59 + > +struct ipv6_ac_addrlist { > + struct in6_addr acal_addr; > + possible_net_t acal_pnet; > + refcount_t acal_users; > + struct hlist_node acal_lst; /*

Re: [net 1/2] net/mlx5e: When RXFCS is set, add FCS data into checksum calculation

2018-10-29 Thread Eric Dumazet
On 05/24/2018 02:53 PM, Saeed Mahameed wrote: > From: Eran Ben Elisha > > When RXFCS feature is enabled, the HW do not strip the FCS data, > however it is not present in the checksum calculated by the HW. > > Fix that by manually calculating the FCS checksum and adding it to the SKB >

Re: [PATCH net] ipv4/igmp: fix v1/v2 switchback timeout based on rfc3376, 8.12

2018-10-29 Thread David Miller
From: Hangbin Liu Date: Fri, 26 Oct 2018 11:30:35 +0800 > Similiar with ipv6 mcast commit 89225d1ce6af3 ("net: ipv6: mld: fix v1/v2 > switchback timeout to rfc3810, 9.12.") > > i) RFC3376 8.12. Older Version Querier Present Timeout says: > >The Older Version Querier Interval is the

Re: [PATCH net] ipv6/mcast: update mc_qrv when join new group

2018-10-29 Thread David Miller
From: Hangbin Liu Date: Fri, 26 Oct 2018 10:30:54 +0800 > Currently we only set mc_qrv to sysctl_mld_qrv when interface up. If we > change sysctl_mld_qrv after interface up, it will has no effect. > > Fix it by assigning latest sysctl_mld_qrv to idev mc_qrv when join new group. > >

Re: [Patch net] net: make pskb_trim_rcsum_slow() robust

2018-10-29 Thread Eric Dumazet
On 10/29/2018 07:41 PM, Cong Wang wrote: > On Mon, Oct 29, 2018 at 7:25 PM Eric Dumazet wrote: >> >> >> >> On 10/29/2018 07:21 PM, Cong Wang wrote: >>> On Mon, Oct 29, 2018 at 7:14 PM Eric Dumazet wrote: Would not it be simpler to set ip_summed to CHECKSUM_NONE (no need to save

Re: Latest net-next kernel 4.19.0+

2018-10-29 Thread Eric Dumazet
On 10/29/2018 07:27 PM, Cong Wang wrote: > Hi, > > On Mon, Oct 29, 2018 at 5:19 PM Paweł Staszewski > wrote: >> >> Sorry not complete - followed by hw csum: >> >> [ 342.190831] vlan1490: hw csum failure >> [ 342.190835] CPU: 52 PID: 0 Comm: swapper/52 Not tainted 4.19.0+ #1 >> [

Re: 4.19 - tons of hw csum failure errors

2018-10-29 Thread Cong Wang
(Cc'ing Eric) On Sat, Oct 27, 2018 at 12:47 PM Nikola Ciprich wrote: > > Hi, > > just wanted to report, thet after switching to 4.19 (fro 4.14.x, so maybe > the problem appeared somewhere between), I'm getting tons of similar > messages: > > Oct 27 09:06:27 xxx kernel: br501: hw csum failure >

Re: Latest net-next kernel 4.19.0+

2018-10-29 Thread Cong Wang
(Adding Eric and Dimitris into Cc) On Mon, Oct 29, 2018 at 7:27 PM Cong Wang wrote: > > Hi, > > On Mon, Oct 29, 2018 at 5:19 PM Paweł Staszewski > wrote: > > > > Sorry not complete - followed by hw csum: > > > > [ 342.190831] vlan1490: hw csum failure > > [ 342.190835] CPU: 52 PID: 0 Comm:

Re: [Patch net] net: make pskb_trim_rcsum_slow() robust

2018-10-29 Thread Cong Wang
On Mon, Oct 29, 2018 at 7:25 PM Eric Dumazet wrote: > > > > On 10/29/2018 07:21 PM, Cong Wang wrote: > > On Mon, Oct 29, 2018 at 7:14 PM Eric Dumazet wrote: > >> > >> Would not it be simpler to set ip_summed to CHECKSUM_NONE (no need to save > >> old_csum) ? > > > > For !CHECKSUM_COMPLETE,

Re: Latest net-next kernel 4.19.0+

2018-10-29 Thread Cong Wang
Hi, On Mon, Oct 29, 2018 at 5:19 PM Paweł Staszewski wrote: > > Sorry not complete - followed by hw csum: > > [ 342.190831] vlan1490: hw csum failure > [ 342.190835] CPU: 52 PID: 0 Comm: swapper/52 Not tainted 4.19.0+ #1 > [ 342.190836] Call Trace: > [ 342.190839] > [ 342.190849]

Re: [Patch net] net: make pskb_trim_rcsum_slow() robust

2018-10-29 Thread Eric Dumazet
On 10/29/2018 07:21 PM, Cong Wang wrote: > On Mon, Oct 29, 2018 at 7:14 PM Eric Dumazet wrote: >> >> Would not it be simpler to set ip_summed to CHECKSUM_NONE (no need to save >> old_csum) ? > > For !CHECKSUM_COMPLETE, ip_summed should be untouched, right? > > If you mean only setting to

Re: [Patch net] net: make pskb_trim_rcsum_slow() robust

2018-10-29 Thread Cong Wang
On Mon, Oct 29, 2018 at 7:14 PM Eric Dumazet wrote: > > Would not it be simpler to set ip_summed to CHECKSUM_NONE (no need to save > old_csum) ? For !CHECKSUM_COMPLETE, ip_summed should be untouched, right? If you mean only setting to CHECKSUM_NONE for CHECKSUM_COMPLETE case, the end result

Re: [Patch net] net: make pskb_trim_rcsum_slow() robust

2018-10-29 Thread Eric Dumazet
On 10/29/2018 05:35 PM, Cong Wang wrote: > Most callers of pskb_trim_rcsum() simply drops the skb when > it fails, however, ip_check_defrag() still continues to pass > the skb up to stack. In that case, we should restore its previous > csum if __pskb_trim() fails. > > Found this during code

Re: [Patch V4 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-29 Thread tanhuazhong
On 2018/10/30 9:31, Joe Perches wrote: On Tue, 2018-10-30 at 09:21 +0800, tanhuazhong wrote: On 2018/10/30 1:44, Joe Perches wrote: On Mon, 2018-10-29 at 21:54 +0800, Huazhong Tan wrote: When hns3_nic_init_vector_data() fails to map ring to vector, it should cancel the netif_napi_add()

Re: [Patch V4 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-29 Thread Joe Perches
On Tue, 2018-10-30 at 09:21 +0800, tanhuazhong wrote: > > On 2018/10/30 1:44, Joe Perches wrote: > > On Mon, 2018-10-29 at 21:54 +0800, Huazhong Tan wrote: > > > When hns3_nic_init_vector_data() fails to map ring to vector, > > > it should cancel the netif_napi_add() that has been successfully >

Re: [Patch V4 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-29 Thread tanhuazhong
On 2018/10/30 1:44, Joe Perches wrote: On Mon, 2018-10-29 at 21:54 +0800, Huazhong Tan wrote: When hns3_nic_init_vector_data() fails to map ring to vector, it should cancel the netif_napi_add() that has been successfully done and then exits. [] diff --git

Re: Latest net-next kernel 4.19.0+

2018-10-29 Thread Paweł Staszewski
W dniu 30.10.2018 o 01:11, Paweł Staszewski pisze: Sorry not complete - followed by hw csum: [  342.190831] vlan1490: hw csum failure [  342.190835] CPU: 52 PID: 0 Comm: swapper/52 Not tainted 4.19.0+ #1 [  342.190836] Call Trace: [  342.190839]  [  342.190849]  dump_stack+0x46/0x5b [ 

[Patch net] net: make pskb_trim_rcsum_slow() robust

2018-10-29 Thread Cong Wang
Most callers of pskb_trim_rcsum() simply drops the skb when it fails, however, ip_check_defrag() still continues to pass the skb up to stack. In that case, we should restore its previous csum if __pskb_trim() fails. Found this during code review. Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and

Re: Latest net-next kernel 4.19.0+

2018-10-29 Thread Paweł Staszewski
Sorry not complete - followed by hw csum: [  342.190831] vlan1490: hw csum failure [  342.190835] CPU: 52 PID: 0 Comm: swapper/52 Not tainted 4.19.0+ #1 [  342.190836] Call Trace: [  342.190839]  [  342.190849]  dump_stack+0x46/0x5b [  342.190856]  __skb_checksum_complete+0x9a/0xa0 [ 

Latest net-next kernel 4.19.0+

2018-10-29 Thread Paweł Staszewski
Hi Just checked in test lab latest kernel and have weird traces: [  219.888673] CPU: 52 PID: 0 Comm: swapper/52 Not tainted 4.19.0+ #1 [  219.888674] Call Trace: [  219.888676]  [  219.888685]  dump_stack+0x46/0x5b [  219.888691]  __skb_checksum_complete+0x9a/0xa0 [  219.888694] 

Re: [PATCH iproute2] bpf: check map symbol type properly with newer llvm compiler

2018-10-29 Thread Daniel Borkmann
On 10/29/2018 11:32 PM, Yonghong Song wrote: > With llvm 7.0 or earlier, the map symbol type is STT_NOTYPE. > -bash-4.4$ cat t.c > __attribute__((section("maps"))) int g; > -bash-4.4$ clang -target bpf -O2 -c t.c > -bash-4.4$ readelf -s t.o > > Symbol table '.symtab' contains 2 entries:

[PATCH net 0/3] net: bql: better deal with GSO

2018-10-29 Thread Eric Dumazet
While BQL bulk dequeue works well for TSO packets, it is not very efficient as soon as GSO is involved. On a GSO only workload (UDP or TCP), this patch series can save about 8 % of cpu cycles on a 40Gbit mlx4 NIC, by keeping optimal batching, and avoiding expensive qdisc requeues and reschedules.

[PATCH net 3/3] net/mlx4_en: use netdev_tx_sent_queue_more()

2018-10-29 Thread Eric Dumazet
This patch has two changes : 1) Use netdev_tx_sent_queue_more() for skbs with xmit_more This avoids mangling BQL status, since we only need to take care of it for the last skb of the batch. 2) doorbel only depends on xmit_more and netif_tx_queue_stopped() While not strictly necessary

[PATCH net 2/3] net: do not abort bulk send on BQL status

2018-10-29 Thread Eric Dumazet
Before calling dev_hard_start_xmit(), upper layers tried to cook optimal skb list based on BQL budget. Problem is that GSO packets can end up comsuming more than the BQL budget. Breaking the loop is not useful, since requeued packets are ahead of any packets still in the qdisc. It is also more

[PATCH net 1/3] net: bql: add netdev_tx_sent_queue_more() helper

2018-10-29 Thread Eric Dumazet
When qdisc_run() tries to use BQL budget to bulk-dequeue a batch of packets, GSO can later transform this list in another list of skbs, and each skb is sent to device ndo_start_xmit(), one at a time, with skb->xmit_more being set to one but for last skb. Problem is that very often, BQL limit is

Re: [PATCH bpf-next] xdp: sample code for redirecting vlan packets to specific cpus

2018-10-29 Thread Shannon Nelson
On 10/29/2018 3:11 PM, John Fastabend wrote: On 10/29/2018 02:19 PM, Shannon Nelson wrote: This is an example of using XDP to redirect the processing of particular vlan packets to specific CPUs. This is in response to comments received on a kernel patch put forth previously to do something

[PATCH iproute2] bpf: check map symbol type properly with newer llvm compiler

2018-10-29 Thread Yonghong Song
With llvm 7.0 or earlier, the map symbol type is STT_NOTYPE. -bash-4.4$ cat t.c __attribute__((section("maps"))) int g; -bash-4.4$ clang -target bpf -O2 -c t.c -bash-4.4$ readelf -s t.o Symbol table '.symtab' contains 2 entries: Num:Value Size TypeBind Vis

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Yoann P.
Le lundi 29 octobre 2018, 23:03:07 CET Stefano Brivio a écrit : > On Mon, 29 Oct 2018 21:06:35 +0100 > > "Yoann P." wrote: > > > By the way, why do you use column(1), when ss already prints output in > > > columns? Any other issue you are working around? > > > > column can hide columns with "-H

Re: [PATCH] bpf: tcp_bpf_recvmsg should return EAGAIN when nonblocking and no data

2018-10-29 Thread Song Liu
On Mon, Oct 29, 2018 at 1:32 PM John Fastabend wrote: > > On 10/29/2018 12:31 PM, John Fastabend wrote: > > We return 0 in the case of a nonblocking socket that has no data > > available. However, this is incorrect and may confuse applications. > > After this patch we do the correct thing and

Re: [PATCH bpf-next] bpf_load: add map name to load_maps error message

2018-10-29 Thread John Fastabend
On 10/29/2018 02:14 PM, Shannon Nelson wrote: > To help when debugging bpf/xdp load issues, have the load_map() > error message include the number and name of the map that > failed. > > Signed-off-by: Shannon Nelson > --- > samples/bpf/bpf_load.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH bpf-next] xdp: sample code for redirecting vlan packets to specific cpus

2018-10-29 Thread John Fastabend
On 10/29/2018 02:19 PM, Shannon Nelson wrote: > This is an example of using XDP to redirect the processing of > particular vlan packets to specific CPUs. This is in response > to comments received on a kernel patch put forth previously > to do something similar using RPS. >

Re: [PATCH bpf] tools/bpf: add unlimited rlimit for flow_dissector_load

2018-10-29 Thread Song Liu
On Mon, Oct 29, 2018 at 2:58 PM Yonghong Song wrote: > > On our test machine, bpf selftest test_flow_dissector.sh failed > with the following error: > # ./test_flow_dissector.sh > bpffs not mounted. Mounting... > libbpf: failed to create map (name: 'jmp_table'): Operation not permitted >

[PATCH iproute] ss: Actually print left delimiter for columns

2018-10-29 Thread Stefano Brivio
While rendering columns, we use a local variable to keep track of the field currently being printed, without touching current_field, which is used for buffering. Use the right pointer to access the left delimiter for the current column, instead of always printing the left delimiter for the last

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Stefano Brivio
On Mon, 29 Oct 2018 21:07:47 +0100 "Yoann P." wrote: > > - printed = printf("%s", current_field->ldelim); > > + printed = printf("%s", f->ldelim); > > else > > printed = 0; > > I can't reproduce the issue with

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Stefano Brivio
On Mon, 29 Oct 2018 21:06:35 +0100 "Yoann P." wrote: > > By the way, why do you use column(1), when ss already prints output in > > columns? Any other issue you are working around? > > column can hide columns with "-H -" and is a bit faster than awk to output a > single column according to

[PATCH bpf] tools/bpf: add unlimited rlimit for flow_dissector_load

2018-10-29 Thread Yonghong Song
On our test machine, bpf selftest test_flow_dissector.sh failed with the following error: # ./test_flow_dissector.sh bpffs not mounted. Mounting... libbpf: failed to create map (name: 'jmp_table'): Operation not permitted libbpf: failed to load object 'bpf_flow.o' ./flow_dissector_load:

RE: [PATCH net] net: ethernet: cadence: fix socket buffer corruption problem

2018-10-29 Thread Tristram.Ha
> Could you, please, tell me if the above variable was false in your case? > > bool cloned = skb_cloned(*skb) || skb_header_cloned(*skb); > > If yes, then, the proper fix would be as follows: > > diff --git a/drivers/net/ethernet/cadence/macb_main.c > b/drivers/net/ethernet/cadence/macb_main.c

[PATCH bpf-next] xdp: sample code for redirecting vlan packets to specific cpus

2018-10-29 Thread Shannon Nelson
This is an example of using XDP to redirect the processing of particular vlan packets to specific CPUs. This is in response to comments received on a kernel patch put forth previously to do something similar using RPS. https://www.spinics.net/lists/netdev/msg528210.html [PATCH net-next]

[PATCH bpf-next] bpf_load: add map name to load_maps error message

2018-10-29 Thread Shannon Nelson
To help when debugging bpf/xdp load issues, have the load_map() error message include the number and name of the map that failed. Signed-off-by: Shannon Nelson --- samples/bpf/bpf_load.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/bpf/bpf_load.c

Re: [PATCH net v2] rtnetlink: Disallow FDB configuration for non-Ethernet device

2018-10-29 Thread David Ahern
On 10/29/18 2:36 PM, Ido Schimmel wrote: > When an FDB entry is configured, the address is validated to have the > length of an Ethernet address, but the device for which the address is > configured can be of any type. > > The above can result in the use of uninitialized memory when the address >

[PATCH net v2] rtnetlink: Disallow FDB configuration for non-Ethernet device

2018-10-29 Thread Ido Schimmel
When an FDB entry is configured, the address is validated to have the length of an Ethernet address, but the device for which the address is configured can be of any type. The above can result in the use of uninitialized memory when the address is later compared against existing addresses since

Re: [PATCH] bpf: tcp_bpf_recvmsg should return EAGAIN when nonblocking and no data

2018-10-29 Thread John Fastabend
On 10/29/2018 12:31 PM, John Fastabend wrote: > We return 0 in the case of a nonblocking socket that has no data > available. However, this is incorrect and may confuse applications. > After this patch we do the correct thing and return the error > EAGAIN. > > Quoting return codes from recvmsg

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Yoann P.
> On Mon, 29 Oct 2018 19:20:36 +0100 > > Stefano Brivio wrote: > > The actual issue seems to be that in some cases the left delimiter for > > the State column is not printed > > Much worse, we always print the left delimiter of the last buffered > column, which is usually empty. My bad. >

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Yoann P.
> Hi Yohann, > > On Fri, 26 Oct 2018 22:53:32 +0200 > > "Yoann P." wrote: > > When using ss -Hutn4 or -utn3, Netid and State columns are sometime > > merged, it can be confusing when trying to pipe into awk or column. > > Thanks for fixing this. A few comments though: > > @@ -144,9 +144,9 @@

[PATCH] bpf: tcp_bpf_recvmsg should return EAGAIN when nonblocking and no data

2018-10-29 Thread John Fastabend
We return 0 in the case of a nonblocking socket that has no data available. However, this is incorrect and may confuse applications. After this patch we do the correct thing and return the error EAGAIN. Quoting return codes from recvmsg manpage, EAGAIN or EWOULDBLOCK The socket is marked

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Stefano Brivio
On Mon, 29 Oct 2018 19:20:36 +0100 Stefano Brivio wrote: > The actual issue seems to be that in some cases the left delimiter for > the State column is not printed Much worse, we always print the left delimiter of the last buffered column, which is usually empty. My bad. The issue is not so

Re: [RFC net-next v2 1/8] net: sched: register callbacks for indirect tc block binds

2018-10-29 Thread Jakub Kicinski
On Mon, 29 Oct 2018 17:12:27 +0200, Or Gerlitz wrote: > >> Maybe it would be better to follow the trusted environment model of the > >> kernel > >> and not protect the core from driver bugs? If the driver does things right > >> they > >> will unregister before bailing out and if not, they will

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Stefano Brivio
Hi Yohann, On Fri, 26 Oct 2018 22:53:32 +0200 "Yoann P." wrote: > When using ss -Hutn4 or -utn3, Netid and State columns are sometime merged, > it > can be confusing when trying to pipe into awk or column. Thanks for fixing this. A few comments though: > @@ -144,9 +144,9 @@ static struct

Re: [Patch V4 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-29 Thread Joe Perches
On Mon, 2018-10-29 at 21:54 +0800, Huazhong Tan wrote: > When hns3_nic_init_vector_data() fails to map ring to vector, > it should cancel the netif_napi_add() that has been successfully > done and then exits. [] > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c >

Re: [PATCH iproute2-next 3/3] rdma: Add an option to rename IB device interface

2018-10-29 Thread Leon Romanovsky
On Mon, Oct 29, 2018 at 11:07:06AM -0600, David Ahern wrote: > On 10/29/18 4:30 AM, Leon Romanovsky wrote: > > > > Sorry for being slow in response, I was on vacation. > > -- > > > > This print is intended to warn about missing "new name" and it is not > > checked by rd_exec_require_dev()

Re: [PATCH iproute2-next 3/3] rdma: Add an option to rename IB device interface

2018-10-29 Thread David Ahern
On 10/29/18 4:30 AM, Leon Romanovsky wrote: > > Sorry for being slow in response, I was on vacation. > -- > > This print is intended to warn about missing "new name" and it is not > checked by rd_exec_require_dev() > > To emphasize it: > > diff --git a/rdma/dev.c b/rdma/dev.c > index

Re: [PATCH] Fix ss Netid column and Local/Peer_Address

2018-10-29 Thread Stephen Hemminger
On Fri, 26 Oct 2018 22:53:32 +0200 "Yoann P." wrote: > When using ss -Hutn4 or -utn3, Netid and State columns are sometime merged, > it > can be confusing when trying to pipe into awk or column. > Details (before and after output) are available on this github issue: https:// >

Re: [iproute2 PATCH v2] bridge: fix vlan show stats formatting

2018-10-29 Thread Stephen Hemminger
On Fri, 26 Oct 2018 23:51:03 +0200 Tobias Jungel wrote: > The output of -statistics vlan show was broken previous change for json > output. This aligns the format to vlan show. > > v2: fixed too greedy deletion that caused a -Wmaybe-uninitialized > > Signed-off-by: Tobias Jungel Applied

Re: [iproute PATCH] utils.h: provide fallback CLOCK_TAI definition

2018-10-29 Thread Stephen Hemminger
On Sat, 27 Oct 2018 17:31:02 +0200 Peter Korsgaard wrote: > q_{etf,taprio}.c uses CLOCK_TAI, which isn't exposed by glibc < 2.21 or > uClibc, breaking the build. Provide a fallback definition like it is done > for IPPROTO_MPLS and others. > > Signed-off-by: Peter Korsgaard > --- Applied,

RE: [RFC PATCH 4/4] ixgbe: add support for extended PHC gettime

2018-10-29 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] On > Behalf Of Miroslav Lichvar > Sent: Monday, October 29, 2018 6:31 AM > To: Keller, Jacob E > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org; Richard Cochran > > Subject: Re:

Re: [PATCH iproute2] Use libbsd for strlcpy if available

2018-10-29 Thread Luca Boccassi
On Mon, 2018-10-29 at 09:27 -0600, David Ahern wrote: > On 10/29/18 4:46 AM, Luca Boccassi wrote: > > If libc does not provide strlcpy check for libbsd with pkg-config > > to > > avoid relying on inline version. > > > > Signed-off-by: Luca Boccassi > > --- > > This allows distro maintainers to

Re: [PATCH iproute2] Use libbsd for strlcpy if available

2018-10-29 Thread David Ahern
On 10/29/18 4:46 AM, Luca Boccassi wrote: > If libc does not provide strlcpy check for libbsd with pkg-config to > avoid relying on inline version. > > Signed-off-by: Luca Boccassi > --- > This allows distro maintainers to be able to choose to reduce > duplication and let this code be maintained

[PATCH net] sctp: check policy more carefully when getting pr status

2018-10-29 Thread Xin Long
When getting pr_assocstatus and pr_streamstatus by sctp_getsockopt, it doesn't correctly process the case when policy is set with SCTP_PR_SCTP_ALL | SCTP_PR_SCTP_MASK. It even causes a slab-out-of-bounds in sctp_getsockopt_pr_streamstatus(). This patch fixes it by return -EINVAL for this case.

Re: [RFC net-next v2 1/8] net: sched: register callbacks for indirect tc block binds

2018-10-29 Thread Or Gerlitz
On Mon, Oct 29, 2018 at 2:54 PM John Hurley wrote: > On Sun, Oct 28, 2018 at 11:10 AM Or Gerlitz wrote: > > > > On Thu, Oct 25, 2018 at 3:28 PM John Hurley > > wrote: > > > Currently drivers can register to receive TC block bind/unbind callbacks > > > by implementing the setup_tc ndo in any of

[PATCH net] sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer

2018-10-29 Thread Xin Long
If a transport is removed by asconf but there still are some chunks with this transport queuing on out_chunk_list, later an use-after-free issue will be caused when accessing this transport from these chunks in sctp_outq_flush(). This is an old bug, we fix it by clearing the transport of these

Re: [PATCH net] net: ethernet: cadence: fix socket buffer corruption problem

2018-10-29 Thread Claudiu.Beznea
Hi Tristram, Could you, please, tell me if the above variable was false in your case? bool cloned = skb_cloned(*skb) || skb_header_cloned(*skb); If yes, then, the proper fix would be as follows: diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c

Re: [RFC net-next v2 2/8] net: add netif_is_geneve()

2018-10-29 Thread Sergei Shtylyov
On 10/29/2018 03:06 PM, John Hurley wrote: >>> Add a helper function to determine if the type of a netdev is geneve based >>> on its rtnl_link_ops. This allows drivers that may wish to ofload tunnels >> >> Offload? >> > > offload encap/decap to a hardware device such as a smartNIC. > Sorry,

[PATCH net 2/2] mlxsw: core: Fix devlink unregister flow

2018-10-29 Thread Ido Schimmel
From: Shalom Toledo After a failed reload, the driver is still registered to devlink, its devlink instance is still allocated and the 'reload_fail' flag is set. Then, in the next reload try, the driver's allocated devlink instance will be freed without unregistering from devlink and its

[PATCH net 0/2] mlxsw: Couple of fixes

2018-10-29 Thread Ido Schimmel
First patch makes sure mlxsw does not ignore user requests to delete FDB entries that were learned by the device. Second patch fixes a use-after-free that can be triggered by requesting a reload via devlink when the previous reload failed. Please consider both patches for stable. They apply

[PATCH net 1/2] mlxsw: spectrum_switchdev: Don't ignore deletions of learned MACs

2018-10-29 Thread Ido Schimmel
From: Petr Machata Demands to remove FDB entries should be honored even if the FDB entry in question was originally learned, and not added by the user. Therefore ignore the added_by_user datum for SWITCHDEV_FDB_DEL_TO_DEVICE. Fixes: 816a3bed9549 ("switchdev: Add fdb.added_by_user to switchdev

[Patch V4 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-29 Thread Huazhong Tan
When hns3_nic_init_vector_data() fails to map ring to vector, it should cancel the netif_napi_add() that has been successfully done and then exits. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan ---

[Patch V4 net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()

2018-10-29 Thread Huazhong Tan
It is not necessary to reset the queue in the hns3_uninit_all_ring(), since the queue is stopped in the down operation, and will be reset in the up operation. And the judgment of the HCLGE_STATE_RST_HANDLING flag in the hclge_reset_tqp() is not correct, because we need to reset tqp during pf

[Patch V4 net 04/11] net: hns3: bugfix for the initialization of command queue's spin lock

2018-10-29 Thread Huazhong Tan
The spin lock of the command queue only needs to be initialized once when the driver initializes the command queue. It is not necessary to initialize the spin lock when resetting. At the same time, the modification of the queue member should be performed after acquiring the lock. Fixes:

[Patch V4 net 00/11] Bugfix for the HNS3 driver

2018-10-29 Thread Huazhong Tan
This patch series include bugfix for the HNS3 ethernet controller driver. Change log: V3->V4: Fixes comments from Sergei Shtylyov V2->V3: Fixes comments from Sergei Shtylyov V1->V2: Fixes the compilation break reported by kbuild test robot

[Patch V4 net 06/11] net: hns3: bugfix for is_valid_csq_clean_head()

2018-10-29 Thread Huazhong Tan
The HEAD pointer of the hardware command queue maybe equal to the command queue's next_to_use in the driver, so that does not belong to the invalid HEAD pointer, since the hardware may not process the command in time, causing the HEAD pointer to be too late to update. The variables' name in this

[Patch V4 net 03/11] net: hns3: bugfix for reporting unknown vector0 interrupt repeatly problem

2018-10-29 Thread Huazhong Tan
The current driver supports handling two vector0 interrupts, reset and mailbox. When the hardware reports an interrupt of another type of interrupt source, if the driver does not process the interrupt and enables the interrupt, the hardware will repeatedly report the unknown interrupt. Therefore,

[Patch V4 net 08/11] net: hns3: fix incorrect return value/type of some functions

2018-10-29 Thread Huazhong Tan
There are some functions that, when they fail to send the command, need to return the corresponding error value to its caller. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: 681ec3999b3d ("net: hns3: fix for vlan table lost problem when

[Patch V4 net 02/11] net: hns3: add error handler for hns3_get_ring_config/hns3_queue_to_ring

2018-10-29 Thread Huazhong Tan
When hns3_get_ring_config()/hns3_queue_to_ring() failed during resetting, the allocated memory has not been freed before hns3_get_ring_config() and hns3_queue_to_ring() return. So this patch fixes the buffer not freeing problem during resetting. Fixes: 76ad4f0ee747 ("net: hns3: Add support of

[Patch V4 net 09/11] net: hns3: bugfix for handling mailbox while the command queue reinitialized

2018-10-29 Thread Huazhong Tan
In a multi-core machine, the mailbox service and reset service will be executed at the same time. The reset service will re-initialize the command queue, before that, the mailbox handler can only get some invalid messages. The HCLGE_STATE_CMD_DISABLE flag means that the command queue is not

[Patch V4 net 11/11] net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset()

2018-10-29 Thread Huazhong Tan
Since hclgevf_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclgevf_reset_wait(). So this patch releases the lock for the duration of hclgevf_reset_wait(). Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring

[Patch V4 net 07/11] net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read

2018-10-29 Thread Huazhong Tan
When there is a PHY, the driver needs to complete some operations through MDIO during reset reinitialization, so HCLGE_STATE_CMD_DISABLE is more suitable than HCLGE_STATE_RST_HANDLING to prevent the MDIO operation from being sent during the hardware reset. Fixes: b50ae26c57cb ("net: hns3: never

[Patch V4 net 10/11] net: hns3: bugfix for rtnl_lock's range in the hclge_reset()

2018-10-29 Thread Huazhong Tan
Since hclge_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclge_reset_wait(). So this patch releases the lock for the duration of hclge_reset_wait(). Fixes: 6d4fab39533f ("net: hns3: Reset net device with rtnl_lock")

Re: [RFC PATCH 4/4] ixgbe: add support for extended PHC gettime

2018-10-29 Thread Miroslav Lichvar
On Fri, Oct 26, 2018 at 04:54:57PM +, Keller, Jacob E wrote: > > -Original Message- > > From: Miroslav Lichvar [mailto:mlich...@redhat.com] > > Sent: Friday, October 26, 2018 9:28 AM > > To: netdev@vger.kernel.org > > Cc: intel-wired-...@lists.osuosl.org; Richard Cochran > > ; > >

Re: [RFC net-next v2 1/8] net: sched: register callbacks for indirect tc block binds

2018-10-29 Thread John Hurley
On Sun, Oct 28, 2018 at 11:10 AM Or Gerlitz wrote: > > On Thu, Oct 25, 2018 at 3:28 PM John Hurley wrote: > > Currently drivers can register to receive TC block bind/unbind callbacks > > by implementing the setup_tc ndo in any of their given netdevs. However, > > drivers may also be interested

Re: [Intel-wired-lan] [RFC PATCH 1/4] ptp: add PTP_SYS_OFFSET_EXTENDED ioctl

2018-10-29 Thread Miroslav Lichvar
On Fri, Oct 26, 2018 at 03:16:47PM -0700, Vinicius Costa Gomes wrote: > > + case PTP_SYS_OFFSET_EXTENDED: > > + if (!ptp->info->gettimex64) { > > + err = -EOPNOTSUPP; > > + break; > > + } > > + sysoff_extended = memdup_user((void

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-29 Thread Andrew Lunn
On Mon, Oct 29, 2018 at 02:39:36AM +, Wang, Dongsheng wrote: > On 2018/10/26 21:12, Andrew Lunn wrote: > > On Fri, Oct 26, 2018 at 03:04:25AM +, Wang, Dongsheng wrote: > >> On 2018/10/26 10:37, Timur Tabi wrote: > >>> On 10/25/18 9:18 PM, Wang, Dongsheng wrote: > But when I was

Re: [RFC net-next v2 2/8] net: add netif_is_geneve()

2018-10-29 Thread John Hurley
On Fri, Oct 26, 2018 at 9:52 AM Sergei Shtylyov wrote: > > Hello! > > On 25.10.2018 15:26, John Hurley wrote: > > > Add a helper function to determine if the type of a netdev is geneve based > > on its rtnl_link_ops. This allows drivers that may wish to ofload tunnels > > Offload? > offload

[PATCH iproute2] Use libbsd for strlcpy if available

2018-10-29 Thread Luca Boccassi
If libc does not provide strlcpy check for libbsd with pkg-config to avoid relying on inline version. Signed-off-by: Luca Boccassi --- This allows distro maintainers to be able to choose to reduce duplication and let this code be maintained in one place, in the external library. configure | 12

Re: [PATCH iproute2-next 3/3] rdma: Add an option to rename IB device interface

2018-10-29 Thread Leon Romanovsky
On Sun, Oct 21, 2018 at 10:02:43AM -0600, David Ahern wrote: > On 10/18/18 5:51 AM, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Enrich rdmatool with an option to rename IB devices, > > the command interface follows Iproute2 convention: > > "rdma dev set [OLD-DEVNAME] name

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-29 Thread Arnd Bergmann
On Mon, Oct 29, 2018 at 5:33 AM Sunil Kovvuri wrote: > On Sat, Oct 27, 2018 at 12:59 AM Arnd Bergmann wrote: > > On Fri, Oct 26, 2018 at 6:33 PM Sunil Kovvuri > > wrote: > > > On Fri, Oct 26, 2018 at 9:56 PM Sunil Kovvuri > > > wrote: > > Aside from this, there is the stuff that Andrew