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

2021-01-06 Thread dinghao . liu
> On Wed, 6 Jan 2021 18:56:23 +0800 (GMT+08:00) dinghao@zju.edu.cn > wrote: > > > I used this one for a test: > > > > > > https://patchwork.kernel.org/project/netdevbpf/patch/1609312994-121032-1-git-send-email-abaci-bug...@linux.alibaba.com/ > > > > > > I'm not getting the Fixes tag when I do

Re: [PATCH net 3/3] net: ip: always refragment ip defragmented packets

2021-01-06 Thread Christian Perle
Hello Florian, On Wed, Jan 06, 2021 at 00:15:23 +0100, Florian Westphal wrote: > Force refragmentation as per original sizes unconditionally so ip tunnel > will encapsulate the fragments instead. [...] > diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c > index 89fff5f59eea..2ed0b01f72f0 1

Re: [PATCH] net: dsa: fix led_classdev build errors

2021-01-06 Thread Kurt Kanzenbach
On Tue Jan 05 2021, Randy Dunlap wrote: > Fix build errors when LEDS_CLASS=m and NET_DSA_HIRSCHMANN_HELLCREEK=y. > This limits the latter to =m when LEDS_CLASS=m. > > microblaze-linux-ld: drivers/net/dsa/hirschmann/hellcreek_ptp.o: in function > `hellcreek_ptp_setup': > (.text+0xf80): undefined re

[PATCH v1] vdpa/mlx5: Fix memory key MTT population

2021-01-06 Thread Eli Cohen
map_direct_mr() assumed that the number of scatter/gather entries returned by dma_map_sg_attrs() was equal to the number of segments in the sgl list. This led to wrong population of the mkey object. Fix this by properly referring to the returned value. The hardware expects each MTT entry to contai

Re: [PATCH v3 net-next 01/11] net: switchdev: remove vid_begin -> vid_end range from VLAN objects

2021-01-06 Thread Kurt Kanzenbach
On Thu Jan 07 2021, Vladimir Oltean wrote: > From: Vladimir Oltean > > The call path of a switchdev VLAN addition to the bridge looks something > like this today: > > nbp_vlan_init > | __br_vlan_set_default_pvid > | | | > | |br_afspec

[PATCH iproute2 v2 1/1] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
Since moving get_rate() and get_size() from tc to lib, on some systems we fail to link because of missing math lib. Move the functions that require math lib to their own c file and add -lm to dcb that now use those functions. ../lib/libutil.a(utils.o): In function `get_rate': utils.c:(.text+0x10dc

Re: [PATCH iproute2] build: Fix link errors on some systems

2021-01-06 Thread Roi Dayan
On 2021-01-06 4:24 PM, Petr Machata wrote: Roi Dayan writes: On 2021-01-06 3:16 PM, Petr Machata wrote: Regarding the publishing, the _jw reference can be changed to a call to is_json_context(), which does the same thing. Then _jw can stay private in json_print.c. Exposing an _IS_JSON_CON

Re: [PATCH] rtw88: 8821c: Add RFE 2 support

2021-01-06 Thread Kai-Heng Feng
On Wed, Aug 5, 2020 at 7:24 PM Kai-Heng Feng wrote: > > Hi Tony, > > > On Aug 5, 2020, at 19:18, Tony Chuang wrote: > > > >> 8821CE with RFE 2 isn't supported: > >> [ 12.404834] rtw_8821ce :02:00.0: rfe 2 isn't supported > >> [ 12.404937] rtw_8821ce :02:00.0: failed to setup chip efus

[RESEND PATCH 2/2] misc: add support for retimers interfaces on Intel MAX 10 BMC

2021-01-06 Thread Xu Yilun
This driver supports the ethernet retimers (C827) for the Intel PAC (Programmable Acceleration Card) N3000, which is a FPGA based Smart NIC. C827 is an Intel(R) Ethernet serdes transceiver chip that supports up to 100G transfer. On Intel PAC N3000 there are 2 C827 chips managed by the Intel MAX 10

[RESEND PATCH 0/2] Add retimer interfaces support for Intel MAX 10 BMC

2021-01-06 Thread Xu Yilun
I resend this patchset to loop in networking developers for comments. This is the previous thread. I'll fix other comments when I have a v2. https://lore.kernel.org/lkml/x%2fv9hvxyluot9...@kroah.com/ The patchset is for the retimers connected to Intel MAX 10 BMC on Intel PAC (Programmable Accele

[RESEND PATCH 1/2] mfd: intel-m10-bmc: specify the retimer sub devices

2021-01-06 Thread Xu Yilun
The patch specifies the 2 retimer sub devices and their resources in the parent driver's mfd_cell. It also adds the register definition of the retimer sub devices. There are 2 ethernet retimer chips (C827) connected to the Intel MAX 10 BMC. They are managed by the BMC firmware, and host could quer

[PATCH] igc: check return value of ret_val in igc_config_fc_after_link_up

2021-01-06 Thread Kevin Lo
Check return value from ret_val to make error check actually work. Fixes: 4eb8080143a9 ("igc: Add setup link functionality") Signed-off-by: Kevin Lo --- diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c index 09cd0ec7ee87..67b8ffd21d8a 100644 --- a/

