Re: net: use-after-free in __ns_get_path

2017-05-29 Thread Al Viro
On Mon, May 29, 2017 at 04:46:23PM +0200, Dmitry Vyukov wrote: > Al, ping. See commit 073c516ff735. Can you still trigger that on the current mainline?

[PATCH net-next] cxgb4: add new T5 pci device id

2017-05-29 Thread Ganesh Goudar
Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h index 9232bec..be7041f 100644 --- a/drivers/net/ethernet

[PATCH net-next v2] cxgb4: keep carrier off before registering netdev

2017-05-29 Thread Ganesh Goudar
From: Surendra Mobiya Mark carrier off before registering netdev to ensure that vlan device picks up the correct state of the carrier Signed-off-by: Surendra Mobiya Signed-off-by: Ganesh Goudar --- v2: - keep carrier off before registering netdev not after drivers/net/ethernet/chelsio/cxgb4/

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-29 Thread Joe Perches
On Mon, 2017-05-29 at 23:31 -0400, David Miller wrote: > From: Alexey Dobriyan > Date: Sat, 27 May 2017 18:15:14 +0300 > > >> --- a/net/ipv6/ndisc.c > >> +++ b/net/ipv6/ndisc.c > >> @@ -148,17 +148,18 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, > >> int type, void *data, > > > >> 

Re: [PATCH net-next 6/7] bnxt_en: Implement xmit_more.

2017-05-29 Thread Michael Chan
On Mon, May 29, 2017 at 8:28 PM, Mintz, Yuval wrote: > >> - bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod); >> + if (!skb->xmit_more) >> + bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod); > > DQL can prevent you from getting the xmit_more marked SKB, > so you

Re: [PATCH net-next 0/7] bnxt_en: Misc. updates for net-next.

2017-05-29 Thread Michael Chan
On Mon, May 29, 2017 at 8:24 PM, David Miller wrote: > From: Michael Chan > Date: Mon, 29 May 2017 19:06:03 -0400 > >> The 1st 2 patches add short firmware message support for new VF devices. >> The 3rd patch adds a pci shutdown callback for the RDMA driver for proper >> shutdown. The next 3 pat

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-29 Thread David Ahern
On 5/29/17 9:41 PM, Joe Perches wrote: > On Mon, 2017-05-29 at 23:30 -0400, David Miller wrote: >> From: yuan linyu >> Date: Sat, 27 May 2017 06:00:52 +0800 >> >>> From: yuan linyu >>> >>> Signed-off-by: yuan linyu >> Applied, thanks. > OK, but is it really safe though? > > Could "space" (an in

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-29 Thread Joe Perches
On Mon, 2017-05-29 at 23:30 -0400, David Miller wrote: > From: yuan linyu > Date: Sat, 27 May 2017 06:00:52 +0800 > > > From: yuan linyu > > > > Signed-off-by: yuan linyu > > Applied, thanks. OK, but is it really safe though? Could "space" (an int) ever be negative after subtracting "pad" a

Re: [PATCH net-next] net: dsa: b53: remove unused dev argument

2017-05-29 Thread David Miller
From: Florian Fainelli Date: Fri, 26 May 2017 15:50:51 -0700 > On 05/26/2017 03:07 PM, Vivien Didelot wrote: >> The port net device passed to b53_fdb_copy is not used. Remove it. >> >> Signed-off-by: Vivien Didelot > > Reviewed-by: Florian Fainelli Applied.

Re: [PATCH net-next] net: dsa: remove dsa_port_is_bridged

2017-05-29 Thread David Miller
From: Vivien Didelot Date: Fri, 26 May 2017 18:12:42 -0400 > The helper is only used once and makes the code more complicated that it > should. Remove it and reorganize the variables so that it fits on 80 > columns. > > Signed-off-by: Vivien Didelot Applied, thanks.

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-29 Thread David Miller
From: Alexey Dobriyan Date: Sat, 27 May 2017 18:15:14 +0300 >> --- a/net/ipv6/ndisc.c >> +++ b/net/ipv6/ndisc.c >> @@ -148,17 +148,18 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int >> type, void *data, > >> space -= data_len; >> -if (space > 0) >> -memset(opt, 0,

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-29 Thread David Miller
From: yuan linyu Date: Sat, 27 May 2017 06:00:52 +0800 > From: yuan linyu > > Signed-off-by: yuan linyu Applied, thanks.

Re: [PATCH net-next 6/7] bnxt_en: Implement xmit_more.

2017-05-29 Thread Mintz, Yuval
> -   bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod); > +   if (!skb->xmit_more) > +   bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod); DQL can prevent you from getting the xmit_more marked SKB, so you should probably also check for netif_xmit_stopped().

