Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-21 Thread Phil Reid
On 21/03/2019 2:16 pm, liweihang wrote: On 3/19/2019 7:34 PM, liweihang wrote: Hi all, I've met a similar issue and sent an email to discuss about it before: Question about setting speed and duplex failed after auto-negotiation disabled on marvell phy d6ab93364734 net: phy: marvell: Avoid u

Re: [PATCH net-next] net: phy: aquantia: add downshift support

2019-03-21 Thread Andrew Lunn
On Wed, Mar 20, 2019 at 10:15:10PM +0100, Heiner Kallweit wrote: > Aquantia PHY's of the AQR107 family support the downshift feature. > Add support for it as standard PHY tunable so that it can be controlled > via ethtool. > The AQCS109 supports a proprietary 2-pair 1Gbps mode. If two such PHY's >

[iproute2 PATCH] ip: bridge: add mcast to unicast config flag

2019-03-21 Thread Tobias Jungel
This adds configuration for the IFLA_BRPORT_MCAST_TO_UCAST flag that allows multicast packets to be replicated as unicast packets. Signed-off-by: Tobias Jungel --- bridge/link.c| 12 ip/iplink_bridge_slave.c | 9 + man/man8/bridge.8| 5 + man/man8/i

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Mon, Mar 18, 2019 at 08:16:42PM CET, jakub.kicin...@netronome.com wrote: >On Mon, 18 Mar 2019 13:11:54 +0100, Jiri Pirko wrote: >> >> >2. flavour should not be vf/pf, flavour should be hostport, switchport. >> >> >Because switch is flat and agnostic of pf/vf/mdev. >> >> >> >> Not sure. It's go

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Wed, Mar 20, 2019 at 09:22:57PM CET, jakub.kicin...@netronome.com wrote: >On Wed, 20 Mar 2019 18:24:15 +, Parav Pandit wrote: >> Hi Jiri, Jakub, Samudrala Sridhar, >> > > > > > And physical port in include/uapi/linux/devlink.h also describe >> > > > > > that. >> > > > > >> > > > > By "that" y

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Mon, Mar 18, 2019 at 08:19:00PM CET, jakub.kicin...@netronome.com wrote: >On Mon, 18 Mar 2019 13:21:05 +0100, Jiri Pirko wrote: >> >First two entries shows the link between hostport and switchport. >> >$ devlink port show >> >pci/:05:00.0/10002 eth netdev flavour switchport switch_id 00154d130d

Re: [PATCH net-next v2 0/7] devlink: expose PF and VF representors as ports

2019-03-21 Thread Jiri Pirko
Wed, Mar 20, 2019 at 09:25:53PM CET, jakub.kicin...@netronome.com wrote: >On Fri, 1 Mar 2019 10:04:46 -0800, Jakub Kicinski wrote: >> Hi! >> >> This series is a long overdue follow up to Jiri's work on providing >> a common .ndo_phys_port_name implementation based on devlink ports. > >Hi Jiri, >

Re: [PATCH bpf-next 0/2] bpf: remove incorrect 'verifier bug' warning

2019-03-21 Thread Paul Chaignon
On Wed, Mar 20, 2019 at 11:31PM, Yonghong Song wrote: > On 3/20/19 5:57 AM, Paul Chaignon wrote: > > The BPF verifier checks the maximum number of call stack frames twice, > > first in the main CFG traversal (do_check) and then in a subsequent > > traversal (check_max_stack_depth). If the second c

[PATCH net-next 2/2] net: dev: introduce support for sch BYPASS for lockless qdisc

2019-03-21 Thread Paolo Abeni
With commit c5ad119fb6c0 ("net: sched: pfifo_fast use skb_array") pfifo_fast no longer benefit from the TCQ_F_CAN_BYPASS optimization. Due to retpolines the cost of the enqueue()/dequeue() pair has become relevant and we observe measurable regression for the uncontended scenario when the packet-rat

[PATCH net-next 1/2] net: sched: add empty status flag for NOLOCK qdisc

2019-03-21 Thread Paolo Abeni
The queue is marked not empty after acquiring the seqlock, and it's up to the NOLOCK qdisc clearing such flag on dequeue. Since the empty status lays on the same cache-line of the seqlock, it's always hot on cache during the updates. This makes the empty flag update a little bit loosy. Given the l

[PATCH net-next 0/2] net: dev: BYPASS for lockless qdisc

2019-03-21 Thread Paolo Abeni
This patch series is aimed at improving xmit performances of lockless qdisc in the uncontended scenario. After the lockless refactor pfifo_fast can't leverage the BYPASS optimization. Due to retpolines the overhead for the avoidables enqueue and dequeue operations has increased and we see measurab

