[Patch V3 net 11/11] net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset()

2018-10-27 Thread Huazhong Tan
Since hclgevf_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclgevf_reset_wait(). So this patch releases the lock for the duration of hclgevf_reset_wait(). Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring

[Patch V3 net 06/11] net: hns3: bugfix for is_valid_csq_clean_head()

2018-10-27 Thread Huazhong Tan
The HEAD pointer of the hardware command queue maybe equal to the command queue's next_to_use in the driver, so that does not belong to the invalid HEAD pointer, since the hardware may not process the command in time, causing the HEAD pointer to be too late to update. The variables' name in this

[Patch V3 net 09/11] net: hns3: bugfix for handling mailbox while the command queue reinitialized

2018-10-27 Thread Huazhong Tan
In a multi-core machine, the mailbox service and reset service will be executed at the same time. The reset service will re-initialize the command queue, before that, the mailbox handler can only get some invalid messages. The HCLGE_STATE_CMD_DISABLE flag means that the command queue is not

[Patch V3 net 10/11] net: hns3: bugfix for rtnl_lock's range in the hclge_reset()

2018-10-27 Thread Huazhong Tan
Since hclge_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclge_reset_wait(). So this patch releases the lock for the duration of hclge_reset_wait(). Fixes: 6d4fab39533f ("net: hns3: Reset net device with rtnl_lock")

[Patch V3 net 00/11] Bugfix for the HNS3 driver

2018-10-27 Thread Huazhong Tan
This patch series include bugfix for the HNS3 ethernet controller driver. Change log: V2->V3: Fixes comments from Sergei Shtylyov V1->V2: Fixes the compilation break reported by kbuild test robot http://patchwork.ozlabs.org/patch/989818/ Huazhong Tan (11): net: hns3:

