[PATCH] net/tcp/illinois: replace broken algorithm reference link

2018-02-28 Thread Joey Pabalinas
The link to the pdf containing the algorithm description is now a dead link; it seems http://www.ifp.illinois.edu/~srikant/ has been moved to https://sites.google.com/a/illinois.edu/srikant/ and none of the original papers can be found there... I have replaced it with the only working copy I was a

RE: [PATCH] qlogic/qed: Constify *pkt_type_str[]

2018-02-28 Thread Kalderon, Michal
> From: Hernán Gonzalez [mailto:her...@vanguardiasur.com.ar] > Sent: Wednesday, February 28, 2018 12:32 AM > > Note: This is compile only tested as I have no access to the hw. > Constifying and declaring as static saves 24 bytes. > > add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24) > Functio

Re: [PATCH] xfrm: mark kmem_caches as __ro_after_init

2018-02-28 Thread Steffen Klassert
On Sat, Feb 24, 2018 at 09:21:38PM +0300, Alexey Dobriyan wrote: > Kmem caches aren't relocated once set up. > > Signed-off-by: Alexey Dobriyan Applied to ipsec-next, thanks a lot!

Re: [PATCH ipsec-next] esp: check the NETIF_F_HW_ESP_TX_CSUM bit before segmenting

2018-02-28 Thread Steffen Klassert
On Mon, Feb 26, 2018 at 02:28:19PM -0800, Shannon Nelson wrote: > If I understand correctly, we should not be asking for a > checksum offload on an ipsec packet if the netdev isn't > advertising NETIF_F_HW_ESP_TX_CSUM. In that case, we should > clear the NETIF_F_CSUM_MASK bits. > > Signed-off-by:

Re: [PATCH net-next] team: Use extack to report enslavement failures

2018-02-28 Thread Jiri Benc
On Wed, 28 Feb 2018 08:12:41 +0100, Jiri Pirko wrote: > Yeah, or if you have an older iproute2 package. I would keep the existing > dmesg msgs for now. In the future, when everyone is used to exacks, then > we can remove them. How do we ensure that this will actually happen in the future? Usually,

Re: [PATCH] selftest: fix kselftest-merge depend on 'RUNTIME_TESTING_MENU'

2018-02-28 Thread Zong Li
2018-02-28 6:32 GMT+08:00 Anders Roxell : > > On 23 February 2018 at 08:05, Zong Li wrote: > > 2018-02-23 3:57 GMT+08:00 Anders Roxell : > >> On 22 February 2018 at 12:53, Zong Li wrote: > >>> Since the 'commit d3deafaa8b5c ("lib/: make RUNTIME_TESTS a menuconfig > >>> to ease disabling it all")'

[PATCH net-next v2] net: mvpp2: Add hardware offloading for VLAN filtering

2018-02-28 Thread Maxime Chevallier
Marvell PPv2 controller allows for generic packet filtering. This commit adds entries to implement VLAN filtering. The approach taken is : - Filter entries that would match on the presence of the VLAN tag (existing VLAN detection, DSA / EDSA detection) will set the next lookup ID to be for

[PATCH iproute2] devlink: Fix error reporting

2018-02-28 Thread Arkadi Sharshevsky
The current code doesn't set errno in case of extended ack. Fixes: 049c58539f5d ("devlink: mnlg: Add support for extended ack") Signed-off-by: Arkadi Sharshevsky Acked-by: Jiri Pirko --- devlink/mnlg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devlink/mnlg.c b/de

