Re: [PATCH net v3] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Cong Wang
On Mon, Sep 23, 2019 at 10:04 PM Vinicius Costa Gomes wrote: > > When removing a cbs instance when offloading is enabled, the crash > below can be observed. > > The problem happens because that when offloading is enabled, the cbs > instance is not added to the list. > > Also, the current code does

[PATCH net v3] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Vinicius Costa Gomes
When removing a cbs instance when offloading is enabled, the crash below can be observed. The problem happens because that when offloading is enabled, the cbs instance is not added to the list. Also, the current code doesn't handle correctly the case when offload is disabled without removing the

Re: [PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Vinicius Costa Gomes
Hi, Cong Wang writes: > On Mon, Sep 23, 2019 at 5:14 PM Vinicius Costa Gomes > wrote: >> @@ -417,12 +421,6 @@ static int cbs_init(struct Qdisc *sch, struct nlattr >> *opt, >> if (err) >> return err; >> >> - if (!q->offload) { >> - spin_lock(&cbs_list

Re: [PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Cong Wang
On Mon, Sep 23, 2019 at 5:14 PM Vinicius Costa Gomes wrote: > @@ -417,12 +421,6 @@ static int cbs_init(struct Qdisc *sch, struct nlattr > *opt, > if (err) > return err; > > - if (!q->offload) { > - spin_lock(&cbs_list_lock); > - list_add(&

[PATCH v2] r8152: Use guard clause and fix comment typos

2019-09-23 Thread Prashant Malani
Use a guard clause in tx_bottom() to reduce the indentation of the do-while loop. Also, fix a couple of spelling and grammatical mistakes in the r8152_csum_workaround() function comment. Change-Id: I460befde150ad92248fd85b0f189ec2df2ab8431 Signed-off-by: Prashant Malani Reviewed-by: Grant Grundl

RE: [PATCH] r8152: Use guard clause and fix comment typos

2019-09-23 Thread Hayes Wang
Prashant Malani [mailto:pmal...@chromium.org] > Sent: Tuesday, September 24, 2019 6:27 AM > To: Hayes Wang [...] > - do { > + while (1) { > struct tx_agg *agg; > + struct net_device *netdev = tp->netdev; > > if (skb_queue_empty(&tp->tx_queue)) >

Re: [PATCH V2 net 1/1] net/tls(TLS_SW): Fix list_del double free caused by a race condition in tls_tx_records

2019-09-23 Thread Jakub Kicinski
On Sat, 21 Sep 2019 23:19:20 -0400, Pooja Trivedi wrote: > On Wed, Sep 18, 2019 at 5:45 PM Jakub Kicinski wrote: > > On Wed, 18 Sep 2019 17:37:44 -0400, Pooja Trivedi wrote: > > > Hi Jakub, > > > > > > I have explained one potential way for the race to happen in my > > > original message to the n

[PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Vinicius Costa Gomes
When removing a cbs instance when offloading is enabled, the crash below can be observed. The problem happens because that when offloading is enabled, the cbs instance is not added to the list. Also, the current code doesn't handle correctly the case when offload is disabled without removing the

Re: [RFC PATCH bpf-next v2 1/2] bpf: adding map batch processing support

2019-09-23 Thread Brian Vazquez
Hi Yonghong, thanks for working on this! I have some concerns about this implementation but overall I think this might work for our use case too! On Sun, Sep 8, 2019 at 1:11 AM Yonghong Song wrote: > > Brian Vazquez has proposed BPF_MAP_DUMP command to look up more than one > map entries per sys

[PATCH] r8152: Use guard clause and fix comment typos

2019-09-23 Thread Prashant Malani
Use a guard clause in tx_bottom() to reduce the indentation of the do-while loop. In doing so, convert the do-while to a while to make the guard clause checks consistent. Also, fix a couple of spelling and grammatical mistakes in the r8152_csum_workaround() function comment. Change-Id: I460befde1

[PATCH v2 net] net: sched: fix possible crash in tcf_action_destroy()

2019-09-23 Thread Eric Dumazet
If the allocation done in tcf_exts_init() failed, we end up with a NULL pointer in exts->actions. kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PREEMPT SMP KASAN CPU: 1 PID: 8198 Comm: syz-executor.3 Not tainted 5.3.0-rc8+ #0 Hardware name:

[linux-firmware][pull request] ice: Add package file for Intel E800 series driver

2019-09-23 Thread Jeff Kirsher
From: Tony Nguyen The ice driver must load a package file to the firmware to utilize full functionality; add the package file to /lib/firmware/intel/ice/ddp. Also add a symlink, ice.pkg, so the driver can refer to the package by a consistent name. Signed-off-by: Tony Nguyen Tested-by: Andrew Bo

Re: [PATCH net] net: sched: fix possible crash in tcf_action_destroy()

2019-09-23 Thread Cong Wang
On Mon, Sep 23, 2019 at 8:44 AM Eric Dumazet wrote: > > > > On 9/21/19 7:08 PM, Jakub Kicinski wrote: > > On Wed, 18 Sep 2019 14:37:21 -0700, Cong Wang wrote: > >> On Wed, Sep 18, 2019 at 12:57 PM 'Eric Dumazet' via syzkaller > >> wrote: > >>> > >>> If the allocation done in tcf_exts_init() faile

Re: DSA driver kernel extension for dsa mv88e6190 switch

2019-09-23 Thread Andrew Lunn
> We have the configuration problem with the Marvell 88E6190 switch. > What the our problem is... Is the switch is NOT configured with the > EEPROM (24C512), which does not exist on the board. That is pretty normal. If there is a EEPROM, i generally recommend it is left empty. We want Linux to con

Re: CONFIG_NET_TC_SKB_EXT

2019-09-23 Thread Marcelo Ricardo Leitner
On Sun, Sep 22, 2019 at 02:47:15PM -0700, Jakub Kicinski wrote: > On Sun, 22 Sep 2019 14:51:44 +0300, Paul Blakey wrote: ... > > > > > > Subject: [PATCH net-next] net/sched: Set default of CONFIG_NET_TC_SKB_EXT > > to N > > > > This a

[PATCH bpf v2] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-23 Thread Stanislav Fomichev
This is the same problem I found earlier in test_sockopt_inherit: there is a race between server thread doing accept() and client thread doing connect(). Let's explicitly synchronize them via pthread conditional variable. v2: * don't exit from server_thread without signaling condvar, fixes possi

DSA driver kernel extension for dsa mv88e6190 switch

2019-09-23 Thread Zoran Stojsavljevic
Hello Community, We have interesting problem to solve using our HW platform. And I hope somebody has the similar example, and some patches, which need to be applied to the kernel (directory .../drivers/net/dsa/) to make this application to work. We have the configuration problem with the Marvell

Re: CONFIG_NET_TC_SKB_EXT

2019-09-23 Thread Edward Cree
On 23/09/2019 17:56, Paul Blakey wrote: > Even following this approach in tc only is challenging for some > scenarios, consider the following tc rules: > > tc filter add dev1 ... chain 0 flower action goto chain 1 > tc filter add dev1 ... chain 0 flower action goto chain 1 > tc filter add dev1 .

Re: CONFIG_NET_TC_SKB_EXT

2019-09-23 Thread Paul Blakey
On 9/23/2019 12:47 AM, Jakub Kicinski wrote: > On Sun, 22 Sep 2019 14:51:44 +0300, Paul Blakey wrote: >> The skb extension is currently used for miss path of software offloading OvS >> rules with recirculation to tc. >> However, we are also preparing patches to support the hardware side of >> th

Re: [PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-23 Thread Andrii Nakryiko
On Mon, Sep 23, 2019 at 8:38 AM Stanislav Fomichev wrote: > > On 09/22, Andrii Nakryiko wrote: > > On Sun, Sep 22, 2019 at 12:10 PM Stanislav Fomichev wrote: > > > > > > This is the same problem I found earlier in test_sockopt_inherit: > > > there is a race between server thread doing accept() an

Re: [PATCH net] sch_netem: fix a divide by zero in tabledist()

2019-09-23 Thread Eric Dumazet
On Mon, Sep 23, 2019 at 8:53 AM Eric Dumazet wrote: > > > > On 9/20/19 7:15 PM, Jakub Kicinski wrote: > > On Wed, 18 Sep 2019 08:05:39 -0700, Eric Dumazet wrote: > >> syzbot managed to crash the kernel in tabledist() loading > >> an empty distribution table. > >> > >> t = dist->table[rnd % di

[PATCH trivial 1/2] net: Fix Kconfig indentation

2019-09-23 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- net/batman-adv/Kconfig | 10 +-- net/ife/Kconfig| 2 +- net/ipv4/Kconfig | 4 +- ne

Re: [PATCH net] sch_netem: fix a divide by zero in tabledist()

2019-09-23 Thread Eric Dumazet
On 9/20/19 7:15 PM, Jakub Kicinski wrote: > On Wed, 18 Sep 2019 08:05:39 -0700, Eric Dumazet wrote: >> syzbot managed to crash the kernel in tabledist() loading >> an empty distribution table. >> >> t = dist->table[rnd % dist->size]; >> >> Simply return an error when such load is attempted.

Re: [PATCH 4.19-stable 0/7] mlx5 checksum fixes for 4.19

2019-09-23 Thread David Miller
From: Saeed Mahameed Date: Mon, 23 Sep 2019 12:39:57 + > This series includes some upstream patches aimed to fix multiple checksum > issues with mlx5 driver in 4.19-stable kernels. > > Since the patches didn't apply cleanly to 4.19 back when they were > submitted for the first time around 5.

Re: [PATCH net] net: sched: fix possible crash in tcf_action_destroy()

2019-09-23 Thread Eric Dumazet
On 9/21/19 7:08 PM, Jakub Kicinski wrote: > On Wed, 18 Sep 2019 14:37:21 -0700, Cong Wang wrote: >> On Wed, Sep 18, 2019 at 12:57 PM 'Eric Dumazet' via syzkaller >> wrote: >>> >>> If the allocation done in tcf_exts_init() failed, >>> we end up with a NULL pointer in exts->actions. >> ... >>>

Re: € 2,000,000-00 EUR

2019-09-23 Thread Herr Richard Wahl
Lieber Freund, Ich bin Herr Richard Wahl der Mega-Gewinner von $ 533M In Mega Millions Jackpot spende ich an 5 zufällige Personen, wenn Sie diese E-Mail erhalten, dann wurde Ihre E-Mail nach einem Spinball ausgewählt. Ich habe den größten Teil meines Vermögens auf eine Reihe von Wohltätigkeitso

Re: [PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-23 Thread Stanislav Fomichev
On 09/22, Andrii Nakryiko wrote: > On Sun, Sep 22, 2019 at 12:10 PM Stanislav Fomichev wrote: > > > > This is the same problem I found earlier in test_sockopt_inherit: > > there is a race between server thread doing accept() and client > > thread doing connect(). Let's explicitly synchronize them

Re: dsa traffic priorization

2019-09-23 Thread Florian Fainelli
On 9/23/2019 5:56 AM, Jan Lübbe wrote: > Adding TC maintainers... (we're trying to find a mainline-acceptable > way to configure and offload strict port-based priorities in the > context of DSA/switchdev). > > On Thu, 2019-09-19 at 10:12 -0700, Florian Fainelli wrote: >> On 9/19/19 1:44 AM, Sas

Re: [PATCH net v3] net/sched: cls_api: Fix nooffloaddevcnt counter when indr block call success

2019-09-23 Thread wenxu
在 2019/9/23 17:42, John Hurley 写道: > On Mon, Sep 23, 2019 at 5:20 AM wenxu wrote: >> Hi John & Jakub >> >> There are some limitations for indirect tc callback work with skip_sw ? >> > Hi Wenxu, > This is not really a limitation. > As Or points out, indirect block offload is not supposed to work

Re: [PATCH RFC 5/5] udp: Support UDP fraglist GRO/GSO.

2019-09-23 Thread Willem de Bruijn
On Fri, Sep 20, 2019 at 12:49 AM Steffen Klassert wrote: > > This patch extends UDP GRO to support fraglist GRO/GSO > by using the previously introduced infrastructure. > All UDP packets that are not targeted to a GRO capable > UDP sockets are going to fraglist GRO now (local input > and forward).

Re: dsa traffic priorization

2019-09-23 Thread Jan Lübbe
Adding TC maintainers... (we're trying to find a mainline-acceptable way to configure and offload strict port-based priorities in the context of DSA/switchdev). On Thu, 2019-09-19 at 10:12 -0700, Florian Fainelli wrote: > On 9/19/19 1:44 AM, Sascha Hauer wrote: > > On Wed, Sep 18, 2019 at 10:41:58

Re: [PATCH RFC 1/5] UDP: enable GRO by default.

2019-09-23 Thread Willem de Bruijn
On Mon, Sep 23, 2019 at 8:53 AM Willem de Bruijn wrote: > > On Fri, Sep 20, 2019 at 12:49 AM Steffen Klassert > wrote: > > > > This patch enables UDP GRO regardless if a GRO capable > > socket is present. With this GRO is done by default > > for the local input and forwarding path. > > > > Signed

Re: [PATCH RFC 1/5] UDP: enable GRO by default.

2019-09-23 Thread Willem de Bruijn
On Fri, Sep 20, 2019 at 12:49 AM Steffen Klassert wrote: > > This patch enables UDP GRO regardless if a GRO capable > socket is present. With this GRO is done by default > for the local input and forwarding path. > > Signed-off-by: Steffen Klassert > struct sk_buff *__udp_gso_segment(struct sk_b

[PATCH 4.19-stable 6/7] net/mlx5e: Rx, Fixup skb checksum for packets with tail padding

2019-09-23 Thread Saeed Mahameed
[ Upstream commit 0aa1d18615c163f92935b806dcaff9157645233a ] When an ethernet frame with ip payload is padded, the padding octets are not covered by the hardware checksum. Prior to the cited commit, skb checksum was forced to be CHECKSUM_NONE when padding is detected. After it, the kernel will tr

[PATCH 4.19-stable 5/7] net/mlx5e: XDP, Avoid checksum complete when XDP prog is loaded

2019-09-23 Thread Saeed Mahameed
[ Upstream commit 5d0bb3bac4b9f6c22280b04545626fdfd99edc6b ] XDP programs might change packets data contents which will make the reported skb checksum (checksum complete) invalid. When XDP programs are loaded/unloaded set/clear rx RQs MLX5E_RQ_STATE_NO_CSUM_COMPLETE flag. Fixes: 86994156c736 ("n

[PATCH 4.19-stable 7/7] net/mlx5e: Rx, Check ip headers sanity

2019-09-23 Thread Saeed Mahameed
[ Upstream commit 0318a7b7fcad9765931146efa7ca3a034194737c ] In the two places is_last_ethertype_ip is being called, the caller will be looking inside the ip header, to be safe, add ip{4,6} header sanity check. And return true only on valid ip headers, i.e: the whole header is contained in the lin

[PATCH 4.19-stable 4/7] net/mlx5e: Allow reporting of checksum unnecessary

2019-09-23 Thread Saeed Mahameed
From: Or Gerlitz [ Upstream commit b856df28f9230a47669efbdd57896084caadb2b3 ] Currently we practically never report checksum unnecessary, because for all IP packets we take the checksum complete path. Enable non-default runs with reprorting checksum unnecessary, using an ethtool private flag. T

[PATCH 4.19-stable 2/7] net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP packets

2019-09-23 Thread Saeed Mahameed
From: Alaa Hleihel [ Upstream commit fe1dc069990c1f290ef6b99adb46332c03258f38 ] CHECKSUM_COMPLETE is not applicable to SCTP protocol. Setting it for SCTP packets leads to CRC32c validation failure. Fixes: bbceefce9adf ("net/mlx5e: Support RX CHECKSUM_COMPLETE") Signed-off-by: Alaa Hleihel Revi

[PATCH 4.19-stable 3/7] mlx5: fix get_ip_proto()

2019-09-23 Thread Saeed Mahameed
From: Cong Wang [ Upstream commit ef6fcd455278c2be3032a346cc66d9dd9866b787 ] IP header is not necessarily located right after struct ethhdr, there could be multiple 802.1Q headers in between, this is why we call __vlan_get_protocol(). Fixes: fe1dc069990c ("net/mlx5e: don't set CHECKSUM_COMPLETE

[PATCH 4.19-stable 1/7] net/mlx5e: Set ECN for received packets using CQE indication

2019-09-23 Thread Saeed Mahameed
From: Natali Shechtman [ Upstream commit f007c13d4ad62f494c83897eda96437005df4a91 ] In multi-host (MH) NIC scheme, a single HW port serves multiple hosts or sockets on the same host. The HW uses a mechanism in the PCIe buffer which monitors the amount of consumed PCIe buffers per host. On a cert

[PATCH 4.19-stable 0/7] mlx5 checksum fixes for 4.19

2019-09-23 Thread Saeed Mahameed
Hi Greg, This series includes some upstream patches aimed to fix multiple checksum issues with mlx5 driver in 4.19-stable kernels. Since the patches didn't apply cleanly to 4.19 back when they were submitted for the first time around 5.1 kernel release to the netdev mailing list, i couldn't mark

Re: [PATCH RFC 3/5] net: Add a netdev software feature set that defaults to off.

2019-09-23 Thread Willem de Bruijn
On Fri, Sep 20, 2019 at 12:49 AM Steffen Klassert wrote: > > The previous patch added the NETIF_F_GRO_FRAGLIST feature. > This is a software feature that should default to off. > Current software features default to on, so add a new > feature set that defaults to off. > > Signed-off-by: Steffen Kl

Re: [PATCH v2 2/2][ethtool] ethtool: implement support for Energy Detect Power Down

2019-09-23 Thread Andrew Lunn
On Fri, Sep 20, 2019 at 12:44:31PM +0300, Alexandru Ardelean wrote: > This change adds control for enabling/disabling Energy Detect Power Down > mode, as well as configuring wake-up intervals for TX pulses, via the new > ETHTOOL_PHY_EDPD control added in PHY tunable, in the kernel. > > Signed-off-

Re: [PATCHv1] net: macb: Remove dead code

2019-09-23 Thread Claudiu.Beznea
On 23.09.2019 11:33, shubhrajyoti.da...@gmail.com wrote: > From: Shubhrajyoti Datta > > macb_64b_desc is always called when HW_DMA_CAP_64B is defined. > So the return NULL can never be reached. Remove the dead code. > > Signed-off-by: Shubhrajyoti Datta Reviewed-by: Claudiu Beznea > --- >

Re: [PATCH] arcnet: provide a buffer big enough to actually receive packets

2019-09-23 Thread Michael Grzeschik
On Fri, Sep 20, 2019 at 04:08:21PM +0200, Uwe Kleine-König wrote: > struct archdr is only big enough to hold the header of various types of > arcnet packets. So to provide enough space to hold the data read from > hardware provide a buffer large enough to hold a packet with maximal > size. > > The

Re: [PATCH net-next] net: stmmac: Fix page pool size

2019-09-23 Thread Thierry Reding
On Mon, Sep 23, 2019 at 11:59:15AM +0200, Thierry Reding wrote: > From: Thierry Reding > > The size of individual pages in the page pool in given by an order. The > order is the binary logarithm of the number of pages that make up one of > the pages in the pool. However, the driver currently pass

[PATCH net-next] net: stmmac: Fix page pool size

2019-09-23 Thread Thierry Reding
From: Thierry Reding The size of individual pages in the page pool in given by an order. The order is the binary logarithm of the number of pages that make up one of the pages in the pool. However, the driver currently passes the number of pages rather than the order, so it ends up wasting quite

Re: [PATCH net v3] net/sched: cls_api: Fix nooffloaddevcnt counter when indr block call success

2019-09-23 Thread John Hurley
On Mon, Sep 23, 2019 at 5:20 AM wenxu wrote: > > Hi John & Jakub > > There are some limitations for indirect tc callback work with skip_sw ? > Hi Wenxu, This is not really a limitation. As Or points out, indirect block offload is not supposed to work with skip_sw. Indirect offload allows us to h

[PATCH net] macsec: drop skb sk before calling gro_cells_receive

2019-09-23 Thread Xin Long
Fei Liu reported a crash when doing netperf on a topo of macsec dev over veth: [ 448.919128] refcount_t: underflow; use-after-free. [ 449.090460] Call trace: [ 449.092895] refcount_sub_and_test+0xb4/0xc0 [ 449.097155] tcp_wfree+0x2c/0x150 [ 449.100460] ip_rcv+0x1d4/0x3a8 [ 449

Re: [PATCH net] net/rds: Check laddr_check before calling it

2019-09-23 Thread David Miller
From: Ka-Cheong Poon Date: Tue, 17 Sep 2019 08:29:18 -0700 > In rds_bind(), laddr_check is called without checking if it is NULL or > not. And rs_transport should be reset if rds_add_bound() fails. > > Reported-by: syzbot+fae39afd2101a17ec...@syzkaller.appspotmail.com > Signed-off-by: Ka-Cheong

[PATCHv1] net: macb: Remove dead code

2019-09-23 Thread shubhrajyoti . datta
From: Shubhrajyoti Datta macb_64b_desc is always called when HW_DMA_CAP_64B is defined. So the return NULL can never be reached. Remove the dead code. Signed-off-by: Shubhrajyoti Datta --- drivers/net/ethernet/cadence/macb_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[RFC PATCH] net: macb: Remove dead code

2019-09-23 Thread Shubhrajyoti Datta
macb_64b_desc is always called when HW_DMA_CAP_64B is defined. So the return NULL can never be reached. Remove the dead code. Signed-off-by: Shubhrajyoti Datta --- drivers/net/ethernet/cadence/macb_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethern

RE: [PATCH] net: stmmac: Fix page pool size

2019-09-23 Thread Jose Abreu
From: Jakub Kicinski Date: Sep/22/2019, 23:31:32 (UTC+00:00) > On Fri, 20 Sep 2019 19:01:27 +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > The size of individual pages in the page pool in given by an order. The > > order is the binary logarithm of the number of pages that make up