Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-22 Thread Bjørn Mork
Jay Vosburgh writes: > Michael J Dilmore wrote: > >>if (WARN_ON(!new_active_slave) { >>netdev_dbg("Can't add new active slave - pointer null"); >>return ERROR_CODE >>} > > In general, yes, but in this case, the condition

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-22 Thread Michal Kubecek
On Thu, Jun 22, 2017 at 12:04:54AM +0100, Michael J Dilmore wrote: > > Is it worth at least wrapping BUG_ON in an unlikely macro then? See BUG_ON() definition: #ifndef HAVE_ARCH_BUG_ON #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) #endif where HAVE_ARCH_BUG_ON is

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-22 Thread Gal Pressman
>> +enum { >> +ETHTOOL_LINK_VENDOR_SPECIFIC = -1, /* Vendor specific issue provided in >> vendor_reason */ >> +ETHTOOL_LINK_NO_ISSUE, /* No issue observed with link */ >> +ETHTOOL_LINK_REASON_UNKNOWN, /* Unknown reason */ > I think OTHER would be better that UNKNOWN. Fine with me.

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Gal Pressman
>> +if (!netif_running(netdev)) { >> +ldr->reason = ETHTOOL_LINK_NETDEV_CARRIER_DOWN; >> +return 0; >> +} > This is generic, will work for any interface. The same is true for > ADMIN_DOWN. Either it is not required at all, since the information is > available via

[PATCH NET 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-22 Thread Lin Yun Sheng
Use function set_loopback in phy_driver to setup phy loopback when doing ethtool self test. Signed-off-by: Lin Yun Sheng --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 64 1 file changed, 10 insertions(+), 54 deletions(-) diff --git

[PATCH v5 1/5] stmmac: pci: Make stmmac_pci_info structure constant

2017-06-22 Thread Jan Kiszka
From: Jan Kiszka By removing the PCI device reference from the structure and passing it as parameters to the interested functions, we can make quark_pci_info const. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko

[PATCH v5 5/5] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

2017-06-22 Thread Jan Kiszka
From: Jan Kiszka Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. Signed-off-by: Jan Kiszka --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 97 1 file changed, 64 insertions(+), 33 deletions(-)

[PATCH v5 4/5] stmmac: pci: Select quark_pci_dmi_data from quark_default_data

2017-06-22 Thread Jan Kiszka
From: Jan Kiszka No need to carry this reference in stmmac_pci_info - the Quark-specific setup handler knows that it needs to use the Quark-specific DMI table. This also allows to drop the stmmac_pci_info reference from the setup handler parameter list. Signed-off-by:

[PATCH v5 0/5] stmmac: pci: Refactor DMI probing

2017-06-22 Thread Jan Kiszka
Some cleanups of the way we probe DMI platforms in the driver. Reduces a bit of open-coding and makes the logic easier reusable for any potential DMI platform != Quark. Tested on IOT2000 and Galileo Gen2. Changes in v5: - fixed a remaining issue in patch 5 - dropped patch 6 for now Jan Jan

[PATCH v5 3/5] stmmac: pci: Make stmmac_pci_find_phy_addr truly generic

2017-06-22 Thread Jan Kiszka
From: Jan Kiszka Move the special case for the early Galileo firmware into quark_default_setup. This allows to use stmmac_pci_find_phy_addr for non-quark cases. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-22 Thread Dan Carpenter
We should probably add a might_sleep() to ioremap() to prevent these bugs in the future. This bug is eight years old. You can report it, but it's going to hard to get anyone to fix it. I sometimes ignore ancient bugs. On the other hand, netxen is fairly well supported so it doesn't hurt to

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-22 Thread Sergey Matyukevich
> Not related to your patch but qtnf_map_bar() should be changed not to > return NULL. When functions return both NULL and error pointers the > NULL is supposed to be a special type of success return. Here it is > just a fail return where we forgot to set the error code to > ERR_PTR(-ENOMEM).

[PATCH net v2 2/2] esp6_offload: Fix IP6CB(skb)->nhoff for ESP GRO

2017-06-22 Thread yossiku
From: Yossi Kuperman IP6CB(skb)->nhoff is the offset of the nexthdr field in an IPv6 header, unless there are extension headers present, in which case nhoff points to the nexthdr field of the last extension header. In non-GRO code path, nhoff is set by ipv6_rcv before any

[PATCH net v2 1/2] xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish

2017-06-22 Thread yossiku
From: Yossi Kuperman IPv6 payload length indicates the size of the payload, including any extension headers. In xfrm6_transport_finish, ipv6_hdr(skb)->payload_len is set to the payload size only, regardless of the presence of any extension headers. After ESP GRO transport

[PATCH v5 2/5] stmmac: pci: Use stmmac_pci_info for all devices

2017-06-22 Thread Jan Kiszka
From: Jan Kiszka Make stmmac_default_data compatible with stmmac_pci_info.setup and use an info structure for all devices. This allows to make the probing more regular. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko

Re: [Intel-wired-lan] [PATCH] net: intel: e1000e: add check on e1e_wphy() return value

2017-06-22 Thread Neftin, Sasha
On 21/06/2017 22:52, Gustavo A. R. Silva wrote: Hi Ethan, Quoting Ethan Zhao : Gustavo, The return value of ret_val seems used to check if the access to PHY/NVM got its semaphore, generally speaking, it is needed for every PHY access of this driver.

Re: [PATCH net 1/2] xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish

2017-06-22 Thread Steffen Klassert
On Wed, Jun 21, 2017 at 08:38:13PM +, Yossi Kuperman wrote: > > The bug is there nonetheless, it just doesn't seem to affect anything. > I guess no one was looking inside the IP header thereafter. > > Should I use this instead: 7785bba299a8 ("esp: Add a software GRO codepath")? Yes,

[PATCH NET 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-22 Thread Lin Yun Sheng
This patch add set_loopback in phy_driver, which is used by Mac driver to enable or disable a phy. it also add a generic genphy_loopback function, which use BMCR loopback bit to enable or disable a phy. Signed-off-by: Lin Yun Sheng --- drivers/net/phy/marvell.c| 1 +

[PATCH NET 0/2] Add loopback support in phy_driver and hns ethtool fix

2017-06-22 Thread Lin Yun Sheng
This Patch Set add set_loopback in phy_driver and use it to setup loopback when doing ethtool phy self_test. Lin Yun Sheng (2): net: phy: Add phy loopback support in net phy framework net: hns: Use phy_driver to setup Phy loopback drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 64

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Gal Pressman
> Is my reading correct that in case the reason is not in the > pddr2ethtool_table opaque binary data will be passed from the firmware > to user space? Is there any particular reason to allow for this? If > it's just for the rare scenario where a new error code needs to be > added perhaps it

Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct

2017-06-22 Thread Jia-Ju Bai
On 2017/6/22 14:08, Dan Carpenter wrote: We should probably add a might_sleep() to ioremap() to prevent these bugs in the future. I think it is right to do this. And it will be very useful to summarize common kernel interface functions which may sleep into a list. When writing a new driver,

Re: [PATCH net v2 2/2] esp6_offload: Fix IP6CB(skb)->nhoff for ESP GRO

2017-06-22 Thread Steffen Klassert
On Thu, Jun 22, 2017 at 11:37:11AM +0300, yoss...@mellanox.com wrote: > From: Yossi Kuperman > > IP6CB(skb)->nhoff is the offset of the nexthdr field in an IPv6 > header, unless there are extension headers present, in which case > nhoff points to the nexthdr field of the

EMAIL ALERT

2017-06-22 Thread IT Department
Please be advised that we will be performing a scheduled email maintenance within the next 24hrs, during this maintenance you will be require to update your email account via link http://www.beam.to/9687 --- This email has been checked for viruses by Avast antivirus software.

Re: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-22 Thread Gal Pressman
> Ethtool doesn't work well as a monitoring/event interface. > Maybe this would be better as extended information with the netlink UP/DOW > event. This API is not meant for monitoring events. The main use case here is a new interface that's down and won't go up for some reason. Nothing will

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-22 Thread Gal Pressman
>> +ETHTOOL_LINK_PWR_BUDGET_EXC, /* Power budget exceeded */ >> +ETHTOOL_LINK_MODULE_ADMIN_DOWN, /* Module admin down */ >> + >> +ETHTOOL_LINK_REASONS_COUNT >> +}; > Any enumerated list is going to get changed too often. > Could the API just return a string? The motivation for the

[PATCH net] sfc: Fix MCDI command size for filter operations

2017-06-22 Thread Martin Habets
The 8000 series adapters uses catch-all filters for encapsulated traffic to support filtering VXLAN, NVGRE and GENEVE traffic. This new filter functionality requires a longer MCDI command. This patch increases the size of buffers on stack that were missed, which fixes a kernel panic from the stack

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread Andrey Konovalov
On Wed, Jun 21, 2017 at 11:34 PM, Cong Wang wrote: > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev() and

[PATCH v6 3/3] net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-06-22 Thread Ding Tianhong
From: Casey Leedom cxgb4 Ethernet driver now queries PCIe configuration space to determine if it can send TLPs to it with the Relaxed Ordering Attribute set. Signed-off-by: Casey Leedom Signed-off-by: Ding Tianhong ---

[PATCH v6 1/3] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-06-22 Thread Ding Tianhong
From: Casey Leedom The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING indicates that the Relaxed Ordering Attribute should not be used on Transaction Layer Packets destined for the PCIe End Node so flagged. Initially flagged this way are Intel E5-26xx Root Complex Ports which

[PATCH net-next 4/4] esp6: Fix RX checksum after header pull

2017-06-22 Thread ilant
From: Yossi Kuperman Both ip6_input_finish (non-GRO) and esp6_gro_receive (GRO) strip the IPv6 header without adjusting skb->csum accordingly. As a result CHECKSUM_COMPLETE breaks and "hw csum failure" is written to the kernel log by netdev_rx_csum_fault (dev.c). Fix

[PATCH net-next 0/4] CHECKSUM_COMPLETE in IPSec

2017-06-22 Thread ilant
From: Ilan Tayari This patchset adds support for RX checksum offload in IPSec. When crypto is performed in the host, the checksum needs to be recalculated over all the payload. However, when crypto is performed in the NIC, the NIC may provide useful CHECKSUM_COMPLETE value,

Re: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-22 Thread Gal Pressman
> Any particular reason for implementing this ABI in ethtool rather than > via some netlink-based interface? Devlink naturally comes to mind, > given that cabling problems are not really related to the L2 and netdev > shouldn't be required for diagnostics.. ethtool is already used for reporting

[PATCH v6 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-06-22 Thread Ding Tianhong
The PCIe Device Control Register use the bit 4 to indicate that whether the device is permitted to enable relaxed ordering or not. But relaxed ordering is not safe for some platform which could only use strong write ordering, so devices are allowed (but not required) to enable relaxed ordering bit

[PATCH v6 0/3] Add new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-06-22 Thread Ding Tianhong
Some devices have problems with Transaction Layer Packets with the Relaxed Ordering Attribute set. This patch set adds a new PCIe Device Flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING, a set of PCI Quirks to catch some known devices with Relaxed Ordering issues, and a use of this new flag by the cxgb4

[PATCH net-next 3/4] xfrm6: Fix CHECKSUM_COMPLETE after IPv6 header push

2017-06-22 Thread ilant
From: Yossi Kuperman xfrm6_transport_finish rebuilds the IPv6 header based on the original one and pushes it back without fixing skb->csum. Therefore, CHECKSUM_COMPLETE is no longer valid and the packet gets dropped. Fix skb->csum by calling skb_postpush_rcsum. Note: A

[PATCH net-next 2/4] esp6: Support RX checksum with crypto offload

2017-06-22 Thread ilant
From: Ilan Tayari Keep the device's reported ip_summed indication in case crypto was offloaded by the device. Subtract the csum values of the stripped parts (esp header+iv, esp trailer+auth_data) to keep value correct. Note: CHECKSUM_COMPLETE should be indicated only if

[PATCH net-next 1/4] esp4: Support RX checksum with crypto offload

2017-06-22 Thread ilant
From: Ilan Tayari Keep the device's reported ip_summed indication in case crypto was offloaded by the device. Subtract the csum values of the stripped parts (esp header+iv, esp trailer+auth_data) to keep value correct. Note: CHECKSUM_COMPLETE should be indicated only if

[PATCH net-next 0/3] net: mvpp2: misc improvements

2017-06-22 Thread Thomas Petazzoni
David, Here are a few patches making various small improvements/refactoring in the mvpp2 driver. They are based on today's net-next. Thanks! Thomas Thomas Petazzoni (3): net: mvpp2: add comments about smp_processor_id() usage net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() function

[PATCH net-next 3/3] net: mvpp2: remove mvpp2_pool_refill()

2017-06-22 Thread Thomas Petazzoni
When all a function does is calling another function with the exact same arguments, in the exact same order, you know it's time to remove said function. Which is exactly what this commit does. Signed-off-by: Thomas Petazzoni ---

[PATCH net-next 1/3] net: mvpp2: add comments about smp_processor_id() usage

2017-06-22 Thread Thomas Petazzoni
A previous commit modified a number of smp_processor_id() used in migration-enabled contexts into get_cpu/put_cpu sections. However, a few smp_processor_id() calls remain in the driver, and this commit adds comments explaining why they can be kept. Signed-off-by: Thomas Petazzoni

[PATCH net-next 2/3] net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() function

2017-06-22 Thread Thomas Petazzoni
This function is not used in the driver, remove it. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c

[PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb()

2017-06-22 Thread Paolo Abeni
very similar to commit dd99e425be23 ("udp: prefetch rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache miss when the BH is bottle-neck for UDP over ipv6 packet processing, e.g. for small packets when a single RX NIC ingress queue is in use. Performances under flood when multiple NIC

[PATCH rdma-next V1 04/19] RDMA/netlink: Rename and remove redundant parameter from ibnl_multicast

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky The pointer to netlink header was not used in the ibnl_multicast function, so let's remove it and simplify the function signature. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise ---

[PATCH rdma-next V1 03/19] RDMA/netlink: Rename and remove redundant parameter from ibnl_unicast

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky Netlink message header is not needed for unicast reply, hence remove it. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise --- drivers/infiniband/core/iwpm_msg.c | 6 +++---

[PATCH rdma-next V1 02/19] RDMA/netlink: Simplify the put_msg and put_attr

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky Reuse standard macros to cancel the netlink message in case of error. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise --- drivers/infiniband/core/netlink.c | 31 +--

[PATCH rdma-next V1 01/19] RDMA/netlink: Add flag to consolidate common handing

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky Add ability to provide flags to control RDMA netlink callbacks and convert addr.c and sa_query.c to be first users of such infrastructure. It allows to move their CAP_NET_ADMIN checks into netlink core. Signed-off-by: Leon Romanovsky

[PATCH rdma-next V1 00/19] RDMA Netlink Device Client

2017-06-22 Thread Leon Romanovsky
Hi All, This is second version of the RDMA netlink patch set. The following patch set is an implementation of NLDEV - RDMA netlink device client. It is based on the already sent patch [1] and patch set [2]. This client is needed to properly integrate coming RDMAtool [3] into iproute2 package

[PATCH rdma-next V1 08/19] RDMA/core: Add and expose static device index

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky This patch adds static device index in similar fashion to already available in netdev world (struct net->ifindex). In downstream patches, the RDMA nelink will use this idx-to-ib_device conversion, so as part of this commit, we are exposing the

[PATCH rdma-next V1 16/19] RDMA/netlink: Add nldev device doit implementation

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky Provide ability to query specific device. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise --- drivers/infiniband/core/nldev.c | 40 1 file changed, 40

[PATCH rdma-next V1 12/19] RDMA/netlink: Update copyright

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky Add Mellanox to the copyright header. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise --- drivers/infiniband/core/netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH rdma-next V1 13/19] RDMA/netlink: Add netlink device definitions to UAPI

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky Introduce new defines to rdma_netlink.h, so the RDMA configuration tool will be able to communicate with RDMA subsystem by using the shared defines. The addition of new client (NLDEV) revealed the fact that we exposed by mistake the RDMA_NL_I40IW

[PATCH rdma-next V1 09/19] RDMA/netlink: Add and implement doit netlink callback

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky The .doit callback is used by netlink core to differentiate between get and set operations. Common convention is to use that call for command operations like (SET, ADD, e.t.c.) and/or access without NLF_M_DUMP flag. This commit adds proper declaration

[PATCH rdma-next V1 06/19] RDMA/netlink: Rename netlink callback struct

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky The RDMA netlink client infrastructure was removed and made obsolete the old name (ibnl_client_cbs). This patch renames to the more appropriate name (rdma_nl_cbs). Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise

[PATCH rdma-next V1 15/19] RDMA/netlink: Implement nldev device dumpit calback

2017-06-22 Thread Leon Romanovsky
From: Leon Romanovsky This patch adds the ability to return all available devices together with their properties. Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise --- drivers/infiniband/core/nldev.c | 64

Re: [PATCH net-next v2 00/12] nfp: add flower app with representors

2017-06-22 Thread Or Gerlitz
On Wed, Jun 21, 2017 at 10:40 PM, David Miller wrote: > > Simon it looks like Or has some more questions about how these > representers will work and operate. > > So I'm going to mark this series as "deferred" in patchwork while > you two sort out that conversation. Hi

Re: [PATCH] liquidio: stop using huge static buffer, save 4096k in .data

2017-06-22 Thread David Miller
From: Denys Vlasenko Date: Mon, 19 Jun 2017 21:50:52 +0200 > Only compile-tested - I don't have the hardware. > > From code inspection, octeon_pci_write_core_mem() appears to be safe wrt > unaligned source. In any case, u8 fbuf[] was not guaranteed to be aligned > anyway. >

Re: [PATCH v2] net/mlx5e: Use device ID defines

2017-06-22 Thread David Miller
From: Myron Stowe Date: Tue, 20 Jun 2017 11:21:26 -0600 > Use Mellanox device ID definitions in the driver's mlx5 ID table so tools > such as 'grep' and 'cscope' can be used to help find correlated material > (such as INTx Masking quirks: d76d2fe05fd PCI: Convert Mellanox

Re: [Patch net] ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER

2017-06-22 Thread David Miller
From: Cong Wang Date: Tue, 20 Jun 2017 11:42:27 -0700 > In commit 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after > ipv6_dev_notf") > I assumed NETDEV_REGISTER and NETDEV_UNREGISTER are paired, > unfortunately, as reported by jeffy, netdev_wait_allrefs() >

Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

2017-06-22 Thread David Miller
From: Zach Brown Date: Tue, 20 Jun 2017 12:48:11 -0500 > The commit ("net/phy: micrel: Add workaround for bad autoneg") fixes an > autoneg failure case by resetting the hardware. This turns off > intterupts. Things will work themselves out if the phy polls, as it will > figure

Re: [PATCH] net: phy: smsc: fix buffer overflow in memcpy

2017-06-22 Thread David Miller
From: Arnd Bergmann Date: Tue, 20 Jun 2017 22:40:46 +0200 > The memcpy annotation triggers for a fixed-length buffer copy: > > In file included from /git/arm-soc/arch/arm64/include/asm/processor.h:30:0, > from /git/arm-soc/arch/arm64/include/asm/spinlock.h:21, >

Re: [PATCH net-next] Add a tcp_filter hook before handle ack packet

2017-06-22 Thread David Miller
From: Chenbo Feng Date: Tue, 20 Jun 2017 19:06:40 -0700 > From: Chenbo Feng > > Currently in both ipv4 and ipv6 code path, the ack packet received when > sk at TCP_NEW_SYN_RECV state is not filtered by socket filter or cgroup > filter since it is

Re: [PATCH] drivers: net: cpsw-common: Fix reading of mac address for am43 SoCs

2017-06-22 Thread David Miller
From: Lokesh Vutla Date: Wed, 21 Jun 2017 14:12:04 +0530 > cpsw driver tries to get macid for am43xx SoCs using the compatible > ti,am4372. But not all variants of am43x uses this complatible like > epos evm uses ti,am438x. So use a generic compatible ti,am43 to get > macid

Re: veth: Be more robust on network device creation when no attributes

2017-06-22 Thread David Miller
From: Serhey Popovych Date: Wed, 21 Jun 2017 12:12:24 +0300 > There are number of problems with configuration peer > network device in absence of IFLA_VETH_PEER attributes > where attributes for main network device shared with > peer. > > First it is not feasible to

Re: [PATCH net] xen-netback: correctly schedule rate-limited queues

2017-06-22 Thread David Miller
From: Wei Liu Date: Wed, 21 Jun 2017 10:21:22 +0100 > Add a flag to indicate if a queue is rate-limited. Test the flag in > NAPI poll handler and avoid rescheduling the queue if true, otherwise > we risk locking up the host. The rescheduling will be done in the > timer

Re: [PATCH] of: update ePAPR references to point to Devicetree Specification

2017-06-22 Thread Rob Herring
On Mon, Jun 19, 2017 at 03:23:41AM -0700, Frank Rowand wrote: > On 06/18/17 07:05, Rob Herring wrote: > > On Tue, Jun 13, 2017 at 07:49:04PM -0700, frowand.l...@gmail.com wrote: > >> From: Frank Rowand > >> > >> The Devicetree Specification has superseded the ePAPR as the >

Re: [PATCH V2 net 0/4] macvlan: Fix some issues with changing mac addresses

2017-06-22 Thread David Miller
From: Vladislav Yasevich Date: Wed, 21 Jun 2017 07:59:15 -0400 > There are some issues in macvlan wrt to changing it's mac address. > * An error is returned in the specified address is the same as an already > assigned address. > * In passthru mode, the mac address of the

[PATCH] net: stmmac: make some functions static

2017-06-22 Thread Colin King
From: Colin Ian King The functions dwmac4_dma_init_rx_chan, dwmac4_dma_init_tx_chan and dwmac4_dma_init_channel do not need to be in global scope, so them static. Cleans up sparse warnings: "symbol 'dwmac4_dma_init_rx_chan' was not declared. Should it be static?"

Re: [PATCH net-next v3 03/13] sock: add MSG_ZEROCOPY

2017-06-22 Thread David Miller
From: Willem de Bruijn Date: Wed, 21 Jun 2017 17:18:06 -0400 > +struct ubuf_info *sock_zerocopy_alloc(struct sock *sk, size_t size) > +{ > + struct sk_buff *skb; > + struct ubuf_info *uarg; Reverse christmas tree. > +void sock_zerocopy_callback(struct

[PATCH v3 08/11] brcmsmac: make some local variables 'static const' to reduce stack size

2017-06-22 Thread Arnd Bergmann
With KASAN and a couple of other patches applied, this driver is one of the few remaining ones that actually use more than 2048 bytes of kernel stack: broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy_gainctrl': broadcom/brcm80211/brcmsmac/phy/phy_n.c:16065:1:

[PATCH v3 03/11] rocker: mark rocker_tlv_put_* functions as noinline_if_stackbloat

2017-06-22 Thread Arnd Bergmann
Inlining these functions creates lots of stack variables when KASAN is enabled, leading to this warning about potential stack overflow: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_cmd_flow_tbl_add': drivers/net/ethernet/rocker/rocker_ofdpa.c:621:1: error: the frame size of

[PATCH v3 06/11] r820t: mark register functions as noinline_if_stackbloat

2017-06-22 Thread Arnd Bergmann
With KASAN, we get an overly long stack frame due to inlining the register access function: drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7': drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] An

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread David Miller
From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev()

Re: [PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb()

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 13:44 -0400, David Miller wrote: > From: Paolo Abeni > Date: Thu, 22 Jun 2017 15:01:22 +0200 > > > very similar to commit dd99e425be23 ("udp: prefetch > > rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache > > miss when the BH is bottle-neck

Re: [PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Maciej Żenczykowski
So this is clearly an improvement over the current state of things. However, I think there is still a very slight race condition in the error case, since I imagine udp early demux might find the socket while ip6_datagram_dst_update() is running. It's possible that inet_dport assignment could

Re: DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] udp: try to avoid 2 cache miss on dequeue)

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 23:06 +1000, Michael Ellerman wrote: > Paolo wrote: > > 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

[PATCH v3 02/11] netlink: mark nla_put_{u8,u16,u32} noinline_if_stackbloat

2017-06-22 Thread Arnd Bergmann
When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large stack frames in some functions. This goes unnoticed normally because CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with

[PATCH v3 04/11] mtd: cfi: reduce stack size with KASAN

2017-06-22 Thread Arnd Bergmann
When CONFIG_KASAN is used, we consume a lot of extra stack space: drivers/mtd/chips/cfi_cmdset_0020.c: In function 'do_write_buffer': drivers/mtd/chips/cfi_cmdset_0020.c:603:1: error: the frame size of 2184 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread David Miller
From: Wei Wang Date: Wed, 21 Jun 2017 14:36:31 -0700 > + memset(>sk_v6_daddr, 0 sizeof(sk->sk_v6_daddr); Tell me how that compiles.

[PATCH v2] of: update ePAPR references to point to Devicetree Specification

2017-06-22 Thread frowand . list
From: Frank Rowand The Devicetree Specification has superseded the ePAPR as the base specification for bindings. Update files in Documentation to reference the new document. First reference to ePAPR in Documentation/devicetree/bindings/arm/cci.txt is generic, remove it.

[next-queue PATCH] i40evf: remove unnecessary __packed

2017-06-22 Thread Tushar Dave
This is similar to 'commit 9588397d24eec ("i40e: remove unnecessary __packed")' to avoid unaligned access. Signed-off-by: Tushar Dave --- drivers/net/ethernet/intel/i40evf/i40e_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread David Miller
From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev()

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Wei Wang
On Thu, Jun 22, 2017 at 10:25 AM, David Miller wrote: > From: Wei Wang > Date: Wed, 21 Jun 2017 14:36:31 -0700 > >> + memset(>sk_v6_daddr, 0 sizeof(sk->sk_v6_daddr); > > Tell me how that compiles. Really sorry about that. I ported over the

Re: [oss-drivers] Re: [PATCH net-next 00/12] nfp: add flower app with representors

2017-06-22 Thread Simon Horman
On Thu, Jun 22, 2017 at 05:39:09PM +0300, Or Gerlitz wrote: > On Wed, Jun 21, 2017 at 12:32 PM, Simon Horman > wrote: > > > This patchset is in two parts. > > > > The first 9 patches add code to allow representors to be instantiated > > etc... The remaining patches

[PATCH v3 09/11] brcmsmac: split up wlc_phy_workarounds_nphy

2017-06-22 Thread Arnd Bergmann
The stack consumption in this driver is still relatively high, with one remaining warning if the warning level is lowered to 1536 bytes: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: error: the frame size of 1880 bytes is larger than 1536 bytes

Re: [PATCH v5 0/5] stmmac: pci: Refactor DMI probing

2017-06-22 Thread David Miller
From: Jan Kiszka Date: Thu, 22 Jun 2017 08:17:56 +0200 > Some cleanups of the way we probe DMI platforms in the driver. Reduces > a bit of open-coding and makes the logic easier reusable for any > potential DMI platform != Quark. > > Tested on IOT2000 and Galileo Gen2. >

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread kbuild test robot
Hi Wei, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Wei-Wang/udp-ipv6-reset-daddr-and-dport-in-sk-if-connect-fails/20170623-011149 config: alpha-allyesconfig (attached as .config) compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce:

[PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Wei Wang
From: Wei Wang In __ip6_datagram_connect(), reset sk->sk_v6_daddr and inet->dport if error occurs so that udp_v6_early_demux() won't consider this socket as a valid candidate for early demux. v2: fix compilation error Signed-off-by: Wei Wang Acked-by:

Re: [PATCH] dt-bindings: gpmc: Correct location of generic gpmc binding

2017-06-22 Thread Boris Brezillon
On Wed, 21 Jun 2017 08:14:54 -0400 Tom Rini wrote: > The binding bus/ti-gpmc.txt has been moved to > memory-controllers/omap-gpmc.txt. Update all references to this in > order to make reading and understanding a given binding easier. > > Cc: David Woodhouse

[PATCH] rsi: add in missing RSI_FSM_STATES into array fsm_state

2017-06-22 Thread Colin King
From: Colin Ian King Two recent commits added new RSI_FSM_STATES (namely FSM_FW_NOT_LOADED and FSM_COMMON_DEV_PARAMS_SENT) and the corresponding table fsm_state was not updated to match. This can lead to an array overrun when accessing the latter two states in

Re: [PATCH net-next v3 06/13] sock: MSG_ZEROCOPY notification coalescing

2017-06-22 Thread David Miller
From: Willem de Bruijn Date: Wed, 21 Jun 2017 17:18:09 -0400 > +static bool skb_zerocopy_notify_extend(struct sk_buff *skb, u32 lo, u16 len) > +{ > + struct sock_exterr_skb *serr = SKB_EXT_ERR(skb); > + u64 sum_len; > + u32 old_lo, old_hi; Reverse

Re: [PATCH] netvsc: don't access netdev->num_rx_queues directly

2017-06-22 Thread David Miller
From: Arnd Bergmann Date: Thu, 22 Jun 2017 00:16:37 +0200 > This structure member is hidden behind CONFIG_SYSFS, and we > get a build error when that is disabled: > > drivers/net/hyperv/netvsc_drv.c: In function 'netvsc_set_channels': > drivers/net/hyperv/netvsc_drv.c:754:49:

[PATCH 3/3] net: qcom/emac: add support for emulation systems

2017-06-22 Thread Timur Tabi
On emulation systems, the EMAC's internal PHY ("SGMII") is not present, but is not needed for network functionality. So just display a warning message and ignore the SGMII. Tested-by: Philip Elcan Tested-by: Adam Wallis Signed-off-by: Timur Tabi

[PATCH 1/3] net: qcom/emac: add shutdown function

2017-06-22 Thread Timur Tabi
The shutdown function halts all DMA and interrupts, so that all operations are discontinued when the system shuts down, e.g. via kexec or a forced reboot. Tested-by: Tyler Baicar Signed-off-by: Timur Tabi ---

[PATCH 2/3] net: qcom/emac: do not reset the EMAC during initialization

2017-06-22 Thread Timur Tabi
It doesn't make sense to reset the EMAC in the middle of initializing it during the probe. Tested-by: Richard Ruigrok Signed-off-by: Timur Tabi --- drivers/net/ethernet/qualcomm/emac/emac.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 0/3] net: qcom/emac: various minor improvements

2017-06-22 Thread Timur Tabi
A collection of minor fixes and features to the Qualcomm Technologies EMAC network driver. Timur Tabi (3): net: qcom/emac: add shutdown function net: qcom/emac: do not reset the EMAC during initialization net: qcom/emac: add support for emulation systems

[PATCH v3 05/11] dvb-frontends: reduce stack size in i2c access

2017-06-22 Thread Arnd Bergmann
A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with -fsanitize-address-use-after-scope, e.g. drivers/media/dvb-frontends/cxd2841er.c:3225:1: error: the frame size of 3992 bytes is larger than 3072 bytes [-Werror=frame-larger-than=]

[PATCH v3 00/11] bring back stack frame warning with KASAN

2017-06-22 Thread Arnd Bergmann
This is a new version of patches I originally submitted back in March [1], this time reducing the size of the series even further. This minimal set of patches only makes sure that we do get frame size warnings in allmodconfig for x86_64 and arm64 again, even with KASAN enabled. The changes this

Re: [PATCH net-next,1/2] hv_netvsc: Remove unnecessary var link_state from struct netvsc_device_info

2017-06-22 Thread David Miller
From: Haiyang Zhang Date: Wed, 21 Jun 2017 16:40:46 -0700 > From: Haiyang Zhang > > We simply use rndis_device->link_state in the netdev_dbg. The variable, > link_state from struct netvsc_device_info, is not used anywhere else. > >

Re: [PATCH net-next,2/2] hv_netvsc: Fix the carrier state error when data path is off

2017-06-22 Thread David Miller
From: Haiyang Zhang Date: Wed, 21 Jun 2017 16:40:47 -0700 > From: Haiyang Zhang > > When the VF NIC is opened, the synthetic NIC's carrier state is set to > off. This tells the host to transitions data path to the VF device. But > if

Re: [PATCH net] sfc: Fix MCDI command size for filter operations

2017-06-22 Thread David Miller
From: Martin Habets Date: Thu, 22 Jun 2017 10:50:41 +0100 > The 8000 series adapters uses catch-all filters for encapsulated traffic > to support filtering VXLAN, NVGRE and GENEVE traffic. > This new filter functionality requires a longer MCDI command. > This patch

  1   2   >