Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net 1/2] geneve: should not call rt6_lookup() when ipv6 was disabled
From: kbuild test robot @ 2019-02-07  0:55 UTC (permalink / raw)
  To: Hangbin Liu; +Cc: kbuild-all, netdev, Stefano Brivio, David Miller, Hangbin Liu
In-Reply-To: <20190206125111.5286-2-liuhangbin@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4504 bytes --]

Hi Hangbin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Hangbin-Liu/fix-two-kernel-panics-when-disabled-IPv6-on-boot-up/20190207-071954
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   drivers/net/geneve.c: In function 'geneve_link_config':
>> drivers/net/geneve.c:1519:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      struct rt6_info *rt = rt6_lookup(geneve->net,
      ^~~~~~

vim +1519 drivers/net/geneve.c

abe492b4f5 Tom Herbert    2015-12-10  1490  
c40e89fd35 Alexey Kodanev 2018-04-19  1491  static void geneve_link_config(struct net_device *dev,
c40e89fd35 Alexey Kodanev 2018-04-19  1492  			       struct ip_tunnel_info *info, struct nlattr *tb[])
c40e89fd35 Alexey Kodanev 2018-04-19  1493  {
c40e89fd35 Alexey Kodanev 2018-04-19  1494  	struct geneve_dev *geneve = netdev_priv(dev);
c40e89fd35 Alexey Kodanev 2018-04-19  1495  	int ldev_mtu = 0;
c40e89fd35 Alexey Kodanev 2018-04-19  1496  
c40e89fd35 Alexey Kodanev 2018-04-19  1497  	if (tb[IFLA_MTU]) {
c40e89fd35 Alexey Kodanev 2018-04-19  1498  		geneve_change_mtu(dev, nla_get_u32(tb[IFLA_MTU]));
c40e89fd35 Alexey Kodanev 2018-04-19  1499  		return;
c40e89fd35 Alexey Kodanev 2018-04-19  1500  	}
c40e89fd35 Alexey Kodanev 2018-04-19  1501  
c40e89fd35 Alexey Kodanev 2018-04-19  1502  	switch (ip_tunnel_info_af(info)) {
c40e89fd35 Alexey Kodanev 2018-04-19  1503  	case AF_INET: {
c40e89fd35 Alexey Kodanev 2018-04-19  1504  		struct flowi4 fl4 = { .daddr = info->key.u.ipv4.dst };
c40e89fd35 Alexey Kodanev 2018-04-19  1505  		struct rtable *rt = ip_route_output_key(geneve->net, &fl4);
c40e89fd35 Alexey Kodanev 2018-04-19  1506  
c40e89fd35 Alexey Kodanev 2018-04-19  1507  		if (!IS_ERR(rt) && rt->dst.dev) {
c40e89fd35 Alexey Kodanev 2018-04-19  1508  			ldev_mtu = rt->dst.dev->mtu - GENEVE_IPV4_HLEN;
c40e89fd35 Alexey Kodanev 2018-04-19  1509  			ip_rt_put(rt);
c40e89fd35 Alexey Kodanev 2018-04-19  1510  		}
c40e89fd35 Alexey Kodanev 2018-04-19  1511  		break;
c40e89fd35 Alexey Kodanev 2018-04-19  1512  	}
c40e89fd35 Alexey Kodanev 2018-04-19  1513  #if IS_ENABLED(CONFIG_IPV6)
c40e89fd35 Alexey Kodanev 2018-04-19  1514  	case AF_INET6: {
55e942d018 Hangbin Liu    2019-02-06  1515  		struct inet6_dev *idev = in6_dev_get(dev);
55e942d018 Hangbin Liu    2019-02-06  1516  		if (!idev)
55e942d018 Hangbin Liu    2019-02-06  1517  			break;
55e942d018 Hangbin Liu    2019-02-06  1518  
c40e89fd35 Alexey Kodanev 2018-04-19 @1519  		struct rt6_info *rt = rt6_lookup(geneve->net,
c40e89fd35 Alexey Kodanev 2018-04-19  1520  						 &info->key.u.ipv6.dst, NULL, 0,
c40e89fd35 Alexey Kodanev 2018-04-19  1521  						 NULL, 0);
c40e89fd35 Alexey Kodanev 2018-04-19  1522  
c40e89fd35 Alexey Kodanev 2018-04-19  1523  		if (rt && rt->dst.dev)
c40e89fd35 Alexey Kodanev 2018-04-19  1524  			ldev_mtu = rt->dst.dev->mtu - GENEVE_IPV6_HLEN;
c40e89fd35 Alexey Kodanev 2018-04-19  1525  		ip6_rt_put(rt);
55e942d018 Hangbin Liu    2019-02-06  1526  
55e942d018 Hangbin Liu    2019-02-06  1527  		in6_dev_put(idev);
c40e89fd35 Alexey Kodanev 2018-04-19  1528  		break;
c40e89fd35 Alexey Kodanev 2018-04-19  1529  	}
c40e89fd35 Alexey Kodanev 2018-04-19  1530  #endif
c40e89fd35 Alexey Kodanev 2018-04-19  1531  	}
c40e89fd35 Alexey Kodanev 2018-04-19  1532  
c40e89fd35 Alexey Kodanev 2018-04-19  1533  	if (ldev_mtu <= 0)
c40e89fd35 Alexey Kodanev 2018-04-19  1534  		return;
c40e89fd35 Alexey Kodanev 2018-04-19  1535  
c40e89fd35 Alexey Kodanev 2018-04-19  1536  	geneve_change_mtu(dev, ldev_mtu - info->options_len);
c40e89fd35 Alexey Kodanev 2018-04-19  1537  }
c40e89fd35 Alexey Kodanev 2018-04-19  1538  

:::::: The code at line 1519 was first introduced by commit
:::::: c40e89fd358e94a55d6c1475afbea17b5580f601 geneve: configure MTU based on a lower device

:::::: TO: Alexey Kodanev <alexey.kodanev@oracle.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12117 bytes --]