[Patch V3 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-27 Thread Huazhong Tan
When hns3_nic_init_vector_data() failed for mapping ring to vector, it should cancel the netif_napi_add() that have been successfully done and then exit. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan ---

[Patch V3 net 03/11] net: hns3: bugfix for reporting unknown vector0 interrupt repeatly problem

2018-10-27 Thread Huazhong Tan
The current driver supports handling two vector0 interrupts, reset and mailbox. When the hardware reports an interrupt of another type of interrupt source, if the driver does not process the interrupt and enables the interrupt, the hardware will repeatedly report the unknown interrupt. Therefore,

[Patch V3 net 07/11] net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read

2018-10-27 Thread Huazhong Tan
When there is a PHY, the driver needs to complete some operations through MDIO during reset reinitialization, so HCLGE_STATE_CMD_DISABLE is more suitable than HCLGE_STATE_RST_HANDLING to prevent the MDIO operation from being sent during the hardware reset. Fixes: b50ae26c57cb ("net: hns3: never

[Patch V3 net 08/11] net: hns3: fix incorrect return value/type of some functions

2018-10-27 Thread Huazhong Tan
There are some functions that, when they fail to send the command, need to return the corresponding error value to its caller. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: 681ec3999b3d ("net: hns3: fix for vlan table lost problem when

[Patch V3 net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()

2018-10-27 Thread Huazhong Tan
It is not necessary to reset the queue in the hns3_uninit_all_ring(), since the queue is stopped in the down operation, and will be reset in the up operaton. And the judgment of the HCLGE_STATE_RST_HANDLING flag in the hclge_reset_tqp() is not correct, because we need to reset tqp during pf reset,

[Patch V3 net 02/11] net: hns3: add error handler for hns3_get_ring_config/hns3_queue_to_ring

2018-10-27 Thread Huazhong Tan
When hns3_get_ring_config()/hns3_queue_to_ring() failed during resetting, the allocated memory has not been freed before hns3_get_ring_config() and hns3_queue_to_ring() return. So this patch fixes the buffer not freeing problem during resetting. Fixes: 76ad4f0ee747 ("net: hns3: Add support of

[Patch V3 net 04/11] net: hns3: bugfix for the initialization of command queue's spin lock

2018-10-27 Thread Huazhong Tan
The spin lock of the command queue only needs to be initialized once when the driver initializes the command queue. It is not necessary to initialize the spin lock when resetting. At the same time, the modification of the queue member should be performed after acquiring the lock. Fixes:

Re: [Patch net 09/11] net: hns3: bugfix for handling mailbox while the command queue reinitialized

2018-10-27 Thread tanhuazhong
On 2018/10/28 3:05, Sergei Shtylyov wrote: On 27.10.2018 5:41, Huazhong Tan wrote: In a multi-core machine, the mailbox service and reset service will be executed at the same time. The reset server will re-initialize the commond queue, before that, the mailbox handler can only get some   

Re: [Patch net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()

2018-10-27 Thread tanhuazhong
On 2018/10/28 3:02, Sergei Shtylyov wrote: Hello! On 27.10.2018 5:41, Huazhong Tan wrote: It is not necessary to reset the queue in the hns3_uninit_all_ring(), since the queue is stopped in the down operation, and will be resetted    s/resetted/reset/. OK, thanks. in the up

[PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-27 Thread Jeff Barnhill
icmp6_send() function is expensive on systems with a large number of interfaces. Every time it’s called, it has to verify that the source address does not correspond to an existing anycast address by looping through every device and every anycast address on the device. This can result in

Re: [PATCH net v4] net/ipv6: Add anycast addresses to a global hashtable

2018-10-27 Thread Jeff Barnhill
You are right, David...I mistook the refcount_dec_and_test() in aca_put() as being for the fib6_info, but it's for the aca_refcnt. Thanks! I'll submit a corrected patch. On Sat, Oct 27, 2018 at 7:39 PM David Ahern wrote: > > On 10/27/18 12:02 PM, Jeff Barnhill wrote: > > @@ -275,6 +356,11 @@ int

Re: [PATCH] net/packet: fix packet drop as of virtio gso

2018-10-27 Thread Jianfeng Tan
On 10/8/2018 11:14 AM, Jason Wang wrote: On 2018年09月29日 23:41, Jianfeng Tan wrote: When we use raw socket as the vhost backend, a packet from virito with gso offloading information, cannot be sent out in later validaton at xmit path, as we did not set correct skb->protocol which is further

Re: [PATCH net v4] net/ipv6: Add anycast addresses to a global hashtable

2018-10-27 Thread David Ahern
On 10/27/18 12:02 PM, Jeff Barnhill wrote: > @@ -275,6 +356,11 @@ int __ipv6_dev_ac_inc(struct inet6_dev *idev, const > struct in6_addr *addr) > err = -ENOMEM; > goto out; > } > + err = ipv6_add_acaddr_hash(dev_net(idev->dev), addr); > + if (err) { > +

Re: [PATCH] bonding: fix length of actor system

2018-10-27 Thread Jay Vosburgh
Tobias Jungel wrote: >The attribute IFLA_BOND_AD_ACTOR_SYSTEM is sent to user space having the >length of sizeof(bond->params.ad_actor_system) which is 8 byte. This >patch aligns the length to ETH_ALEN to have the same MAC address exposed >as using sysfs. > >fixes f87fda00b6ed2 > >Signed-off-by:

Re: Fw: [Bug 201423] New: eth0: hw csum failure

2018-10-27 Thread Andre Tomt
On 26.10.2018 13:45, Andre Tomt wrote: On 25.10.2018 19:38, Eric Dumazet wrote: On 10/24/2018 12:41 PM, Andre Tomt wrote: It eventually showed up again with mlx4, on 4.18.16 + fix and also on 4.19. I still do not have a useful packet capture. It is running a torrent client serving up

[PATCH net] rtnetlink: Disallow FDB configuration for non-Ethernet device

2018-10-27 Thread Ido Schimmel
When an FDB entry is configured, the address is validated to have the length of an Ethernet address, but the device for which the address is configured can be of any type. The above can result in the use of uninitialized memory when the address is later compared against existing addresses since

4.19 - tons of hw csum failure errors

2018-10-27 Thread Nikola Ciprich
Hi, just wanted to report, thet after switching to 4.19 (fro 4.14.x, so maybe the problem appeared somewhere between), I'm getting tons of similar messages: Oct 27 09:06:27 xxx kernel: br501: hw csum failure Oct 27 09:06:27 xxx kernel: CPU: 8 PID: 0 Comm: swapper/8 Tainted: G E

Re: [Patch net 09/11] net: hns3: bugfix for handling mailbox while the command queue reinitialized

2018-10-27 Thread Sergei Shtylyov
On 27.10.2018 5:41, Huazhong Tan wrote: In a multi-core machine, the mailbox service and reset service will be executed at the same time. The reset server will re-initialize the commond queue, before that, the mailbox handler can only get some Command? invalid messages. The

Re: [Patch net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()

2018-10-27 Thread Sergei Shtylyov
Hello! On 27.10.2018 5:41, Huazhong Tan wrote: It is not necessary to reset the queue in the hns3_uninit_all_ring(), since the queue is stopped in the down operation, and will be resetted s/resetted/reset/. in the up operaton. And the judgment of the HCLGE_STATE_RST_HANDLING flag in the

[PATCH net v4] net/ipv6: Add anycast addresses to a global hashtable

2018-10-27 Thread Jeff Barnhill
icmp6_send() function is expensive on systems with a large number of interfaces. Every time it’s called, it has to verify that the source address does not correspond to an existing anycast address by looping through every device and every anycast address on the device. This can result in

[iproute PATCH] utils.h: provide fallback CLOCK_TAI definition

2018-10-27 Thread Peter Korsgaard
q_{etf,taprio}.c uses CLOCK_TAI, which isn't exposed by glibc < 2.21 or uClibc, breaking the build. Provide a fallback definition like it is done for IPPROTO_MPLS and others. Signed-off-by: Peter Korsgaard --- include/utils.h | 4 1 file changed, 4 insertions(+) diff --git

Re: checksumming on non-local forward path

2018-10-27 Thread Andrew Lunn
> What would you think of a flag on the receiving end like, > "CHECKSUM_INVALID_BUT_UNNECESSARY"? It would be treated as > CHECKSUM_UNNECESSARY in the case that the the packet is locally > received. But if the packet is going to be forwarded instead, then > skb_checksum_help is called on it before

[PATCH] bonding: fix length of actor system

2018-10-27 Thread Tobias Jungel
The attribute IFLA_BOND_AD_ACTOR_SYSTEM is sent to user space having the length of sizeof(bond->params.ad_actor_system) which is 8 byte. This patch aligns the length to ETH_ALEN to have the same MAC address exposed as using sysfs. fixes f87fda00b6ed2 Signed-off-by: Tobias Jungel ---

[PATCH] net/packet: support vhost mrg_rxbuf

2018-10-27 Thread Jianfeng Tan
Previouly, virtio net header size is hardcoded to be 10, which makes the feature mrg_rxbuf not available. We redefine PACKET_VNET_HDR ioctl which treats user input as boolean, but now as int, 0, 10, 12, or everything else be treated as 10. There will be one case which is treated differently: if

[PATCH] can: hi311x: Use level-triggered interrupt

2018-10-27 Thread Lukas Wunner
If the hi3110 shares the SPI bus with another traffic-intensive device and packets are received in high volume (by a separate machine sending with "cangen -g 0 -i -x"), reception stops after a few minutes and the counter in /proc/interrupts stops incrementing. Bus state is "active". Bringing the

[Patch V2 net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data()

2018-10-27 Thread Huazhong Tan
When hns3_nic_init_vector_data() failed for mapping ring to vector, it should cancel the netif_napi_add() that have been successfully done and then exit. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan ---

[Patch V2 net 04/11] net: hns3: bugfix for the initialization of command queue's spin lock

2018-10-27 Thread Huazhong Tan
The spin lock of the command queue only needs to be initialized once when the driver initializes the command queue. It is not necessary to initialize the spin lock when resetting. At the same time, the modification of the queue member should be performed after acquiring the lock. Fixes:

[Patch V2 net 02/11] net: hns3: add error handler for hns3_get_ring_config/hns3_queue_to_ring

2018-10-27 Thread Huazhong Tan
When hns3_get_ring_config()/hns3_queue_to_ring() failed during resetting, the allocated memory has not been freed before hns3_get_ring_config() and hns3_queue_to_ring() return. So this patch fixes the buffer not freeing problem during resetting. Fixes: 76ad4f0ee747 ("net: hns3: Add support of

[Patch V2 net 10/11] net: hns3: bugfix for rtnl_lock's range in the hclge_reset()

2018-10-27 Thread Huazhong Tan
Since hclge_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclge_reset_wait(). So this patch release the lock for the duration of hclge_reset_wait(). Fixes: 6d4fab39533f ("net: hns3: Reset net device with rtnl_lock")

[Patch V2 net 00/11] Bugfix for the HNS3 driver

2018-10-27 Thread Huazhong Tan
This patch series include bugfix for the HNS3 ethernet controller driver. Change log: V1->V2: Fixes the compilation break reported by kbuild test robot http://patchwork.ozlabs.org/patch/989818/ Huazhong Tan (11): net: hns3: add error handler for hns3_nic_init_vector_data()

[Patch V2 net 03/11] net: hns3: bugfix for reporting unknown vector0 interrupt repeatly problem

2018-10-27 Thread Huazhong Tan
The current driver supports handling two vector0 interrupts, reset and mailbox. When the hardware reports an interrupt of another type of interrupt source, if the driver does not process the interrupt and enables the interrupt, the hardware will repeatedly report the unknown interrupt. Therefore,

[Patch V2 net 07/11] net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read

2018-10-27 Thread Huazhong Tan
When there is a PHY, the driver needs to complete some operations through MDIO during reset reinitialization, so HCLGE_STATE_CMD_DISABLE is more suitable than HCLGE_STATE_RST_HANDLING to prevent the MDIO operation from being sent during the hardware reset. Fixes: b50ae26c57cb ("net: hns3: never

[Patch V2 net 08/11] net: hns3: fix incorrect return value/type of some functions

2018-10-27 Thread Huazhong Tan
There are some functions that, when they fail to execute a send command, need to return the corresponding error value to its caller. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: 681ec3999b3d ("net: hns3: fix for vlan table lost problem when

[Patch V2 net 06/11] net: hns3: bugfix for is_valid_csq_clean_head()

2018-10-27 Thread Huazhong Tan
The HEAD pointer of the hardware command queue maybe equal to the command queue's next_to_use the driver, so that does not belong to the invalid HEAD pointer, since the hardware may not process the command in time, causing the HEAD pointer to be too late to update. The variables' name in this

[Patch V2 net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()

2018-10-27 Thread Huazhong Tan
It is not necessary to reset the queue in the hns3_uninit_all_ring(), since the queue is stopped in the down operation, and will be resetted in the up operaton. And the judgment of the HCLGE_STATE_RST_HANDLING flag in the hclge_reset_tqp() is not correct, because we need to reset tqp during pf

[Patch V2 net 09/11] net: hns3: bugfix for handling mailbox while the command queue reinitialized

2018-10-27 Thread Huazhong Tan
In a multi-core machine, the mailbox service and reset service will be executed at the same time. The reset server will re-initialize the commond queue, before that, the mailbox handler can only get some invalid messages. The HCLGE_STATE_CMD_DISABLE flag means that the command queue is not

[Patch V2 net 11/11] net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset()

2018-10-27 Thread Huazhong Tan
Since hclgevf_reset_wait() is used to wait for the hardware to complete the reset, it is not necessary to hold the rtnl_lock during hclgevf_reset_wait(). So this patch release the lock for the duration of hclgevf_reset_wait(). Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring

Re: [net:master 17/19] net//bridge/br_multicast.c:1432:32: error: 'union ' has no member named 'ip6'; did you mean 'ip4'?

2018-10-27 Thread Nikolay Aleksandrov
On 27/10/2018 03:50, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master > head: aab456dfa404f3a16d6f1780e62a6a8533c4d008 > commit: 5a2de63fd1a59c30c02526d427bc014b98adf508 [17/19] bridge: do not add > port to router list when receives query

[PATCH] xfrm: Fix error return code in xfrm_output_one()

2018-10-27 Thread Wei Yongjun
xfrm_output_one() does not return a error code when there is no dst_entry attached to the skb, it is still possible crash with a NULL pointer dereference in xfrm_output_resume(). Fix it by return error code -EHOSTUNREACH. Fixes: 9e1437937807 ("xfrm: Fix NULL pointer dereference when skb_dst_force