Re: [pull request][for-next] Mellanox mlx5 Reorganize core driver directory layout

2017-01-14 Thread Leon Romanovsky
On Sat, Jan 14, 2017 at 09:37:20AM -0800, Tom Herbert wrote: > On Fri, Jan 13, 2017 at 2:45 PM, Saeed Mahameed > wrote: > > On Sat, Jan 14, 2017 at 12:06 AM, Tom Herbert wrote: > >> On Fri, Jan 13, 2017 at 12:29 PM, Leon Romanovsky

[PATCH v2 net-next] IPsec: do not ignore crypto err in ah input

2017-01-14 Thread Gilad Ben-Yossef
ah input processing uses the asynchronous hash crypto API which supplies an error code as part of the operation completion but the error code was being ignored. Treat a crypto API error indication as a verification failure. While a crypto API reported error would almost certainly result in a

Re: [PATCH net-next] IPsec: do not ignore crypto err in ah input

2017-01-14 Thread Gilad Ben-Yossef
On Fri, Jan 13, 2017 at 9:45 AM, Alexander Alemayhu wrote: > On Thu, Jan 12, 2017 at 03:33:22PM +0200, Gilad Ben-Yossef wrote: >> ah input processing uses the asynchrnous hash crypto API which >> supplies an error code as part of the operation completion but >> the error

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread Florian Fainelli
Le 01/14/17 à 17:51, yuan linyu a écrit : > On 六, 2017-01-14 at 10:35 -0800, Florian Fainelli wrote: >> On 01/14/2017 08:24 AM, Andrew Lunn wrote: >>> >>> On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: From: yuan linyu if phy

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread yuan linyu
On 六, 2017-01-14 at 10:35 -0800, Florian Fainelli wrote: > On 01/14/2017 08:24 AM, Andrew Lunn wrote: > > > > On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: > > > > > > From: yuan linyu > > > > > > if phy device have register(s) configuration

Re: [PATCH v5 05/13] net: ethernet: aquantia: Support for NIC-specific code