^ permalink raw reply

* Re: [Patch net-next v2] mlx5: use RCU lock in mlx5_eq_cq_get()
From: Saeed Mahameed @ 2019-02-07  0:56 UTC (permalink / raw)
  To: Cong Wang
  Cc: Eric Dumazet, Linux Kernel Network Developers, Saeed Mahameed,
	Tariq Toukan
In-Reply-To: <CAM_iQpVF-71uQtybZLqLDWZQS=JxjD_23fAjxyfy7oLBzw-BoA@mail.gmail.com>

On Wed, Feb 6, 2019 at 4:53 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
>
> On Wed, Feb 6, 2019 at 4:28 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >
> >
> >
> > On 02/06/2019 04:04 PM, Cong Wang wrote:
> >
> > > synchronize_irq() is called before mlx5_cq_put(), so I don't
> > > see why readers could get 0 refcnt.
> >
> > Then the more reasons to get rid of the refcount increment/decrement completely ...
> >
> > Technically, even the rcu_read_lock() and rcu_read_unlock() are not needed,
> > since synchronize_irq() is enough.
>
> Excellent point.
>
> For the refcnt, I am afraid we still have to hold refcnt for the tasklet,
> mlx5_cq_tasklet_cb. But yeah, should be safe to remove from IRQ
> path.

the tasklet path is for rdma CQs only, netdev cqs handling will be refcnt free.

^ permalink raw reply

* Re: pull-request: bpf-next 2019-02-07
From: David Miller @ 2019-02-07  0:56 UTC (permalink / raw)
  To: daniel; +Cc: ast, netdev, bpf
In-Reply-To: <20190207004230.29010-1-daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Thu,  7 Feb 2019 01:42:30 +0100

> The following pull-request contains BPF updates for your *net-next* tree.
> 
> The main changes are:
> 
> 1) Add a riscv64 JIT for BPF, from Björn.

Awesome.

> 2) Implement BTF deduplication algorithm for libbpf which takes BTF type
>    information containing duplicate per-compilation unit information and
>    reduces it to an equivalent set of BTF types with no duplication and
>    without loss of information, from Andrii.
> 
> 3) Offloaded and native BPF XDP programs can coexist today, enable also
>    offloaded and generic ones as well, from Jakub.
> 
> 4) Expose various BTF related helper functions in libbpf as API which
>    are in particular helpful for JITed programs, from Yonghong.
> 
> 5) Fix the recently added JMP32 code emission in s390x JIT, from Heiko.
> 
> 6) Fix BPF kselftests' tcp_{server,client}.py to be able to run inside
>    a network namespace, also add a fix for libbpf to get libbpf_print()
>    working, from Stanislav.
> 
> 7) Fixes for bpftool documentation, from Prashant.
> 
> 8) Type cleanup in BPF kselftests' test_maps.c to silence a gcc8 warning,
>    from Breno.
> 
> Please consider pulling these changes from:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Pulled, thanks Daniel.

I'll push this back out after my build tests complete.

^ permalink raw reply

* Re: [net-next][PATCH 0/5] rds: add tos support
From: David Miller @ 2019-02-07  1:01 UTC (permalink / raw)
  To: santosh.shilimkar; +Cc: netdev, yanjun.zhu
In-Reply-To: <1549325089-16572-1-git-send-email-santosh.shilimkar@oracle.com>

From: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Date: Mon,  4 Feb 2019 16:04:44 -0800

> RDS applications make use of tos to classify database traffic.
> This feature has been used in shipping products from 2.6.32 based
> kernels. Its tied with RDS v4.1 protocol version and the compatibility
> gets negotiated as part of connections setup.
 ...
> Patchset is also available on below git tree.
> 
> The following changes since commit cc7335786f7278d66bdcf96d3d411edfcb01be51:
> 
>   socket: fix for Add SO_TIMESTAMP[NS]_NEW (2019-02-03 20:36:11 -0800)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git for_net-next-5.1/rds-tos-v4

Pulled, thanks.

^ permalink raw reply

