[PATCH net] i40e: flower: check if TC offload is enabled on a netdev

2018-01-23 Thread Jakub Kicinski
Since TC block changes drivers are required to check if the TC hw offload flag is set on the interface themselves. Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower") Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from binding phase to rule insertion phase") Signed-off-

Re: [RFC crypto v3 0/9] Chelsio Inline TLS

2018-01-23 Thread Atul Gupta
On Monday 22 January 2018 03:46 AM, Sabrina Dubroca wrote: 2017-12-20, 17:03:02 +0530, Atul Gupta wrote: RFC series for Chelsio Inline TLS driver (chtls.ko) Driver use the ULP infrastructure to register chtls as Inline TLS ULP. I don't think drivers should be registering their own ULP. TLS o

Re: [PATCH v6 22/36] nds32: Debugging support

2018-01-23 Thread Arnd Bergmann
On Tue, Jan 23, 2018 at 8:28 AM, Vincent Chen wrote: > 2018-01-18 18:37 GMT+08:00 Arnd Bergmann : >> On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >>> From: Greentime Hu >> >> It appears that you are implementing the old-style ptrace handling >> with architecture specific commands. Pleas

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-23 Thread Greentime Hu
Hi, Arnd: 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds support for the DMA mapping API. It uses dma_map_ops for >> flexibility. >> >> Signed-off-by: Vincent Chen >> Signed-off-by: Greentime Hu > >

Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev

2018-01-23 Thread Jiri Pirko
Tue, Jan 23, 2018 at 09:08:40AM CET, jakub.kicin...@netronome.com wrote: >Since TC block changes drivers are required to check if >the TC hw offload flag is set on the interface themselves. > >Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower") >Fixes: 44ae12a768b7 ("net: sched: move t

Re: [PATCH net] vxlan: update skb dst pmtu on tx path

2018-01-23 Thread Xin Long
On Tue, Jan 23, 2018 at 6:35 AM, Roman Kapl wrote: > On 12/18/2017 07:20 AM, Xin Long wrote: >> >> Unlike ip tunnels, now vxlan doesn't do any pmtu update for >> upper dst pmtu, even if it doesn't match the lower dst pmtu >> any more. >> >> The problem can be reproduced when reducing the vxlan low

Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev

2018-01-23 Thread Nambiar, Amritha
On 1/23/2018 12:08 AM, Jakub Kicinski wrote: > Since TC block changes drivers are required to check if > the TC hw offload flag is set on the interface themselves. > > Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower") > Fixes: 44ae12a768b7 ("net: sched: move the can_offload check fr

[PATCH net-next 1/2] net: sched: ematch: pass protocol to ematch 'change()' handlers

2018-01-23 Thread Eyal Birger
From: Eyal Birger In order to allow ematches to create their internal state based on the L3 protocol specified when creating the filter. Signed-off-by: Eyal Birger --- include/net/pkt_cls.h | 2 +- net/sched/em_canid.c | 4 ++-- net/sched/em_ipset.c | 4 ++-- net/sched/em_meta.c | 2 +- ne

[PATCH net-next 2/2] net: sched: add em_ipt ematch for calling xtables matches

2018-01-23 Thread Eyal Birger
From: Eyal Birger This module allows performing tc classification based on data structures and implementations provided by netfilter extensions. Example use case is classification based on the incoming IPSec policy used during decpsulation using the 'policy' iptables extension (xt_policy). Sign

[PATCH net-next 0/2] net: sched: introduce em_ipt ematch

2018-01-23 Thread Eyal Birger
From: Eyal Birger The following patchset introduces a new tc ematch for matching using netfilter matches. This allows early classification as well as mirroning/redirecting traffic based on logic implemented in netfilter extensions. Example use case is classification based on the incoming IPSec

[PATCH net 2/2] vhost: do not try to access device IOTLB when not initialized

2018-01-23 Thread Jason Wang
The code will try to access dev->iotlb when processing VHOST_IOTLB_INVALIDATE even if it was not initialized which may lead to NULL pointer dereference. Fixes this by check dev->iotlb before. Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API") Signed-off-by: Jason Wang --- drivers/vhost/vhost.c

[PATCH net 1/2] vhost: use mutex_lock_nested() in vhost_dev_lock_vqs()

