[PATCH net-next 2/2] nfp: process MTU updates from firmware flower app

2017-08-16 Thread Simon Horman
Now that control message processing occurs in a workqueue rather than a BH handler MTU updates received from the firmware may be safely processed. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski ---

[PATCH net-next 0/2] nfp: process MTU updates from firmware flower app

2017-08-16 Thread Simon Horman
The first patch of this series moves processing of control messages from a BH handler to a workqueue. That change makes it safe to process MTU updates from the firmware which is added by the second patch of this series. Simon Horman (2): nfp: process control messages in workqueue in flower app

[net-next PATCH] bpf: devmap: remove unnecessary value size check

2017-08-16 Thread John Fastabend
In the devmap alloc map logic we check to ensure that the sizeof the values are not greater than KMALLOC_MAX_SIZE. But, in the dev map case we ensure the value size is 4bytes earlier in the function because all values should be netdev ifindex values. The second check is harmless but is not needed

Re: 100% CPU load when generating traffic to destination network that nexthop is not reachable

2017-08-16 Thread Julian Anastasov
Hello, On Tue, 15 Aug 2017, Eric Dumazet wrote: > It must be possible to add a fast path without locks. > > (say if jiffies has not changed before last state change) New day - new idea. Something like this? But it has bug: without checking neigh->dead under lock we don't have

DSA support for Micrel KSZ8895

2017-08-16 Thread Pavel Machek
Hi! I've got hardware with KSZ8895, and I'd like to use switch ports as separate ethernet cards. I believe that means DSA support. And there are even patches available from microchip... unfortunately they are in strange form and for v3.18.

Re: [PATCH] net: igmp: Use ingress interface rather than vrf device

2017-08-16 Thread Nikolay Aleksandrov
On 16/08/17 04:38, David Ahern wrote: > Anuradha reported that statically added groups for interfaces enslaved > to a VRF device were not persisting. The problem is that igmp queries > and reports need to use the data in the in_dev for the real ingress > device rather than the VRF device. Update

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 09:49:07AM CEST, christian.koe...@amd.com wrote: >Am 16.08.2017 um 04:12 schrieb Chris Mi: >> Using current TC code, it is very slow to insert a lot of rules. >> >> In order to improve the rules update rate in TC, >> we introduced the following two changes: >> 1)

Re: [net-next PATCH] bpf: devmap: remove unnecessary value size check

2017-08-16 Thread Daniel Borkmann
On 08/16/2017 08:35 AM, John Fastabend wrote: In the devmap alloc map logic we check to ensure that the sizeof the values are not greater than KMALLOC_MAX_SIZE. But, in the dev map case we ensure the value size is 4bytes earlier in the function because all values should be netdev ifindex values.

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

2017-08-16 Thread Xin Long
On Wed, Aug 9, 2017 at 7:33 AM, Cong Wang wrote: > On Mon, Aug 7, 2017 at 7:33 PM, Xin Long wrote: >> On Tue, Aug 8, 2017 at 9:15 AM, Cong Wang wrote: >>> This looks like a completely API burden? >> netfilter xt targets

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 10:31:35AM CEST, christian.koe...@amd.com wrote: >Am 16.08.2017 um 10:16 schrieb Jiri Pirko: >> Wed, Aug 16, 2017 at 09:49:07AM CEST, christian.koe...@amd.com wrote: >> > Am 16.08.2017 um 04:12 schrieb Chris Mi: >> > > Using current TC code, it is very slow to insert a lot of

Re: 100% CPU load when generating traffic to destination network that nexthop is not reachable

2017-08-16 Thread Paweł Staszewski
Hi Patch applied - but no big change - from 0.7Mpps per vlan to 1.2Mpps per vlan previously(without patch) 100% cpu load: bwm-ng v0.6.1 (probing every 0.500s), press 'h' for help input: /proc/net/dev type: rate | iface Rx TxTotal

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