MASSAGE FROM Ms Safi>> Reply

2019-03-21 Thread Ms Safi Kabore
Dear Friend, I am Ms Safi Kabore work with the department of Audit and accounting manager here in the Bank, There is this fund that was keep in my custody years ago,please i need your assistance for the transferring of thIs fund to your bank account for both of us benefit for life time inv

[PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread luca . boccassi
From: Luca Boccassi Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its own variable instead of call

Re: [PATCH bpf-next v3] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Luca Boccassi
On Wed, 2019-03-20 at 23:58 +, Andrey Ignatov wrote: > luca.bocca...@gmail.com [Wed, 2019-03-20 > 06:28 -0700]: > > From: Luca Boccassi > > > > Generate a libbpf.pc file at build time so that users can rely > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > Signed-off-by

[PATCH net-next] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-21 Thread wenxu
From: wenxu There is currently no support for the multicasti/broadcst aspects of VXLAN in ovs. In the datapath flow the tun_dst must specific. But in the IP_TUNNEL_INFO_BRIDGE mode the tun_dst can not be specific. And the packet can forward through the fdb of vxlan devcice. In this mode the broad

netfilter: missing correlation checks on icmp[v6] errors before applying IP_CT_RELATED

2019-03-21 Thread Luca Moro
Hello, During a review of OpenBSD Packet Filter, we discovered a minor security issue that also impacts netfilter. When handling ICMP[v6] errors that encapsulate the original IP datagram, there is no correlation check between the inner and outer IP layers. So one can encapsulate an error with an

Re: [net-next 09/15] net: Move the definition of the default Geneve udp port to public header file

2019-03-21 Thread Moshe Shemesh
On 3/21/2019 1:54 AM, Jakub Kicinski wrote: > On Wed, 20 Mar 2019 16:39:53 -0700, Saeed Mahameed wrote: >> From: Moshe Shemesh >> >> Move the definition of the default Geneve udp port from the geneve >> source to the header file, so we can re-use it from drivers. >> Modify existing drivers to us

Re: [net-next 12/15] net: Add IANA_VXLAN_UDP_PORT definition to vxlan header file

2019-03-21 Thread Moshe Shemesh
On 3/21/2019 1:55 AM, Jakub Kicinski wrote: > On Wed, 20 Mar 2019 16:39:56 -0700, Saeed Mahameed wrote: >> diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.h >> b/drivers/net/ethernet/netronome/nfp/flower/main.h >> index 7afe66eff684..f214759d485b 100644 >> --- a/drivers/net/ethernet/

[PATCH net-next v2 1/1] net/tls: Replace kfree_skb() with consume_skb()

2019-03-21 Thread Vakul Garg
To free the skb in normal course of processing, consume_skb() should be used. Only for failure paths, skb_free() is intended to be used. https://www.kernel.org/doc/htmldocs/networking/API-consume-skb.html Signed-off-by: Vakul Garg --- v1 -> v2: Reverted consume_skb() to kfree_skb() in tls_sw_rel

[PATCH net-next 2/2] ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create

2019-03-21 Thread David Ahern
From: David Ahern Change addrconf_f6i_alloc to generate a fib6_config and call ip6_route_info_create. addrconf_f6i_alloc is the last caller to fib6_info_alloc besides ip6_route_info_create, and there is no reason for it to do its own initialization on a fib6_info. Host routes need to be created

[PATCH net-next 1/2] ipv6: Move setting default metric for routes

2019-03-21 Thread David Ahern
From: David Ahern ip6_route_info_create is a low level function for ensuring fc_metric is set. Move the check and default setting to the 2 locations that do not already set fc_metric before calling ip6_route_info_create. This is required for the next patch which moves addrconf allocations to ip6_

[PATCH net-next 0/2] ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create

2019-03-21 Thread David Ahern
From: David Ahern addrconf_f6i_alloc is the last caller of fib6_info_alloc besides ip6_route_info_create. There really is no good reason for it do its own fib6_info initialization, so convert it to call ip6_route_info_create. David Ahern (2): ipv6: Move setting default metric for routes ipv

Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours

2019-03-21 Thread Jiri Pirko
Wed, Mar 20, 2019 at 06:29:44PM CET, akeem.g.abodun...@intel.com wrote: > > >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] >> On Behalf Of Jiri Pirko >> Sent: Sunday, March 03, 2019 11:30 PM >> To: Parav Pandit >> Cc: Jakub Kicinski ; da..