2017-01-14 Thread Andrew Lunn
On Sun, Jan 15, 2017 at 12:55:02AM +0200, Rami Rosen wrote: > Hi, Florian, > > > +} > > + > > +static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu) > > +{ > > + struct aq_nic_s *aq_nic = (struct aq_nic_s *)netdev_priv(ndev); > > + int err = 0; > > + > > + if (new_mtu ==

Re: 4.9 conntrack performance issues

2017-01-14 Thread Denys Fedoryshchenko
On 2017-01-15 02:29, Florian Westphal wrote: Denys Fedoryshchenko wrote: On 2017-01-15 01:53, Florian Westphal wrote: >Denys Fedoryshchenko wrote: > >I suspect you might also have to change > >1011 } else if (expired_count) { >1012

[PATCH net-next] bpf, trace: make ctx access checks more robust

2017-01-14 Thread Daniel Borkmann
Make sure that ctx cannot potentially be accessed oob by asserting explicitly that ctx access size into pt_regs for BPF_PROG_TYPE_KPROBE programs must be within limits. In case some 32bit archs have pt_regs not being a multiple of 8, then BPF_DW access could cause such access.

Re: 4.9 conntrack performance issues

2017-01-14 Thread Florian Westphal
Denys Fedoryshchenko wrote: > On 2017-01-15 01:53, Florian Westphal wrote: > >Denys Fedoryshchenko wrote: > > > >I suspect you might also have to change > > > >1011 } else if (expired_count) { > >1012

Re: 4.9 conntrack performance issues

2017-01-14 Thread Denys Fedoryshchenko
On 2017-01-15 01:53, Florian Westphal wrote: Denys Fedoryshchenko wrote: [ CC Nicolas since he also played with gc heuristics in the past ] Sorry if i added someone wrongly to CC, please let me know, if i should remove. I just run successfully 4.9 on my nat

Re: 4.9 conntrack performance issues

2017-01-14 Thread Florian Westphal
Denys Fedoryshchenko wrote: [ CC Nicolas since he also played with gc heuristics in the past ] > Sorry if i added someone wrongly to CC, please let me know, if i should > remove. > I just run successfully 4.9 on my nat several days ago, and seems panic > issue

4.9 conntrack performance issues

2017-01-14 Thread Denys Fedoryshchenko
Hi! Sorry if i added someone wrongly to CC, please let me know, if i should remove. I just run successfully 4.9 on my nat several days ago, and seems panic issue disappeared. But i started to face another issue, it seems garbage collector is hogging one of CPU's. Here is my data: 2xE5-2640

Re: [PATCH v5 05/13] net: ethernet: aquantia: Support for NIC-specific code

2017-01-14 Thread Rami Rosen
Hi, Florian, > +} > + > +static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu) > +{ > + struct aq_nic_s *aq_nic = (struct aq_nic_s *)netdev_priv(ndev); > + int err = 0; > + > + if (new_mtu == ndev->mtu) { > + err = 0; > + goto err_exit; > + }

[PATCH] net: marvell: sky2: use new api ethtool_{get|set}_link_ksettings

2017-01-14 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/marvell/sky2.c | 68 -- 1 files changed, 40 insertions(+), 28 deletions(-)

[PATCH resend iproute2 1/1] utils: make hex2mem available to all users

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim hex2mem() api is useful for parsing hexstrings which are then packed in a stream of chars. Signed-off-by: Jamal Hadi Salim --- include/utils.h | 1 + ip/ipl2tp.c | 25 - lib/utils.c | 25

Re: [PATCH iproute2 1/1] utils: make hex2mem available to all users

2017-01-14 Thread Jamal Hadi Salim
Sorry, messed up Stephen's address. Resending.. cheers, jamal On 17-01-14 05:04 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim hex2mem() api is useful for parsing hexstrings which are then packed in a stream of chars. Signed-off-by: Jamal Hadi Salim

[PATCH iproute2 1/1] utils: make hex2mem available to all users

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim hex2mem() api is useful for parsing hexstrings which are then packed in a stream of chars. Signed-off-by: Jamal Hadi Salim --- include/utils.h | 1 + ip/ipl2tp.c | 25 - lib/utils.c | 25

[PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The kernel

[PATCH net-next v3 04/10] net: dsa: Move ports assignment closer to error checking

2017-01-14 Thread Florian Fainelli
Move the assignment of ports in _dsa_register_switch() closer to where it is checked, no functional change. Re-order declarations to be preserve the inverted christmas tree style. Signed-off-by: Florian Fainelli --- net/dsa/dsa2.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH net-next v3 01/10] net: dsa: Pass device pointer to dsa_register_switch

2017-01-14 Thread Florian Fainelli
In preparation for allowing dsa_register_switch() to be supplied with device/platform data, pass down a struct device pointer instead of a struct device_node. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c |

[PATCH net-next v3 02/10] net: dsa: Make most functions take a dsa_port argument

2017-01-14 Thread Florian Fainelli
In preparation for allowing platform data, and therefore no valid device_node pointer, make most DSA functions takes a pointer to a dsa_port structure whenever possible. While at it, introduce a dsa_port_is_valid() helper function which checks whether port->dn is NULL or not at the moment.

[PATCH net-next v3 00/10] net: dsa: Support for pdata in dsa2

2017-01-14 Thread Florian Fainelli
Hi all, This is not exactly new, and was sent before, although back then, I did not have an user of the pre-declared MDIO board information, but now we do. Note that I have additional changes queued up to have b53 register platform data for MIPS bcm47xx and bcm63xx. Yes I know that we should

[PATCH net-next v3 07/10] net: Relocate dev_to_net_device() into core

2017-01-14 Thread Florian Fainelli
dev_to_net_device() is moved from net/dsa/dsa.c to net/core/dev.c since it going to be used by net/dsa/dsa2.c and the namespace of the function justifies making it available to other users potentially. Signed-off-by: Florian Fainelli --- include/linux/netdevice.h | 2 ++

[PATCH net-next v3 03/10] net: dsa: Suffix function manipulating device_node with _dn

2017-01-14 Thread Florian Fainelli
Make it clear that these functions take a device_node structure pointer Signed-off-by: Florian Fainelli --- net/dsa/dsa2.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 6e3675220fef..04ab62251fe3

[PATCH net-next v3 06/10] net: dsa: Migrate to device_find_class()

2017-01-14 Thread Florian Fainelli
Now that the base device driver code provides an identical implementation of dev_find_class() utilize device_find_class() instead of our own version of it. Signed-off-by: Florian Fainelli --- net/dsa/dsa.c | 22 ++ 1 file changed, 2 insertions(+), 20

[PATCH net-next v3 08/10] net: dsa: Add support for platform data

2017-01-14 Thread Florian Fainelli
Allow drivers to use the new DSA API with platform data. Most of the code in net/dsa/dsa2.c does not rely so much on device_nodes and can get the same information from platform_data instead. We purposely do not support distributed configurations with platform data, so drivers should be providing

[PATCH net-next v3 09/10] net: phy: Allow pre-declaration of MDIO devices

2017-01-14 Thread Florian Fainelli
Allow board support code to collect pre-declarations for MDIO devices by registering them with mdiobus_register_board_info(). SPI and I2C buses have a similar feature, we were missing this for MDIO devices, but this is particularly useful for e.g: MDIO-connected switches which need to provide

[PATCH net-next v3 10/10] ARM: orion: Register DSA switch as a MDIO device

2017-01-14 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH net-next v3 05/10] drivers: base: Add device_find_class()

