Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-11-07 Thread Lukas Bulwahn
On Sat, 7 Nov 2020, Joe Perches wrote: > On Fri, 2020-11-06 at 23:55 -0800, Nick Desaulniers wrote: > > Clang is more aggressive about -Wformat warnings when the format flag > > specifies a type smaller than the parameter. Fixes 8 instances of: > > > > warning: format specifies type 'unsigned s

Re: [PATCH net-next RFC v1 07/10] nvme-tcp : Recalculate crc in the end of the capsule

2020-11-07 Thread Boris Pismenny
On 08/11/2020 8:59, Shai Malin wrote: > On 09/10/2020 1:44, Sagi Grimberg wrote: >> On 9/30/20 7:20 PM, Boris Pismenny wrote: >> >>> crc offload of the nvme capsule. Check if all the skb bits are on, >>> and if not recalculate the crc in SW and check it. >> Can you clarify in the patch descripti

RE: [PATCH net-next RFC v1 07/10] nvme-tcp : Recalculate crc in the end of the capsule

2020-11-07 Thread Shai Malin
On 09/10/2020 1:44, Sagi Grimberg wrote: > On 9/30/20 7:20 PM, Boris Pismenny wrote: > > > crc offload of the nvme capsule. Check if all the skb bits are on, > > and if not recalculate the crc in SW and check it. > > Can you clarify in the patch description that this is only for pdu > data di

RE: [PATCH net-next RFC v1 05/10] nvme-tcp: Add DDP offload control path

2020-11-07 Thread Shai Malin
On 09/10/2020 1:19, Sagi Grimberg wrote: > On 9/30/20 9:20 AM, Boris Pismenny wrote: > > This commit introduces direct data placement offload to NVME TCP. > > There is a context per queue, which is established after the > > handshake using the tcp_ddp_sk_add/del NDOs. > > > > Additionally, a res

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-11-07 Thread Xie He
On Sat, Oct 31, 2020 at 3:04 PM Jakub Kicinski wrote: > > On Sat, 31 Oct 2020 22:41:30 +0100 Arnd Bergmann wrote: > > > > I think it can just go in the bin directly. > > Ack, fine by me. > > > I actually submitted a couple of patches to clean up drivers/net/wan > > last year but didn't follow up w

Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer

2020-11-07 Thread Zhu Yanjun
On Sun, Nov 8, 2020 at 1:24 PM Zhu Yanjun wrote: > > > > > Forwarded Message > Subject: Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer > Date: Sat, 7 Nov 2020 12:26:17 -0800 > From: Jakub Kicinski > To: Zhu Yanjun > CC: dledf...@redhat.com, j...@ziepe.ca, linux

Re: [PATCH v2] lan743x: correctly handle chips with internal PHY

2020-11-07 Thread Andrew Lunn
On Fri, Nov 06, 2020 at 08:43:24AM -0500, Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > Commit 6f197fb63850 ("lan743x: Added fixed link and RGMII support") > assumes that chips with an internal PHY will never have a devicetree > entry. This is incorrect: even for these chips, a devicetre

[PATCH v2] net: atlantic: Remove unnecessary conversion to bool

2020-11-07 Thread xiakaixu1987
From: Kaixu Xia The '!=' expression itself is bool, no need to convert it to bool. Fix the following coccicheck warning: ./drivers/net/ethernet/aquantia/atlantic/aq_nic.c:1477:34-39: WARNING: conversion to bool not needed here Reported-by: Tosk Robot Signed-off-by: Kaixu Xia --- drivers/net

[PATCH net] net: udp: fix Fast/frag0 UDP GRO

2020-11-07 Thread Alexander Lobakin
While testing UDP GSO fraglists forwarding through driver that uses Fast GRO (via napi_gro_frags()), I was observing lots of out-of-order iperf packets: [ ID] Interval Transfer Bitrate Jitter [SUM] 0.0-40.0 sec 12106 datagrams received out-of-order Simple switch to napi_gr

[PATCH v2] net: ipv4: remove redundant initialization in inet_rtm_deladdr