Re: [PATCH net-next 0/7] bnxt_en: Misc. updates for net-next.

2017-05-29 Thread David Miller
From: Michael Chan Date: Mon, 29 May 2017 19:06:03 -0400 > The 1st 2 patches add short firmware message support for new VF devices. > The 3rd patch adds a pci shutdown callback for the RDMA driver for proper > shutdown. The next 3 patches improve the doorbell operations by > elimiating the doubl

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

2017-05-29 Thread David Miller
From: Pablo Neira Ayuso Date: Mon, 29 May 2017 13:34:28 +0200 > Hi David, > > The following patchset contains Netfilter fixes for your net tree, > they are: > > 1) Conntrack SCTP CRC32c checksum mangling may operate on non-linear >skbuff, patch from Davide Caratti. > > 2) nf_tables rb-tree

Re: [PATCH net-next 1/3] netvsc: optimize calculation of number of slots

2017-05-29 Thread David Miller
Stephen, please provide proper header "[PATCH net-next 0/3] " postings with your patch series, so we know at a high level what this patch series is doing, how it is doing it, and why it is doing it that way. I've been quite liberal with your patch postings in the past, hoping you would catch on,

[PATCH net-next 5/7] bnxt_en: Optimize doorbell write operations for newer chips.

2017-05-29 Thread Michael Chan
Older chips require the doorbells to be written twice, but newer chips do not. Add a new common function bnxt_db_write() to write all doorbells appropriately depending on the chip. Eliminating the extra doorbell on newer chips has a significant performance improvement on pktgen. Signed-off-by: M

[PATCH net-next 6/7] bnxt_en: Implement xmit_more.

2017-05-29 Thread Michael Chan
Do not write the TX doorbell if skb->xmit_more is set unless the TX queue is full. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/

[PATCH net-next 4/7] bnxt_en: Add additional chip ID definitions.

2017-05-29 Thread Michael Chan
Add additional chip definitions and macros for all supported chips. Add a new macro BNXT_CHIP_P4_PLUS for the newer generation of chips and use the macro to properly determine the features supported by these newer chips. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c |

[PATCH net-next 1/7] bnxt_en: Support for Short Firmware Message

2017-05-29 Thread Michael Chan
From: Deepak Khungar The new short message format is used on the new BCM57454 VFs. Each firmware message is a fixed 16-byte message sent using the standard firmware communication channel. The short message has a DMA address pointing to the legacy long firmware message. Signed-off-by: Deepak Kh

[PATCH net-next 2/7] bnxt_en: Add PCI IDs for BCM57454 VF devices.

2017-05-29 Thread Michael Chan
From: Deepak Khungar Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 47bc4f3..dc10a9a 10064

[PATCH net-next 7/7] bnxt_en: Pass in sh parameter to bnxt_set_dflt_rings().

2017-05-29 Thread Michael Chan
In the existing code, the local variable sh is hardcoded to true to calculate default rings for shared ring configuration. It is better to have the caller determine the value of sh. Reported-by: Gustavo A. R. Silva Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +

[PATCH net-next 3/7] bnxt_en: Add a callback to inform RDMA driver during PCI shutdown.

2017-05-29 Thread Michael Chan
When bnxt_en gets a PCI shutdown call, we need to have a new callback to inform the RDMA driver to do proper shutdown and removal. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 19 +++ drivers

[PATCH net-next 0/7] bnxt_en: Misc. updates for net-next.

