[PATCH] net: stmmac: socfgpa: Ensure emac bit set in sys manager for MII/GMII/SGMII.

2017-08-17 Thread Stephan Gatzka
When using MII/GMII/SGMII in the Altera SoC, the phy needs to be wired through the FPGA. To ensure correct behavior, the appropriate bit in the System Manager FPGA Interface Group register needs to be set. Signed-off-by: Stephan Gatzka --- drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 5

Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-17 Thread Joel Fernandes
On Tue, Aug 8, 2017 at 8:35 PM, David Miller wrote: > From: Joel Fernandes > Date: Mon, 7 Aug 2017 18:20:49 -0700 > >> On Mon, Aug 7, 2017 at 11:28 AM, David Miller wrote: >>> The amount of hellish hacks we are adding to deal with this is getting >>> way out of control. >> >> I agree with you th

[PATCH v3 net 0/2] net: ixgbe: Use new flag to disable Relaxed Ordering

2017-08-17 Thread Ding Tianhong
From: Mao Wenan The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to indicate that Relaxed Ordering Attributes (RO) should not be used for Transaction Layer Packets (TLP) targeted toward these affected Root Port, it will clear the bit4 in the PCIe Device Control register, so the PCIe

[PATCH v3 net 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-08-17 Thread Ding Tianhong
The ixgbe driver use the compile check to determine if it can send TLPs to Root Port with the Relaxed Ordering Attribute set, this is too inconvenient, now the new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to the kernel and we could check the bit4 in the PCIe Device Control register to

[PATCH v3 net 1/2] Revert commit 1a8b6d76dc5b ("net:add one common config...")

2017-08-17 Thread Ding Tianhong
The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to indicate that Relaxed Ordering Attributes (RO) should not be used for Transaction Layer Packets (TLP) targeted toward these affected Root Port, it will clear the bit4 in the PCIe Device Control register, so the PCIe device drivers cou

[PATCH net-next 2/2] liquidio: with embedded f/w, issue droq credits before enablement

2017-08-17 Thread Felix Manlunas
From: Rick Farrington 1. Issue credits BEFORE enabling DROQ's; this prevents PKTPF_ERR interrupt. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff

[PATCH net-next 1/2] liquidio: with embedded f/w, don't reload f/w, issue pf flr at exit

2017-08-17 Thread Felix Manlunas
From: Rick Farrington 1. Add support for PF FLR when exiting (enables CORE_DRV_ACTIVE upon next driver init) 2. Skip some initialization (don't try to load f/w, activate consoles). Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_mai

[PATCH net-next 0/2] liquidio: initialization fixes for embedded firmware

2017-08-17 Thread Felix Manlunas
From: Rick Farrington Fix problems when using an adapter w/embedded f/w (param "fw_type=none"). 1. Add support for PF FLR when exiting. 2. Skip some initialization (don't try to load f/w, activate consoles). 3. Issue credits BEFORE enabling DROQs. Rick Farrington (2): liquidio: with embedded

Re: [PATCH net v2 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-08-17 Thread Ding Tianhong
On 2017/8/18 13:04, Tantilov, Emil S wrote: >> -Original Message- >> From: Ding Tianhong [mailto:dingtianh...@huawei.com] >> Sent: Thursday, August 17, 2017 5:39 PM >> To: Tantilov, Emil S ; da...@davemloft.net; >> Kirsher, Jeffrey T ; keesc...@chromium.org; >> linux-ker...@vger.kernel.or

Re: [RFC] about net: Fix inconsistent teardown and release of private netdev state.

2017-08-17 Thread David Miller
From: Eric Dumazet Date: Thu, 17 Aug 2017 15:30:40 -0700 > So we do not really know if we need to clean up or not. We always know, the answer is that whenever register_netdev() fails we never need to perform any cleanup which is done by priv_destructor. > Any idea how to fix the issue ? Your p

Re: [PATCH V5 net-next 01/21] net-next/hinic: Initialize hw interface

2017-08-17 Thread David Miller
From: Stephen Hemminger Date: Thu, 17 Aug 2017 17:45:40 -0700 > On Thu, 17 Aug 2017 19:52:42 +0800 > Aviad Krawczyk wrote: > >> +nic_dev = (struct hinic_dev *)netdev_priv(netdev); > > Since netdev_priv() returns void *, a cast is not necessary here. Agreed.

RE: [PATCH net v2 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-08-17 Thread Tantilov, Emil S
>-Original Message- >From: Ding Tianhong [mailto:dingtianh...@huawei.com] >Sent: Thursday, August 17, 2017 5:39 PM >To: Tantilov, Emil S ; da...@davemloft.net; >Kirsher, Jeffrey T ; keesc...@chromium.org; >linux-ker...@vger.kernel.org; sparcli...@vger.kernel.org; intel-wired- >l...@lists.os

Re: [PATCH V5 net-next 01/21] net-next/hinic: Initialize hw interface

2017-08-17 Thread David Miller
From: Stephen Hemminger Date: Thu, 17 Aug 2017 17:42:05 -0700 > Please drop these functions, they do nothing and are not used > as stubs in any operations table. It might have been helpful to scan the entire series to understand why it looks this way. He's building the driver up, one piece at a

Re: [PATCH net-next v1 05/14] amd-xgbe: Add additional debugfs support

2017-08-17 Thread David Miller
From: Andrew Lunn Date: Fri, 18 Aug 2017 02:30:57 +0200 > On Thu, Aug 17, 2017 at 07:02:50PM -0500, Tom Lendacky wrote: >> Add additional debugfs support for reading / writing registers of any >> attached external phy devices as well as the SFP eeprom data. > > Hi Tom > > What is wrong with usi

Re: [PATCH REPOST v5 iproute2 0/8] RDMAtool

2017-08-17 Thread Leon Romanovsky
On Thu, Aug 17, 2017 at 06:01:18PM -0700, Stephen Hemminger wrote: > On Thu, 17 Aug 2017 09:56:06 +0300 > Leon Romanovsky wrote: > > > This is fifth revision of series implementing the RDAMtool - the tool > > to configure RDMA devices. > > > > It looks like everyone who was interested to read cov

Re: [PATCH] PCI: Allow PCI express root ports to find themselves

2017-08-17 Thread Michael Ellerman
off-by: Thierry Reding > --- > This applies on top of and was tested on next-20170817. > > Michael, it'd be great if you could test this one again to clarify > whether or not the fix that's already in Linus' tree is still needed, or > whether it's indeed obsoleted by this patch. This works fine for me, applied on top of Linus' tree (d33a2a914319). cheers

using PASIDs to enable a safe variant of direct ring access

2017-08-17 Thread Michael S. Tsirkin
Back in 2014, patches "net: sched: af_packet support for direct ring access" were rejected since there was no memory protection performed by any part of the system. The point of the patchset was to split off a set of driver queues from the driver and map the queues into user space

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-17 Thread Alexei Starovoitov
On 8/15/17 12:34 PM, Edward Cree wrote: State of a register doesn't matter if it wasn't read in reaching an exit; a write screens off all reads downstream of it from all explored_states upstream of it. This allows us to prune many more branches; here are some processed insn counts for some Cil

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-17 Thread Dexuan Cui
> From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > Sent: Thursday, August 17, 2017 08:17 > > > > Putting aside nested virtualization, I want to load the transport (vmci, > > Hyper-V, vsock) for which there is paravirtualized hardware present > > inside the guest. > > Good points. Completely ag

[PATCHv2 net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-17 Thread Xin Long
As we know in some target's checkentry it may dereference par.entryinfo to check entry stuff inside. But when sched action calls xt_check_target, par.entryinfo is set with NULL. It would cause kernel panic when calling some targets. It can be reproduce with: # tc qd add dev eth1 ingress handle f

[PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-17 Thread Matthew Dawson
Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove headers from UDP packets before queueing"), when udp packets are being peeked the requested extra offset is always 0 as there is no need to skip the udp header. However, when the offset is 0 and the next skb is of length 0, it is

Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier

2017-08-17 Thread John Fastabend
On 08/17/2017 06:17 PM, Alexei Starovoitov wrote: > On 8/17/17 6:14 PM, Martin KaFai Lau wrote: >> In check_map_func_compatibility(), a 'break' has been accidentally >> removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS >> cases. This patch adds it back. >> >> Fixes: 174a79ff

Re: [PATCH] PCI: Allow PCI express root ports to find themselves

2017-08-17 Thread Shawn Lin
awn Lin --- This applies on top of and was tested on next-20170817. Michael, it'd be great if you could test this one again to clarify whether or not the fix that's already in Linus' tree is still needed, or whether it's indeed obsoleted by this patch. drivers/pci/pci.c

Re: [PATCH v2] bpf: Update sysctl documentation to list all supported architectures

2017-08-17 Thread Michael Ellerman
Daniel Borkmann writes: > On 08/17/2017 12:30 PM, Michael Ellerman wrote: >> The sysctl documentation states that the JIT is only available on >> x86_64, which is no longer correct. >> >> Update the list, and break it out to indicate which architectures >> support the cBPF JIT (via HAVE_CBPF_JIT)

Re: Thoughts on staging and on fixing up drivers?

2017-08-17 Thread Larry Finger
On 08/17/2017 04:07 PM, tedheadster wrote: Larry, you've migrated a bunch of staging code, and tried various approaches. Do you have any lessons on what has worked and what hasn't and if there is anything we can do to make the process better? I am also quite interested in such work. We asked

Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier

2017-08-17 Thread Alexei Starovoitov
On 8/17/17 6:14 PM, Martin KaFai Lau wrote: In check_map_func_compatibility(), a 'break' has been accidentally removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS cases. This patch adds it back. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Cc: John Fastaben

[PATCH net-next] bpf: Fix map-in-map checking in the verifier

2017-08-17 Thread Martin KaFai Lau
In check_map_func_compatibility(), a 'break' has been accidentally removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS cases. This patch adds it back. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Cc: John Fastabend Signed-off-by: Martin KaFai Lau --- kerne

Re: [PATCH iproute2 json v2 00/27] ip: add -json support to 'ip link show'

2017-08-17 Thread Stephen Hemminger
On Thu, 17 Aug 2017 10:35:47 -0700 Julien Fortin wrote: > From: Julien Fortin > > This patch series adds json support to 'ip [-details] link show [dev DEV]' > Each patch describes the json schema it adds and provides some examples. > > Julien Fortin (27): > color: add new COLOR_NONE and disa

Re: [PATCH REPOST v5 iproute2 0/8] RDMAtool

2017-08-17 Thread Stephen Hemminger
On Thu, 17 Aug 2017 09:56:06 +0300 Leon Romanovsky wrote: > This is fifth revision of series implementing the RDAMtool - the tool > to configure RDMA devices. > > It looks like everyone who was interested to read cover letter already did it, > so I'll start from the changelog: > > Changelog: >

Re: [PATCH V5 net-next 01/21] net-next/hinic: Initialize hw interface

2017-08-17 Thread Stephen Hemminger
On Thu, 17 Aug 2017 19:52:42 +0800 Aviad Krawczyk wrote: > + nic_dev = (struct hinic_dev *)netdev_priv(netdev); Sinc netdev_priv() returns void *, a cast is not necessary here.

Re: [PATCH net v2 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-08-17 Thread Ding Tianhong
On 2017/8/17 22:17, Tantilov, Emil S wrote: >> ret_val = ixgbe_start_hw_generic(hw); >> >> -#ifndef CONFIG_SPARC >> -/* Disable relaxed ordering */ >> -for (i = 0; ((i < hw->mac.max_tx_queues) && >> - (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { >> -regval = IXGBE_R

Re: [PATCH V5 net-next 01/21] net-next/hinic: Initialize hw interface

2017-08-17 Thread Stephen Hemminger
On Thu, 17 Aug 2017 19:52:42 +0800 Aviad Krawczyk wrote: > + > +/** > + * init_pfhwdev - Initialize the extended components of PF > + * @pfhwdev: the HW device for PF > + * > + * Return 0 - success, negative - failure > + **/ > +static int init_pfhwdev(struct hinic_pfhwdev *pfhwdev) > +{ > +

RE: [PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race

2017-08-17 Thread Dexuan Cui
> > On Aug 16, 2017, at 12:15 AM, Dexuan Cui wrote: > > With the current code, when vsock_dequeue_accept() is removing a sock > > from the list, nothing prevents vsock_enqueue_accept() from adding a new > > sock into the list concurrently. We should add a lock to protect the list. > > For the VMC

Re: [PATCH net-next v1 05/14] amd-xgbe: Add additional debugfs support

2017-08-17 Thread Andrew Lunn
On Thu, Aug 17, 2017 at 07:02:50PM -0500, Tom Lendacky wrote: > Add additional debugfs support for reading / writing registers of any > attached external phy devices as well as the SFP eeprom data. Hi Tom What is wrong with using the standard APIs for this? ethtool --moduile-info ioctls SIOCGMI

[PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches

2017-08-17 Thread Gustavo A. R. Silva
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1415177 Signed-off-by: Gustavo A. R. Silva --- This issue was reported by Coverity and it was tested by compilation only. .../net/wireless/realtek/

[PATCH net-next v1 13/14] amd-xgbe: Add support for VXLAN offload capabilities

2017-08-17 Thread Tom Lendacky
The hardware has the capability to perform checksum offload support (both Tx and Rx) and TSO support for VXLAN packets. Add the support required to enable this. The hardware can only support a single VXLAN port for offload. If more than one VXLAN port is added then the offload capabilities have to

[PATCH net-next v1 08/14] amd-xgbe: Optimize DMA channel interrupt enablement

2017-08-17 Thread Tom Lendacky
Currently whenever the driver needs to enable or disable interrupts for a DMA channel it reads the interrupt enable register (IER), updates the value and then writes the new value back to the IER. Since the hardware does not change the IER, software can track this value and elimiate the need to rea

[PATCH net-next v1 14/14] amd-xgbe: Add additional ethtool statistics

2017-08-17 Thread Tom Lendacky
Add some additional statistics for tracking VXLAN packets and checksum errors. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c |8 +++- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c |4 drivers/net/ethernet/amd/xgbe/xgbe.h |5 + 3 file

[PATCH net-next v1 12/14] amd-xgbe: Convert to using the new link mode settings

2017-08-17 Thread Tom Lendacky
Convert from using the old u32 supported, advertising, etc. link settings to the new link mode settings that support bit positions / settings greater than 32 bits. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 56 ++-- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

[PATCH net-next v1 09/14] amd-xgbe: Add hardware features debug output

2017-08-17 Thread Tom Lendacky
Use the dynamic debug support to output information about the hardware features reported by the device. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 78 +- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/drivers/net/ether

[PATCH net-next v1 11/14] net: ethtool: Add macro to clear a link mode setting

2017-08-17 Thread Tom Lendacky
There are currently macros to set and test an ETHTOOL_LINK_MODE_ setting, but not to clear one. Add a macro to clear an ETHTOOL_LINK_MODE_ setting. Signed-off-by: Tom Lendacky --- include/linux/ethtool.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/ethtool.h b

[PATCH net-next v1 10/14] amd-xgbe: Add per queue Tx and Rx statistics

2017-08-17 Thread Tom Lendacky
Add per queue Tx and Rx packet and byte counts. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 26 +- drivers/net/ethernet/amd/xgbe/xgbe.h |5 +

[PATCH net-next v1 06/14] amd-xgbe: Add support to handle device renaming

2017-08-17 Thread Tom Lendacky
Many of the names used by the driver are based upon the name of the device found during device probe. Move the formatting of the names into the device open function so that any renaming that occurs before the device is brought up will be accounted for. This also means moving the creation of some

[PATCH net-next v1 07/14] amd-xgbe: Add additional dynamic debug messages

2017-08-17 Thread Tom Lendacky
Add some additional dynamic debug message to the driver. The new messages will provide additional information about the PCS window calculation. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet

[PATCH net-next v1 05/14] amd-xgbe: Add additional debugfs support

2017-08-17 Thread Tom Lendacky
Add additional debugfs support for reading / writing registers of any attached external phy devices as well as the SFP eeprom data. These debugfs files will only be created if the phy implementation supports them. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 1

[PATCH net-next v1 01/14] amd-xgbe: Set the MDIO mode for 10000Base-T configuration

2017-08-17 Thread Tom Lendacky
Currently the MDIO mode is set to none for the 1Base-T, which is incorrect. The MDIO mode should for this configuration should be clause 45. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH net-next v1 02/14] amd-xgbe: Set the MII control width for the MAC interface

2017-08-17 Thread Tom Lendacky
When running in SGMII mode at speeds below 1000Mbps, the auto-negotition control register must set the MII control width for the MAC interface to be 8-bits wide. By default the width is 4-bits. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-common.h |1 + drivers/net/eth

[PATCH net-next v1 04/14] amd-xgbe: Update TSO packet statistics accuracy

2017-08-17 Thread Tom Lendacky
When transmitting a TSO packet, the driver only increments the TSO packet statistic by one rather than the number of total packets that were sent. Update the driver to record the total number of packets that resulted from TSO transmit. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgb

[PATCH net-next v1 03/14] amd-xgbe: Be sure driver shuts down cleanly on module removal

2017-08-17 Thread Tom Lendacky
Sometimes when the driver is being unloaded while the devices are still up the driver can issue errors. This is based on timing and the double invocation of some routines. The phy_exit() call needs to be run after the network device has been closed and unregistered from the system. Also, the phy_

[PATCH net-next v1 00/14] amd-xgbe: AMD XGBE driver updates 2017-08-17

2017-08-17 Thread Tom Lendacky
The following updates are included in this driver update series: - Set the MDIO mode to clause 45 for the 10GBase-T configuration - Set the MII control width to 8-bits for speeds less than 1Gbps - Fix an issue to related to module removal when the devices are up - Fix ethtool statistics related to

[PATCH net] rxrpc: Fix oops when discarding a preallocated service call

2017-08-17 Thread David Howells
rxrpc_service_prealloc_one() doesn't set the socket pointer on any new call it preallocates, but does add it to the rxrpc net namespace call list. This, however, causes rxrpc_put_call() to oops when the call is discarded when the socket is closed. rxrpc_put_call() needs the socket to be able to re

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-17 Thread Martin KaFai Lau
On Tue, Aug 15, 2017 at 05:15:46PM -0700, Tom Herbert wrote: > On Tue, Aug 15, 2017 at 3:42 PM, Shaohua Li wrote: > > On Tue, Aug 15, 2017 at 07:08:31AM -0700, Tom Herbert wrote: > >> On Mon, Aug 14, 2017 at 7:52 PM, Shaohua Li wrote: > >> > On Fri, Aug 11, 2017 at 06:00:20PM -0700, Tom Herbert w

Re: [PATCHv2 net-next] gre: introduce native tunnel support for ERSPAN

2017-08-17 Thread William Tu
>> >> +static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi, >> + int gre_hdr_len) >> +{ >> + struct net *net = dev_net(skb->dev); >> + struct ip_tunnel_net *itn; >> + struct ip_tunnel *tunnel; >> + struct metadata_dst *tun_dst = NULL; >> + const

Re: [PATCHv2 net-next iproute2] gre: add support for ERSPAN tunnel

2017-08-17 Thread William Tu
>> + if (greinfo[IFLA_GRE_ERSPAN_INDEX]) >> + erspan_idx = >> rta_getattr_u32(greinfo[IFLA_GRE_ERSPAN_INDEX]); >> } > > Are you missing a ntohl() here? > > It is encoded as htonl() when sending to kernel. > > addattr32(n, 1024, IFLA_GRE_FWMARK

[RFC] about net: Fix inconsistent teardown and release of private netdev state.

2017-08-17 Thread Eric Dumazet
David If I read correctly this commit : cf124db566e6b036b8bcbe8decbed740bdfac8c6 ("net: Fix inconsistent teardown and release of private netdev state.") We have problems in drivers providing priv_destructor and handling a failure in register_netdevice() register_netdevice() might have called ->p

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-17 Thread Alexei Starovoitov
On 8/17/17 11:58 AM, John Fastabend wrote: +/* reserve BPF programs early so can abort easily on failures */ +if (map_flags & BPF_SOCKMAP_STRPARSER) { why have two 'flags' arguments and new helper just for this? can normal update() be used and extra bits of flag there? The new helper i

[PATCH] irda: do not leak initialized list.dev to userspace

2017-08-17 Thread Colin King
From: Colin Ian King list.dev has not been initialized and so the copy_to_user is copying data from the stack back to user space which is a potential information leak. Fix this ensuring all of list is initialized to zero. Detected by CoverityScan, CID#1357894 ("Uninitialized scalar variable") S

Re: Thoughts on staging and on fixing up drivers?

2017-08-17 Thread tedheadster
> > Larry, you've migrated a bunch of staging code, and tried various > approaches. Do you have any lessons on what has worked and what hasn't > and if there is anything we can do to make the process better? I am also quite interested in such work. We asked for a Birds of Feather discussion at th

Thoughts on staging and on fixing up drivers?

2017-08-17 Thread Dan Carpenter
I'm excited to see all the @realtek.com addresses. :) Larry, you've migrated a bunch of staging code, and tried various approaches. Do you have any lessons on what has worked and what hasn't and if there is anything we can do to make the process better? regards, dan carpenter

[PATCH iproute2] libnetlink: Fix extack attribute parsing

2017-08-17 Thread David Ahern
Initialize tb in nl_dump_ext_err since not all attributes will be sent in the messages. Add error checking on mnl_attr_parse and print messages on the off chance the ext ack attributes fail to validate. Signed-off-by: David Ahern --- lib/libnetlink.c | 15 ++- 1 file changed, 10 ins

Re: [iproute PATCH v2 1/7] devlink: No need for this self-assignment

2017-08-17 Thread Jiri Pirko
Thu, Aug 17, 2017 at 07:09:25PM CEST, p...@nwl.cc wrote: >dl_argv_handle_both() will either assign to handle_bit or error out in >which case the variable is not used by the caller. I'm pretty sure that I did this to silence the compiler. If the compiler bug is fixed now, good. Acked-by: Jiri Pirk

Re: [PATCH 2/2] xdp: adjust xdp redirect tracepoint to include return error code

2017-08-17 Thread John Fastabend
On 08/17/2017 12:28 PM, Jesper Dangaard Brouer wrote: > > On Thu, 17 Aug 2017 11:46:10 -0700 John Fastabend > wrote: > >> On 08/17/2017 09:22 AM, Jesper Dangaard Brouer wrote: >>> The return error code need to be included in the tracepoint >>> xdp:xdp_redirect, else its not possible to distingu

Re: [PATCH V7 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-17 Thread David Miller
You've posted this series 3 times today. That's way too fast. You must wait at least one full day for more feedback to come your way. If you just repsin your series for every little small change nobody is going to perform a thorough review of your patches because you keep respining them so ofte

Re: [PATCH 2/2] xdp: adjust xdp redirect tracepoint to include return error code

2017-08-17 Thread Jesper Dangaard Brouer
On Thu, 17 Aug 2017 11:46:10 -0700 John Fastabend wrote: > On 08/17/2017 09:22 AM, Jesper Dangaard Brouer wrote: > > The return error code need to be included in the tracepoint > > xdp:xdp_redirect, else its not possible to distinguish successful or > > failed XDP_REDIRECT transmits. > > > > X

skb_over_panic when sending esp traffic from a vmware guest

2017-08-17 Thread Nick Huber
I've been experience the following traceback since upgrading from the 4.9 kernel to the 4.11 branch. I've only seen this in a few VMWare guests and I haven't been able to narrow down what exactly is causing it. I'm not familiar with kernel debugging but any help in tracing this down would be app

[PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-17 Thread David Ahern
One nagging difference between ipv4 and ipv6 is host routes for ipv6 addresses are installed using the loopback device or VRF / L3 Master device. e.g., 2001:db8:1::/120 dev veth0 proto kernel metric 256 pref medium local 2001:db8:1::1 dev lo table local proto kernel metric 0 pref medium U

[PATCH V7 net-next 03/22] net-next/hinic: Initialize api cmd resources

2017-08-17 Thread Aviad Krawczyk
Initialize api cmd resources as part of management initialization. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 446 + .../net/ethernet/huawei/hini

[PATCH V7 net-next 01/22] net-next/hinic: Initialize hw interface

2017-08-17 Thread Aviad Krawczyk
Initialize hw interface as part of the nic initialization for accessing hw. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- Documentation/networking/hinic.txt | 125 ++ drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile

[PATCH V7 net-next 02/22] net-next/hinic: Initialize hw device components

2017-08-17 Thread Aviad Krawczyk
Initialize hw device by calling the initialization functions of aeqs and management channel. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile| 3 +- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 172 -- dri

[PATCH V7 net-next 06/22] net-next/hinic: Add api cmd commands

2017-08-17 Thread Aviad Krawczyk
Add the api cmd commands for sending management messages to the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 329 - .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 65 drivers/net/ethernet/hua

[PATCH V7 net-next 04/22] net-next/hinic: Initialize api cmd hw

2017-08-17 Thread Aviad Krawczyk
Update the hardware about api cmd resources and initialize it. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 173 - .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h | 38 + drivers/net/ethernet/huawei/h

[PATCH V7 net-next 07/22] net-next/hinic: Add aeqs

2017-08-17 Thread Aviad Krawczyk
Handle aeq elements that are accumulated on the aeq by calling the registered handler for the specific event. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 49 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c | 464 +++

[PATCH V7 net-next 05/22] net-next/hinic: Add management messages

2017-08-17 Thread Aviad Krawczyk
Add the management messages for sending to api cmd and the asynchronous event handler for the completion of the messages. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 35 ++ .../net/ethernet/huawei/hinic/hinic_hw_api_cmd.h |

[PATCH V7 net-next 08/22] net-next/hinic: Add port management commands

2017-08-17 Thread Aviad Krawczyk
Add the port management commands that are sent as management messages. The port management commands are used for netdev operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h

[PATCH V7 net-next 13/22] net-next/hinic: Set qp context

2017-08-17 Thread Aviad Krawczyk
Update the nic about the resources of the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_common.c | 55 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h |

[PATCH V7 net-next 14/22] net-next/hinic: Initialize cmdq

2017-08-17 Thread Aviad Krawczyk
Create the work queues for cmdq and update the nic about the work queue contexts. cmdq commands are used for updating the nic about the qp contexts. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 282 +- drivers

[PATCH V7 net-next 12/22] net-next/hinic: Add qp resources

2017-08-17 Thread Aviad Krawczyk
Create the resources for queue pair operations: doorbell area, consumer index address and producer index address. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_hw_if.h | 1 + drivers

[PATCH V7 net-next 09/22] net-next/hinic: Add Rx mode and link event handler

2017-08-17 Thread Aviad Krawczyk
Add port management message for setting Rx mode in the card, used for rx_mode netdev operation. The link event handler is used for getting a notification about the link state. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 17 ++

[PATCH V7 net-next 10/22] net-next/hinic: Add logical Txq and Rxq

2017-08-17 Thread Aviad Krawczyk
Create the logical queues of the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 5 +- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 131 + drivers

[PATCH V7 net-next 11/22] net-next/hinic: Add wq

2017-08-17 Thread Aviad Krawczyk
Create work queues for being used by the queue pairs. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Makefile | 4 +- drivers/net/ethernet/huawei/hinic/hinic_common.h | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 69 ++- driv

[PATCH V7 net-next 17/22] net-next/hinic: Add cmdq completion handler

2017-08-17 Thread Aviad Krawczyk
Add cmdq completion handler for getting a notification about the completion of cmdq commands. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 297 +- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 12 + 2 f

[PATCH V7 net-next 16/22] net-next/hinic: Add cmdq commands

2017-08-17 Thread Aviad Krawczyk
Add cmdq commands for setting queue pair contexts in the nic. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_common.c | 25 ++ drivers/net/ethernet/huawei/hinic/hinic_common.h | 9 + drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 282

[PATCH V7 net-next 18/22] net-next/hinic: Add Rx handler

2017-08-17 Thread Aviad Krawczyk
Set the io resources in the nic and handle rx events by qp operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_csr.h | 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.

[PATCH V7 net-next 15/22] net-next/hinic: Add ceqs

2017-08-17 Thread Aviad Krawczyk
Initialize the completion event queues and handle ceq events by calling the registered handlers. Used for cmdq command completion. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 16 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_cs

[PATCH V7 net-next 22/22] net-next/hinic: Add Maintainer

2017-08-17 Thread Aviad Krawczyk
Update MAINTAINERS file Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0e967b3..8f9ea9b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6240,6 +6240,13 @@ L: linux-in...@vger.

[PATCH V7 net-next 20/22] net-next/hinic: Add ethtool and stats

2017-08-17 Thread Aviad Krawczyk
Add ethtool operations and statistics operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 3 + drivers/net/ethernet/huawei/hinic/hinic_main.c | 218 - drivers/net/ethernet/huawei/hinic/hinic_port.c |

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-17 Thread Tom Herbert
On Thu, Aug 17, 2017 at 10:26 AM, Shaohua Li wrote: > On Tue, Aug 15, 2017 at 05:15:46PM -0700, Tom Herbert wrote: >> On Tue, Aug 15, 2017 at 3:42 PM, Shaohua Li wrote: >> > On Tue, Aug 15, 2017 at 07:08:31AM -0700, Tom Herbert wrote: >> >> On Mon, Aug 14, 2017 at 7:52 PM, Shaohua Li wrote: >> >

[PATCH V7 net-next 21/22] net-next/hinic: Add netpoll

2017-08-17 Thread Aviad Krawczyk
Add more netdev operation - netpoll. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/

[PATCH V7 net-next 19/22] net-next/hinic: Add Tx operation

2017-08-17 Thread Aviad Krawczyk
Add transmit operation for sending data by qp operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/hinic_dev.h| 1 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 47 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 22 ++ d

[PATCH V7 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-17 Thread Aviad Krawczyk
The patch-set contains the support of the HiNIC Ethernet driver for hinic family of PCIE Network Interface Cards. The Huawei's PCIE HiNIC card is a new Ethernet card and hence there was a need of a new driver. The current driver is meant to be used for the Physical Function and there would soon b

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-17 Thread John Fastabend
[...] >> + >> +static void smap_tx_work(struct work_struct *w) >> +{ >> +struct smap_psock *psock; >> +struct sk_buff *skb; >> +int rem, off, n; >> + >> +psock = container_of(w, struct smap_psock, tx_work); >> + >> +/* lock sock to avoid losing sk_socket at some point during

Re: [PATCH net-next] dsa: remove unused net_device arg from handlers

2017-08-17 Thread Florian Fainelli
On 08/17/2017 11:40 AM, Florian Westphal wrote: > Andrew Lunn wrote: >> On Thu, Aug 17, 2017 at 04:47:00PM +0200, Florian Westphal wrote: >>> compile tested only, but saw no warnings/errors with >>> allmodconfig build. >>> >>> static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *de

Re: [PATCH 2/2] xdp: adjust xdp redirect tracepoint to include return error code

2017-08-17 Thread John Fastabend
On 08/17/2017 09:22 AM, Jesper Dangaard Brouer wrote: > The return error code need to be included in the tracepoint > xdp:xdp_redirect, else its not possible to distinguish successful or > failed XDP_REDIRECT transmits. > > XDP have no queuing mechanism. Thus, it is fairly easily to overrun a > NI

Re: [PATCH net-next] dsa: remove unused net_device arg from handlers

2017-08-17 Thread Florian Westphal
Andrew Lunn wrote: > On Thu, Aug 17, 2017 at 04:47:00PM +0200, Florian Westphal wrote: > > compile tested only, but saw no warnings/errors with > > allmodconfig build. > > > > static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev, > > - struct packet_type *pt

Re: [PATCH 1/2] ixgbe: change ndo_xdp_xmit return code on xmit errors

2017-08-17 Thread John Fastabend
On 08/17/2017 09:22 AM, Jesper Dangaard Brouer wrote: > Use errno -ENOSPC ("No space left on device") when the XDP xmit > have no space left on the TX ring buffer, instead of -ENOMEM. > > Signed-off-by: Jesper Dangaard Brouer > --- > Seems like an improvement to me. You could also potentially di

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-17 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, August 17, 2017 10:04 > I would avoid module parameters at all costs. > > It is the worst possible interface for users of your software. > > You really need to fundamentally solve the problems related to making > sure the proper

Re: [PATCH net-next] dsa: remove unused net_device arg from handlers

2017-08-17 Thread Andrew Lunn
On Thu, Aug 17, 2017 at 04:47:00PM +0200, Florian Westphal wrote: > compile tested only, but saw no warnings/errors with > allmodconfig build. > > static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev, > - struct packet_type *pt, struct net_device *orig_dev)

Re: [PATCH v4 1/4] can: dev: Add support for limiting configured bitrate

2017-08-17 Thread Sergei Shtylyov
Hello! On 08/17/2017 08:54 PM, Franklin S Cooper Jr wrote: Various CAN or CAN-FD IP may be able to run at a faster rate than what the transceiver the CAN node is connected to. This can lead to unexpected errors. However, CAN transceivers typically have fixed limitations and provide no means to

Re: [PATCH v4 1/4] can: dev: Add support for limiting configured bitrate

2017-08-17 Thread Franklin S Cooper Jr
Hi, On 08/10/2017 10:29 AM, Marc Kleine-Budde wrote: > Hello, > > sorry for stepping in late > > On 08/10/2017 02:59 AM, Franklin S Cooper Jr wrote: >> Various CAN or CAN-FD IP may be able to run at a faster rate than >> what the transceiver the CAN node is connected to. This can lead to >>

Re: [PATCH v4 1/4] can: dev: Add support for limiting configured bitrate

2017-08-17 Thread Franklin S Cooper Jr
On 08/10/2017 05:05 AM, Sergei Shtylyov wrote: > Hello! > > On 8/10/2017 3:59 AM, Franklin S Cooper Jr wrote: > >> Various CAN or CAN-FD IP may be able to run at a faster rate than >> what the transceiver the CAN node is connected to. This can lead to >> unexpected errors. However, CAN transcei

  1   2   3   4   >