Re: [PATCH bpf-next 1/3] bpf: add bpf queue map

2018-08-08 Thread Alexei Starovoitov
On Wed, Aug 08, 2018 at 10:08:47PM -0500, Mauricio Vasquez wrote: > > > And how about adding three new helpers: push/pop/peek as well? > > Reusing lookup/update is neat, but does lookup == pop > > or does lookup == peek ? > > I suspect it will be confusing. > > Three new helpers cost nothing, but

Re: [PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720

2018-08-08 Thread Jisheng Zhang
+ more people On Wed, 8 Aug 2018 17:27:05 +0200 Marek Behún wrote: > For some reason on Armada 3720 boards (EspressoBin and Turris Mox) the > networking driver behaves weirdly when using napi_gro_receive. > > For example downloading a big file from a local network (low ping) is > fast, but

Re: [PATCH mlx5-next 5/6] net/mlx5: Unexport functions that need not be exported

2018-08-08 Thread Leon Romanovsky
On Wed, Aug 08, 2018 at 04:23:52PM -0700, Saeed Mahameed wrote: > From: Eli Cohen > > mlx5_query_vport_state() and mlx5_modify_vport_admin_state() are used > only from within mlx5_core - unexport them. > > Signed-off-by: Eli Cohen > Reviewed-by: Or Gerlitz > Signed-off-by: Saeed Mahameed >

Re: [PATCH bpf] bpf: fix bpffs non-array map seq_show issue

2018-08-08 Thread Yonghong Song
On 8/8/18 7:25 PM, Alexei Starovoitov wrote: On Wed, Aug 08, 2018 at 06:25:19PM -0700, Yonghong Song wrote: In function map_seq_next() of kernel/bpf/inode.c, the first key will be the "0" regardless of the map type. This works for array. But for hash type, if it happens key "0" is in the

Re: [PATCH bpf-next 1/3] bpf: add bpf queue map

2018-08-08 Thread Mauricio Vasquez
On 08/07/2018 09:42 AM, Alexei Starovoitov wrote: On Mon, Aug 06, 2018 at 03:58:30PM +0200, Mauricio Vasquez B wrote: Bpf queue implements a LIFO/FIFO data containers for ebpf programs. queue/stack datastructure would be a great addition. It allows to push an element to the queue by using

[PATCH net-next v2] net: allow to call netif_reset_xps_queues() under cpus_read_lock

2018-08-08 Thread Andrei Vagin
From: Andrei Vagin The definition of static_key_slow_inc() has cpus_read_lock in place. In the virtio_net driver, XPS queues are initialized after setting the queue:cpu affinity in virtnet_set_affinity() which is already protected within cpus_read_lock. Lockdep prints a warning when we are

Re: [PATCH bpf-next 1/3] bpf: add bpf queue map

2018-08-08 Thread Mauricio Vasquez
On 08/07/2018 08:52 AM, Daniel Borkmann wrote: On 08/06/2018 03:58 PM, Mauricio Vasquez B wrote: Bpf queue implements a LIFO/FIFO data containers for ebpf programs. It allows to push an element to the queue by using the update operation and to pop an element from the queue by using the

Re: [PATCH bpf-next 3/3] bpf: add sample for BPF_MAP_TYPE_QUEUE

2018-08-08 Thread Mauricio Vasquez
On 08/07/2018 08:44 AM, Daniel Borkmann wrote: On 08/06/2018 03:58 PM, Mauricio Vasquez B wrote: The example is made by two parts, a eBPF program that consumes elements from a FIFO queue and prints them in the screen and a user space application that inserts new elements into the queue each

Re: [PATCH bpf-next 1/3] bpf: add bpf queue map

2018-08-08 Thread Mauricio Vasquez
On 08/07/2018 08:40 AM, Daniel Borkmann wrote: On 08/06/2018 03:58 PM, Mauricio Vasquez B wrote: Bpf queue implements a LIFO/FIFO data containers for ebpf programs. It allows to push an element to the queue by using the update operation and to pop an element from the queue by using the

Re: [PATCH mlx5-next 0/6] Mellanox, mlx5 next updates 2018-08-09

2018-08-08 Thread David Miller
From: Saeed Mahameed Date: Wed, 8 Aug 2018 16:23:47 -0700 > This series includes mlx5 core driver updates and mostly simple > cleanups. > > From Denis: Use max #EQs reported by firmware to request MSIX vectors. > > From Eli: Trivial cleanups, unused arguments/functions and reduce > command

Re: [PATCH bpf] bpf: fix bpffs non-array map seq_show issue

2018-08-08 Thread Alexei Starovoitov
On Wed, Aug 08, 2018 at 06:25:19PM -0700, Yonghong Song wrote: > In function map_seq_next() of kernel/bpf/inode.c, > the first key will be the "0" regardless of the map type. > This works for array. But for hash type, if it happens > key "0" is in the map, the bpffs map show will miss > some items

Re: [PATCH] dsa: slave: eee: Allow ports to use phylink

2018-08-08 Thread David Miller
From: Andrew Lunn Date: Wed, 8 Aug 2018 20:56:40 +0200 > For a port to be able to use EEE, both the MAC and the PHY must > support EEE. A phy can be provided by both a phydev or phylink. Verify > at least one of these exist, not just phydev. > > Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK

Re: [PATCH net] net: aquantia: Fix IFF_ALLMULTI flag functionality

2018-08-08 Thread David Miller
From: Igor Russkikh Date: Wed, 8 Aug 2018 14:06:32 +0300 > From: Dmitry Bogdanov > > It was noticed that NIC always pass all multicast traffic to the host > regardless of IFF_ALLMULTI flag on the interface. > The rule in MC Filter Table in NIC, that is configured to accept any > multicast

Re: [PATCH net 0/2] Mellanox, mlx5e fixes 2018-08-07

2018-08-08 Thread David Miller
From: Saeed Mahameed Date: Wed, 8 Aug 2018 15:48:06 -0700 > I know it is late into 4.18 release, and this is why I am submitting > only two mlx5e ethernet fixes. > > The first one from Or, is needed for -stable and it fixes hairpin > for "same device" check. > > The second fix is a non risk

Re: [PATCH net-next] ieee802154: hwsim: fix rcu handling

2018-08-08 Thread David Miller
From: Stefan Schmidt Date: Wed, 8 Aug 2018 22:05:54 +0200 > I would, once again, ask you to apply these three directly to > net-next. Ok, done.

Re: [PATCH] net: phy: sftp: print debug message with text, not numbers

2018-08-08 Thread Andrew Lunn
On Wed, Aug 08, 2018 at 11:16:57PM +0100, Russell King - ARM Linux wrote: > You might want to fix the subject line. Ah, yes, s/sftp/sfp/ Thanks Andrew

[PATCH bpf] bpf: fix bpffs non-array map seq_show issue

2018-08-08 Thread Yonghong Song
In function map_seq_next() of kernel/bpf/inode.c, the first key will be the "0" regardless of the map type. This works for array. But for hash type, if it happens key "0" is in the map, the bpffs map show will miss some items if the key "0" is not the first element of the first bucket. This patch

Re: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Andreas Färber
+ Xue Liu + Sebastian Am 08.08.2018 um 17:52 schrieb Ben Whitten: >> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add >> register, bit-fields, and helpers for regmap >> >> Am 08.08.2018 um 14:32 schrieb Ben Whitten: > drivers/net/lora/Kconfig | 1 + >

[PATCH mlx5-next 6/6] net/mlx5: Reduce command polling interval

2018-08-08 Thread Saeed Mahameed
From: Eli Cohen Use cond_resched() instead of usleep_range() to decrease the time between polling attempts thus reducing overall driver load time. Below is a comparison before and after the change, of loading eight virtual functions. Before: real0m8.785s user0m0.093s sys 0m0.090s

[PATCH mlx5-next 4/6] net/mlx5: Remove unused mlx5_query_vport_admin_state

2018-08-08 Thread Saeed Mahameed
From: Eli Cohen mlx5_query_vport_admin_state() is not used anywhere. Remove it. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 10 -- include/linux/mlx5/vport.h | 2 -- 2

[PATCH mlx5-next 5/6] net/mlx5: Unexport functions that need not be exported

2018-08-08 Thread Saeed Mahameed
From: Eli Cohen mlx5_query_vport_state() and mlx5_modify_vport_admin_state() are used only from within mlx5_core - unexport them. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 -- 1 file changed, 2

[PATCH mlx5-next 1/6] net/mlx5: Use max_num_eqs for calculation of required MSIX vectors

2018-08-08 Thread Saeed Mahameed
From: Denis Drozdov New firmware has defined new HCA capability field called "max_num_eqs", that is the number of available EQs after subtracting reserved FW EQs. Before this capability the FW reported the EQ number in "log_max_eqs", the reported value also contained FW reserved EQs, but the

[PATCH mlx5-next 3/6] net/mlx5: E-Switch, Remove unused argument when creating legacy FDB

2018-08-08 Thread Saeed Mahameed
From: Eli Cohen Remove unused nvports argument. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH mlx5-next 2/6] net/mlx5: Rename modify/query_vport state related enums