* Re: [ISSUE][4.20.6] mlx5 and checksum failures
From: Saeed Mahameed @ 2019-02-07  1:00 UTC (permalink / raw)
  To: Ian Kumlien
  Cc: Cong Wang, David Miller, Saeed Mahameed,
	Linux Kernel Network Developers
In-Reply-To: <CAA85sZup2UHbCX1KZ5bJNv=f=aoXrTz_0sjDUQ0fRRfU+fVSeA@mail.gmail.com>

On Wed, Feb 6, 2019 at 3:00 PM Ian Kumlien <ian.kumlien@gmail.com> wrote:
>
> On Wed, Feb 6, 2019 at 11:49 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
> >
> > On Wed, Feb 6, 2019 at 2:41 PM Ian Kumlien <ian.kumlien@gmail.com> wrote:
> > >
> > > On Wed, Feb 6, 2019 at 11:38 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
> > > > On Wed, Feb 6, 2019 at 2:15 PM Ian Kumlien <ian.kumlien@gmail.com> wrote:
> > > > > Could we please schedule this for 4.19 and 4.20 - it's kinda breaking things
> > > >
> > > > It doesn't break anything, packets are _not_ dropped, only that the
> > > > warning itself is noisy.
> > >
> > > Not my experience, to me it slows the machine down and looses packets,
> > > I don't however know
> > > if this is the only culprit
> >
> > The packet process could be slow down because of printing
> > out this kernel warning. Packet should be still delivered to upper
> > stack, at least I didn't see any packet drops because of this.
>
> I have several machines pushing the same errors currently, while on this
> one I was logged in on the serial console and not over ssh like the others.
>
> On the other machines, typing is slow, looses characters and drops the
> connection
>
> But, again, I don't know if this is the only culprit, it sure does
> fill dmesg though =)
> (which suddenly takes minutes to show over a 100gig connection)
>
> > > You can actually see it on ping where it start out with 0.0xyx and
> > > ends up at ~10ms
> >
> > I don't understand how it could affect ICMP, it is purely TCP
> > from my point of view, even the stack trace from you says so. ;)
>
> It changes directly after the first hw checksum failure, I don't know why =/

weird, Maybe a real check-summing issue/corruption on the PCI ?!

can you try turning off checksum offloads
ethtool -K ethX  rx off

^ permalink raw reply

* Re: [PATCH net v5 1/2] net/mlx5e: Update hw flows when encap source mac changed
From: David Miller @ 2019-02-07  1:11 UTC (permalink / raw)
  To: gerlitz.or; +Cc: xiangxia.m.yue, netdev, hadarh, saeedm
In-Reply-To: <CAJ3xEMgb0MnO8O2_0cQQkjmwe2PcjXb5PeOexRPfejpsyX98zg@mail.gmail.com>

From: Or Gerlitz <gerlitz.or@gmail.com>
Date: Tue, 5 Feb 2019 11:03:01 +0200

> Dave, I see a copy of the patch on patchworks [1] with status being
> not applicable, what is missing here? the patch should apply AFAIK.
> There was also another patch reviewed here by me and Saeed [2], not
> sure where it stands from your side.
> 
> [1] https://patchwork.ozlabs.org/patch/1023844/
> [2] https://marc.info/?l=linux-netdev&m=154878514916414&w=2

More precisely, it's marked "Awaiting Upstream" which means I for some reason
expected Saeed to send it to me in his next pull request.

I'll apply these now.

^ permalink raw reply

* Re: [PATCH net-next v3] net: dsa: mv88e6xxx: Prevent suspend to RAM
From: David Miller @ 2019-02-07  1:16 UTC (permalink / raw)
  To: miquel.raynal
  Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel,
	thomas.petazzoni, gregory.clement, antoine.tenart,
	maxime.chevallier, nadavh
In-Reply-To: <20190205110728.11451-1-miquel.raynal@bootlin.com>

From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: Tue,  5 Feb 2019 12:07:28 +0100

> On one hand, the mv88e6xxx driver has a work queue called in loop
> which will attempt register accesses after MDIO bus suspension, that
> entirely freezes the platform during suspend.
> 
> On the other hand, the DSA core is not ready yet to support suspend to
> RAM operation because so far there is no way to recover reliably the
> switch configuration.
> 
> To avoid the kernel to freeze when suspending with a switch driven by
> the mv88e6xxx driver, we choose to prevent the driver suspension and
> in the same way, the whole platform.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Applied to net-next, thanks.

^ permalink raw reply

* Re: [PATCH v3 net-next 00/11] Devlink health reporting and recovery system
From: David Miller @ 2019-02-07  1:21 UTC (permalink / raw)
  To: eranbe; +Cc: netdev, saeedm, jiri, moshe, ayal
In-Reply-To: <1549368532-17089-1-git-send-email-eranbe@mellanox.com>


This no longer applies cleanly to net-next, please respin.

Thank you.

^ permalink raw reply

* Re: [net-next, PATCH] net: stmmac: fix ptp timestamping on Rx on gmac4
From: David Miller @ 2019-02-07  1:28 UTC (permalink / raw)
  To: ilias.apalodimas
  Cc: alexandre.torgue, peppe.cavallaro, mcoquelin.stm32, netdev,
	joabreu