2017-08-16 Thread Daniel Borkmann
Hi Michael, On 08/16/2017 07:15 AM, Michael Ellerman wrote: The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list to include all architectures that enable HAVE_CBPF_JIT or HAVE_EBPF_JIT under some configuration. Signed-off-by:

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Christian König
Am 16.08.2017 um 10:16 schrieb Jiri Pirko: Wed, Aug 16, 2017 at 09:49:07AM CEST, christian.koe...@amd.com wrote: Am 16.08.2017 um 04:12 schrieb Chris Mi: Using current TC code, it is very slow to insert a lot of rules. In order to improve the rules update rate in TC, we introduced the

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Jakub Sitnicki
On Tue, 15 Aug 2017 15:25:10 -0700 Jonathan Basseri wrote: > If an IPv6 socket has a valid dst cache, then xfrm_lookup_route will get > skipped. However, the cache is not invalidated when applying policy to a > socket (i.e. IPV6_XFRM_POLICY). The result is that new

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Lorenzo Colitti
On Wed, Aug 16, 2017 at 7:25 AM, Jonathan Basseri wrote: > If an IPv6 socket has a valid dst cache Did you look into why IPv4 does not suffer from this problem? That said, clearing the dst cache entry does seem prudent in general.

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 10:55:56AM CEST, christian.koe...@amd.com wrote: >Am 16.08.2017 um 10:39 schrieb Jiri Pirko: >> Wed, Aug 16, 2017 at 10:31:35AM CEST, christian.koe...@amd.com wrote: >> > Am 16.08.2017 um 10:16 schrieb Jiri Pirko: >> > > Wed, Aug 16, 2017 at 09:49:07AM CEST,

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Christian König
Am 16.08.2017 um 11:31 schrieb Jiri Pirko: [SNIP] I don't. It is an API change, maintainers of the individual drivers are not expected to review the patches like this. Yeah, completely agree. If yes then it somehow makes sense to send the patch bit by bit, if no then it doesn't seem to make

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

2017-08-16 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

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

2017-08-16 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

Re: [PATCH v3] openvswitch: enable NSH support

2017-08-16 Thread Yang, Yi
On Wed, Aug 16, 2017 at 11:19:21AM +0200, Jiri Benc wrote: > Please always CC reviewers of the previous versions, thanks. Jiri, thank you for quick review. Sorry, I made a mistake on sending and missed all the CCs, will indeed do this in next version. > > + __be16 ver_flags_len; > > + u8

Re: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Christian König
Am 16.08.2017 um 10:39 schrieb Jiri Pirko: Wed, Aug 16, 2017 at 10:31:35AM CEST, christian.koe...@amd.com wrote: Am 16.08.2017 um 10:16 schrieb Jiri Pirko: Wed, Aug 16, 2017 at 09:49:07AM CEST, christian.koe...@amd.com wrote: Am 16.08.2017 um 04:12 schrieb Chris Mi: Using current TC code, it

Re: [PATCH 2/3] ARM: sun8i: sunxi-h3-h5: add phy-is-integrated property to internal PHY

2017-08-16 Thread Corentin Labbe
On Fri, Aug 11, 2017 at 08:03:29AM -0700, Florian Fainelli wrote: > On August 11, 2017 6:25:26 AM PDT, Corentin Labbe > wrote: > >On Fri, Aug 11, 2017 at 04:22:11PM +0800, Chen-Yu Tsai wrote: > >> On Fri, Aug 11, 2017 at 4:19 PM, Corentin Labbe > >>

Re: [PATCH v3] openvswitch: enable NSH support

2017-08-16 Thread Jiri Benc
Please always CC reviewers of the previous versions, thanks. On Wed, 16 Aug 2017 13:35:30 +0800, Yi Yang wrote: > v2->v3 > - Change OVS_KEY_ATTR_NSH to nested key to handle >length-fixed attributes and length-variable >attriubte more flexibly. > - Remove struct ovs_action_push_nsh

Re: [PATCH net-next V2 1/3] tap: use build_skb() for small packet

2017-08-16 Thread Jason Wang
On 2017年08月16日 12:07, Jason Wang wrote: On 2017年08月16日 11:59, Michael S. Tsirkin wrote: On Wed, Aug 16, 2017 at 11:57:51AM +0800, Jason Wang wrote: On 2017年08月16日 11:55, Michael S. Tsirkin wrote: On Tue, Aug 15, 2017 at 08:45:20PM -0700, Eric Dumazet wrote: On Fri, 2017-08-11 at 19:41

[PATCH net 2/2] net: ixgbe: Use new IXGBE_FLAG2_ROOT_NO_RELAXED_ORDERING flag

2017-08-16 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 Davice Control register to

Re: [PATCH] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Yuval Shaia
On Wed, Aug 16, 2017 at 10:05:11AM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes in the mlx4 driver > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/mellanox/mlx4/cmd.c| 16