2020-11-07 Thread Menglong Dong
The initialization for 'err' with '-EINVAL' is redundant and can be removed, as it is updated soon. Changes since v1: - Remove redundant empty line Signed-off-by: Menglong Dong --- net/ipv4/devinet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv4/devinet.c b/net/

[PATCH v2 net] ethtool: netlink: add missing netdev_features_change() call

2020-11-07 Thread Alexander Lobakin
After updating userspace Ethtool from 5.7 to 5.9, I noticed that NETDEV_FEAT_CHANGE is no more raised when changing netdev features through Ethtool. That's because the old Ethtool ioctl interface always calls netdev_features_change() at the end of user request processing to inform the kernel that o

Re: [PATCH] net: ipv4: remove redundant initialization in inet_rtm_deladdr

2020-11-07 Thread Menglong Dong
Dear Jakub, On Sun, Nov 8, 2020 at 7:48 AM Jakub Kicinski wrote: > > On Fri, 6 Nov 2020 01:42:37 -0500 menglong8.d...@gmail.com wrote: > > From: Menglong Dong > > > > The initialization for 'err' with '-EINVAL' is redundant and > > can be removed, as it is updated soon. > > > > Signed-off-by: M

Re: [PATCH v2 0/5] net: qrtr: Add distant node support

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 18:33:25 +0100 Loic Poulain wrote: > QRTR protocol allows a node to communicate with an other non-immediate > node via an intermdediate immediate node acting as a 'bridge': > > node-0 <=> node-1 <=> node-2 > > This is currently not supported in this upstream version and this

Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 6 Nov 2020 17:43:41 +0800 you wrote: > From: Voon Weifeng > > Set all EHL/TGL phy_addr to -1 so that the driver will automatically > detect it at run-time by probing all the possible 32 addresses. > > Signed-off

Re: [RFC net-next 00/28] ndo_ioctl rework

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 23:17:15 +0100 Arnd Bergmann wrote: > Any suggestions on how to proceed? I think the ndo_siocdevprivate > change is the most interesting here, and I would like to get > that merged. Splitting out / eliminating ioctl pass-thry in general seems like a nice clean up. How did you

Re: [PATCH] net: usb: fix spelling typo in cdc_ncm.c

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 6 Nov 2020 15:50:25 +0800 you wrote: > Actually, withing should be within. > > Signed-off-by: Wang Qing > --- > drivers/net/usb/cdc_ncm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summ

Re: [PATCH] net: core: fix spelling typo in flow_dissector.c

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 6 Nov 2020 16:11:49 +0800 you wrote: > withing should be within. > > Signed-off-by: Wang Qing > --- > net/core/flow_dissector.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with l

Re: [PATCH net-next 00/13] net: ipa: constrain GSI interrupts

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Thu, 5 Nov 2020 12:13:54 -0600 you wrote: > The goal of this series is to more tightly control when GSI > interrupts are enabled. This is a long-ish series, so I'll > describe it in parts. > > The first patch is actu

Re: [PATCH] net: ipv4: remove redundant initialization in inet_rtm_deladdr

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 01:42:37 -0500 menglong8.d...@gmail.com wrote: > From: Menglong Dong > > The initialization for 'err' with '-EINVAL' is redundant and > can be removed, as it is updated soon. > > Signed-off-by: Menglong Dong How many changes like this are there in the kernel right now? I'm

Re: [PATCH] net: atlantic: Remove unnecessary conversion to bool

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 10:57:59 +0800 xiakaixu1...@gmail.com wrote: > - cfg->is_qos = (tcs != 0 ? true : false); > + cfg->is_qos = (tcs != 0); !!tcs

[PATCH v5 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-07 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet ove

[PATCH v5 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-07 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v5: new patch net/core/dev.c | 2 ++ 1 file changed, 2 insert

[PATCH v5 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-07 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v5: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_g

[PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-07 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet ove

Re: [PATCH net] ethtool: netlink: add missing netdev_features_change() call

2020-11-07 Thread Jakub Kicinski
On Thu, 05 Nov 2020 16:26:58 + Alexander Lobakin wrote: > After updating userspace Ethtool from 5.7 to 5.9, I noticed that > NETDEV_FEAT_CHANGE is no more raised when changing netdev features > through Ethtool. > That's because the old Ethtool ioctl interface always calls > netdev_features_chan

Re: [PATCH 2/2] selftests: pmtu.sh: improve the test result processing

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 18:50:51 +0800 Po-Hsu Lin wrote: > This test will treat all non-zero return codes as failures, it will > make the pmtu.sh test script being marked as FAILED when some > sub-test got skipped. > > Improve the result processing by > * Only mark the whole test script as SKIP when

Re: [PATCH] Documentation: tproxy: more gentle intro (re-post #2)

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 12:26:04 +0200 Motiejus Jakštys wrote: > Clarify tproxy odcumentation, so it's easier to read/understand without > a-priori in-kernel transparent proxying knowledge. > > Remove a reference to linux 2.2 and cosmetic Sphinx changes and address > comments from kuba@. > > Sorry fo

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-07 Thread Andrew Lunn
On Sat, Nov 07, 2020 at 09:39:42AM -0800, Joe Perches wrote: > On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > > It is good to remember that there are multiple readers of source > > > > files. There is the compiler which generates code from it,

Re: [PATCH net-next] net: x25_asy: Delete the x25_asy driver

2020-11-07 Thread Jakub Kicinski
On Fri, 06 Nov 2020 06:43:53 +0100 Martin Schiller wrote: > On 2020-11-05 16:06, Arnd Bergmann wrote: > > ... > > Adding Martin Schiller and Andrew Hendry, plus the linux-x25 mailing > > list to Cc. When I last looked at the wan drivers, I think I concluded > > that this should still be kept around

Re: [PATCH V3] fsl/fman: add missing put_devcie() call in fman_port_probe()

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 17:09:25 +0800 Yu Kuai wrote: > if of_find_device_by_node() succeed, fman_port_probe() doesn't have a > corresponding put_device(). Thus add jump target to fix the exception > handling for this function implementation. > > Fixes: 0572054617f3 ("fsl/fman: fix dereference null ret

[PATCH] docs: networking: phy: s/2.5 times faster/2.5 times as fast/

2020-11-07 Thread Jonathan Neuschäfer
2.5 times faster would be 3.5 Gbps (4.375 Gbaud after 8b/10b encoding). Signed-off-by: Jonathan Neuschäfer --- Documentation/networking/phy.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/phy.rst b/Documentation/networking/phy.rst index 256106

Re: [RESEND PATCH] net: macb: fix NULL dereference due to no pcs_config method

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 5 Nov 2020 18:58:33 +0100 you wrote: > This patch fixes NULL pointer dereference due to NULL pcs_config > in pcs_ops. > > Reported-by: Nicolas Ferre > Link: > https://lore.kernel.org/netdev/2db854c7-9ffb-328a-f34

Re: [RESEND PATCH] net: macb: fix NULL dereference due to no pcs_config method

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 10:26:59 +0100 Nicolas Ferre wrote: > On 05/11/2020 at 18:58, Parshuram Thombare wrote: > > This patch fixes NULL pointer dereference due to NULL pcs_config > > in pcs_ops. > > > > Reported-by: Nicolas Ferre > > Link: > > https://lore.kernel.org/netdev/2db854c7-9ffb-328a-f346-

Re: [PATCH v4 net-next 1/3] ptp: idt82p33: add adjphase support

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Thu, 5 Nov 2020 22:52:07 -0500 you wrote: > From: Min Li > > Add idt82p33_adjphase() to support PHC write phase mode. > > Changes since v1: > -Fix broken build > > [...] Here is the summary with links: - [v4,net-

Re: [PATCH v4 net-next 1/3] ptp: idt82p33: add adjphase support

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 22:52:07 -0500 min.li...@renesas.com wrote: > From: Min Li > > Add idt82p33_adjphase() to support PHC write phase mode. > > Signed-off-by: Min Li > Acked-by: Richard Cochran Applied all 3, thanks.

[PATCH net-next v3 09/10] ipv4/ipv6: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_gre.c | 6 +++--- net/ipv4/ipip.c| 2 +- net/ipv6/ip6_gre.c | 6 +++--- net/ipv6/sit.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff -

[PATCH net-next v3 04/10] ip6_tunnel: use ip_tunnel_get_stats64 as ndo_get_stats64 callback

2020-11-07 Thread Heiner Kallweit
Switch ip6_tunnel to the standard statistics pattern: - use dev->stats for the less frequently accessed counters - use dev->tstats for the frequently accessed counters An additional benefit is that we now have 64bit statistics also on 32bit systems. Signed-off-by: Heiner Kallweit --- net/ipv6/i

[PATCH net-next v3 03/10] tun: switch to net core provided statistics counters

2020-11-07 Thread Heiner Kallweit
Switch tun to the standard statistics pattern: - use netdev->stats for the less frequently accessed counters - use netdev->tstats for the frequently accessed per-cpu counters v3: - add atomic_long_t member rx_frame_errors for making counter updates atomic Signed-off-by: Heiner Kallweit --- dr

[PATCH net-next v3 10/10] net: remove ip_tunnel_get_stats64

2020-11-07 Thread Heiner Kallweit
After having migrated all users remove ip_tunnel_get_stats64(). Signed-off-by: Heiner Kallweit --- include/net/ip_tunnels.h | 2 -- net/ipv4/ip_tunnel_core.c | 9 - 2 files changed, 11 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 02ccd3254..1b7905

[PATCH net-next v3 05/10] net: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/bareudp.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bareu

[PATCH net-next v3 01/10] net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation

2020-11-07 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Reviewed-by: Florian Fainelli Signed-off-by: Heiner Kallweit -

[PATCH net-next v3 06/10] gtp: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Acked-by: Harald Welte Signed-off-by: Heiner Kallweit --- drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index dc668ed28..4c04e27

[PATCH net-next v3 08/10] vti: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_vti.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index b957cbee2..

[PATCH net-next v3 02/10] net: dsa: use net core stats64 handling

2020-11-07 Thread Heiner Kallweit
Use netdev->tstats instead of a member of dsa_slave_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean Signed-off-by: Heiner Kallweit --- net/dsa/dsa.c | 7 +--

[PATCH net-next v3 07/10] wireguard: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Reviewed-by: Jason A. Donenfeld Signed-off-by: Heiner Kallweit --- drivers/net/wireguard/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireguard/device.c b/drivers

Re: [PATCH net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 6 Nov 2020 18:11:25 +0200 you wrote: > With CONFIG_BRIDGE=m the compilation fails: > > ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in > function `prestera_bridge_port_event': > prestera_swi

Re: [net v2 1/7] net/mlx5e: Fix modify header actions memory leak

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Thu, 5 Nov 2020 12:21:23 -0800 you wrote: > From: Maor Dickman > > Modify header actions are allocated during parse tc actions and only > freed during the flow creation, however, on error flow the allocated > memory is wro

[PATCH net-next v3 00/10] net: add and use dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Subsequently switch more drivers to use this pattern. v2: - add

Re: [PATCH net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 12:13:12 -0800 Randy Dunlap wrote: > On 11/6/20 8:11 AM, Vadym Kochan wrote: > > With CONFIG_BRIDGE=m the compilation fails: > > > > ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in > > function `prestera_bridge_port_event': > > prestera_switchdev.c:(.

Re: [pull request][net v2 0/7] mlx5 fixes 2020-11-03

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 12:21:22 -0800 Saeed Mahameed wrote: > This series introduces some fixes to mlx5 driver. > > v1->v2: > - Fix fixes line tag in patch #1 > - Toss ktls refcount leak fix, Maxim will look further into the root >cause. > - Toss eswitch chain 0 prio patch, until we determine i

Re: [PATCH 1/1] RDMA/rxe: Fetch skb packets from ethernet layer

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 19:12:01 +0800 Zhu Yanjun wrote: > In the original design, in rx, skb packet would pass ethernet > layer and IP layer, eventually reach udp tunnel. > > Now rxe fetches the skb packets from the ethernet layer directly. > So this bypasses the IP and UDP layer. As such, the skb pa

Re: [PATCH v2] net: macvlan: remove redundant initialization in macvlan_dev_netpoll_setup

2020-11-07 Thread Jakub Kicinski
On Wed, 4 Nov 2020 20:54:04 -0500 menglong8.d...@gmail.com wrote: > From: Menglong Dong > > The initialization for err with 0 seems useless, as it is soon updated > with -ENOMEM. So, we can remove it. > > Changes since v1: > -Keep -ENOMEM still. > > Signed-off-by: Menglong Dong Applied.

Re: [PATCH v2 net] r8169: disable hw csum for short packets on all chip versions

2020-11-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 5 Nov 2020 18:14:47 +0100 you wrote: > RTL8125B has same or similar short packet hw padding bug as RTL8168evl. > The main workaround has been extended accordingly, however we have to > disable also hw checksumming for sh

Re: [PATCH v2 net] r8169: disable hw csum for short packets on all chip versions

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 18:14:47 +0100 Heiner Kallweit wrote: > RTL8125B has same or similar short packet hw padding bug as RTL8168evl. > The main workaround has been extended accordingly, however we have to > disable also hw checksumming for short packets on affected new chip > versions. Instead of che

Re: [PATCH net] r8169: fix potential skb double free in an error path

2020-11-07 Thread Jakub Kicinski
On Thu, 5 Nov 2020 15:28:42 +0100 Heiner Kallweit wrote: > The caller of rtl8169_tso_csum_v2() frees the skb if false is returned. > eth_skb_pad() internally frees the skb on error what would result in a > double free. Therefore use __skb_put_padto() directly and instruct it > to not free the skb o

Re: [PATCH] cxgb4: Fix the -Wmisleading-indentation warning

2020-11-07 Thread Jakub Kicinski
On Wed, 4 Nov 2020 13:24:04 +0800 xiakaixu1...@gmail.com wrote: > From: Kaixu Xia > > Fix the gcc warning: > > drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:2673:9: warning: this > 'for' clause does not guard... [-Wmisleading-indentation] > 2673 | for (i = 0; i < n; ++i) \ > > R

Re: [PATCH net v2 00/21] net: avoid to remove module when its debugfs is being used

2020-11-07 Thread Taehee Yoo
On Sun, 8 Nov 2020 at 04:05, Jakub Kicinski wrote: > Hi Jakub, Thank you for the review! > On Sat, 7 Nov 2020 17:21:31 + Taehee Yoo wrote: > > When debugfs file is opened, its module should not be removed until > > it's closed. > > Because debugfs internally uses the module's data. > > So,

Re: [PATCH net] openvswitch: Fix upcall OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS

2020-11-07 Thread Jakub Kicinski
On Tue, 3 Nov 2020 16:11:34 -0800 Yi-Hung Wei wrote: > TUNNEL_GENEVE_OPT is set on tun_flags in struct sw_flow_key when > a packet is coming from a geneve tunnel no matter the size of geneve > option is zero or not. On the other hand, TUNNEL_VXLAN_OPT or > TUNNEL_ERSPAN_OPT is set when the VXLAN

[bpf PATCH 5/5] bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list

2020-11-07 Thread John Fastabend
When skb has a frag_list its possible for skb_to_sgvec() to fail. This happens when the scatterlist has fewer elements to store pages than would be needed for the initial skb plus any of its frags. This case appears rare, but is possible when running an RX parser/verdict programs exposed to the in

[bpf PATCH 2/5] bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect

2020-11-07 Thread John Fastabend
Fix sockmap sk_skb programs so that they observe sk_rcvbuf limits. This allows users to tune SO_RCVBUF and sockmap will honor them. We can refactor the if(charge) case out in later patches. But, keep this fix to the point. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path")

[bpf PATCH 4/5] bpf, sockmap: Handle memory acct if skb_verdict prog redirects to self

2020-11-07 Thread John Fastabend
If the skb_verdict_prog redirects an skb knowingly to itself, fix your BPF program this is not optimal and an abuse of the API please use SK_PASS. That said there may be cases, such as socket load balancing, where picking the socket is hashed based or otherwise picks the same socket it was received

[bpf PATCH 3/5] bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self

2020-11-07 Thread John Fastabend
If a socket redirects to itself and it is under memory pressure it is possible to get a socket stuck so that recv() returns EAGAIN and the socket can not advance for some time. This happens because when redirecting a skb to the same socket we received the skb on we first check if it is OK to enqueu

[bpf PATCH 1/5] bpf, sockmap: fix partial copy_page_to_iter so progress can still be made

2020-11-07 Thread John Fastabend
If copy_page_to_iter() fails or even partially completes, but with fewer bytes copied than expected we currently reset sg.start and return EFAULT. This proves problematic if we already copied data into the user buffer before we return an error. Because we leave the copied data in the user buffer an

[bpf PATCH 0/5] sockmap fixes

2020-11-07 Thread John Fastabend
This includes fixes for sockmap found after I started running skmsg and verdict programs on systems that I use daily. To date with attached series I've been running for multiple weeks without seeing any issues on systems doing calls, mail, movies, etc. Also I started running packetdrill and after

[PATCH net-next v2 1/3] net: evaluate net.ipvX.conf.all.ignore_routes_with_linkdown

2020-11-07 Thread Vincent Bernat
Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl ignores a route whose interface is down. It is provided as a per-interface sysctl. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls. Teste

[PATCH net-next v2 3/3] net: evaluate net.ipvX.conf.all.disable_policy and disable_xfrm

2020-11-07 Thread Vincent Bernat
The disable_policy and disable_xfrm are a per-interface sysctl to disable IPsec policy or encryption on an interface. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls. Signed-off-by: Vincent Bernat --- net

Re: [PATCH net-next] net: emaclite: Add error handling for of_address_ and phy read functions

2020-11-07 Thread Jakub Kicinski
On Tue, 3 Nov 2020 19:01:05 +0530 Radhey Shyam Pandey wrote: > From: Shravya Kumbham > > Add ret variable, conditions to check the return value and it's error > path for of_address_to_resource() and phy_read() functions. > > Addresses-Coverity: Event check_return value. > Signed-off-by: Shravya

[PATCH net-next v2 2/3] net: evaluate net.ipv4.conf.all.proxy_arp_pvlan

2020-11-07 Thread Vincent Bernat
Introduced in 65324144b50b, the "proxy_arp_vlan" sysctl is a per-interface sysctl to tune proxy ARP support for private VLANs. While the "all" variant is exposed, it was a noop and never evaluated. We use the usual "or" logic for this kind of sysctls. Fixes: 65324144b50b ("net: RFC3069, private VL

net: evaluate net.ipvX.conf.all.* sysctls

2020-11-07 Thread Vincent Bernat
Some per-interface sysctls are ignoring the "all" variant. This patchset fixes some of them when such a sysctl is handled as a boolean. This includes: - net.ipvX.conf.all.disable_policy - net.ipvX.conf.all.disable_policy.disable_xfrm - net.ipv4.conf.all.proxy_arp_pvlan - net.ipvX.conf.all.igno

[Linux-kernel-mentees] [PATCH v3 net] rose: Fix Null pointer dereference in rose_send_frame()

2020-11-07 Thread Anmol Karn
rose_send_frame() dereferences `neigh->dev` when called from rose_transmit_clear_request(), and the first occurrence of the `neigh` is in rose_loopback_timer() as `rose_loopback_neigh`, and it is initialized in rose_add_loopback_neigh() as NULL. i.e when `rose_loopback_neigh` used in rose_loopback_

Re: [PATCH net-next 0/2] net: axienet: Dynamically enable MDIO interface

2020-11-07 Thread Jakub Kicinski
On Tue, 3 Nov 2020 16:56:08 +0530 Radhey Shyam Pandey wrote: > This patchset dynamically enable MDIO interface. The background for this > change is coming from Cadence GEM controller(macb) in which MDC is active > only during MDIO read or write operations while the PHY registers are > read or writ

Re: [PATCH net v2 00/21] net: avoid to remove module when its debugfs is being used

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 17:21:31 + Taehee Yoo wrote: > When debugfs file is opened, its module should not be removed until > it's closed. > Because debugfs internally uses the module's data. > So, it could access freed memory. > > In order to avoid panic, it just sets .owner to THIS_MODULE. > So t

Re: [Linux-kernel-mentees] [PATCH v2] net: rose: Fix Null pointer dereference in rose_send_frame()

2020-11-07 Thread Anmol karn
Hello, Sorry for this wrong subject(It should be v3 instead of v2), please ignore this patch. I will send a new one with the corrected subject. Thanks, Anmol On Sun, Nov 8, 2020 at 12:27 AM Anmol Karn wrote: > > rose_send_frame() dereferences `neigh->dev` when called from > rose_transmit_clear

[Linux-kernel-mentees] [PATCH v2] net: rose: Fix Null pointer dereference in rose_send_frame()

2020-11-07 Thread Anmol Karn
rose_send_frame() dereferences `neigh->dev` when called from rose_transmit_clear_request(), and the first occurrence of the `neigh` is in rose_loopback_timer() as `rose_loopback_neigh`, and it is initialized in rose_add_loopback_neigh() as NULL. i.e when `rose_loopback_neigh` used in rose_loopback_

Re: [net-next v4 0/8]net: convert tasklets to use new tasklet_setup API

2020-11-07 Thread Jakub Kicinski
On Tue, 3 Nov 2020 14:48:15 +0530 Allen Pais wrote: > From: Allen Pais > > Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' > introduced a new tasklet initialization API. This series converts > all the net/* drivers to use the new tasklet_setup() API > > The following series i

Re: [PATCH 41/41] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown

2020-11-07 Thread Lee Jones
On Sat, 07 Nov 2020, Kalle Valo wrote: > Lee Jones writes: > > > On Mon, 02 Nov 2020, Brian Norris wrote: > > > >> On Mon, Nov 2, 2020 at 3:25 AM Lee Jones wrote: > >> > --- a/drivers/net/wireless/realtek/rtw88/pci.h > >> > +++ b/drivers/net/wireless/realtek/rtw88/pci.h > >> > @@ -212,6 +212,10

Re: [PATCH v2] net: bonding: alb disable balance for IPv6 multicast related mac

2020-11-07 Thread Jakub Kicinski
On Tue, 3 Nov 2020 13:05:59 -0800 Jakub Kicinski wrote: > On Mon, 2 Nov 2020 15:56:43 +0800 LIU Yulong wrote: > > According to the RFC 2464 [1] the prefix "33:33:xx:xx:xx:xx" is defined to > > construct the multicast destination MAC address for IPv6 multicast traffic. > > The NDP (Neighbor Discove

Re: [PATCH net v2 17/21] brcmfmac: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
On Sun, 8 Nov 2020 at 02:41, Arend Van Spriel wrote: > Hi Arend, Thank you for the review! > On November 7, 2020 6:25:15 PM Taehee Yoo wrote: > > > If THIS_MODULE is not set, the module would be removed while debugfs is > > being used. > > It eventually makes kernel panic. > > Is this really a

Re: [PATCH v3 bpf] trace: bpf: Fix passing zero to PTR_ERR()

2020-11-07 Thread Yonghong Song
On 11/6/20 11:45 PM, Wang Qing wrote: There is a bug when passing zero to PTR_ERR() and return. Fix smatch err. Signed-off-by: Wang Qing Acked-by: Yonghong Song

Re: [PATCH net-next v3 03/15] net/smc: Add connection counters for links

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 13:59:46 +0100 Karsten Graul wrote: > +static inline void smc_switch_link_and_count(struct smc_connection *conn, > + struct smc_link *to_lnk) Please avoid the use of static inline functions. The compiler should inline this 3 instruction

Re: [PATCH net-next v3 15/15] net/smc: Add support for obtaining system information

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 13:59:58 +0100 Karsten Graul wrote: > From: Guvenc Gulce > > Add new netlink command to obtain system information > of the smc module. > > Signed-off-by: Guvenc Gulce > Signed-off-by: Karsten Graul Checkpatch says: CHECK: Please don't use multiple blank lines #62: FILE: i

Re: [PATCH] can: flexcan: fix reference count leak in flexcan ops

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 19:04:14 +0800 Zhang Qilong wrote: > Fixes: ca10989632d88 ("can: flexcan: implement can Runtime PM") > > Signed-off-by: Zhang Qilong No empty lines between tags, please.

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-11-07 Thread Jakub Kicinski
On Fri, 6 Nov 2020 23:55:50 -0800 Nick Desaulniers wrote: > -ntohs(tuple->src.u.icmp.id)); > +(__be16)ntohs(tuple->src.u.icmp.id)); Joe has a point, besides __be16 clearly is not the right type here, the result of ntohs is in host order.

Re: [PATCH net-next 10/11] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 14:31:20 +0800 Huazhong Tan wrote: > +static void hns3_update_cqe_mode(struct net_device *netdev, bool enable, > bool is_tx) Wrap this to 80 characters, please.

Re: [PATCH net-next 02/11] net: hns3: add support for 1us unit GL configuration

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 14:31:12 +0800 Huazhong Tan wrote: > For device whose version is above V3(include V3), the GL > configuration can set as 1us unit, so adds support for > configuring this field. > > Signed-off-by: Huazhong Tan Doesn't build. drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c:

Re: [PATCH net v2 17/21] brcmfmac: set .owner to THIS_MODULE

2020-11-07 Thread Arend Van Spriel
On November 7, 2020 6:25:15 PM Taehee Yoo wrote: If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Is this really a valid concern in the context of debugs? I tend to say it is not. Whenever I am using debugs to debug my driv

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-07 Thread Joe Perches
On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > It is good to remember that there are multiple readers of source > > > files. There is the compiler which generates code from it, and there > > > is the human trying to understand what is going on,

Re: [V2] [PATCH] net/ethernet: update ret when ptp_clock is ERROR

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 06:58:16 -0800 Richard Cochran wrote: > On Sat, Nov 07, 2020 at 11:38:38AM +0800, Wang Qing wrote: > > We always have to update the value of ret, otherwise the error value > > may be the previous one. And ptp_clock_register() never return NULL > > when PTP_1588_CLOCK enable, so

[PATCH net v2 17/21] brcmfmac: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 2f8c8e62cd50 ("brcmfmac: add "reset" debugfs entry for testing reset") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline drivers/net/wireless/broadcom/brcm80211

[PATCH net v2 21/21] Bluetooth: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 4b4148e9acc1 ("Bluetooth: Add support for setting DUT mode") Fixes: 4b4113d6dbdb ("Bluetooth: Add debugfs entry for setting vendor diagnostic mode") Fixes: 300acfdec916 ("B

[PATCH net v2 18/21] b43legacy: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 75388acd0cd8 ("[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline drivers/net/wireless/broad

[PATCH net v2 14/21] wcn36xx: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline - Squash patches into per-driv

[PATCH net v2 20/21] mwifiex: mwifiex: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline - Squash patches into per-driver

[PATCH net v2 19/21] b43: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: e4d6b7951812 ("[B43]: add mac80211-based driver for modern BCM43xx devices") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline drivers/net/wireless/broadcom/b4

[PATCH net v2 15/21] wil6210: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 2be7d22f0625 ("wireless: add new wil6210 802.11ad 60GHz driver") Fixes: 0b39aaf2f203 ("wil6210: Tx mgmt frame from debugfs") Fixes: c5b3a6582b1e ("wil6210: Add support for s

[PATCH net v2 12/21] ath11k: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline - Squash patches into per-driver/subsystem

[PATCH net v2 16/21] cw1200: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Signed-off-by: Taehee Yoo --- v1 -> v2: - Change headline drivers/net/wireless/st/cw1200

[PATCH net v2 10/21] iwlegacy: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: be663ab67077 ("iwlwifi: split the drivers for agn and legacy devices 3945/4965") Fixes: 4bc85c1324aa ("Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4

[PATCH net v2 09/21] iwlwifi: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 5ae212c9273d ("[PATCH] iwlwifi: add read rate scale table debugfs function") Fixes: 0209dc11c769 ("[PATCH] iwlwifi: add debugfs rate scale stats") Fixes: 712b6cf57a53 ("iwl

[PATCH net v2 13/21] ath10k: set .owner to THIS_MODULE

2020-11-07 Thread Taehee Yoo
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 90174455ae05 ("ath10k: add support to configure pktlog filter") Fixes: 63fb32df9786 ("ath10k: add debugfs entry to configure quiet period") Fixes: 844fa5722712 ("ath10k: deb

  1   2   >