In-Reply-To: <1549368920-1989-1-git-send-email-ilias.apalodimas@linaro.org>

From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Date: Tue,  5 Feb 2019 14:15:20 +0200

> The current driver only enables Pdelay_Req and Pdelay_Resp when
> HWTSTAMP_FILTER_PTP_V2_EVENT, HWTSTAMP_FILTER_PTP_V1_L4_EVENT or
> HWTSTAMP_FILTER_PTP_V2_L4_EVENT is requested. This results in ptp sync on
> slave mode to report 'received SYNC without timestamp' when using ptp4l.
> 
> Although the hardware can support Sync, Pdelay_Req and Pdelay_resp by
> setting bit14 annd bits 17/16 to 01 this leaves Delay_Req timestamps out.
> 
> Fix this by enabling all event and general messages timestamps.
> This includes SYNC, Follow_Up, Delay_Req, Delay_Resp, Pdelay_Req,
> Pdelay_Resp and Pdelay_Resp_Follow_Up messages.
> 
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Applied to net-next, thanks.

^ permalink raw reply

* Re: [PATCH 1/2] net: phylink: update mac_config() documentation
From: David Miller @ 2019-02-07  1:30 UTC (permalink / raw)
  To: rmk+kernel; +Cc: linux-doc, netdev
In-Reply-To: <E1gr371-0007eK-Gd@rmk-PC.armlinux.org.uk>


These two patches do not apply cleanly to net nor net-next.

Please send me something that does apply, and please always
clearly indicate which tree your changes are targetting.

^ permalink raw reply

* Re: [PATCH net] net: defxx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:42 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, macro, yang.wei9
In-Reply-To: <1549382464-5138-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:01:04 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in dfx_xmt_done() when skb
> xmit done. It makes drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: tulip: de2104x: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:42 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, linux-parisc, yang.wei9
In-Reply-To: <1549382631-5211-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:03:51 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in de_tx() when skb xmit
> done. It makes drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: dscc4: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:42 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, romieu, yang.wei9
In-Reply-To: <1549382823-5298-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:07:03 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in dscc4_tx_irq() when skb
> xmit done. It makes drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: smsc: epic100: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:42 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, colin.king, yang.wei9
In-Reply-To: <1549382981-5372-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:09:41 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in epic_tx() when skb xmit
> done. It makes drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: fec_mpc52xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:42 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, yang.wei9
In-Reply-To: <1549383124-5443-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:12:04 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in mpc52xx_fec_tx_interrupt()
> when skb xmit done. It makes drop profiles(dropwatch, perf) more
> friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: fsl_ucc_hdlc: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:43 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, linuxppc-dev, qiang.zhao, yang.wei9
In-Reply-To: <1549383291-5511-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:14:51 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in hdlc_tx_done() when skb
> xmit done. It makes drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: sun: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:43 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, yanjun.zhu, shannon.nelson, robh, yang.wei9
In-Reply-To: <1549383584-5605-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:19:44 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called when skb xmit done. It makes
> drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: tehuti: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:43 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, andy, yang.wei9
In-Reply-To: <1549383691-5672-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:21:31 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in bdx_tx_cleanup() when skb
> xmit done. It makes drop profiles(dropwatch, perf) more friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: via-velocity: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:43 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, romieu, yang.wei9
In-Reply-To: <1549383774-5726-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:22:54 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in velocity_free_tx_buf()
> when skb xmit done. It makes drop profiles(dropwatch, perf) more
> friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: broadcom: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: David Miller @ 2019-02-07  1:43 UTC (permalink / raw)
  To: albin_yang; +Cc: netdev, f.fainelli, andrew, yang.wei9
In-Reply-To: <1549383954-5843-1-git-send-email-albin_yang@163.com>

From: Yang Wei <albin_yang@163.com>
Date: Wed,  6 Feb 2019 00:25:54 +0800

> From: Yang Wei <yang.wei9@zte.com.cn>
> 
> dev_consume_skb_irq() should be called in sbdma_tx_process() when
> skb xmit done. It makes drop profiles(dropwatch, perf) more
> friendly.
> 
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: sun: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
From: Yanjun Zhu @ 2019-02-07  1:51 UTC (permalink / raw)
  To: Yang Wei, netdev; +Cc: davem, shannon.nelson, robh, yang.wei9
In-Reply-To: <1549383584-5605-1-git-send-email-albin_yang@163.com>


On 2019/2/6 0:19, Yang Wei wrote:
> From: Yang Wei <yang.wei9@zte.com.cn>
>
> dev_consume_skb_irq() should be called when skb xmit done. It makes
> drop profiles(dropwatch, perf) more friendly.

Thanks a lot. I am OK.

Zhu Yanjun