Re: [summary] virtio network device failover writeup

2019-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2019 at 12:07:57PM +0200, Liran Alon wrote: > 2) It brings non-intuitive customer experience. For example, a customer > may attempt to analyse connectivity issue by checking the connectivity > on a net-failover slave (e.g. the VF) but will see no connectivity when >

[PATCH] i40e: fix WoL support check

2019-03-21 Thread Stefan Assmann
The current check for WoL on i40e is broken. Code comment says only magic packet is supported, so only check for that. Fixes: 540a152da762 (i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE) Signed-off-by: Stefan Assmann --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +-- 1

[PATCH net-next v3 05/12] net: sched: flower: add reference counter to flower mask

2019-03-21 Thread Vlad Buslov
Extend fl_flow_mask structure with reference counter to allow parallel modification without relying on rtnl lock. Use rcu read lock to safely lookup mask and increment reference counter in order to accommodate concurrent deletes. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Reviewed-by: Stefa

[PATCH net-next v3 04/12] net: sched: flower: track filter deletion with flag

2019-03-21 Thread Vlad Buslov
In order to prevent double deletion of filter by concurrent tasks when rtnl lock is not used for synchronization, add 'deleted' filter field. Check value of this field when modifying filters and return error if concurrent deletion is detected. Refactor __fl_delete() to accept pointer to 'last' boo

[PATCH net-next v3 06/12] net: sched: flower: handle concurrent mask insertion

2019-03-21 Thread Vlad Buslov
Without rtnl lock protection masks with same key can be inserted concurrently. Insert temporary mask with reference count zero to masks hashtable. This will cause any concurrent modifications to retry. Wait for rcu grace period to complete after removing temporary mask from masks hashtable to acco

[PATCH net-next v3 10/12] net: sched: flower: protect flower classifier state with spinlock

2019-03-21 Thread Vlad Buslov
struct tcf_proto was extended with spinlock to be used by classifiers instead of global rtnl lock. Use it to protect shared flower classifier data structures (handle_idr, mask hashtable and list) and fields of individual filters that can be accessed concurrently. This patch set uses tcf_proto->lock

[PATCH net-next v3 08/12] net: sched: flower: handle concurrent filter insertion in fl_change

2019-03-21 Thread Vlad Buslov
Check if user specified a handle and another filter with the same handle was inserted concurrently. Return EAGAIN to retry filter processing (in case it is an overwrite request). Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Reviewed-by: Stefano Brivio --- net/sched/cls_flower.c | 9

[PATCH net-next v3 11/12] net: sched: flower: track rtnl lock state

2019-03-21 Thread Vlad Buslov
Use 'rtnl_held' flag to track if caller holds rtnl lock. Propagate the flag to internal functions that need to know rtnl lock state. Take rtnl lock before calling tcf APIs that require it (hw offload, bind filter, etc.). Signed-off-by: Vlad Buslov Reviewed-by: Stefano Brivio --- net/sched/cls_f

[PATCH net-next v3 02/12] net: sched: flower: refactor fl_change

2019-03-21 Thread Vlad Buslov
As a preparation for using classifier spinlock instead of relying on external rtnl lock, rearrange code in fl_change. The goal is to group the code which changes classifier state in single block in order to allow following commits in this set to protect it from parallel modification with tp->lock.

[PATCH net-next v3 12/12] net: sched: flower: set unlocked flag for flower proto ops

2019-03-21 Thread Vlad Buslov
Set TCF_PROTO_OPS_DOIT_UNLOCKED for flower classifier to indicate that its ops callbacks don't require caller to hold rtnl lock. Don't take rtnl lock in fl_destroy_filter_work() that is executed on workqueue instead of being called by cls API and is not affected by setting TCF_PROTO_OPS_DOIT_UNLOCK

[PATCH net-next v3 09/12] net: sched: flower: handle concurrent tcf proto deletion

2019-03-21 Thread Vlad Buslov
Without rtnl lock protection tcf proto can be deleted concurrently. Check tcf proto 'deleting' flag after taking tcf spinlock to verify that no concurrent deletion is in progress. Return EAGAIN error if concurrent deletion detected, which will cause caller to retry and possibly create new instance

[PATCH net-next v3 03/12] net: sched: flower: introduce reference counting for filters

2019-03-21 Thread Vlad Buslov
Extend flower filters with reference counting in order to remove dependency on rtnl lock in flower ops and allow to modify filters concurrently. Reference to flower filter can be taken/released concurrently as soon as it is marked as 'unlocked' by last patch in this series. Use atomic reference cou