2018-08-08 Thread Saeed Mahameed
From: Eran Ben Elisha Modify and query vport state commands share the same admin_state and op_mod values, rename the enums to fit them both. In addition, remove the esw prefix from the admin state enum as this also applied for vnic. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed

[PATCH mlx5-next 0/6] Mellanox, mlx5 next updates 2018-08-09

2018-08-08 Thread Saeed Mahameed
Hi All, This series includes mlx5 core driver updates and mostly simple cleanups. >From Denis: Use max #EQs reported by firmware to request MSIX vectors. >From Eli: Trivial cleanups, unused arguments/functions and reduce command polling interval when command interface is in polling mode. >From

Re: [PATCH net-next] rds: avoid lock hierarchy violation between m_rs_lock and rs_recv_lock

2018-08-08 Thread Santosh Shilimkar
On 8/8/2018 3:18 PM, Sowmini Varadhan wrote: On (08/08/18 14:51), Santosh Shilimkar wrote: This bug doesn't make sense since two different transports are using same socket (Loop and rds_tcp) and running together. For same transport, such race can't happen with MSG_ON_SOCK flag. CPU1->

[PATCH net 2/2] net/mlx5e: Cleanup of dcbnl related fields

2018-08-08 Thread Saeed Mahameed
From: Huy Nguyen Remove unused netdev_registered_init/remove in en.h Return ENOSUPPORT if the check MLX5_DSCP_SUPPORTED fails. Remove extra white space Fixes: 2a5e7a1344f4 ("net/mlx5e: Add dcbnl dscp to priority support") Signed-off-by: Huy Nguyen Cc: Yuval Shaia Reviewed-by: Parav Pandit

