Re: [PATCH bpf-next 1/4] bpf: introduce task_vma bpf_iter

2020-12-13 Thread Yonghong Song
On 12/11/20 6:48 PM, Song Liu wrote: Introduce task_vma bpf_iter to print memory information of a process. It can be used to print customized information similar to /proc//maps. task_vma iterator releases mmap_lock before calling the BPF program. Therefore, we cannot pass vm_area_struct direc

Re: [PATCH v2 bpf-next] bpf: increment and use correct thread iterator

2020-12-13 Thread Yonghong Song
On 12/11/20 8:30 AM, Jonathan Lemon wrote: On Wed, Dec 09, 2020 at 11:02:54AM -0800, Yonghong Song wrote: Maybe you can post v3 of the patch with the above information in the commit description so people can better understand what the problem you are trying to solve here? Also, could you a

Re: [PATCH 1/1 v3 bpf-next] bpf: increment and use correct thread iterator

2020-12-13 Thread Yonghong Song
On 12/11/20 3:01 PM, Jonathan Lemon wrote: On Fri, Dec 11, 2020 at 12:23:34PM -0800, Andrii Nakryiko wrote: @@ -164,7 +164,7 @@ task_file_seq_get_next(struct bpf_iter_seq_task_file_info *info) curr_files = get_files_struct(curr_task); if (!curr_files) {

RE: [PATCH net v2] tun: fix ubuf refcount incorrectly on error path

2020-12-13 Thread wangyunjian
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, December 14, 2020 12:07 PM > To: Willem de Bruijn > Cc: wangyunjian ; Michael S. Tsirkin > ; virtualizat...@lists.linux-foundation.org; Network > Development ; Lilijun (Jerry) > ; chenchanghu ; > xudingk

Re: [PATCH v1 net-next 05/15] nvme-tcp: Add DDP offload control path

2020-12-13 Thread Boris Pismenny
On 10/12/2020 19:15, Shai Malin wrote: > diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index > c0c33320fe65..ef96e4a02bbd 100644 > --- a/drivers/nvme/host/tcp.c > +++ b/drivers/nvme/host/tcp.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > #includ

Re: [PATCH 1/3] PCI/ASPM: Use the path max in L1 ASPM latency check

2020-12-13 Thread Bjorn Helgaas
[+cc Jesse, Tony, David, Jakub, Heiner, lists in case there's an ASPM issue with I211 or Realtek NICs. Beginning of thread: https://lore.kernel.org/r/20201024205548.1837770-1-ian.kuml...@gmail.com Short story: Ian has: Root Port --- Switch --- I211 NIC \-- multifunction

Re: [PATCH] bpf,x64: pad NOPs to make images converge more easily

2020-12-13 Thread Gary Lin
On Fri, Dec 11, 2020 at 06:24:47PM -0800, Alexei Starovoitov wrote: > On Fri, Dec 11, 2020 at 1:13 PM Daniel Borkmann wrote: > > >> + } > > >> emit_jmp: > > >> if (is_imm8(jmp_offset)) { > > >> + if (jmp_padding) > > >>

Re: [PATCH net v2] tun: fix ubuf refcount incorrectly on error path

2020-12-13 Thread Jason Wang
On 2020/12/14 上午11:56, Willem de Bruijn wrote: On Sun, Dec 13, 2020 at 10:54 PM Willem de Bruijn wrote: On Sun, Dec 13, 2020 at 10:30 PM Jason Wang wrote: On 2020/12/14 上午9:32, Willem de Bruijn wrote: On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn wrote: afterwards, the error handling

Re: [PATCH] bpf,x64: pad NOPs to make images converge more easily

2020-12-13 Thread Gary Lin
On Fri, Dec 11, 2020 at 09:05:05PM +0100, Daniel Borkmann wrote: > On 12/11/20 9:19 AM, Gary Lin wrote: > > 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: ldh [4] > >l1: jeq

Re: [PATCH net v2] tun: fix ubuf refcount incorrectly on error path

2020-12-13 Thread Willem de Bruijn
On Sun, Dec 13, 2020 at 10:54 PM Willem de Bruijn wrote: > > On Sun, Dec 13, 2020 at 10:30 PM Jason Wang wrote: > > > > > > On 2020/12/14 上午9:32, Willem de Bruijn wrote: > > > On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn > > > wrote: > > > afterwards, the error handling in vhost handle_t

Re: [PATCH net v2] tun: fix ubuf refcount incorrectly on error path

2020-12-13 Thread Willem de Bruijn
On Sun, Dec 13, 2020 at 10:30 PM Jason Wang wrote: > > > On 2020/12/14 上午9:32, Willem de Bruijn wrote: > > On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn > > wrote: > > afterwards, the error handling in vhost handle_tx() will try to > > decrease the same refcount again. This is wrong an

Re: [PATCH] bpf,x64: pad NOPs to make images converge more easily

2020-12-13 Thread Gary Lin
On Fri, Dec 11, 2020 at 12:58:17PM -0800, Andrii Nakryiko wrote: > On Fri, Dec 11, 2020 at 8:51 AM Gary Lin wrote: > > > > 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: ldh [4] > >

Re: [PATCH net v2] tun: fix ubuf refcount incorrectly on error path

2020-12-13 Thread Jason Wang
On 2020/12/14 上午9:32, Willem de Bruijn wrote: On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn wrote: afterwards, the error handling in vhost handle_tx() will try to decrease the same refcount again. This is wrong and fix this by delay copying ubuf_info until we're sure there's no errors. I

RE: [net-next v3 00/14] Add mlx5 subfunction support

2020-12-13 Thread Parav Pandit
> From: Leon Romanovsky > Sent: Sunday, December 13, 2020 5:39 PM > > On Sat, Dec 12, 2020 at 12:25:18PM -0800, Jakub Kicinski wrote: > > On Fri, 11 Dec 2020 22:12:11 -0800 Saeed Mahameed wrote: > > > Hi Dave, Jakub, Jason, > > > > > > This series form Parav was the theme of this mlx5 release c

Re: [PATCH net] vhost_net: fix high cpu load when sendmsg fails

2020-12-13 Thread Jason Wang
On 2020/12/11 下午3:37, wangyunjian wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, December 11, 2020 10:53 AM To: wangyunjian ; Michael S. Tsirkin Cc: virtualizat...@lists.linux-foundation.org; netdev@vger.kernel.org; Lilijun (Jerry) ; chenchanghu ;

Re: [PATCH net] vhost_net: fix high cpu load when sendmsg fails

2020-12-13 Thread Jason Wang
On 2020/12/11 下午3:37, wangyunjian wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, December 11, 2020 10:53 AM To: wangyunjian ; Michael S. Tsirkin Cc: virtualizat...@lists.linux-foundation.org; netdev@vger.kernel.org; Lilijun (Jerry) ; chenchanghu ;

linux-next: build failure after merge of the net-next tree

2020-12-13 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: fs/cifs/cifs_swn.c: In function 'cifs_swn_notify': fs/cifs/cifs_swn.c:450:4: error: implicit declaration of function 'nla_strlcpy'; did you mean 'nla_strscpy'? [-Werror=implicit-function-de

Re: [PATCH] net: check skb partial checksum offset after trim

2020-12-13 Thread Willem de Bruijn
On Sun, Dec 13, 2020 at 2:37 PM Vasily Averin wrote: > > On 12/13/20 2:49 AM, Willem de Bruijn wrote: > > On Sat, Dec 12, 2020 at 5:01 AM Vasily Averin wrote: > >> > >> On 12/11/20 6:37 PM, Vasily Averin wrote: > >>> It seems for me the similar problem can happen in __skb_trim_rcsum(). > >>> Also

Re: [Patch bpf-next 0/3] bpf: introduce timeout map

2020-12-13 Thread Andrey Ignatov
Cong Wang [Sat, 2020-12-12 15:18 -0800]: > On Sat, Dec 12, 2020 at 2:25 PM Cong Wang wrote: > > > > On Fri, Dec 11, 2020 at 11:55 AM Andrii Nakryiko > > wrote: > > > > > > On Fri, Dec 11, 2020 at 2:28 AM Cong Wang > > > wrote: > > > > > > > > From: Cong Wang > > > > > > > > This patchset intr

Re: [PATCH net v2] tun: fix ubuf refcount incorrectly on error path

2020-12-13 Thread Willem de Bruijn
On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn wrote: > > > > > afterwards, the error handling in vhost handle_tx() will try to > > > > decrease the same refcount again. This is wrong and fix this by delay > > > > copying ubuf_info until we're sure there's no errors. > > > > > > I think the righ

[PATCH v2] igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr

2020-12-13 Thread Kevin Lo
This patch sets the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr. Without this change it wouldn't lead to a shadow RAM write EEWR timeout. Fixes: ab4056126813 ("igc: Add NVM support") Signed-off-by: Kevin Lo --- v2: Add a Fixes tag. --- diff --git a/drivers/net/ethernet/intel/igc/ig

Re: [PATCH] igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr

2020-12-13 Thread Kevin Lo
On Sat, Dec 12, 2020 at 02:00:10PM -0800, Jakub Kicinski wrote: > > On Fri, 11 Dec 2020 22:34:56 +0800 Kevin Lo wrote: > > This patch sets the default return value to -IGC_ERR_NVM in > > igc_write_nvm_srwr. > > Without this change it wouldn't lead to a shadow RAM write EEWR timeout. > > > > Sign

Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

2020-12-13 Thread Vladimir Oltean
On Sun, Dec 13, 2020 at 10:18:27PM +0100, Tobias Waldekranz wrote: > On Sat, Dec 12, 2020 at 16:26, Vladimir Oltean wrote: > > On Fri, Dec 11, 2020 at 09:50:24PM +0100, Tobias Waldekranz wrote: > >> 2. The issue Vladimir mentioned above. This is also a straight forward > >>fix, I have patch fo

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

2020-12-13 Thread Tom Rix
On 12/13/20 3:25 PM, Joe Perches wrote: > On Sun, 2020-12-13 at 11:21 -0800, Tom Rix wrote: >> On 12/2/20 2:34 PM, Nick Desaulniers wrote: >>> On Tue, Nov 10, 2020 at 2:04 PM Joe Perches wrote: On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote: > Yeah, we could go through a

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

2020-12-13 Thread Joe Perches
On Sun, 2020-12-13 at 11:21 -0800, Tom Rix wrote: > On 12/2/20 2:34 PM, Nick Desaulniers wrote: > > On Tue, Nov 10, 2020 at 2:04 PM Joe Perches wrote: > > > On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote: > > > > > > > Yeah, we could go through and remove %h and %hh to solve this, too,

UBSAN: shift-out-of-bounds in hash_mac_create

2020-12-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:a9e26cb5 Add linux-next specific files for 20201208 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=16f0512350 kernel config: https://syzkaller.appspot.com/x/.config?x=e259434a8eaf0206 dashboard

RE: [PATCH] hv_netvsc: Validate number of allocated sub-channels

2020-12-13 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Wednesday, November 18, 2020 7:33 AM > > Lack of validation could lead to out-of-bound reads and information > leaks (cf. usage of nvdev->chan_table[]). Check that the number of > allocated sub-channels fits into the expected range. > > Suggested-by: Saruha

[PATCH] net: korina: remove busy skb free

2020-12-13 Thread Vincent Stehlé
The ndo_start_xmit() method must not attempt to free the skb to transmit when returning NETDEV_TX_BUSY. Fix the korina_send_packet() function accordingly. Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") Signed-off-by: Vincent Stehlé Cc: David S. Miller Cc: Jakub Kicinsk

Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

2020-12-13 Thread Tobias Waldekranz
On Sat, Dec 12, 2020 at 16:26, Vladimir Oltean wrote: > On Fri, Dec 11, 2020 at 09:50:24PM +0100, Tobias Waldekranz wrote: >> 2. The issue Vladimir mentioned above. This is also a straight forward >>fix, I have patch for tag_dsa, making sure that offload_fwd_mark is >>never set for ports i

[PATCH v3] Allow UDP cmsghdrs through io_uring

2020-12-13 Thread Victor Stewart
--- net/ipv4/af_inet.c | 1 + net/ipv6/af_inet6.c | 1 + net/socket.c| 8 +--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index b7260c8cef2e..c9fd5e7cfd6e 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1052,6 +1

[PATCH v3] Allow UDP cmsghdrs through io_uring

2020-12-13 Thread Victor Stewart
here we go, figured it out. sorry about that. This patch adds PROTO_CMSG_DATA_ONLY to inet_dgram_ops and inet6_dgram_ops so that UDP_SEGMENT (GSO) and UDP_GRO can be used through io_uring. GSO and GRO are vital to bring QUIC servers on par with TCP throughputs, and together offer a higher throu

Re: [PATCH] allow UDP cmsghdrs through io_uring

2020-12-13 Thread Victor Stewart
the header didn't come through on my email, but i see it in the archive. almost got this git send-email thing working lol. the patch got a different subject line for some reason. On Sun, Dec 13, 2020 at 8:31 PM Victor Stewart wrote: > > --- > net/ipv4/af_inet.c | 1 + > net/ipv6/af_inet6.c | 1

[PATCH v2] Allow UDP cmsghdrs through io_uring

2020-12-13 Thread Victor Stewart
This patch adds PROTO_CMSG_DATA_ONLY to inet_dgram_ops and inet6_dgram_ops so that UDP_SEGMENT (GSO) and UDP_GRO can be used through io_uring. GSO and GRO are vital to bring QUIC servers on par with TCP throughputs, and together offer a higher throughput gain than io_uring alone (rate of data tr

[PATCH] allow UDP cmsghdrs through io_uring

2020-12-13 Thread Victor Stewart
--- net/ipv4/af_inet.c | 1 + net/ipv6/af_inet6.c | 1 + net/socket.c| 8 +--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index b7260c8cef2e..c9fd5e7cfd6e 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1052,6 +1

Re: [PATCH 0/3] PROTO_CMSG_DATA_ONLY for Datagram (UDP)

2020-12-13 Thread Victor Stewart
FYI for anyone who happens upon this... for gmail you have to first turn on 2-factor authentication then generate a custom app password for this to work. then use that password, all the rest the same. On Sat, Dec 12, 2020 at 9:44 PM Jens Axboe wrote: > > On 12/12/20 2:42 PM, Victor Stewart wrote

Re: [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK

2020-12-13 Thread Matthias Urlichs
Miguel Ojeda wrote: I think we can fix them as they come. If your change to a function breaks its callers, it's your job to fix the callers proactively instead of waiting for "as they come" bug reports. (Assuming, of course, that you know about the breakage. Which you do when you tell us tha

Re: [PATCH] net: check skb partial checksum offset after trim

2020-12-13 Thread Vasily Averin
On 12/13/20 2:49 AM, Willem de Bruijn wrote: > On Sat, Dec 12, 2020 at 5:01 AM Vasily Averin wrote: >> >> On 12/11/20 6:37 PM, Vasily Averin wrote: >>> It seems for me the similar problem can happen in __skb_trim_rcsum(). >>> Also I doubt that that skb_checksum_start_offset(skb) checks in >>> __sk

Re: [PATCH net-next v2] GTP: add support for flow based tunneling API

2020-12-13 Thread Pravin Shelar
On Sat, Dec 12, 2020 at 11:56 PM Jonas Bonn wrote: > > Hi Pravin, > > I've been thinking a bit about this and find it more and more > interesting. Could you post a bit of information about the ip-route > changes you'll make in order to support GTP LWT encapsulation? Could > you provide an exampl

[PATCH net-next v3] GTP: add support for flow based tunneling API

2020-12-13 Thread Pravin B Shelar
Following patch add support for flow based tunneling API to send and recv GTP tunnel packet over tunnel metadata API. This would allow this device integration with OVS or eBPF using flow based tunneling APIs. Signed-off-by: Pravin B Shelar --- v2-v3: - Fixed coding style - changed IFLA_GTP_FD1

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

2020-12-13 Thread Tom Rix
On 12/2/20 2:34 PM, Nick Desaulniers wrote: > On Tue, Nov 10, 2020 at 2:04 PM Joe Perches wrote: >> On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote: >> >>> Yeah, we could go through and remove %h and %hh to solve this, too, right? >> Yup. >> >> I think one of the checkpatch improvement

Re: [PATCH net-next] sfc: backport XDP EV queue sharing from the out-of-tree driver

2020-12-13 Thread Ivan Babrou
On Sun, Dec 13, 2020 at 4:23 AM Martin Habets wrote: > > On Thu, Dec 10, 2020 at 04:18:53PM -0800, Ivan Babrou wrote: > > Queue sharing behaviour already exists in the out-of-tree sfc driver, > > available under xdp_alloc_tx_resources module parameter. > > This comment is not relevant for in-tree

Re: [PATCH v1 net-next 02/15] net: Introduce direct data placement tcp offload

2020-12-13 Thread Boris Pismenny
On 11/12/2020 20:45, Jakub Kicinski wrote: > On Thu, 10 Dec 2020 19:43:57 -0700 David Ahern wrote: >> On 12/10/20 7:01 PM, Jakub Kicinski wrote: >>> On Wed, 9 Dec 2020 21:26:05 -0700 David Ahern wrote: Yes, TCP is a byte stream, so the packets could very well show up like this:

Re: [PATCH net-next v2 08/12] gtp: set dev features to enable GSO

2020-12-13 Thread Pravin Shelar
On Fri, Dec 11, 2020 at 11:50 PM Jonas Bonn wrote: > > > > On 12/12/2020 06:31, Pravin Shelar wrote: > > On Fri, Dec 11, 2020 at 4:28 AM Jonas Bonn wrote: > >> > >> Signed-off-by: Jonas Bonn > >> --- > >> drivers/net/gtp.c | 8 +++- > >> 1 file changed, 7 insertions(+), 1 deletion(-) > >>

Re: [PATCH v1 net-next 02/15] net: Introduce direct data placement tcp offload

2020-12-13 Thread Boris Pismenny
On 10/12/2020 6:26, David Ahern wrote: > On 12/9/20 1:15 AM, Boris Pismenny wrote: >> On 09/12/2020 2:38, David Ahern wrote: [...] >> >> There is more to this than TCP zerocopy that exists in userspace or >> inside the kernel. First, please note that the patches include support for >> CRC offload a

Re: [PATCH net-next v2] GTP: add support for flow based tunneling API

2020-12-13 Thread Pravin Shelar
On Sat, Dec 12, 2020 at 2:11 PM Jakub Kicinski wrote: > > On Fri, 11 Dec 2020 20:40:17 -0800 Pravin B Shelar wrote: > > Following patch add support for flow based tunneling API > > to send and recv GTP tunnel packet over tunnel metadata API. > > This would allow this device integration with OVS or

Re: [PATCH RFC v2 1/5] dt-bindings: net: dwmac-meson: use picoseconds for the RGMII RX delay

2020-12-13 Thread Martin Blumenstingl
Hi Rob, On Mon, Dec 7, 2020 at 8:17 PM Rob Herring wrote: > > On Sun, Nov 15, 2020 at 07:52:06PM +0100, Martin Blumenstingl wrote: > > Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX > > delay register which allows picoseconds precision. Deprecate the old > > "amlogic,rx-delay

Re: [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK

2020-12-13 Thread Miguel Ojeda
On Sun, Dec 13, 2020 at 4:38 PM 'Matthias Urlichs' via Clang Built Linux wrote: > > If your change to a function breaks its callers, it's your job to fix No function has changed. This patch enables a warning (that for some reason is an error in the case of Guenter). Even if this was a hard error

INFO: task hung in netdev_run_todo (2)

2020-12-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:7575fdda Merge tag 'platform-drivers-x86-v5.9-2' of git://.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1110b33f90 kernel config: https://syzkaller.appspot.com/x/.config?x=c06bcf3cc963d91c das

Re: [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK

2020-12-13 Thread Miguel Ojeda
On Sun, Dec 13, 2020 at 4:16 PM Greg KH wrote: > > Because if you get a report of something breaking for your change, you > need to work to resolve it, not argue about it. Otherwise it needs to > be dropped/reverted. Nobody has argued that. In fact, I explicitly said the opposite: "So I think we

Re: [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK

2020-12-13 Thread Greg KH
On Sun, Dec 13, 2020 at 03:58:20PM +0100, Miguel Ojeda wrote: > > The key here is "if nobody complains". I would argue that it is _your_ > > responsibility to do those builds, and not the reponsibility of others > > to do it for you. > > Testing allmodconfig for a popular architecture, agreed, it

Re: [PATCH v3 net-next 1/7] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Vladimir Oltean
Hi Ido, On Sun, Dec 13, 2020 at 04:55:43PM +0200, Ido Schimmel wrote: > > As far as the switchdev driver is concerned, all that it needs to ensure > > is that traffic between Station A and Station B is not forever broken. > > If it does nothing, then the stale rule to send frames for Station B > >

Re: [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK

2020-12-13 Thread Miguel Ojeda
On Sun, Dec 13, 2020 at 1:55 PM Guenter Roeck wrote: > > Witz komm raus, Du bist umzingelt. Please, explain this reference. :-) > The key here is "if nobody complains". I would argue that it is _your_ > responsibility to do those builds, and not the reponsibility of others > to do it for you. T

Re: [PATCH v3 net-next 1/7] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Ido Schimmel
On Sun, Dec 13, 2020 at 04:07:04PM +0200, Vladimir Oltean wrote: > Currently the bridge emits atomic switchdev notifications for > dynamically learnt FDB entries. Monitoring these notifications works > wonders for switchdev drivers that want to keep their hardware FDB in > sync with the bridge's FD

memory leak in xskq_create

2020-12-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:a68a0262 mm/madvise: remove racy mm ownership check git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=165b941350 kernel config: https://syzkaller.appspot.com/x/.config?x=4305fa9ea70c7a9f dashboard li

[PATCH net V3] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-12-13 Thread Tariq Toukan
With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Fixes: 2342a8512a1e ("net: Add TLS TX offload features") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- Documentation/networking/tls-offload.rst | 8 +++- net/core/dev

[PATCH ethtool] ethtool: do_sset return correct value on fail

2020-12-13 Thread Tariq Toukan
From: Roy Novich The return value for do_sset was constant and returned 0. This value is misleading when returned on operation failure. Changed return value to the correct function err status. Fixes: 32c8037055f5 ("Initial import of ethtool version 3 + a few patches.") Signed-off-by: Roy Novich

[PATCH v3 net-next 4/7] net: dsa: move switchdev event implementation under the same switch/case statement

2020-12-13 Thread Vladimir Oltean
We'll need to start listening to SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE events even for interfaces where dsa_slave_dev_check returns false, so we need that check inside the switch-case statement for SWITCHDEV_FDB_*. This movement also avoids a useless allocation / free of switchdev_work on the untreate

[PATCH v3 net-next 2/7] net: dsa: be louder when a non-legacy FDB operation fails

2020-12-13 Thread Vladimir Oltean
The dev_close() call was added in commit c9eb3e0f8701 ("net: dsa: Add support for learning FDB through notification") "to indicate inconsistent situation" when we could not delete an FDB entry from the port. bridge fdb del d8:58:d7:00:ca:6d dev swp0 self master It is a bit drastic and at the same

[PATCH v3 net-next 5/7] net: dsa: exit early in dsa_slave_switchdev_event if we can't program the FDB

2020-12-13 Thread Vladimir Oltean
Right now, the following would happen for a switch driver that does not implement .port_fdb_add or .port_fdb_del. dsa_slave_switchdev_event returns NOTIFY_OK and schedules: -> dsa_slave_switchdev_event_work -> dsa_port_fdb_add -> dsa_port_notify(DSA_NOTIFIER_FDB_ADD) -> dsa_switc

[PATCH v3 net-next 7/7] net: dsa: ocelot: request DSA to fix up lack of address learning on CPU port

2020-12-13 Thread Vladimir Oltean
Given the following setup: ip link add br0 type bridge ip link set eno0 master br0 ip link set swp0 master br0 ip link set swp1 master br0 ip link set swp2 master br0 ip link set swp3 master br0 Currently, packets received on a DSA slave interface (such as swp0) which should be routed by the soft

[PATCH v3 net-next 6/7] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-12-13 Thread Vladimir Oltean
Some DSA switches (and not only) cannot learn source MAC addresses from packets injected from the CPU. They only perform hardware address learning from inbound traffic. This can be problematic when we have a bridge spanning some DSA switch ports and some non-DSA ports (which we'll call "foreign in

[PATCH v3 net-next 3/7] net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work

2020-12-13 Thread Vladimir Oltean
Currently DSA doesn't add FDB entries on the CPU port, because it only does so through switchdev, which is associated with a net_device, and there are none of those for the CPU port. But actually FDB addresses on the CPU port have some use cases of their own, if the switchdev operations are initia

[PATCH v3 net-next 1/7] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Vladimir Oltean
Currently the bridge emits atomic switchdev notifications for dynamically learnt FDB entries. Monitoring these notifications works wonders for switchdev drivers that want to keep their hardware FDB in sync with the bridge's FDB. For example station A wants to talk to station B in the diagram below

[PATCH v3 net-next 0/7] Offload software learnt bridge addresses to DSA

2020-12-13 Thread Vladimir Oltean
This series tries to make DSA behave a bit more sanely when bridged with "foreign" (non-DSA) interfaces and source address learning is not supported on the hardware CPU port (which would make things work more seamlessly without software intervention). When a station A connected to a DSA switch port

Re: [PATCH v2 net-next 1/6] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Nikolay Aleksandrov
On 13/12/2020 15:55, Vladimir Oltean wrote: > Hi Nik, > > On Sun, Dec 13, 2020 at 03:22:16PM +0200, Nikolay Aleksandrov wrote: >> Hi Vladimir, >> Thank you for the good explanation, it really helps a lot to understand the >> issue. >> Even though it's deceptively simple, that call adds another lo

Re: [PATCH net-next] net: Limit logical shift left of TCP probe0 timeout

2020-12-13 Thread Cambda Zhu
> On Dec 13, 2020, at 06:32, Jakub Kicinski wrote: > > On Tue, 8 Dec 2020 17:19:10 +0800 Cambda Zhu wrote: >> For each TCP zero window probe, the icsk_backoff is increased by one and >> its max value is tcp_retries2. If tcp_retries2 is greater than 63, the >> probe0 timeout shift may exceed it

Re: [PATCH v2 net-next 1/6] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Vladimir Oltean
Hi Nik, On Sun, Dec 13, 2020 at 03:22:16PM +0200, Nikolay Aleksandrov wrote: > Hi Vladimir, > Thank you for the good explanation, it really helps a lot to understand the > issue. > Even though it's deceptively simple, that call adds another lock/unlock for > everyone > when moving or learning (d

Re: [PATCH v2 net-next 1/6] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Vladimir Oltean
On Sun, Dec 13, 2020 at 03:36:13PM +0200, Nikolay Aleksandrov wrote: > Nevermind the whole comment. :) I was looking at the wrong code and got > confused. > > All is well (thanks to Ido). > > Acked-by: Nikolay Aleksandrov Ok, thanks. By the way, which wrong code were you looking at?

Re: [PATCH v2 net-next 1/6] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Nikolay Aleksandrov
On 13/12/2020 15:22, Nikolay Aleksandrov wrote: > On 13/12/2020 04:40, Vladimir Oltean wrote: >> Currently the bridge emits atomic switchdev notifications for >> dynamically learnt FDB entries. Monitoring these notifications works >> wonders for switchdev drivers that want to keep their hardware FD

Re: [PATCH v2 net-next 1/6] net: bridge: notify switchdev of disappearance of old FDB entry upon migration

2020-12-13 Thread Nikolay Aleksandrov
On 13/12/2020 04:40, Vladimir Oltean wrote: > Currently the bridge emits atomic switchdev notifications for > dynamically learnt FDB entries. Monitoring these notifications works > wonders for switchdev drivers that want to keep their hardware FDB in > sync with the bridge's FDB. > > For example s

Re: [PATCH v3] Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK

2020-12-13 Thread Guenter Roeck
On 12/12/20 9:04 PM, Miguel Ojeda wrote: > On Sat, Dec 12, 2020 at 5:18 PM Guenter Roeck wrote: >> >> This patch results in: >> >> arch/sh/kernel/cpu/sh4a/smp-shx3.c: In function 'shx3_prepare_cpus': >> arch/sh/kernel/cpu/sh4a/smp-shx3.c:76:3: error: ignoring return value of >> 'request_irq' decl

Re: [PATCH net-next] net/mlx5: Fix compilation warning for 32-bit platform

2020-12-13 Thread Leon Romanovsky
On Sun, Dec 13, 2020 at 02:06:41PM +0200, Leon Romanovsky wrote: > From: Parav Pandit > > MLX5_GENERAL_OBJECT_TYPES types bitfield is 64-bit field. > > Defining an enum for such bit fields on 32-bit platform results in below > warning. > > ./include/vdso/bits.h:7:26: warning: left shift count >= w

Re: [PATCH net-next] sfc: backport XDP EV queue sharing from the out-of-tree driver

2020-12-13 Thread Martin Habets
On Thu, Dec 10, 2020 at 04:18:53PM -0800, Ivan Babrou wrote: > Queue sharing behaviour already exists in the out-of-tree sfc driver, > available under xdp_alloc_tx_resources module parameter. This comment is not relevant for in-tree patches. I'd also like to make clear that we never intend to upst

Re: [net-next v3 00/14] Add mlx5 subfunction support

2020-12-13 Thread Leon Romanovsky
On Sat, Dec 12, 2020 at 12:25:18PM -0800, Jakub Kicinski wrote: > On Fri, 11 Dec 2020 22:12:11 -0800 Saeed Mahameed wrote: > > Hi Dave, Jakub, Jason, > > > > This series form Parav was the theme of this mlx5 release cycle, > > we've been waiting anxiously for the auxbus infrastructure to make it in

[PATCH net-next] net/mlx5: Fix compilation warning for 32-bit platform

2020-12-13 Thread Leon Romanovsky
From: Parav Pandit MLX5_GENERAL_OBJECT_TYPES types bitfield is 64-bit field. Defining an enum for such bit fields on 32-bit platform results in below warning. ./include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow] ^ ./include/li

[PATCH net-next 0/5] bnxt_en: Improve firmware flashing.

2020-12-13 Thread Michael Chan
This patchset improves firmware flashing in 2 ways: - If firmware returns NO_SPACE error during flashing, the driver will create the UPDATE directory with more staging area and retry. - Instead of allocating a big DMA buffer for the entire contents of the firmware package size, fallback to a small

[PATCH net-next 3/5] bnxt_en: Restructure bnxt_flash_package_from_fw_obj() to execute in a loop.

2020-12-13 Thread Michael Chan
From: Pavan Chebbi On NICs with a smaller NVRAM, FW installation may fail after multiple updates due to fragmentation. The driver can retry when FW returns a special error code. To faciliate the retry, we restructure the logic that performs the flashing in a loop. The actual retry logic will b

[PATCH net-next 1/5] bnxt_en: Refactor bnxt_flash_nvram.

2020-12-13 Thread Michael Chan
From: Pavan Chebbi Refactor bnxt_flash_nvram() into __bnxt_flash_nvram() that takes an additional dir_item_len parameter. The new function will be used in subsequent patches with the dir_item_len parameter set to create the UPDATE directory during flashing. Signed-off-by: Pavan Chebbi Signed-o

[PATCH net-next 2/5] bnxt_en: Rearrange the logic in bnxt_flash_package_from_fw_obj().

2020-12-13 Thread Michael Chan
This function will be modified in the next patch to retry flashing the firmware in a loop. To facilate that, we rearrange the code so that the steps that only need to be done once before the loop will be moved to the top of the function. Signed-off-by: Michael Chan --- .../net/ethernet/broadcom

[PATCH net-next 4/5] bnxt_en: Retry installing FW package under NO_SPACE error condition.

2020-12-13 Thread Michael Chan
From: Pavan Chebbi In bnxt_flash_package_from_fw_obj(), if firmware returns the NO_SPACE error, call __bnxt_flash_nvram() to create the UPDATE directory and then loop back and retry one more time. Since the first try may fail, we use the silent version to send the firmware commands. Reviewed-by

[PATCH net-next 5/5] bnxt_en: Enable batch mode when using HWRM_NVM_MODIFY to flash packages.

2020-12-13 Thread Michael Chan
The current scheme allocates a DMA buffer as big as the requested firmware package file and DMAs the contents to firmware in one operation. The buffer size can be several hundred kilo bytes and the driver may not be able to allocate the memory. This will cause firmware upgrade to fail. Improve t

[PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-13 Thread Christophe JAILLET
In case of error after calling 'ocelot_init()', it must be undone by a corresponding 'ocelot_deinit()' call, as already done in the remove function. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/mscc/ocelot_vsc7514

Re: [patch 23/30] net/mlx5: Use effective interrupt affinity

2020-12-13 Thread Tariq Toukan
On 12/10/2020 9:25 PM, Thomas Gleixner wrote: Using the interrupt affinity mask for checking locality is not really working well on architectures which support effective affinity masks. The affinity mask is either the system wide default or set by user space, but the architecture can or even

Re: [patch 22/30] net/mlx5: Replace irq_to_desc() abuse

2020-12-13 Thread Tariq Toukan
On 12/10/2020 9:25 PM, Thomas Gleixner wrote: No driver has any business with the internals of an interrupt descriptor. Storing a pointer to it just to use yet another helper at the actual usage site to retrieve the affinity mask is creative at best. Just because C does not allow encapsulation

Re: [patch 21/30] net/mlx4: Use effective interrupt affinity

2020-12-13 Thread Tariq Toukan
On 12/10/2020 9:25 PM, Thomas Gleixner wrote: Using the interrupt affinity mask for checking locality is not really working well on architectures which support effective affinity masks. The affinity mask is either the system wide default or set by user space, but the architecture can or even

Re: [patch 20/30] net/mlx4: Replace irq_to_desc() abuse

2020-12-13 Thread Tariq Toukan
On 12/10/2020 9:25 PM, Thomas Gleixner wrote: No driver has any business with the internals of an interrupt descriptor. Storing a pointer to it just to use yet another helper at the actual usage site to retrieve the affinity mask is creative at best. Just because C does not allow encapsulation

UBSAN: shift-out-of-bounds in strset_parse_request

2020-12-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:a9e26cb5 Add linux-next specific files for 20201208 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1752cf1750 kernel config: https://syzkaller.appspot.com/x/.config?x=e259434a8eaf0206 dashboard

[PATCH net-next] nfc: s3fwrn5: Remove the delay for nfc sleep

2020-12-13 Thread Bongsu Jeon
From: Bongsu Jeon remove the delay for nfc sleep because nfc doesn't need the sleep delay. Signed-off-by: Bongsu Jeon --- drivers/nfc/s3fwrn5/phy_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nfc/s3fwrn5/phy_common.c b/drivers/nfc/s3fwrn5/phy_common.c i

[PATCH net-next] nfc: s3fwrn5: Release the nfc firmware

2020-12-13 Thread Bongsu Jeon
From: Bongsu Jeon add the code to release the nfc firmware when the firmware image size is wrong. Signed-off-by: Bongsu Jeon --- drivers/nfc/s3fwrn5/firmware.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nfc/s3fwrn5/firmware.c b/drivers/nfc/s3fwrn5/firmware.c

Re: [PATCH 1/1] net: Fix use of proc_fs

2020-12-13 Thread Yonatan Linik
On Sat, Dec 12, 2020 at 11:51 PM Jakub Kicinski wrote: > > On Sat, 12 Dec 2020 23:39:20 +0200 Yonatan Linik wrote: > > On Sat, Dec 12, 2020 at 9:48 PM Jakub Kicinski wrote: > > > > > > On Fri, 11 Dec 2020 18:37:49 +0200 Yonatan Linik wrote: > > > > proc_fs was used, in af_packet, without a surrou

Re: [PATCH v3 0/7] Improve s0ix flows for systems i219LM

2020-12-13 Thread Neftin, Sasha
On 12/10/2020 07:28, Neftin, Sasha wrote: On 12/10/2020 04:24, Alexander Duyck wrote: On Wed, Dec 9, 2020 at 6:44 AM Hans de Goede wrote: Hi, On 12/8/20 5:14 PM, Alexander Duyck wrote: On Tue, Dec 8, 2020 at 1:30 AM Hans de Goede wrote: Hi, On 12/8/20 6:08 AM, Neftin, Sasha wrote: On 1