Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-14 Thread Xin Long
On Thu, Nov 15, 2018 at 3:33 PM David Ahern wrote: > > On 11/14/18 11:03 AM, David Ahern wrote: > > On 11/13/18 8:48 AM, Xin Long wrote: > >> These is no need to hold dst before calling rt6_remove_exception_rt(). > >> The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), > >>

Re: [PATCH v3 net-next 0/4] net: batched receive in GRO path

2018-11-14 Thread Eric Dumazet
On 11/14/2018 10:07 AM, Edward Cree wrote: > > Conclusion: > * TCP b/w is 16.5% faster for traffic which cannot be coalesced by GRO. > But only for traffic that actually was perfect GRO candidate, right ? Now what happens if all the packets you are batching are hitting different TCP sockets

Re: [PATCH net] l2tp: fix a sock refcnt leak in l2tp_tunnel_register

2018-11-14 Thread David Miller
From: Xin Long Date: Tue, 13 Nov 2018 01:08:25 +0800 > This issue happens when trying to add an existent tunnel. It > doesn't call sock_put() before returning -EEXIST to release > the sock refcnt that was held by calling sock_hold() before > the existence check. > > This patch is to fix it by

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-14 Thread Eric Dumazet
On 09/13/2018 10:29 AM, Davide Caratti wrote: > use RCU instead of spinlocks, to protect concurrent read/write on > act_police configuration. This reduces the effects of contention in the > data path, in case multiple readers are present. > > Signed-off-by: Davide Caratti > --- >

Re: [patch net-next] net: 8021q: move vlan offload registrations into vlan_core

