Re: [PATCH net] tipc: not enable tipc when ipv6 works as a module

2020-08-16 Thread Xin Long
On Mon, Aug 17, 2020 at 2:29 AM Cong Wang wrote: > > On Sun, Aug 16, 2020 at 4:54 AM Xin Long wrote: > > > > When using ipv6_dev_find() in one module, it requires ipv6 not to > > work as a module. Otherwise, this error occurs in build: > > > > undefined reference to `ipv6_dev_find'. > > > > So

[PATCH net] ipv6: some fixes for ipv6_dev_find()

2020-08-16 Thread Xin Long
This patch is to do 3 things for ipv6_dev_find(): As David A. noticed, - rt6_lookup() is not really needed. Different from __ip_dev_find(), ipv6_dev_find() doesn't have a compatibility problem, so remove it. As Hideaki suggested, - "valid" (non-tentative) check for the address is al

Re: [PATCH] clk: clk-hi3670: Add CLK_IGNORE_UNUSED flag

2020-08-16 Thread Mauro Carvalho Chehab
Em Sat, 15 Aug 2020 19:33:31 -0700 Stephen Boyd escreveu: > Please send patches To: somebody. Sending them to nobody causes my MUA > pain. Ok. Should I send it to you or to someone else? > > Quoting Mauro Carvalho Chehab (2020-08-14 07:16:20) > > There are several clocks that are required for K

Re: [PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-16 Thread Jesper Dangaard Brouer
On Sun, 16 Aug 2020 15:29:37 -0700 (PDT) David Miller wrote: > From: "Jason A. Donenfeld" > Date: Sat, 15 Aug 2020 09:29:30 +0200 > > > When an XDP program changes the ethernet header protocol field, > > eth_type_trans is used to recalculate skb->protocol. In order for > > eth_type_trans to wor

linux-next: Fixes tag needs some work in the net tree

2020-08-16 Thread Stephen Rothwell
Hi all, In commit b3b2854dcf70 ("mptcp: sendmsg: reset iter on error redux") Fixes tag Fixes: 35759383133f64d "(mptcp: sendmsg: reset iter on error)" has these problem(s): - Subject does not match target commit subject Just use git log -1 --format='Fixes: %h ("%s")' -- Che

Re: [PATCH v5 1/3] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-16 Thread Christoph Hellwig
On Sun, Aug 16, 2020 at 10:55:09AM -0700, Cong Wang wrote: > On Sun, Aug 16, 2020 at 1:36 AM Coly Li wrote: > > > > The original problem was from nvme-over-tcp code, who mistakenly uses > > kernel_sendpage() to send pages allocated by __get_free_pages() without > > __GFP_COMP flag. Such pages don'

Re: [PATCH] phylink: : fix function prototype kernel-doc warning

2020-08-16 Thread Randy Dunlap
On 8/16/20 9:14 PM, David Miller wrote: > From: Randy Dunlap > Date: Sun, 16 Aug 2020 15:25:49 -0700 > >> Fix a kernel-doc warning for the pcs_config() function prototype: >> >> ../include/linux/phylink.h:406: warning: Excess function parameter >> 'permit_pause_to_mac' description in 'pcs_config

Re: [PATCH] phylink: : fix function prototype kernel-doc warning

2020-08-16 Thread David Miller
From: Randy Dunlap Date: Sun, 16 Aug 2020 15:25:49 -0700 > Fix a kernel-doc warning for the pcs_config() function prototype: > > ../include/linux/phylink.h:406: warning: Excess function parameter > 'permit_pause_to_mac' description in 'pcs_config' > > Fixes: 7137e18f6f88 ("net: phylink: add st

Re: [PATCH net] mptcp: sendmsg: reset iter on error redux

2020-08-16 Thread David Miller
From: Florian Westphal Date: Sun, 16 Aug 2020 23:14:20 +0200 > This fix wasn't correct: When this function is invoked from the > retransmission worker, the iterator contains garbage and resetting > it causes a crash. > > As the work queue should not be performance critical also zero the > msghdr

Re: [RFC PATCH net-next] bridge: Implement MLD Querier wake-up calls / Android bug workaround

2020-08-16 Thread David Miller
From: Linus Lüssing Date: Sun, 16 Aug 2020 22:24:24 +0200 > I'm aware that this is quite a hack, so I'm unsure if this is suitable > for upstream. On the other hand, the Android ticket isn't moving > anywhere and even if it were fixed in Android, I'd expect it to take > years until that fix would

Re: [PATCH] net: devlink: Remove overzealous WARN_ON with snapshots

2020-08-16 Thread David Miller
From: Andrew Lunn Date: Sun, 16 Aug 2020 21:26:38 +0200 > It is possible to trigger this WARN_ON from user space by triggering a > devlink snapshot with an ID which already exists. We don't need both > -EEXISTS being reported and spamming the kernel log. > > Signed-off-by: Andrew Lunn Applied,

Re: [PATCH net] tipc: not enable tipc when ipv6 works as a module

2020-08-16 Thread David Miller
From: Xin Long Date: Sun, 16 Aug 2020 17:32:03 +0800 > When using ipv6_dev_find() in one module, it requires ipv6 not to > work as a module. Otherwise, this error occurs in build: > > undefined reference to `ipv6_dev_find'. > > So fix it by adding "depends on IPV6 || IPV6=n" to tipc/Kconfig,

