Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe

2020-12-28 Thread Konstantin Ryabitsev
On Mon, Dec 28, 2020 at 01:05:26PM -0800, Florian Fainelli wrote: > On 12/28/2020 12:23 PM, Konstantin Ryabitsev wrote: > > On Thu, Dec 24, 2020 at 01:57:40PM -0800, Florian Fainelli wrote: > >>>> Konstantin, would you be willing to mod the kernel.org instance of > >&

Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe

2020-12-28 Thread Konstantin Ryabitsev
On Thu, Dec 24, 2020 at 01:57:40PM -0800, Florian Fainelli wrote: > >> Konstantin, would you be willing to mod the kernel.org instance of > >> patchwork to populate Fixes tags in the generated mboxes? > > > > I'd really rather not -- we try not to diverge f

Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe

2020-12-24 Thread Konstantin Ryabitsev
w: > > > > > > https://github.com/getpatchwork/patchwork/issues/151 > > > > It was proposed before, but rejected. You can have your local patchwork > > admin take care of that for you though and add custom tags: > > > > https://lists.ozlabs.or

[PATCH] net/ipv4: add comment about connect() to INADDR_ANY

2020-07-25 Thread Konstantin Khlebnikov
Copy comment from net/ipv6/tcp_ipv6.c to help future readers. Signed-off-by: Konstantin Khlebnikov --- net/ipv4/route.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a01efa062f6b..303fe706cbd2 100644 --- a/net/ipv4/route.c +++ b/net/ipv4

Re: [PATCH net-next 0/2] inet_diag: add cgroup attribute and filter

2020-04-30 Thread Konstantin Khlebnikov
On 30/04/2020 22.55, David Miller wrote: From: Dmitry Yakunin Date: Thu, 30 Apr 2020 18:51:13 +0300 This patch series extends inet diag with cgroup v2 ID attribute and filter. Which allows investigate sockets on per cgroup basis. Patch for ss is already sent to iproute2-next mailing list. Ok

[PATCH] ipv6/addrconf: use netdev_info()/netdev_warn()/netdev_dbg() for logging

2019-09-20 Thread Konstantin Khlebnikov
Print prefix " : " or " : ". Add "IPv6: " into format: netdev_info() does not use macro pr_fmt(). Signed-off-by: Konstantin Khlebnikov --- net/ipv6/addrconf.c | 28 net/ipv6/addrconf_core.c |2 +- 2 files changed, 13 insert

[PATCH] net/core/dev: print rtnl kind as driver name for virtual devices

2019-09-20 Thread Konstantin Khlebnikov
Device kind gives more information than only arbitrary device name. Signed-off-by: Konstantin Khlebnikov --- net/core/dev.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 71b18e80389f..c84561634afd 100644 --- a/net

AW: can: tcan4x5x: spi bits_per_word issue on Raspberry PI

2019-08-16 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
der by hand to get it running for my project. But in the long run, this does not seem to be a proper solution... Regards, Konstantin > Clock Phase and Clock Polarity are also an issue on the RPI as at least SPIDEV > kindly overlooks any options set previously. > I had my share o

can: tcan4x5x: spi bits_per_word issue on Raspberry PI

2019-08-14 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
o just change the bits_per_word value to 8 > > If this a common issue it might be a good idea to patch the driver. I will > check if I > can find proper a way to do so. > > Regards, > Konstantin Now I have another really confusing problem. Anything I write to SPI is written

can: tcan4x5x: spi bits_per_word issue on Raspberry PI

2019-08-14 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
Regards, Konstantin

AW: tcan4x5x on a Raspberry Pi

2019-08-09 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
> Konstantin >> On 7/29/19 6:19 AM, FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) wrote: >> Hi all, >> >> I am currently working on a project where I am trying to use the tcan4550 >> chip with a Raspberry PI 3B. >> I am struggling to create a w

tcan4x5x on a Raspberry Pi

2019-07-29 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
Hi all, I am currently working on a project where I am trying to use the tcan4550 chip with a Raspberry PI 3B. I am struggling to create a working device tree overlay file for the Raspberry Pi. Has anyone here tried this already? I would appreciate any help. Thanks, Konstantin

Re: [PATCH] net/neighbour: fix potential null pointer deference

2019-05-31 Thread Konstantin Khlebnikov
On 31.05.2019 11:29, Young Xiao wrote: There is a possible null pointer deference bugs in neigh_fill_info(), which is similar to the bug which was fixed in commit 6adc5fd6a142 ("net/neighbour: fix crash at dumping device-agnostic proxy entries"). Have you seen this in real life? I see nobody wh

[PATCH RFC] proc/meminfo: add NetBuffers counter for socket buffers

2019-05-15 Thread Konstantin Khlebnikov
-by: Konstantin Khlebnikov --- fs/proc/meminfo.c |5 - include/linux/mm.h |6 ++ mm/page_alloc.c|3 ++- net/core/sock.c| 20 net/sctp/socket.c |2 +- 5 files changed, 33 insertions(+), 3 deletions(-) diff --git a/fs/proc/meminfo.c b/fs/proc

[PATCH] net: bpfilter: fallback to netfilter if failed to load bpfilter kernel module