>
> Signed-off-by: Yang Wei <yang.wei9@zte.com.cn>
> ---
>   drivers/net/ethernet/sun/cassini.c | 2 +-
>   drivers/net/ethernet/sun/sunbmac.c | 2 +-
>   drivers/net/ethernet/sun/sunhme.c  | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
> index 7ec4eb7..6fc05c1 100644
> --- a/drivers/net/ethernet/sun/cassini.c
> +++ b/drivers/net/ethernet/sun/cassini.c
> @@ -1898,7 +1898,7 @@ static inline void cas_tx_ringN(struct cas *cp, int ring, int limit)
>   		cp->net_stats[ring].tx_packets++;
>   		cp->net_stats[ring].tx_bytes += skb->len;
>   		spin_unlock(&cp->stat_lock[ring]);
> -		dev_kfree_skb_irq(skb);
> +		dev_consume_skb_irq(skb);
>   	}
>   	cp->tx_old[ring] = entry;
>   
> diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c
> index 720b7ac..e9b757b 100644
> --- a/drivers/net/ethernet/sun/sunbmac.c
> +++ b/drivers/net/ethernet/sun/sunbmac.c
> @@ -781,7 +781,7 @@ static void bigmac_tx(struct bigmac *bp)
>   
>   		DTX(("skb(%p) ", skb));
>   		bp->tx_skbs[elem] = NULL;
> -		dev_kfree_skb_irq(skb);
> +		dev_consume_skb_irq(skb);
>   
>   		elem = NEXT_TX(elem);
>   	}
> diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
> index ff641cf..d007dfe 100644
> --- a/drivers/net/ethernet/sun/sunhme.c
> +++ b/drivers/net/ethernet/sun/sunhme.c
> @@ -1962,7 +1962,7 @@ static void happy_meal_tx(struct happy_meal *hp)
>   			this = &txbase[elem];
>   		}
>   
> -		dev_kfree_skb_irq(skb);
> +		dev_consume_skb_irq(skb);
>   		dev->stats.tx_packets++;
>   	}
>   	hp->tx_old = elem;

^ permalink raw reply

* Re: Waiting for vrf to become free on rmmod of bridge...
From: David Ahern @ 2019-02-07  1:50 UTC (permalink / raw)
  To: Ben Greear, netdev
In-Reply-To: <cc2ceb6c-3d31-b19e-0e26-3e8689ff651e@candelatech.com>

On 2/6/19 3:20 PM, Ben Greear wrote:
> Hello,
> 
> I just saw this warning on a system running a hacked 4.20.2+ kernel. 
> Any known bugs
> of this nature in this (upstream) kernel?  The command that is blocked is:
> 'rmmod bridge llc'
> 
> [17069.299135] unregister_netdevice: waiting for _vrf13 to become free.
> Usage count = 1
> [17079.306438] unregister_netdevice: waiting for _vrf13 to become free.
> Usage count = 1
> [17089.314656] unregister_netdevice: waiting for _vrf13 to become free.
> Usage count = 1
> [17099.322870] unregister_netdevice: waiting for _vrf13 to become free.
> Usage count = 1
> 
> Thanks,
> Ben
> 

No known refcount issues with vrf.

I use namespaces for testing which creates devices, adds routes, runs
traffic and deletes the device and namespace. That series in the tests
has been known to trigger refcount problems in the past.

^ permalink raw reply

* ipmr: ip6mr: Create new sockopt to clear mfc cache only
From: Callum Sinclair @ 2019-02-07  2:08 UTC (permalink / raw)
  To: davem, kuznet, yoshfuji, nikolay, netdev, linux-kernel; +Cc: Callum Sinclair

Created a way to clear the multicast forwarding cache on a socket
without having to either remove the entries manually using the delete
entry socket option or destroy and recreate the multicast socket.

Using the flags MRT_FLUSH_ENTRIES and MRT_FLUSH_VIFS, all multicast
entries can be cleared, all multicast interfaces can be closed or both
can be cleared using one sockopt call.

Patch Set 2:
  - Fix Compile Errors

Patch Set 3:
  - Fix Style Errors

Patch Set 4:
  - Implemented a way to clear the entries or vifs based off an input flag.


Callum Sinclair (1):
  ipmr: ip6mr: Create new sockopt to clear mfc cache only

 include/uapi/linux/mroute.h  |  7 +++-
 include/uapi/linux/mroute6.h |  7 +++-
 net/ipv4/ipmr.c              | 69 +++++++++++++++++++++-------------
 net/ipv6/ip6mr.c             | 73 ++++++++++++++++++++++--------------
 4 files changed, 99 insertions(+), 57 deletions(-)

-- 
2.20.1


^ permalink raw reply

* [PATCH] ipmr: ip6mr: Create new sockopt to clear mfc cache only
From: Callum Sinclair @ 2019-02-07  2:08 UTC (permalink / raw)
  To: davem, kuznet, yoshfuji, nikolay, netdev, linux-kernel; +Cc: Callum Sinclair
In-Reply-To: <20190207020828.21854-1-callum.sinclair@alliedtelesis.co.nz>

Currently the only way to clear the mfc cache was to delete the entries
one by one using the MRT_DEL_MFC socket option or to destroy and
recreate the socket.