[PATCH net-next v3 07/12] net: sched: flower: protect masks list with spinlock

2019-03-21 Thread Vlad Buslov
Protect modifications of flower masks list with spinlock to remove dependency on rtnl lock and allow concurrent access. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Reviewed-by: Stefano Brivio --- net/sched/cls_flower.c | 8 1 file changed, 8 insertions(+) diff --git a/net/sched/c

[PATCH net-next v3 00/12] Refactor flower classifier to remove dependency on rtnl lock

2019-03-21 Thread Vlad Buslov
Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a third step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag RT

[PATCH net-next v3 01/12] net: sched: flower: don't check for rtnl on head dereference

2019-03-21 Thread Vlad Buslov
Flower classifier only changes root pointer during init and destroy. Cls API implements reference counting for tcf_proto, so there is no danger of concurrent access to tp when it is being destroyed, even without protection provided by rtnl lock. Implement new function fl_head_dereference() to dere

[patch net-next 10/11] net: devlink: disallow port_attrs_set() to be called before register

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Since the port attributes are static and cannot change during the port lifetime, WARN_ON if some driver calls it after registration. Also, no need to call notifications as it is noop anyway due to check of devlink_port->registered there. Signed-off-by: Jiri Pirko --- net/core/

[patch net-next 05/11] bnxt: call devlink_port_type_eth_set() before port register

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Call devlink_port_type_eth_set() before devlink_port_register(). Bnxt instances won't change type during lifetime. This avoids one extra userspace devlink notification. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 +- 1 file changed, 1 in

[patch net-next 08/11] mlxsw: Move devlink_port_attrs_set() call before register

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Since attrs are static during the existence of devlink port, set the before registration of the port. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 12 ++-- drivers/net/ethernet/mellanox/mlxsw/core.h | 8 drivers/net/ether

[patch net-next 09/11] dsa: move devlink_port_attrs_set() call before register

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Since attrs are static during the existence of devlink port, set the before registration of the port. Signed-off-by: Jiri Pirko --- net/dsa/dsa2.c | 47 ++- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/net/dsa/dsa2

[patch net-next 03/11] dsa: add missing net/devlink.h include

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko devlink functions are in use, so include the related header file. Signed-off-by: Jiri Pirko --- net/dsa/dsa2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index c00ee464afc7..4558de672b4f 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c

[patch net-next 07/11] net: devlink: don't pass return value of __devlink_port_type_set()

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko __devlink_port_type_set() returns void, it makes no sense to pass it on, so don't do that. Signed-off-by: Jiri Pirko --- net/core/devlink.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index 1e125c3b890c..

[patch net-next 00/11] devlink: small spring cleanup

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Mostly cosmetics and janitor work. Jiri Pirko (11): net: devlink: add couple of missing mutex_destroy() calls bnxt: add missing net/devlink.h include dsa: add missing net/devlink.h include bnxt: set devlink port attrs properly bnxt: call devlink_port_type_eth_set() bef

[patch net-next 01/11] net: devlink: add couple of missing mutex_destroy() calls

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Add missing called to mutex_destroy() for two mutexes used in devlink code. Signed-off-by: Jiri Pirko --- net/core/devlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/devlink.c b/net/core/devlink.c index 78e22cea4cc7..3dc51ddf7451 100644 --- a/net/core/dev

[patch net-next 11/11] net: devlink: add port type spinlock

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Add spinlock to protect port type and type_dev pointer consistency. Without that, userspace may see inconsistent type and type_dev combinations. Signed-off-by: Jiri Pirko --- include/net/devlink.h | 4 net/core/devlink.c| 17 + 2 files changed, 17 ins

[patch net-next 06/11] net: devlink: don't take devlink_mutex for devlink_compat_*

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko The netdevice is guaranteed to not disappear so we can rely that devlink_port and devlink won't disappear as well. No need to take devlink_mutex so don't take it here. Signed-off-by: Jiri Pirko --- net/core/devlink.c | 18 -- 1 file changed, 8 insertions(+), 10

[patch net-next 04/11] bnxt: set devlink port attrs properly

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko Set the attrs properly so delink has enough info to generate physical port names. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/

[patch net-next 02/11] bnxt: add missing net/devlink.h include

2019-03-21 Thread Jiri Pirko
From: Jiri Pirko devlink functions are in use, so include the related header file. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broad

Re: [PATCH bpf-next 09/13] bpf: add bpf_skb_adjust_room encap flags