2017-01-14 Thread Florian Fainelli
Add a helper function to lookup a device reference given a class name. This is a preliminary patch to remove adhoc code from net/dsa/dsa.c and make it more generic. Signed-off-by: Florian Fainelli --- drivers/base/core.c| 19 +++ include/linux/device.h

[PATCH 1/1] ax25: Fix segfault after sock connection timeout

2017-01-14 Thread Basil Gunn
The ax.25 socket connection timed out & the sock struct has been previously taken down ie. sock struct is now a NULL pointer. Checking the sock_flag causes the segfault. Check if the socket struct pointer is NULL before checking sock_flag. This segfault is seen in timed out netrom connections.

Re: [PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread John Fastabend
On 17-01-14 07:49 AM, Jiri Pirko wrote: > Sat, Jan 14, 2017 at 04:39:24PM CET, j...@mojatatu.com wrote: >> On 17-01-14 10:22 AM, Jiri Pirko wrote: >> .. create an accept action with cookie 0xA:0xa0a0a0a0a0a0a0 sudo $TC actions add action ok index 1 cookie 0xA 0xa0a0a0a0a0a0a0 >>> >>> 2x

Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data

2017-01-14 Thread Florian Fainelli
On 01/13/2017 02:37 PM, Florian Fainelli wrote: > On 01/13/2017 06:04 AM, Andrew Lunn wrote: >>> index cd91070b5467..d326fc4afad7 100644 >>> --- a/net/dsa/dsa2.c >>> +++ b/net/dsa/dsa2.c >>> @@ -81,17 +81,23 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst, >>> >>> static bool

Re: [PATCH v5 01/13] net: ethernet: aquantia: Make and configuration files.

2017-01-14 Thread David VomLehn
On 01/14/2017 10:48 AM, Florian Fainelli wrote: On 01/14/2017 10:42 AM, David VomLehn wrote: Yes, we did have it that way at one point. But...there is also the kernel philosophy of not putting in something for future expansion; you can always do it later... Honestly, I've vacillated on this

Re: [PATCH net-next v2 05/10] drivers: base: Add device_find_class()

2017-01-14 Thread Florian Fainelli
On 01/13/2017 02:55 AM, David Laight wrote: > From: Florian Fainelli >> Sent: 12 January 2017 22:51 >> On 01/12/2017 01:21 PM, David Miller wrote: >>> From: Florian Fainelli >>> Date: Wed, 11 Jan 2017 19:41:16 -0800 >>> Add a helper function to lookup a device

Re: [PATCH v5 01/13] net: ethernet: aquantia: Make and configuration files.

2017-01-14 Thread Florian Fainelli
On 01/14/2017 10:42 AM, David VomLehn wrote: > Yes, we did have it that way at one point. But...there is also the > kernel philosophy of not putting in something for future expansion; you > can always do it later... Honestly, I've vacillated on this particular one. (please don't top post). There

Re: [PATCH net] openvswitch: maintain correct checksum state in conntrack actions

2017-01-14 Thread Pravin Shelar
On Thu, Jan 12, 2017 at 4:33 PM, Lance Richardson wrote: > When executing conntrack actions on skbuffs with checksum mode > CHECKSUM_COMPLETE, the checksum must be updated to account for > header pushes and pulls. Otherwise we get "hw csum failure" > logs similar to this