Create a new socket option which will clear the multicast forwarding
cache on the socket without destroying the socket.

Signed-off-by: Callum Sinclair <callum.sinclair@alliedtelesis.co.nz>
---
 include/uapi/linux/mroute.h  |  7 +++-
 include/uapi/linux/mroute6.h |  7 +++-
 net/ipv4/ipmr.c              | 69 +++++++++++++++++++++-------------
 net/ipv6/ip6mr.c             | 73 ++++++++++++++++++++++--------------
 4 files changed, 99 insertions(+), 57 deletions(-)

diff --git a/include/uapi/linux/mroute.h b/include/uapi/linux/mroute.h
index 5d37a9ccce63..2d475edc3ec3 100644
--- a/include/uapi/linux/mroute.h
+++ b/include/uapi/linux/mroute.h
@@ -28,12 +28,17 @@
 #define MRT_TABLE	(MRT_BASE+9)	/* Specify mroute table ID		*/
 #define MRT_ADD_MFC_PROXY	(MRT_BASE+10)	/* Add a (*,*|G) mfc entry	*/
 #define MRT_DEL_MFC_PROXY	(MRT_BASE+11)	/* Del a (*,*|G) mfc entry	*/
-#define MRT_MAX		(MRT_BASE+11)
+#define MRT_FLUSH	(MRT_BASE+12)	/* Flush all multicast entries and vifs	*/
+#define MRT_MAX		(MRT_BASE+12)
 
 #define SIOCGETVIFCNT	SIOCPROTOPRIVATE	/* IP protocol privates */
 #define SIOCGETSGCNT	(SIOCPROTOPRIVATE+1)
 #define SIOCGETRPF	(SIOCPROTOPRIVATE+2)
 
+/* Flags used for MRT_FLUSH */
+#define MRT_FLUSH_ENTRIES	1	/* For flushing all multicast entries */
+#define MRT_FLUSH_VIFS		2	/* For flushing all multicast vifs */
+
 #define MAXVIFS		32
 typedef unsigned long vifbitmap_t;	/* User mode code depends on this lot */
 typedef unsigned short vifi_t;
diff --git a/include/uapi/linux/mroute6.h b/include/uapi/linux/mroute6.h
index 9999cc006390..b04094d997c8 100644
--- a/include/uapi/linux/mroute6.h
+++ b/include/uapi/linux/mroute6.h
@@ -31,12 +31,17 @@
 #define MRT6_TABLE	(MRT6_BASE+9)	/* Specify mroute table ID		*/
 #define MRT6_ADD_MFC_PROXY	(MRT6_BASE+10)	/* Add a (*,*|G) mfc entry	*/
 #define MRT6_DEL_MFC_PROXY	(MRT6_BASE+11)	/* Del a (*,*|G) mfc entry	*/
-#define MRT6_MAX	(MRT6_BASE+11)
+#define MRT6_FLUSH	(MRT6_BASE+12)	/* Flush all multicast entries and vifs	*/
+#define MRT6_MAX	(MRT6_BASE+12)
 
 #define SIOCGETMIFCNT_IN6	SIOCPROTOPRIVATE	/* IP protocol privates */
 #define SIOCGETSGCNT_IN6	(SIOCPROTOPRIVATE+1)
 #define SIOCGETRPF	(SIOCPROTOPRIVATE+2)
 
+/* Flags used for MRT6_FLUSH*/
+#define MRT6_FLUSH_ENTRIES	1	/* For flushing all multicast entries */
+#define MRT6_FLUSH_VIFS		2	/* For flushing all multicast vifs */
+
 #define MAXMIFS		32
 typedef unsigned long mifbitmap_t;	/* User mode code depends on this lot */
 typedef unsigned short mifi_t;
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index ddbf8c9a1abb..2eb569138569 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -416,7 +416,7 @@ static struct mr_table *ipmr_new_table(struct net *net, u32 id)
 static void ipmr_free_table(struct mr_table *mrt)
 {
 	del_timer_sync(&mrt->ipmr_expire_timer);
-	mroute_clean_tables(mrt, true);
+	mroute_clean_tables(mrt, true, MRT_FLUSH_VIFS | MRT_FLUSH_ENTRIES);
 	rhltable_destroy(&mrt->mfc_hash);
 	kfree(mrt);
 }
@@ -1299,44 +1299,48 @@ static int ipmr_mfc_add(struct net *net, struct mr_table *mrt,
 }
 
 /* Close the multicast socket, and clear the vif tables etc */