Re: [PATCH 1/2] mpls: add handlers

2017-08-16 Thread Amine Kherbouche
On 08/16/2017 07:30 AM, Roopa Prabhu wrote: On Tue, Aug 15, 2017 at 2:37 AM, David Lamparter wrote: [snip] I think the reverse is the better option, removing the vpls device information and just going with the route table. My approach to this would be to add a new

Re: [PATCH net-next V2 1/3] tap: use build_skb() for small packet

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 11:55 +0800, Jason Wang wrote: > > On 2017年08月16日 11:45, Eric Dumazet wrote: > > > > You do realize that tun_build_skb() is not thread safe ? > > Ok, I think the issue if skb_page_frag_refill(), need a spinlock > probably. Will prepare a patch. But since tun is used from

[patch net-next repost 3/3] net/sched: Change act_api and act_xxx modules to use IDR

2017-08-16 Thread Chris Mi
Typically, each TC filter has its own action. All the actions of the same type are saved in its hash table. But the hash buckets are too small that it degrades to a list. And the performance is greatly affected. For example, it takes about 0m11.914s to insert 64K rules. If we convert the hash

[patch net-next repost 2/3] net/sched: Change cls_flower to use IDR

2017-08-16 Thread Chris Mi
Currently, all filters with the same priority are linked in a doubly linked list. Every filter should have a unique handle. To make the handle unique, we need to iterate the list every time to see if the handle exists or not when inserting a new filter. It is time-consuming. For example, it takes

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

2017-08-16 Thread Paolo Abeni
On Tue, 2017-08-15 at 13:00 -0400, Willem de Bruijn wrote: > > There is another difference between reading sk_peek_offset in the > > caller or in __skb_try_recv_from_queue. The latter is called repeatedly > > when it returns NULL. Each call can modify *off. I believe that it needs > > to restart

Re: [PATCH] net/i40e: use cpumask_copy() for assigning cpumask

2017-08-16 Thread Stefano Brivio
Hi Juergen, On Sat, 12 Aug 2017 18:09:46 +0200 Juergen Gross wrote: > Using direct assignment for a cpumask is wrong, cpumask_copy() should > be used instead. Perhaps a Fixes: tag might be helpful here, such as: Fixes: 96db776a3682 ("i40e/i40evf: fix interrupt

[patch net-next repost 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread Chris Mi
Using current TC code, it is very slow to insert a lot of rules. In order to improve the rules update rate in TC, we introduced the following two changes: 1) changed cls_flower to use IDR to manage the filters. 2) changed all act_xxx modules to use IDR instead of a

[PATCH] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes in the mlx4 driver Signed-off-by: Colin Ian King --- drivers/net/ethernet/mellanox/mlx4/cmd.c| 16 drivers/net/ethernet/mellanox/mlx4/fw_qos.c | 6 +++---

Re: [PATCH] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Leon Romanovsky
On Wed, Aug 16, 2017 at 10:05:11AM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes in the mlx4 driver > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/mellanox/mlx4/cmd.c| 16

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 11:03 +0200, Jakub Sitnicki wrote: > On Tue, 15 Aug 2017 15:25:10 -0700 > Jonathan Basseri wrote: > > > If an IPv6 socket has a valid dst cache, then xfrm_lookup_route will get > > skipped. However, the cache is not invalidated when applying policy

Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 12:37:09PM CEST, eric.duma...@gmail.com wrote: >On Wed, 2017-08-16 at 04:14 -0400, Chris Mi wrote: >> IDR uses internally radix tree which uses unsigned long. It doesn't >> makes sense to have index as signed value. >> >> Signed-off-by: Chris Mi >>