Re: [Patch net] tipc: fix uninit skb->data in tipc_nl_compat_dumpit()

2020-08-16 Thread David Miller
From: Cong Wang Date: Sat, 15 Aug 2020 16:29:15 -0700 > __tipc_nl_compat_dumpit() has two callers, and it expects them to > pass a valid nlmsghdr via arg->data. This header is artificial and > crafted just for __tipc_nl_compat_dumpit(). > > tipc_nl_compat_publ_dump() does so by putting a genlmsg

Re: [PATCH] net: handle the return value of pskb_carve_frag_list() correctly

2020-08-16 Thread David Miller
From: linmiaohe Date: Mon, 17 Aug 2020 02:27:23 + > David Miller wrote: >>> + /* split line is in frag list */ >>> + if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) { >>> + /* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. >>> */ >>> +

Re: [PATCH] selftests: rtnetlink: load fou module for kci_test_encap_fou()

2020-08-16 Thread Po-Hsu Lin
On Sat, Aug 15, 2020 at 7:43 AM David Miller wrote: > > From: Po-Hsu Lin > Date: Thu, 13 Aug 2020 12:44:22 +0800 > > > diff --git a/tools/testing/selftests/net/config > > b/tools/testing/selftests/net/config > > index 3b42c06b..96d2763 100644 > > --- a/tools/testing/selftests/net/config > > +++

Re: [PATCH] net: handle the return value of pskb_carve_frag_list() correctly

2020-08-16 Thread linmiaohe
David Miller wrote: >> +/* split line is in frag list */ >> +if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) { >> +/* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. >> */ >> +if (skb_has_frag_list(skb)) >> +kf

[PATCH] otx2_common: Use devm_kcalloc() in otx2_config_npa()

2020-08-16 Thread Xu Wang
A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 ++-- 1 file changed, 2 inser

[PATCH V2 4/6] net: ceph: Remove embedded function names from pr_debug uses

2020-08-16 Thread Joe Perches
Use "%s: " ..., __func__ so function renaming changes the logging too. Signed-off-by: Joe Perches --- net/ceph/auth_none.c | 2 +- net/ceph/auth_x.c | 26 ++-- net/ceph/ceph_common.c | 4 +- net/ceph/debugfs.c | 2 +- net/ceph/messenger.c | 91 +---

[PATCH V2 3/6] net: ceph: Use generic debugging facility

2020-08-16 Thread Joe Perches
The dout macro duplicates the generic features of pr_debug with __FILE__ and __func__ output capability when using dynamic_debug. Convert dout to pr_debug and remove the "pretty" print feature of dout. Miscellanea: o Realign arguments Signed-off-by: Joe Perches --- net/ceph/auth.c

[PATCH V2 0/6] ceph: Use more generic logging

2020-08-16 Thread Joe Perches
Convert the dout macro to the normal pr_debug. Convert embedded function names in these changes to %s, __func__ Remove the dout macro definitions Joe Perches (6): ceph: Use generic debugging facility ceph: Remove embedded function names from pr_debug uses net: ceph: Use generic debugging fa

Re: [PATCH 1/1] MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address

2020-08-16 Thread Zhu Yanjun
On Sun, Aug 16, 2020 at 3:45 PM Leon Romanovsky wrote: > > On Sun, Aug 16, 2020 at 01:25:50PM +0800, Zhu Yanjun wrote: > > I prefer to use this email address for kernel related work. > > > > Signed-off-by: Zhu Yanjun > > --- > > MAINTAINERS |2 +- > > 1 files changed, 1 insertions(+), 1 dele

Re: [PATCH 0/8] Netfilter fixes for net

2020-08-16 Thread David Miller
From: Pablo Neira Ayuso Date: Sat, 15 Aug 2020 12:31:53 +0200 > The following patchset contains Netfilter fixes for net: > > 1) Endianness issue in IPv4 option support in nft_exthdr, >from Stephen Suryaputra. > > 2) Removes the waitcount optimization in nft_compat, >from Florian Westpha

Re: pull-request: can 2020-08-15

2020-08-16 Thread David Miller
From: Marc Kleine-Budde Date: Sat, 15 Aug 2020 11:21:12 +0200 > this is a pull request of 4 patches for net/master. > > All patches are by Zhang Changzhong and fix broadcast related problems in the > j1939 CAN networking stack. Pulled, thanks Marc.

[PATCH iproute2 v1 2/2] rdma: use print_type() rather than print_color_type(xx, COLOR_NONE)

2020-08-16 Thread Stephen Hemminger
There is helper function that already has no color mode. Use it so color is only used when needed Signed-off-by: Stephen Hemminger --- rdma/dev.c | 14 +++--- rdma/link.c | 24 rdma/res-cmid.c | 10 +- rdma/res-cq.c | 2 +- rdma/res-qp.c | 1