2018-11-14 Thread David Ahern
On 11/13/18 2:22 PM, Jiri Pirko wrote: > From: Jiri Pirko > > Currently, the vlan packet offloads are registered only upon 8021q module > load. However, even without this module loaded, the offloads could be > utilized, for example by openvswitch datapath. As reported by Michael, > that causes

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-14 Thread David Ahern
On 11/14/18 11:03 AM, David Ahern wrote: > On 11/13/18 8:48 AM, Xin Long wrote: >> These is no need to hold dst before calling rt6_remove_exception_rt(). >> The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), >> which has been removed in Commit 93531c674315 ("net/ipv6: separate

[PATCH net-next 2/7] net: sched: gred: pass extack to nla_parse_nested()

2018-11-14 Thread Jakub Kicinski
In case netlink wants to provide parsing error pass extack to nla_parse_nested(). Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- net/sched/sch_gred.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index

[PATCH net-next 6/7] net: sched: gred: store red flags per virtual queue

2018-11-14 Thread Jakub Kicinski
Right now ECN marking and HARD drop (the common RED flags) can only be configured for the entire Qdisc. In preparation for per-vq flags store the values in the virtual queue structure. Setting per-vq flags will only be allowed when no flags are set for the entire Qdisc. For the new flags we will

[PATCH net-next 3/7] net: sched: gred: use extack to provide more details on configuration errors

2018-11-14 Thread Jakub Kicinski
Add extack messages to -EINVAL errors, to help users identify their mistakes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- net/sched/sch_gred.c | 44 +--- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/net/sched/sch_gred.c

[PATCH net-next 1/7] net: sched: gred: separate error and non-error path in gred_change()

2018-11-14 Thread Jakub Kicinski
We will soon want to add more code to the non-error path, separate it from the error handling flow. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- net/sched/sch_gred.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/sched/sch_gred.c

[PATCH net-next 5/7] net: sched: gred: provide a better structured dump and expose stats

2018-11-14 Thread Jakub Kicinski
Currently all GRED's virtual queue data is dumped in a single array in a single attribute. This makes it pretty much impossible to add new fields. In order to expose more detailed stats add a new set of attributes. We can now expose the 64 bit value of bytesin and all the mark stats which were

[PATCH net-next 7/7] net: sched: gred: allow manipulating per-DP RED flags

2018-11-14 Thread Jakub Kicinski
Allow users to set and dump RED flags (ECN enabled and harddrop) on per-virtual queue basis. Validation of attributes is split from changes to make sure we won't have to undo previous operations when we find out configuration is invalid. The objective is to allow changing per-Qdisc parameters

[PATCH net-next 0/7] net: sched: gred: introduce per-virtual queue attributes

2018-11-14 Thread Jakub Kicinski
Hi! This series updates the GRED Qdisc. The Qdisc matches nfp offload very well, but before we can offload it there are a number of improvements to make. First few patches add extack messages to the Qdisc and pass extack to netlink validation. Next a new netlink attribute group is added, to

[PATCH net-next 4/7] net: sched: gred: store bytesin as a 64 bit value

2018-11-14 Thread Jakub Kicinski
32 bit counters for bytes are not really going to last long in modern world. Make sch_gred count bytes on a 64 bit counter. It will still get truncated during dump but follow up patch will add set of new stat dump attributes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley ---

SHIPMENT DELIVERY

2018-11-14 Thread David Jim Brown
Attention, I am Mr. David Jim Brown, Head Officer-in-Charge, Administrative Service Inspection Unit United Nations Inspection Agency in Hartsfield-Jackson International Airport Atlanta, Georgia. During our investigation, I discovered an abandoned shipment through a Diplomat from United

Re: [PATCH net-next 6/8] net: eth: altera: tse: add support for ptp and timestamping

2018-11-14 Thread Richard Cochran
On Wed, Nov 14, 2018 at 04:50:45PM -0800, Dalon Westergreen wrote: > From: Dalon Westergreen > > Add support for the ptp clock used with the tse, and update > the driver to support timestamping when enabled. We also > enable debugfs entries for the ptp clock to allow some user > control and

[PATCH net-next] selftests: add explicit test for multiple concurrent GRO sockets

2018-11-14 Thread Paolo Abeni
This covers for proper accounting of encap needed static keys Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/udpgro.sh | 34 +++ 1 file changed, 34 insertions(+) diff --git a/tools/testing/selftests/net/udpgro.sh b/tools/testing/selftests/net/udpgro.sh

[PATCH ipsec-next] xfrm: policy: fix netlink/pf_key policy lookups

2018-11-14 Thread Florian Westphal
Colin Ian King says: Static analysis with CoverityScan found a potential issue [..] It seems that pointer pol is set to NULL and then a check to see if it is non-null is used to set pol to tmp; howeverm this check is always going to be false because pol is always NULL. Fix this and update

[PATCH net-next] udp: fix jump label misuse

2018-11-14 Thread Paolo Abeni
The commit 60fb9567bf30 ("udp: implement complete book-keeping for encap_needed") introduced a severe misuse of jump label APIs, which syzbot, as reported by Eric, was able to exploit. When multiple sockets/process can concurrently request (and than disable) the udp encap, we need to track the

[PATCH net-next v1 3/4] etf: Split timersortedlist_erase()

2018-11-14 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia This is just a refactor that will simplify the implementation of the next patch in this series which will drop all expired packets on the dequeue flow. Signed-off-by: Jesus Sanchez-Palencia --- net/sched/sch_etf.c | 44 +---

[PATCH net-next v1 1/4] etf: Cancel timer if there are no pending skbs

2018-11-14 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia There is no point in firing the qdisc watchdog if there are no future skbs pending in the queue and the watchdog had been set previously. Signed-off-by: Jesus Sanchez-Palencia --- net/sched/sch_etf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH net-next v1 4/4] etf: Drop all expired packets

2018-11-14 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia Currently on dequeue() ETF only drops the first expired packet, which causes a problem if the next packet is already expired. When this happens, the watchdog will be configured with a time in the past, fire straight way and the packet will finally be dropped once the

[PATCH net-next v1 2/4] etf: Use cached rb_root

2018-11-14 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia ETF's peek() operation is heavily used so use an rb_root_cached instead and leverage rb_first_cached() which will run in O(1) instead of O(log n). Even if on 'timesortedlist_clear()' we could be using rb_erase(), we choose to use rb_erase_cached(), because if in the

[PATCH net-next 5/8] net: eth: altera: tse: Move common functions to altera_utils

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen Move request_and_map and other shared functions to altera_utils. This is the first step to moving common code out of tse specific code so that it can be shared with future altera ethernet ip. Signed-off-by: Dalon Westergreen --- drivers/net/ethernet/altera/altera_tse.h

[PATCH net-next 8/8] net: eth: altera: tse: update devicetree bindings documentation

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen Update devicetree bindings documentation to include msgdma prefetcher and ptp bindings. Signed-off-by: Dalon Westergreen --- .../devicetree/bindings/net/altera_tse.txt| 98 +++ 1 file changed, 79 insertions(+), 19 deletions(-) diff --git