[PATCH net 1/2] net/mlx5e: Properly check if hairpin is possible between two functions

2018-08-08 Thread Saeed Mahameed
From: Or Gerlitz The current check relies on function BDF addresses and can get us wrong e.g when two VFs are assigned into a VM and the PCI v-address is set by the hypervisor. Fixes: 5c65c564c962 ('net/mlx5e: Support offloading TC NIC hairpin flows') Signed-off-by: Or Gerlitz Reported-by:

[PATCH net 0/2] Mellanox, mlx5e fixes 2018-08-07

2018-08-08 Thread Saeed Mahameed
Hi Dave, I know it is late into 4.18 release, and this is why I am submitting only two mlx5e ethernet fixes. The first one from Or, is needed for -stable and it fixes hairpin for "same device" check. The second fix is a non risk fix from Huy which cleans up and improves error return value

Re: [PATCH net-next] rds: avoid lock hierarchy violation between m_rs_lock and rs_recv_lock

2018-08-08 Thread Sowmini Varadhan
On (08/08/18 14:51), Santosh Shilimkar wrote: > This bug doesn't make sense since two different transports are using > same socket (Loop and rds_tcp) and running together. > For same transport, such race can't happen with MSG_ON_SOCK flag. > CPU1-> rds_loop_inc_free > CPU0 -> rds_tcp_cork ... >

Re: [PATCH] net: phy: sftp: print debug message with text, not numbers

2018-08-08 Thread Russell King - ARM Linux
You might want to fix the subject line. On Wed, Aug 08, 2018 at 08:54:12PM +0200, Andrew Lunn wrote: > Convert the state numbers, device state, etc from numbers to strings > when printing debug messages. > > Signed-off-by: Andrew Lunn > --- > drivers/net/phy/sfp.c | 76

Re: [PATCH net-next] rds: avoid lock hierarchy violation between m_rs_lock and rs_recv_lock

2018-08-08 Thread Santosh Shilimkar
On 8/8/2018 1:57 PM, Sowmini Varadhan wrote: The following deadlock, reported by syzbot, can occur if CPU0 is in rds_send_remove_from_sock() while CPU1 is in rds_clear_recv_queue() CPU0CPU1 lock(&(>m_rs_lock)->rlock);

[Patch net-next] net_sched: fix a potential out-of-bound access

2018-08-08 Thread Cong Wang
In tca_action_gd(), when tcf_action_get_1() fails in the middle of the loop, tcf_action_put_many([acts_deleted]) is called to cleanup. But inside tcf_action_put_many() it still iterates from 0 to TCA_ACT_MAX_PRIO, so inside it would be: [acts_deleted][0]...[acts_deleted][MAX_PRIO] Then the

[net PATCH 1/3] xdp: fix bug in cpumap teardown code path

2018-08-08 Thread Jesper Dangaard Brouer
When removing a cpumap entry, a number of syncronization steps happen. Eventually the teardown code __cpu_map_entry_free is invoked from/via call_rcu. The teardown code __cpu_map_entry_free() flushes remaining xdp_frames, by invoking bq_flush_to_queue, which calls xdp_return_frame_rx_napi(). The

[net PATCH 3/3] xdp: fix bug in devmap teardown code path

2018-08-08 Thread Jesper Dangaard Brouer
Like cpumap teardown, the devmap teardown code also flush remaining xdp_frames, via bq_xmit_all() in case map entry is removed. The code can call xdp_return_frame_rx_napi, from the the wrong context, in-case ndo_xdp_xmit() fails. Fixes: 389ab7f01af9 ("xdp: introduce xdp_return_frame_rx_napi")

[net PATCH 2/3] samples/bpf: xdp_redirect_cpu adjustment to reproduce teardown race easier

2018-08-08 Thread Jesper Dangaard Brouer
The teardown race in cpumap is really hard to reproduce. These changes makes it easier to reproduce, for QA. The --stress-mode now have a case of a very small queue size of 8, that helps to trigger teardown flush to encounter a full queue, which results in calling xdp_return_frame API, in a

[net PATCH 0/3] Fix two teardown bugs for BPF maps cpumap and devmap

2018-08-08 Thread Jesper Dangaard Brouer
Removing entries from cpumap and devmap, goes through a number of syncronization steps to make sure no new xdp_frames can be enqueued. But there is a small chance, that xdp_frames remains which have not been flushed/processed yet. Flushing these during teardown, happens from RCU context and not

[PATCH net-next] rds: avoid lock hierarchy violation between m_rs_lock and rs_recv_lock