-static void mroute_clean_tables(struct mr_table *mrt, bool all)
+static void mroute_clean_tables(struct mr_table *mrt, bool all, int flags)
 {
 	struct net *net = read_pnet(&mrt->net);
-	struct mr_mfc *c, *tmp;
 	struct mfc_cache *cache;
+	struct mr_mfc *c, *tmp;
 	LIST_HEAD(list);
 	int i;
 
 	/* Shut down all active vif entries */
-	for (i = 0; i < mrt->maxvif; i++) {
-		if (!all && (mrt->vif_table[i].flags & VIFF_STATIC))
-			continue;
-		vif_delete(mrt, i, 0, &list);
+	if (flags & MRT_FLUSH_VIFS) {
+		for (i = 0; i < mrt->maxvif; i++) {
+			if (!all && (mrt->vif_table[i].flags & VIFF_STATIC))
+				continue;
+				vif_delete(mrt, i, 0, &list);
+		}
+		unregister_netdevice_many(&list);
 	}
-	unregister_netdevice_many(&list);
 
 	/* Wipe the cache */
-	list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) {
-		if (!all && (c->mfc_flags & MFC_STATIC))
-			continue;
-		rhltable_remove(&mrt->mfc_hash, &c->mnode, ipmr_rht_params);
-		list_del_rcu(&c->list);
-		cache = (struct mfc_cache *)c;
-		call_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, cache,
-					      mrt->id);
-		mroute_netlink_event(mrt, cache, RTM_DELROUTE);
-		mr_cache_put(c);
-	}
-
-	if (atomic_read(&mrt->cache_resolve_queue_len) != 0) {
-		spin_lock_bh(&mfc_unres_lock);
-		list_for_each_entry_safe(c, tmp, &mrt->mfc_unres_queue, list) {
-			list_del(&c->list);
+	if (flags & MRT_FLUSH_ENTRIES) {
+		list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) {
+			if (!all && (c->mfc_flags & MFC_STATIC))
+				continue;
+			rhltable_remove(&mrt->mfc_hash, &c->mnode, ipmr_rht_params);
+			list_del_rcu(&c->list);
 			cache = (struct mfc_cache *)c;
+			call_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, cache,
+										  mrt->id);
 			mroute_netlink_event(mrt, cache, RTM_DELROUTE);
-			ipmr_destroy_unres(mrt, cache);
+			mr_cache_put(c);
+		}
+
+		if (atomic_read(&mrt->cache_resolve_queue_len) != 0) {
+			spin_lock_bh(&mfc_unres_lock);
+			list_for_each_entry_safe(c, tmp, &mrt->mfc_unres_queue, list) {
+				list_del(&c->list);
+				cache = (struct mfc_cache *)c;
+				mroute_netlink_event(mrt, cache, RTM_DELROUTE);
+				ipmr_destroy_unres(mrt, cache);
+			}
+			spin_unlock_bh(&mfc_unres_lock);
 		}
-		spin_unlock_bh(&mfc_unres_lock);
 	}
 }
 
@@ -1357,7 +1361,7 @@ static void mrtsock_destruct(struct sock *sk)
 						    NETCONFA_IFINDEX_ALL,
 						    net->ipv4.devconf_all);
 			RCU_INIT_POINTER(mrt->mroute_sk, NULL);
-			mroute_clean_tables(mrt, false);
+			mroute_clean_tables(mrt, false, MRT_FLUSH_VIFS | MRT_FLUSH_ENTRIES);
 		}
 	}
 	rtnl_unlock();
@@ -1482,6 +1486,17 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
 					   sk == rtnl_dereference(mrt->mroute_sk),
 					   parent);
 		break;