RE: [PATCH net-next 3/3 v4] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread David Laight
From: David Miller > Sent: 16 August 2017 05:24 > From: Subash Abhinov Kasiviswanathan > Date: Tue, 15 Aug 2017 22:15:53 -0600 > > > +static int rmnet_unregister_real_device(struct net_device *dev) > > +{ > > + int config_id = RMNET_LOCAL_LOGICAL_ENDPOINT; > > +

Re: [PATCH net-next 3/3 v4] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 06:15:53AM CEST, subas...@codeaurora.org wrote: >RmNet driver provides a transport agnostic MAP (multiplexing and >aggregation protocol) support in embedded module. Module provides >virtual network devices which can be attached to any IP-mode >physical device. This will be

[PATCH V4 net-next 07/21] net-next/hinic: Add aeqs

2017-08-16 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 +++

[PATCH V4 net-next 05/21] net-next/hinic: Add management messages

2017-08-16 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 ++

[PATCH V4 net-next 06/21] net-next/hinic: Add api cmd commands

2017-08-16 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 -

[PATCH V4 net-next 18/21] net-next/hinic: Add Rx handler

2017-08-16 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

[PATCH V4 net-next 17/21] net-next/hinic: Add cmdq completion handler

2017-08-16 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 +-

RE: [net-next 11/12] igbvf: convert msleep to mdelay in atomic context

2017-08-16 Thread David Laight
From: Greg Edwards > Sent: 15 August 2017 20:32 > On Mon, Aug 14, 2017 at 10:17:31AM +, David Laight wrote: > > From: Jeff Kirsher > >> Sent: 09 August 2017 22:48 > >> From: Greg Edwards > >> > >> This fixes a "scheduling while atomic" splat seen with > >>

Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 12:53 +0200, Jiri Pirko wrote: > rhashtable is unnecesary big hammer for this. IDR is nice fit for > this purpose. Obviously IDR does not fit, since you have to change its ABI. If rhashtable does not fit this, then I wonder why we spent so many days of work adding it in

Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 12:58:53PM CEST, eric.duma...@gmail.com wrote: >On Wed, 2017-08-16 at 12:53 +0200, Jiri Pirko wrote: > >> rhashtable is unnecesary big hammer for this. IDR is nice fit for >> this purpose. > >Obviously IDR does not fit, since you have to change its ABI. I don't think it is a

[PATCH V4 net-next 02/21] net-next/hinic: Initialize hw device components

2017-08-16 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 +-

[PATCH V4 net-next 04/21] net-next/hinic: Initialize api cmd hw

2017-08-16 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 -

[PATCH V4 net-next 13/21] net-next/hinic: Set qp context

2017-08-16 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 ++

[PATCH V4 net-next 14/21] net-next/hinic: Initialize cmdq

2017-08-16 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 ---

Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 04:14 -0400, Chris Mi wrote: > IDR uses internally radix tree which uses unsigned long. It doesn't > makes sense to have index as signed value. > > Signed-off-by: Chris Mi > Signed-off-by: Jiri Pirko > --- > block/bsg.c

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

2017-08-16 Thread Michael Ellerman
Daniel Borkmann writes: > Hi Michael, > > On 08/16/2017 07:15 AM, Michael Ellerman wrote: >> The sysctl documentation states that the JIT is only available on >> x86_64, which is no longer correct. >> >> Update the list to include all architectures that enable HAVE_CBPF_JIT

Re: [PATCH net] xfrm: Clear sk_dst_cache when applying per-socket policy.

2017-08-16 Thread Jakub Sitnicki
On Wed, 16 Aug 2017 03:43:54 -0700 Eric Dumazet wrote: > On Wed, 2017-08-16 at 11:03 +0200, Jakub Sitnicki wrote: > > On Tue, 15 Aug 2017 15:25:10 -0700 > > Jonathan Basseri wrote: > > > > > If an IPv6 socket has a valid dst cache, then

[PATCH V4 net-next 00/21] Huawei HiNIC Ethernet Driver

2017-08-16 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

[PATCH V4 net-next 11/21] net-next/hinic: Add wq

2017-08-16 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 ++

[PATCH V4 net-next 12/21] net-next/hinic: Add qp resources

2017-08-16 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 +-

[PATCH V4 net-next 10/21] net-next/hinic: Add logical Txq and Rxq

2017-08-16 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 +

[PATCH V4 net-next 20/21] net-next/hinic: Add ethtool and stats

2017-08-16 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 -

[PATCH V4 net-next 21/21] net-next/hinic: Add select_queue and netpoll

2017-08-16 Thread Aviad Krawczyk
Add more netdev operations. Signed-off-by: Aviad Krawczyk Signed-off-by: Zhao Chen --- MAINTAINERS| 7 ++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 35 ++ 2 files changed,

[PATCH V4 net-next 19/21] net-next/hinic: Add Tx operation

2017-08-16 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 +++

Re: Something hitting my total number of connections to the server

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 10:18 +0530, Akshat Kakkar wrote: > On Mon, Aug 14, 2017 at 2:37 PM, Akshat Kakkar wrote: > > I have centos 7.3 (Kernel 3.10) running on a server with 128GB RAM and > > 2 x 10 Core Xeon Processor. > > I have hosted a webserver on it and enabled ssh for

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

2017-08-16 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 ---

[PATCH V4 net-next 08/21] net-next/hinic: Add port management commands

2017-08-16 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

[PATCH V4 net-next 16/21] net-next/hinic: Add cmdq commands

2017-08-16 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 +

[PATCH V4 net-next 15/21] net-next/hinic: Add ceqs

2017-08-16 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

[patch net-next] net: sched: cls_flower: fix ndo_setup_tc type for stats call

2017-08-16 Thread Jiri Pirko
From: Jiri Pirko I made a stupid mistake using TC_CLSFLOWER_STATS instead of TC_SETUP_CLSFLOWER. Funny thing is that both are defined as "2" so it actually did not cause any harm. Anyway, fixing it now. Fixes: 2572ac53c46f ("net: sched: make type an argument for

Re: [PATCH v3] openvswitch: enable NSH support

2017-08-16 Thread Eric Garver
On Wed, Aug 16, 2017 at 01:35:30PM +0800, Yi Yang wrote: > v2->v3 > - Change OVS_KEY_ATTR_NSH to nested key to handle >length-fixed attributes and length-variable >attriubte more flexibly. > - Remove struct ovs_action_push_nsh completely > - Add code to handle nested attribute for

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

2017-08-16 Thread Willem de Bruijn
> If I read the above correctly, you are arguining in favor of the > addittional flag version, right? I was. Though if we are going to thread the argument from the caller to __skb_try_recv_from_queue to avoid rereading sk->sk_peek_off, on second thought it might be simpler to do it through off:

Re: [net-next PATCH 00/10] BPF: sockmap and sk redirect support

2017-08-16 Thread Daniel Borkmann
On 08/16/2017 07:30 AM, John Fastabend wrote: This series implements a sockmap and socket redirect helper for BPF using a model similar to XDP netdev redirect. A sockmap is a BPF map type that holds references to sock structs. Then with a new sk redirect bpf helper BPF programs can use the map

[PATCH net-next v2 0/2] simplify the tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
These patches are not bugfix. But just simplify the tcp_conn_request function. These patches are based on Davem's net-next tree. Tonghao Zhang (2): tcp: Remove unnecessary dst check in tcp_conn_request. tcp: Remove the unused parameter for tcp_try_fastopen. include/net/tcp.h | 3 +--

[PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
Because we remove the tcp_tw_recycle support in the commit 4396e46187c ('tcp: remove tcp_tw_recycle') and also delete the code 'af_ops->route_req' for sysctl_tw_recycle in tcp_conn_request. Now when we call the 'af_ops->route_req', the dist always is NULL, and we remove the unnecessay check.

Re: [PATCH][V2] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Leon Romanovsky
On Wed, Aug 16, 2017 at 02:42:50PM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes in the mlx4 driver. > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/mellanox/mlx4/cmd.c| 16

[PATCH net] dccp: defer ccid_hc_tx_delete() at dismantle time

2017-08-16 Thread Eric Dumazet
From: Eric Dumazet syszkaller team reported another problem in DCCP [1] Problem here is that the structure holding RTO timer (ccid2_hc_tx_rto_expire() handler) is freed too soon. We can not use del_timer_sync() to cancel the timer since this timer wants to grab socket lock

[PATCH][V2] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes in the mlx4 driver. Signed-off-by: Colin Ian King --- drivers/net/ethernet/mellanox/mlx4/cmd.c| 16 drivers/net/ethernet/mellanox/mlx4/fw_qos.c | 6 +++---

Re: [PATCH][V2] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Colin Ian King
On 16/08/17 14:58, Leon Romanovsky wrote: > On Wed, Aug 16, 2017 at 02:42:50PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Trivial fix to spelling mistakes in the mlx4 driver. >> >> Signed-off-by: Colin Ian King >> --- >>

Re: DSA support for Micrel KSZ8895

2017-08-16 Thread Andrew Lunn
On Wed, Aug 16, 2017 at 09:55:24AM +0200, Pavel Machek wrote: > Hi! > > I've got hardware with KSZ8895, and I'd like to use switch ports as > separate ethernet cards. I believe that means DSA support. > > And there are even patches available from microchip... unfortunately > they are in strange

Re: [PATCH net-next V2 1/3] tap: use build_skb() for small packet

2017-08-16 Thread Jason Wang
On 2017年08月16日 18:24, Eric Dumazet wrote: On Wed, 2017-08-16 at 11:55 +0800, Jason Wang wrote: On 2017年08月16日 11:45, Eric Dumazet wrote: You do realize that tun_build_skb() is not thread safe ? Ok, I think the issue if skb_page_frag_refill(), need a spinlock probably. Will prepare a patch.

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

2017-08-16 Thread Daniel Borkmann
On 08/16/2017 01:10 PM, Michael Ellerman wrote: Daniel Borkmann writes: On 08/16/2017 07:15 AM, Michael Ellerman wrote: The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list to include all architectures

Re: [PATCH] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Boyer, Andrew
On 8/16/17, 5:05 AM, "linux-rdma-ow...@vger.kernel.org on behalf of Colin King" wrote: >From: Colin Ian King > >Trivial fix to spelling mistakes in the mlx4 driver > >Signed-off-by: Colin Ian

[PATCH 2/2] tcp: Remove the unused parameter for tcp_try_fastopen.

2017-08-16 Thread Tonghao Zhang
Signed-off-by: Tonghao Zhang --- include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++ net/ipv4/tcp_input.c| 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index afdab3781425..a995004ae946

[PATCH 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
Because we remove the tcp_tw_recycle support in the commit 4396e46187c ('tcp: remove tcp_tw_recycle') and also delete the code 'af_ops->route_req' for sysctl_tw_recycle in tcp_conn_request. Now when we call the 'af_ops->route_req', the dist always is NULL, and we remove the unnecessay check.

Re: [PATCH v3] openvswitch: enable NSH support

2017-08-16 Thread Jiri Benc
On Wed, 16 Aug 2017 17:31:30 +0800, Yang, Yi wrote: > On Wed, Aug 16, 2017 at 11:19:21AM +0200, Jiri Benc wrote: > > > --- a/include/uapi/linux/openvswitch.h > > > +++ b/include/uapi/linux/openvswitch.h > > [...] > > > +#define NSH_MD1_CONTEXT_SIZE 4 > > > > Please move this to nsh.h and use it

[PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Jason Wang
From: Eric Dumazet tun_build_skb() is not thread safe since it uses per queue page frag, this will break things when multiple threads are sending through same queue. Switch to use per-thread generator (no lock involved). Fixes: 66ccbc9c87c2 ("tap: use build_skb() for

Re: [PATCH][V2] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread Leon Romanovsky
On Wed, Aug 16, 2017 at 03:02:31PM +0100, Colin Ian King wrote: > On 16/08/17 14:58, Leon Romanovsky wrote: > > On Wed, Aug 16, 2017 at 02:42:50PM +0100, Colin King wrote: > >> From: Colin Ian King > >> > >> Trivial fix to spelling mistakes in the mlx4 driver. > >> > >>

RE: DSA support for Micrel KSZ8895

2017-08-16 Thread Woojung.Huh
> > Hi! > > > > I've got hardware with KSZ8895, and I'd like to use switch ports as > > separate ethernet cards. I believe that means DSA support. > > > > And there are even patches available from microchip... unfortunately > > they are in strange form and for v3.18. > > > > >

RE: [patch net-next 0/3] net/sched: Improve getting objects by indexes

2017-08-16 Thread David Laight
From: Christian König > Sent: 16 August 2017 09:32 > Am 16.08.2017 um 10:16 schrieb Jiri Pirko: > > Wed, Aug 16, 2017 at 09:49:07AM CEST, christian.koe...@amd.com wrote: > >> Am 16.08.2017 um 04:12 schrieb Chris Mi: ... > >>> - ret = idr_alloc(_minor_idr, bcd, 0, BSG_MAX_DEVS, GFP_KERNEL); > >>> -

Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Jason Wang
On 2017年08月16日 22:14, Jason Wang wrote: From: Eric Dumazet tun_build_skb() is not thread safe since it uses per queue page frag, this will break things when multiple threads are sending through same queue. Switch to use per-thread generator (no lock involved). Fixes:

Re: [PATCH 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 06:31 -0700, Tonghao Zhang wrote: > Because we remove the tcp_tw_recycle support in the commit > 4396e46187c ('tcp: remove tcp_tw_recycle') and also delete > the code 'af_ops->route_req' for sysctl_tw_recycle in tcp_conn_request. > Now when we call the 'af_ops->route_req',

Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 13:06 +0200, Jiri Pirko wrote: > Wed, Aug 16, 2017 at 12:58:53PM CEST, eric.duma...@gmail.com wrote: > >On Wed, 2017-08-16 at 12:53 +0200, Jiri Pirko wrote: > > > >> rhashtable is unnecesary big hammer for this. IDR is nice fit for > >> this purpose. > > > >Obviously IDR does

Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Jiri Pirko
Wed, Aug 16, 2017 at 04:57:18PM CEST, eric.duma...@gmail.com wrote: >On Wed, 2017-08-16 at 13:06 +0200, Jiri Pirko wrote: >> Wed, Aug 16, 2017 at 12:58:53PM CEST, eric.duma...@gmail.com wrote: >> >On Wed, 2017-08-16 at 12:53 +0200, Jiri Pirko wrote: >> > >> >> rhashtable is unnecesary big hammer

[PATCH net-next 1/3] vmbus: remove unused vmbus_sendpacket_multipagebuffer

2017-08-16 Thread Stephen Hemminger
This function is not used anywhere in current code. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c | 56 -- include/linux/hyperv.h | 6 -- 2 files changed, 62 deletions(-) diff --git

[PATCH net-next 3/3] vmbus: remove unused vmbus_sendpacket_ctl

2017-08-16 Thread Stephen Hemminger
The only usage of vmbus_sendpacket_ctl was by vmbus_sendpacket. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c| 43 +-- drivers/net/hyperv/netvsc.c | 9 - include/linux/hyperv.h | 7 --- 3

[PATCH net-next 2/3] vmbus: remove unused vmubs_sendpacket_pagebuffer_ctl

2017-08-16 Thread Stephen Hemminger
The function vmbus_sendpacket_pagebuffer_ctl was never used directly. Just have vmbus_send_pagebuffer Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c| 30 ++ drivers/net/hyperv/netvsc.c | 10 -- include/linux/hyperv.h

[PATCH net-next 0/3] vmbus sendpacket cleanups

2017-08-16 Thread Stephen Hemminger
These patches remove and consolidate vmbus_sendpacket functions. They should go through the net-next tree since these API's were only used by the netvsc driver. Stephen Hemminger (3): vmbus: remove unused vmbus_sendpacket_multipagebuffer vmbus: remove unused vmubs_sendpacket_pagebuffer_ctl

Re: [PATCH 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
On Wed, Aug 16, 2017 at 10:44 PM, Eric Dumazet wrote: > On Wed, 2017-08-16 at 06:31 -0700, Tonghao Zhang wrote: >> Because we remove the tcp_tw_recycle support in the commit > > >> 4396e46187c ('tcp: remove tcp_tw_recycle') and also delete >> the code 'af_ops->route_req'

Re: [PATCH net-next V2 1/3] tap: use build_skb() for small packet

2017-08-16 Thread David Miller
From: Jason Wang Date: Wed, 16 Aug 2017 17:17:45 +0800 > It looks like full page allocation just produce too much stress on the > page allocator. > > I get 1.58Mpps (full page) vs 1.95Mpps (page frag) with the patches > attached. Yes, this is why drivers doing XDP tend to

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

2017-08-16 Thread Cong Wang
On Wed, Aug 16, 2017 at 1:39 AM, Xin Long wrote: > On Wed, Aug 9, 2017 at 7:33 AM, Cong Wang wrote: >> On Mon, Aug 7, 2017 at 7:33 PM, Xin Long wrote: >>> On Tue, Aug 8, 2017 at 9:15 AM, Cong Wang

[PATCH v3] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
From: "Levin, Alexander (Sasha Levin)" This is useful for directly looking up a task based on class id rather than having to scan through all open file descriptors. Signed-off-by: Sasha Levin --- include/uapi/linux/inet_diag.h | 1

Re: [PATCH next] neigh: initialize neigh entry correctly during arp processing

2017-08-16 Thread महेश बंडेवार
On Wed, Aug 16, 2017 at 5:32 PM, Sowmini Varadhan wrote: > On (08/16/17 17:02), Mahesh Bandewar wrote: >> >> From: Mahesh Bandewar >> >> If the ARP processing creates a neigh entry, it's immediately marked >> as STALE without timer and stays that

  1   2   3   >