2017-05-29 Thread Michael Chan
The 1st 2 patches add short firmware message support for new VF devices. The 3rd patch adds a pci shutdown callback for the RDMA driver for proper shutdown. The next 3 patches improve the doorbell operations by elimiating the double doorbell workaround on newer chips, and by adding xmit_more suppo

Re: [patch net-next 0/9] mlxsw: Support firmware flash

2017-05-29 Thread Jakub Kicinski
[swapping Ben's email] On Mon, 29 May 2017 11:52:27 +0300, Or Gerlitz wrote: > On Mon, May 29, 2017 at 3:17 AM, Jakub Kicinski wrote: > > On Sun, 28 May 2017 10:26:49 +0300, Yotam Gigi wrote: > > >> This problem is even more relevant in the Mellanox HCA driver team, which > >> would > >> like

Re: [PATCH] net: dsa: mv88e6xxx: Add missing static to stub functions

2017-05-29 Thread Arnd Bergmann
On Mon, May 29, 2017 at 5:30 PM, Andrew Lunn wrote: > On Mon, May 29, 2017 at 02:56:01PM +0200, Arnd Bergmann wrote: >> 'static' was not enough, the helpers must be 'static inline' >> >> net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' >> defined but not used [-Werror=unu

Re: [PATCH v4 2/2] dt-bindings: net: Add Cortina device tree bindings

2017-05-29 Thread Florian Fainelli
Le 05/29/17 à 02:11, Bogdan Purcareata a écrit : > Add device tree description info for Cortina 10G phy devices. > > Signed-off-by: Bogdan Purcareata Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 1/2] net: phy: Add Cortina CS4340 driver

2017-05-29 Thread Florian Fainelli
Le 05/29/17 à 02:11, Bogdan Purcareata a écrit : > Add basic support for Cortina PHY drivers. Support only CS4340 for now. > The phys are not compatible with IEEE 802.3 clause 22/45 registers. > > Implement proper read_status support. The generic 10G phy driver causes > bus register access errors.

_Зqpавствуйтe! Bас uнтepeсуют клueнтскue 6азы qанных?

2017-05-29 Thread senior.balm...@yandex.ru
_3дpавсmвуйmе! Вас uнmеpесуюm клuенmскuе базы данных?

Re: vxlan: use after free error

2017-05-29 Thread Roopa Prabhu
On Sun, May 28, 2017 at 11:28 PM, Mark Bloch wrote: > Hi Roopa, > > On 29/05/2017 05:50, Roopa Prabhu wrote: >> On Sun, May 28, 2017 at 3:49 AM, Mark Bloch wrote: [snip] >> >> From: Balakrishnan Raman >> >> Date: Sun, 28 May 2017 19:34:25 -0700 >> >> Subject: [PATCH net-next] vxlan: remove vxl

[PATCH net-next 2/3] netvsc: use hv_get_bytes_to_read

2017-05-29 Thread Stephen Hemminger
Don't need need to look at write space in netvsc_close. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 548c78863ce9..c3e027

[PATCH net-next 3/3] netvsc: use typed pointer for internal state

2017-05-29 Thread Stephen Hemminger
The element netvsc_device:extension is always a pointer to RNDIS information. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 262b2ea

[PATCH net-next 1/3] netvsc: optimize calculation of number of slots

2017-05-29 Thread Stephen Hemminger
Speed up transmit check for fragmented packets by using existing macros to compute number of pages, and eliminate loop since each skb fragment is only one page. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 43 ++--- 1 file changed, 10

[PATCH net] vxlan: eliminate cached dst leak

2017-05-29 Thread Lance Richardson
After commit 0c1d70af924b ("net: use dst_cache for vxlan device"), cached dst entries could be leaked when more than one remote was present for a given vxlan_fdb entry, causing subsequent netns operations to block indefinitely and "unregister_netdevice: waiting for lo to become free." messages to a

RE: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-05-29 Thread Ilan Tayari
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > > > -Original Message- > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > > Subject: Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova > > > > On Mon,

