Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-23 Thread Jason Wang
On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote: It was noticed that the copy_user() friends that was used to access virtque

Re: [PATCH] mlxsw: spectrum_acl_bloom_filter: use struct_size() in kzalloc()

2018-12-23 Thread Gustavo A. R. Silva
On 12/24/18 1:38 AM, Ido Schimmel wrote: On Sun, Dec 23, 2018 at 11:27:41PM -0600, Gustavo A. R. Silva wrote: One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements f

Re: [PATCH] mlxsw: spectrum_acl_bloom_filter: use struct_size() in kzalloc()

2018-12-23 Thread Ido Schimmel
On Sun, Dec 23, 2018 at 11:27:41PM -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct f

Re: [PATCH v2] net: mvneta: add basic XDP_DROP support

2018-12-23 Thread Ilias Apalodimas
Hi Domagoj, > > Add initial mvneta XDP support for hardware buffer management enabled > > devices only. > > Hi Domagoj, > > I would really appreciate if we could coordinate our work on the mvneta > driver. Ilias (Cc'ed) and I are also working on adding XDP support for > this driver, although th

[Patch net] tipc: fix a double free in tipc_enable_bearer()

2018-12-23 Thread Cong Wang
bearer_disable() already calls kfree_rcu() to free struct tipc_bearer, we don't need to call kfree() again. Fixes: cb30a63384bc ("tipc: refactor function tipc_enable_bearer()") Reported-by: syzbot+b981acf1fb240c0c1...@syzkaller.appspotmail.com Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang

KASAN: use-after-free Read in __xfrm_policy_bysel_ctx

2018-12-23 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:ce28bb445388 Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=175b8d1540 kernel config: https://syzkaller.appspot.com/x/.config?x=67a2081147a23142 da

INFO: rcu detected stall in netlink_sendmsg

2018-12-23 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:ce28bb445388 Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=12662e6740 kernel config: https://syzkaller.appspot.com/x/.config?x=67a2081147a23142 da

[PATCH] mlxsw: spectrum_acl_bloom_filter: use struct_size() in kzalloc()

2018-12-23 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-23 Thread Jason Wang
On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: Just to make sure I understand this. It looks to me we should: - allow passing GIOVA->GPA through UAPI - cache GIOVA->GPA somewhere bu

[PATCH] net/net_namespace: Check the return value of register_pernet_subsys()

2018-12-23 Thread Aditya Pakki
In net_ns_init(), register_pernet_subsys() could fail while registering network namespace subsystems. The fix checks the return value and sends a panic() on failure. Signed-off-by: Aditya Pakki --- net/core/net_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net

Re: [PATCH RFC 0/3] Support fraglist GRO/GSO

2018-12-23 Thread Willem de Bruijn
On Fri, Dec 21, 2018 at 10:23 AM Steffen Klassert wrote: > > This patchset adds support to do GRO/GSO by chaining packets > of the same flow at the SKB frag_list pointer. This avoids > the overhead to merge payloads into one big packet, and > on the other end, if GSO is needed it avoids the overhe

[PATCH] net/netlink_compat: Fix a missing check of nla_parse_nested

2018-12-23 Thread Aditya Pakki
In tipc_nl_compat_sk_dump(), if nla_parse_nested() fails, it could return an error. To be consistent with other invocations of the function call, on error, the fix passes the return value upstream. Signed-off-by: Aditya Pakki --- net/tipc/netlink_compat.c | 7 +-- 1 file changed, 5 insertion

Re: [PATCH net] ieee802154: lowpan_header_create check must check daddr

2018-12-23 Thread Willem de Bruijn
On Sun, Dec 23, 2018 at 3:45 PM Alexander Aring wrote: > > Hi, > > thanks Willem to take a look into these callbacks. > > On Sun, Dec 23, 2018 at 12:52:18PM -0500, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Packet sockets may call dev_header_parse with NULL daddr. Make > > lowpan_

Re: [PATCH] net: core: Fix Spectre v1 vulnerability

2018-12-23 Thread Gustavo A. R. Silva
On 12/23/18 5:58 PM, David Miller wrote: From: Alexei Starovoitov Date: Sat, 22 Dec 2018 22:00:00 -0800 On Sat, Dec 22, 2018 at 11:03:31PM -0600, Gustavo A. R. Silva wrote: I took another look at the following patches: "net: core: Fix Spectre v1 vulnerability" "nfc: af_nfc: Fix Spectre v1

Re: [PATCH] net: core: Fix Spectre v1 vulnerability

2018-12-23 Thread David Miller
From: Alexei Starovoitov Date: Sat, 22 Dec 2018 22:00:00 -0800 > On Sat, Dec 22, 2018 at 11:03:31PM -0600, Gustavo A. R. Silva wrote: >> > I took another look at the following patches: >> > "net: core: Fix Spectre v1 vulnerability" >> > "nfc: af_nfc: Fix Spectre v1 vulnerability" >> > "can: af_ca

Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-23 Thread Florian Fainelli
Le 12/21/18 à 11:39 PM, Sergio Paracuellos a écrit : > Switch bindings for spi managed mode are using spaces instead of tabs. > Fix them to get a file with a proper kernel indentation style. > > Signed-off-by: Sergio Paracuellos Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH 00/20] drop useless LIST_HEAD