[PATCH net-next 7/8] net: eth: altera: tse: add msgdma prefetcher

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen Add support for the mSGDMA prefetcher. The prefetcher adds support for a linked list of descriptors in system memory. The prefetcher feeds these to the mSGDMA dispatcher. The prefetcher is configured to poll for the next descriptor in the list to be owned by hardware,

[PATCH net-next 4/8] net: eth: altera: tse: add optional function to start tx dma

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen Allow for optional start up of tx dma if the start_txdma function is defined in altera_dmaops. Signed-off-by: Dalon Westergreen --- drivers/net/ethernet/altera/altera_tse.h | 1 + drivers/net/ethernet/altera/altera_tse_main.c | 5 + 2 files changed, 6

[PATCH net-next 6/8] net: eth: altera: tse: add support for ptp and timestamping

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen Add support for the ptp clock used with the tse, and update the driver to support timestamping when enabled. We also enable debugfs entries for the ptp clock to allow some user control and interaction with the ptp clock. Signed-off-by: Dalon Westergreen ---

[PATCH net-next 0/8] net: eth: altera: tse: Add PTP and mSGDMA prefetcher

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen This patch series cleans up the Altera TSE driver and adds support for the newer msgdma prefetcher as well as ptp support when using the msgdma prefetcher. Dalon Westergreen (8): net: eth: altera: tse_start_xmit ignores tx_buffer call response net: eth: altera: set

[PATCH net-next 3/8] net: eth: altera: tse: fix altera_dmaops declaration

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen The declaration of struct altera_dmaops does not have identifier names. Add identifier names to confrom with required coding styles. Signed-off-by: Dalon Westergreen --- drivers/net/ethernet/altera/altera_tse.h | 30 +--- 1 file changed, 16

[PATCH net-next 2/8] net: eth: altera: set rx and tx ring size before init_dma call

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen It is more appropriate to set the rx and tx ring size before calling the init function for the dma. Signed-off-by: Dalon Westergreen --- drivers/net/ethernet/altera/altera_tse_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH net-next 1/8] net: eth: altera: tse_start_xmit ignores tx_buffer call response

2018-11-14 Thread Dalon Westergreen
From: Dalon Westergreen The return from tx_buffer call in tse_start_xmit is inapropriately ignored. tse_buffer calls should return 0 for success or NETDEV_TX_BUSY. tse_start_xmit should return not report a successful transmit when the tse_buffer call returns an error condition. In addition to

RE: [Intel-wired-lan] [PATCH net] igb: fix uninitialized variables

2018-11-14 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of wangyunjian > Sent: Tuesday, November 6, 2018 12:27 AM > To: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Cc: stone.z...@huawei.com; Yunjian Wang > Subject: [Intel-wired-lan] [PATCH net] igb: fix

[net-next 09/14] i40e: always set ks->base.speed in i40e_get_settings_link_up

2018-11-14 Thread Jeff Kirsher
From: Jacob Keller In i40e_get_settings_link_up, set ks->base.speed to SPEED_UNKNOWN in the case where we don't know the link speed. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 + 1 file changed, 1

[net-next 03/14] i40e: Add capability flag for stopping FW LLDP

2018-11-14 Thread Jeff Kirsher
From: Krzysztof Galazka Add HW capability flag to indicate that firmware supports stopping LLDP agent. This feature has been added in FW API 1.7 for XL710 devices and 1.6 for X722. Also raise expected minor version number for X722 FW API to 6. Signed-off-by: Krzysztof Galazka Tested-by: Andrew

[net-next 05/14] i40e: Protect access to VF control methods

2018-11-14 Thread Jeff Kirsher
From: Jan Sokolowski A scenario has been found in which simultaneous addition/removal and modification of VF's might cause unstable behaviour, up to and including kernel panics. Protect the methods that create/modify/destroy VF's by locking them behind an atomically set bit in PF status

[net-next 02/14] i40e: Use a local variable for readability

2018-11-14 Thread Jeff Kirsher
From: Jan Sokolowski Use a local variable to make the code a bit more readable. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[net-next 08/14] i40e: don't restart nway if autoneg not supported