[PATCH iproute2 v1 1/2] rdma: colorize interface names

2020-08-16 Thread Stephen Hemminger
Use the standard color outputs for interface names Signed-off-by: Stephen Hemminger --- rdma/dev.c | 2 +- rdma/link.c | 2 +- rdma/res.c | 6 +++--- rdma/stat.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rdma/dev.c b/rdma/dev.c index a11081b82170..fd4c2376550c 1006

Re: [PATCH] net: handle the return value of pskb_carve_frag_list() correctly

2020-08-16 Thread David Miller
From: Miaohe Lin Date: Sat, 15 Aug 2020 04:46:41 -0400 > + /* split line is in frag list */ > + if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) { > + /* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. > */ > + if (skb_has_frag_li

Re: [PATCH iproute2-rc v1 2/2] rdma: Properly print device and link names in CLI output

2020-08-16 Thread Stephen Hemminger
On Tue, 11 Aug 2020 10:32:01 +0300 Leon Romanovsky wrote: > + print_color_string(PRINT_ANY, COLOR_NONE, "ifname", "dev %s ", name); Since this is an interface name, you might want to consider using COLOR_IFNAME? I will go ahead and apply it as is but more work is needed here.

Re: [net-next iproute2 PATCH v4 1/2] iplink: hsr: add support for creating PRP device similar to HSR

2020-08-16 Thread Stephen Hemminger
On Thu, 6 Aug 2020 16:37:11 -0400 Murali Karicheri wrote: > + > + print_int(PRINT_ANY, > + "proto", > + "proto %d ", > + rta_getattr_u8(tb[IFLA_HSR_PROTOCOL])); Since this unsigned value, you probably want to use

Re: [PATCH net-next 5/7] net: dsa: mv88e6xxx: Add devlink regions

2020-08-16 Thread Andrew Lunn
> > +static const struct devlink_region_ops *mv88e6xxx_region_port_ops[] = { > > + &mv88e6xxx_region_port_0_ops, > > + &mv88e6xxx_region_port_1_ops, > > + &mv88e6xxx_region_port_2_ops, > > + &mv88e6xxx_region_port_3_ops, > > + &mv88e6xxx_region_port_4_ops, > > + &mv88e6xxx_region_port_5

Re: [PATCH] net: Fix potential wrong skb->protocol in skb_vlan_untag()

2020-08-16 Thread David Miller
From: Miaohe Lin Date: Sat, 15 Aug 2020 04:44:31 -0400 > We may access the two bytes after vlan_hdr in vlan_set_encap_proto(). So > we should pull VLAN_HLEN + sizeof(unsigned short) in skb_vlan_untag() or > we may access the wrong data. > > Fixes: 0d5501c1c828 ("net: Always untag vlan-tagged tra

Re: [PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Sat, 15 Aug 2020 09:29:30 +0200 > When an XDP program changes the ethernet header protocol field, > eth_type_trans is used to recalculate skb->protocol. In order for > eth_type_trans to work correctly, the ethernet header must actually be > part of the skb data se

[PATCH] phylink: : fix function prototype kernel-doc warning

2020-08-16 Thread Randy Dunlap
Fix a kernel-doc warning for the pcs_config() function prototype: ../include/linux/phylink.h:406: warning: Excess function parameter 'permit_pause_to_mac' description in 'pcs_config' Fixes: 7137e18f6f88 ("net: phylink: add struct phylink_pcs") Signed-off-by: Randy Dunlap Cc: Russell King Cc: D

Re: [PATCH net-next 2/7] net: dsa: Add devlink regions support to DSA

2020-08-16 Thread Vladimir Oltean
On Mon, Aug 17, 2020 at 12:06:32AM +0200, Andrew Lunn wrote: > > Could we perhaps open-code these from the drivers themselves? There's > > hardly any added value in DSA providing a "helper" for creation of > > devlink resources (regions, shared buffers, etc). > > If we do change to open coding, wou

Re: [PATCH net-next 6/7] net: dsa: wire up devlink info get

2020-08-16 Thread Andrew Lunn
> > +static int dsa_devlink_info_get(struct devlink *dl, > > + struct devlink_info_req *req, > > + struct netlink_ext_ack *extack) > > +{ > > + struct dsa_switch *ds; > > + > > + ds = dsa_devlink_to_ds(dl); > > + > > Why not place the declara

Re: [PATCH net] ipvlan: fix device features

2020-08-16 Thread David Miller
From: Mahesh Bandewar Date: Fri, 14 Aug 2020 22:53:24 -0700 > Processing NETDEV_FEAT_CHANGE causes IPvlan links to lose > NETIF_F_LLTX feature because of the incorrect handling of > features in ipvlan_fix_features(). ... > Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") >

Re: [PATCH net-next 5/7] net: dsa: mv88e6xxx: Add devlink regions

2020-08-16 Thread Vladimir Oltean
On Sun, Aug 16, 2020 at 09:43:14PM +0200, Andrew Lunn wrote: > Allow ports, the global registers, and the ATU to be snapshot via > devlink regions. > > Signed-off-by: Andrew Lunn > --- > drivers/net/dsa/mv88e6xxx/chip.c| 14 +- > drivers/net/dsa/mv88e6xxx/chip.h| 12 + > drivers/net/ds

Re: [Bridge] [RFC PATCH net-next] bridge: Implement MLD Querier wake-up calls / Android bug workaround

2020-08-16 Thread David Miller
From: Stephen Hemminger Date: Sun, 16 Aug 2020 15:08:13 -0700 > Rather than adding yet another feature to the bridge, could this hack be done > by > having a BPF hook? or netfilter module? Stephen please do not quote an entire huge patch just to add a small amount of commentary at the end. Tha

Re: [Bridge] [RFC PATCH net-next] bridge: Implement MLD Querier wake-up calls / Android bug workaround

2020-08-16 Thread Stephen Hemminger
On Sun, 16 Aug 2020 22:24:24 +0200 Linus Lüssing wrote: > Implement a configurable MLD Querier wake-up calls "feature" which > works around a widely spread Android bug in connection with IGMP/MLD > snooping. > > Currently there are mobile devices (e.g. Android) which are not able > to receive an

Re: [PATCH net-next 2/7] net: dsa: Add devlink regions support to DSA

2020-08-16 Thread Andrew Lunn
> Could we perhaps open-code these from the drivers themselves? There's > hardly any added value in DSA providing a "helper" for creation of > devlink resources (regions, shared buffers, etc). It is something i considered. But we already have devlink wrappers. It would be odd to have some parts o

Re: [PATCH net-next 6/7] net: dsa: wire up devlink info get

2020-08-16 Thread Vladimir Oltean
On Sun, Aug 16, 2020 at 09:43:15PM +0200, Andrew Lunn wrote: > Allow the DSA drivers to implement the devlink call to get info info, > e.g. driver name, firmware version, ASIC ID, etc. > > Signed-off-by: Andrew Lunn > --- > include/net/dsa.h | 5 - > net/dsa/dsa2.c| 21 +

Re: [PATCH net-next 2/7] net: dsa: Add devlink regions support to DSA

2020-08-16 Thread Vladimir Oltean
On Sun, Aug 16, 2020 at 09:43:11PM +0200, Andrew Lunn wrote: > Allow DSA drivers to make use of devlink regions, via simple wrappers. > > Signed-off-by: Andrew Lunn > --- > include/net/dsa.h | 6 ++ > net/dsa/dsa.c | 16 > 2 files changed, 22 insertions(+) > > diff --g

Re: [PATCH] net: devlink: Remove overzealous WARN_ON with snapshots

2020-08-16 Thread Chris Healy
With this patch applied, I no longer experience the kernel warning messages. Tested-by: Chris Healy On Sun, Aug 16, 2020 at 12:27 PM Andrew Lunn wrote: > > It is possible to trigger this WARN_ON from user space by triggering a > devlink snapshot with an ID which already exists. We don't need bo

[PATCH net] mptcp: sendmsg: reset iter on error redux

2020-08-16 Thread Florian Westphal
This fix wasn't correct: When this function is invoked from the retransmission worker, the iterator contains garbage and resetting it causes a crash. As the work queue should not be performance critical also zero the msghdr struct. Fixes: 35759383133f64d "(mptcp: sendmsg: reset iter on error)" Si

Re: [PATCH net-next v2 5/5] net: phy: Sort Kconfig and Makefile

2020-08-16 Thread Florian Fainelli
On 8/16/2020 11:56 AM, Andrew Lunn wrote: Sort the Kconfig based on the text shown in make menuconfig and sort the Makefile by CONFIG symbol. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 3/5] net: xgene: Move shared header file into include/linux

2020-08-16 Thread Florian Fainelli
On 8/16/2020 11:56 AM, Andrew Lunn wrote: This header file is currently included into the ethernet driver via a relative path into the PHY subsystem. This is bad practice, and causes issues for the upcoming move of the MDIO driver. Move the header file into include/linux to clean this up. Sig

Re: [PATCH net-next v2 2/5] net/phy/mdio-i2c: Move header file to include/linux

2020-08-16 Thread Florian Fainelli
On 8/16/2020 11:56 AM, Andrew Lunn wrote: In preparation for moving all MDIO drivers into drivers/net/mdio, move the mdio-i2c header file into include/linux so it can be used by both the MDIO driver and the SFP code which instantiates I2C MDIO busses. Signed-off-by: Andrew Lunn --- drivers

Re: [PATCH net-next v2 1/5] net: pcs: Move XPCS into new PCS subdirectory

2020-08-16 Thread Florian Fainelli
On 8/16/2020 11:56 AM, Andrew Lunn wrote: Create drivers/net/pcs and move the Synopsys DesignWare XPCS into the new directory. Start a naming convention of all PCS files use the prefix pcs-, and rename the XPCS files to fit. Cc: Jose Abreu Signed-off-by: Andrew Lunn --- MAINTAINERS

Re: [PATCH net-next v2 4/5] net: mdio: Move MDIO drivers into a new subdirectory

2020-08-16 Thread Florian Fainelli
On 8/16/2020 11:56 AM, Andrew Lunn wrote: Move all the MDIO drivers and multiplexers into drivers/net/mdio. The mdio core is however left in the phy directory, due to mutual dependencies between the MIOD core and the PHY core. typo: MIOD vs. MDIO Take this opportunity to sort the Kconfig

[RFC PATCH net-next] bridge: Implement MLD Querier wake-up calls / Android bug workaround

2020-08-16 Thread Linus Lüssing
Implement a configurable MLD Querier wake-up calls "feature" which works around a widely spread Android bug in connection with IGMP/MLD snooping. Currently there are mobile devices (e.g. Android) which are not able to receive and respond to MLD Queries reliably because the Wifi driver filters a lo

Re: [PATCH net-next 0/7] net: dsa: mv88e6xxx: Add devlink regions support

2020-08-16 Thread Chris Healy
I tested this on the Rev C Zii Vybrid Dev Board which has two Marvell 88E6390X switches. Both switches worth of port, global, and atu data show up when running the devlink show command and for each of the regions, I can dump the contents. I also tested on a different platform with a single 88E635

[PATCH net-next 0/7] net: dsa: mv88e6xxx: Add devlink regions support

2020-08-16 Thread Andrew Lunn
Make use of devlink regions to allow read access to some of the internal of the switches. The switch itself will never trigger a region snapshot, it is assumed it is performed from user space as needed. Andrew Lunn (7): net: dsa: Add helper to convert from devlink to ds net: dsa: Add devlink r

[PATCH net-next 7/7] net: dsa: mv88e6xxx: Implement devlink info get callback

2020-08-16 Thread Andrew Lunn
Return the driver name and the asic.id with the switch name. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 1 + drivers/net/dsa/mv88e6xxx/devlink.c | 15 +++ drivers/net/dsa/mv88e6xxx/devlink.h | 3 +++ 3 files changed, 19 insertions(+) diff --git a/drivers/

[PATCH net-next 1/7] net: dsa: Add helper to convert from devlink to ds

2020-08-16 Thread Andrew Lunn
Given a devlink instance, return the dsa switch it is associated to. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 2 ++ net/dsa/dsa.c | 20 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 75c8fac82017..6

[PATCH net-next 4/7] net: dsa: mv88e6xxx: Create helper for FIDs in use

2020-08-16 Thread Andrew Lunn
Refactor the code in mv88e6xxx_atu_new() which builds a bitmaps of FIDs in use into a helper function. This will be reused by the devlink code when dumping the ATU. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 20 drivers/net/dsa/mv88e6xxx/chip.h | 2 ++

[PATCH net-next 6/7] net: dsa: wire up devlink info get

2020-08-16 Thread Andrew Lunn
Allow the DSA drivers to implement the devlink call to get info info, e.g. driver name, firmware version, ASIC ID, etc. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 5 - net/dsa/dsa2.c| 21 ++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/inclu

[PATCH net-next 2/7] net: dsa: Add devlink regions support to DSA

2020-08-16 Thread Andrew Lunn
Allow DSA drivers to make use of devlink regions, via simple wrappers. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 6 ++ net/dsa/dsa.c | 16 2 files changed, 22 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 63ff6f717307..8963440ec7f8 100

[PATCH net-next 5/7] net: dsa: mv88e6xxx: Add devlink regions

2020-08-16 Thread Andrew Lunn
Allow ports, the global registers, and the ATU to be snapshot via devlink regions. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 14 +- drivers/net/dsa/mv88e6xxx/chip.h| 12 + drivers/net/dsa/mv88e6xxx/devlink.c | 413 drivers/net/dsa/mv8

[PATCH net-next 3/7] net: dsa: mv88e6xxx: Move devlink code into its own file

2020-08-16 Thread Andrew Lunn
There will soon be more devlink code. Move the existing code into a file of its own, before we start adding this new code. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c| 255 +-- drivers/net/dsa/mv88e6xxx/

Re: [PATCH] net: devlink: Remove overzealous WARN_ON with snapshots

2020-08-16 Thread Andrew Lunn
On Sun, Aug 16, 2020 at 09:26:38PM +0200, Andrew Lunn wrote: > It is possible to trigger this WARN_ON from user space by triggering a > devlink snapshot with an ID which already exists. We don't need both > -EEXISTS being reported and spamming the kernel log. Upps. Forgot the net-next in the subje

Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION

2020-08-16 Thread Pascal Bouchareine
On Sun, Aug 16, 2020 at 11:15 AM Eric Dumazet wrote: > > 1) You also ignored what would happen at accept() time. > > Please test your patches with ASAN. Ouch, I will look into it - thanks for pointing that out & 3/ > > 2) Also, why is that description specific to sockets ? fcntl on struct file

[PATCH] net: devlink: Remove overzealous WARN_ON with snapshots

2020-08-16 Thread Andrew Lunn
It is possible to trigger this WARN_ON from user space by triggering a devlink snapshot with an ID which already exists. We don't need both -EEXISTS being reported and spamming the kernel log. Signed-off-by: Andrew Lunn --- net/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 1/3] pinctrl: sh-pfc: r8a7790: Add CAN pins, groups and functions

2020-08-16 Thread Lad Prabhakar
Add pins, groups and functions for the CAN0 and CAN1 interface. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson --- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 86 +++- 1 file changed, 84 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.

[PATCH 0/3] r8a7742 add CAN support

2020-08-16 Thread Lad Prabhakar
Hi All, This patch series adds CAN pins to r8a7790 PFC driver and adds CAN[01] nodes to r8a7742 SoC dtsi. patches applies on top of [1] (the PFC patch is dependant on top of patch [2]) [1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/ renesas-devel.git/log/?h=renesas-arm-dt-for-v5.1

[PATCH 2/3] dt-bindings: can: rcar_can: Add r8a7742 support

2020-08-16 Thread Lad Prabhakar
Document RZ/G1H (r8a7742) SoC specific bindings. The R8A7742 CAN module is identical to R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,rcar-gen2-can". Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson --- Documentation/devicetree/bindings/net

[PATCH 3/3] ARM: dts: r8a7742: Add CAN support

2020-08-16 Thread Lad Prabhakar
Add the definitions for can0 and can1 to the r8a7742 SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson --- arch/arm/boot/dts/r8a7742.dtsi | 34 ++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-16 Thread Cong Wang
On Thu, Aug 13, 2020 at 5:52 AM Jamal Hadi Salim wrote: > > The _main_ requirement is to scale to a large number of filters > (a million is a good handwave number). Scale means > 1) fast datapath lookup time + 2) fast insertion/deletion/get/dump > from control/user space. > fwmark is good at all t

[PATCH net-next v2 2/5] net/phy/mdio-i2c: Move header file to include/linux

2020-08-16 Thread Andrew Lunn
In preparation for moving all MDIO drivers into drivers/net/mdio, move the mdio-i2c header file into include/linux so it can be used by both the MDIO driver and the SFP code which instantiates I2C MDIO busses. Signed-off-by: Andrew Lunn --- drivers/net/phy/mdio-i2c.c| 3 +--

[PATCH net-next v2 4/5] net: mdio: Move MDIO drivers into a new subdirectory

2020-08-16 Thread Andrew Lunn
Move all the MDIO drivers and multiplexers into drivers/net/mdio. The mdio core is however left in the phy directory, due to mutual dependencies between the MIOD core and the PHY core. Take this opportunity to sort the Kconfig based on the menuconfig strings, and move the multiplexers to the end

[PATCH net-next v2 3/5] net: xgene: Move shared header file into include/linux

2020-08-16 Thread Andrew Lunn
This header file is currently included into the ethernet driver via a relative path into the PHY subsystem. This is bad practice, and causes issues for the upcoming move of the MDIO driver. Move the header file into include/linux to clean this up. Signed-off-by: Andrew Lunn --- drivers/net/ether

[PATCH net-next v2 5/5] net: phy: Sort Kconfig and Makefile

2020-08-16 Thread Andrew Lunn
Sort the Kconfig based on the text shown in make menuconfig and sort the Makefile by CONFIG symbol. Signed-off-by: Andrew Lunn --- drivers/net/phy/Kconfig | 164 +++ drivers/net/phy/Makefile | 10 +-- 2 files changed, 87 insertions(+), 87 deletions(-) diff

[PATCH net-next v2 1/5] net: pcs: Move XPCS into new PCS subdirectory

2020-08-16 Thread Andrew Lunn
Create drivers/net/pcs and move the Synopsys DesignWare XPCS into the new directory. Start a naming convention of all PCS files use the prefix pcs-, and rename the XPCS files to fit. Cc: Jose Abreu Signed-off-by: Andrew Lunn --- MAINTAINERS | 5 +++-- drivers

[PATCH net-next v2 0/5] Move MDIO drivers into there own directory

2020-08-16 Thread Andrew Lunn
The phy subdirectory is getting cluttered. It has both PHY drivers and MDIO drivers, plus a stray switch driver. Soon more PCS drivers are likely to appear. Move MDIO and PCS drivers into new directories. This requires fixing up the xgene driver which uses a relative include path. v2: Move the su

[PATCH net] bonding: fix active-backup failover for current ARP slave

2020-08-16 Thread Jiri Wiesner
When the ARP monitor is used for link detection, ARP replies are validated for all slaves (arp_validate=3) and fail_over_mac is set to active, two slaves of an active-backup bond may get stuck in a state where both of them are active and pass packets that they receive to the bond. This state makes

Re: [PATCH net] tipc: not enable tipc when ipv6 works as a module

2020-08-16 Thread Cong Wang
On Sun, Aug 16, 2020 at 4:54 AM Xin Long wrote: > > When using ipv6_dev_find() in one module, it requires ipv6 not to > work as a module. Otherwise, this error occurs in build: > > undefined reference to `ipv6_dev_find'. > > So fix it by adding "depends on IPV6 || IPV6=n" to tipc/Kconfig, > as i

Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION

2020-08-16 Thread Eric Dumazet
On 8/15/20 11:23 AM, Pascal Bouchareine wrote: > This command attaches the zero terminated string in optval to the > socket for troubleshooting purposes. The free string is displayed in the > process fdinfo file for that fd (/proc//fdinfo/). > > One intended usage is to allow processes to self-

Re: [PATCH 3/3] net: lantiq: Use napi_complete_done()

2020-08-16 Thread Eric Dumazet
On 8/15/20 11:33 AM, Hauke Mehrtens wrote: > Use napi_complete_done() and activate the interrupts when this function > returns true. This way the generic NAPI code can take care of activating > the interrupts. > > Signed-off-by: Hauke Mehrtens > --- > drivers/net/ethernet/lantiq_xrx200.c | 8

Re: [PATCH 2/3] net: lantiq: use netif_tx_napi_add() for TX NAPI

2020-08-16 Thread Eric Dumazet
On 8/15/20 11:33 AM, Hauke Mehrtens wrote: > netif_tx_napi_add() should be used for NAPI in the TX direction instead > of the netif_napi_add() function. > > Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") > Signed-off-by: Hauke Mehrtens > --- > drivers/net/ether

Re: [PATCH v5 1/3] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-16 Thread Cong Wang
On Sun, Aug 16, 2020 at 1:36 AM Coly Li wrote: > > The original problem was from nvme-over-tcp code, who mistakenly uses > kernel_sendpage() to send pages allocated by __get_free_pages() without > __GFP_COMP flag. Such pages don't have refcount (page_count is 0) on > tail pages, sending them by ke

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-16 Thread Sedat Dilek
On Sun, Aug 16, 2020 at 5:01 PM Willy Tarreau wrote: > > Hi, > > so as I mentioned, I could run several test on our lab with variations > around the various proposals and come to quite positive conclusions. > > Synthetic observations: the connection rate and the SYN cookie rate do not > seem to be

Re: [PATCH 1/2] mm: add GFP mask param to strndup_user

2020-08-16 Thread Alexey Dobriyan
On Sat, Aug 15, 2020 at 11:42:10PM +0100, Al Viro wrote: > On Sat, Aug 15, 2020 at 11:23:43AM -0700, Pascal Bouchareine wrote: > > Let caller specify allocation. > > Preserve existing calls with GFP_USER. > > Bloody bad idea, unless you slap a BUG_ON(flags & GFP_ATOMIC) on it, > to make sure nobod

[PATCH ethtool] cable-test: TDR Amplitude is signed

2020-08-16 Thread Andrew Lunn
Use the signed JSON helper for printing the TDR amplitude. Otherwise negative values, i.e. cable shorts, become very large positive values. Signed-off-by: Andrew Lunn --- netlink/cable_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlink/cable_test.c b/netlink/cable

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-16 Thread Willy Tarreau
Hi, so as I mentioned, I could run several test on our lab with variations around the various proposals and come to quite positive conclusions. Synthetic observations: the connection rate and the SYN cookie rate do not seem to be affected the same way by the prandom changes. One explanation is th

Re: [Patch net] tipc: fix uninit skb->data in tipc_nl_compat_dumpit()

2020-08-16 Thread Ying Xue
On 8/16/20 7:29 AM, Cong Wang wrote: > __tipc_nl_compat_dumpit() has two callers, and it expects them to > pass a valid nlmsghdr via arg->data. This header is artificial and > crafted just for __tipc_nl_compat_dumpit(). > > tipc_nl_compat_publ_dump() does so by putting a genlmsghdr as well > as so

Re: ping not working

2020-08-16 Thread folkert
Sorry; my problem. I had not seen that the ip-header checksum was incorrect. On Sun, Aug 16, 2020 at 10:10:13AM +0200, folkert wrote: > This might be slightly off-topic altough it involves Linux, tap-device > and ping. Folkert van Heusden -- Curious about the inner workings of your car? Then ch

Re: [PATCH V1 net 1/3] net: ena: Prevent reset after device destruction

2020-08-16 Thread Shay Agroskin
Jakub Kicinski writes: On Thu, 13 Aug 2020 15:51:46 +0300 Shay Agroskin wrote: Long answer: The ena_destroy_device() function is called with rtnl_lock() held, so it cannot run in parallel with the reset function. Also the destroy function clears the bit ENA_FLAG_TRIGGER_RESET without whi

[PATCH net] tipc: not enable tipc when ipv6 works as a module

2020-08-16 Thread Xin Long
When using ipv6_dev_find() in one module, it requires ipv6 not to work as a module. Otherwise, this error occurs in build: undefined reference to `ipv6_dev_find'. So fix it by adding "depends on IPV6 || IPV6=n" to tipc/Kconfig, as it does in sctp/Kconfig. Fixes: 5a6f6f579178 ("tipc: set ub->if

Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION

2020-08-16 Thread kernel test robot
. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Pascal-Bouchareine/proc-socket-attach-description-to-sockets/20200816-090222 base: https://git.kernel.org/pub/scm/linux/kern

Re: [PATCH] dt-bindings: Whitespace clean-ups in schema files

2020-08-16 Thread Jonathan Cameron
On Wed, 12 Aug 2020 23:34:53 +0200 Sam Ravnborg wrote: > Hi Rob. > > On Wed, Aug 12, 2020 at 02:36:18PM -0600, Rob Herring wrote: > > Clean-up incorrect indentation, extra spaces, long lines, and missing > > EOF newline in schema files. Most of the clean-ups are for list > > indentation which sh

HCI_EV_PHY_LINK_COMPLETE in net/bluetooth/hci_event.c

2020-08-16 Thread Fox Chen
Dear all, I have a question about static void hci_phy_link_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) -- HCI_EV_PHY_LINK_COMPLETE event packet handler in hci_even.c:4940 if (ev->status) { hci_conn_del(hcon); <-- hci_dev_unlock(hdev);

ping not working

2020-08-16 Thread folkert
Hi, This might be slightly off-topic altough it involves Linux, tap-device and ping. For fun I'm implementing an IP-stack. To do so I open a tap-device and use read/write to obtain/send packets. I configured the interface with IFF_NO_PI to not to get flags/protocol header. At this point it can a

Re: [PATCH iproute2-rc v1 0/2] Fix rdmatool JSON conversion

2020-08-16 Thread Leon Romanovsky
On Tue, Aug 11, 2020 at 10:31:59AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > v1: > * Added extra patch > * Don't print [] in owner name in JSON output > v0: > https://lore.kernel.org/linux-rdma/20200811063304.581395-1-l...@kernel.org > ---

Re: [PATCH 1/1] MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address

2020-08-16 Thread Leon Romanovsky
On Sun, Aug 16, 2020 at 01:25:50PM +0800, Zhu Yanjun wrote: > I prefer to use this email address for kernel related work. > > Signed-off-by: Zhu Yanjun > --- > MAINTAINERS |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) It was already handled. https://lore.kernel.org/lkml/202008100

Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION

2020-08-16 Thread kernel test robot
. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Pascal-Bouchareine/proc-socket-attach-description-to-sockets/20200816-090222 base: https://git.kernel.org/pub/scm/linux/kern

[RFC PATCH] net: socket: sock_set_description() can be static

2020-08-16 Thread kernel test robot
Signed-off-by: kernel test robot --- sock.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/sock.c b/net/core/sock.c index 2cb44a0e38b77d..f145a710974b48 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -828,7 +828,7 @@ void sock_set_rcvbuf(struct sock *sk,

[PATCH v5 3/3] drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage()

2020-08-16 Thread Coly Li
In _drbd_send_page() a page is checked by following code before sending it by kernel_sendpage(), (page_count(page) < 1) || PageSlab(page) If the check is true, this page won't be send by kernel_sendpage() and handled by sock_no_sendpage(). This kind of check is exactly what macro sendpage_

[PATCH v5 2/3] nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage()

2020-08-16 Thread Coly Li
Currently nvme_tcp_try_send_data() doesn't use kernel_sendpage() to send slab pages. But for pages allocated by __get_free_pages() without __GFP_COMP, which also have refcount as 0, they are still sent by kernel_sendpage() to remote end, this is problematic. The new introduced helper sendpage_ok()

[PATCH v5 1/3] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-16 Thread Coly Li
The original problem was from nvme-over-tcp code, who mistakenly uses kernel_sendpage() to send pages allocated by __get_free_pages() without __GFP_COMP flag. Such pages don't have refcount (page_count is 0) on tail pages, sending them by kernel_sendpage() may trigger a kernel panic from a corrupte

[PATCH v5 2/3] nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage()

2020-08-16 Thread Coly Li
Currently nvme_tcp_try_send_data() doesn't use kernel_sendpage() to send slab pages. But for pages allocated by __get_free_pages() without __GFP_COMP, which also have refcount as 0, they are still sent by kernel_sendpage() to remote end, this is problematic. The new introduced helper sendpage_ok()

[PATCH v5 1/3] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-16 Thread Coly Li
The original problem was from nvme-over-tcp code, who mistakenly uses kernel_sendpage() to send pages allocated by __get_free_pages() without __GFP_COMP flag. Such pages don't have refcount (page_count is 0) on tail pages, sending them by kernel_sendpage() may trigger a kernel panic from a corrupte

[PATCH v5 3/3] drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage()

2020-08-16 Thread Coly Li
In _drbd_send_page() a page is checked by following code before sending it by kernel_sendpage(), (page_count(page) < 1) || PageSlab(page) If the check is true, this page won't be send by kernel_sendpage() and handled by sock_no_sendpage(). This kind of check is exactly what macro sendpage_

  1   2   >