2019-05-15 Thread Konstantin Khlebnikov
If bpfilter is not available return ENOPROTOOPT to fallback to netfilter. Function request_module() returns both errors and userspace exit codes. Just ignore them. Rechecking bpfilter_ops is enough. Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by:

[PATCH iproute2] ss: add option --tos for requesting ipv4 tos and ipv6 tclass

2019-02-13 Thread Konstantin Khlebnikov
Also show socket class_id/priority used by classful qdisc. Kernel report this together with tclass since commit ("inet_diag: fix reporting cgroup classid and fallback to priority") Signed-off-by: Konstantin Khlebnikov --- man/man8/ss.8 | 17 + misc/ss.c

Re: [PATCH] inet_diag: fix reporting cgroup classid and fallback to priority

2019-02-13 Thread Konstantin Khlebnikov
On 12.02.2019 21:37, David Miller wrote: From: Konstantin Khlebnikov Date: Sat, 09 Feb 2019 13:35:52 +0300 Field idiag_ext in struct inet_diag_req_v2 used as bitmap of requested extensions has only 8 bits. Thus extensions starting from DCTCPINFO cannot be requested directly. Some of them

[PATCH] inet_diag: fix reporting cgroup classid and fallback to priority

2019-02-09 Thread Konstantin Khlebnikov
roup2 id because it is 64-bit (ino+gen). So, after this patch INET_DIAG_CLASS_ID will report socket priority for most common setup when net_cls isn't set and/or cgroup2 in use. Signed-off-by: Konstantin Khlebnikov Fixes: 0888e372c37f ("net: inet: diag: expose sockets cgroup classid"

Re: [Intel-wired-lan] [PATCH] e1000e: fix cyclic resets at link up with active tx

2019-01-17 Thread Konstantin Khlebnikov
On 17.01.2019 10:57, Neftin, Sasha wrote: On 1/14/2019 15:29, Konstantin Khlebnikov wrote: I'm seeing series of e1000e resets (sometimes endless) at system boot if something generates tx traffic at this time. In my case this is netconsole who sends message "e1000e :02:00.0:

[PATCH] e1000e: fix cyclic resets at link up with active tx

2019-01-14 Thread Konstantin Khlebnikov
in order to enable jumbo frames [ 37.790342] e1000e: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None This patch flushes tx buffers only once when carrier is off rather than at each watchdog iteration. Signed-off-by: Konstantin Khlebnikov --- drivers/net/ethernet/int

[PATCH] net/core/neighbour: fix kmemleak minimal reference count for hash tables

2019-01-14 Thread Konstantin Khlebnikov
This should be 1 for normal allocations, 0 disables leak reporting. Signed-off-by: Konstantin Khlebnikov Reported-by: Cong Wang Fixes: 85704cb8dcfd ("net/core/neighbour: tell kmemleak about hash tables") --- net/core/neighbour.c |2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH] net/core/neighbour: tell kmemleak about hash tables