RE: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-05-29 Thread Ilan Tayari
> -Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > Subject: Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova > > On Mon, May 29, 2017 at 03:58:33PM +, Ilan Tayari wrote: > > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.

Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-05-29 Thread Jason Gunthorpe
On Mon, May 29, 2017 at 03:58:33PM +, Ilan Tayari wrote: > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > > Subject: Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova > > > > On Sun, May 28, 2017 at 07:22:27AM +, Ilan Tayari wrote: > > > > > This is neith

RE: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-05-29 Thread Ilan Tayari
> -Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > Subject: Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova > > On Sun, May 28, 2017 at 07:22:27AM +, Ilan Tayari wrote: > > > This is neither PCI-bar mapped, nor mailbox command. > >

Re: vxlan: use after free error

2017-05-29 Thread Stephen Hemminger
On Mon, 29 May 2017 09:28:52 +0300 Mark Bloch wrote: > In my patch I've added the code inside vxlan_sock_release() > after we do: > rcu_assign_pointer(vxlan->vn6_sock, NULL); > rcu_assign_pointer(vxlan->vn4_sock, NULL); Use RCU_INIT_POINTER when assigning NULL. A barrier is not n

Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-05-29 Thread Jason Gunthorpe
On Sun, May 28, 2017 at 07:22:27AM +, Ilan Tayari wrote: > This is neither PCI-bar mapped, nor mailbox command. > The FPGA is indeed a bump-on-the-wire. > (It has I2C to the CX4 chip, but that is for debug purposes, and too slow > to perform real programming) Wait.. So if it truely has nothin

Re: [PATCH] net: dsa: mv88e6xxx: Add missing static to stub functions

2017-05-29 Thread Andrew Lunn
On Mon, May 29, 2017 at 02:56:01PM +0200, Arnd Bergmann wrote: > 'static' was not enough, the helpers must be 'static inline' > > net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' > defined but not used [-Werror=unused-function] > net/dsa/mv88e6xxx/global2.h:117:12: error:

Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-05-29 Thread Andrew Lunn
> I want to see each ports behind the bridge as independent ethernet > devices. If I understand RTFM only devlink may expose this > configuration. DSA and switchdev in general gives you a linux interface per user switch port. So you can see each interface, get stats, ethtools, mii-tool, etc per in

[PATCH net-next 3/3] udp: try to avoid 2 cache miss on dequeue

2017-05-29 Thread Paolo Abeni
when udp_recvmsg() is executed, on x86_64 and other archs, most skb fields are on cold cachelines. If the skb are linear and the kernel don't need to compute the udp csum, only a handful of skb fields are required by udp_recvmsg(). Since we already use skb->dev_scratch to cache hot data, and there

[PATCH net-next 0/3] udp: reduce cache pressure

2017-05-29 Thread Paolo Abeni
In the most common use case, many skb fields are not used by recvmsg(), and the few ones actually accessed lays on cold cachelines, which leads to several cache miss per packet. This patch series attempts to reduce such misses with different strategies: * caching the interesting fields in the scra

[PATCH net-next 1/3] net: factor out a helper to decrement the skb refcount

2017-05-29 Thread Paolo Abeni
The same code is replicated in 3 different places; move it to a common helper. Signed-off-by: Paolo Abeni --- include/linux/skbuff.h | 13 + net/core/datagram.c| 4 +--- net/core/skbuff.c | 14 -- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/

[PATCH net-next 2/3] udp: avoid a cache miss on dequeue

2017-05-29 Thread Paolo Abeni
Since UDP no more uses sk->destructor, we can clear completely the skb head state before enqueuing. All head states share a single cacheline, which is not normally used/accesses on dequeue. We can avoid entirely accessing such cacheline implementing and using in the UDP code a specialized skb free

Re: [PATCH] net: dsa: mv88e6xxx: Add missing static to stub functions

2017-05-29 Thread Vivien Didelot
Hi Arnd, Arnd Bergmann writes: > 'static' was not enough, the helpers must be 'static inline' > > net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' > defined but not used [-Werror=unused-function] > net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defi

Re: net: use-after-free in __ns_get_path