Re: [PATCH v5 01/13] net: ethernet: aquantia: Make and configuration files.

2017-01-14 Thread David VomLehn
Yes, we did have it that way at one point. But...there is also the kernel philosophy of not putting in something for future expansion; you can always do it later... Honestly, I've vacillated on this particular one. On 01/14/2017 10:39 AM, Florian Fainelli wrote: On 01/12/2017 09:02 PM,

Re: [PATCH v5 01/13] net: ethernet: aquantia: Make and configuration files.

2017-01-14 Thread Florian Fainelli
On 01/12/2017 09:02 PM, Alexander Loktionov wrote: > From: David VomLehn > > Patches to create the make and configuration files. > > Signed-off-by: Alexander Loktionov > Signed-off-by: Dmitrii Tarakanov >

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread Florian Fainelli
On 01/14/2017 08:24 AM, Andrew Lunn wrote: > On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: >> From: yuan linyu >> >> if phy device have register(s) configuration problem, >> user can use this attribute to diagnose. >> this feature need phy driver

Re: [PATCH] net: korina: use new api ethtool_{get|set}_link_ksettings

2017-01-14 Thread Florian Fainelli
On 01/14/2017 03:33 AM, Philippe Reynes wrote: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > Signed-off-by: Philippe Reynes Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-14 10:29 AM, Jiri Pirko wrote: Sat, Jan 14, 2017 at 04:03:17PM CET, j...@mojatatu.com wrote: Fair. So could this be done like IFLA_PHYS_SWITCH_ID and IFLA_PHYS_PORT_ID. They can have variable size, max is MAX_PHYS_ITEM_ID_LEN We can let user to pass arbitrary len up to 16 bytes.

Re: [pull request][for-next] Mellanox mlx5 Reorganize core driver directory layout

2017-01-14 Thread Tom Herbert
On Fri, Jan 13, 2017 at 2:45 PM, Saeed Mahameed wrote: > On Sat, Jan 14, 2017 at 12:06 AM, Tom Herbert wrote: >> On Fri, Jan 13, 2017 at 12:29 PM, Leon Romanovsky wrote: >>> On Fri, Jan 13, 2017 at 12:14:07PM -0500, David Miller

Re: [PATCH] can: Fix kernel panic at security_sock_rcv_skb

2017-01-14 Thread Eric Dumazet
On Sat, 2017-01-14 at 14:53 +0100, Oliver Hartkopp wrote: > Hello Eric, > > On 01/14/2017 04:43 AM, Liu Shuo wrote: > > On Thu 12.Jan'17 at 17:33:38 +0100, Oliver Hartkopp wrote: > >> On 01/12/2017 02:01 PM, Eric Dumazet wrote: > > >>> The main problem seems that the sockets themselves are not

Re: pull-request: mac80211-next 2017-01-13

2017-01-14 Thread David Miller
From: Johannes Berg Date: Fri, 13 Jan 2017 11:29:32 +0100 > This is my first pull request for net-next, and it seems a bit > bigger than the past few releases. Detailed information below, > as usual. > > Please pull and let me know if there's any problem. Pulled,

Re: [PATCH] cxgb4: Remove redundant memset before memcpy