2018-11-14 Thread Jeff Kirsher
From: Mitch Williams On link types that do not support autoneg, we cannot attempt to restart nway negotiation. This results in a dead link that requires a power cycle to remedy. Fix this by saving off the autoneg state and checking this value before we try to restart nway. Signed-off-by: Mitch

[net-next 10/14] virtchnl: white space and reorder

2018-11-14 Thread Jeff Kirsher
From: Alice Michael White space change. Move the check on the virtchnl_vsi_queue_config_info struct to be close to the struct like all the other similar checks. This keeps it clearer and easier to read. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 11/14] virtchnl: Fix off by one error

2018-11-14 Thread Jeff Kirsher
From: Alice Michael When calculating the valid length for a VIRTCHNL_OP_ENABLE_CHANNELS message, we accidentally allowed messages with one extra virtchnl_channel_info structure on the end. This happened due to an off by one error, because we forgot that valid_len already accounted for one

[net-next 01/14] i40e: Replace spin_is_locked() with lockdep

2018-11-14 Thread Jeff Kirsher
From: Lance Roy lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher

[net-next 07/14] i40e: Allow disabling FW LLDP on X722 devices

2018-11-14 Thread Jeff Kirsher
From: Patryk Małek This patch allows disabling FW LLDP agent on X722 devices. It also changes a source of information for this feature from pf->hw_features to pf->hw.flags which are set in i40e_init_adminq. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 06/14] i40e: update driver version