2018-08-08 Thread Sowmini Varadhan
The following deadlock, reported by syzbot, can occur if CPU0 is in rds_send_remove_from_sock() while CPU1 is in rds_clear_recv_queue() CPU0CPU1 lock(&(>m_rs_lock)->rlock); lock(>rs_recv_lock);

Re: [PATCH net-next] ieee802154: hwsim: fix missing unlock on error in hwsim_add_one()

2018-08-08 Thread Stefan Schmidt
Hello Wei. On 08/08/2018 05:10 AM, Wei Yongjun wrote: > Add the missing unlock before return from function hwsim_add_one() > in the error handling case. > > Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") > Signed-off-by: Wei Yongjun > --- >

Re: [PATCH net-next] ieee802154: hwsim: fix copy-paste error in hwsim_set_edge_lqi()

2018-08-08 Thread Stefan Schmidt
Hello Wei. On 08/08/2018 04:43 AM, Wei Yongjun wrote: > The return value from kzalloc() is not checked correctly. The > test is done against a wrong variable. This patch fix it. > > Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") > Signed-off-by: Wei Yongjun > --- >

Re: [PATCH net-next] ieee802154: hwsim: fix rcu handling

2018-08-08 Thread Stefan Schmidt
Hello David. I want to apologize how the submission of the ieee802154_hwsim driver worked out. The sparse warning finally fixed by this commit came due to an outdated sparse used on our side while kbuild was up to date. I fixed this now and sparse has no warnings for the ieee802154_hwsim driver

[PATCH bpf 0/3] Couple of sockmap fixes