Re: [PATCH] vdpa/mlx5: Fix memory key MTT population

2021-01-06 Thread Eli Cohen
On Thu, Jan 07, 2021 at 12:15:53PM +0800, Jason Wang wrote: > > On 2021/1/6 下午5:05, Eli Cohen wrote: > > map_direct_mr() assumed that the number of scatter/gather entries > > returned by dma_map_sg_attrs() was equal to the number of segments in > > the sgl list. This led to wrong population of the

Re: [PATCH] udp: Prevent reuseport_select_sock from reading uninitialized socks

2021-01-06 Thread Willem de Bruijn
On Thu, Jan 7, 2021 at 12:11 AM Baptiste Lepers wrote: > > reuse->socks[] is modified concurrently by reuseport_add_sock. To > prevent reading values that have not been fully initialized, only read > the array up until the last known safe index instead of incorrectly > re-reading the last index of

[PATCH] rxrpc: Call state should be read with READ_ONCE() under some circumstances

2021-01-06 Thread Baptiste Lepers
The call state may be changed at any time by the data-ready routine in response to received packets, so if the call state is to be read and acted upon several times in a function, READ_ONCE() must be used unless the call state lock is held. Signed-off-by: Baptiste Lepers --- net/rxrpc/input.c |

[PATCH] udp: Prevent reuseport_select_sock from reading uninitialized socks