2018-12-23 Thread Julia Lawall
On Sun, 23 Dec 2018, Tom Psyborg wrote: > Why do you CC this to so many lists? Because the different files are in different subsystems. The cover letter goes to a list for each file, or to a person if there is no list. The patches go to the people and lists associated with the affected files

Re: [PATCH 00/20] drop useless LIST_HEAD

2018-12-23 Thread Tom Psyborg
Why do you CC this to so many lists? On 23/12/2018, Julia Lawall wrote: > Drop LIST_HEAD where the variable it declares is never used. > > --- > > drivers/dma/at_hdmac.c|5 - > drivers/dma/dw/core.c |1 - > drivers/dma/p

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-23 Thread Andrew Lunn
On Sun, Dec 23, 2018 at 01:29:42PM -0600, Robert Hancock wrote: > On 2018-12-23 5:23 a.m., Andrew Lunn wrote: > >On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: > >>I have a device using a KSZ9897 switch > >>(CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am > >>t

Re: [PATCH net] ieee802154: lowpan_header_create check must check daddr

2018-12-23 Thread Alexander Aring
Hi, ... > I need to admit, I never tried AF_PACKET on a lowpan interface but I > thought about it that it ends in bad things... I would like to forbid > it, because they should use RAW IPv6 sockets where at least we already > have code to check that we have at least a IPv6 header at > skb_packer_

Re: [PATCH net] ieee802154: lowpan_header_create check must check daddr

2018-12-23 Thread Alexander Aring
Hi, thanks Willem to take a look into these callbacks. On Sun, Dec 23, 2018 at 12:52:18PM -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > Packet sockets may call dev_header_parse with NULL daddr. Make > lowpan_header_ops.create fail. > Ok. > Fixes: 87a93e4eceb4 ("ieee802154: chan

[BUG] net: sungem: device driver frees DMA memory with wrong function

2018-12-23 Thread Corentin Labbe
Hello During a boot on a qemu machine, I hit the following problem: [ 21.613659] [ cut here ] [ 21.614039] DMA-API: gem :00:0f.0: device driver frees DMA memory with wrong function [device address=0x185c5402] [size=408 bytes] [mapped as page] [unmapped as

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-23 Thread Robert Hancock
On 2018-12-23 5:23 a.m., Andrew Lunn wrote: On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: I have a device using a KSZ9897 switch (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am trying to enable a bridge on some of the ports using systemd-networkd. Hi Rob

Re: [PATCH] can: af_can: Fix Spectre v1 vulnerability

2018-12-23 Thread Oliver Hartkopp
After *trying* to follow the discussion on ... https://marc.info/?l=linux-kernel&m=154554485324143&w=2 [PATCH] net: core: Fix Spectre v1 vulnerability ... I'm still not sure whether af_can.c needs this enhancement or not. Just waiting for the end of the discussion :-) Thanks to the experts! O

Re: [PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-23 Thread Deepa Dinamani
On Sat, Dec 22, 2018 at 11:31 PM Eric Dumazet wrote: > > > > On 12/21/2018 12:27 PM, Deepa Dinamani wrote: > > Al Viro mentioned that there is probably a race condition > > lurking in accesses of sk_tstamp on 32-bit machines. > > > > sock->sk_tstamp is of type ktime_t which is always an s64. > > O

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-23 Thread Heiner Kallweit
On 23.12.2018 18:28, Andrew Lunn wrote: > On Sun, Dec 23, 2018 at 06:23:18PM +0100, Heiner Kallweit wrote: >> On 23.12.2018 18:07, Andrew Lunn wrote: >>> On Sun, Dec 23, 2018 at 03:00:26PM +0100, Heiner Kallweit wrote: Currently we return immediately if callback config_init isn't defined.

[PATCH net] ieee802154: lowpan_header_create check must check daddr

2018-12-23 Thread Willem de Bruijn
From: Willem de Bruijn Packet sockets may call dev_header_parse with NULL daddr. Make lowpan_header_ops.create fail. Fixes: 87a93e4eceb4 ("ieee802154: change needed headroom/tailroom") Signed-off-by: Willem de Bruijn --- Re: function comment on packet socket address length: that is (now) veri

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-23 Thread Andrew Lunn
On Sun, Dec 23, 2018 at 06:23:18PM +0100, Heiner Kallweit wrote: > On 23.12.2018 18:07, Andrew Lunn wrote: > > On Sun, Dec 23, 2018 at 03:00:26PM +0100, Heiner Kallweit wrote: > >> Currently we return immediately if callback config_init isn't defined. > >> This prevents the fixups from being execut

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-23 Thread Heiner Kallweit
On 23.12.2018 18:07, Andrew Lunn wrote: > On Sun, Dec 23, 2018 at 03:00:26PM +0100, Heiner Kallweit wrote: >> Currently we return immediately if callback config_init isn't defined. >> This prevents the fixups from being executed. I see no dependency >> between fixups and config_init, therefore chan

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-23 Thread Andrew Lunn
On Sun, Dec 23, 2018 at 03:00:26PM +0100, Heiner Kallweit wrote: > Currently we return immediately if callback config_init isn't defined. > This prevents the fixups from being executed. I see no dependency > between fixups and config_init, therefore change the function to > run the fixups also if c

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-23 Thread Al Viro
On Sun, Dec 23, 2018 at 06:42:20PM +0200, Gal Pressman wrote: > > -17) Don't re-invent the kernel macros > > +17) Using bool > > +-- > > + > > +The Linux kernel uses the C11 standard for the bool type. bool values can > > only C99, surely?

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-23 Thread Gal Pressman
On 22-Dec-18 01:52, Jason Gunthorpe wrote: > On Thu, Dec 20, 2018 at 09:12:43PM -0800, Joe Perches wrote: >> Care to submit a coding_style.rst patch or >> improve the one below this? > > I took yours and revised it a little bit. I spent some time looking at > assembly and decided to drop the perfo

Re: [PATCH net] packet: validate address length if non-zero

2018-12-23 Thread Willem de Bruijn
On Sat, Dec 22, 2018 at 6:13 PM David Miller wrote: > > From: Willem de Bruijn > Date: Sat, 22 Dec 2018 16:53:45 -0500 > > > From: Willem de Bruijn > > > > Validate packet socket address length if a length is given. Zero > > length is equivalent to not setting an address. > > > > Fixes: 99137b78

[PATCH] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-23 Thread Ivan Mironov
This happened when I tried to boot normal Fedora 29 system with latest available kernel (from fedora rawhide, plus some unrelated custom patches): BUG: unable to handle kernel NULL pointer dereference at PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI CPU: 6 P

[PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-23 Thread Heiner Kallweit
Currently we return immediately if callback config_init isn't defined. This prevents the fixups from being executed. I see no dependency between fixups and config_init, therefore change the function to run the fixups also if config_init isn't defined. Fixes: 2f5cb43406d0 ("phylib: Properly reiniti

Re: [next] bonding: pass link-local packets to bonding master also.

2018-12-23 Thread Vincent Bernat
❦ 23 décembre 2018 14:06 +01, Michal Soltys : >>> Basing on what you wrote below, it seems that everything was already >>> possible before the Chonggang Li's commit ? >>> >>> If I understand correctly: >>> >>> - if listening on master, you could get both slave interface >>> (PACKET_ORIGDEV) as we

Re: [next] bonding: pass link-local packets to bonding master also.

2018-12-23 Thread Michal Soltys
On 18/12/20 06:55, Vincent Bernat wrote: > ❦ 19 décembre 2018 23:57 +01, Michal Soltys : > Commit b89f04c61efe ("bonding: deliver link-local packets with skb->dev set to link that packets arrived on") changed the behavior of how link-local-multicast packets are processed. The chang

[PATCH iproute2-next] rdma: Add print of link CapabilityMask2 flags

2018-12-23 Thread Leon Romanovsky
From: Michael Guralnik CapabilityMask2 is defined in IBTA spec as a member of PortInfo. Add translation to string of new CapabilityMask2 expansion of link caps. The flags are concatenated to current caps print as seen in this example printing EXT_INFO flag: root@server-22 $ rdma -d link 1/1: ml

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-23 Thread Andrew Lunn
On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: > I have a device using a KSZ9897 switch > (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am > trying to enable a bridge on some of the ports using systemd-networkd. Hi Robert I don't think many of use use such a

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/23/18 11:58 AM, Andrew Lunn wrote: >> I can also use a simple conditional, since I don't expect the number of >> HWMON properties to grow, eg. >> >> if (type == hwmon_in && attr == hwmon_in_lcrit_alarm) {...} >> if (type == hwmon_temp && attr == hwmon_temp_crit_alarm) {...} > > Yes, that is

Re: [PATCH] smsc95xx: Add support for automated PHY address detection

2018-12-23 Thread Marek Vasut
On 12/23/18 11:56 AM, Andrew Lunn wrote: > On Sun, Dec 23, 2018 at 11:43:05AM +0100, Marek Vasut wrote: >> On 12/23/18 11:23 AM, Andrew Lunn wrote: > +static int smsc95xx_phy_address(struct usbnet *dev) > +{ > + u32 read_buf; > + int ret, id1, id2, phyad; > + > + ret = smsc9

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Andrew Lunn
> I can also use a simple conditional, since I don't expect the number of > HWMON properties to grow, eg. > > if (type == hwmon_in && attr == hwmon_in_lcrit_alarm) {...} > if (type == hwmon_temp && attr == hwmon_temp_crit_alarm) {...} Yes, that is fine. Please make sure you Cc: the HWMON maintai

Re: [PATCH] smsc95xx: Add support for automated PHY address detection

2018-12-23 Thread Andrew Lunn
On Sun, Dec 23, 2018 at 11:43:05AM +0100, Marek Vasut wrote: > On 12/23/18 11:23 AM, Andrew Lunn wrote: > >>> +static int smsc95xx_phy_address(struct usbnet *dev) > >>> +{ > >>> + u32 read_buf; > >>> + int ret, id1, id2, phyad; > >>> + > >>> + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); > >>>

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/23/18 11:35 AM, Andrew Lunn wrote: >> Given that the HWMON indicates that the automotive device either >> overheated or suffered undervolt, I presume it'd be safer not to make it >> optional ? > > Hi Marek > > It is a niche device, where i expect a custom kernel configuration. Do > any of t

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/23/18 11:06 AM, Andrew Lunn wrote: >>> + switch (attr) { >>> + case hwmon_in_lcrit_alarm: >>> + ret = phy_read(phydev, MII_INTSRC); >>> + if (ret < 0) >>> + return ret; >>> + >>> + *value = !!(ret & MII_INTSRC_TEMP_ERR); >>> + retu

Re: [PATCH] smsc95xx: Add support for automated PHY address detection

2018-12-23 Thread Marek Vasut
On 12/23/18 11:23 AM, Andrew Lunn wrote: >>> +static int smsc95xx_phy_address(struct usbnet *dev) >>> +{ >>> + u32 read_buf; >>> + int ret, id1, id2, phyad; >>> + >>> + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); >>> + if (ret < 0) >>> + return ret; >>> + >>> + /* Check if

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Andrew Lunn
> Given that the HWMON indicates that the automotive device either > overheated or suffered undervolt, I presume it'd be safer not to make it > optional ? Hi Marek It is a niche device, where i expect a custom kernel configuration. Do any of these devices exist on standard PCIe cards? Maybe a tes

Re: [PATCH] smsc95xx: Add support for automated PHY address detection

2018-12-23 Thread Andrew Lunn
> > +static int smsc95xx_phy_address(struct usbnet *dev) > > +{ > > + u32 read_buf; > > + int ret, id1, id2, phyad; > > + > > + ret = smsc95xx_read_reg(dev, HW_CFG, &read_buf); > > + if (ret < 0) > > + return ret; > > + > > + /* Check if using external PHY, if not, use internal

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/23/18 10:41 AM, Heiner Kallweit wrote: > On 23.12.2018 10:16, Marek Vasut wrote: >> On 12/22/18 6:39 PM, Heiner Kallweit wrote: >>> On 22.12.2018 00:35, Marek Vasut wrote: Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special BroadRReach 100BaseT1 PHYs used in auto

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Andrew Lunn
> > + switch (attr) { > > + case hwmon_in_lcrit_alarm: > > + ret = phy_read(phydev, MII_INTSRC); > > + if (ret < 0) > > + return ret; > > + > > + *value = !!(ret & MII_INTSRC_TEMP_ERR); > > + return 0; > > + case hwmon_temp_crit_alarm:

Re: [PATCH 3/8] net: dsa: adding handling of second CPU-Port

2018-12-23 Thread Frank Wunderlich
Hi, I got mail from kernelci regarding a null-pointer exception in dsa_slave_create. I'm sure thats from uninitialized ethernet-option (maybe by missing dts-option). struct net_device *master = ds->ports[port->upstream].ethernet; Which is defined in new function dsa_user_parse. maybe a good plac

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Andrew Lunn
> >>> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > >>> + if (!priv) > >>> + return -ENOMEM; > >>> + > >>> + priv->hwmon_name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL); > >>> + if (!priv->hwmon_name) > >>> + return -ENODEV; > >> > >> Do you really need to make a copy

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Heiner Kallweit
On 23.12.2018 10:16, Marek Vasut wrote: > On 12/22/18 6:39 PM, Heiner Kallweit wrote: >> On 22.12.2018 00:35, Marek Vasut wrote: >>> Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special >>> BroadRReach 100BaseT1 PHYs used in automotive. >>> >>> Signed-off-by: Marek Vasut >>> Cc:

Re: [PATCH 02/20] net/mlx5e: drop useless LIST_HEAD

2018-12-23 Thread Leon Romanovsky
On Sun, Dec 23, 2018 at 09:56:57AM +0100, Julia Lawall wrote: > Drop LIST_HEAD where the variable it declares is never used. > > These became useless in 244cd96adb5f ("net_sched: remove list_head > from tc_action") > > The semantic patch that fixes this problem is as follows: > (http://coccinelle.l

[PATCH 02/20] net/mlx5e: drop useless LIST_HEAD

2018-12-23 Thread Julia Lawall
Drop LIST_HEAD where the variable it declares is never used. These became useless in 244cd96adb5f ("net_sched: remove list_head from tc_action") The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fix

[PATCH 00/20] drop useless LIST_HEAD

2018-12-23 Thread Julia Lawall
Drop LIST_HEAD where the variable it declares is never used. --- drivers/dma/at_hdmac.c|5 - drivers/dma/dw/core.c |1 - drivers/dma/pl330.c |1 - drivers/dma/sa11x0-dma.c

[PATCH 19/20] net/mlx4_core: drop useless LIST_HEAD

2018-12-23 Thread Julia Lawall
Drop LIST_HEAD where the variable it declares has never been used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by gues

[PATCH 20/20] cw1200: drop useless LIST_HEAD

2018-12-23 Thread Julia Lawall
Drop LIST_HEAD where the variable it declares has never been used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chips

[PATCH 16/20] mlxsw: spectrum: drop useless LIST_HEAD

2018-12-23 Thread Julia Lawall
Drop LIST_HEAD where the variable it declares is never used. The uses were removed in 244cd96adb5f ("net_sched: remove list_head from tc_action"), but not the declaration. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x

Re: [PATCH] smsc95xx: Add support for automated PHY address detection

2018-12-23 Thread Marek Vasut
On 9/11/18 12:12 PM, Marek Vasut wrote: > The SMSC95xx chip can use either the internal PHY or an external one. > Currently, the driver hard-codes support for the internal PHY only. > > This patch reads out the HW_CFG register to determine whether external > PHY is attached or not. If an external

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/22/18 9:51 PM, Heiner Kallweit wrote: > On 22.12.2018 00:35, Marek Vasut wrote: >> Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special >> BroadRReach 100BaseT1 PHYs used in automotive. >> >> Signed-off-by: Marek Vasut >> Cc: Andrew Lunn >> Cc: Florian Fainelli >> Cc: He

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/22/18 6:39 PM, Heiner Kallweit wrote: > On 22.12.2018 00:35, Marek Vasut wrote: >> Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special >> BroadRReach 100BaseT1 PHYs used in automotive. >> >> Signed-off-by: Marek Vasut >> Cc: Andrew Lunn >> Cc: Florian Fainelli >> Cc: He

Re: [PATCH V2] net: phy: tja11xx: Add TJA11xx PHY driver

2018-12-23 Thread Marek Vasut
On 12/22/18 6:24 PM, Heiner Kallweit wrote: > On 22.12.2018 00:22, Marek Vasut wrote: >> On 12/15/2018 06:38 PM, Heiner Kallweit wrote: >>> On 15.12.2018 18:01, Andrew Lunn wrote: > +static struct tja11xx_phy_stats tja11xx_hw_stats[] = { > + { "phy_symbol_error_count", 20, 0, 0x },

[PATCH rdma-next v1 4/5] RDMA/mlx5: Embed into the code flow the ODP config option

2018-12-23 Thread Leon Romanovsky
From: Leon Romanovsky Convert various places to more readable code, which embeds CONFIG_INFINIBAND_ON_DEMAND_PAGING into the code flow. Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/uverbs_cmd.c | 3 -- drivers/infiniband/hw/mlx5/main.c| 41 ++-- drive

[PATCH mlx5-next v1 5/5] RDMA/mlx5: Delete declaration of already removed function

2018-12-23 Thread Leon Romanovsky
From: Leon Romanovsky The implementation of mlx5_core_page_fault_resume() was removed in commit d5d284b829a6 ("{net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA"). This patch removes declaration too. Fixes: d5d284b829a6 ("{net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA") Signed-off

[PATCH rdma-next v1 0/5] Cleanup of CONFIG_INFINIBAND_ON_DEMAND_PAGING usage

2018-12-23 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v0->v1: * Don't set ODP caps always (patch #2) * Set invalidate_range callback based on device_cap only --- Hi, As a followup to Jason's request to rethink CONFIG_INFINIBAND_ON_DEMAND_

[PATCH rdma-next v1 2/5] RDMA/core: Don't depend device ODP capabilities on kconfig option

2018-12-23 Thread Leon Romanovsky
From: Leon Romanovsky Device capability bits are exposing what specific device supports from HW perspective. Those bits are not dependent on kernel configurations and RDMA/core should ensure that proper interfaces to users will be disabled if CONFIG_INFINIBAND_ON_DEMAND_PAGING is not set. Fixes:

[PATCH rdma-next v1 3/5] RDMA/mlx5: Introduce and reuse helper to identify ODP MR

2018-12-23 Thread Leon Romanovsky
From: Leon Romanovsky Consolidate various checks if MR is ODP backed to one simple helper and update call sites to use it. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 10 ++ drivers/infiniband/hw/mlx5/mr.c | 29 ++-- drivers/in

[PATCH rdma-next v1 1/5] RDMA: Clean structures from CONFIG_INFINIBAND_ON_DEMAND_PAGING

2018-12-23 Thread Leon Romanovsky
From: Leon Romanovsky CONFIG_INFINIBAND_ON_DEMAND_PAGING is used in general structures to micro-optimize the memory footprint. Remove it, so it will allow us to simplify various ODP device flows. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 -- include/rdma/ib_ve

[PATCH] iptunnel: Set tun_flags in the iptunnel_metadata_reply from src

2018-12-23 Thread wenxu
From: wenxu ip l add tun type gretap external ip r a 10.0.0.2 encap ip id 1000 dst 172.168.0.2 key dev tun ip a a 10.0.0.1/24 dev tun The peer arp request to 10.0.0.1 with tunnel_id, but the arp reply only set the tun_id but not the tun_flags with TUNNEL_KEY. The arp reply packet don't contain t