Re: [PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test

2018-02-28 Thread Geert Uytterhoeven
On Wed, Feb 28, 2018 at 5:22 AM, Finn Thain wrote: > The MACH_IS_MAC test is redundant here because the platform device > won't get registered unless MACH_IS_MAC. > Adopt module_platform_driver() convention. > > Cc: Geert Uytterhoeven > Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven

Re: [PATCH net-next] team: Use extack to report enslavement failures

2018-02-28 Thread Jiri Pirko
Wed, Feb 28, 2018 at 09:58:03AM CET, jb...@redhat.com wrote: >On Wed, 28 Feb 2018 08:12:41 +0100, Jiri Pirko wrote: >> Yeah, or if you have an older iproute2 package. I would keep the existing >> dmesg msgs for now. In the future, when everyone is used to exacks, then >> we can remove them. > >How

[patch net-next 06/10] net: sch: Don't warn on missmatching qlen and backlog for offloaded qdiscs

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Offloaded qdiscs are allowed to expose only parts of their statistics. It means that if backlog is being exposed and qlen is not, it might trigger a warning in qdisc_tree_reduce_backlog. Do not warn in case the qdisc that was removed was an offloaded one. Signed-off-by: Nogah

[patch net-next 09/10] net: sch: prio: Add offload ability for grafting a child

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Offload sch_prio graft command for capable drivers. Warn in case of a failure, unless the graft was done as part of a destroy operation (the new qdisc is a noop) or if all the qdiscs (the parent, the old child, and the new one) are not offloaded. Signed-off-by: Nogah Frankel

[patch net-next 08/10] mlxsw: spectrum: qdiscs: prio: Delete child qdiscs when removing bands

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel When the number the bands of sch_prio is decreased, child qdiscs on the deleted bands would get deleted as well. This change and deletions are being done under sch_tree_lock of the sch_prio qdisc. Part of the destruction of qdisc is unoffloading it, if it is offloaded. Un-offl

[patch net-next 05/10] mlxsw: spectrum: qdiscs: Update backlog handling of a child qdiscs

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel When removing a child qdisc its backlog will be decreased from the parent backlog. The driver backlog count should do the same. When the parent changes its configuration, the child might need to clean its stats. However, the backlog can't be cleaned with the rest of the stats,

[patch net-next 01/10] mlxsw: spectrum: qdiscs: Support qdisc per tclass

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Add the option to set a qdisc per tclass. Match the qdisc to the tclass by parent ID. Supported currently for sch_red only. It allows offloading sch_prio as root qdisc and sch_red as its child. (However, doing so might corrupt the stats for both parent and child.) Signed-off

[patch net-next 03/10] mlxsw: spectrum: qdiscs: Add priority map per qdisc

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Add priority map per qdisc, to indicate which priorities are being directed through this qdisc. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 7 +++ 1 file changed, 7 insertio

[patch net-next 10/10] mlxsw: spectrum: qdiscs: prio: Handle graft command

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Handle graft command for an offloaded sch_prio. Grafting a qdisc to any place other than under its original parent is not supported by mlxsw and will cause the grafted qdisc to stop being offloaded. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri P

[patch net-next 00/10] mlxsw: Offload multi-queue RED support

2018-02-28 Thread Jiri Pirko
From: Jiri Pirko Nogah says: Support a two level hierarchy of offloaded qdiscs in mlxsw, with sch_prio being the root qdisc and sch_red as the children. +--+ | sch_prio | ++-+ | | +

[patch net-next 04/10] mlxsw: spectrum: qdiscs: Collect stats for sch_red based on priomap

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Priority counters count packets according to their packet priority. Collect the stats for sch_red based on these counters, so the qdisc bstats will be the sum of counters matching the priorities marked in the qdisc priomap. Changing the mapping of the priorities to bands while

[patch net-next 07/10] mlxsw: spectrum: Update sch_prio stats to include sch_red related drops

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel sch_prio as root qdisc should count all the drops its children have. Since it is possible for it to have sch_red children, it needs to count RED early drops. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/

[patch net-next 02/10] mlxsw: spectrum: Add priority counters

2018-02-28 Thread Jiri Pirko
From: Nogah Frankel Add TX packets and bytes counters per switch priority per port. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ 2 fi

Re: linux-next: manual merge of the net-next tree with the net tree

2018-02-28 Thread Petr Machata
Stephen Rothwell writes: > Today's linux-next merge of the net-next tree got a conflict in: > > net/ipv4/ip_tunnel.c > > between commit: > > 4e994776e7bd ("ip_tunnel: Do not use mark in skb by default") > > from the net tree and commit: > > b0066da52ea5 ("ip_tunnel: Rename & publish init_tu

[PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
Free memory, if afiucv_iucv_init is not successful and removing a IUCV driver. Signed-off-by: Arvind Yadav --- net/iucv/af_iucv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 1e8cc7b..eb0995a 100644 --- a/net/iucv/af_iucv.c

[PATCH net-next v2] ipvlan: use per device spinlock to protect addrs list updates

2018-02-28 Thread Paolo Abeni
This changeset moves ipvlan address under RCU protection, using a per ipvlan device spinlock to protect list mutation and RCU read access to protect list traversal. Also explicitly use RCU read lock to traverse the per port ipvlans list, so that we can now perform a full address lookup without ass

Re: [PATCH net-next v2 4/5] ipv4: route: dissect flow in input path if fib rules need it

2018-02-28 Thread Paolo Abeni
On Tue, 2018-02-27 at 19:52 -0800, Roopa Prabhu wrote: > From: Roopa Prabhu > > Dissect flow in fwd path if fib rules require it. Controlled by > a flag to avoid penatly for the common case. Flag is set when fib > rules with sport, dport and proto match that require flow dissect > are installed.

Re: [PATCH net-next v2 5/5] ipv6: route: dissect flow in input path if fib rules need it

2018-02-28 Thread Paolo Abeni
On Tue, 2018-02-27 at 19:52 -0800, Roopa Prabhu wrote: > From: Roopa Prabhu > > Dissect flow in fwd path if fib rules require it. Controlled by > a flag to avoid penatly for the common case. Flag is set when fib > rules with sport, dport and proto match that require flow dissect > are installed.

[PATCH net] virtio-net: disable NAPI only when enabled during XDP set

2018-02-28 Thread Jason Wang
We try to disable NAPI to prevent a single XDP TX queue being used by multiple cpus. But we don't check if device is up (NAPI is enabled), this could result stall because of infinite wait in napi_disable(). Fixing this by checking device state through netif_running() before. Fixes: 4941d472bf95b (

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Cornelia Huck
On Wed, 28 Feb 2018 15:24:16 +0530 Arvind Yadav wrote: > Free memory, if afiucv_iucv_init is not successful and > removing a IUCV driver. > > Signed-off-by: Arvind Yadav > --- > net/iucv/af_iucv.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/iucv/af_iucv.c

[PATCH net-next v2 00/14] selftests: forwarding: Add VRF-based tests

2018-02-28 Thread Ido Schimmel
One of the nice things about network namespaces is that they allow one to easily create and test complex environments. Unfortunately, these namespaces can not be used with actual switching ASICs, as their ports can not be migrated to other network namespaces (NETIF_F_NETNS_LOCAL) and most of them

[PATCH net-next v2 02/14] selftests: forwarding: Add a test for FDB learning

2018-02-28 Thread Ido Schimmel
Send a packet with a specific destination MAC, make sure it was learned on the ingress port and then aged-out. Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/bridge_vlan_aware.sh | 5 +- tools/testing/selftests/net/forwarding/lib.sh | 92 ++ 2 files chang

[PATCH net-next v2 13/14] selftests: forwarding: Introduce basic tc chains tests

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Tests chains matching and goto chain action. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../testing/selftests/net/forwarding/tc_chains.sh | 122 + 1 file changed, 122 insertions(+) create mode 100755 tools/testing/selftests/net/forwarding/

[PATCH net-next v2 08/14] selftests: forwarding: Add tc offload check helper

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 6866f

[PATCH net-next v2 14/14] selftests: forwarding: Introduce basic shared blocks tests

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Test shared block infrastructure. This is a basic test that shares TC block in between 2 clsact qdiscs. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 6 + .../selftests/net/forwarding/tc_shblocks.sh| 1

[PATCH net-next v2 11/14] selftests: forwarding: Introduce tc flower matching tests

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Add first part of flower tests. This patch only contains dst/src ip/mac matching. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../testing/selftests/net/forwarding/tc_common.sh | 23 +++ .../testing/selftests/net/forwarding/tc_flower.sh | 196 +

[PATCH net-next v2 09/14] selftests: forwarding: Add MAC get helper

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 92e46426bd1d.

[PATCH net-next v2 01/14] selftests: forwarding: Add initial testing framework

2018-02-28 Thread Ido Schimmel
Add initial framework to test packet forwarding functionality. The tests can run on actual devices using loop-backed cables or using veth pairs. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/.gitignore | 1 + tools/testing/selftests/net/forw

[PATCH net-next v2 10/14] selftests: forwarding: Allow to get netdev interfaces names from commandline

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 083

[PATCH net-next v2 12/14] selftests: forwarding: Introduce tc actions tests

2018-02-28 Thread Ido Schimmel
From: Jiri Pirko Add first part of actions tests. This patch only contains tests of gact ok/drop/trap and mirred redirect egress. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../testing/selftests/net/forwarding/tc_actions.sh | 195 + 1 file changed, 195 inser

[PATCH net-next v2 03/14] selftests: forwarding: Add a test for flooded traffic

2018-02-28 Thread Ido Schimmel
Add test cases for unknown unicast and unregistered multicast flooding. For each traffic type, turn off flooding on one bridged port and inject a packet of the specified type through the second bridged port. Make sure the packet was not received by checking the ACL counters on the other end. Later

[PATCH net-next] ipvlan: egress mcast packets are not exceptional

2018-02-28 Thread Paolo Abeni
Currently, if IPv6 is enabled on top of an ipvlan device in l3 mode, the following warning message: Dropped {multi|broad}cast of type= [86dd] is emitted every time that a RS is generated and dmseg is soon filled with irrelevant messages. Replace pr_warn with pr_debug, to preserve debuggability,

[PATCH net-next v2 07/14] selftests: forwarding: Test IPv6 weighted nexthops

2018-02-28 Thread Ido Schimmel
Have one host generate 16K IPv6 echo requests with a random flow label and check that they are distributed between both multipath links according to the provided weights. Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/router_multipath.sh | 36 ++ 1 file change

[PATCH net-next v2 04/14] selftests: forwarding: Add a test for basic IPv4 and IPv6 routing

2018-02-28 Thread Ido Schimmel
Configure two hosts which are directly connected to the same router and test IPv4 and IPv6 ping. Use a large MTU and check that ping is unaffected. Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh| 15 +++ tools/testing/selftests/net/forwarding/router.sh | 125 +

[PATCH net-next v2 06/14] selftests: forwarding: Test IPv4 weighted nexthops

2018-02-28 Thread Ido Schimmel
Use different weights for the multipath route configured on the first router and check that the different flows generated by the first host are distributed according to the provided weights. Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 14 .../selftes

[PATCH net-next v2 05/14] selftests: forwarding: Create test topology for multipath routing

2018-02-28 Thread Ido Schimmel
Create a topology with two hosts, each directly connected to a different router. Both routers are connected using two links, enabling multipath routing. Test IPv4 and IPv6 ping using default MTU and large MTU. Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/router_multipath.sh |

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-02-28 Thread Arend van Spriel
On 2/27/2018 11:14 AM, Rafał Miłecki wrote: Sending with a fixed linux-wireless ML address. Please kindly send your replies using linux-wireless@ On 02/27/2018 11:08 AM, Rafał Miłecki wrote: I've problem when using OpenWrt/LEDE on a home router with Broadcom's FullMAC WiFi chipset. First of a

[PATCH net 0/3] net/smc: fixes 2018-02-28

2018-02-28 Thread Ursula Braun
Dave, here are 3 smc bug fixes for the net-tree. Karsten's first patch is the reworked version of last week's "[PATCH net-next 2/5] net/smc: fix structure size" patch, now solved without using __packed, and now targetted for net instead of net-next. Thanks, Ursula Davide Caratti (1): net/sm

[PATCH net 3/3] net/smc: fix NULL pointer dereference on sock_create_kern() error path

2018-02-28 Thread Ursula Braun
From: Davide Caratti when sock_create_kern(..., a) returns an error, 'a' might not be a valid pointer, so it shouldn't be dereferenced to read a->sk->sk_sndbuf and and a->sk->sk_rcvbuf; not doing that caused the following crash: general protection fault: [#1] SMP KASAN Dumping ftrace buffer

[PATCH net 1/3] net/smc: use a constant for control message length

2018-02-28 Thread Ursula Braun
From: Karsten Graul The sizeof(struct smc_cdc_msg) evaluates to 48 bytes instead of the required 44 bytes. We need to use the constant value of SMC_WR_TX_SIZE to set and check the control message length. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun --- net/smc/smc_cdc.c | 2 +- n

[PATCH net 2/3] net/smc: use link_id of server in confirm link reply

2018-02-28 Thread Ursula Braun
From: Karsten Graul The CONFIRM LINK reply message must contain the link_id sent by the server. And set the link_id explicitly when initializing the link. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun --- net/smc/smc_core.c | 1 + net/smc/smc_llc.c | 2 +- 2 files changed, 2 inser

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: On Wed, 28 Feb 2018 15:24:16 +0530 Arvind Yadav wrote: Free memory, if afiucv_iucv_init is not successful and removing a IUCV driver. Signed-off-by: Arvind Yadav --- net/iucv/af_iucv.c | 5 - 1 file changed, 4 insertions(+

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Cornelia Huck
On Wed, 28 Feb 2018 17:14:55 +0530 Arvind Yadav wrote: > On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: > > On Wed, 28 Feb 2018 15:24:16 +0530 > > Arvind Yadav wrote: > > > >> Free memory, if afiucv_iucv_init is not successful and > >> removing a IUCV driver. > >> > >> Signed-off

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Arvind Yadav
On Wednesday 28 February 2018 05:26 PM, Cornelia Huck wrote: On Wed, 28 Feb 2018 17:14:55 +0530 Arvind Yadav wrote: On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: On Wed, 28 Feb 2018 15:24:16 +0530 Arvind Yadav wrote: Free memory, if afiucv_iucv_init is not successful and

[patch net v2 2/4] mlxsw: spectrum: Fix handling of resource_size_param

2018-02-28 Thread Jiri Pirko
From: Jiri Pirko Current code uses global variables, adjusts them and passes pointer down to devlink. With every other mlxsw_core instance, the previously passed pointer values are rewritten. Fix this by de-globalize the variables and also memcpu size_params during devlink resource registration.

[patch net v2 4/4] spectrum: Reference count VLAN entries

2018-02-28 Thread Jiri Pirko
From: Ido Schimmel One of the basic construct in the device is a port-VLAN pair, which can be bound to a FID or a RIF in order to direct packets to the bridge or the router, respectively. Since not all the netdevs are configured with a VLAN (e.g., sw1p1 vs. sw1p1.10), VID 1 is used to represent

[patch net v2 1/4] mlxsw: core: Fix flex keys scratchpad offset conflict

2018-02-28 Thread Jiri Pirko
From: Jiri Pirko IP_TTL, IP_ECN and IP_DSCP are using the same offset within the scratchpad as L4 ports. Fix this by shifting all up. Fixes: 5f57e0909136 ("mlxsw: acl: Add ip ttl acl element") Fixes: i80d0fe4710c ("mlxsw: acl: Add ip tos acl element") Signed-off-by: Jiri Pirko --- .../net/ethe

[patch net v2 0/4] mlxsw: couple of fixes

2018-02-28 Thread Jiri Pirko
From: Jiri Pirko Couple of unrelated fixes for mlxsw. --- v1->v2: -patch 2: - rebase on top of current -net tree - removed forgotten empty line -patch 3: - new patch -patch 4: - new patch Ido Schimmel (2): mlxsw: spectrum: Treat IPv6 unregistered multicast as broadcast spectrum: Referen

[patch net v2 3/4] mlxsw: spectrum: Treat IPv6 unregistered multicast as broadcast

2018-02-28 Thread Jiri Pirko
From: Ido Schimmel When multicast snooping is enabled, the Linux bridge resorts to flooding unregistered multicast packets to all ports only in case it did not detect a querier in the network. The above condition is not reflected to underlying drivers, which is especially problematic in IPv6 env

Aw: Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Lino Sanfilippo
Hi, > On Wednesday 28 February 2018 05:26 PM, Cornelia Huck wrote: > > On Wed, 28 Feb 2018 17:14:55 +0530 > > Arvind Yadav wrote: > > > >> On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: > >>> On Wed, 28 Feb 2018 15:24:16 +0530 > >>> Arvind Yadav wrote: > >>> > Free memory,

[PATCH v3 2/2] r8169: switch to device-managed functions in probe (part 2)

2018-02-28 Thread Andy Shevchenko
This is a follow up to the commit 4c45d24a759d ("r8169: switch to device-managed functions in probe") to move towards managed resources even more. Cc: Heiner Kallweit Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/realtek/r8169.c | 16 1 file changed, 4 insertions(

[PATCH v3 1/2] r8169: Dereference MMIO address immediately before use

2018-02-28 Thread Andy Shevchenko
There is no need to dereference struct rtl8169_private to get mmio_addr in almost every function in the driver. Replace it by using pointer to struct rtl8169_private directly. No functional change intended. Next step might be a conversion of RTL_Wxx() / RTL_Rxx() macros to inline functions for s

[PATCH] xen-netfront: Fix hang on device removal

2018-02-28 Thread Jason Andryuk
A toolstack may delete the vif frontend and backend xenstore entries while xen-netfront is in the removal code path. In that case, the checks for xenbus_read_driver_state would return XenbusStateUnknown, and xennet_remove would hang indefinitely. This hang prevents system shutdown. xennet_remove

Re: [PATCH] net: iucv: Free memory obtained by kzalloc

2018-02-28 Thread Cornelia Huck
On Wed, 28 Feb 2018 17:39:53 +0530 Arvind Yadav wrote: > On Wednesday 28 February 2018 05:26 PM, Cornelia Huck wrote: > > On Wed, 28 Feb 2018 17:14:55 +0530 > > Arvind Yadav wrote: > > > >> On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote: > >>> On Wed, 28 Feb 2018 15:24:16 +0530

Re: [PATCH v7 04/37] earlycon: add reg-offset to physical address before mapping

2018-02-28 Thread Greg Kroah-Hartman
On Thu, Feb 15, 2018 at 09:40:49AM -0600, Rob Herring wrote: > On Tue, Feb 13, 2018 at 3:09 AM, Greentime Hu wrote: > > It will get the wrong virtual address because port->mapbase is not added > > the correct reg-offset yet. We have to update it before earlycon_map() > > is called > > > > Signed-o

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Tonghao Zhang
On Wed, Feb 14, 2018 at 1:19 AM, David Miller wrote: > From: Tonghao Zhang > Date: Mon, 12 Feb 2018 18:44:00 -0800 > >> Sometimes, we want to know how many tcp sockets are in use >> different _net_ namespaces. It's a key resource metric. With >> this patch, we can get it via /proc/net/sockstat. >

Re: [PATCH net-next v2 1/5] net: fib_rules: support for match on ip_proto, sport and dport

2018-02-28 Thread Nikolay Aleksandrov
On 28/02/18 05:52, Roopa Prabhu wrote: > From: Roopa Prabhu > > uapi for ip_proto, sport and dport range match > in fib rules. > > Signed-off-by: Roopa Prabhu > --- > include/net/fib_rules.h| 36 - > include/uapi/linux/fib_rules.h | 8 > net/core/fib_rules.c

Re: [PATCH net-next v2 3/5] ipv6: fib6_rules: support for match on sport, dport and ip proto

2018-02-28 Thread Nikolay Aleksandrov
On 28/02/18 05:52, Roopa Prabhu wrote: > From: Roopa Prabhu > > support to match on src port, dst port and ip protocol. > > Signed-off-by: Roopa Prabhu > --- > net/ipv6/fib6_rules.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rul

Re: [PATCH net-next v2 2/5] ipv4: fib_rules: support match on sport, dport and ip proto

2018-02-28 Thread Nikolay Aleksandrov
On 28/02/18 05:52, Roopa Prabhu wrote: > From: Roopa Prabhu > > support to match on src port, dst port and ip protocol. > > Signed-off-by: Roopa Prabhu > --- > net/ipv4/fib_rules.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.

Re: [PATCH net-next v2 4/5] ipv4: route: dissect flow in input path if fib rules need it

2018-02-28 Thread Nikolay Aleksandrov
On 28/02/18 05:52, Roopa Prabhu wrote: > From: Roopa Prabhu > > Dissect flow in fwd path if fib rules require it. Controlled by > a flag to avoid penatly for the common case. Flag is set when fib > rules with sport, dport and proto match that require flow dissect > are installed. Also passes the

Re: [PATCH net-next v2 5/5] ipv6: route: dissect flow in input path if fib rules need it

2018-02-28 Thread Nikolay Aleksandrov
On 28/02/18 05:52, Roopa Prabhu wrote: > From: Roopa Prabhu > > Dissect flow in fwd path if fib rules require it. Controlled by > a flag to avoid penatly for the common case. Flag is set when fib > rules with sport, dport and proto match that require flow dissect > are installed. Also passes the

[PATCH] net: ipv4: avoid unused variable warning for sysctl

2018-02-28 Thread Arnd Bergmann
The newly introudced ip_min_valid_pmtu variable is only used when CONFIG_SYSCTL is set: net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used [-Werror=unused-variable] This moves it to the other variables like it, to avoid the harmless warning. Fixes: c7272c2f1229 ("net: ipv4

[PATCH net-next] net: Fix spelling mistake "greater then" -> "greater than"

2018-02-28 Thread Gal Pressman
Fix trivial spelling mistake "greater then" -> "greater than". Signed-off-by: Gal Pressman --- include/net/sch_generic.h | 2 +- net/core/dev.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index e2ab136..d

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 02:28:21PM +0800, Jason Wang wrote: > > > On 2018年02月28日 12:09, Michael S. Tsirkin wrote: > > > > Or we can add plist to a union: > > > > > > > > > > > > struct sk_buff { > > > > union { > > > > struct { > > > > /* Th

Re: [PATCH] net: ipv4: avoid unused variable warning for sysctl

2018-02-28 Thread Sabrina Dubroca
2018-02-28, 14:32:48 +0100, Arnd Bergmann wrote: > The newly introudced ip_min_valid_pmtu variable is only used when > CONFIG_SYSCTL is set: > > net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used > [-Werror=unused-variable] > > This moves it to the other variables like it,

Re: NETDEV WATCHDOG: eth0 (tg3): transmit queue 0 timed out

2018-02-28 Thread Siva Reddy Kallam
On Sat, Feb 24, 2018 at 3:48 PM, Borislav Petkov wrote: > Hi, > > this didn't happen before but after 4.16-rc1 my tg3 nic stops for > whatever reason and the connection to the machine is dead. It didn't show > anything in dmesg until today. > > The IO pagefaults look like it is trying to access so

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-28 Thread Jason Wang
On 2018年02月28日 22:01, Michael S. Tsirkin wrote: On Wed, Feb 28, 2018 at 02:28:21PM +0800, Jason Wang wrote: On 2018年02月28日 12:09, Michael S. Tsirkin wrote: Or we can add plist to a union: struct sk_buff { union { struct { /* These tw

ipset: suspicious RCU usage

2018-02-28 Thread Dave Jones
= WARNING: suspicious RCU usage 4.16.0-rc3-firewall+ #1 Not tainted - net/netfilter/ipset/ip_set_core.c:1354 suspicious rcu_dereference_protected() usage! \x0aother info that might help us debug this:\x0a \x0arcu_scheduler_active = 2, debug_

Re: [PATCH net-next] team: Use extack to report enslavement failures

2018-02-28 Thread David Miller
From: Jiri Pirko Date: Wed, 28 Feb 2018 08:12:41 +0100 > Wed, Feb 28, 2018 at 12:49:59AM CET, kubak...@wp.pl wrote: >>On Tue, 27 Feb 2018 22:22:12 +0200, Ido Schimmel wrote: >>> > If so, for how long? They should certainly be removed eventually. How >>> > do we ensure we don't forget? >>> > >>>

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 08:08:39AM +0100, Jiri Pirko wrote: > Tue, Feb 27, 2018 at 10:41:49PM CET, kubak...@wp.pl wrote: > >On Tue, 27 Feb 2018 13:16:21 -0800, Alexander Duyck wrote: > >> Basically we need some sort of PCI or PCIe topology mapping for the > >> devices that can be translated into so

Re: [patch net-next 15/15] mlxsw: spectrum_span: Support mirror to ip6gretap

2018-02-28 Thread Petr Machata
David Ahern writes: > On 2/27/18 6:53 AM, Jiri Pirko wrote: >> diff --git a/drivers/net/ethernet/mellanox/mlxsw/Kconfig >> b/drivers/net/ethernet/mellanox/mlxsw/Kconfig >> index 830c3e28505e..93d97b4676eb 100644 >> --- a/drivers/net/ethernet/mellanox/mlxsw/Kconfig >> +++ b/drivers/net/ethernet/m

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread David Miller
From: Tonghao Zhang Date: Wed, 28 Feb 2018 21:01:52 +0800 >> The amount of new conditional tests in these fast paths are not >> justified for this new counter which is of debatable usefullness. > sorry, too late for reply. Did you mean this counter will affect performance ? > I tested the patch w

[PATCH net,v2] vrf: check forwarding on the original netdevice when generating ICMP dest unreachable

2018-02-28 Thread Stephen Suryaputra
When ip_error() is called the device is the l3mdev master instead of the original device. So the forwarding check should be on the original one. Changes from v1: - Only need to reset the device on which __in_dev_get_rcu() is done (per David Ahern). Signed-off-by: Stephen Suryaputra --- net/ip

bpf: mismatch between inode->i_private and inode->i_op

2018-02-28 Thread Sodagudi Prasad
Hi All, Trying to boot 4.14.19 kernel with Android and observed a crash in bpf system. From the call stack netd process is trying to access the /sys/fs/bfp/traffic_cookie_uid_map file. After checking call stack further observed that, inode->i_private is pointing to (struct bpf_map *) but inode

Re: [PATCH] tcp: Support tcp socket allocated counter in namespace.

2018-02-28 Thread Tonghao Zhang
On Wed, Feb 28, 2018 at 10:41 PM, David Miller wrote: > From: Tonghao Zhang > Date: Wed, 28 Feb 2018 21:01:52 +0800 > >>> The amount of new conditional tests in these fast paths are not >>> justified for this new counter which is of debatable usefullness. >> sorry, too late for reply. Did you mea

Re: [pull request][for-next 00/15] Mellanox, mlx5 RDMA E-Switch representors 2018-02-23

2018-02-28 Thread David Miller
From: Saeed Mahameed Date: Mon, 26 Feb 2018 12:36:02 -0800 > This series includes shared code updates for mlx5 core driver for both > netdev and rdma subsystems. This series should be pulled to both > trees so we can continue netdev and rdma specific submissions separately. > > For more informa

Re: rtl8187: Fix NULL pointer dereference in priv->conf_mutex

2018-02-28 Thread Kalle Valo
Sudhir Sreedharan wrote: > This can be reproduced by bind/unbind the driver multiple times > in AM3517 board. > > Analysis revealed that rtl8187_start() was invoked before probe > finishes(ie. before the mutex is initialized). > > INFO: trying to register non-static key. > the code is fine bu

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-28 Thread Jiri Pirko
Wed, Feb 28, 2018 at 03:32:44PM CET, m...@redhat.com wrote: >On Wed, Feb 28, 2018 at 08:08:39AM +0100, Jiri Pirko wrote: >> Tue, Feb 27, 2018 at 10:41:49PM CET, kubak...@wp.pl wrote: >> >On Tue, 27 Feb 2018 13:16:21 -0800, Alexander Duyck wrote: >> >> Basically we need some sort of PCI or PCIe topo

Re: [Xen-devel] [PATCH] xen-netfront: Fix hang on device removal

2018-02-28 Thread Boris Ostrovsky
On 02/28/2018 07:23 AM, Jason Andryuk wrote: > A toolstack may delete the vif frontend and backend xenstore entries > while xen-netfront is in the removal code path. In that case, the > checks for xenbus_read_driver_state would return XenbusStateUnknown, and > xennet_remove would hang indefinitely

Re: bpf: mismatch between inode->i_private and inode->i_op

2018-02-28 Thread Daniel Borkmann
On 02/28/2018 03:51 PM, Sodagudi Prasad wrote: > Hi All, > > Trying to boot 4.14.19 kernel with Android and observed a crash in bpf system. > From the call stack netd process is trying to access the > /sys/fs/bfp/traffic_cookie_uid_map file. > After checking call stack further observed that, inod

[net-next 0/3][pull request] 100GbE Intel Wired LAN Driver Updates 2018-02-28

2018-02-28 Thread Jeff Kirsher
This series contains updates to fm10k only. Jake provides all the changes in this series, starting with making the function header comments consistent and to align with how the kernel documentation expects it. Also cleaned up code comment as well as bump the driver version. The following are cha

[net-next 3/3] fm10k: bump version number

2018-02-28 Thread Jeff Kirsher
From: Jacob Keller We're aligned with latest version released on SourceForge, so update the version number to match. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 4 ++-- 1 file changed, 2 insertions(+),

[net-next 1/3] fm10k: fix function doxygen comments

2018-02-28 Thread Jeff Kirsher
From: Jacob Keller Several function header comments had incorrect function parameter definitions. Recent versions of the upstream kernel have started to warn about these issues. Fix up the comments which do not match in order to resolve these new warnings. While fixing these, update the copyrigh

[net-next 2/3] fm10k: fix incorrect warning for function prototype

2018-02-28 Thread Jeff Kirsher
From: Jacob Keller Recent kernels now complain about incorrect function prototype comments, in order to ensure comments are accurate to the function. However, it incorrectly associates the comment above the fm10k_pci_tbl[] as a function header comment. Fix this by removing the extra "*" in the co

Re: [PATCH net] virtio-net: disable NAPI only when enabled during XDP set

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 06:20:04PM +0800, Jason Wang wrote: > We try to disable NAPI to prevent a single XDP TX queue being used by > multiple cpus. But we don't check if device is up (NAPI is enabled), > this could result stall because of infinite wait in > napi_disable(). Fixing this by checking

[PATCH net-next v2] ipv6: allow userspace to add IFA_F_OPTIMISTIC addresses

2018-02-28 Thread Sabrina Dubroca
According to RFC 4429 (section 3.1), adding new IPv6 addresses as optimistic addresses is acceptable, as long as the implementation follows some rules: * Optimistic DAD SHOULD only be used when the implementation is aware that the address is based on a most likely unique interface

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 10:20:33PM +0800, Jason Wang wrote: > > > On 2018年02月28日 22:01, Michael S. Tsirkin wrote: > > On Wed, Feb 28, 2018 at 02:28:21PM +0800, Jason Wang wrote: > > > > > > On 2018年02月28日 12:09, Michael S. Tsirkin wrote: > > > > > > Or we can add plist to a union: > > > > > > >

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-28 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 04:11:31PM +0100, Jiri Pirko wrote: > Wed, Feb 28, 2018 at 03:32:44PM CET, m...@redhat.com wrote: > >On Wed, Feb 28, 2018 at 08:08:39AM +0100, Jiri Pirko wrote: > >> Tue, Feb 27, 2018 at 10:41:49PM CET, kubak...@wp.pl wrote: > >> >On Tue, 27 Feb 2018 13:16:21 -0800, Alexande

Re: [PATCH net,v2] vrf: check forwarding on the original netdevice when generating ICMP dest unreachable

2018-02-28 Thread David Ahern
On 2/28/18 7:46 AM, Stephen Suryaputra wrote: > When ip_error() is called the device is the l3mdev master instead of the > original device. So the forwarding check should be on the original one. > > Changes from v1: > - Only need to reset the device on which __in_dev_get_rcu() is done (per > Dav

Re: [PATCH 4/6] net: make skb_gso_*_seglen functions private

2018-02-28 Thread David Miller
From: Daniel Axtens Date: Wed, 28 Feb 2018 00:04:05 +1100 > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 0c0c1d6f28ef..a664a3ae507e 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -4893,7 +4893,7 @@ EXPORT_SYMBOL_GPL(skb_scrub_packet); > * > * The MAC/L2 or netwo

Re: [PATCH 5/6] net: add and use helpers when adjusting gso_size

2018-02-28 Thread David Miller
From: Daniel Axtens Date: Wed, 28 Feb 2018 00:04:06 +1100 > An audit of users of gso_size reveals that an eBPF tc action on a > veth pair can be passed an SCTP GSO skb, which has gso_size of > GSO_BY_FRAGS. > > If that action calls bpf_skb_change_proto(), bpf_skb_net_grow() > or bpf_skb_net_shri

Re: [PATCH net] gianfar: Fix Rx byte accounting for ndev stats

2018-02-28 Thread David Miller
From: Claudiu Manoil Date: Tue, 27 Feb 2018 17:33:10 +0200 > Don't include in the Rx bytecount of the packet sent up the stack: > the FCB (frame control block), and the padding bytes inserted by > the controller into the frame payload, nor the FCS. All these are > being pulled out of the skb by g

  1   2   3   >