2019-01-10 Thread Konstantin Khlebnikov
On Thu, Jan 10, 2019 at 11:45 PM Cong Wang wrote: > > On Tue, Jan 8, 2019 at 1:30 AM Konstantin Khlebnikov > wrote: > > @@ -443,12 +444,14 @@ static struct neigh_hash_table > > *neigh_hash_alloc(unsigned int shift) > > ret = kmalloc(sizeof(*ret), GFP_AT

Re: [PATCH] net/core/neighbour: tell kmemleak about hash tables

2019-01-08 Thread Konstantin Khlebnikov
On 08.01.2019 14:59, Eric Dumazet wrote: On 01/08/2019 01:30 AM, Konstantin Khlebnikov wrote: This fixes false-positive kmemleak reports about leaked neighbour entries: unreferenced object 0x8885c6e4d0a8 (size 1024): size 1024 object : should have been allocated by kzalloc(), right

[PATCH] net/core/neighbour: tell kmemleak about hash tables

2019-01-08 Thread Konstantin Khlebnikov
9b/0x400 [<81cdb353>] entry_SYSCALL_64_after_hwframe+0x49/0xbe [<5767ed39>] 0x Signed-off-by: Konstantin Khlebnikov --- net/core/neighbour.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/net/core/neighbour.c b

[PATCH v2] macvlan: use per-cpu queues for broadcast and multicast packets

2018-12-19 Thread Konstantin Khlebnikov
Currently macvlan has single per-port queue for broadcast and multicast. This disrupts order of packets when flows from different cpus are mixed. This patch replaces this queue with single set of per-cpu queues. Pointer to macvlan port is passed in skb control block. Signed-off-by: Konstantin

[PATCH 1/1] drivers/net/i40e: define proper net_device::neigh_priv_len

2018-11-23 Thread Konstantin Khorenko
But the driver does not setup dev->neigh_priv_len and we read beyond the neigh entry allocated memory, so the patch in the next mail fixes this. Signed-off-by: Konstantin Khorenko --- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/et

[PATCH 0/1] drivers/i40iw: out of bound access in i40iw_net_event()

2018-11-23 Thread Konstantin Khorenko
00\000" neigh_priv_len = 16 880650932200 name = "enp6s0f1\000\000\000\000\000\000\000" neigh_priv_len = 16 880642903300 name = "ib0\000\000\000\000\000\000\000\000\000\000\000\000" neigh_priv_len = 200 = Konstantin Khorenko (1): drivers/net/i40e: define proper net_device::neigh_priv_len drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.15.1

Re: [PATCH RFC] net/mlx5_en: switch to Toeplitz RSS hash by default

2018-09-06 Thread Konstantin Khlebnikov
On 06.09.2018 08:24, Saeed Mahameed wrote: On Sun, Sep 2, 2018 at 2:55 AM, Konstantin Khlebnikov wrote: On 02.09.2018 12:29, Tariq Toukan wrote: On 31/08/2018 2:29 PM, Konstantin Khlebnikov wrote: XOR (MLX5_RX_HASH_FN_INVERTED_XOR8) gives only 8 bits. It seems not enough for RFS. All

Re: [PATCH RFC] net/mlx5_en: switch to Toeplitz RSS hash by default

2018-09-02 Thread Konstantin Khlebnikov
On 02.09.2018 12:29, Tariq Toukan wrote: On 31/08/2018 2:29 PM, Konstantin Khlebnikov wrote: XOR (MLX5_RX_HASH_FN_INVERTED_XOR8) gives only 8 bits. It seems not enough for RFS. All other drivers use toeplitz. Driver mlx4_en uses Toeplitz by default and warns if hash XOR is used together with

[PATCH RFC] net/mlx5_en: switch to Toeplitz RSS hash by default

2018-08-31 Thread Konstantin Khlebnikov
g can limit RPS functionality". XOR is default in mlx5_en since commit 2be6967cdbc9 ("net/mlx5e: Support ETH_RSS_HASH_XOR"). Hash function could be set via ethtool. But it would be nice to have single standard for drivers or proper description why this one is special. Signed-off-by: K

[PATCH v3 2/2] net/sctp: Replace in/out stream arrays with flex_array

2018-08-10 Thread Konstantin Khorenko
This path replaces physically contiguous memory arrays allocated using kmalloc_array() with flexible arrays. This enables to avoid memory allocation failures on the systems under a memory stress. Signed-off-by: Oleg Babin Signed-off-by: Konstantin Khorenko --- include/net/sctp/structs.h | 9

[PATCH v3 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-10 Thread Konstantin Khorenko
Each SCTP association can have up to 65535 input and output streams. For each stream type an array of sctp_stream_in or sctp_stream_out structures is allocated using kmalloc_array() function. This function allocates physically contiguous memory regions, so this can lead to allocation of memory regi

[PATCH v3 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-10 Thread Konstantin Khorenko
-by: Konstantin Khorenko --- v2 changes: sctp_stream_in() users are updated to provide stream as an argument, sctp_stream_{in,out}_ptr() are now just sctp_stream_{in,out}(). v3 changes: Move type chages struct sctp_stream_out -> flex_array to next patch. Make sctp_stream_{in,out}() sta

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-10 Thread Konstantin Khorenko
On 08/09/2018 11:43 AM, Konstantin Khorenko wrote: On 08/04/2018 02:36 AM, Marcelo Ricardo Leitner wrote: On Fri, Aug 03, 2018 at 07:21:00PM +0300, Konstantin Khorenko wrote: ... Performance results: * Kernel: v4.18-rc6 - stock and with 2 patches from Oleg (earlier in

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-09 Thread Konstantin Khorenko
On 08/04/2018 02:36 AM, Marcelo Ricardo Leitner wrote: On Fri, Aug 03, 2018 at 07:21:00PM +0300, Konstantin Khorenko wrote: ... Performance results: * Kernel: v4.18-rc6 - stock and with 2 patches from Oleg (earlier in this thread) * Node: CPU (8 cores): Intel(R) Xeon(R

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-09 Thread Konstantin Khorenko
On 08/03/2018 11:40 PM, Marcelo Ricardo Leitner wrote: On Fri, Aug 03, 2018 at 07:21:01PM +0300, Konstantin Khorenko wrote: This patch introduces wrappers for accessing in/out streams indirectly. This will enable to replace physically contiguous memory arrays of streams with flexible arrays (or

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-09 Thread Konstantin Khorenko
On 08/03/2018 10:50 PM, David Miller wrote: From: Konstantin Khorenko Date: Fri, 3 Aug 2018 19:21:01 +0300 +struct sctp_stream_out *sctp_stream_out(const struct sctp_stream *stream, + __u16 sid) +{ + return ((struct sctp_stream_out *)(stream->

[PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread Konstantin Khorenko
-by: Konstantin Khorenko --- v2 changes: sctp_stream_in() users are updated to provide stream as an argument, sctp_stream_{in,out}_ptr() are now just sctp_stream_{in,out}(). --- include/net/sctp/structs.h | 30 +++- net/sctp/chunk.c | 6 ++- net/sctp/outqueue.c

[PATCH v2 2/2] net/sctp: Replace in/out stream arrays with flex_array

2018-08-03 Thread Konstantin Khorenko
This path replaces physically contiguous memory arrays allocated using kmalloc_array() with flexible arrays. This enables to avoid memory allocation failures on the systems under a memory stress. Signed-off-by: Oleg Babin --- include/net/sctp/structs.h | 1 + net/sctp/stream.c | 78 +++

[PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-03 Thread Konstantin Khorenko
Each SCTP association can have up to 65535 input and output streams. For each stream type an array of sctp_stream_in or sctp_stream_out structures is allocated using kmalloc_array() function. This function allocates physically contiguous memory regions, so this can lead to allocation of memory regi

Re: [PATCH net-next 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-07-24 Thread Konstantin Khorenko
ts spread decreased significantly when -S/-s options are used, but still too big to consider the performance test pass or fail. Can you please advise anything else to try - to decrease the dispersion rate - or can we just consider values are fine and i'm reworking the patch according to your comment about sctp_stream_in(asoc, sid)/sctp_stream_in_ptr(stream, sid) and that's it? Thank you in advance! -- Best regards, Konstantin

Re: [BUG] mlx5 have problems with ipv4-ipv6 tunnels in linux 4.4

2018-07-10 Thread Konstantin Khlebnikov
On 10.07.2018 01:31, Saeed Mahameed wrote: On Tue, Jul 3, 2018 at 10:45 PM, Konstantin Khlebnikov wrote: I'm seeing problems with tunnelled traffic with Mellanox Technologies MT27710 Family [ConnectX-4 Lx] using vanilla driver from linux 4.4.y Packets with payload bigger than 116 byte

[BUG] mlx5 have problems with ipv4-ipv6 tunnels in linux 4.4

2018-07-03 Thread Konstantin Khlebnikov
I'm seeing problems with tunnelled traffic with Mellanox Technologies MT27710 Family [ConnectX-4 Lx] using vanilla driver from linux 4.4.y Packets with payload bigger than 116 bytes are not exmited. Smaller packets and normal ipv6 works fine. In linux 4.9, 4.14 and out-of-tree driver everything

Re: [PATCH] net_sched: blackhole: tell upper qdisc about dropped packets

2018-06-15 Thread Konstantin Khlebnikov
On 15.06.2018 16:13, Eric Dumazet wrote: On 06/15/2018 03:27 AM, Konstantin Khlebnikov wrote: When blackhole is used on top of classful qdisc like hfsc it breaks qlen and backlog counters because packets are disappear without notice. In HFSC non-zero qlen while all classes are inactive

[PATCH] net_sched: blackhole: tell upper qdisc about dropped packets

2018-06-15 Thread Konstantin Khlebnikov
schedules watchdog work endlessly. This patch return __NET_XMIT_BYPASS in addition to NET_XMIT_SUCCESS, this flag tells upper layer: this packet is gone and isn't queued. Signed-off-by: Konstantin Khlebnikov --- net/sched/sch_blackhole.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: Failed to clone net-next.git

2018-05-08 Thread Konstantin Ryabitsev
e > limit of 1.00 GiB. So we probably need change server side configuration. > Could someone please look into it? It was probably due to a timeout value. Can you try it now, I've bumped it to a much larger number. Regards, -- Konstantin Ryabitsev Director, IT Infrastructure Securit

Re: Repeating "unregister_netdevice: waiting for lo to become free" caused by upstream 76da0704507bb ("ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER")

2018-04-25 Thread Konstantin Khlebnikov
On 25.04.2018 17:16, Rafał Miłecki wrote: On 23.04.2018 15:08, Rafał Miłecki wrote: I've just updated my kernel 4.4.x and noticed a regression. Bisecting pointed me to the commit 2417da3f4d6bc ("ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER") [0] which is backport of upstrea

Re: 4.4.103 linux kernel regression

2017-12-24 Thread Konstantin Khlebnikov
ly, so I'm not sure it would work on the latest - but I can give it a try. Regards Mathias On Sat, 23 Dec 2017, 17:36 Konstantin Khlebnikov, mailto:khlebni...@yandex-team.ru>> wrote: On 23.12.2017 16:52, Greg KH wrote: > adding stable@ and netdev@ > > On

Re: 4.4.103 linux kernel regression

2017-12-23 Thread Konstantin Khlebnikov
ck device. Mathias, please try debug patch from attachment. It logs all refcount changes for loopback in non-host net namespace. Hopefully log would will be tiny and show what is missing. Looks like vsftpd creates and destroys empty net-ns, like "unshare -n true" net: debug lo refcnt

Re: [PATCH] iptables: ip6t_MASQUERADE: add dependency on conntrack module

2017-12-15 Thread Konstantin Khlebnikov
On 11.12.2017 18:47, Pablo Neira Ayuso wrote: On Mon, Dec 11, 2017 at 06:19:33PM +0300, Konstantin Khlebnikov wrote: After commit 4d3a57f23dec ("netfilter: conntrack: do not enable connection tracking unless needed") conntrack is disabled by default unless some module explicitl

[PATCH] iptables: ip6t_MASQUERADE: add dependency on conntrack module

2017-12-11 Thread Konstantin Khlebnikov
After commit 4d3a57f23dec ("netfilter: conntrack: do not enable connection tracking unless needed") conntrack is disabled by default unless some module explicitly declares dependency in particular network namespace. Signed-off-by: Konstantin Khlebnikov Fixes: a357b3f80bc8 ("netf

[PATCH] tcp_nv: use do_div() instead of expensive div64_u64()

2017-11-02 Thread Konstantin Khlebnikov
Average RTT is 32-bit thus full 64-bit division is redundant. Signed-off-by: Konstantin Khlebnikov Suggested-by: Stephen Hemminger Suggested-by: Eric Dumazet --- net/ipv4/tcp_nv.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/ipv4/tcp_nv.c b/net/ipv4

[PATCH] tcp_nv: fix division by zero in tcpnv_acked()

2017-11-01 Thread Konstantin Khlebnikov
Average RTT could become zero. This happened in real life at least twice. This patch treats zero as 1us. Signed-off-by: Konstantin Khlebnikov --- net/ipv4/tcp_nv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_nv.c b/net/ipv4/tcp_nv.c index 1ff73982e28c

[BUG] division by zero in tcpnv_acked()

2017-10-30 Thread Konstantin Khlebnikov
I've got this on two different machines: [ 24.405015] divide error: [#1] SMP [ 24.405403] Modules linked in: nf_log_ipv6 nf_log_common xt_LOG xt_u32 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_filter ip6_tables xt_tcpudp ipt

[PATCH] net_sched/hfsc: fix curve activation in hfsc_change_class()

2017-09-20 Thread Konstantin Khlebnikov
If real-time or fair-share curves are enabled in hfsc_change_class() class isn't inserted into rb-trees yet. Thus init_ed() and init_vf() must be called in place of update_ed() and update_vf(). Remove isn't required because for now curves cannot be disabled. Signed-off-by: Konstantin

[PATCH] net_sched: always reset qdisc backlog in qdisc_reset()

2017-09-20 Thread Konstantin Khlebnikov
SKB stored in qdisc->gso_skb also counted into backlog. Some qdiscs don't reset backlog to zero in ->reset(), for example sfq just dequeue and free all queued skb. Signed-off-by: Konstantin Khlebnikov Fixes: 2f5fb43f ("net_sched: update hierarchical backlog too&

Re: [PATCH] mm/vmstats: add counters for the page frag cache

2017-09-04 Thread Konstantin Khlebnikov
will happen and would remove pgfrag_alloc_calls and pgfrag_free_calls. Thanks, Kyeongdon Kim On 2017-09-01 오후 6:12, Konstantin Khlebnikov wrote: IMHO that's too much counters. Per-node NR_FRAGMENT_PAGES should be enough for guessing what's going on. Perf probes provides enough features for

[PATCH RFC] net_sched/codel: do not defer queue length update

2017-08-21 Thread Konstantin Khlebnikov
her problem in HFSC - now operation peek could fail and deactivate parent class. Signed-off-by: Konstantin Khlebnikov Link: https://bugzilla.kernel.org/show_bug.cgi?id=109581 --- net/sched/sch_codel.c| 14 ++ net/sched/sch_fq_codel.c | 24 +++- 2 files

[PATCH] net_sched/hhf: update hierarchical backlog when drop packet

2017-08-21 Thread Konstantin Khlebnikov
When hhf_enqueue() drops packet from another bucket it have to update backlog at upper qdiscs too. Signed-off-by: Konstantin Khlebnikov Fixes: 2f5fb43f ("net_sched: update hierarchical backlog too") --- net/sched/sch_hhf.c |5 - 1 file changed, 4 insertions(+), 1 deletio

Re: [PATCH] net_sched: fix order of queue length updates in qdisc_replace()

2017-08-19 Thread Konstantin Khlebnikov
17 15:37, Konstantin Khlebnikov wrote: This important to call qdisc_tree_reduce_backlog() after changing queue length. Parent qdisc should deactivate class in ->qlen_notify() called from qdisc_tree_reduce_backlog() but this happens only if qdisc->q.qlen in zero. Missed class deactivations le

[PATCH] net_sched: fix order of queue length updates in qdisc_replace()

2017-08-19 Thread Konstantin Khlebnikov
ackets from empty qdisc and corrupting state at reactivating this class in future. Signed-off-by: Konstantin Khlebnikov Fixes: 86a7996cc8a0 ("net_sched: introduce qdisc_replace() helper") Cc: Stable --- include/net/sch_generic.h |5 - 1 file changed, 4 insertions(+), 1 deletion(

Re: [PATCH 1/2] net_sched: call qlen_notify only if child qdisc is empty

2017-08-16 Thread Konstantin Khlebnikov
On 16.08.2017 20:22, Cong Wang wrote: On Tue, Aug 15, 2017 at 6:39 AM, Konstantin Khlebnikov wrote: This callback is used for deactivating class in parent qdisc. This is cheaper to test queue length right here. Also this allows to catch draining screwed backlog and prevent second

Re: [PATCH] net_sched/sfq: update hierarchical backlog when drop packet

2017-08-15 Thread Konstantin Khlebnikov
On 15.08.2017 17:09, Eric Dumazet wrote: On Tue, 2017-08-15 at 16:37 +0300, Konstantin Khlebnikov wrote: When sfq_enqueue() drops head packet or packet from another queue it have to update backlog at upper qdiscs too. Signed-off-by: Konstantin Khlebnikov Fixes: 2f5fb43f ("net_

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-15 Thread Konstantin Khlebnikov
On 15.08.2017 00:15, Cong Wang wrote: On Mon, Aug 14, 2017 at 5:59 AM, Konstantin Khlebnikov wrote: This should work, I suppose. But this approach requires careful review for all qdisc, mine is completely mechanical. Well, we don't have many classful qdisc's. Your patch actual

[PATCH 2/2] net_sched/hfsc: opencode trivial set_active() and set_passive()

2017-08-15 Thread Konstantin Khlebnikov
Any move comment abount update_vf() into right place. Signed-off-by: Konstantin Khlebnikov --- net/sched/sch_hfsc.c | 45 - 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index

[PATCH] net_sched: remove warning from qdisc_hash_add

2017-08-15 Thread Konstantin Khlebnikov
ful qdisc is added to inactive device because default qdiscs are added before switching root qdisc. Anyway after commit ea3274695353 ("net: sched: avoid duplicates in qdisc dump") duplicates are filtered right in dumper. Signed-off-by: Konstantin Khlebnikov --- net/sched/sch_api.c

[PATCH] net_sched/sfq: update hierarchical backlog when drop packet

2017-08-15 Thread Konstantin Khlebnikov
When sfq_enqueue() drops head packet or packet from another queue it have to update backlog at upper qdiscs too. Signed-off-by: Konstantin Khlebnikov Fixes: 2f5fb43f ("net_sched: update hierarchical backlog too") --- net/sched/sch_sfq.c |5 - 1 file changed, 4 insert

[PATCH 1/2] net_sched: call qlen_notify only if child qdisc is empty

2017-08-15 Thread Konstantin Khlebnikov
destruction of child qdisc where no packets but backlog is not zero. Signed-off-by: Konstantin Khlebnikov --- net/sched/sch_api.c | 10 +- net/sched/sch_cbq.c |3 +-- net/sched/sch_drr.c |3 +-- net/sched/sch_hfsc.c |6 ++ net/sched/sch_htb.c |3 +-- net/sched/sch_qfq.c

[PATCH] net_sched: reset pointers to tcf blocks in classful qdiscs' destructors

2017-08-15 Thread Konstantin Khlebnikov
ot be called second time. This patch set class->block to NULL after first tcf_block_put() and turn second call into no-op. Signed-off-by: Konstantin Khlebnikov Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") --- net/sched/sch_atm.c |4 +++- net/sched

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-14 Thread Konstantin Khlebnikov
On 12.08.2017 00:38, Cong Wang wrote: On Fri, Aug 11, 2017 at 1:36 PM, Konstantin Khlebnikov wrote: On 11.08.2017 23:18, Cong Wang wrote: On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov wrote: In previous API tcf_destroy_chain() could be called several times and some schedulers

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread Konstantin Khlebnikov
On 11.08.2017 23:18, Cong Wang wrote: On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov wrote: In previous API tcf_destroy_chain() could be called several times and some schedulers like hfsc and atm use that. In new API tcf_block_put() frees block but leaves stale pointer, second call

[PATCH] net/sched/hfsc: allocate tcf block for hfsc root class

2017-08-10 Thread Konstantin Khlebnikov
Without this filters cannot be attached. Signed-off-by: Konstantin Khlebnikov Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") --- net/sched/sch_hfsc.c |8 1 file changed, 8 insertions(+) diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hf

[PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-10 Thread Konstantin Khlebnikov
In previous API tcf_destroy_chain() could be called several times and some schedulers like hfsc and atm use that. In new API tcf_block_put() frees block but leaves stale pointer, second call will free it once again. This patch fixes such double-frees. Signed-off-by: Konstantin Khlebnikov Fixes

[PATCH] e1000e: use disable_hardirq() also for MSIX vectors in e1000_netpoll()

2017-05-19 Thread Konstantin Khlebnikov
Replace disable_irq() which waits for threaded irq handlers with disable_hardirq() which waits only for hardirq part. Signed-off-by: Konstantin Khlebnikov Fixes: 311191297125 ("e1000: use disable_hardirq() for e1000_netpoll()") --- drivers/net/ethernet/intel/e1000e/netde

Re: [PATCH net-next] mlx4: support __GFP_MEMALLOC for rx

2017-01-18 Thread Konstantin Khlebnikov
On 18.01.2017 17:23, Eric Dumazet wrote: On Wed, 2017-01-18 at 12:31 +0300, Konstantin Khlebnikov wrote: On 18.01.2017 07:14, Eric Dumazet wrote: From: Eric Dumazet Commit 04aeb56a1732 ("net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC") added code that app

Re: [PATCH net-next] mlx4: support __GFP_MEMALLOC for rx

2017-01-18 Thread Konstantin Khlebnikov
reserves by flood from network. Note that this driver does not reuse pages (yet) so we do not have to add anything else. Signed-off-by: Eric Dumazet Cc: Konstantin Khlebnikov Cc: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx4/en_rx.c |3 ++- 1 file changed, 2 insertions(+),

[PATCH] net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int

2016-07-16 Thread Konstantin Khlebnikov
hus tool 'tc' prints them as signed. Big values loose higher bits and/or become negative. This patch clamps tokens in xstat into range from INT_MIN to INT_MAX. In this way it's easier to understand what's going on here. Signed-off-by: Konstantin Khlebnikov --- net/sched/sc

RE: [EXT] [PATCH v4] r8152: Add support for setting pass through MAC address on RTL8153-AD

2016-06-06 Thread Konstantin Shkolnyy
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Mario Limonciello > Sent: Monday, June 06, 2016 12:19 > To: hayesw...@realtek.com > Cc: LKML; Netdev; Linux USB; pali.ro...@gmail.com; > anthony.w...@canonical.com; Greg KH;

[PATCH] cls_cgroup: get sk_classid only from full sockets

2016-04-18 Thread Konstantin Khlebnikov
skb->sk could point to timewait or request socket which has no sk_classid. Detected as "BUG: KASAN: slab-out-of-bounds in cls_cgroup_classify". Signed-off-by: Konstantin Khlebnikov --- include/net/cls_cgroup.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --

[PATCH 1/2] net/ipv6/addrconf: simplify sysctl registration

2016-04-18 Thread Konstantin Khlebnikov
options are disable in config. Signed-off-by: Konstantin Khlebnikov --- include/linux/ipv6.h |3 ++- net/ipv6/addrconf.c | 43 +-- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index

[PATCH] net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC

2016-04-18 Thread Konstantin Khlebnikov
High order pages are optional here since commit 51151a16a60f ("mlx4: allow order-0 memory allocations in RX path"), so here is no reason for depleting reserves. Generic __netdev_alloc_frag() implements the same logic. Signed-off-by: Konstantin Khlebnikov --- drivers/net/ethernet/mel

[PATCH] net/mlx4_en: do batched put_page using atomic_sub

2016-04-18 Thread Konstantin Khlebnikov
This patch fixes couple error paths after allocation failures. Atomic set of page reference counter is safe only if it is zero, otherwise set can race with any speculative get_page_unless_zero. Signed-off-by: Konstantin Khlebnikov --- drivers/net/ethernet/mellanox/mlx4/en_rx.c |8

[PATCH 2/2] net/ipv6/addrconf: fix sysctl table indentation

2016-04-18 Thread Konstantin Khlebnikov
Separated from previous patch for readability. Signed-off-by: Konstantin Khlebnikov --- net/ipv6/addrconf.c | 616 +-- 1 file changed, 307 insertions(+), 309 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8a724c7136b0

Re: [PATCH] ipv4: in new netns initialize sysctls in net.ipv4.conf.* with defaults

2016-02-23 Thread Konstantin Khlebnikov
On Wed, Feb 24, 2016 at 2:21 AM, David Miller wrote: > From: Konstantin Khlebnikov > Date: Sun, 21 Feb 2016 10:11:02 +0300 > >> Currently initial net.ipv4.conf.all.* and net.ipv4.conf.default.* are >> copied from init network namespace because static structures are used

[PATCH] ipv4: in new netns initialize sysctls in net.ipv4.conf.* with defaults

2016-02-21 Thread Konstantin Khlebnikov
are enabled. Other sysctls in net.ipv4 and net.ipv6 already initialized with default values at namespace creation. Signed-off-by: Konstantin Khlebnikov Fixes: 752d14dc6aa9 ("[IPV4]: Move the devinet pointers on the struct net") --- net/ipv4/devinet.c |2 +- 1 file changed, 1 inser

[PATCH] tcp: convert cached rtt from usec to jiffies when feeding initial rto

2016-02-21 Thread Konstantin Khlebnikov
Currently it's converted into msecs, thus HZ=1000 intact. Signed-off-by: Konstantin Khlebnikov Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution") --- net/ipv4/tcp_metrics.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_

Re: [PATCH] ipv4: in new netns initialize sysctls in net.ipv4.conf.* with defaults

2016-02-21 Thread Konstantin Khlebnikov
On 21.02.2016 12:25, Vasily Averin wrote: Konstantin, I've investigated question with sysctls initialization inside namespaces some time ago. IIRC I've found people expect that sysctl values should be inherited from parent namespace. It allows node admin to adjust unsafe pre-compile

IPv4/IPv6 sysctl defaults in new namespace

2016-02-15 Thread Konstantin Khlebnikov
IPv6 initialized with default. That's ok. IPv4 makes a copy from init_net. Looks like a bug, here v2.6.24-2577-g752d14dc6aa9 root@zurg:~# sysctl net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0 net.ipv4.conf.all.forwarding = 0 net.ipv6.conf.all.forwarding = 0 root@zurg:~# unshare -n s

[PATCH] mac80211: minstrel_ht: fix out-of-bound in minstrel_ht_set_best_prob_rate

2016-01-29 Thread Konstantin Khlebnikov
Patch fixes this splat BUG: KASAN: slab-out-of-bounds in minstrel_ht_update_stats.isra.7+0x6e1/0x9e0 [mac80211] at addr 8800cee640f4 Read of size 4 by task swapper/3/0 Signed-off-by: Konstantin Khlebnikov Link: http://lkml.kernel.org/r/calygninyjhsavne35qs6ucgasb2dx1_i5hcravuox14otz2

Re: [BUG] skb corruption and kernel panic at forwarding with fragmentation

2016-01-07 Thread Konstantin Khlebnikov
On Thu, Jan 7, 2016 at 2:00 PM, Konstantin Khlebnikov wrote: > On Thu, Jan 7, 2016 at 2:49 AM, Florian Westphal wrote: >> Florian Westphal wrote: >>> Thadeu Lima de Souza Cascardo wrote: >>> > On Wed, Jan 06, 2016 at 11:11:41PM +0300, Konstantin Khlebnikov wrote

Re: [BUG] skb corruption and kernel panic at forwarding with fragmentation

2016-01-06 Thread Konstantin Khlebnikov
On Wed, Jan 6, 2016 at 10:59 PM, Cong Wang wrote: > On Wed, Jan 6, 2016 at 11:15 AM, Konstantin Khlebnikov > wrote: >> Looks like this happens because ip_options_fragment() relies on >> correct ip options length in ip control block in skb. But in >> ip_finish_outpu

[BUG] skb corruption and kernel panic at forwarding with fragmentation

2016-01-06 Thread Konstantin Khlebnikov
I've got some of these: [84408.314676] BUG: unable to handle kernel NULL pointer dereference at (null) [84408.317324] IP: [] put_page+0x5/0x50 [84408.319985] PGD 0 [84408.322583] Oops: [#1] SMP [84408.325156] Modules linked in: ppp_mppe ppp_async ppp_generic slhc 8021q fuse nfsd aut

[PATCH] Set DF bit for IPv4 GRE tunnels with fixed TTL

2015-12-05 Thread Konstantin Shemyak
The DF bit on IPv4 GRE tunnels with fixed TTL is enforced in order to prevent networking loops. This was the original behavior of GRE tunnels, lost in the refactoring. Signed-off-by: Konstantin Shemyak --- net/ipv4/ip_gre.c | 4 1 file changed, 4 insertions(+) diff --git a/net/ipv4

Re: IPv4 tunnels: why IP-IP and SIT enforce DF bit, but GRE does not?

2015-12-05 Thread Konstantin Shemyak
On 01.12.2015 19:08, David Miller wrote: From: Hannes Frederic Sowa Date: Tue, 01 Dec 2015 14:30:55 +0100 On Tue, Dec 1, 2015, at 14:20, Konstantin Shemyak wrote: My point was not to question its feasibility, but to make it similar across GRE, IP-IP and SIT tunnels. I would send a patch to

Re: IPv4 tunnels: why IP-IP and SIT enforce DF bit, but GRE does not?

2015-12-01 Thread Konstantin Shemyak
On 01.12.2015 12:15, Hannes Frederic Sowa wrote: Hello, On Thu, Nov 26, 2015, at 19:28, Konstantin Shemyak wrote: The kernel has taken the decision to always enforce DF bit on IPv4 tunnels, which have fixed (not inherited) TTL (e.g. net/ipv4/ipip.c:ipip_tunnel_ioctl()). Commment by Alexey

[PATCH] ip neigh: device is optional for proxy entries

2015-11-30 Thread Konstantin Khlebnikov
Though dumping such entries crashes present kernels. Signed-off-by: Konstantin Khlebnikov --- ip/ipneigh.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ip/ipneigh.c b/ip/ipneigh.c index 54655842ed38..92b7cd6f2a75 100644 --- a/ip/ipneigh.c +++ b/ip

[PATCH] net/neighbour: fix crash at dumping device-agnostic proxy entries

2015-11-30 Thread Konstantin Khlebnikov
Proxy entries could have null pointer to net-device. Signed-off-by: Konstantin Khlebnikov Fixes: 84920c1420e2 ("net: Allow ipv6 proxies and arp proxies be shown with iproute2") Cc: # v3.4 --- net/core/neighbour.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

IPv4 tunnels: why IP-IP and SIT enforce DF bit, but GRE does not?

2015-11-26 Thread Konstantin Shemyak
c54419321455631 removed this enforcing from GRE tunnels, not changing this behavior for IP-IP (net/ipv4/ipip.c) and SIT (net/ipv6/sit.c). It can be discussed whether such enforcing of DF bit is exactly the desired behavior, but shouldn't it at least be identical across IPv4 tunnels? Konst

Re: [PATCH iproute2] ip_tunnel: determine tunnel address family from the tunnel type

2015-11-26 Thread Konstantin Shemyak
On 24.11.2015 02:26, Stephen Hemminger wrote: On Thu, 12 Nov 2015 21:10:08 + Konstantin Shemyak wrote: When creating an IP tunnel over IPv6, the address family must be passed in the option, e.g. ip -6 tunnel add mode ip6gre local 1::1 remote 2::2 This makes it impossible to create both

[PATCH iproute2] ip_tunnel: determine tunnel address family from the tunnel type

2015-11-12 Thread Konstantin Shemyak
relevant for only one address family. The patch determines whether the applicable address family is AF_INET6 instead of the default AF_INET and makes the "-6" option unnecessary for "ip tunnel add". Signed-off-by: Konstantin Shemyak --- ip/iptunnel.c

  1   2   >