2019-03-21 Thread Willem de Bruijn
On Wed, Mar 20, 2019 at 11:13 PM Alexei Starovoitov wrote: > > On Wed, Mar 20, 2019 at 10:49:40AM -0400, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > When pushing tunnel headers, annotate skbs in the same way as tunnel > > devices. > > > > For GSO packets, the network stack requires

Re: [patch net-next 09/11] dsa: move devlink_port_attrs_set() call before register

2019-03-21 Thread Andrew Lunn
On Thu, Mar 21, 2019 at 02:20:17PM +0100, Jiri Pirko wrote: > + switch (dp->type) { > + case DSA_PORT_TYPE_CPU: > + flavour = DEVLINK_PORT_FLAVOUR_CPU; > + break; > + case DSA_PORT_TYPE_DSA: > + flavour = DEVLINK_PORT_FLAVOUR_DSA; > + brea

Re: [PATCH bpf-next 08/13] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_FIXED_GSO

2019-03-21 Thread Alan Maguire
On Wed, 20 Mar 2019, Willem de Bruijn wrote: > From: Willem de Bruijn > > bpf_skb_adjust_room adjusts gso_size of gso packets to account for the > pushed or popped header room. > > This is not allowed with UDP, where gso_size delineates datagrams. Add > an option to avoid these updates and a

Re: [patch net-next 09/11] dsa: move devlink_port_attrs_set() call before register

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:41:01PM CET, and...@lunn.ch wrote: >On Thu, Mar 21, 2019 at 02:20:17PM +0100, Jiri Pirko wrote: >> +switch (dp->type) { >> +case DSA_PORT_TYPE_CPU: >> +flavour = DEVLINK_PORT_FLAVOUR_CPU; >> +break; >> +case DSA_PORT_TYPE_DSA: >> +

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Willem de Bruijn
On Thu, Mar 21, 2019 at 12:45 AM Eric Dumazet wrote: > > > > On 03/20/2019 08:39 PM, Alexei Starovoitov wrote: > > > I think you need to convince Dave and Eric that > > above surgery is necessary to do the hack in patch 6 with > > +static DEFINE_PER_CPU(struct sk_buff, bpf_flow_skb); > > > > Yes,

Re: [PATCH bpf-next 08/13] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_FIXED_GSO

2019-03-21 Thread Willem de Bruijn
On Thu, Mar 21, 2019 at 9:43 AM Alan Maguire wrote: > > > > On Wed, 20 Mar 2019, Willem de Bruijn wrote: > > > From: Willem de Bruijn > > > > bpf_skb_adjust_room adjusts gso_size of gso packets to account for the > > pushed or popped header room. > > > > This is not allowed with UDP, where gso_si

Re: [PATCH net-next v3 01/12] net: sched: flower: don't check for rtnl on head dereference

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:33PM CET, vla...@mellanox.com wrote: >Flower classifier only changes root pointer during init and destroy. Cls >API implements reference counting for tcf_proto, so there is no danger of >concurrent access to tp when it is being destroyed, even without protection >provided

Re: [PATCH net-next v3 02/12] net: sched: flower: refactor fl_change

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:34PM CET, vla...@mellanox.com wrote: >As a preparation for using classifier spinlock instead of relying on >external rtnl lock, rearrange code in fl_change. The goal is to group the >code which changes classifier state in single block in order to allow >following commits

Re: [PATCH net-next v3 03/12] net: sched: flower: introduce reference counting for filters

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:35PM CET, vla...@mellanox.com wrote: >Extend flower filters with reference counting in order to remove dependency >on rtnl lock in flower ops and allow to modify filters concurrently. >Reference to flower filter can be taken/released concurrently as soon as it >is marked

Re: [patch net-next 03/11] dsa: add missing net/devlink.h include

2019-03-21 Thread Andrew Lunn
On Thu, Mar 21, 2019 at 02:20:11PM +0100, Jiri Pirko wrote: > From: Jiri Pirko > > devlink functions are in use, so include the related header file. > > Signed-off-by: Jiri Pirko Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v3 04/12] net: sched: flower: track filter deletion with flag

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:36PM CET, vla...@mellanox.com wrote: >In order to prevent double deletion of filter by concurrent tasks when rtnl >lock is not used for synchronization, add 'deleted' filter field. Check >value of this field when modifying filters and return error if concurrent >deletion

Re: [PATCH net-next v3 09/12] net: sched: flower: handle concurrent tcf proto deletion

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:41PM CET, vla...@mellanox.com wrote: >Without rtnl lock protection tcf proto can be deleted concurrently. Check >tcf proto 'deleting' flag after taking tcf spinlock to verify that no >concurrent deletion is in progress. Return EAGAIN error if concurrent >deletion detected

Re: [PATCH net-next v3 10/12] net: sched: flower: protect flower classifier state with spinlock

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:42PM CET, vla...@mellanox.com wrote: >struct tcf_proto was extended with spinlock to be used by classifiers >instead of global rtnl lock. Use it to protect shared flower classifier >data structures (handle_idr, mask hashtable and list) and fields of >individual filters th

Re: [PATCH net-next v3 11/12] net: sched: flower: track rtnl lock state

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:43PM CET, vla...@mellanox.com wrote: >Use 'rtnl_held' flag to track if caller holds rtnl lock. Propagate the flag >to internal functions that need to know rtnl lock state. Take rtnl lock >before calling tcf APIs that require it (hw offload, bind filter, etc.). > >Signed-o

Re: [PATCH net-next v3 12/12] net: sched: flower: set unlocked flag for flower proto ops

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 02:17:44PM CET, vla...@mellanox.com wrote: >Set TCF_PROTO_OPS_DOIT_UNLOCKED for flower classifier to indicate that its >ops callbacks don't require caller to hold rtnl lock. Don't take rtnl lock >in fl_destroy_filter_work() that is executed on workqueue instead of being >called

[PATCH net-next v2] tls: Add SOL_TLS to uapi

2019-03-21 Thread Boris Pismenny
User applications are forced to define the SOL_TLS manually at the moment, which is inappropriate. Add SOL_TLS to the uapi. Other protocols handle this similarly. For example see SOL_TIPC. Signed-off-by: Boris Pismenny --- v1: update commit message --- include/uapi/linux/tls.h | 4 1 file

Re: [PATCH v3 bpf-next 1/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-21 Thread Carlos Antonio Neira Bustos
On Wed, Mar 20, 2019 at 06:23:20PM -0700, Alexei Starovoitov wrote: > On Wed, Mar 20, 2019 at 01:49:22PM -0300, Carlos Antonio Neira Bustos wrote: > > > > This is a series of patches to introduce a new helper called > > bpf_get_current_pidns_info, > > this change has been splitted into the follow

[PATCH net-next] xfrm: gso partial offload support

2019-03-21 Thread Boris Pismenny
This patch introduces support for gso partial ESP offload. Signed-off-by: Boris Pismenny Signed-off-by: Raed Salem --- net/ipv4/esp4_offload.c | 10 +++--- net/xfrm/xfrm_device.c | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/es

Re: [PATCH net-next 1/2] net: sched: add empty status flag for NOLOCK qdisc

2019-03-21 Thread Eric Dumazet
On 03/21/2019 03:14 AM, Paolo Abeni wrote: > The queue is marked not empty after acquiring the seqlock, > and it's up to the NOLOCK qdisc clearing such flag on dequeue. > Since the empty status lays on the same cache-line of the > seqlock, it's always hot on cache during the updates. > > This m

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Parav Pandit
Hi Jiri, > -Original Message- > From: Jiri Pirko > Sent: Thursday, March 21, 2019 4:08 AM > To: Jakub Kicinski > Cc: Parav Pandit ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subpor

Re: [PATCH net-next 1/2] net: sched: add empty status flag for NOLOCK qdisc

2019-03-21 Thread Paolo Abeni
Hi, Thank you for the review. On Thu, 2019-03-21 at 07:42 -0700, Eric Dumazet wrote: > > On 03/21/2019 03:14 AM, Paolo Abeni wrote: > > The queue is marked not empty after acquiring the seqlock, > > and it's up to the NOLOCK qdisc clearing such flag on dequeue. > > Since the empty status lays on

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Thursday, March 21, 2019 3:45 AM > To: Jakub Kicinski > Cc: Parav Pandit ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on d

Re: [PATCH ipsec/vti 0/2] Fragmentation of IPv4 in VTI

2019-03-21 Thread Steffen Klassert
On Sun, Mar 17, 2019 at 11:37:55PM +, Bram Yvahk wrote: > We've experienced an issue with VTI when the path-mtu is smaller than the size > of the "client" packet. > > What happens: IPv4 packet from the client (i.e. another system in the LAN) > attempts to transmit some data; IPv4 header shows

RE: [PATCH net] dpaa2-eth: Fix possible access beyond end of array

2019-03-21 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: David Miller > Sent: Thursday, March 21, 2019 1:29 AM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; Ioana Ciornei ; > bro...@redhat.com > Subject: Re: [PATCH net] dpaa2-eth: Fix possible access beyond end of array > > From: Ioana Ciocoi Radulescu

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Stanislav Fomichev
On 03/21, Willem de Bruijn wrote: > On Thu, Mar 21, 2019 at 12:45 AM Eric Dumazet wrote: > > > > > > > > On 03/20/2019 08:39 PM, Alexei Starovoitov wrote: > > > > > I think you need to convince Dave and Eric that > > > above surgery is necessary to do the hack in patch 6 with > > > +static DEFINE_

Re: [summary] virtio network device failover writeup

2019-03-21 Thread Stephen Hemminger
On Thu, 21 Mar 2019 08:57:03 -0400 "Michael S. Tsirkin" wrote: > On Thu, Mar 21, 2019 at 02:47:50PM +0200, Liran Alon wrote: > > > > > > > On 21 Mar 2019, at 14:37, Michael S. Tsirkin wrote: > > > > > > On Thu, Mar 21, 2019 at 12:07:57PM +0200, Liran Alon wrote: > > >> 2) It brings no

RE: AF_XDP design flaws

2019-03-21 Thread Maxim Mikityanskiy
Hi, sorry for taking long time to reply. > -Original Message- > From: Björn Töpel > Sent: 7 March, 2019 19:52 > To: Maxim Mikityanskiy > Cc: Jonathan Lemon ; John Fastabend > ; netdev@vger.kernel.org; Björn Töpel > ; Magnus Karlsson ; David > S. Miller ; Tariq Toukan ; Saeed > Mahameed ;

Re: [PATCHv2 bpf-next 1/3] bpf, tests: tweak endianness selection

2019-03-21 Thread Stanislav Fomichev
On 03/21, Sergey Senozhatsky wrote: > On (03/20/19 20:24), Alexei Starovoitov wrote: > > On Wed, Mar 20, 2019 at 09:53:33PM +0900, Sergey Senozhatsky wrote: > > > Not all compilers have __builtin_bswap16() and __builtin_bswap32(), > > > thus not all compilers are able to compile the following code:

Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Andrey Ignatov
luca.bocca...@gmail.com [Thu, 2019-03-21 03:26 -0700]: > From: Luca Boccassi > > Generate a libbpf.pc file at build time so that users can rely > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > Signed-off-by: Luca Boccassi > --- > v2: use QUIET_GEN instead of QUIET_LINK to gener

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > If we can agree that we switch everything to xpd-like, do we deprecate the > skb-one? This whole discussion that have been going on for long time is an indication that initial bpf flow dissector concept was not thought throug

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Willem de Bruijn
On Thu, Mar 21, 2019 at 12:01 PM Alexei Starovoitov wrote: > > On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > > > If we can agree that we switch everything to xpd-like, do we deprecate the > > skb-one? > > This whole discussion that have been going on for long time is an i

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 04:14:53PM CET, pa...@mellanox.com wrote: > > >> -Original Message- >> From: Jiri Pirko >> Sent: Thursday, March 21, 2019 3:45 AM >> To: Jakub Kicinski >> Cc: Parav Pandit ; Samudrala, Sridhar >> ; da...@davemloft.net; >> netdev@vger.kernel.org; oss-driv...@netronome.

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 04:03:58PM CET, pa...@mellanox.com wrote: >Hi Jiri, > >> -Original Message- >> From: Jiri Pirko >> Sent: Thursday, March 21, 2019 4:08 AM >> To: Jakub Kicinski >> Cc: Parav Pandit ; Samudrala, Sridhar >> ; da...@davemloft.net; >> netdev@vger.kernel.org; oss-driv...@ne

Re: [PATCH net-next] net: phy: aquantia: add downshift support

2019-03-21 Thread David Miller
From: Andrew Lunn Date: Thu, 21 Mar 2019 09:38:27 +0100 > Even for a downshift to 1000Base-T2, i'm guessing for most use cases, > this means the cable is partially broken, and it serves as an early > warning it needs replacing. +1

Re: [PATCH net-next] net: phy: aquantia: add downshift support

2019-03-21 Thread Florian Fainelli
On 3/21/19 9:30 AM, David Miller wrote: > From: Andrew Lunn > Date: Thu, 21 Mar 2019 09:38:27 +0100 > >> Even for a downshift to 1000Base-T2, i'm guessing for most use cases, >> this means the cable is partially broken, and it serves as an early >> warning it needs replacing. > > +1 Maybe somet

Re: kernel tls interface with user space modification proposal

2019-03-21 Thread Boris Pismenny
Hi Vakul, +TLS maintainers I suggest you send this to TLS maintainers if you want to get more feedback, and it would be best to tag this as RFC. On 3/5/2019 9:56 AM, Vakul Garg wrote: > Hi > > The present interface of kernel tls with user space has few shortcomings. > > The biggest one is tha

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Thursday, March 21, 2019 11:16 AM > To: Parav Pandit > Cc: Jakub Kicinski ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Thursday, March 21, 2019 11:14 AM > To: Parav Pandit > Cc: Jakub Kicinski ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on

Re: [PATCH net-next v2 1/1] net/tls: Replace kfree_skb() with consume_skb()

2019-03-21 Thread David Miller
From: Vakul Garg Date: Thu, 21 Mar 2019 11:59:57 + > To free the skb in normal course of processing, consume_skb() should be > used. Only for failure paths, skb_free() is intended to be used. > > https://www.kernel.org/doc/htmldocs/networking/API-consume-skb.html > > Signed-off-by: Vakul Ga

Re: [PATCH net-next 0/2] ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create

2019-03-21 Thread David Miller
From: David Ahern Date: Thu, 21 Mar 2019 05:21:33 -0700 > From: David Ahern > > addrconf_f6i_alloc is the last caller of fib6_info_alloc besides > ip6_route_info_create. There really is no good reason for it do > its own fib6_info initialization, so convert it to call > ip6_route_info_create.

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 05:52:09PM CET, pa...@mellanox.com wrote: > > >> -Original Message- >> From: Jiri Pirko >> Sent: Thursday, March 21, 2019 11:14 AM >> To: Parav Pandit >> Cc: Jakub Kicinski ; Samudrala, Sridhar >> ; da...@davemloft.net; >> netdev@vger.kernel.org; oss-driv...@netronome

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Thursday, March 21, 2019 12:21 PM > To: Parav Pandit > Cc: Jakub Kicinski ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Jiri Pirko
Thu, Mar 21, 2019 at 05:50:37PM CET, pa...@mellanox.com wrote: > > >> -Original Message- >> From: Jiri Pirko >> Sent: Thursday, March 21, 2019 11:16 AM >> To: Parav Pandit >> Cc: Jakub Kicinski ; Samudrala, Sridhar >> ; da...@davemloft.net; >> netdev@vger.kernel.org; oss-driv...@netronome

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-21 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Thursday, March 21, 2019 12:24 PM > To: Parav Pandit > Cc: Jakub Kicinski ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Cong Wang
On Wed, Mar 20, 2019 at 11:12 AM John Hurley wrote: > > A new mirred action is created by the tcf_mirred_init function. This > contains a list head struct which is inserted into a global list on > successful creation of a new action. However, after a creation, it is > still possible to error out i

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Jakub Kicinski
On Thu, 21 Mar 2019 11:05:21 -0700, Cong Wang wrote: > On Wed, Mar 20, 2019 at 11:12 AM John Hurley > wrote: > > > > A new mirred action is created by the tcf_mirred_init function. This > > contains a list head struct which is inserted into a global list on > > successful creation of a new action

[PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address

2019-03-21 Thread Marek Behún
The MDIO addresses of the internal PHYs on this switch for ports 1-5 have addresses 0-4, not 1-5. Signed-off-by: Marek Behún Cc: Andrew Lunn Cc: Florian Fainelli Cc: Michal Vokáč Cc: John Crispin Cc: Wei Yongjun --- drivers/net/dsa/qca8k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

Re: [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address

2019-03-21 Thread Florian Fainelli
+Christian, On 3/21/19 11:23 AM, Marek Behún wrote: > The MDIO addresses of the internal PHYs on this switch for ports 1-5 > have addresses 0-4, not 1-5. > Can you provide a Fixes: tag for this? Your change will conflicts with Christian's patch series here: http://patchwork.ozlabs.org/project/n

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Cong Wang
On Thu, Mar 21, 2019 at 11:22 AM Jakub Kicinski wrote: > > On Thu, 21 Mar 2019 11:05:21 -0700, Cong Wang wrote: > > On Wed, Mar 20, 2019 at 11:12 AM John Hurley > > wrote: > > > > > > A new mirred action is created by the tcf_mirred_init function. This > > > contains a list head struct which is

Re: [PATCH ipsec/vti 0/2] Fragmentation of IPv4 in VTI

2019-03-21 Thread Bram Yvahk
Steffen Klassert wrote: > On Sun, Mar 17, 2019 at 11:37:55PM +, Bram Yvahk wrote: >> We've experienced an issue with VTI when the path-mtu is smaller than the size >> of the "client" packet. >> >> What happens: IPv4 packet from the client (i.e. another system in the LAN) >> attempts to transmit

  1   2   3   >