2018-11-14 Thread Jeff Kirsher
From: Alice Michael The version numbers have not been kept up to date and this is an effort to ammend that. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[net-next 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2018-11-14

2018-11-14 Thread Jeff Kirsher
This series contains updates to i40e and virtchnl. Lance Roy updates i40e to use lockdep_assert_held() instead of spin_is_locked(), since it is better suited to check locking requirements. Jan improves the code readability in XDP by adding the use of a local variable. Provides protection on

[net-next 12/14] i40e: Use correct shift for VLAN priority

2018-11-14 Thread Jeff Kirsher
From: Richard Rodriguez When using port VLAN, for VFs, and setting priority bits, the device was sending out incorrect priority bits, and also setting the CFI bit incorrectly. To fix this, changed shift and mask bit definition for this function, to use the correct ones. Signed-off-by: Richard

[net-next 14/14] i40e: prevent overlapping tx_timeout recover

2018-11-14 Thread Jeff Kirsher
From: Alan Brady If a TX hang occurs, we attempt to recover by incrementally resetting. If we're starved for CPU time, it's possible the reset doesn't actually complete (or even fire) before another tx_timeout fires causing us to fly through the different resets without actually doing them.

[net-next 04/14] i40e: Replace strncpy with strlcpy to ensure null termination

2018-11-14 Thread Jeff Kirsher
From: Patryk Małek Using strncpy allows destination buffer to be not null terminated after the copying takes place. strlcpy ensures that's not the case by explicitly setting last element in the buffer as '\0'. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher

[net-next 13/14] i40e: suppress bogus error message

2018-11-14 Thread Jeff Kirsher
From: Mitch Williams The i40e driver complains about unprivileged VFs trying to configure promiscuous mode each time a VF reset occurs. This isn't the fault of the poor VF driver - the PF driver itself is making the request. To fix this, skip the privilege check if the request is to disable all

Re: xfrm: policy: add inexact policy search tree infrastructure

2018-11-14 Thread Florian Westphal
Colin Ian King wrote: > Hi, > > Static analysis with CoverityScan found a potential issue with the commit: > > commit 6be3b0db6db82cf056a72cc18042048edd27f8ee > Author: Florian Westphal > Date: Wed Nov 7 23:00:37 2018 +0100 > > xfrm: policy: add inexact policy search tree infrastructure

re: xfrm: policy: add inexact policy search tree infrastructure

2018-11-14 Thread Colin Ian King
Hi, Static analysis with CoverityScan found a potential issue with the commit: commit 6be3b0db6db82cf056a72cc18042048edd27f8ee Author: Florian Westphal Date: Wed Nov 7 23:00:37 2018 +0100 xfrm: policy: add inexact policy search tree infrastructure It seems that pointer pol is set to

[PATCH AUTOSEL 4.18 57/59] net: qualcomm: rmnet: Fix incorrect assignment of real_dev

2018-11-14 Thread Sasha Levin
From: Subash Abhinov Kasiviswanathan [ Upstream commit d02854dc1999ed3e7fd79ec700c64ac23ac0c458 ] A null dereference was observed when a sysctl was being set from userspace and rmnet was stuck trying to complete some actions in the NETDEV_REGISTER callback. This is because the real_dev is set

Re: [PATCH net] net/sched: act_pedit: fix memory leak when IDR allocation fails

2018-11-14 Thread Cong Wang
(Cc'ing Jamal) On Wed, Nov 14, 2018 at 3:26 AM Davide Caratti wrote: > > tcf_idr_check_alloc() can return a negative value, on allocation failures > (-ENOMEM) or IDR exhaustion (-ENOSPC): don't leak keys_ex in these cases. I think the comments above tcf_idr_check_alloc() need to improve too,

Re: [RFC v1 3/3] vxlan: handle underlay VRF changes

2018-11-14 Thread David Ahern
On 11/14/18 1:31 AM, Alexis Bauvin wrote: > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > index 7477b5510a04..188c0cdb8838 100644 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -208,6 +208,18 @@ static inline struct vxlan_rdst > *first_remote_rtnl(struct vxlan_fdb *fdb) >

Re: [RFC v1 2/3] vxlan: add support for underlay in non-default VRF

2018-11-14 Thread David Ahern
you are making this more specific than it needs to be On 11/14/18 1:31 AM, Alexis Bauvin wrote: > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > index 27bd586b94b0..7477b5510a04 100644 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -208,11 +208,23 @@ static inline

Re: [iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-14 Thread Stephen Hemminger
On Wed, 14 Nov 2018 11:52:51 +0100 Phil Sutter wrote: > Hi Stephen, > > On Tue, Nov 13, 2018 at 02:47:59PM -0800, Stephen Hemminger wrote: > > On Tue, 13 Nov 2018 16:12:01 +0100 > > Phil Sutter wrote: > > > > > + if (arg[0] == '-') { > > > + inv = true; > > > + arg++; > > >

Re: [iproute PATCH] ip-route: Fix nexthop encap parsing

2018-11-14 Thread Stephen Hemminger
On Tue, 13 Nov 2018 13:39:04 +0100 Phil Sutter wrote: > When parsing nexthop parameters, a buffer of 4k bytes is provided. Yet, > in lwt_parse_encap() and some functions called by it, buffer size was > assumed to be 1k despite the actual size was provided. This led to > spurious buffer size

Re: [iproute PATCH] man: ip-route.8: Document nexthop limit

2018-11-14 Thread Stephen Hemminger
On Mon, 12 Nov 2018 23:21:01 +0100 Phil Sutter wrote: > Add a note to 'nexthop' description stating the maximum number of > nexthops per command and pointing at 'append' command as a workaround. > > Signed-off-by: Phil Sutter Applied

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-14 Thread David Ahern
On 11/13/18 8:48 AM, Xin Long wrote: > These is no need to hold dst before calling rt6_remove_exception_rt(). > The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), > which has been removed in Commit 93531c674315 ("net/ipv6: separate > handling of FIB entries from dst based

[PATCH net-next] nxp: fix trivial comment typo

2018-11-14 Thread Andrea Claudi
s/rxfliterctrl/rxfilterctrl Signed-off-by: Andrea Claudi --- drivers/net/ethernet/nxp/lpc_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index bd8695a4faaa..89d17399fb5a 100644 ---

[PATCH v3 net-next 4/4] net/core: handle GRO_NORMAL skbs as a list in napi_gro_receive_list

2018-11-14 Thread Edward Cree
Allows GRO-using drivers to get the benefits of batching for non-GROable traffic. Signed-off-by: Edward Cree --- net/core/dev.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 35427167f6fb..65bfe28fbc81 100644 ---

[PATCH v3 net-next 3/4] net: make listified RX functions return number of good packets

2018-11-14 Thread Edward Cree
'Good' packets are defined as skbs for which netif_receive_skb() would have returned %NET_RX_SUCCESS. Thus, drivers can use this number for adaptive interrupt moderation where they previously reacted to the return code from netif_receive_skb(). Signed-off-by: Edward Cree ---

[PATCH v3 net-next 2/4] sfc: use batched receive for GRO

2018-11-14 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c| 11 +-- drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/rx.c | 16 +--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c

[PATCH v3 net-next 1/4] net: introduce list entry point for GRO

2018-11-14 Thread Edward Cree
Also export napi_frags_skb() so that drivers using the napi_gro_frags() interface can prepare their SKBs properly for submitting on such a list. Signed-off-by: Edward Cree --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 28 +++- 2 files changed, 29

[PATCH v3 net-next 0/4] net: batched receive in GRO path

2018-11-14 Thread Edward Cree
This series listifies part of GRO processing, in a manner which allows those packets which are not GROed (i.e. for which dev_gro_receive returns GRO_NORMAL) to be passed on to the listified regular receive path. dev_gro_receive() itself is not listified, nor the per-protocol GRO callback, since

Re: [RFC v1 1/3] udp_tunnel: add config option to bind to a device

2018-11-14 Thread Alexis Bauvin
Le 14 nov. 2018 à 17:07, Nicolas Dichtel a écrit : > Le 14/11/2018 à 10:31, Alexis Bauvin a écrit : >> UDP tunnel sockets are always opened unbound to a specific device. This >> patch allow the socket to be bound on a custom device, which >> incidentally makes UDP tunnels VRF-aware if binding to

Re: [PATCH net-next 00/13] nfp: abm: track all Qdiscs

2018-11-14 Thread David Miller
From: Jakub Kicinski Date: Mon, 12 Nov 2018 14:58:06 -0800 > Our Qdisc offload so far has been very simplistic. We held > and array of marking thresholds and statistics sized to the > number of PF queues. This was sufficient since the only > configuration we supported was single layer of RED

Re: [PATCH net-next v2 0/6] net: aquantia: add rx-flow filter support

2018-11-14 Thread David Miller
From: Igor Russkikh Date: Mon, 12 Nov 2018 15:45:56 + > In this patchset the rx-flow filters functionality and vlan filter offloads > are implemented. > > The rules in NIC hardware have fixed order and priorities. > To support this, the locations of filters from ethtool perspective are also

Re: [PATCH net-next 17/17] net: sched: unlock rules update API

2018-11-14 Thread Vlad Buslov
On Wed 14 Nov 2018 at 06:44, Jiri Pirko wrote: > Tue, Nov 13, 2018 at 02:46:54PM CET, vla...@mellanox.com wrote: >>On Mon 12 Nov 2018 at 17:30, David Miller wrote: >>> From: Vlad Buslov >>> Date: Mon, 12 Nov 2018 09:55:46 +0200 >>> Register netlink protocol handlers for message types

Re: [RFC v1 1/3] udp_tunnel: add config option to bind to a device

2018-11-14 Thread Nicolas Dichtel
Le 14/11/2018 à 10:31, Alexis Bauvin a écrit : > UDP tunnel sockets are always opened unbound to a specific device. This > patch allow the socket to be bound on a custom device, which > incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. > > Signed-off-by: Alexis Bauvin >

Re: [PATCHv2 net-next 1/4] sctp: define subscribe in sctp_sock as __u16

2018-11-14 Thread Xin Long
On Wed, Nov 14, 2018 at 2:16 AM Neil Horman wrote: > > On Tue, Nov 13, 2018 at 02:24:53PM +0800, Xin Long wrote: > > > > /* Default Peer Address Parameters. These defaults can > >* be modified via SCTP_PEER_ADDR_PARAMS > > @@ -5267,14 +5274,24 @@ static int

[PATCH net] qed: Fix qed compilation issue when CONFIG_QED_RDMA not defined

2018-11-14 Thread Denis Bolotin
Add a missing semicolon to a line in an empty implementation function. Signed-off-by: Denis Bolotin Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_rdma.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.h

[PATCH] allow DSCP values in ip rulesB

2018-11-14 Thread Pavel Balaev
Hello, for now IP rules supports only old TOS values and we cannot use DSCP. This patch adds support for DSCP values in IP rules: $ ip r add default via 192.168.0.6 table test $ ip ru add tos 0x80 table test $ ip ru 0: from all lookup local 32764: from all tos CS4 lookup test 32766:

[net:master 25/27] drivers/net/ethernet/qlogic/qed/qed_rdma.h:186:79: error: expected ';' before '}' token

2018-11-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master head: db8ddde766adf09605b5282e7978fa0ba76c3ee3 commit: 291d57f67d2449737d1e370ab5b9a583818eaa0c [25/27] qed: Fix rdma_info structure allocation config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian

[PATCH net-next 3/3] dpaa2-eth: bql support

2018-11-14 Thread Ioana Ciocoi Radulescu
Add support for byte queue limit. On NAPI poll, we save the total number of Tx confirmed frames/bytes and register them with bql at the end of the poll function. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 59 ++--

[PATCH net-next 2/3] dpaa2-eth: Don't use multiple queues per channel

2018-11-14 Thread Ioana Ciocoi Radulescu
The DPNI object on which we build a network interface has a certain number of {Rx, Tx, Tx confirmation} frame queues as resources. The default hardware setup offers one queue of each type, as well as one DPCON channel, for each core available in the system. There are however cases where the

[PATCH net-next 1/3] dpaa2-eth: Update callback signature

2018-11-14 Thread Ioana Ciocoi Radulescu
Change the frame consume callback signature: * the entire FQ structure is passed to the callback instead of just the queue index * the NAPI structure can be easily obtained from the channel it is associated to, so we don't need to pass it explicitly Signed-off-by: Ioana Radulescu ---

[PATCH net-next 0/3] dpaa2-eth: add bql support

2018-11-14 Thread Ioana Ciocoi Radulescu
The first two patches make minor tweaks to the driver to simplify bql implementation. The third patch adds the actual bql support. Ioana Radulescu (3): dpaa2-eth: Update callback signature dpaa2-eth: Don't use multiple queues per channel dpaa2-eth: bql support

[PATCH net] net/sched: act_pedit: fix memory leak when IDR allocation fails

2018-11-14 Thread Davide Caratti
tcf_idr_check_alloc() can return a negative value, on allocation failures (-ENOMEM) or IDR exhaustion (-ENOSPC): don't leak keys_ex in these cases. Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") Signed-off-by: Davide Caratti --- net/sched/act_pedit.c | 3 ++- 1 file

Re: [RFC PATCH 5/6] net: marvell: neta: add support for 2500base-X

2018-11-14 Thread Russell King - ARM Linux
On Wed, Nov 14, 2018 at 02:18:14PM +0530, Kishon Vijay Abraham I wrote: > Hi, > > On 12/11/18 6:01 PM, Russell King wrote: > > Signed-off-by: Russell King > > --- > > drivers/net/ethernet/marvell/mvneta.c | 58 > > ++- > > 1 file changed, 51 insertions(+), 7

Re: [RFC PATCH 0/6] Armada 38x comphy driver to support 2.5Gbps networking

2018-11-14 Thread Russell King - ARM Linux
On Wed, Nov 14, 2018 at 01:39:29PM +0530, Kishon Vijay Abraham I wrote: > Hi, > > On 12/11/18 5:59 PM, Russell King - ARM Linux wrote: > > Hi, > > > > This series adds support for dynamically switching between 1Gbps > > and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on > > Armada

Re: [iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-14 Thread Phil Sutter
Hi Stephen, On Tue, Nov 13, 2018 at 02:47:59PM -0800, Stephen Hemminger wrote: > On Tue, 13 Nov 2018 16:12:01 +0100 > Phil Sutter wrote: > > > + if (arg[0] == '-') { > > + inv = true; > > + arg++; > > + } > The inverse logic needs to be moved into the loop handling

Re: BUG: sleeping function called from invalid context at mm/slab.h:421

2018-11-14 Thread Naresh Kamboju
Hi Roman, On Tue, 13 Nov 2018 at 23:07, Roman Gushchin wrote: > > On Tue, Nov 13, 2018 at 10:03:38PM +0530, Naresh Kamboju wrote: > > While running kernel selftests bpf test_cgroup_storage test this > > kernel BUG reported every time on all devices running Linux -next > >

Re: [RFC PATCH 5/6] net: marvell: neta: add support for 2500base-X

2018-11-14 Thread Kishon Vijay Abraham I
Hi, On 12/11/18 6:01 PM, Russell King wrote: > Signed-off-by: Russell King > --- > drivers/net/ethernet/marvell/mvneta.c | 58 > ++- > 1 file changed, 51 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/marvell/mvneta.c >

Re: [RFC PATCH 2/6] phy: armada38x: add common phy support

2018-11-14 Thread Kishon Vijay Abraham I
Hi, On 12/11/18 6:00 PM, Russell King wrote: > Add support for the Armada 38x common phy to allow us to change the > speed of the Ethernet serdes lane. This driver only supports > manipulation of the speed, it does not support configuration of the > common phy. > > Signed-off-by: Russell King

[PATCH net-next 09/11] mlxsw: spectrum: acl: Push code related to num_ctcam_erps inc/dec into separate helpers

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko Later on the same code is going to be needed for deltas as well. So push the procedures related to increment and decrement of num_ctcam_erps into a separate helpers. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../mellanox/mlxsw/spectrum_acl_erp.c | 108

[PATCH net-next 11/11] selftests: mlxsw: spectrum-2: Add simple delta test

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko Track the basic codepaths of delta handling, using objagg tracepoints. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 82 ++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 07/11] mlxsw: spectrum: acl: Don't encode the key again in mlxsw_sp_acl_atcam_12kb_lkey_id_get()

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko No need to do key encoding again in mlxsw_sp_acl_atcam_12kb_lkey_id_get(). Instead of that, introduce a new helper that would just clear unused blocks. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../mellanox/mlxsw/core_acl_flex_keys.c | 10 +++

[PATCH net-next 00/11] mlxsw: spectrum: acl: Introduce ERP sharing by multiple masks

2018-11-14 Thread Ido Schimmel
Jiri says: The Spectrum-2 hardware has limitation number of ERPs per-region. In order to accommodate more masks than number of ERPs, the hardware supports to insert rules with delta bits. By that, the rules with masks that differ in up-to 8 consecutive bits can share the same ERP. Patches 1 and

[PATCH net-next 02/11] selftests: Adjust spectrum-2 ctcam_two_atcam_masks_test

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko In order for this to behave as required with delta bits, change the mask for rule with handle 103. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next 08/11] mlxsw: spectrum: acl: Remove mlxsw_afk_encode() block range args and key/mask check

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko Since two remaining users of mlxsw_afk_encode() do not specify block ranges to work on, remove the args. Also, key/mask is always non-NULL now, so skip the checks. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c

[PATCH net-next 01/11] selftests: Adjust spectrum-2 two_mask_test

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko In order for this to behave as required with delta bits, change the mask for rule with handle 103. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next 04/11] mlxsw: spectrum: acl_erp: Convert to use objagg for tracking ERPs

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko Currently the ERPs are tracked internally in a hashtable. Benefit from the newly introduced objagg library and use it to track ERPs. At this point, there is no nesting of objects done, as the delta_create callback always returns -EOPNOTSUPP. On the way, add "mask" into ERP mask

[PATCH net-next 03/11] lib: introduce initial implementation of object aggregation manager

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko This lib tracks objects which could be of two types: 1) root object 2) nested object - with a "delta" which differentiates it from the associated root object The objects are tracked by a hashtable and reference-counted. User is responsible of implementing

[PATCH net-next 05/11] mlxsw: spectrum: acl: Pass key pointer to master_mask_set/clear

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko The device requires that the master mask of each region will be composed from a logical OR between all the unmasked bits in the region. Currently, this is just a logical OR between all the eRPs used in the region, but the next patch is going to introduce delta bits support which

[PATCH net-next 10/11] mlxsw: spectrum: acl: Implement delta for ERP

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko Allow ERP sharing for multiple mask. Do it by properly implementing delta_create() objagg object. Use the computed delta info for inserting rules in A-TCAM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 8 +-

[PATCH net-next 06/11] mlxsw: core_acl: Change order of args of ops->encode_block()

2018-11-14 Thread Ido Schimmel
From: Jiri Pirko Change order so it is aligned with the usual case where the "write_to" buffer comes as the first arg. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c | 4 ++--

Re: [RFC PATCH 0/6] Armada 38x comphy driver to support 2.5Gbps networking

2018-11-14 Thread Kishon Vijay Abraham I
Hi, On 12/11/18 5:59 PM, Russell King - ARM Linux wrote: > Hi, > > This series adds support for dynamically switching between 1Gbps > and 2.5Gbps networking for the Marvell Armada 38x SoCs, tested on > Armada 388 on the Clearfog platform. > > This is necessary to be able to connect (eg) a

af_xdp zero copy ideas

2018-11-14 Thread Michael S. Tsirkin
So a I mentioned during the presentation for the af_xdp zero copy I think it's pretty important to be able to close the device and get back the affected memory. One way would be to unmap the DMA memory from userspace and map in some other memory. It's tricky since you need to also replace the