2018-01-23 Thread Jason Wang
We used to call mutex_lock() in vhost_dev_lock_vqs() which tries to hold mutexes of all virtqueues. This may confuse lockdep to report a possible deadlock because of trying to hold locks belong to same class. Switch to use mutex_lock_nested() to avoid false positive. Fixes: 6b1e6cc7855b0 ("vhost:

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
On Mon, 22 Jan 2018 23:25:41 +0100, Christian Brauner wrote: > This is not necessarily true in scenarios where I move a network device > via RTM_NEWLINK + IFLA_NET_NS_PID into a network namespace I haven't > created. Here is an example: > > nlmsghdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; > nlms

[PATCH net 2/2] qed: Free reserved MR tid

2018-01-23 Thread Michal Kalderon
A tid was allocated for reserved MR during initialization but not freed. This lead to an annoying output message during rdma unload flow. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 28 +--- 1 file changed, 1

[PATCH net 1/2] qed: Remove reserveration of dpi for kernel

2018-01-23 Thread Michal Kalderon
Double reservation for kernel dedicated dpi was performed. Once in the core module and once in qedr. Remove the reservation from core. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

[RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-01-23 Thread Mohammed Gamal
Split each of the functions into two for each of send/recv buffers Signed-off-by: Mohammed Gamal --- drivers/net/hyperv/netvsc.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c inde

[PATCH net 0/2] qed: rdma bug fixes

2018-01-23 Thread Michal Kalderon
This patch contains two small bug fixes related to RDMA. Both related to resource reservations. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Michal Kalderon (2): qed: Remove reserveration of dpi for kernel qed: Free reserved MR tid drivers/net/ethernet/qlogic/qed/qed_rdma.c

[RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts

2018-01-23 Thread Mohammed Gamal
Commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") introduced a regression that caused VMs not to shutdown after netvsc_device_remove() is called. This is caused by GPADL teardown sequence change, and while that was necessary to fix issues with Win2016 hosts, it did introduce a regre

[RFC PATCH 2/2] hv_netvsc: Change GPADL teardown order according to Hyper-V version

2018-01-23 Thread Mohammed Gamal
Commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") introduced a regression causing VMs not to shutdown on pre-Wind2016 hosts after netvsc_remove_device() is called. This was caused as the GPADL teardown sequence was changed. This patch restores the old behavior for pre-Win2016 hosts,

[PATCH] bnx2: remove redundant initializations of pointers txr and rxr

2018-01-23 Thread Colin King
From: Colin Ian King Pointers txr and rxr are being initialized and a few statements later are being assigned new values without the original values ever being read. The initialized values are therefore redundant and can be removed. Cleans up clang warnings: drivers/net/ethernet/broadcom/bnx2.c:

Re: [PATCH] net: igmp: fix source address check for IGMPv3 reports

2018-01-23 Thread Felix Fietkau
On 2018-01-22 22:17, David Miller wrote: > From: Felix Fietkau > Date: Fri, 19 Jan 2018 11:50:46 +0100 > >> Commit "net: igmp: Use correct source address on IGMPv3 reports" >> introduced a check to validate the source address of locally generated >> IGMPv3 packets. >> Instead of checking the loca

Re: [PATCH net] pppoe: take ->needed_headroom of lower device into account on xmit

2018-01-23 Thread Xin Long
On Tue, Jan 23, 2018 at 1:06 AM, Guillaume Nault wrote: > In pppoe_sendmsg(), reserving dev->hard_header_len bytes of headroom > was probably fine before the introduction of ->needed_headroom in > commit f5184d267c1a ("net: Allow netdevices to specify needed head/tailroom"). > > But now, virtual d

Re: [PATCH net-next v2] net: link_watch: mark bonding link events urgent

2018-01-23 Thread Nikolay Aleksandrov
On 22/01/18 18:07, Roopa Prabhu wrote: > From: Roopa Prabhu > > It takes 1sec for bond link down notification to hit user-space > when all slaves of the bond go down. 1sec is too long for > protocol daemons in user-space relying on bond notification > to recover (eg: multichassis lag implementati

[PATCH net-next] sctp: reset ret in again path in sctp_for_each_transport

2018-01-23 Thread Xin Long
Commit 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to return void") only initialized ret for the first time, when going to again path, the next tsp could be NULL. Without resetting ret, cb_done would be called with tsp as NULL. A kernel crash was caused by this when running sctpdiag te

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Wolfgang Bumiller
On Tue, Jan 23, 2018 at 10:30:09AM +0100, Jiri Benc wrote: > On Mon, 22 Jan 2018 23:25:41 +0100, Christian Brauner wrote: > > This is not necessarily true in scenarios where I move a network device > > via RTM_NEWLINK + IFLA_NET_NS_PID into a network namespace I haven't > > created. Here is an exam

[PATCH] igb: Do not call netif_device_detach() when PCIe link goes missing

2018-01-23 Thread Mika Westerberg
When the driver notices that PCIe link is gone by reading 0x from a register it clears hw->hw_addr and then calls netif_device_detach(). This happens when the PCIe device is physically unplugged for example the user disconnected the Thunderbolt cable. However, netif_device_detach() prevent

Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-23 Thread Jason Wang
On 2018年01月12日 13:58, Sridhar Samudrala wrote: static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); int qnum = skb_get_queue_mapping(skb); struct send_queue *sq = &vi->sq[qnum]; + struct net_de

Re: Network interface "stops working"

2018-01-23 Thread Turbo Fredriksson
Not sure it’s a bug yet, but anyone have any ideas on how I can find out? > On 22 Jan 2018, at 23:32, Cong Wang wrote: > > (Please always Cc netdev for networking related bugs.) > > On Mon, Jan 22, 2018 at 2:02 AM, Turbo Fredriksson wrote: >> I just got a new broadband delivered at home. It is

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
On Tue, 23 Jan 2018 11:26:58 +0100, Wolfgang Bumiller wrote: > Even if you know the netnsid, do the mentioned watches work for > nested/child namespaces if eg. a container creates new namespace before > and/or after the watch was established and moves interfaces to these > child namespaces, would y

RE: [net-next v2 15/15] i40e: link_down_on_close private flag support

2018-01-23 Thread Stachura, Mariusz
Hello Kuba, First of all sorry for a long response. Did you have a chance to try it using instruction I've sent? As for review: 1) nit: reverse christmas tree I'm fixing it. 2) Are abilities guaranteed to be filled in by this function? Otherwise you will use uninitialized stack memory.

Re: [PATCH net-next] sctp: reset ret in again path in sctp_for_each_transport

2018-01-23 Thread Marcelo Ricardo Leitner
On Tue, Jan 23, 2018 at 06:22:25PM +0800, Xin Long wrote: > Commit 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to > return void") only initialized ret for the first time, when going > to again path, the next tsp could be NULL. Without resetting ret, > cb_done would be called with tsp as

Re: [PATCH v2] smc: return booleans instead of integers

2018-01-23 Thread Ursula Braun
On 01/23/2018 01:31 AM, Joe Perches wrote: > On Mon, 2018-01-22 at 12:58 +0100, Ursula Braun wrote: >> >> On 01/19/2018 09:54 PM, Gustavo A. R. Silva wrote: >>> Return statements in functions returning bool should use >>> true/false instead of 1/0. >>> >>> This issue was detected with the help of

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-23 Thread Greentime Hu
Hi, Arnd: 2018-01-23 16:23 GMT+08:00 Greentime Hu : > Hi, Arnd: > > 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : >> On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >>> From: Greentime Hu >>> >>> This patch adds support for the DMA mapping API. It uses dma_map_ops for >>> flexibility. >>> >>>

[REGRESSION, bisect] pci: cxgb4 probe fails after commit 104daa71b3961434 ("PCI: Determine actual VPD size on first access")

2018-01-23 Thread Arjun Vynipadath
Sending on behalf of "Casey Leedom " Way back on April 11, 2016 we reported a regression in Linux kernel 4.6-rc2 brought on by kernel.org commit 104daa71b396. This commit calculates the size of a PCI Device's VPD area by parsing the VPD Structure at offset 0x000, and restricts accesses to the V

Re: [PATCH net-next] sctp: reset ret in again path in sctp_for_each_transport

2018-01-23 Thread Neil Horman
On Tue, Jan 23, 2018 at 06:22:25PM +0800, Xin Long wrote: > Commit 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to > return void") only initialized ret for the first time, when going > to again path, the next tsp could be NULL. Without resetting ret, > cb_done would be called with tsp as

Re: [PATCH net-next 2/2] net: sched: add em_ipt ematch for calling xtables matches

2018-01-23 Thread Pablo Neira Ayuso
On Tue, Jan 23, 2018 at 11:17:32AM +0200, Eyal Birger wrote: > From: Eyal Birger > > This module allows performing tc classification based on data structures > and implementations provided by netfilter extensions. > > Example use case is classification based on the incoming IPSec policy used > d

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
(Christian, I'm adding back the netdev list, there's no reason not to have the discussion in open.) On Tue, 23 Jan 2018 12:42:19 +0100, Christian Brauner wrote: > Thanks for the comments and discussion. Sorry, for not going through the > list but I just have a quick question that doesn't deserve t

Re: [REGRESSION, bisect] pci: cxgb4 probe fails after commit 104daa71b3961434 ("PCI: Determine actual VPD size on first access")

2018-01-23 Thread Ganesh Goudar
+Hannes Reinecke On Tuesday, January 01/23/18, 2018 at 17:59:09 +0530, Arjun Vynipadath wrote: > Sending on behalf of "Casey Leedom " > > Way back on April 11, 2016 we reported a regression in Linux kernel 4.6-rc2 > brought on by kernel.org commit 104daa71b396. This commit calculates the > size

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Kirill Tkhai
Hi, Eric, thanks for your review. On 22.01.2018 20:15, Eric Dumazet wrote: > On Mon, 2018-01-22 at 12:41 +0300, Kirill Tkhai wrote: >> Commit be3fc413da9e "net: use synchronize_rcu_expedited()" introducing >> synchronize_net() says: >> >> >When we hold RTNL mutex, we would like to spend some

Re: [PATCH] net: ipv6: ndisc: fix bool assignment in ndisc_send_na

2018-01-23 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 22 Jan 2018 16:22:13 -0600 > Assign true or false to boolean variables instead of an integer value. > > This issue was detected with the help of Coccinelle. > > Fixes: 1cb3fe513f62 ("ndisc: Break down ndisc_build_skb() and build message > directly.") > Si

[PATCHv5 5/5] ARM: dts: imx6q-b450v3: Add switch port configuration

2018-01-23 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information: root@b450v

[PATCHv5 3/5] ARM: dts: imx6q-b850v3: Add switch port configuration

2018-01-23 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors ("ID", "IX", "ePort 1", "ePort 2"). The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the

[PATCHv5 4/5] ARM: dts: imx6q-b650v3: Add switch port configuration

2018-01-23 Thread Sebastian Reichel
This adds support for the Marvell switch and names the network ports according to the labels, that can be found next to the connectors. The switch is connected to the host system using a PCI based network card. The PCI bus configuration has been written using the following information: root@b650v

[PATCHv5 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-23 Thread Sebastian Reichel
This adds support for enabling the internal PHY for a 'cpu' port. It has been tested on GE B850v3, B650v3 and B450v3, which have a built-in MV88E6240 switch hardwired to a PCIe based network card. On these machines the internal PHY of the i210 network card and the Marvell switch are connected to e

[PATCHv5 2/5] ARM: dts: imx6q-bx50v3: Add internal switch

2018-01-23 Thread Sebastian Reichel
B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to communicate with a Marvell switch. On all devices the switch is connected to a PCI based network card, which needs to be referenced by DT, so this also adds the common PCI root node. Signed-off-by: Sebastian Reichel --- arch/arm/bo

[PATCHv5 0/5] GEHC Bx50 Switch Support

2018-01-23 Thread Sebastian Reichel
Hi, This adds support for the internal switch found in GE Healthcare B450v3, B650v3 and B850v3. All devices use a GPIO bitbanged MDIO bus to communicate with the switch and a PCIe based network card for exchanging network data. The cpu network data link requires, that the switch's internal phy int

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Eric Dumazet
On Tue, Jan 23, 2018 at 6:41 AM, Kirill Tkhai wrote: > Hi, Eric, > > thanks for your review. > > On 22.01.2018 20:15, Eric Dumazet wrote: >> On Mon, 2018-01-22 at 12:41 +0300, Kirill Tkhai wrote: >>> Commit be3fc413da9e "net: use synchronize_rcu_expedited()" introducing >>> synchronize_net() says:

Re: wcn36xx: release resources in case of error

2018-01-23 Thread Ramon Fried
On 1/22/2018 8:14 AM, Kalle Valo wrote: > Ramon Fried wrote: > >> wcn36xx_dxe_init() doesn't check for the return value >> of wcn36xx_dxe_init_descs(). >> This patch releases the resources in case an error ocurred. >> >> Signed-off-by: Ramon Fried > Doesn't compile: Sorry Kalle, I mistakenly se

[PATCH v2] wcn36xx: release resources in case of error

2018-01-23 Thread Ramon Fried
wcn36xx_dxe_init() doesn't check for the return value of wcn36xx_dxe_init_descs(). This patch releases the resources in case an error ocurred. Change-Id: I924bd7489b60243c0a0cbaa716caf924f11d7587 Signed-off-by: Ramon Fried --- drivers/net/wireless/ath/wcn36xx/dxe.c | 48 +

[PATCH 2/2] ixgbe: Set rss key in order.

2018-01-23 Thread Tonghao Zhang
If we use ethtool to set rss key, for example, we except 0x6d is K[0], and 0x5a is K[1]. But the ixgbe driver set the 0xda is K[0]. ethtool -X eth0 hkey 6d:5a:56:da:25:5b:0e:c2:41:67:25:3d :43:a3:8f:b0:d0:ca:2b:cb:ae:7b:30:b4:77:cb:2d:a3 :80:30:f2:0c:6a:42:b7:3b:be:ac:01:fa The ke

[PATCH 1/2] ixgbe: Avoid to write the RETA table when unnecessary.

2018-01-23 Thread Tonghao Zhang
If indir == 0 in the ixgbe_set_rxfh(), it is unnecessary to write the HW. Because redirection table is not changed. Signed-off-by: Tonghao Zhang --- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i

Re: Memory corruption with r8169 across several device revisions and kernels

2018-01-23 Thread David Miller
From: Oliver Freyermuth Date: Mon, 22 Jan 2018 23:55:58 +0100 > Checking through the driver sources, I find rtnl_link_stats64 can > not be the culprit, since it has rx_packets and only after > tx_packets. However, struct rtl8169_counters looks like: > > struct rtl8169_counters { > __le64

Re: [PATCH 1/2] ixgbe: Avoid to write the RETA table when unnecessary.

2018-01-23 Thread Jeff Kirsher
On Tue, 2018-01-23 at 07:24 -0800, Tonghao Zhang wrote: > If indir == 0 in the ixgbe_set_rxfh(), it is unnecessary > to write the HW. Because redirection table is not changed. > > Signed-off-by: Tonghao Zhang > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 ++- > 1 file changed, 2 i

Re: [PATCHv5 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-23 Thread Florian Fainelli
On 01/23/2018 07:03 AM, Sebastian Reichel wrote: > This adds support for enabling the internal PHY for a 'cpu' port. > It has been tested on GE B850v3, B650v3 and B450v3, which have a > built-in MV88E6240 switch hardwired to a PCIe based network card. > On these machines the internal PHY of the

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Kirill Tkhai
On 23.01.2018 18:12, Eric Dumazet wrote: > On Tue, Jan 23, 2018 at 6:41 AM, Kirill Tkhai wrote: >> Hi, Eric, >> >> thanks for your review. >> >> On 22.01.2018 20:15, Eric Dumazet wrote: >>> On Mon, 2018-01-22 at 12:41 +0300, Kirill Tkhai wrote: Commit be3fc413da9e "net: use synchronize_rcu_ex

Re: [PATCH net-next] nfp: fix fw dump handling of absolute rtsym size

2018-01-23 Thread David Miller
From: Jakub Kicinski Date: Mon, 22 Jan 2018 17:29:43 -0800 > From: Carl Heymann > > Fix bug that causes _absolute_ rtsym sizes of > 8 bytes (as per symbol > table) to result in incorrect space used during a TLV-based debug dump. > > Detail: The size calculation stage calculates the correct siz

Re: [PATCHv5 4/5] ARM: dts: imx6q-b650v3: Add switch port configuration

2018-01-23 Thread Florian Fainelli
On 01/23/2018 07:03 AM, Sebastian Reichel wrote: > This adds support for the Marvell switch and names the network > ports according to the labels, that can be found next to the > connectors. The switch is connected to the host system using a > PCI based network card. > > The PCI bus configuratio

Re: [PATCHv5 5/5] ARM: dts: imx6q-b450v3: Add switch port configuration

2018-01-23 Thread Florian Fainelli
On 01/23/2018 07:03 AM, Sebastian Reichel wrote: > This adds support for the Marvell switch and names the network > ports according to the labels, that can be found next to the > connectors. The switch is connected to the host system using a > PCI based network card. > > The PCI bus configuratio

[PATCH net-next] [net] softnet_data: Split time_squeeze counter to provide budget_squeeze

2018-01-23 Thread Patrick Talbert
Add a 'budget_squeeze' counter to be able to differenciate between a NAPI poll ending with outstanding work because of a lack of budget (netdev_budget) versus ending because of a lack of time (netdev_budget_usecs). Signed-off-by: Patrick Talbert --- include/linux/netdevice.h | 1 + net/core/dev.

Re: [PATCHv5 2/5] ARM: dts: imx6q-bx50v3: Add internal switch

2018-01-23 Thread Florian Fainelli
On 01/23/2018 07:03 AM, Sebastian Reichel wrote: > B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to > communicate with a Marvell switch. On all devices the switch is > connected to a PCI based network card, which needs to be referenced > by DT, so this also adds the common PCI roo

Re: [PATCHv5 3/5] ARM: dts: imx6q-b850v3: Add switch port configuration

2018-01-23 Thread Florian Fainelli
On 01/23/2018 07:03 AM, Sebastian Reichel wrote: > This adds support for the Marvell switch and names the network > ports according to the labels, that can be found next to the > connectors ("ID", "IX", "ePort 1", "ePort 2"). The switch is > connected to the host system using a PCI based network

Re: [PATCH] net: ipv6: ndisc: fix bool assignment in ndisc_send_na

2018-01-23 Thread Gustavo A. R. Silva
Quoting David Miller : From: "Gustavo A. R. Silva" Date: Mon, 22 Jan 2018 16:22:13 -0600 Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Fixes: 1cb3fe513f62 ("ndisc: Break down ndisc_build_skb() and build message

RE: [RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts

2018-01-23 Thread Haiyang Zhang
> -Original Message- > From: Mohammed Gamal [mailto:mga...@redhat.com] > Sent: Tuesday, January 23, 2018 4:34 AM > To: netdev@vger.kernel.org > Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; KY > Srinivasan ; Haiyang Zhang ; > Stephen Hemminger ; vkuzn...@redhat.com; > ca

Re: [PATCH net-next] nfp: fix error return code in nfp_pci_probe()

2018-01-23 Thread David Miller
From: Wei Yongjun Date: Tue, 23 Jan 2018 02:10:27 + > Fix to return error code -EINVAL instead of 0 when num_vfs above > limit_vfs, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun Applied, thank you.

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Eric Dumazet
On Tue, Jan 23, 2018 at 7:29 AM, Kirill Tkhai wrote: > On 23.01.2018 18:12, Eric Dumazet wrote: >> On Tue, Jan 23, 2018 at 6:41 AM, Kirill Tkhai wrote: >>> Hi, Eric, >>> >>> thanks for your review. >>> >>> On 22.01.2018 20:15, Eric Dumazet wrote: On Mon, 2018-01-22 at 12:41 +0300, Kirill Tkh

Re: Memory corruption with r8169 across several device revisions and kernels

2018-01-23 Thread Oliver Freyermuth
Am 23.01.2018 um 16:28 schrieb David Miller: > Looking at how these DMA counters are handled, there appears to be a > requirement that the memory buffer is 64-byte aligned. > > [...] > > Therefore the driver needs to allocate "size + (64 - 1)" bytes and do > the 64-byte alignment of the CPU point

Re: [PATCH bpf-next] bpf: fix incorrect kmalloc usage in lpm_trie MAP_GET_NEXT_KEY rcu region

2018-01-23 Thread Eric Dumazet
On Mon, 2018-01-22 at 22:53 -0800, Yonghong Song wrote: > In commit b471f2f1de8b ("bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE > map"), > the implemented MAP_GET_NEXT_KEY callback function is guarded with rcu read > lock. > In the function body, "kmalloc(size, GFP_USER | __GFP_NOWARN)" i

Re: [PATCH net 2/2] vhost: do not try to access device IOTLB when not initialized

2018-01-23 Thread Michael S. Tsirkin
On Tue, Jan 23, 2018 at 05:27:26PM +0800, Jason Wang wrote: > The code will try to access dev->iotlb when processing > VHOST_IOTLB_INVALIDATE even if it was not initialized which may lead > to NULL pointer dereference. Fixes this by check dev->iotlb before. > > Fixes: 6b1e6cc7855b0 ("vhost: new de

Re: [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()

2018-01-23 Thread David Miller
From: Wei Yongjun Date: Tue, 23 Jan 2018 02:10:46 + > Fix to return error code -ENOMEM from the aq_ndev_alloc() error > handling case instead of 0, as done elsewhere in this function. > > Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module") > Signed-off-by: Wei Yongjun Appli

Re: [PATCH net-next] net: aquantia: make symbol hw_atl_boards static

2018-01-23 Thread David Miller
From: Wei Yongjun Date: Tue, 23 Jan 2018 02:10:38 + > Fixes the following sparse warning: > > drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:50:34: warning: > symbol 'hw_atl_boards' was not declared. Should it be static? > > Fixes: 4948293ff963 ("net: aquantia: Introduce new AQC devi

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Kirill Tkhai
On 23.01.2018 18:45, Eric Dumazet wrote: > On Tue, Jan 23, 2018 at 7:29 AM, Kirill Tkhai wrote: >> On 23.01.2018 18:12, Eric Dumazet wrote: >>> On Tue, Jan 23, 2018 at 6:41 AM, Kirill Tkhai wrote: Hi, Eric, thanks for your review. On 22.01.2018 20:15, Eric Dumazet wrote:

Re: [PATCH net 1/2] vhost: use mutex_lock_nested() in vhost_dev_lock_vqs()

2018-01-23 Thread Michael S. Tsirkin
On Tue, Jan 23, 2018 at 05:27:25PM +0800, Jason Wang wrote: > We used to call mutex_lock() in vhost_dev_lock_vqs() which tries to > hold mutexes of all virtqueues. This may confuse lockdep to report a > possible deadlock because of trying to hold locks belong to same > class. Switch to use mutex_lo

Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-23 Thread Samudrala, Sridhar
On 1/23/2018 2:33 AM, Jason Wang wrote: On 2018年01月12日 13:58, Sridhar Samudrala wrote:   static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)   {   struct virtnet_info *vi = netdev_priv(dev);   int qnum = skb_get_queue_mapping(skb);   struct send_queue *sq

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Eric Dumazet
On Tue, Jan 23, 2018 at 7:57 AM, Kirill Tkhai wrote: > On 23.01.2018 18:45, Eric Dumazet wrote: >> On Tue, Jan 23, 2018 at 7:29 AM, Kirill Tkhai wrote: >>> On 23.01.2018 18:12, Eric Dumazet wrote: On Tue, Jan 23, 2018 at 6:41 AM, Kirill Tkhai wrote: > Hi, Eric, > > thanks for yo

[GIT] Networking

2018-01-23 Thread David Miller
1) Fix divide by zero in mlx5, from Talut Batheesh. 2) Guard against invalid GSO packets coming from untrusted guests and arriving in qdisc_pkt_len_init(), from Eric Dumazet. 3) Similarly add such protection to the various protocol GSO handlers. From Willem de Bruijn. 4) Fix regression a

Re: [PATCH net-next 0/4] Kernel doc fixes for networking

2018-01-23 Thread David Miller
From: Florian Fainelli Date: Mon, 22 Jan 2018 19:14:24 -0800 > This patch series fixes kernel doc warnings found while running make htmldocs > pertaining to the networking subsystem. There is a finaly set of warnings due > to PHYLINK which I have not been able to resolve yet. > > The last patch

Re: [PATCH net-next 1/1] forcedeth: remove duplicate structure member in rx

2018-01-23 Thread David Miller
From: Zhu Yanjun Date: Tue, 23 Jan 2018 02:03:37 -0500 > Since both first_rx_ctx and rx_skb are the head of rx ctx, it not > necessary to use two structure members to statically indicate > the head of rx ctx. So first_rx_ctx is removed. > > CC: Srinivas Eeda > CC: Joe Jin > CC: Junxiao Bi > S

Re: [PATCH] bnx2: remove redundant initializations of pointers txr and rxr

2018-01-23 Thread David Miller
From: Colin King Date: Tue, 23 Jan 2018 09:44:08 + > From: Colin Ian King > > Pointers txr and rxr are being initialized and a few statements later > are being assigned new values without the original values ever being > read. The initialized values are therefore redundant and can be > remo

Re: [PATCH] net: igmp: fix source address check for IGMPv3 reports

2018-01-23 Thread David Miller
From: Felix Fietkau Date: Tue, 23 Jan 2018 10:48:59 +0100 > On 2018-01-22 22:17, David Miller wrote: >> From: Felix Fietkau >> Date: Fri, 19 Jan 2018 11:50:46 +0100 >> >>> Commit "net: igmp: Use correct source address on IGMPv3 reports" >>> introduced a check to validate the source address of l

[PATCH net-next] cxgb4/cxgb4vf: add support for ndo_set_vf_vlan

2018-01-23 Thread Ganesh Goudar
implement ndo_set_vf_vlan for mgmt netdevice to configure the PCIe VF. Original work by: Casey Leedom Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 26 +- drivers/net/ethernet/che

Re: [PATCH net-next] sctp: reset ret in again path in sctp_for_each_transport

2018-01-23 Thread David Miller
From: Xin Long Date: Tue, 23 Jan 2018 18:22:25 +0800 > Commit 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to > return void") only initialized ret for the first time, when going > to again path, the next tsp could be NULL. Without resetting ret, > cb_done would be called with tsp as NU

Re: [PATCH 2/2] ixgbe: Set rss key in order.

2018-01-23 Thread Alexander Duyck
On Tue, Jan 23, 2018 at 7:24 AM, Tonghao Zhang wrote: > If we use ethtool to set rss key, for example, > we except 0x6d is K[0], and 0x5a is K[1]. But > the ixgbe driver set the 0xda is K[0]. > > ethtool -X eth0 hkey 6d:5a:56:da:25:5b:0e:c2:41:67:25:3d > :43:a3:8f:b0:d0:ca:2b:cb:ae:7b:30:b

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Stephen Hemminger
On Mon, 22 Jan 2018 12:41:41 +0300 Kirill Tkhai wrote: > Commit be3fc413da9e "net: use synchronize_rcu_expedited()" introducing > synchronize_net() says: > > >When we hold RTNL mutex, we would like to spend some cpu cycles but not > >block too long other processes waiting for this mutex.

Re: [PATCH] net: ipv6: ndisc: fix bool assignment in ndisc_send_na

2018-01-23 Thread David Miller
From: "Gustavo A. R. Silva" Date: Tue, 23 Jan 2018 09:21:00 -0600 > > Quoting David Miller : > >> From: "Gustavo A. R. Silva" >> Date: Mon, 22 Jan 2018 16:22:13 -0600 >> >>> Assign true or false to boolean variables instead of an integer value. >>> >>> This issue was detected with the help of

Re: [PATCH] net: ipv6: ndisc: fix bool assignment in ndisc_send_na

2018-01-23 Thread Gustavo A. R. Silva
Quoting David Miller : [..] Please don't use the word "fix". '0' is the same as 'false', it's just that the latter is more consistent type wise. So "Use true and false for boolean value" would be a better subject? Yes. I got it. Thanks -- Gustavo

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Kirill Tkhai
On 23.01.2018 19:05, Eric Dumazet wrote: > On Tue, Jan 23, 2018 at 7:57 AM, Kirill Tkhai wrote: >> On 23.01.2018 18:45, Eric Dumazet wrote: >>> On Tue, Jan 23, 2018 at 7:29 AM, Kirill Tkhai wrote: On 23.01.2018 18:12, Eric Dumazet wrote: > On Tue, Jan 23, 2018 at 6:41 AM, Kirill Tkhai

Re: [RFC PATCH 0/2] hv_netvsc: Fix shutdown regression on Win2012 hosts

2018-01-23 Thread Stephen Hemminger
On Tue, 23 Jan 2018 10:34:03 +0100 Mohammed Gamal wrote: > Commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") introduced > a regression that caused VMs not to shutdown after netvsc_device_remove() is > called. This is caused by GPADL teardown sequence change, and while that was > n

Re: [PATCH bpf-next] bpf: fix incorrect kmalloc usage in lpm_trie MAP_GET_NEXT_KEY rcu region

2018-01-23 Thread Daniel Borkmann
On 01/23/2018 04:50 PM, Eric Dumazet wrote: > On Mon, 2018-01-22 at 22:53 -0800, Yonghong Song wrote: >> In commit b471f2f1de8b ("bpf: implement MAP_GET_NEXT_KEY command for >> LPM_TRIE map"), >> the implemented MAP_GET_NEXT_KEY callback function is guarded with rcu read >> lock. >> In the functi

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Kirill Tkhai
On 23.01.2018 19:26, Stephen Hemminger wrote: > On Mon, 22 Jan 2018 12:41:41 +0300 > Kirill Tkhai wrote: > >> Commit be3fc413da9e "net: use synchronize_rcu_expedited()" introducing >> synchronize_net() says: >> >> >When we hold RTNL mutex, we would like to spend some cpu cycles but not >>

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Nicolas Dichtel
Le 22/01/2018 à 23:06, Jiri Benc a écrit : [snip] > Btw, we have one missing piece here: when an interface is moved to a > name space that does not have netnsid attached, we want to find out > where the interface was moved to. But there's currently no reliable way > to do it. For veth, the other en

[iproute PATCH] ip-route: Propagate errors from parse_one_nh()

2018-01-23 Thread Phil Sutter
The following command segfaults if enp0s31f6 does not exist: | # ip -6 route add default proto ra metric 20100 \ | nexthop via fe80:52:0:2040::1fc dev enp0s31f6 weight 1 \ | nexthop via fe80:52:0:2040::1fe dev enp0s31f6 weight 1 Since the non-zero return code from parse_one_nh() is ig

Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev

2018-01-23 Thread Jeff Kirsher
On Tue, 2018-01-23 at 00:08 -0800, Jakub Kicinski wrote: > Since TC block changes drivers are required to check if > the TC hw offload flag is set on the interface themselves. > > Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower") > Fixes: 44ae12a768b7 ("net: sched: move the can_offl

[PATCH v2 2/2] net/ibm/emac: wrong bit is used for STA control register write

2018-01-23 Thread Ivan Mikhaylov
STA control register has areas of mode and opcodes for opeations. 18 bit is using for mode selection, where 0 is old MIO/MDIO access method and 1 is indirect access mode. 19-20 bits are using for setting up read/write operation(STA opcodes). In current state 'read' is set into old MIO/MDIO mode wit

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Nicolas Dichtel
Le 23/01/2018 à 11:26, Wolfgang Bumiller a écrit : > On Tue, Jan 23, 2018 at 10:30:09AM +0100, Jiri Benc wrote: >> On Mon, 22 Jan 2018 23:25:41 +0100, Christian Brauner wrote: >>> This is not necessarily true in scenarios where I move a network device >>> via RTM_NEWLINK + IFLA_NET_NS_PID into a ne

Re: [PATCH 2/2] net/ibm/emac: wrong bit is used for STA control register write

2018-01-23 Thread Ivan Mikhaylov
> So if someone tries to #define EMAC_STACR_STAC_WRITE BIT(18) it would be > 0x4 instead. This is where the confusion is coming from. Can you please > at least mention this somewhere that all the bits in the commit message are > in "MSB 0" format? It's confusing enough as it is ;). Yeap, sure,

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Nicolas Dichtel
Le 23/01/2018 à 13:22, Jiri Benc a écrit : > (Christian, I'm adding back the netdev list, there's no reason not to > have the discussion in open.) > > On Tue, 23 Jan 2018 12:42:19 +0100, Christian Brauner wrote: >> Thanks for the comments and discussion. Sorry, for not going through the >> list bu

Re: [PATCH] net: Make synchronize_net() be expedited only when it's really need

2018-01-23 Thread Eric Dumazet
> > Your original patch did not provide any test results. Only the fact > synchronize_rcu_expedited() > completes faster than plain synchronize_rcu(). But this is an obvious fact > just because of the design, and this is described even in the documentation. > Beleive me, I don't want to offend you

Re: [PATCH v2 2/2] net/ibm/emac: wrong bit is used for STA control register write

2018-01-23 Thread David Miller
When posting a new version of a patch which is part of a series, you must always repost the entire series not just the patches which change. Thank you.

Re: [PATCH net-next] [net] softnet_data: Split time_squeeze counter to provide budget_squeeze

2018-01-23 Thread Eric Dumazet
On Tue, 2018-01-23 at 10:37 -0500, Patrick Talbert wrote: > Add a 'budget_squeeze' counter to be able to differenciate between a > NAPI poll ending with outstanding work because of a lack of budget > (netdev_budget) versus ending because of a lack of time > (netdev_budget_usecs). > > Signed-off-by

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-23 Thread Jiri Benc
On Tue, 23 Jan 2018 17:37:11 +0100, Nicolas Dichtel wrote: > When a virtual interface moves to another netns, the netlink RTM_DELLINK > message > contains the attribute IFLA_NEW_NETNSID, which identifies where the interface > moves. The nsid may be allocated if needed. The problem is that ifindex

  1   2   3   4   >