2017-01-14 Thread David Miller
From: Shyam Saini Date: Sat, 14 Jan 2017 06:47:40 +0530 > The region set by the call to memset, immediately overwritten by > the subsequent call to memcpy and thus makes the memset redundant. > > Also remove the memset((, 0, sizeof(info)) on line 398 because > info is

Re: [PATCH v3 1/2] bpf: add a longest prefix match trie map implementation

2017-01-14 Thread Alexei Starovoitov
On 1/14/17 4:17 AM, Daniel Mack wrote: +static struct bpf_map *trie_alloc(union bpf_attr *attr) +{ + size_t cost, cost_per_node; + struct lpm_trie *trie; + int ret; + + /* check sanity of attributes */ + if (attr->max_entries == 0 || + attr->map_flags !=

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread Andrew Lunn
On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: > From: yuan linyu > > if phy device have register(s) configuration problem, > user can use this attribute to diagnose. > this feature need phy driver maintainer implement. what is wrong with mii-tool

Re: [PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jiri Pirko
Sat, Jan 14, 2017 at 04:39:24PM CET, j...@mojatatu.com wrote: >On 17-01-14 10:22 AM, Jiri Pirko wrote: > >> > .. create an accept action with cookie 0xA:0xa0a0a0a0a0a0a0 >> > sudo $TC actions add action ok index 1 cookie 0xA 0xa0a0a0a0a0a0a0 >> >> 2x 64bit values? Why can't this have variable

Re: [PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jamal Hadi Salim
On 17-01-14 10:22 AM, Jiri Pirko wrote: .. create an accept action with cookie 0xA:0xa0a0a0a0a0a0a0 sudo $TC actions add action ok index 1 cookie 0xA 0xa0a0a0a0a0a0a0 2x 64bit values? Why can't this have variable length, according to what user needs: You can intepret it however you wish.

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jiri Pirko
Sat, Jan 14, 2017 at 04:03:17PM CET, j...@mojatatu.com wrote: >On 17-01-14 09:48 AM, Jiri Pirko wrote: >> Sat, Jan 14, 2017 at 01:56:35PM CET, j...@mojatatu.com wrote: > > >> > I think the feature makes a lot of sense (as is the action variant). >> > But can we make it: >> > a) fixed size >> >>

Re: [PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jiri Pirko
Sat, Jan 14, 2017 at 03:59:18PM CET, j...@mojatatu.com wrote: >From: Jamal Hadi Salim > >Introduce optional 128-bit action cookie. >Like all other cookie schemes in the networking world (eg in protocols >like http or existing kernel fib protocol field, etc) the idea is to save

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-14 09:48 AM, Jiri Pirko wrote: Sat, Jan 14, 2017 at 01:56:35PM CET, j...@mojatatu.com wrote: I think the feature makes a lot of sense (as is the action variant). But can we make it: a) fixed size Can you elaborate on why is this needed? My experience with the action bits its

[PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The kernel

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jiri Pirko
Sat, Jan 14, 2017 at 01:56:35PM CET, j...@mojatatu.com wrote: >On 17-01-09 01:23 PM, John Fastabend wrote: >> On 17-01-08 09:19 AM, Jiri Pirko wrote: > >[..] >> > This should never be interpreted by kernel. I think this would be good >> > to make clear in the comment in the code. >> > >> >> Ah

Re: [PATCH] can: Fix kernel panic at security_sock_rcv_skb

2017-01-14 Thread Oliver Hartkopp
Hello Eric, On 01/14/2017 04:43 AM, Liu Shuo wrote: On Thu 12.Jan'17 at 17:33:38 +0100, Oliver Hartkopp wrote: On 01/12/2017 02:01 PM, Eric Dumazet wrote: The main problem seems that the sockets themselves are not RCU protected. If CAN uses RCU for delivery, then sockets should be freed

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-03 07:22 AM, Paul Blakey wrote: I don't mind having it on TC level but I didn't want to intervene with all filters/TC. Please do make it for all classifiers. I described a use case for u32 where the cookie could be used to pretty print the output on a dump/get. cheers, jamal

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-09 01:23 PM, John Fastabend wrote: On 17-01-08 09:19 AM, Jiri Pirko wrote: [..] This should never be interpreted by kernel. I think this would be good to make clear in the comment in the code. Ah OK I had assumed you would be pushing this via tc_cls_flower_offload into the driver

Re: [PATCH] cxgb4: Remove redundant memset before memcpy

2017-01-14 Thread Tobias Klauser
On 2017-01-14 at 02:17:40 +0100, Shyam Saini wrote: > The region set by the call to memset, immediately overwritten by > the subsequent call to memcpy and thus makes the memset redundant. > > Also remove the memset((, 0, sizeof(info)) on line 398 because > info is

[PATCH v3 2/2] bpf: Add tests for the lpm trie map

2017-01-14 Thread Daniel Mack
From: David Herrmann The first part of this program runs randomized tests against the lpm-bpf-map. It implements a "Trivial Longest Prefix Match" (tlpm) based on simple, linear, single linked lists. The implementation should be pretty straightforward. Based on tlpm, this

[PATCH v3 0/2] bpf: add longest prefix match map

2017-01-14 Thread Daniel Mack
This patch set adds a longest prefix match algorithm that can be used to match IP addresses to a stored set of ranges. It is exposed as a bpf map type. Internally, data is stored in an unbalanced tree of nodes that has a maximum height of n, where n is the prefixlen the trie was created with.

[PATCH v3 1/2] bpf: add a longest prefix match trie map implementation

2017-01-14 Thread Daniel Mack
This trie implements a longest prefix match algorithm that can be used to match IP addresses to a stored set of ranges. Internally, data is stored in an unbalanced trie of nodes that has a maximum height of n, where n is the prefixlen the trie was created with. Tries may be created with prefix

Re: [PATCH net-next] net/mlx5e: Support bpf_xdp_adjust_head()

2017-01-14 Thread Saeed Mahameed
On Sat, Jan 14, 2017 at 12:31 AM, Martin KaFai Lau wrote: > On Fri, Jan 13, 2017 at 03:58:46PM +0200, Saeed Mahameed wrote: >> >> > @@ -680,7 +687,7 @@ static inline void mlx5e_xmit_xdp_frame(struct >> >> > mlx5e_rq *rq, >> >> > memset(wqe, 0, sizeof(*wqe)); >> >> > >> >> >

[PATCH] net: marvell: skge: use new api ethtool_{get|set}_link_ksettings

2017-01-14 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. The callback set_link_ksettings no longer update the value of advertising, as the struct ethtool_link_ksettings is defined as const. Signed-off-by: Philippe Reynes ---

Re: [Patch net] atm: remove an unnecessary loop

2017-01-14 Thread Chas Williams
On Fri, 2017-01-13 at 16:30 -0800, Cong Wang wrote: > On Fri, Jan 13, 2017 at 3:54 PM, Chas Williams <3ch...@gmail.com> wrote: > > On Fri, 2017-01-13 at 10:20 -0800, Cong Wang wrote: > >> On Fri, Jan 13, 2017 at 9:10 AM, David Miller wrote: > >> > From: Francois Romieu

[PATCH] net: korina: use new api ethtool_{get|set}_link_ksettings

2017-01-14 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/korina.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-14 Thread Leon Romanovsky
On Thu, Jan 12, 2017 at 04:37:16PM +0100, Michal Hocko wrote: > From: Michal Hocko > > There are many code paths opencoding kvmalloc. Let's use the helper > instead. The main difference to kvmalloc is that those users are usually > not considering all the aspects of the memory

Re: [PATCH v2 1/2] bpf: add a longest prefix match trie map implementation

2017-01-14 Thread Daniel Mack
On 01/13/2017 07:01 PM, Alexei Starovoitov wrote: > On Thu, Jan 12, 2017 at 06:29:21PM +0100, Daniel Mack wrote: >> This trie implements a longest prefix match algorithm that can be used >> to match IP addresses to a stored set of ranges. >> >> Internally, data is stored in an unbalanced trie of

[net-next 3/3] tipc: reduce risk of user starvation during link congestion

2017-01-14 Thread Jon Maloy
The socket code currently handles link congestion by either blocking and trying to send again when the congestion has abated, or just returning to the user with -EAGAIN and let him re-try later. This mechanism is prone to starvation, because the wakeup algorithm is non-atomic. During the time the

[net-next 2/3] tipc: modify struct tipc_plist to be more versatile

2017-01-14 Thread Jon Maloy
During multicast reception we currently use a simple linked list with push/pop semantics to store port numbers. We now see a need for a more generic list for storing values of type u32. We therefore make some modifications to this list, while replacing the prefix 'tipc_plist_' with 'u32_'. We

[net-next 1/3] tipc: unify tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() functions

2017-01-14 Thread Jon Maloy
The functions tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg() are very similar. The latter function is also called from two locations, and there will be more in the coming commits, which will all need to test on different conditions. Instead of making yet another duplicates of the function, we

[net-next 0/3] tipc: improve interaction socket-link

2017-01-14 Thread Jon Maloy
We fix a very real starvation problem that may occur when a link encounters send buffer congestion. At the same time we make the interaction between the socket and link layer simpler and more consistent. Jon Maloy (3): tipc: unify tipc_wait_for_sndpkt() and tipc_wait_for_sndmsg()