2021-01-06 Thread Baptiste Lepers
reuse->socks[] is modified concurrently by reuseport_add_sock. To prevent reading values that have not been fully initialized, only read the array up until the last known safe index instead of incorrectly re-reading the last index of the array. Fixes: acdcecc61285f ("udp: correct reuseport selecti

Re: Possible read of uninitialized array values in reuseport_select_sock?

2021-01-06 Thread Baptiste Lepers
Thanks. I will submit a patch. Baptiste. On Thu, Jan 7, 2021 at 3:57 PM Willem de Bruijn wrote: > > On Wed, Jan 6, 2021 at 10:54 PM Baptiste Lepers > wrote: > > > > Hello, > > > > While reading the code of net/core/sock_reuseport.c, I think I found a > > possible race in reuseport_select_sock.

Re: Possible read of uninitialized array values in reuseport_select_sock?

2021-01-06 Thread Willem de Bruijn
On Wed, Jan 6, 2021 at 10:54 PM Baptiste Lepers wrote: > > Hello, > > While reading the code of net/core/sock_reuseport.c, I think I found a > possible race in reuseport_select_sock. The current code has the > following pattern: > >socks = READ_ONCE(reuse->num_socks); >smp_rmb(); // paired

Re: [PATCH] vdpa/mlx5: Fix memory key MTT population

2021-01-06 Thread Jason Wang
On 2021/1/6 下午5:05, Eli Cohen wrote: map_direct_mr() assumed that the number of scatter/gather entries returned by dma_map_sg_attrs() was equal to the number of segments in the sgl list. This led to wrong population of the mkey object. Fix this by properly referring to the returned value. In a

Possible read of uninitialized array values in reuseport_select_sock?

2021-01-06 Thread Baptiste Lepers
Hello, While reading the code of net/core/sock_reuseport.c, I think I found a possible race in reuseport_select_sock. The current code has the following pattern: socks = READ_ONCE(reuse->num_socks); smp_rmb(); // paired with reuseport_add_sock to make sure reuse->socks[i < num_socks] are in

[PATCH] igb: avoid premature Rx buffer reuse

2021-01-06 Thread Li RongQing
The page recycle code, incorrectly, relied on that a page fragment could not be freed inside xdp_do_redirect(). This assumption leads to that page fragments that are used by the stack/XDP redirect can be reused and overwritten. To avoid this, store the page count prior invoking xdp_do_redirect().

RE: [PATCH linux-next v3 6/6] vdpa_sim_net: Add support for user supported devices

2021-01-06 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, January 5, 2021 6:53 PM > > On Tue, Jan 05, 2021 at 12:30:15PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Tuesday, January 5, 2021 5:45 PM > > > > > > On Tue, Jan 05, 2021 at 12:02:33PM +, Parav Pandit wrote: >

[net] tipc: fix NULL deref in tipc_link_xmit()

2021-01-06 Thread Hoang Huu Le
From: Hoang Le The buffer list can have zero skb as following path: tipc_named_node_up()->tipc_node_xmit()->tipc_link_xmit(), so we need to check the list before casting an &sk_buff. Fault report: [] tipc: Bulk publication failure [] general protection fault, probably for non-canonical [#1] PR

Re: [PATCH v2] docs: octeontx2: tune rst markup

2021-01-06 Thread George Cherian
2. > > Tune markup and formatting for better presentation in the HTML view. > > Signed-off-by: Lukas Bulwahn > --- > v1 -> v2: minor stylistic tuning as suggested by Randy > > applies cleanly on current master (v5.11-rc2) and next-20210106 > > George, please ack.

Re: [PATCH v1] ARM: imx: mach-imx6ul: remove 14x14 EVK specific PHY fixup

2021-01-06 Thread Shawn Guo
On Wed, Dec 09, 2020 at 01:20:51PM +0100, Oleksij Rempel wrote: > Remove board specific PHY fixup introduced by commit: > > | 709bc0657fe6f9f5 ("ARM: imx6ul: add fec MAC refrence clock and phy fixup > init") > > This fixup addresses boards with a specific configuration: a KSZ8081RNA > PHY with a

Re: [PATCH] tcp: remove obsolete paramter sysctl_tcp_low_latency

2021-01-06 Thread lll
在 2020/12/19 8:46, Jakub Kicinski 写道: > On Fri, 18 Dec 2020 14:11:16 +0800 lyl wrote: >> Remove tcp_low_latency, since it is not functional After commit >> e7942d0633c4 (tcp: remove prequeue support) >> >> Signed-off-by: lyl > > I don't think we can remove sysctls, even if they no longer contro

[PATCH] net/ipv6: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.

2021-01-06 Thread Jiapeng Zhong
The print format of this parameter does not match, because it is defined as int type, so modify the matching format of this parameter to %d format. Signed-off-by: Jiapeng Zhong Reported-by: Abaci --- net/ipv6/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/pr

[PATCH RESEND v2 2/3] test_bpf: remove EXPECTED_FAIL flag from bpf_fill_maxinsns11

2021-01-06 Thread Gary Lin
With NOPs padding, x64 jit now can handle the jump cases like bpf_fill_maxinsns11(). Signed-off-by: Gary Lin --- lib/test_bpf.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index ca7d635bccd9..272a9fd143ab 100644 --- a/lib/test_bpf.c +

[PATCH RESEND v2 3/3] selftests/bpf: Add verifier test for x64 jit jump padding

2021-01-06 Thread Gary Lin
There are two tests added into verifier's jit tests to trigger x64 jit jump padding. The first test can be represented as the following assembly code: 1: bpf_call bpf_get_prandom_u32 2: if r0 == 0 goto pc+128 3: if r0 == 1 goto pc+128 ... 129: if r0 == 127 goto pc+12

[PATCH RESEND v2 1/3] bpf,x64: pad NOPs to make images converge more easily

2021-01-06 Thread Gary Lin
The x64 bpf jit expects bpf images converge within the given passes, but it could fail to do so with some corner cases. For example: l0: ja 40 l1: ja 40 [... repeated ja 40 ] l39:ja 40 l40:ret #0 This bpf program contains 40 "ja 40" instructions w

[PATCH RESEND v2 0/3] bpf,x64: implement jump padding in jit

2021-01-06 Thread Gary Lin
This patch series implements jump padding to x64 jit to cover some corner cases that used to consume more than 20 passes and caused failure. v2: - Simplify the sample code in the commit description and provide the jit code - Check the expected padding bytes with WARN_ONCE - Move the 'pad

Re: [PATCH v2 1/3] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips

2021-01-06 Thread Andrew Lunn
> + /* hwmon interface needs to access 16bit registers in atomic way to > + * guarantee coherency of the diagnostic monitoring data. If it is not > + * possible to guarantee coherency because EEPROM is broken in such way > + * that does not support atomic 16bit read operation the

Re: [BUG] from x86: Support kmap_local() forced debugging

2021-01-06 Thread Steven Rostedt
On Wed, 6 Jan 2021 17:03:48 -0800 Linus Torvalds wrote: > --- a/include/linux/skbuff.h > +++ b/include/linux/skbuff.h > @@ -366,7 +366,7 @@ static inline void skb_frag_size_sub(skb_frag_t *frag, > int delta) > static inline bool skb_frag_must_loop(struct page *p) > { > #if defined(CONFIG_HIGH

Re: [BUG] from x86: Support kmap_local() forced debugging

2021-01-06 Thread Jakub Kicinski
On Wed, 6 Jan 2021 17:03:48 -0800 Linus Torvalds wrote: > I wonder whether there is other code that "knows" about kmap() only > affecting PageHighmem() pages thing that is no longer true. > > Looking at some other code, skb_gro_reset_offset() looks suspiciously > like it also thinks highmem pages

Re: [PATCH bpf-next v3 3/3] bpf: remove extra lock_sock for TCP_ZEROCOPY_RECEIVE

2021-01-06 Thread Martin KaFai Lau
On Wed, Jan 06, 2021 at 02:45:56PM -0800, s...@google.com wrote: > On 01/06, Martin KaFai Lau wrote: > > On Tue, Jan 05, 2021 at 01:43:50PM -0800, Stanislav Fomichev wrote: > > > Add custom implementation of getsockopt hook for TCP_ZEROCOPY_RECEIVE. > > > We skip generic hooks for TCP_ZEROCOPY_RECE

[PATCH v2 net-next 4/4] net: dsa: remove the DSA specific notifiers

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean This effectively reverts commit 60724d4bae14 ("net: dsa: Add support for DSA specific notifiers"). The reason is that since commit 2f1e8ea726e9 ("net: dsa: link interfaces with the DSA master to get rid of lockdep warnings"), it appears that there is a generic way to achieve

[PATCH v2 net-next 2/4] net: dsa: export dsa_slave_dev_check

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Using the NETDEV_CHANGEUPPER notifications, drivers can be aware when they are enslaved to e.g. a bridge by calling netif_is_bridge_master(). Export this helper from DSA to get the equivalent functionality of determining whether the upper interface of a CHANGEUPPER notifier

[PATCH v2 net-next 3/4] net: systemport: use standard netdevice notifier to detect DSA presence

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean The SYSTEMPORT driver maps each port of the embedded Broadcom DSA switch port to a certain queue of the master Ethernet controller. For that it currently uses a dedicated notifier infrastructure which was added in commit 60724d4bae14 ("net: dsa: Add support for DSA specific

[PATCH v2 net-next 1/4] net: dsa: move the Broadcom tag information in a separate header file

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean It is a bit strange to see something as specific as Broadcom SYSTEMPORT bits in the main DSA include file. Move these away into a separate header, and have the tagger and the SYSTEMPORT driver include them. Signed-off-by: Vladimir Oltean Acked-by: Florian Fainelli --- Cha

[PATCH v2 net-next 0/4] Reduce coupling between DSA and Broadcom SYSTEMPORT driver

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Upon a quick inspection, it seems that there is some code in the generic DSA layer that is somehow specific to the Broadcom SYSTEMPORT driver. The challenge there is that the hardware integration is very tight between the switch and the DSA master interface. However this doe

Re: [PATCH 00/10] Remove support for TX49xx

2021-01-06 Thread Atsushi Nemoto
On Wed, 6 Jan 2021 21:41:24 +0100, Geert Uytterhoeven wrote: >> > Is that sufficient to keep it? >> >> for me it is. But now we probaly need some reverts then... > > Indeed. Fortunately not all of it, as some removals were TX4938-only. These patches should not break RBTX4927: net: tc35815: D

Re: [PATCH RFC net-next] net: hns3: debugfs add dump tm info of nodes, priority and qset

2021-01-06 Thread huangguangbin (A)
ping On 2020/12/31 17:03, Guangbin Huang wrote: To increase methods to dump more tm info, adds three debugfs commands to dump tm info of nodes, priority and qset. And a new tm file of debugfs is created for only dumping tm info. Unlike previous debugfs commands, to dump each tm information, use

Re: [BUG] from x86: Support kmap_local() forced debugging

2021-01-06 Thread Steven Rostedt
On Wed, 6 Jan 2021 17:03:48 -0800 Linus Torvalds wrote: > (although I wonder how/why the heck you've enabled > CC_OPTIMIZE_FOR_SIZE=y, which is what causes "memcpy()" to be done as > that "rep movsb". I thought we disabled it because it's so bad on most > cpus). Why? Because to test x86_32, I h

Re: [BUG] from x86: Support kmap_local() forced debugging

2021-01-06 Thread Linus Torvalds
On Wed, Jan 6, 2021 at 3:01 PM Steven Rostedt wrote: > > I triggered the following crash on x86_32 by simply doing a: > > (ssh'ing into the box) > > # head -100 /tmp/output-file > > Where the /tmp/output-file was the output of a trace-cmd report. > Even after rebooting and not running the tracin

[PATCH net v2] net: fix use-after-free when UDP GRO with shared fraglist

2021-01-06 Thread Dongseok Yi
skbs in fraglist could be shared by a BPF filter loaded at TC. It triggers skb_ensure_writable -> pskb_expand_head -> skb_clone_fraglist -> skb_get on each skb in the fraglist. While tcpdump, sk_receive_queue of PF_PACKET has the original fraglist. But the same fraglist is queued to PF_INET (or PF

Re: [PATCH net-next] net: sysctl: cleanup net_sysctl_init()

2021-01-06 Thread Jakub Kicinski
On Wed, 06 Jan 2021 20:40:28 + Alexander Lobakin wrote: > 'net_header' is not used outside of this function, so can be moved > from BSS onto the stack. > Declarations of one-element arrays are discouraged, and there's no > need to store 'empty' in BSS. Simply allocate it from heap at init. Are

Re: [PATCH next] net: dsa: print error on invalid port index

2021-01-06 Thread Jakub Kicinski
On Wed, 6 Jan 2021 23:33:07 +0100 Andrew Lunn wrote: > On Wed, Jan 06, 2021 at 10:09:15AM +0100, Rafał Miłecki wrote: > > From: Rafał Miłecki > > > > Looking for an -EINVAL all over the dsa code could take hours for > > inexperienced DSA users. > > Following this argument, you should add dev_e

Re: [PATCH] net: dsa: fix led_classdev build errors

2021-01-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 5 Jan 2021 18:18:15 -0800 you wrote: > Fix build errors when LEDS_CLASS=m and NET_DSA_HIRSCHMANN_HELLCREEK=y. > This limits the latter to =m when LEDS_CLASS=m. > > microblaze-linux-ld: drivers/net/dsa/hirschmann/hellcr

Re: [PATCH] ptp: ptp_ines: prevent build when HAS_IOMEM is not set

2021-01-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 5 Jan 2021 20:25:31 -0800 you wrote: > ptp_ines.c uses devm_platform_ioremap_resource(), which is only > built/available when CONFIG_HAS_IOMEM is enabled. > CONFIG_HAS_IOMEM is not enabled for arch/s390/, so builds on S

Re: [PATCH] Incorrect filename in drivers/net/phy/Makefile

2021-01-06 Thread Florian Fainelli
On 1/6/21 2:17 AM, Zhi Han wrote: > It should be a typing error ('-' instead of '_'), as no mdio-bus.c but > just mdio_bus.c exists. > > Just find it when inspecting these code. Tried to compile to test, but > failed to construct an applicable .config file for that. Maybe someone > can do that mor

Re: [PATCH net-next v2] net: mvneta: fix error message when MTU too large for XDP

2021-01-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 5 Jan 2021 18:23:33 +0100 you wrote: > The error message says that "Jumbo frames are not supported on XDP", but > the code checks for mtu > MVNETA_MAX_RX_BUF_SIZE, not mtu > 1500. > > Fix this error message. > > Signe

Re: [PATCH net v2] net: bareudp: add missing error handling for bareudp_link_config()

2021-01-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 5 Jan 2021 11:07:25 -0800 you wrote: > .dellink does not get called after .newlink fails, > bareudp_newlink() must undo what bareudp_configure() > has done if bareudp_link_config() fails. > > v2: call bareudp_dellink()

RE: [PATCH 2/3] hv_netvsc: Wait for completion on request NVSP_MSG4_TYPE_SWITCH_DATA_PATH

2021-01-06 Thread Long Li
7C0 > %7C637455042608753098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA > wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&s > data=uge6PX2NyAe%2BjRtvgOhR5xzN2ltBctZXeZwn0hoYco0%3D&reser > ved=0 > git fetch --no-tags linux-review Long-Li/hv_netvsc-Check-VF-datapat

Re: [PATCH net V2] net: ipv6: Validate GSO SKB before finish IPv6 processing

2021-01-06 Thread Jakub Kicinski
On Tue, 5 Jan 2021 15:43:21 +0200 Aya Levin wrote: > There are cases where GSO segment's length exceeds the egress MTU. Please name same for posterity. Please widen the CC list. > If so: > - Consume the SKB and its segments. > - Issue an ICMP packet with 'Packet Too Big' message containing th

Re: [PATCH bpf] bpftool: fix compilation failure for net.o with older glibc

2021-01-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Wed, 6 Jan 2021 15:59:06 + you wrote: > For older glibc ~2.17, #include'ing both linux/if.h and net/if.h > fails due to complaints about redefinition of interface flags: > > CC net.o > In file included from net.c:1

Re: [PATCH bpf-next 3/3] selftests/bpf: add tests for user- and non-CO-RE BPF_CORE_READ() variants

2021-01-06 Thread Andrii Nakryiko
On Wed, Jan 6, 2021 at 2:10 AM Gilad Reti wrote: > > On Wed, Jan 6, 2021 at 8:09 AM Alexei Starovoitov > wrote: > > > > On Tue, Jan 05, 2021 at 01:03:47PM -0800, Andrii Nakryiko wrote: > > > > > > > > > > - handling 32-bit vs 64-bit UAPI structs uniformly; > > > > > > > > what do you mean? > >

Re: [PATCH] Incorrect filename in drivers/net/phy/Makefile

2021-01-06 Thread Jakub Kicinski
On Wed, 6 Jan 2021 11:17:12 +0100 Zhi Han wrote: > It should be a typing error ('-' instead of '_'), as no mdio-bus.c but > just mdio_bus.c exists. > > Just find it when inspecting these code. Tried to compile to test, but > failed to construct an applicable .config file for that. Maybe someone >

Re: linux-next: build warning after merge of the origin tree

2021-01-06 Thread Stephen Rothwell
Hi Johannes, On Wed, 06 Jan 2021 23:46:45 +0100 Johannes Berg wrote: > > > > Right, thanks. I believe I also fixed it in the patch I sent a few days > > > ago that fixed the other documentation warning related to SAR that you > > > reported. > > > > I don't think so :-( I did a htmldocs buil

Re: [PATCH v2] af/rvu_cgx: Fix missing check bugs in rvu_cgx.c

2021-01-06 Thread Jakub Kicinski
On Tue, 5 Jan 2021 22:49:17 -0800 wangyingji...@126.com wrote: > From: Yingjie Wang > > In rvu_mbox_handler_cgx_mac_addr_get() > and rvu_mbox_handler_cgx_mac_addr_set(), > the msg is expected only from PFs that are mapped to CGX LMACs. > It should be checked before mapping, > so we add the is_cg

Re: [PATCH net-next] net: phy: replace mutex_is_locked with lockdep_assert_held in phylib

2021-01-06 Thread Heiner Kallweit
On 06.01.2021 23:39, Andrew Lunn wrote: > On Wed, Jan 06, 2021 at 02:03:40PM +0100, Heiner Kallweit wrote: >> Switch to lockdep_assert_held(_once), similar to what is being done >> in other subsystems. One advantage is that there's zero runtime >> overhead if lockdep support isn't enabled. > > Hi

[PATCH v3 net-next 10/11] mlxsw: spectrum_switchdev: remove transactional logic for VLAN objects

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean As of commit 457e20d65924 ("mlxsw: spectrum_switchdev: Avoid returning errors in commit phase"), the mlxsw driver performs the VLAN object offloading during the prepare phase. So conversion just seems to be a matter of removing the code that was running in the commit phase.

[PATCH v3 net-next 09/11] net: dsa: remove obsolete comments about switchdev transactions

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Now that all port object notifiers were converted to be non-transactional, we can remove the comments that say otherwise. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Acked-by: Linus Walleij Acked-by: Jiri Pirko --- Changes in v3: None. Changes in v2: N

[PATCH v3 net-next 11/11] net: switchdev: delete the transaction object

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Now that all users of struct switchdev_trans have been modified to do without it, we can remove this structure and the two helpers to determine the phase. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Ido Schimmel Acked-by: Linus Walleij Acke

[PATCH v3 net-next 08/11] net: dsa: remove the transactional logic from VLAN objects

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean It should be the driver's business to logically separate its VLAN offloading into a preparation and a commit phase, and some drivers don't need / can't do this. So remove the transactional shim from DSA and let drivers propagate errors directly from the .port_vlan_add callb

Re: [PATCH net-next 1/3] r8169: replace BUG_ON with WARN in _rtl_eri_write

2021-01-06 Thread Heiner Kallweit
On 06.01.2021 23:18, Alexander Duyck wrote: > On Wed, Jan 6, 2021 at 5:32 AM Heiner Kallweit wrote: >> >> Use WARN here to avoid stopping the system. In addition print the addr >> and mask values that triggered the warning. >> >> Signed-off-by: Heiner Kallweit >> --- >> drivers/net/ethernet/real

[PATCH v3 net-next 06/11] net: dsa: remove the transactional logic from ageing time notifiers

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Remove the shim introduced in DSA for offloading the bridge ageing time from switchdev, by first checking whether the ageing time is within the range limits requested by the driver. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Acked-by: Linus Walleij Acke

[PATCH v3 net-next 07/11] net: dsa: remove the transactional logic from MDB entries

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean For many drivers, the .port_mdb_prepare callback was not a good opportunity to avoid any error condition, and they would suppress errors found during the actual commit phase. Where a logical separation between the prepare and the commit phase existed, the function that used

[PATCH v3 net-next 05/11] net: switchdev: remove the transaction structure from port attributes

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Since the introduction of the switchdev API, port attributes were transmitted to drivers for offloading using a two-step transactional model, with a prepare phase that was supposed to catch all errors, and a commit phase that was supposed to never fail. Some classes of fail

[PATCH v3 net-next 04/11] net: switchdev: delete switchdev_port_obj_add_now

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean After the removal of the transactional model inside switchdev_port_obj_add_now, it has no added value and we can just call switchdev_port_obj_notify directly, bypassing this function. Let's delete it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-b

[PATCH v3 net-next 02/11] net: dsa: mv88e6xxx: deny vid 0 on the CPU port and DSA links too

2021-01-06 Thread Vladimir Oltean
mv88e6xxx apparently has a problem offloading VID 0, which the 8021q module tries to install as part of commit ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)"). That mv88e6xxx restriction seems to have been introduced by the "VTU GetNext VID-1 trick to retrieve a

[PATCH v3 net-next 03/11] net: switchdev: remove the transaction structure from port object notifiers

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Since the introduction of the switchdev API, port objects were transmitted to drivers for offloading using a two-step transactional model, with a prepare phase that was supposed to catch all errors, and a commit phase that was supposed to never fail. Some classes of failure

[PATCH v3 net-next 01/11] net: switchdev: remove vid_begin -> vid_end range from VLAN objects

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean The call path of a switchdev VLAN addition to the bridge looks something like this today: nbp_vlan_init | __br_vlan_set_default_pvid | | | | |br_afspec | | || | | |

[PATCH v3 net-next 00/11] Get rid of the switchdev transactional model

2021-01-06 Thread Vladimir Oltean
From: Vladimir Oltean Changes in v3: - Resolved a build warning in mv88e6xxx and tested that it actually works properly, which resulted in an extra patch (02/11. - Addressed Ido's minor feedback in commit 10/11 relating to a comment. Changes in v2: - Got rid of the vid_begin -> vid_end range t

Kernel panic on shutdown (qede+bond+bridge) - KASAN: use-after-free in netif_skb_features+0x90a/0x9b0

2021-01-06 Thread Igor Raits
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hello, I've been trying out the latest CentOS 8 Stream kernel and found that I get kernel panic (https://bugzilla.redhat.com/show_bug.cgi?id=1913481) when trying to reboot the server. With debug kernel I've got following: [ 531.818434] ===

Re: linux-next: build warning after merge of the origin tree

2021-01-06 Thread Johannes Berg
Hi Stephen, > > Right, thanks. I believe I also fixed it in the patch I sent a few days > > ago that fixed the other documentation warning related to SAR that you > > reported. > > I don't think so :-( I did a htmldocs build with your patch ([PATCH > v2] cfg80211/mac80211: fix kernel-doc for SAR

Re: linux-next: build warning after merge of the origin tree

2021-01-06 Thread Stephen Rothwell
Hi Johannes, On Wed, 06 Jan 2021 23:23:42 +0100 Johannes Berg wrote: > > On Thu, 2021-01-07 at 09:05 +1100, Stephen Rothwell wrote: > > Hi all, > > > > Building Linus' tree, today's linux-next build (htmldocs) produced > > this warning: > > > > include/net/mac80211.h:4200: warning: Function pa

Re: [PATCH net-next] net: phy: replace mutex_is_locked with lockdep_assert_held in phylib

2021-01-06 Thread Andrew Lunn
On Wed, Jan 06, 2021 at 02:03:40PM +0100, Heiner Kallweit wrote: > Switch to lockdep_assert_held(_once), similar to what is being done > in other subsystems. One advantage is that there's zero runtime > overhead if lockdep support isn't enabled. Hi Heiner I'm not sure we are bothered about perfor

Re: [PATCH next] net: dsa: print error on invalid port index

2021-01-06 Thread Andrew Lunn
On Wed, Jan 06, 2021 at 10:09:15AM +0100, Rafał Miłecki wrote: > From: Rafał Miłecki > > Looking for an -EINVAL all over the dsa code could take hours for > inexperienced DSA users. Following this argument, you should add dev_err() by every -EINVAL. > Signed-off-by: Rafał Miłecki Reviewed-by:

Re: linux-next: build warning after merge of the origin tree

2021-01-06 Thread Johannes Berg
Hi Stephen, On Thu, 2021-01-07 at 09:05 +1100, Stephen Rothwell wrote: > Hi all, > > Building Linus' tree, today's linux-next build (htmldocs) produced > this warning: > > include/net/mac80211.h:4200: warning: Function parameter or member > 'set_sar_specs' not described in 'ieee80211_ops' > >

[RESEND PATCH net-next v1 00/13] Generic zcopy_* functions

2021-01-06 Thread Jonathan Lemon
[resending to fix From: lines] This is set of cleanup patches for zerocopy which are intended to allow a introduction of a different zerocopy implementation. The top level API will use the skb_zcopy_*() functions, while the current TCP specific zerocopy ends up using msg_zerocopy_*() calls. Ther

Re: [PATCH net-next 1/3] r8169: replace BUG_ON with WARN in _rtl_eri_write

2021-01-06 Thread Alexander Duyck
On Wed, Jan 6, 2021 at 5:32 AM Heiner Kallweit wrote: > > Use WARN here to avoid stopping the system. In addition print the addr > and mask values that triggered the warning. > > Signed-off-by: Heiner Kallweit > --- > drivers/net/ethernet/realtek/r8169_main.c | 2 +- > 1 file changed, 1 insertio

[RESEND PATCH net-next v1 07/13] skbuff: Call sock_zerocopy_put_abort from skb_zcopy_put_abort

2021-01-06 Thread Jonathan Lemon
The sock_zerocopy_put_abort function contains logic which is specific to the current zerocopy implementation. Add a wrapper which checks the callback and dispatches apppropriately. Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 10 ++ net/core/skbuff.c | 12 +---

[RESEND PATCH net-next v1 08/13] skbuff: Call skb_zcopy_clear() before unref'ing fragments

2021-01-06 Thread Jonathan Lemon
RX zerocopy fragment pages which are not allocated from the system page pool require special handling. Give the callback in skb_zcopy_clear() a chance to process them first. Signed-off-by: Jonathan Lemon --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[RESEND PATCH net-next v1 04/13] skbuff: replace sock_zerocopy_put() with skb_zcopy_put()

2021-01-06 Thread Jonathan Lemon
Replace sock_zerocopy_put with the generic skb_zcopy_put() function. Pass 'true' as the success argument, as this is identical to no change. Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 7 ++- net/core/skbuff.c | 9 + net/ipv4/tcp.c | 2 +- 3 files changed

[RESEND PATCH net-next v1 12/13] tap/tun: add skb_zcopy_init() helper for initialization.

2021-01-06 Thread Jonathan Lemon
Replace direct assignments with skb_zcopy_init() for zerocopy cases where a new skb is initialized, without changing the reference counts. Signed-off-by: Jonathan Lemon --- drivers/net/tap.c | 3 +-- drivers/net/tun.c | 3 +-- drivers/vhost/net.c| 1 + include/linux/skbuff.h | 9 ++

[RESEND PATCH net-next v1 02/13] skbuff: simplify sock_zerocopy_put

2021-01-06 Thread Jonathan Lemon
All 'struct ubuf_info' users should have a callback defined as of commit 0a4a060bb204 ("sock: fix zerocopy_success regression with msg_zerocopy"). Remove the dead code path to consume_skb(), which makes assumptions about how the structure was allocated. Signed-off-by: Jonathan Lemon Acked-by: Wi

[RESEND PATCH net-next v1 09/13] skbuff: rename sock_zerocopy_* to msg_zerocopy_*

2021-01-06 Thread Jonathan Lemon
At Willem's suggestion, rename the sock_zerocopy_* functions so that they match the MSG_ZEROCOPY flag, which makes it clear they are specific to this zerocopy implementation. Signed-off-by: Jonathan Lemon Acked-by: Willem de Bruijn --- include/linux/skbuff.h | 16 net/core/skbu

[RESEND PATCH net-next v1 10/13] net: group skb_shinfo zerocopy related bits together.

2021-01-06 Thread Jonathan Lemon
In preparation for expanded zerocopy (TX and RX), move the zerocopy related bits out of tx_flags into their own flag word. Signed-off-by: Jonathan Lemon --- drivers/net/tap.c | 3 +-- drivers/net/tun.c | 3 +-- drivers/net/xen-netback/interface.c | 4 +-- i

[RESEND PATCH net-next v1 06/13] skbuff: Add skb parameter to the ubuf zerocopy callback

2021-01-06 Thread Jonathan Lemon
Add an optional skb parameter to the zerocopy callback parameter, which is passed down from skb_zcopy_clear(). This gives access to the original skb, which is needed for upcoming RX zero-copy error handling. Signed-off-by: Jonathan Lemon --- drivers/net/tap.c | 2 +- drivers/ne

[RESEND PATCH net-next v1 13/13] skbuff: Rename skb_zcopy_{get|put} to net_zcopy_{get|put}

2021-01-06 Thread Jonathan Lemon
Unlike the rest of the skb_zcopy_ functions, these routines operate on a 'struct ubuf', not a skb. Remove the 'skb_' prefix from the naming to make things clearer. Suggested-by: Willem de Bruijn Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 10 +- net/core/skbuff.c |

[RESEND PATCH net-next v1 01/13] skbuff: remove unused skb_zcopy_abort function

2021-01-06 Thread Jonathan Lemon
skb_zcopy_abort() has no in-tree consumers, remove it. Signed-off-by: Jonathan Lemon Acked-by: Willem de Bruijn --- include/linux/skbuff.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 333bcdc39635..3ca8d7c7b30c 100644 ---

[RESEND PATCH net-next v1 11/13] skbuff: add flags to ubuf_info for ubuf setup

2021-01-06 Thread Jonathan Lemon
Currently, when an ubuf is attached to a new skb, the shared flags word is initialized to a fixed value. Instead of doing this, set the default flags in the ubuf, and have new skbs inherit from this default. This is needed when setting up different zerocopy types. Signed-off-by: Jonathan Lemon

[RESEND PATCH net-next v1 03/13] skbuff: Push status and refcounts into sock_zerocopy_callback

2021-01-06 Thread Jonathan Lemon
Before this change, the caller of sock_zerocopy_callback would need to save the zerocopy status, decrement and check the refcount, and then call the callback function - the callback was only invoked when the refcount reached zero. Now, the caller just passes the status into the callback function,

[RESEND PATCH net-next v1 05/13] skbuff: replace sock_zerocopy_get with skb_zcopy_get

2021-01-06 Thread Jonathan Lemon
Rename the get routines for consistency. Signed-off-by: Jonathan Lemon --- include/linux/skbuff.h | 12 ++-- net/core/skbuff.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a6c86839035b..5b8a53ab51fd 100

Re: [PATCH] rxrpc: fix handling of an unsupported token type in rxrpc_read()

2021-01-06 Thread Tom Rix
On 1/6/21 1:09 PM, David Howells wrote: > Tom Rix wrote: > >> On 1/6/21 11:44 AM, David Howells wrote: >>> Tom Rix wrote: >>> These two loops iterate over the same data, i believe returning here is all that is needed. >>> But if the first loop is made to support a new type, but the se

linux-next: build warning after merge of the origin tree

2021-01-06 Thread Stephen Rothwell
Hi all, Building Linus' tree, today's linux-next build (htmldocs) produced this warning: include/net/mac80211.h:4200: warning: Function parameter or member 'set_sar_specs' not described in 'ieee80211_ops' Introduced by commit c534e093d865 ("mac80211: add ieee80211_set_sar_specs") Sorry, I m

[PATCH net-next v1 2/2] ice: remove GRO drop accounting

2021-01-06 Thread Jesse Brandeburg
The driver was counting GRO drops but now that the stack does it with the previous patch, the driver can drop all the logic. The driver keeps the dev_dbg message in order to do optional detailed tracing. This mostly undoes commit a8fffd7ae9a5 ("ice: add useful statistics"). Signed-off-by: Jesse

[PATCH net-next v1 0/2] GRO drop accounting

2021-01-06 Thread Jesse Brandeburg
Add some accounting for when the stack drops a packet that a driver tried to indicate with a gro* call. This helps users track where packets might have disappeared to and will show up in the netdevice stats that already exist. After that, remove the driver specific workaround that was added to do

[PATCH net-next v1 1/2] net: core: count drops from GRO

2021-01-06 Thread Jesse Brandeburg
When drivers call the various receive upcalls to receive an skb to the stack, sometimes that stack can drop the packet. The good news is that the return code is given to all the drivers of NET_RX_DROP or GRO_DROP. The bad news is that no drivers except the one "ice" driver that I changed, check the

Re: [PATCH net-next 0/4] udp_tunnel_nic: post conversion cleanup

2021-01-06 Thread Alexander Duyck
On Wed, Jan 6, 2021 at 1:07 PM Jakub Kicinski wrote: > > It has been two releases since we added the common infra for UDP > tunnel port offload, and we have not heard of any major issues. > Remove the old direct driver NDOs completely, and perform minor > simplifications in the tunnel drivers. > >

  1   2   3   4   >