2017-05-29 Thread Dmitry Vyukov
On Mon, Apr 10, 2017 at 11:07 PM, Cong Wang wrote: > On Mon, Apr 10, 2017 at 7:37 AM, Andrey Konovalov > wrote: >> Hi, >> >> I've got the following error report while fuzzing the kernel with syzkaller. >> >> On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). >> >> Unfortunately it's

[PATCH net] net/mlx5: avoid build warning for uniprocessor

2017-05-29 Thread Arnd Bergmann
Building the driver with CONFIG_SMP disabled results in a harmless warning: ethernet/mellanox/mlx5/core/main.c: In function 'mlx5_irq_set_affinity_hint': ethernet/mellanox/mlx5/core/main.c:615:6: error: unused variable 'irq' [-Werror=unused-variable] It's better to express the conditional compil

[PATCH] net: dsa: mv88e6xxx: Add missing static to stub functions

2017-05-29 Thread Arnd Bergmann
'static' was not enough, the helpers must be 'static inline' net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

[PATCH v8 net-next 07/17] net: qca_spi: remove QCASPI_MTU

2017-05-29 Thread Stefan Wahren
There is no need for an additional MTU define. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index f155548..7464628

[PATCH v8 net-next 08/17] net: qualcomm: move qcaspi_tx_cmd to qca_spi.c

2017-05-29 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 - drivers/net/ethernet/qualcomm/qca_spi.c | 24 +++

[PATCH v8 net-next 01/17] net: qualcomm: qca_7k: clean up header includes

2017-05-29 Thread Stefan Wahren
Currently the includes doesn't reflect the dependencies. So fix this up by removing all unnecessary entries and add the necessary ones explicit. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH v8 net-next 12/17] net: qualcomm: make qca_7k_common a separate kernel module

2017-05-29 Thread Stefan Wahren
In order to share common functions between QCA7000 SPI and UART protocol driver the qca_7k_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 +++-- drivers/

[PATCH v8 net-next 15/17] dt-bindings: slave-device: add current-speed property

2017-05-29 Thread Stefan Wahren
This adds a new DT property to define the current baud rate of the slave device. Signed-off-by: Stefan Wahren Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/serial/slave-device.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/ser

[PATCH v8 net-next 13/17] dt-bindings: qca7000-spi: Rework binding

2017-05-29 Thread Stefan Wahren
In preparation for the QCA7000 UART binding rework the binding document. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/net/qca-qca7000-spi.txt| 49 +- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/Documentation/devicetree/bindings/net/qca-qca7

[PATCH v8 net-next 03/17] net: qca_7k: Use BIT macro

2017-05-29 Thread Stefan Wahren
Use the BIT macro for the CONFIG and INT register values. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/qca_7k.h b/drivers/net/ethernet/qualcomm/qca_7k.h in

[PATCH v8 net-next 10/17] net: qualcomm: rename qca_framing.c to qca_7k_common.c

2017-05-29 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_7k_common would make it clear. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Makefile

[PATCH v8 net-next 00/17] net: qualcomm: add QCA7000 UART driver

2017-05-29 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 b

[PATCH v8 net-next 11/17] net: qualcomm: prepare frame decoding for UART driver

2017-05-29 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 --- driver

[PATCH v8 net-next 16/17] dt-bindings: qca7000: append UART interface to binding

2017-05-29 Thread Stefan Wahren
This merges the serdev binding for the QCA7000 UART driver (Ethernet over UART) into the existing document. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/net/qca,qca7000.txt| 32 ++ 1 file changed, 32 insertions(+) diff --git a/Documentation/devicetree/bin

[PATCH v8 net-next 02/17] net: qca_framing: use u16 for frame offset

2017-05-29 Thread Stefan Wahren
It doesn't make sense to use a signed variable for offset here, so fix it up. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_framing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qualcomm/qca_framing.h b/drivers/net/ethernet/qualc

[PATCH v8 net-next 14/17] dt-bindings: qca7000: rename binding