2018-08-08 Thread Daniel Borkmann
On 08/08/2018 09:13 PM, Alexei Starovoitov wrote: > On Wed, Aug 08, 2018 at 07:23:12PM +0200, Daniel Borkmann wrote: >> Two sockmap fixes in bpf_tcp_sendmsg(), and one fix for the >> sockmap kernel selftest. Thanks! > > test_sockmap jumped from 10 to 47 seconds :( Agree, it's unfortunate, but

Re: [PATCH] net: phy: sftp: print debug message with text, not numbers

2018-08-08 Thread Andrew Lunn
On Wed, Aug 08, 2018 at 12:02:56PM -0700, Florian Fainelli wrote: > On 08/08/2018 11:54 AM, Andrew Lunn wrote: > > Convert the state numbers, device state, etc from numbers to strings > > when printing debug messages. > > I had a similar patch locally that I used for initial troubleshooting, >

Re: [PATCH net-next,v4] net/tls: Calculate nsg for zerocopy path without skb_cow_data.

2018-08-08 Thread David Miller
From: Doron Roberts-Kedes Date: Tue, 7 Aug 2018 11:09:39 -0700 > +static int __skb_nsg(struct sk_buff *skb, int offset, int len, > + unsigned int recursion_level) > +{ > + int start = skb_headlen(skb); > + int i, copy = start - offset; > + struct sk_buff *frag_iter;

Re: [PATCH bpf 0/3] Couple of sockmap fixes

2018-08-08 Thread Alexei Starovoitov
On Wed, Aug 08, 2018 at 07:23:12PM +0200, Daniel Borkmann wrote: > Two sockmap fixes in bpf_tcp_sendmsg(), and one fix for the > sockmap kernel selftest. Thanks! test_sockmap jumped from 10 to 47 seconds :( but applied anyway. Thanks

Re: [PATCH] net: phy: sftp: print debug message with text, not numbers

2018-08-08 Thread Florian Fainelli
On 08/08/2018 11:54 AM, Andrew Lunn wrote: > Convert the state numbers, device state, etc from numbers to strings > when printing debug messages. I had a similar patch locally that I used for initial troubleshooting, which I might even have shared with Russell at some point, though now I can't

Re: [PATCH] dsa: slave: eee: Allow ports to use phylink

2018-08-08 Thread Florian Fainelli
On 08/08/2018 11:56 AM, Andrew Lunn wrote: > For a port to be able to use EEE, both the MAC and the PHY must > support EEE. A phy can be provided by both a phydev or phylink. Verify > at least one of these exist, not just phydev. > > Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK support") >

[PATCH] dsa: slave: eee: Allow ports to use phylink

2018-08-08 Thread Andrew Lunn
For a port to be able to use EEE, both the MAC and the PHY must support EEE. A phy can be provided by both a phydev or phylink. Verify at least one of these exist, not just phydev. Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK support") Signed-off-by: Andrew Lunn --- net/dsa/slave.c | 4 ++--

[PATCH] net: phy: sftp: print debug message with text, not numbers

2018-08-08 Thread Andrew Lunn
Convert the state numbers, device state, etc from numbers to strings when printing debug messages. Signed-off-by: Andrew Lunn --- drivers/net/phy/sfp.c | 76 --- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/sfp.c

Re: [PATCH net-next v6 11/11] net: sched: change action API to use array of pointers to actions

2018-08-08 Thread Cong Wang
On Wed, Aug 8, 2018 at 4:41 AM Vlad Buslov wrote: > > > On Tue 07 Aug 2018 at 23:26, Cong Wang wrote: > > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: > >> attr_size = tcf_action_full_attrs_size(attr_size); > >> > >> if (event == RTM_GETACTION) > >> - ret =

Re: [PATCH ethtool 2/3] ethtool: Add support for WAKE_FILTER (WoL using filters)

2018-08-08 Thread Florian Fainelli
On 08/08/2018 11:22 AM, Florian Fainelli wrote: > Add a new character 'f' which can be used to configure an Ethernet > controller to support Wake-on-LAN using filters programmed with the > ethtool::rxnfc and the special action -2 (wake-up filter). This is > useful in particular in the context of

[PATCH iproute2-next] Add SKB Priority qdisc support in tc(8)

2018-08-08 Thread Nishanth Devarajan
sch_skbprio is a qdisc that prioritizes packets according to their skb->priority field. Under congestion, it drops already-enqueued lower priority packets to make space available for higher priority packets. Skbprio was conceived as a solution for denial-of-service defenses that need to route

[PATCH ethtool 3/3] ethtool: Add support for action value -2 (wake-up filter)

2018-08-08 Thread Florian Fainelli
Add the ability to program special filters using ethtool::rxnfc which are meant to be used for wake-up purposes (in conjuction with WAKE_FILTER) using the special action value: -2 (RX_CLS_FLOW_WAKE). Signed-off-by: Florian Fainelli --- rxclass.c | 8 +--- 1 file changed, 5 insertions(+), 3

[PATCH ethtool 2/3] ethtool: Add support for WAKE_FILTER (WoL using filters)

2018-08-08 Thread Florian Fainelli
Add a new character 'f' which can be used to configure an Ethernet controller to support Wake-on-LAN using filters programmed with the ethtool::rxnfc and the special action -2 (wake-up filter). This is useful in particular in the context of devices that must support wake-up on more complex

[PATCH ethtool 1/3] ethtool-copy.h: sync with net-next

2018-08-08 Thread Florian Fainelli
This covers kernel changes up to commit 6cfef793b558: ethtool: Add WAKE_FILTER and RX_CLS_FLOW_WAKE Signed-off-by: Florian Fainelli --- ethtool-copy.h | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ethtool-copy.h b/ethtool-copy.h index

[PATCH ethtool 0/3] ethtool: Wake-on-LAN using filters

2018-08-08 Thread Florian Fainelli
Hi John, This patch series syncs up ethtool-copy.h to get the new definitions required for supporting wake-on-LAN using filters: WAKE_FILTER and RX_CLS_FLOW_WAKE and then updates the rxclass.c code to allow us to specify action -2 (RX_CLS_FLOW_WAKE). Let me know if you would like this to be done

RE: [PATCH net-next v1 1/1] net/tls: Combined memory allocation for decryption request

2018-08-08 Thread Vakul Garg
> -Original Message- > From: Dave Watson [mailto:davejwat...@fb.com] > Sent: Wednesday, August 8, 2018 10:37 PM > To: Vakul Garg > Cc: netdev@vger.kernel.org; bor...@mellanox.com; > avia...@mellanox.com; da...@davemloft.net > Subject: Re: [PATCH net-next v1 1/1] net/tls: Combined

[PATCH net-next v2 0/1] net/tls: Combined memory allocation for decryption request

2018-08-08 Thread Vakul Garg
This patch does a combined memory allocation from heap for scatterlists, aead_request, aad and iv for the tls record decryption path. In present code, aead_request is allocated from heap, scatterlists on a conditional basis are allocated on heap or on stack. This is inefficient as it may requires

[PATCH net-next v2 1/1] net/tls: Combined memory allocation for decryption request

2018-08-08 Thread Vakul Garg
For preparing decryption request, several memory chunks are required (aead_req, sgin, sgout, iv, aad). For submitting the decrypt request to an accelerator, it is required that the buffers which are read by the accelerator must be dma-able and not come from stack. The buffers for aad and iv can be

Re: [PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720

2018-08-08 Thread Dave Taht
On Wed, Aug 8, 2018 at 10:00 AM Andrew Lunn wrote: > > On Wed, Aug 08, 2018 at 05:27:05PM +0200, Marek Behún wrote: > > For some reason on Armada 3720 boards (EspressoBin and Turris Mox) the > > networking driver behaves weirdly when using napi_gro_receive. > > > > For example downloading a big

[PATCH bpf 3/3] bpf, sockmap: fix cork timeout for select due to epipe

2018-08-08 Thread Daniel Borkmann
I ran into the same issue as a009f1f396d0 ("selftests/bpf: test_sockmap, timing improvements") where I had a broken pipe error on the socket due to remote end timing out on select and then shutting down it's sockets while the other side was still sending. We may need to do a bigger rework in

[PATCH bpf 1/3] bpf, sockmap: fix bpf_tcp_sendmsg sock error handling

2018-08-08 Thread Daniel Borkmann
While working on bpf_tcp_sendmsg() code, I noticed that when a sk->sk_err is set we error out with err = sk->sk_err. However this is problematic since sk->sk_err is a positive error value and therefore we will neither go into sk_stream_error() nor will we report an error back to user space. I had

[PATCH bpf 2/3] bpf, sockmap: fix leak in bpf_tcp_sendmsg wait for mem path

2018-08-08 Thread Daniel Borkmann
In bpf_tcp_sendmsg() the sk_alloc_sg() may fail. In the case of ENOMEM, it may also mean that we've partially filled the scatterlist entries with pages. Later jumping to sk_stream_wait_memory() we could further fail with an error for several reasons, however we miss to call free_start_sg() if the

[PATCH bpf 0/3] Couple of sockmap fixes

2018-08-08 Thread Daniel Borkmann
Two sockmap fixes in bpf_tcp_sendmsg(), and one fix for the sockmap kernel selftest. Thanks! Daniel Borkmann (3): bpf, sockmap: fix bpf_tcp_sendmsg sock error handling bpf, sockmap: fix leak in bpf_tcp_sendmsg wait for mem path bpf, sockmap: fix cork timeout for select due to epipe

Re: [PATCH net-next v1 1/1] net/tls: Combined memory allocation for decryption request

2018-08-08 Thread Dave Watson
On 08/08/18 06:36 PM, Vakul Garg wrote: > For preparing decryption request, several memory chunks are required > (aead_req, sgin, sgout, iv, aad). For submitting the decrypt request to > an accelerator, it is required that the buffers which are read by the > accelerator must be dma-able and not

Re: [PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720

2018-08-08 Thread Andrew Lunn
On Wed, Aug 08, 2018 at 05:27:05PM +0200, Marek Behún wrote: > For some reason on Armada 3720 boards (EspressoBin and Turris Mox) the > networking driver behaves weirdly when using napi_gro_receive. > > For example downloading a big file from a local network (low ping) is > fast, but when

Re: [PATCH iproute2] ip link: don't stop batch processing

2018-08-08 Thread Stephen Hemminger
On Fri, 3 Aug 2018 19:49:33 +0200 Matteo Croce wrote: > When 'ip link show dev DEVICE' is processed in a batch mode, ip exits > and stop processing further commands. > This because ipaddr_list_flush_or_save() calls exit() to avoid printing > the link information twice. > Replace the exit with a

Re: [PATCH iproute2] ip link: don't stop batch processing

2018-08-08 Thread Stephen Hemminger
On Fri, 3 Aug 2018 11:08:58 -0700 Dave Taht wrote: > On Fri, Aug 3, 2018 at 10:50 AM Matteo Croce wrote: > > > > When 'ip link show dev DEVICE' is processed in a batch mode, ip exits > > and stop processing further commands. > > This because ipaddr_list_flush_or_save() calls exit() to avoid

RE: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Ben Whitten
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add > register, bit-fields, and helpers for regmap > > Am 08.08.2018 um 14:32 schrieb Ben Whitten: > >>> drivers/net/lora/Kconfig | 1 + > >>> drivers/net/lora/sx1301.c | 282 > >> +++- > -- > >>>

[PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720

2018-08-08 Thread Marek Behún
For some reason on Armada 3720 boards (EspressoBin and Turris Mox) the networking driver behaves weirdly when using napi_gro_receive. For example downloading a big file from a local network (low ping) is fast, but when downloading from a remote server (higher ping), the download speed is at first

Re: [Intel-wired-lan] e1000e driver stuck at 10Mbps after reconnection

2018-08-08 Thread Neftin, Sasha
On 8/8/2018 17:24, Neftin, Sasha wrote: On 8/7/2018 09:42, Camille Bordignon wrote: Le lundi 06 août 2018 à 15:45:29 (-0700), Alexander Duyck a écrit : On Mon, Aug 6, 2018 at 4:59 AM, Camille Bordignon wrote: Hello, Recently we experienced some issues with intel NIC (I219-LM and I219-V).

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-08 Thread Marcelo Ricardo Leitner
On Mon, Aug 06, 2018 at 09:34:05AM +, David Laight wrote: > From: Michael Tuexen > > Sent: 03 August 2018 21:57 > ... > > >> Given how useless SCTP streams are, does anything actually use > > >> more than about 4? > > > > > > Maybe Michael can help us with that. I'm also curious now. > > In

Re: [Intel-wired-lan] e1000e driver stuck at 10Mbps after reconnection

2018-08-08 Thread Neftin, Sasha
On 8/7/2018 09:42, Camille Bordignon wrote: Le lundi 06 août 2018 à 15:45:29 (-0700), Alexander Duyck a écrit : On Mon, Aug 6, 2018 at 4:59 AM, Camille Bordignon wrote: Hello, Recently we experienced some issues with intel NIC (I219-LM and I219-V). It seems that after a wire reconnection,

Re: [PATCH net-next 13/14] net: core: add new/replace rate estimator lock parameter

2018-08-08 Thread Marcelo Ricardo Leitner
On Wed, Aug 08, 2018 at 03:30:41PM +0300, Vlad Buslov wrote: > On Wed 08 Aug 2018 at 01:37, Marcelo Ricardo Leitner > wrote: > > On Mon, Aug 06, 2018 at 09:54:24AM +0300, Vlad Buslov wrote: > >> Extend rate estimator 'new' and 'replace' APIs with additional spinlock > >> parameter to be used by

Re: Is it currently possible to connect SFP to dsa port?

2018-08-08 Thread Andrew Lunn
> Let me know when you have the first version ready, I will try it. Our > router can connect SFP board directly to the CPU board, or there may up > to three mv88e6190 switch boards between SFP board and cpu board. So you are using D in DSA? The board i'm using has two SFF modules, both on the

Re: [PATCH] net: ethernet: cpsw-phy-sel: prefer phandle for phy sel and update binding

2018-08-08 Thread Tony Lindgren
* Andrew Lunn [180808 12:02]: > > +++ b/Documentation/devicetree/bindings/net/cpsw.txt > > @@ -19,6 +19,9 @@ Required properties: > > - slaves : Specifies number for slaves > > - active_slave : Specifies the slave to use for time stamping, > > ethtool

Re: Is it currently possible to connect SFP to dsa port?

2018-08-08 Thread Russell King - ARM Linux
On Wed, Aug 08, 2018 at 03:00:13PM +0200, Marek Behún wrote: > Btw: some SFP modules can operate in 2500BASE-X mode. Currently the SFP > driver does not support this, and there even isn't code in the > mainline kernel for mvneta to switch to 2500BASEX. On Armada 3720 this > has to be done by

Re: [PATCH iproute2] tc: bpf: update list of archs with eBPF support in manpage

2018-08-08 Thread Daniel Borkmann
On 08/08/2018 02:33 PM, Tobias Klauser wrote: > Update the list of architectures supporting eBPF JIT as of Linux 4.18. > Also mention the Linux version where support for a particular > architecture was introduced. Finally, reformat the list of architectures > as a bullet list in order to make it

Re: Is it currently possible to connect SFP to dsa port?

2018-08-08 Thread Marek Behún
On Tue, 7 Aug 2018 21:58:20 +0200 Andrew Lunn wrote: > Hi Marek > > I'm currently working on exactly this! > > My primary aim is to allow SFP on ports 9 and 10. ports 2-7 can also > be connected to SFPs, but that is a bit harder, so it is going to take > me a little longer. > > I hope i can

Re: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Andreas Färber
Am 08.08.2018 um 14:32 schrieb Ben Whitten: >>> drivers/net/lora/Kconfig | 1 + >>> drivers/net/lora/sx1301.c | 282 >> +++--- >>> drivers/net/lora/sx1301.h | 169 >> +++ >>> 3 files changed, 439 insertions(+), 13 deletions(-) >>>

[PATCH iproute2] tc: bpf: update list of archs with eBPF support in manpage

2018-08-08 Thread Tobias Klauser
Update the list of architectures supporting eBPF JIT as of Linux 4.18. Also mention the Linux version where support for a particular architecture was introduced. Finally, reformat the list of architectures as a bullet list in order to make it more readable. Signed-off-by: Tobias Klauser ---

[PATCH] net: dsa: rtl8366rb: Support port 4 (WAN)

2018-08-08 Thread Linus Walleij
The totally undocumented IO mode needs to be set to enumerator 0 to enable port 4 also known as WAN in most configurations, for ordinary traffic. The 3 bits in the register come up as 010 after reset, but need to be set to 000. The Realtek source code contains a name for these bits, but no

RE: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Ben Whitten
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add > register, bit-fields, and helpers for regmap > > Am 07.08.2018 um 19:32 schrieb Ben Whitten: > > From: Ben Whitten > > > > The register and bit-field definitions are taken from the > SX1301 > > datasheet version 2.01 dated June 2014

Re: [PATCH net-next 13/14] net: core: add new/replace rate estimator lock parameter

2018-08-08 Thread Vlad Buslov
On Wed 08 Aug 2018 at 01:37, Marcelo Ricardo Leitner wrote: > On Mon, Aug 06, 2018 at 09:54:24AM +0300, Vlad Buslov wrote: >> Extend rate estimator 'new' and 'replace' APIs with additional spinlock >> parameter to be used by rtnl-unlocked actions to protect rate_est pointer >> from concurrent

Re: [PATCH net-next 5/5] net: aquantia: bump driver version

2018-08-08 Thread Andrew Lunn
On Wed, Aug 08, 2018 at 01:57:15PM +0300, Igor Russkikh wrote: > Signed-off-by: Igor Russkikh > --- > drivers/net/ethernet/aquantia/atlantic/ver.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/aquantia/atlantic/ver.h >

[PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-08 Thread Anssi Hannula
macb_close() calls macb_reset_hw() which zeroes NCR register, including the MPE (Management Port Enable) bit. This will prevent accessing any other PHYs for other Ethernet MACs on the MDIO bus which is still registered. Fix that by keeping the MPE bit set. Signed-off-by: Anssi Hannula ---

Re: [PATCH net-next 4/5] net: aquantia: implement EEE support

2018-08-08 Thread Andrew Lunn
> +static int aq_ethtool_get_eee(struct net_device *ndev, struct ethtool_eee > *eee) > +{ > + struct aq_nic_s *aq_nic = netdev_priv(ndev); > + int err = 0; > + > + u32 rate, supported_rates; Please keep all local variables together and sort them as reverse christmas tree. This should

RE: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-08 Thread Ben Whitten
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add > register, bit-fields, and helpers for regmap > > Am 07.08.2018 um 19:32 schrieb Ben Whitten: > > diff --git a/drivers/net/lora/sx1301.c > b/drivers/net/lora/sx1301.c > > index 5342b61..49958f0 100644 > > ---

Re: [PATCH net-next 3/5] net: aquantia: implement WOL support

2018-08-08 Thread Andrew Lunn
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c > +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c > @@ -889,11 +889,13 @@ void aq_nic_deinit(struct aq_nic_s *self) > self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) > aq_vec_deinit(aq_vec); > > - if

Re: [PATCH net-next 2/5] net: aquantia: definitions for WOL patch

2018-08-08 Thread Andrew Lunn
> -struct __packed hw_aq_atl_utils_fw_rpc { > +struct __packed hw_atl_utils_fw_rpc { > u32 msg_id; Hi Igor There is no explanation given as to why you decided to rename this structure. Please do the rename as a standalone patch, no functionality change. That makes it easier to review the

Re: [PATCH net-next v6 10/11] net: sched: atomically check-allocate action

2018-08-08 Thread Vlad Buslov
On Wed 08 Aug 2018 at 01:20, Cong Wang wrote: > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: >> >> Implement function that atomically checks if action exists and either takes >> reference to it, or allocates idr slot for action index to prevent >> concurrent allocations of actions with

[patch net-next] net: sched: fix block->refcnt decrement

2018-08-08 Thread Jiri Pirko
From: Jiri Pirko Currently the refcnt is never decremented in case the value is not 1. Fix it by adding decrement in case the refcnt is not 1. Reported-by: Vlad Buslov Fixes: f71e0ca4db18 ("net: sched: Avoid implicit chain 0 creation") Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 2 ++

Re: [PATCH net-next 1/5] net: aquantia: fix hw_atl_utils_fw_upload_dwords

2018-08-08 Thread Andrew Lunn
On Wed, Aug 08, 2018 at 01:57:11PM +0300, Igor Russkikh wrote: > From: Yana Esina > > This patch fixes the upload function, which worked incorrectly with > some chips. Hi Igor This patch contains a few whitespace changes. It is normal to put them into a separate patch. Thanks Andrew

Re: [PATCH] net: ethernet: cpsw-phy-sel: prefer phandle for phy sel and update binding

2018-08-08 Thread Andrew Lunn
> +++ b/Documentation/devicetree/bindings/net/cpsw.txt > @@ -19,6 +19,9 @@ Required properties: > - slaves : Specifies number for slaves > - active_slave : Specifies the slave to use for time stamping, > ethtool and SIOCGMIIPHY > +- cpsw-phy-sel

Re: [PATCH net-next v6 11/11] net: sched: change action API to use array of pointers to actions

2018-08-08 Thread Vlad Buslov
On Tue 07 Aug 2018 at 23:26, Cong Wang wrote: > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: >> attr_size = tcf_action_full_attrs_size(attr_size); >> >> if (event == RTM_GETACTION) >> - ret = tcf_get_notify(net, portid, n, , event, >> extack); >> +

lock recursion - was: Re: [4.18 rc7] BUG: sleeping function called from invalid context at mm/slab.h:421

2018-08-08 Thread Petr Mladek
On Wed 2018-08-08 11:05:00, Vlastimil Babka wrote: > On 08/08/2018 11:01 AM, Vlastimil Babka wrote: > > fbcon_startup() calls kzalloc(sizeof(struct fbcon_ops), GFP_KERNEL) so > > it tells slab it can sleep. The problem must be higher in the stack, > > CCing printk people. > > Uh just noticed

Re: [PATCH net-next 12/14] net: sched: act_mirred: remove dependency on rtnl lock

2018-08-08 Thread Vlad Buslov
On Wed 08 Aug 2018 at 08:54, Jiri Pirko wrote: > Wed, Aug 08, 2018 at 10:47:04AM CEST, vla...@mellanox.com wrote: >> >>On Wed 08 Aug 2018 at 08:03, Jiri Pirko wrote: >>> Wed, Aug 08, 2018 at 09:40:35AM CEST, vla...@mellanox.com wrote: On Tue 07 Aug 2018 at 16:36, Jiri Pirko wrote:

[PATCH net] net: aquantia: Fix IFF_ALLMULTI flag functionality

2018-08-08 Thread Igor Russkikh
From: Dmitry Bogdanov It was noticed that NIC always pass all multicast traffic to the host regardless of IFF_ALLMULTI flag on the interface. The rule in MC Filter Table in NIC, that is configured to accept any multicast packets, is turning on if IFF_MULTICAST flag is set on the interface. It

[PATCH net-next 2/5] net: aquantia: definitions for WOL patch

2018-08-08 Thread Igor Russkikh
From: Yana Esina Added definitions and structures needed to support WOL. Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 4 +-

[PATCH net-next 5/5] net: aquantia: bump driver version

2018-08-08 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/ver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/ver.h b/drivers/net/ethernet/aquantia/atlantic/ver.h index 94efc64..b482601 100644 ---

  1   2   >