+	case MRT_FLUSH:
+		if (get_user(val, (int __user *)optval)) {
+			ret = -EFAULT;
+			break;
+		}
+		rtnl_lock();
+		ipmr_for_each_table(mrt, net) {
+			mroute_clean_tables(mrt, true, val);
+		}
+		rtnl_unlock();
+		break;
 	/* Control PIM assert. */
 	case MRT_ASSERT:
 		if (optlen != sizeof(val)) {
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 30337b38274b..473c83d197fe 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -393,7 +393,7 @@ static struct mr_table *ip6mr_new_table(struct net *net, u32 id)
 static void ip6mr_free_table(struct mr_table *mrt)
 {
 	del_timer_sync(&mrt->ipmr_expire_timer);
-	mroute_clean_tables(mrt, true);
+	mroute_clean_tables(mrt, true, MRT6_FLUSH_VIFS | MRT6_FLUSH_ENTRIES);
 	rhltable_destroy(&mrt->mfc_hash);
 	kfree(mrt);
 }
@@ -1496,43 +1496,47 @@ static int ip6mr_mfc_add(struct net *net, struct mr_table *mrt,
  *	Close the multicast socket, and clear the vif tables etc
  */
 
-static void mroute_clean_tables(struct mr_table *mrt, bool all)
+static void mroute_clean_tables(struct mr_table *mrt, bool all, int flags)
 {
 	struct mr_mfc *c, *tmp;
 	LIST_HEAD(list);
 	int i;
 
 	/* Shut down all active vif entries */
-	for (i = 0; i < mrt->maxvif; i++) {
-		if (!all && (mrt->vif_table[i].flags & VIFF_STATIC))
-			continue;
-		mif6_delete(mrt, i, 0, &list);
+	if (flags & MRT6_FLUSH_VIFS) {
+		for (i = 0; i < mrt->maxvif; i++) {
+			if (!all && (mrt->vif_table[i].flags & VIFF_STATIC))
+				continue;
+			mif6_delete(mrt, i, 0, &list);
+		}
+		unregister_netdevice_many(&list);
 	}
-	unregister_netdevice_many(&list);
 
 	/* Wipe the cache */
-	list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) {
-		if (!all && (c->mfc_flags & MFC_STATIC))
-			continue;
-		rhltable_remove(&mrt->mfc_hash, &c->mnode, ip6mr_rht_params);
-		list_del_rcu(&c->list);
-		mr6_netlink_event(mrt, (struct mfc6_cache *)c, RTM_DELROUTE);
-		mr_cache_put(c);
-	}
+	if (flags & MRT6_FLUSH_ENTRIES) {
+		list_for_each_entry_safe(c, tmp, &mrt->mfc_cache_list, list) {
+			if (!all && (c->mfc_flags & MFC_STATIC))
+				continue;
+			rhltable_remove(&mrt->mfc_hash, &c->mnode, ip6mr_rht_params);
+			list_del_rcu(&c->list);
+			mr6_netlink_event(mrt, (struct mfc6_cache *)c, RTM_DELROUTE);
+			mr_cache_put(c);
+		}
 
-	if (atomic_read(&mrt->cache_resolve_queue_len) != 0) {
-		spin_lock_bh(&mfc_unres_lock);
-		list_for_each_entry_safe(c, tmp, &mrt->mfc_unres_queue, list) {
-			list_del(&c->list);
-			call_ip6mr_mfc_entry_notifiers(read_pnet(&mrt->net),
-						       FIB_EVENT_ENTRY_DEL,
-						       (struct mfc6_cache *)c,
-						       mrt->id);
-			mr6_netlink_event(mrt, (struct mfc6_cache *)c,
-					  RTM_DELROUTE);
-			ip6mr_destroy_unres(mrt, (struct mfc6_cache *)c);
+		if (atomic_read(&mrt->cache_resolve_queue_len) != 0) {
+			spin_lock_bh(&mfc_unres_lock);
+			list_for_each_entry_safe(c, tmp, &mrt->mfc_unres_queue, list) {
+				list_del(&c->list);
+				call_ip6mr_mfc_entry_notifiers(read_pnet(&mrt->net),
+											   FIB_EVENT_ENTRY_DEL,
+											   (struct mfc6_cache *)c,
+											   mrt->id);
+				mr6_netlink_event(mrt, (struct mfc6_cache *)c,
+						  RTM_DELROUTE);
+				ip6mr_destroy_unres(mrt, (struct mfc6_cache *)c);
+			}
+			spin_unlock_bh(&mfc_unres_lock);
 		}
-		spin_unlock_bh(&mfc_unres_lock);
 	}
 }
 
@@ -1588,7 +1592,7 @@ int ip6mr_sk_done(struct sock *sk)
 						     NETCONFA_IFINDEX_ALL,
 						     net->ipv6.devconf_all);
 
-			mroute_clean_tables(mrt, false);
+			mroute_clean_tables(mrt, false, MRT6_FLUSH_VIFS | MRT6_FLUSH_ENTRIES);
 			err = 0;
 			break;
 		}
@@ -1703,6 +1707,19 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, uns
 					    parent);
 		rtnl_unlock();
 		return ret;
+	case MRT6_DEL_MFC_ALL:
+	{
+		int flags;
+
+		if (get_user(flags, (int __user *)optval))
+			return -EFAULT;
+		rtnl_lock();
+		ip6mr_for_each_table(mrt, net) {
+			mroute_clean_tables(mrt, true, flags);
+		}
+		rtnl_unlock();
+		return 0;
+	}
 
 	/*
 	 *	Control PIM assert (to activate pim will activate assert)
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH net-next] net: phy: fixed_phy: Fix fixed_phy not checking GPIO
From: Andrew Lunn @ 2019-02-07  3:00 UTC (permalink / raw)
  To: Moritz Fischer; +Cc: netdev, f.fainelli, hkallweit1, davem
In-Reply-To: <20190206181040.29539-1-mdf@kernel.org>

On Wed, Feb 06, 2019 at 10:10:40AM -0800, Moritz Fischer wrote:
> Fix fixed_phy not checking GPIO if no link_update callback
> is registered.
> 
> Signed-off-by: Moritz Fischer <mdf@kernel.org>
> ---
> 
> Hi all,
> 
> I've been trying to figure out where exactly this broke,
> it must've been somewhere when the file was refactored
> in connection with phylink?

After some digging, i now understand. It was 'broken' right from the
beginning. The only user of this when i introduced it was a board with
an Ethernet switch driven by a DSA driver. The GPIO is used to
indicate if an SFP has a loss of signal indication.

DSA would look for the fixed-link properties for the switch port, and
if it found it, use of_phy_register_fixed_link() to register a fixed
link.

However, the broadcom SF2 switch driver needs to use the callback
method of reporting link up/down for a fixed-link. So the DSA core
always registers a generic DSA callback, which then calls into the DSA
driver if its driver structure implements the callback.

So we always had the case of both, so despite it being broken, it
worked...

	Andrew

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox