Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Corentin Labbe
On Mon, Mar 27, 2017 at 06:06:05PM +0100, Joao Pinto wrote: > Às 6:00 PM de 3/27/2017, Corentin Labbe escreveu: > > On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: > >> Hi David, > >> > >> Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: > >>> On Fri, Mar 24, 2017 at 05:16:45PM +,

[PATCH next 4/5] bonding: correctly update link status during mii-commit phase

2017-03-27 Thread Mahesh Bandewar
From: Mahesh Bandewar bond_miimon_commit() marks the link UP after attempting to get the speed and duplex settings for the link. There is a possibility that bond_update_speed_duplex() could fail. This is another place where it could result into an inconsistent bonding link

[PATCH next 5/5] bonding: avoid printing while holding a spinlock

2017-03-27 Thread Mahesh Bandewar
From: Mahesh Bandewar Signed-off-by: Mahesh Bandewar --- drivers/net/bonding/bond_3ad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index

[PATCH next 2/5] bonding: improve link-status update in mii-monitoring

2017-03-27 Thread Mahesh Bandewar
From: Mahesh Bandewar The primary issue is that mii-inspect phase updates link-state and expects changes to be committed during the mii-commit phase. After the inspect phase if it fails to acquire rtnl-mutex, the commit phase (bond_mii_commit) doesn't get to run. This

[PATCH next 1/5] bonding: split bond_set_slave_link_state into two parts

2017-03-27 Thread Mahesh Bandewar
From: Mahesh Bandewar Split the function into two (a) propose (b) commit phase without changing the semantics for the original API. Signed-off-by: Mahesh Bandewar --- include/net/bonding.h | 22 +- 1 file changed, 17 insertions(+), 5

[PATCH next 0/5] link-status fixes for mii-monitoring

2017-03-27 Thread Mahesh Bandewar
From: Mahesh Bandewar The mii monitoring is divided into two phases - inspect and commit. The inspect phase technically should not make any changes to the state and defer it to the commit phase. However detected link state inconsistencies on several machines and discovered

[PATCH next 3/5] bonding: make speed, duplex setting consistent with link state

2017-03-27 Thread Mahesh Bandewar
From: Mahesh Bandewar bond_update_speed_duplex() retrieves speed and duplex settings. There is a possibility of failure in retrieving these values but caller has to assume it's always successful. This leads to having inconsistent slave link settings. If these (speed, duplex)

Re: Extending socket timestamping API for NTP

2017-03-27 Thread Richard Cochran
On Mon, Mar 27, 2017 at 09:25:03AM -0700, Denny Page wrote: > I agree that the values in the igb driver are incorrect. They were > middle of the range values from the old tables. At least for 100Mb, > Intel seems to know that the original table was incorrect. I’ve done > extensive measurements of

[RFC PATCH iproute2 net-next] tc flower: support for matching MPLS

2017-03-27 Thread Benjamin LaHaise
[RFC until kernel code is accepted/rejected] This patch adds support to the iproute2 tc filter command for matching MPLS labels in the flower classifier. The ability to match the Time To Live, Bottom Of Stack, Traffic Control and Label fields are added as options to the flower filter.

[PATCH net-next 2/2] cls_flower: add support for matching MPLS labels

2017-03-27 Thread Benjamin LaHaise
Add support to tc flower to match based on fields in MPLS labels (TTL, Bottom of Stack, TC field, Label). Signed-off-by: Benjamin LaHaise Signed-off-by: Benjamin LaHaise Reviewed-by: Simon Horman Reviewed-by: Jakub

Re: [PATCH ethtool] ethtool: Support for configurable RSS hash function

2017-03-27 Thread John W. Linville
On Sat, Mar 25, 2017 at 02:50:47PM -0700, Jakub Kicinski wrote: > On Wed, 8 Mar 2017 16:03:51 +0200, Gal Pressman wrote: > > This ethtool patch adds support to set and get the current RSS hash > > function for the device through the new hfunc mask field in the > > ethtool_rxfh struct. Kernel

[PATCH net-next 1/2] flow_dissector: add mpls support

2017-03-27 Thread Benjamin LaHaise
Add support for parsing MPLS flows to the flow dissector in preparation for adding MPLS match support to cls_flower. Signed-off-by: Benjamin LaHaise Signed-off-by: Benjamin LaHaise Reviewed-by: Simon Horman

Re: [PATCH RFC v2 1/3] net: phy: avoid setting unsupported EEE advertisments

2017-03-27 Thread Florian Fainelli
On 03/27/2017 02:58 AM, Russell King wrote: > We currently allow userspace to set any EEE advertisments it desires, > whether or not the PHY supports them. For example: > > # ethtool --set-eee eth1 advertise 0x > # ethtool --show-eee eth1 > EEE Settings for eth1: > EEE status:

Re: [PATCH RFC v2 3/3] net: phy: allow EEE with SGMII interface modes

2017-03-27 Thread Florian Fainelli
On 03/27/2017 10:00 AM, Russell King - ARM Linux wrote: > On Mon, Mar 27, 2017 at 09:47:31AM -0700, Florian Fainelli wrote: >> On 03/27/2017 02:59 AM, Russell King wrote: >>> As EEE is able to work in SGMII mode as well, add it to the list of >>> permissable EEE modes that phy_init_eee() will

Re: [PATCH RFC v2 2/3] net: phy: restart phy autonegotiation after EEE advertisment change

2017-03-27 Thread Florian Fainelli
On 03/27/2017 02:58 AM, Russell King wrote: > When the EEE advertisment is changed, we should restart autonegotiation > to update the link partner with the new EEE settings. Add this trigger > but only if the advertisment has changed. > > Signed-off-by: Russell King

[PATCH net] MAINTAINERS: Add Andrew Lunn as co-maintainer of PHYLIB

2017-03-27 Thread Florian Fainelli
Andrew has been contributing a lot to PHYLIB over the past months and his feedback on patches is more than welcome. Signed-off-by: Florian Fainelli --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Joao Pinto
Às 6:28 PM de 3/27/2017, David Miller escreveu: > From: Corentin Labbe > Date: Mon, 27 Mar 2017 19:00:58 +0200 > >> On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: >>> Hi David, >>> >>> Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: On Fri, Mar 24,

Re: [PATCH 1/1] ethtool : added get_phy_stats,get_strings,get_sset_count

2017-03-27 Thread Andrew Lunn
On Mon, Mar 27, 2017 at 09:44:37AM -0700, Florian Fainelli wrote: > Hello, > > On 03/27/2017 03:12 AM, Thomas Scariah wrote: > > From: "Scariah, Thomas" > > > > Added functions to support ethtool to print the phy statistics and error > > information along with other

Re: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread David Daney
On 03/27/2017 10:11 AM, Christoph Hellwig wrote: On Mon, Mar 27, 2017 at 09:59:35AM -0700, David Daney wrote: On 03/27/2017 01:29 AM, Christoph Hellwig wrote: Unused now that all callers switched to pci_alloc_irq_vectors. And you are aware that the ThunderX GPIO driver that I am attempting

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread David Miller
From: Corentin Labbe Date: Mon, 27 Mar 2017 19:00:58 +0200 > On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: >> Hi David, >> >> Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: >> > On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: >> >> For

Re: [PATCH 1/1] ethtool : added get_phy_stats,get_strings,get_sset_count

2017-03-27 Thread Andrew Lunn
> > static int cpsw_get_sset_count(struct net_device *ndev, int sset) > > { > > + struct cpsw_priv *priv = netdev_priv(ndev); > > + int slave_no = cpsw_slave_index(priv); > > + int count; > > + > > switch (sset) { > > case ETH_SS_STATS: > > - return CPSW_STATS_LEN; > > +

Re: [PATCH 1/5] net: thunderx: switch to pci_alloc_irq_vectors

2017-03-27 Thread Christoph Hellwig
On Mon, Mar 27, 2017 at 09:33:32PM +0530, Sunil Kovvuri wrote: > How urgent is this ? I would like to get this into 4.12 to stop people from adding new users of pci_enable_msix. > Can we comeup with a proper patch to fix this in couple of weeks, instead of > going with these untested patches ?

Re: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread 'Christoph Hellwig'
On Mon, Mar 27, 2017 at 03:03:30PM +, David Laight wrote: > Indeed, but pci_enable_msix_range() only appeared in 3.14. > We have to support a wide range of kernels. > I think we've finally managed to get most of our customers off 2.6.18. That's your problem, not that of upstream kernel

Re: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread Christoph Hellwig
On Mon, Mar 27, 2017 at 09:59:35AM -0700, David Daney wrote: > On 03/27/2017 01:29 AM, Christoph Hellwig wrote: >> Unused now that all callers switched to pci_alloc_irq_vectors. >> > > And you are aware that the ThunderX GPIO driver that I am attempting to > merge uses this interface. > > If this

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Joao Pinto
Às 6:00 PM de 3/27/2017, Corentin Labbe escreveu: > On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: >> Hi David, >> >> Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: >>> On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: For cores that have more than 1 TX queue

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Corentin Labbe
On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: > Hi David, > > Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: > > On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: > >> For cores that have more than 1 TX queue configured, the kernel would > >> crash, > >> since only one

[PATCH] net: ipconfig: fix ic_close_devs() use-after-free

2017-03-27 Thread Mark Rutland
Our chosen ic_dev may be anywhere in our list of ic_devs, and we may free it before attempting to close others. When we compare d->dev and ic_dev->dev, we're potentially dereferencing memory returned to the allocator. This causes KASAN to scream for each subsequent ic_dev we check. As there's a

Re: [PATCH RFC v2 3/3] net: phy: allow EEE with SGMII interface modes

2017-03-27 Thread Russell King - ARM Linux
On Mon, Mar 27, 2017 at 09:47:31AM -0700, Florian Fainelli wrote: > On 03/27/2017 02:59 AM, Russell King wrote: > > As EEE is able to work in SGMII mode as well, add it to the list of > > permissable EEE modes that phy_init_eee() will accept. This is > > necessary so that EEE can work with an

Re: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread David Daney
On 03/27/2017 01:29 AM, Christoph Hellwig wrote: Unused now that all callers switched to pci_alloc_irq_vectors. And you are aware that the ThunderX GPIO driver that I am attempting to merge uses this interface. If this patch gets merged, should I ask to revert it when the GPIO driver goes

in_irq_or_nmi()

2017-03-27 Thread Matthew Wilcox
On Mon, Mar 27, 2017 at 05:15:00PM +0200, Jesper Dangaard Brouer wrote: > And I also verified it worked: > > 0.63 │ mov__preempt_count,%eax >│ free_hot_cold_page(): > 1.25 │ test $0x1f,%eax >│ ↓ jne1e4 > > And this simplification also made

Re: [PATCH RFC v2 3/3] net: phy: allow EEE with SGMII interface modes

2017-03-27 Thread Florian Fainelli
On 03/27/2017 02:59 AM, Russell King wrote: > As EEE is able to work in SGMII mode as well, add it to the list of > permissable EEE modes that phy_init_eee() will accept. This is > necessary so that EEE can work with an 88E1512 connected in SGMII mode. As you mention in your cover letter, we

Re: [PATCH 1/1] ethtool : added get_phy_stats,get_strings,get_sset_count

2017-03-27 Thread Florian Fainelli
Hello, On 03/27/2017 03:12 AM, Thomas Scariah wrote: > From: "Scariah, Thomas" > > Added functions to support ethtool to print the phy statistics and error > information along with other ethtool statistics. This will help ethtool > information to know the error is

Re: Extending socket timestamping API for NTP

2017-03-27 Thread Denny Page
> On Mar 27, 2017, at 07:29, Richard Cochran wrote: > > At the end of the day, the correction in the igb driver is useless and > even harmful. Why? Because if the app cares about this level of > accuracy, it is going to have to implement special logic anyhow, and >

RE: [net-next 05/11] i40e: fix for queue timing delays

2017-03-27 Thread Wyborny, Carolyn
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Saturday, March 25, 2017 8:01 PM > To: Kirsher, Jeffrey T > Cc: Wyborny, Carolyn ; > netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com; >

Re: [PATCH 1/5] net: thunderx: switch to pci_alloc_irq_vectors

2017-03-27 Thread Sunil Kovvuri
On Mon, Mar 27, 2017 at 1:59 PM, Christoph Hellwig wrote: > Remove the deprecated pci_enable_msix API in favour of it's successor. > > Signed-off-by: Christoph Hellwig > --- > drivers/net/ethernet/cavium/thunder/nic_main.c | 75 > ++ > 1 file

Re: [PATCH 1/7] Documentation: dt: net: Update the ath9k binding for SoC devices

2017-03-27 Thread Christian Lamparter
On Monday, March 13, 2017 10:05:09 PM CEST Alban wrote: > The current binding only cover PCI devices so extend it for SoC devices. > > Most SoC platforms use an MTD partition for the calibration data > instead of an EEPROM. The qca,no-eeprom property was added to allow > loading the EEPROM

Re: [PATCHv2 net-next 2/7] sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter

2017-03-27 Thread Xin Long
On Mon, Mar 27, 2017 at 10:16 PM, Marcelo Ricardo Leitner wrote: > On Mon, Mar 27, 2017 at 12:48:31PM +0800, Xin Long wrote: >> On Sat, Mar 25, 2017 at 7:52 AM, Marcelo Ricardo Leitner >> wrote: >> > On Tue, Mar 21, 2017 at 01:44:32PM +0800,

Re: [PATCH RFC v4 06/10] net: qualcomm: make qca_common a separate kernel module

2017-03-27 Thread Dan Williams
On Mon, 2017-03-27 at 15:37 +0200, Stefan Wahren wrote: > In order to share common functions between QCA7000 SPI and UART > protocol > driver the qca_common needs to be a separate kernel module. Maybe "qca_eth_common"? There are many things Qualcomm, slightly fewer things Qualcomm Atheros, and

Re: [PATCH net-next v3 3/3] net: phy: Allow splitting MDIO bus/device support from PHYs

2017-03-27 Thread Arnd Bergmann
On Thu, Mar 23, 2017 at 6:01 PM, Florian Fainelli wrote: > Introduce a new configuration symbol: MDIO_DEVICE which allows building > the MDIO devices and bus code, without pulling in the entire Ethernet > PHY library and devices code. > > PHYLIB nows select MDIO_DEVICE and

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Joao Pinto
Hi David, Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: > On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: >> For cores that have more than 1 TX queue configured, the kernel would crash, >> since only one TX queue is permitted by default. >> >> Signed-off-by: Joao Pinto

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Jesper Dangaard Brouer
On Mon, 27 Mar 2017 07:15:18 -0700 Matthew Wilcox wrote: > On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > > > > +static __always_inline int in_irq_or_nmi(void) > > +{ > > + return in_irq() || in_nmi(); > > +// XXX: hoping compiler will optimize

RE: [PATCH] net: netfilter: Remove multiple assignment.

2017-03-27 Thread David Laight
From: Pablo Neira Ayuso > Sent: 27 March 2017 13:08 > On Sat, Mar 25, 2017 at 06:19:47PM +0530, Arushi Singhal wrote: > > This patch removes multiple assignments. > > Done using coccinelle. > > @@ > > identifier i1,i2; > > constant c; > > @@ > > - i1=i2=c; > > + i1=c; > > + i2=c; > > You have to

RE: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread David Laight
From: 'Christoph Hellwig' > Sent: 27 March 2017 15:52 > On Mon, Mar 27, 2017 at 02:06:45PM +, David Laight wrote: > > Apart from all the 'out of tree' drivers that will need > > fixing and a conditional compile added. > > That has never been a reason for stopping linux kernel changes. I'm

Re: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread 'Christoph Hellwig'
On Mon, Mar 27, 2017 at 02:06:45PM +, David Laight wrote: > Apart from all the 'out of tree' drivers that will need > fixing and a conditional compile added. That has never been a reason for stopping linux kernel changes. Never mind that your out of tree drivers should probably never have

Re: [PATCH net-next 1/4] net: mpls: Convert number of nexthops to u8

2017-03-27 Thread David Ahern
On 3/26/17 9:11 PM, Eric W. Biederman wrote: > I don't like this. Byte writes don't exist on all architectures. > > So while I think always writing to rtn_nhn_alive under the > rtn_lock ensures that we don't have wrong values written > it is quite subtle. And I don't know how this will interact

Re: Extending socket timestamping API for NTP

2017-03-27 Thread Richard Cochran
On Mon, Mar 27, 2017 at 12:13:24PM +0200, Miroslav Lichvar wrote: > On Fri, Mar 24, 2017 at 10:17:51AM -0700, Denny Page wrote: > > I should have remembered this yesterday... I went and looked at my favorite > > driver, Intel's igb. Not only is the igb driver already caching link speed, > > it

Re: [PATCH] Bluetooth: fix assignments on error variable err

2017-03-27 Thread Marcel Holtmann
Hi Colin, > Variable err is being initialized to zero and then later being > set to the error return from the call to hci_req_run_skb; hence > we can remove the redundant initialization to zero. > > Also on two occassions err is not being set from the error return > from the call to

Re: [PATCH net-next 0/4] net: mpls: Allow users to configure more labels per route

2017-03-27 Thread David Ahern
On 3/27/17 4:39 AM, Robert Shearman wrote: > On 25/03/17 19:15, Eric W. Biederman wrote: >> David Ahern writes: >> >>> Bump the maximum number of labels for MPLS routes from 2 to 12. To keep >>> memory consumption in check the labels array is moved to the end of >>>

Re: [PATCHv2 net-next 2/7] sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter

2017-03-27 Thread Marcelo Ricardo Leitner
On Mon, Mar 27, 2017 at 12:48:31PM +0800, Xin Long wrote: > On Sat, Mar 25, 2017 at 7:52 AM, Marcelo Ricardo Leitner > wrote: > > On Tue, Mar 21, 2017 at 01:44:32PM +0800, Xin Long wrote: > >> On Tue, Mar 21, 2017 at 2:04 AM, Marcelo Ricardo Leitner > >>

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Matthew Wilcox
On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > > +static __always_inline int in_irq_or_nmi(void) > +{ > + return in_irq() || in_nmi(); > +// XXX: hoping compiler will optimize this (todo verify) into: > +// #define in_irq_or_nmi() (preempt_count() & (HARDIRQ_MASK

Re: [PATCH v7 0/6] Bluetooth: 6LoWPAN: Fix lladdr length

2017-03-27 Thread Marcel Holtmann
Hi Luiz, > These patches fixes lladdr length to be 6 bytes long and not 8 which cause > neighbor advertisement to be sent with wrong lladdr including FF:FE filler > bytes for eui64. > > Note: This does not fix some of the existing crashes which I hope to address > in a different set. > > v2:

Re: [PATCH 05/18] net, bluetooth: convert rfcomm_dlc.refcnt from atomic_t to refcount_t

2017-03-27 Thread Marcel Holtmann
Hi Elena, > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. > > Signed-off-by: Elena Reshetova

RE: [PATCH 5/5] PCI: remove pci_enable_msix

2017-03-27 Thread David Laight
From: Christoph Hellwig > Sent: 27 March 2017 09:30 > > Unused now that all callers switched to pci_alloc_irq_vectors. Apart from all the 'out of tree' drivers that will need fixing and a conditional compile added. At least give us a couple of kernel versions to get it sorted. David

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-27 Thread David Ahern
On 3/27/17 6:42 AM, Dmitry Vyukov wrote: > A friendly ping. This still happens all the time for us. Haven't looked at this in a couple of weeks. I have syzkaller installed on a machine locally and never was able to reproduce this ipv6 problem. I am using a jessie rootfs; from the syzkaller files

[PATCH RFC v4 09/10] tty: serdev-ttyport: return actual baudrate from ttyport_set_baudrate

2017-03-27 Thread Stefan Wahren
Instead of returning the requested baudrate, we better return the actual one because it isn't always the same. Signed-off-by: Stefan Wahren --- drivers/tty/serdev/serdev-ttyport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH RFC v4 02/10] net: qca_debug: use net_device_ops instead of direct call

2017-03-27 Thread Stefan Wahren
There is no need to export qcaspi_netdev_open and qcaspi_netdev_close because they are also accessible via the net_device_ops. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_debug.c | 5 +++-- drivers/net/ethernet/qualcomm/qca_spi.h | 3 --- 2 files

[PATCH RFC v4 08/10] net: qualcomm: add QCA7000 UART driver

2017-03-27 Thread Stefan Wahren
This patch adds the Ethernet over UART driver for the Qualcomm QCA7000 HomePlug GreenPHY. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Kconfig | 10 + drivers/net/ethernet/qualcomm/Makefile | 2 + drivers/net/ethernet/qualcomm/qca_common.h |

[PATCH RFC v4 00/10] net: qualcomm: add QCA7000 UART driver

2017-03-27 Thread Stefan Wahren
The Qualcomm QCA7000 HomePlug GreenPHY supports two interfaces: UART and SPI. This patch series adds the missing support for UART. This driver based on the Qualcomm code [1], but contains some changes: * use random MAC address per default * use net_device_stats from device * share frame decoding

[PATCH RFC v4 05/10] net: qualcomm: prepare frame decoding for UART driver

2017-03-27 Thread Stefan Wahren
Unfortunately the frame format is not exactly identical between SPI and UART. In case of SPI there is an additional HW length at the beginning. So store the initial state to make the decoding state machine more flexible and easy to extend for UART support. Signed-off-by: Stefan Wahren

[PATCH RFC v4 07/10] dt-bindings: net: add binding for QCA7000 UART

2017-03-27 Thread Stefan Wahren
This is the serdev binding for the QCA7000 UART driver (Ethernet over UART). Signed-off-by: Stefan Wahren --- According to this binding are still some questions: Where should be the optional hardware flow control defined (at master or slave side)? Is it okay to have

[PATCH RFC v4 04/10] net: qualcomm: rename qca_framing.c to qca_common.c

2017-03-27 Thread Stefan Wahren
As preparation for the upcoming UART driver we need a module which contains common functions for both interfaces. The module qca_framing is a good candidate but renaming to qca_common would make it clear. Signed-off-by: Stefan Wahren ---

[PATCH RFC v4 03/10] net: qualcomm: move qcaspi_tx_cmd to qca_spi.c

2017-03-27 Thread Stefan Wahren
The function qcaspi_tx_cmd() is only called from qca_spi.c. So we better move it there. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.c | 24 drivers/net/ethernet/qualcomm/qca_7k.h | 1 -

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Mel Gorman
On Mon, Mar 27, 2017 at 02:39:47PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 27 Mar 2017 10:55:14 +0200 > Jesper Dangaard Brouer wrote: > > > A possible solution, would be use the local_bh_{disable,enable} instead > > of the {preempt_disable,enable} calls. But it is

[PATCH RFC v4 10/10] tty: serdev: add functions to retrieve common UART settings

2017-03-27 Thread Stefan Wahren
Currently serdev core doesn't provide functions to retrieve common UART settings like data bits, stop bits or parity. This patch adds the interface to the core and the necessary implementation for serdev-ttyport. Signed-off-by: Stefan Wahren --- drivers/tty/serdev/core.c

[PATCH RFC v4 06/10] net: qualcomm: make qca_common a separate kernel module

2017-03-27 Thread Stefan Wahren
In order to share common functions between QCA7000 SPI and UART protocol driver the qca_common needs to be a separate kernel module. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Kconfig | 8 +++- drivers/net/ethernet/qualcomm/Makefile | 5

[PATCH RFC v4 01/10] net: qualcomm: remove unnecessary includes

2017-03-27 Thread Stefan Wahren
Most of the includes in qca_7k.c are unnecessary so we better remove them. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/qca_7k.c

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Joao Pinto
gt; u32 work_done = 0; >>>>>>> u32 queue = 0; >>>>>>> -- >>>>>>> 2.9.3 >>>>>>> >>>>>> >>>>>> This patch fix the performance issue on dwmac-sun8i only. >>

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Joao Pinto
gt;>>> >>>>> This patch fix the performance issue on dwmac-sun8i only. >>>> >>>> Ok, great! >>>> >>> >>> Sorry, in the we, I see that my gigabit dwmac-sun8i didnt work... (but >>> didnt have time to find why). >>&g

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Niklas Cassel
gt; -- >>>>> 2.9.3 >>>>> >>>> >>>> This patch fix the performance issue on dwmac-sun8i only. >>> >>> Ok, great! >>> >> >> Sorry, in the we, I see that my gigabit dwmac-sun8i didnt work... (but didnt >> have t

Re: [PATCH v2] xfrm: branchless addr4_match() on 64-bit

2017-03-27 Thread Alexey Dobriyan
On Mon, Mar 27, 2017 at 1:37 PM, Steffen Klassert wrote: > On Sat, Mar 25, 2017 at 07:41:17PM +0300, Alexey Dobriyan wrote: >> After (no branches): >> >> movr8d,0x20 >> movrdx,0x >> movesi,DWORD PTR [rsi+0x2c] >>

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-27 Thread Dmitry Vyukov
On Wed, Mar 8, 2017 at 12:55 PM, Dmitry Vyukov wrote: > On Tue, Mar 7, 2017 at 9:00 PM, Dmitry Vyukov wrote: >> On Tue, Mar 7, 2017 at 8:30 PM, Dmitry Vyukov wrote: > On 3/7/17 11:13 AM, Dmitry Vyukov wrote: >>> on this

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Jesper Dangaard Brouer
On Mon, 27 Mar 2017 10:55:14 +0200 Jesper Dangaard Brouer wrote: > A possible solution, would be use the local_bh_{disable,enable} instead > of the {preempt_disable,enable} calls. But it is slower, using numbers > from [1] (19 vs 11 cycles), thus the expected cycles saving is

Re: [PATCH 0/2] netfilter: Remove unnecessary cast on void pointer

2017-03-27 Thread Pablo Neira Ayuso
On Tue, Mar 21, 2017 at 05:49:52PM +0530, simran singhal wrote: > This patch series remove unnecessary cast on void pointer. > > simran singhal (2): > netfilter: ipset: Remove unnecessary cast on void pointer > netfilter: Remove unnecessary cast on void pointer Please, merge this two patches

[PATCH v2] net: moxa: fix TX overrun memory leak

2017-03-27 Thread Jonas Jensen
moxart_mac_start_xmit() doesn't care where tx_tail is, tx_head can catch and pass tx_tail, which is bad because moxart_tx_finished() isn't guaranteed to catch up on freeing resources from tx_tail. Add a check in moxart_mac_start_xmit() stopping the queue at the end of the circular buffer. Wake it

Re: Page allocator order-0 optimizations merged

2017-03-27 Thread Mel Gorman
On Mon, Mar 27, 2017 at 10:55:14AM +0200, Jesper Dangaard Brouer wrote: > On Mon, 27 Mar 2017 03:32:47 -0400 (EDT) > Pankaj Gupta wrote: > > > Hello, > > > > It looks like a race with softirq and normal process context. > > > > Just thinking if we really want allocations

Re: [Outreachy kernel] Re: [PATCH] net: netfilter: Remove multiple assignment.

2017-03-27 Thread Pablo Neira Ayuso
On Mon, Mar 27, 2017 at 05:48:41PM +0530, Arushi Singhal wrote: > On Mon, Mar 27, 2017 at 5:38 PM, Pablo Neira Ayuso > wrote: > > > On Sat, Mar 25, 2017 at 06:19:47PM +0530, Arushi Singhal wrote: > > > This patch removes multiple assignments. > > > Done using coccinelle. > >

Re: [PATCH] net: netfilter: Remove multiple assignment.

2017-03-27 Thread Pablo Neira Ayuso
On Sat, Mar 25, 2017 at 06:19:47PM +0530, Arushi Singhal wrote: > This patch removes multiple assignments. > Done using coccinelle. > @@ > identifier i1,i2; > constant c; > @@ > - i1=i2=c; > + i1=c; > + i2=c; You have to explain why this is bad.

Re: [PATCH] net: netfilters: Remove extra parenthesis

2017-03-27 Thread Pablo Neira Ayuso
Hi Arushi, On Sat, Mar 25, 2017 at 07:23:13PM +0530, Arushi Singhal wrote: > diff --git a/net/netfilter/nf_conntrack_netlink.c > b/net/netfilter/nf_conntrack_netlink.c > index 6806b5e73567..aa344c5868c5 100644 > --- a/net/netfilter/nf_conntrack_netlink.c > +++

[PATCH v3 1/2] net: phy: Fix PHY AN done state machine for interrupt driven PHYs

2017-03-27 Thread Roger Quadros
The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet cable was plugged before the Ethernet interface was brought up. The PHY state machine seems to be stuck from RUNNING to AN state with no new interrupts from the PHY. So it doesn't know when the PHY Auto-negotiation has

Re: [PATCH v2 1/2] net: phy: Fix PHY AN done state machine for interrupt driven PHYs

2017-03-27 Thread Roger Quadros
On 23/03/17 11:52, Sergei Shtylyov wrote: > Hello! > > On 3/22/2017 2:02 PM, Roger Quadros wrote: > >> he ethernet link on an interrupt driven PHY was not coming up if the > >s/he/The/? > >> ethernet cable was plugged before the ethernet interface was brought up. > >Also, my spell

Re: [PATCH] cfg80211: Fix array-bounds warning in fragment copy

2017-03-27 Thread Johannes Berg
> > > - const skb_frag_t *frag = >frags[-1]; > > > + const skb_frag_t *frag = >frags[0]; [...] > > > + frag--; > > > > Isn't it just a question of time until the compiler will see > > through this trick and warn about it? > > Frag is incremented again before being accessed, so there is nothing

Re: [PATCH] cfg80211: Fix array-bounds warning in fragment copy

2017-03-27 Thread Felix Fietkau
On 2017-03-27 12:47, Johannes Berg wrote: > On Fri, 2017-03-24 at 18:06 -0700, Matthias Kaehlcke wrote: >> __ieee80211_amsdu_copy_frag intentionally initializes a pointer to >> array[-1] to increment it later to valid values. clang rightfully >> generates an array-bounds warning on the

[PATCH] net: mvneta: set rx mode during resume if interface is running

2017-03-27 Thread Jisheng Zhang
I found a bug by: 0. boot and start dhcp client 1. echo mem > /sys/power/state 2. resume back immediately 3. don't touch dhcp client to renew the lease 4. ping the gateway. No acks Usually, after step2, the DHCP lease isn't expired, so in theory we should resume all back. But in fact, it

Re: [PATCH] cfg80211: Fix array-bounds warning in fragment copy

2017-03-27 Thread Johannes Berg
On Fri, 2017-03-24 at 18:06 -0700, Matthias Kaehlcke wrote: > __ieee80211_amsdu_copy_frag intentionally initializes a pointer to > array[-1] to increment it later to valid values. clang rightfully > generates an array-bounds warning on the initialization statement. > Work around this by

Re: [PATCH v2] xfrm: branchless addr4_match() on 64-bit

2017-03-27 Thread Steffen Klassert
On Sat, Mar 25, 2017 at 07:41:17PM +0300, Alexey Dobriyan wrote: > Current addr4_match() code has special test for /0 prefixes because of > standard required undefined behaviour. However, it is possible to omit > it on 64-bit because shifting can be done within a 64-bit register and > then

Re: [PATCH] xfrm: use "unsigned int" in addr_match()

2017-03-27 Thread Steffen Klassert
On Fri, Mar 24, 2017 at 02:07:50AM +0300, Alexey Dobriyan wrote: > x86_64 is zero-extending arch so "unsigned int" is preferred over "int" > for address calculations and extending to size_t. > > Space savings: > > add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) > function

Re: [PATCH net-next 0/4] net: mpls: Allow users to configure more labels per route

2017-03-27 Thread Robert Shearman
On 25/03/17 19:15, Eric W. Biederman wrote: David Ahern writes: Bump the maximum number of labels for MPLS routes from 2 to 12. To keep memory consumption in check the labels array is moved to the end of mpls_nh and mpls_iptunnel_encap structs as a 0-sized array.

Re: [PATCH] xfrm: remove unused struct xfrm_mgr::id

2017-03-27 Thread Steffen Klassert
On Fri, Mar 24, 2017 at 01:29:40AM +0300, Alexey Dobriyan wrote: > Signed-off-by: Alexey Dobriyan > --- > > include/net/xfrm.h |1 - > net/key/af_key.c |1 - > net/xfrm/xfrm_user.c |1 - > 3 files changed, 3 deletions(-) Applied to ipsec-next, thanks!

Re: [PATCH] xfrm: use "unsigned int" in __xfrm6_pref_hash()

2017-03-27 Thread Steffen Klassert
On Fri, Mar 24, 2017 at 01:53:09AM +0300, Alexey Dobriyan wrote: > x86_64 is zero-extending arch so "unsigned int" is preferred over "int" > for address calculations. > > Space savings: > > add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58 (-58) > function

Re: [PATCH net-next 0/2] net: mpls: multipath route cleanups

2017-03-27 Thread Robert Shearman
On 24/03/17 22:21, David Ahern wrote: When a device associated with a nexthop is deleted, the nexthop in the route is effectively removed, so remove it from the route dump. Further, when all nexhops have been deleted the route is effectively done, so remove the route. David Ahern (2): mpls:

Re: [4.9.13] brcmf use-after-free on resume

2017-03-27 Thread Arend Van Spriel
On 27-3-2017 11:24, Arend Van Spriel wrote: > + Johannes > > On 6-3-2017 11:48, Arend Van Spriel wrote: >> + linux-wireless >> >> On 6-3-2017 8:04, Daniel J Blueman wrote: >>> When resuming from suspend with a BCM43602 on Ubuntu 16.04 with >>> 4.9.13, we see use after free [1]. >>> >>> We see the

[PATCH 1/1] ethtool : added get_phy_stats,get_strings,get_sset_count

2017-03-27 Thread Thomas Scariah
From: "Scariah, Thomas" Added functions to support ethtool to print the phy statistics and error information along with other ethtool statistics. This will help ethtool information to know the error is from physical layer or MAC layer. This is an enahancement for

Re: Extending socket timestamping API for NTP

2017-03-27 Thread Miroslav Lichvar
On Fri, Mar 24, 2017 at 10:17:51AM -0700, Denny Page wrote: > > On Mar 24, 2017, at 02:45, Miroslav Lichvar wrote: > > How common is to have link speed changing in normal operation on LAN? > > In my case, it’s currently every few minutes because I’m doing hw timestamp >

[PATCH RFC v2] net: phy: improve phylib correctness for non-autoneg settings

2017-03-27 Thread Russell King
phylib has some undesirable behaviour when forcing a link mode through ethtool. phylib uses this code: idx = phy_find_valid(phy_find_setting(phydev->speed, phydev->duplex), features); to find an index in the settings table. phy_find_setting() starts at index 0,

[PATCH RFC v2 1/3] net: phy: avoid setting unsupported EEE advertisments

2017-03-27 Thread Russell King
We currently allow userspace to set any EEE advertisments it desires, whether or not the PHY supports them. For example: # ethtool --set-eee eth1 advertise 0x # ethtool --show-eee eth1 EEE Settings for eth1: EEE status: disabled Tx LPI: disabled Supported EEE

[PATCH RFC v2 0/3] phylib EEE updates

2017-03-27 Thread Russell King - ARM Linux
Florian, This series of patches depends on the previous set of changes, and is therefore net-next material. While testing the EEE code, I discovered a number of issues: 1. It is possible to enable advertisment of EEE modes which are not supported by the hardware. We omit to check the

[PATCH RFC v2 2/3] net: phy: restart phy autonegotiation after EEE advertisment change

2017-03-27 Thread Russell King
When the EEE advertisment is changed, we should restart autonegotiation to update the link partner with the new EEE settings. Add this trigger but only if the advertisment has changed. Signed-off-by: Russell King --- drivers/net/phy/phy.c | 21 +++--

[PATCH RFC v2 3/3] net: phy: allow EEE with SGMII interface modes

2017-03-27 Thread Russell King
As EEE is able to work in SGMII mode as well, add it to the list of permissable EEE modes that phy_init_eee() will accept. This is necessary so that EEE can work with an 88E1512 connected in SGMII mode. Signed-off-by: Russell King --- drivers/net/phy/phy.c | 1 + 1

Re: [v2,net-next,1/3] net: stmmac: enable multiple buffers

2017-03-27 Thread Alexandre Torgue
Hi Joao On 03/24/2017 06:09 PM, Joao Pinto wrote: Hello David, Às 5:05 PM de 3/24/2017, David Miller escreveu: From: Andrew Lunn Date: Fri, 24 Mar 2017 12:17:36 +0100 Yes it would be fantastic to have a set of boards, but I rarely see this in any maintainer :). Being a

[PATCH net-next] ipv6: sr: select DST_CACHE by default

2017-03-27 Thread David Lebrun
When CONFIG_IPV6_SEG6_LWTUNNEL is selected, automatically select DST_CACHE. This allows to remove multiple ifdefs. Signed-off-by: David Lebrun --- net/ipv6/Kconfig | 1 + net/ipv6/seg6_iptunnel.c | 18 -- 2 files changed, 1 insertion(+), 18

<    1   2   3   >