Re: [PATCH v2] sched: report if filter is too large to dump

2018-02-21 Thread Roman Kapl
On 02/21/2018 09:42 AM, Phil Sutter wrote: Hi Roman, On Wed, Feb 21, 2018 at 09:38:52AM +0100, Roman Kapl wrote: On 02/21/2018 08:45 AM, Phil Sutter wrote: On Mon, Feb 19, 2018 at 09:32:51PM +0100, Roman Kapl wrote: Note: The error case can happen pretty easily if you create a filter with 32

Re: [PATCH v2] sched: report if filter is too large to dump

2018-02-21 Thread Roman Kapl
On 02/21/2018 08:45 AM, Phil Sutter wrote: Hi Roman, On Mon, Feb 19, 2018 at 09:32:51PM +0100, Roman Kapl wrote: So far, if the filter was too large to fit in the allocated skb, the kernel did not return any error and stopped dumping. Modify the dumper so that it returns -EMSGSIZE when a

[PATCH v2] sched: report if filter is too large to dump

2018-02-19 Thread Roman Kapl
allocation size, which in turn leads to Signed-off-by: Roman Kapl --- v1 -> v2: add the "progress" comment, fixed error name in commit message. I've looked at other dumpers in rtnetnlink, there are various ways to handle that. For example rtnl_stats_dump has: WARN_ON

[PATCH] net: sched: report if filter is too large to dump

2018-02-18 Thread Roman Kapl
allocation size, which in turn leads to smaller SKBs in kernel. Signed-off-by: Roman Kapl --- net/sched/cls_api.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index f21610c5da1a..b5771a586c2d 100644 --- a/net/sched/cls_api.c

Re: [PATCH] net: make sure skb_dst is valid before using

2018-01-24 Thread Roman Kapl
On 01/24/2018 10:16 AM, Xin Long wrote: On Wed, Jan 24, 2018 at 6:42 AM, Roman Kapl wrote: Tunnel devices often use skb_dst(skb)->ops, but ops are not implemented for metadata tunnel destinations. Use skb_valid_dst to check if skb_dst is a real (non-metadata) destination. Such packets

[PATCH] net: make sure skb_dst is valid before using

2018-01-23 Thread Roman Kapl
not exhaustive. Fixes: 52a589d51f10 ("geneve: update skb dst pmtu on tx path") Fixes: a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path") Signed-off-by: Roman Kapl --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 3 ++- drivers/net/geneve.c| 5 +++

Re: [PATCH net] vxlan: update skb dst pmtu on tx path

2018-01-22 Thread Roman Kapl
u != NULL)`, but it appears some thought was given to this. Or maybe md_dst_ops should have update pmtu? Thanks, Roman Kapl

[PATCH v3] net: sched: crash on blocks with goto chain action

2017-11-29 Thread Roman Kapl
delete the ns: ip link add dtest type dummy tc qdisc add dev dtest ingress tc filter add dev dtest chain 1 parent : handle 1 prio 1 flower action goto chain 2 Fixes: 623859ae06b8 ("Merge branch 'net-sched-race-fix'") Signed-off-by: Roman Kapl --- v1 -> v2: H

[PATCH v2] net: sched: crash on blocks with goto chain action

2017-11-24 Thread Roman Kapl
: 822e86d997 ("net_sched: remove tcf_block_put_deferred()") Signed-off-by: Roman Kapl --- v1 -> v2: Hold all chains instead of just the currently iterated one, the code should be more clear this way. --- net/sched/cls_api.c | 17 - 1 file changed, 12 ins

Re: [PATCH] net: sched: crash on blocks with goto chain action

2017-11-21 Thread Roman Kapl
On 11/21/2017 08:31 PM, Cong Wang wrote: On Mon, Nov 20, 2017 at 1:41 PM, Roman Kapl wrote: On 11/20/2017 06:54 PM, Cong Wang wrote: On Sun, Nov 19, 2017 at 8:17 AM, Roman Kapl wrote: tcf_block_put_ext has assumed that all filters (and thus their goto actions) are destroyed in RCU callback

Re: [PATCH] net: sched: crash on blocks with goto chain action

2017-11-20 Thread Roman Kapl
On 11/20/2017 06:54 PM, Cong Wang wrote: On Sun, Nov 19, 2017 at 8:17 AM, Roman Kapl wrote: tcf_block_put_ext has assumed that all filters (and thus their goto actions) are destroyed in RCU callback and thus can not race with our list iteration. However, that is not true during netns cleanup

[PATCH] net: sched: crash on blocks with goto chain action

2017-11-20 Thread Roman Kapl
: Roman Kapl --- The mail was original rejected by vger, this is a re-send to netdev@vger only (with the same message ID). Sorry for any confusion. --- net/sched/cls_api.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c

[PATCH v2] net: sched: fix crash when deleting secondary chains

2017-11-20 Thread Roman Kapl
xts_get_net() before call_rcu()") Fixes: f93e1cdcf42c ("net/sched: fix filter flushing") Acked-by: Jiri Pirko Signed-off-by: Roman Kapl --- v1 -> v2: Added Fixes and Acked-by tags The mail was original rejected by vger, this is a re-send to netdev@vger only (with the sam

[PATCH v2] net: move somaxconn init from sysctl code

2017-05-24 Thread Roman Kapl
ned-off-by: Roman Kapl --- net/core/net_namespace.c | 19 +++ net/core/sysctl_net_core.c | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 1934efd..26bbfab 100644 --- a/net/core/net_namespace.c +++

Re: [PATCH] net: set default value for somaxconn

2017-05-23 Thread Roman Kapl
On 05/22/2017 08:18 PM, David Miller wrote: From: Roman Kapl Date: Mon, 22 May 2017 14:22:41 +0200 The default value for somaxconn is set in sysctl_core_net_init(), but this function is not called when kernel is configured without CONFIG_SYSCTL. This results in the kernel not being able to

[PATCH] net: set default value for somaxconn

2017-05-22 Thread Roman Kapl
t;TCP: request_sock_TCP: Possible SYN flooding on port 7. Dropping request. Check SNMP counters." Before ef547f2ac16 (tcp: remove max_qlen_log), the effects were less severe, because the backlog was always at least eight slots long. Signed-off-by: Roman Kapl --- net/core/net_namespace.c | 3 +