2017-05-29 Thread Stefan Wahren
Before we can merge the QCA7000 UART binding the document needs to be renamed. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/net/{qca-qca7000-spi.txt => qca,qca7000.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/net/{qca-qca700

[PATCH v8 net-next 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-29 Thread Stefan Wahren
This patch adds the Ethernet over UART driver for the Qualcomm QCA7000 HomePlug GreenPHY. Signed-off-by: Stefan Wahren Reviewed-by: Lino Sanfilippo --- drivers/net/ethernet/qualcomm/Kconfig | 16 + drivers/net/ethernet/qualcomm/Makefile| 2 + drivers/net/ethernet/qualcomm/qca

[PATCH v8 net-next 09/17] net: qca_spi: Clarify MODULE_DESCRIPTION

2017-05-29 Thread Stefan Wahren
Since this driver is specific to the QCA7000, we should make the module description more precisely. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/

[PATCH v8 net-next 06/17] net: qualcomm: Improve readability of length defines

2017-05-29 Thread Stefan Wahren
In order to avoid mixing things up, make the MTU and frame length defines easier to read. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_framing.c | 2 +- drivers/net/ethernet/qualcomm/qca_framing.h | 8 drivers/net/ethernet/qualcomm/qca_spi.c | 12 ++--

[PATCH v8 net-next 04/17] net: qca_spi: Use SET_NETDEV_DEV()

2017-05-29 Thread Stefan Wahren
Use SET_NETDEV_DEV() in qca_spi to create the "/sys/class/net//device" symlink. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c index 24

[PATCH v8 net-next 05/17] net: qualcomm: use net_device_ops instead of direct call

2017-05-29 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.c | 4 ++-- drivers/net/ethernet/qualcomm/q

[PATCH 3/4] netfilter: nat: use atomic bit op to clear the _SRC_NAT_DONE_BIT

2017-05-29 Thread Pablo Neira Ayuso
From: Liping Zhang We need to clear the IPS_SRC_NAT_DONE_BIT to indicate that the ct has been removed from nat_bysource table. But unfortunately, we use the non-atomic bit operation: "ct->status &= ~IPS_NAT_DONE_MASK". So there's a race condition that we may clear the _DYING_BIT set by another CP

[PATCH 0/4] Netfilter fixes for net

2017-05-29 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter fixes for your net tree, they are: 1) Conntrack SCTP CRC32c checksum mangling may operate on non-linear skbuff, patch from Davide Caratti. 2) nf_tables rb-tree set backend does not handle element re-addition after deletion in the same tra

[PATCH 4/4] netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize

2017-05-29 Thread Pablo Neira Ayuso
From: Liping Zhang If nf_conntrack_htable_size was adjusted by the user during the ct dump operation, we may invoke nf_ct_put twice for the same ct, i.e. the "last" ct. This will cause the ct will be freed but still linked in hash buckets. It's very easy to reproduce the problem by the following

[PATCH 1/4] netfilter: conntrack: fix false CRC32c mismatch using paged skb

2017-05-29 Thread Pablo Neira Ayuso
From: Davide Caratti sctp_compute_cksum() implementation assumes that at least the SCTP header is in the linear part of skb: modify conntrack error callback to avoid false CRC32c mismatch, if the transport header is partially/entirely paged. Fixes: cf6e007eef83 ("netfilter: conntrack: validate S

[PATCH 2/4] netfilter: nft_set_rbtree: handle element re-addition after deletion

2017-05-29 Thread Pablo Neira Ayuso
The existing code selects no next branch to be inspected when re-inserting an inactive element into the rb-tree, looping endlessly. This patch restricts the check for active elements to the EEXIST case only. Fixes: e701001e7cbe ("netfilter: nft_rbtree: allow adjacent intervals with dynamic update

Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-05-29 Thread Andrey Melnikov
2017-05-26 8:54 GMT+03:00 Florian Fainelli : > On May 24, 2017 4:17:39 AM PDT, "Andrey Jr. Melnikov" > wrote: >>In gmane.linux.kernel sean.w...@mediatek.com wrote: >>> From: Sean Wang >> >>> MT7530 is a 7-ports Gigabit Ethernet Switch that could be found on >>> Mediatek router platforms such as

Re: Charitable Organization

2017-05-29 Thread Sarah Edward.
`._.. Glad to write to you this message, I seek for your kind help in setting up a charitable organization to help the less privileged people and also the elderly people under your care, I want to use my late husband wealth of $3,000,000.00 to set up a charity foundation to help the needy and t

Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all perf_event types

2017-05-29 Thread Peter Zijlstra
On Mon, May 29, 2017 at 11:12:53AM +0200, Peter Zijlstra wrote: > On Thu, May 25, 2017 at 10:55:47PM -0700, Alexei Starovoitov wrote: > > > +++ b/kernel/bpf/arraymap.c > > @@ -462,26 +462,22 @@ static void *perf_event_fd_array_get_ptr(struct > > bpf_map *map, > > > > event = perf_file->priv

Re: [PATCH] net: netfilter: netlink: delete extra spaces

2017-05-29 Thread Pablo Neira Ayuso
On Fri, May 12, 2017 at 01:11:06PM +0800, linzhang wrote: > This patch cleans up extra spaces. Applied.

[PATCH v4 0/2] net: phy: Support managed Cortina phys

2017-05-29 Thread Bogdan Purcareata
So far, the Cortina family phys (CS4340 in this particular case) are only supported in fixed link mode (via fixed_phy_register). The generic 10G phy driver does not work well with the phylib state machine, when the phy is registered via of_phy_connect. This prohibits the user from describing the ph

Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all perf_event types

2017-05-29 Thread Peter Zijlstra
On Thu, May 25, 2017 at 10:55:47PM -0700, Alexei Starovoitov wrote: > +++ b/kernel/bpf/arraymap.c > @@ -462,26 +462,22 @@ static void *perf_event_fd_array_get_ptr(struct bpf_map > *map, > > event = perf_file->private_data; > ee = ERR_PTR(-EINVAL); > + /* Per-task events are not

[PATCH v4 2/2] dt-bindings: net: Add Cortina device tree bindings

2017-05-29 Thread Bogdan Purcareata
Add device tree description info for Cortina 10G phy devices. Signed-off-by: Bogdan Purcareata --- v3 -> v4: - Consistency nit between phy label and reg value. - Add CORTINNA trademark info. Patch introduced in v3 of the patchset. Documentation/devicetree/bindings/net/cortina.txt | 21

[PATCH v4 1/2] net: phy: Add Cortina CS4340 driver

2017-05-29 Thread Bogdan Purcareata
Add basic support for Cortina PHY drivers. Support only CS4340 for now. The phys are not compatible with IEEE 802.3 clause 22/45 registers. Implement proper read_status support. The generic 10G phy driver causes bus register access errors. The driver should be described using the "ethernet-phy-id

Re: [patch net-next 0/9] mlxsw: Support firmware flash

2017-05-29 Thread Or Gerlitz
On Mon, May 29, 2017 at 3:17 AM, Jakub Kicinski wrote: > On Sun, 28 May 2017 10:26:49 +0300, Yotam Gigi wrote: >> This problem is even more relevant in the Mellanox HCA driver team, which >> would >> like to use that code in order to burn the HCA firmware, but not intend to >> trigger it on boot

Re: [patch net-next 0/9] mlxsw: Support firmware flash

2017-05-29 Thread Yotam Gigi
On 05/29/2017 03:17 AM, Jakub Kicinski wrote: > On Sun, 28 May 2017 10:26:49 +0300, Yotam Gigi wrote: >> On 05/23/2017 06:38 PM, David Miller wrote: >>> From: Yotam Gigi >>> Date: Tue, 23 May 2017 18:14:15 +0300 >>> Sorry, I am not sure I understand. You think that drivers should not

[PATCH net] qed: Don't log missing periodic stats by default

2017-05-29 Thread Yuval Mintz
Current implementation lacks the logic for providing management firmware with RDMA-related statistics; [much] worse than that - it logs such events by default to system logs. Since the statistics' gathering is done periodically, using sufficiently new management firmware the system logs would get