Re: [patch net-next 00/12] net: expose switch ID via devlink

2019-03-28 Thread Jiri Pirko
Thu, Mar 28, 2019 at 10:40:02PM CET, jakub.kicin...@netronome.com wrote: >On Thu, 28 Mar 2019 22:12:42 +0100, Jiri Pirko wrote: >> From: Jiri Pirko >> >> To provide visibility of the ports, this patchset exposes switch ID >> for devlink ports, which are part of a switch. The rest of the ports >>

[PATCH bpf-next] [tools/bpf] add bpffs multi-dimensional array tests in test_btf

2019-03-28 Thread Yonghong Song
For multiple dimensional arrays like below, int a[2][3] both llvm and pahole generated one BTF_KIND_ARRAY type like . element_type: int . index_type: unsigned int . number of elements: 6 Such a collapsed BTF_KIND_ARRAY type will cause the divergence in BTF vs. the user code. In the compile

Re: [PATCH ipsec-next 10/11] xfrm: make xfrm modes builtin

2019-03-28 Thread kbuild test robot
Hi Florian, I love your patch! Perhaps something to improve: [auto build test WARNING on ipsec-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Westphal/xfrm-remove-xfrm_mode-indirections/20190329-041949 base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec

Re: [PATCH v2 2/2] samples, selftests/bpf: add NULL check for ksym_search

2019-03-28 Thread Daniel T. Lee
I'm aware that I didn't cover the "spintest_user.c". Because, spintest sample isn't running currently since there is no such symbol called 'spin_lock'. At "spintest_kern.c", it has 'kprobe/spin_lock' and 'kprobe/spin_unlock' and some others kernel symbols like below. SEC("kprobe/spin_unlock")PROG

Re: [PATCH ipsec-next 08/11] xfrm: remove output2 indirection from xfrm_mode

2019-03-28 Thread kbuild test robot
Hi Florian, I love your patch! Yet something to improve: [auto build test ERROR on ipsec-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Westphal/xfrm-remove-xfrm_mode-indirections/20190329-041949 base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.

Re: [PATCH net-next V4 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-28 Thread kbuild test robot
Hi Leandro, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Leandro-Dorileo/net-sched-taprio-cbs-Fix-using-invalid-link-speed/20190329-043825 config: i386-randconfig-l1-03290203 (attached as .config)

[PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-03-28 Thread Li RongQing
NULL or ZERO_SIZE_PTR will be returned for zero sized memory request, and derefencing them will lead to a segfault so it is unnecessory to call vzalloc for zero sized memory request and not call functions which maybe derefence the NULL allocated memory this also fixes a possible memory leak if ph

Re: [PATCH net V5 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-28 Thread Cong Wang
On Thu, Mar 28, 2019 at 5:20 PM Leandro Dorileo wrote: > +static int taprio_dev_notifier(struct notifier_block *nb, unsigned long > event, > + void *ptr) > +{ > + struct net_device *dev = netdev_notifier_info_to_dev(ptr); > + struct taprio_sched *q; > +

[PATCH bpf-next 2/2] selftests/bpf: Test variable offset stack access

2019-03-28 Thread Andrey Ignatov
Test different scenarios of indirect variable-offset stack access: out of bound access (>0), min_off below initialized part of the stack, max_off+size above initialized part of the stack, initialized stack. Example of output: ... #856/p indirect variable-offset stack access, out of bound OK

[PATCH bpf-next 1/2] bpf: Support variable offset stack access from helpers

2019-03-28 Thread Andrey Ignatov
Currently there is a difference in how verifier checks memory access for helper arguments for PTR_TO_MAP_VALUE and PTR_TO_STACK with regard to variable part of offset. check_map_access, that is used for PTR_TO_MAP_VALUE, can handle variable offsets just fine, so that BPF program can call a helper

[PATCH bpf-next 0/2] bpf: Support variable offset stack access from helpers

2019-03-28 Thread Andrey Ignatov
The patch set adds support for stack access with variable offset from helpers. Patch 1 is the main patch in the set and provides more details. Patch 2 adds selftests for new functionality. Andrey Ignatov (2): bpf: Support variable offset stack access from helpers selftests/bpf: Test variable

Re: [PATCH net 0/2] nfp: fix retcode and disable netpoll on representors

2019-03-28 Thread David Miller
From: Jakub Kicinski Date: Thu, 28 Mar 2019 17:27:50 -0700 > On Thu, 28 Mar 2019 17:04:53 -0700 (PDT), David Miller wrote: >> From: Jakub Kicinski >> Date: Wed, 27 Mar 2019 11:38:37 -0700 >> >> > This series avoids a potential crash on nfp representor devices >> > when netpoll is in use. If tr

Re: [PATCH net 0/2] nfp: fix retcode and disable netpoll on representors

2019-03-28 Thread Jakub Kicinski
On Thu, 28 Mar 2019 17:04:53 -0700 (PDT), David Miller wrote: > From: Jakub Kicinski > Date: Wed, 27 Mar 2019 11:38:37 -0700 > > > This series avoids a potential crash on nfp representor devices > > when netpoll is in use. If transmitting the frame through underlying > > vNIC fails we'd return a

Re: [PATCH net-next 0/9] selftests: forwarding: Add new test cases

2019-03-28 Thread David Miller
From: Ido Schimmel Date: Thu, 28 Mar 2019 12:12:18 + > This patchset mainly adds new forwarding test cases and performs small > changes in existing infrastructure. > > Patches #1-#3 add new test cases for multicast RPF check, PCP and VLAN > matching using flower and tc VLAN modify action. >

[PATCH net V5 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-28 Thread Leandro Dorileo
The Time Aware Priority Scheduler is heavily dependent to link speed, it relies on it to calculate transmission bytes per cycle, we can't properly calculate the so called budget if the device has failed to report the link speed. In that case we can't dequeue packets assuming a wrong budget. This p

[PATCH net V5 0/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-28 Thread Leandro Dorileo
This set fixes miscalculations based on invalid link speed values. Changes in v5: + Don't iterate over all the net_device maintained list (suggested by: Florian Fainelli); Changes in v4: + converted pr_info calls to netdev_dbg (suggested by: Florian Fainelli); Changes in v3: + yet pr_info()

[PATCH net V5 2/2] net/sched: cbs: fix port_rate miscalculation

2019-03-28 Thread Leandro Dorileo
The Credit Based Shaper heavily depends on link speed to calculate the scheduling credits, we can't properly calculate the credits if the device has failed to report the link speed. In that case we can't dequeue packets assuming a wrong port rate that will result into an inconsistent credit distri

Re: [PATCH net 0/2] nfp: fix retcode and disable netpoll on representors

2019-03-28 Thread David Miller
From: Jakub Kicinski Date: Wed, 27 Mar 2019 11:38:37 -0700 > This series avoids a potential crash on nfp representor devices > when netpoll is in use. If transmitting the frame through underlying > vNIC fails we'd return an error code (by passing on error code from > __dev_queue_xmit()) and caus

Re: [PATCH net] netns: provide pure entropy for net_hash_mix()

2019-03-28 Thread David Miller
From: Eric Dumazet Date: Wed, 27 Mar 2019 08:21:30 -0700 > net_hash_mix() currently uses kernel address of a struct net, > and is used in many places that could be used to reveal this > address to a patient attacker, thus defeating KASLR, for > the typical case (initial net namespace, &init_net i

Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca

2019-03-28 Thread David Miller
From: xiaofeis Date: Wed, 27 Mar 2019 11:59:06 +0800 > Add flow_dissect for qca tagged packet to get the right hash. > > Signed-off-by: Xiaofei Shen Applied.

Re: [PATCH net-next v4 2/2] openvswitch: Add timeout support to ct action

2019-03-28 Thread David Miller
From: Yi-Hung Wei Date: Tue, 26 Mar 2019 11:31:14 -0700 > Add support for fine-grain timeout support to conntrack action. > The new OVS_CT_ATTR_TIMEOUT attribute of the conntrack action > specifies a timeout to be associated with this connection. > If no timeout is specified, it acts as is, that

Re: [PATCH net-next v4 1/2] netfilter: Export nf_ct_{set,destroy}_timeout()

2019-03-28 Thread David Miller
From: Yi-Hung Wei Date: Tue, 26 Mar 2019 11:31:13 -0700 > This patch exports nf_ct_set_timeout() and nf_ct_destroy_timeout(). > The two functions are derived from xt_ct_destroy_timeout() and > xt_ct_set_timeout() in xt_CT.c, and moved to nf_conntrack_timeout.c > without any functional change. > I

Re: [PATCH ipsec-next 08/11] xfrm: remove output2 indirection from xfrm_mode

2019-03-28 Thread kbuild test robot
Hi Florian, I love your patch! Yet something to improve: [auto build test ERROR on ipsec-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Westphal/xfrm-remove-xfrm_mode-indirections/20190329-041949 base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.

Re: [PATCH net] net: tls: prevent false connection termination with offload

2019-03-28 Thread Jakub Kicinski
On Thu, 28 Mar 2019 14:54:43 -0700, Jakub Kicinski wrote: > Only decrypt_internal() performs zero copy on rx, all paths > which don't hit decrypt_internal() must set zc to false, > otherwise tls_sw_recvmsg() may return 0 causing the application > to believe that that connection got closed. > > Cur

[PATCH net] net: tls: prevent false connection termination with offload

2019-03-28 Thread Jakub Kicinski
Only decrypt_internal() performs zero copy on rx, all paths which don't hit decrypt_internal() must set zc to false, otherwise tls_sw_recvmsg() may return 0 causing the application to believe that that connection got closed. Currently this happens with device offload when new record is first read

Re: [patch net-next 00/12] net: expose switch ID via devlink

2019-03-28 Thread Jakub Kicinski
On Thu, 28 Mar 2019 22:12:42 +0100, Jiri Pirko wrote: > From: Jiri Pirko > > To provide visibility of the ports, this patchset exposes switch ID > for devlink ports, which are part of a switch. The rest of the ports > if any (in case of sr-iov for example) do not set switch ID. I don't feel good

Re: [PATCH ghak90 V5 09/10] audit: add support for containerid to network namespaces

2019-03-28 Thread Richard Guy Briggs
On 2019-03-28 11:46, Paul Moore wrote: > On Wed, Mar 27, 2019 at 9:12 PM Richard Guy Briggs wrote: > > > > On 2019-03-27 23:42, Ondrej Mosnacek wrote: > > > On Fri, Mar 15, 2019 at 7:35 PM Richard Guy Briggs > > > wrote: > > > > Audit events could happen in a network namespace outside of a task

Re: [PATCH net-next V4 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-28 Thread kbuild test robot
Hi Leandro, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Leandro-Dorileo/net-sched-taprio-cbs-Fix-using-invalid-link-speed/20190329-043825 config: alpha-allyesconfig (attached as .config) com

Re: [PATCH net-next V4 2/2] net/sched: cbs: fix port_rate miscalculation

2019-03-28 Thread kbuild test robot
Hi Leandro, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Leandro-Dorileo/net-sched-taprio-cbs-Fix-using-invalid-link-speed/20190329-043825 config: alpha-allyesconfig (attached as .config) com

[patch net-next 11/12] dsa: pass switch ID through devlink_port_attrs_set()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Leave ndo_get_port_parent_id implementation only for legacy. Signed-off-by: Jiri Pirko --- net/dsa/dsa2.c | 4 +++- net/dsa/slave.c | 1 - 2 files chan

[patch net-next 05/12] mlxsw: Remove ndo_get_port_parent_id implementation

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Remove implementation of get_port_parent_id ndo and rely on core calling into devlink for the information directly. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 13 - drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 13

[patch net-next 10/12] mlxsw: switch_ib: Pass valid HW id down to mlxsw_core_port_init()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Obtain HW id and pass it down to mlxsw_core_port_init() as it would be used as switch_id in devlink and exposed to user. Signed-off-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/switchib.c| 22 ++- 1 file changed, 21 insertions(+), 1 deletion(-) diff

[patch net-next 07/12] bnxt: remove ndo_get_port_parent_id implementation for physical ports

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Remove implementation of get_port_parent_id ndo and rely on core calling into devlink for the information directly. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnx

[patch net-next 08/12] nfp: pass switch ID through devlink_port_attrs_set()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/d

[patch net-next 12/12] net: devlink: add warning for ndo_get_port_parent_id set when not needed

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Currently if the driver registers devlink port instance, he should set the devlink port attributes as well. Then the devlink core is able to obtain switch id itself, no need for driver to implement the ndo. Once all drivers will implement devlink port registration, this ndo shoul

[patch net-next 09/12] nfp: remove ndo_get_port_parent_id implementation

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Remove implementation of get_port_parent_id ndo and rely on core calling into devlink for the information directly. Signed-off-by: Jiri Pirko --- .../net/ethernet/netronome/nfp/nfp_net_common.c | 1 - .../net/ethernet/netronome/nfp/nfp_net_repr.c| 1 - drivers/net/ether

[patch net-next 06/12] bnxt: pass switch ID through devlink_port_attrs_set()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko --- rfc->v1: - new patch --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 del

[patch net-next 03/12] net: devlink: introduce devlink_compat_switch_id_get() helper

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Introduce devlink_compat_switch_id_get() helper which fills up switch_id according to passed netdev pointer. Call it directly from dev_get_port_parent_id() as a fallback when ndo_get_port_parent_id is not defined for given netdev. Signed-off-by: Jiri Pirko --- rfc->v1: - don't

[patch net-next 04/12] mlxsw: Pass switch ID through devlink_port_attrs_set()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 6 -- drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++- driver

[patch net-next 02/12] net: devlink: extend port attrs for switch ID

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Extend devlink_port_attrs_set() to pass switch ID for ports which are part of switch and store it in port attrs. For other ports, this is NULL. During dump to userspace only valid switch ID is filled up. Note that this allows the driver to group devlink ports into one or more swi

[patch net-next 01/12] net: devlink: convert devlink_port_attrs bools to bits

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko In order to save space in the struct, convert bools to bits. Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli --- include/net/devlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/devlink.h b/include/net/devlink.h index 31d5cec4d

[patch net-next 00/12] net: expose switch ID via devlink

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko To provide visibility of the ports, this patchset exposes switch ID for devlink ports, which are part of a switch. The rest of the ports if any (in case of sr-iov for example) do not set switch ID. Jiri Pirko (12): net: devlink: convert devlink_port_attrs bools to bits net:

Re: [PATCH 4/4] ethtool: add PHY Fast Link Down tunable to man page

2019-03-28 Thread Heiner Kallweit
On 28.03.2019 21:01, Andrew Lunn wrote: >> +Sets the period after which the link is reported as down. Note that the >> PHY may choose >> +the closest supported value. Only on reading back you get the actual >> value. > > Hi Heiner > > 'Only on reading back the tunable do you get the act

Re: [PATCH 4/4] ethtool: add PHY Fast Link Down tunable to man page

2019-03-28 Thread Andrew Lunn
> + Sets the period after which the link is reported as down. Note that the > PHY may choose > + the closest supported value. Only on reading back you get the actual > value. Hi Heiner 'Only on reading back the tunable do you get the actual value.' would be better. > .TE > .PD > .R

Re: [net 0/5][pull request] Intel Wired LAN Driver Fixes 2019-03-26

2019-03-28 Thread David Miller
From: Jeff Kirsher Date: Tue, 26 Mar 2019 20:34:37 -0700 > This series contains updates to igb, ixgbe, i40e and fm10k. Pulled, thanks Jeff.

Re: [PATCH net-next 00/10] s390/qeth: updates 2019-03-28

2019-03-28 Thread David Miller
From: Julian Wiedmann Date: Thu, 28 Mar 2019 16:39:18 +0100 > please apply the following patchset to net-next. This reworks the control > IO code in qeth so that we no longer need to poll for cmd completion, > and refactors the IDX setup code to also use this improved IO path. Series applied, th

Re: [patch net-next v4 00/12] net: call for phys_port_name into devlink directly if possible

2019-03-28 Thread David Miller
From: Jiri Pirko Date: Thu, 28 Mar 2019 13:56:34 +0100 > From: Jiri Pirko > > phys_port_name may be assembled by a helper in devlink. It is currently > the case only for mlxsw driver. Benefit from the get_devlink_port ndo > and call into devlink directly from dev_get_phys_port_name(). That save

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-28 Thread Andrew Lunn
On Thu, Mar 28, 2019 at 05:59:50PM +, Petr Machata wrote: Hi Petr > - PHY driver: dev->phydev->drv->get_link_down_reason > Certain PHY drivers might want to have a custom handling for some > PHY-specific insight. Something like: > > modified include/linux/phy.h > @@ -636,4 +636

[PATCH 4/4] ethtool: add PHY Fast Link Down tunable to man page

2019-03-28 Thread Heiner Kallweit
Add description of new PHY tunable Fast Link Down to ethtool man page. Signed-off-by: Heiner Kallweit --- ethtool.8.in | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/ethtool.8.in b/ethtool.8.in index b878521..c2a97f2 100644 --- a/ethtool.8.in ++

[PATCH 2/4] ethtool: simplify handling of PHY tunable downshift

2019-03-28 Thread Heiner Kallweit
In preparation of adding support for Fast Link Down as PHY tunable let's simplify the handling of PHY tunable downshift a little. Signed-off-by: Heiner Kallweit --- ethtool.c | 43 +-- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/ethtool

[PATCH 1/4] ethtool: sync ethtool-copy.h with linux-next from 03/28/2019

2019-03-28 Thread Heiner Kallweit
Sync ethtool-copy.h with linux-next from 03/28/2019. This provides access to the new PHY tunable for Fast Link Down support. Signed-off-by: Heiner Kallweit --- ethtool-copy.h | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ethtoo

[PATCH 3/4] ethtool: add support for PHY tunable Fast Link Down

2019-03-28 Thread Heiner Kallweit
This patch adds support for PHY tunable Fast Link Down. Like downshift it uses an u8 parameter. Signed-off-by: Heiner Kallweit --- ethtool.c | 55 +-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/ethtool.c b/ethtool.c index f6

[PATCH 0/4] ethtool: add support for new PHY tunable Fast Link Down

2019-03-28 Thread Heiner Kallweit
This series adds support for Fast Link Down as new PHY tunable. See [0] for the kernel part incl. the Marvell PHY driver as first user. [0] https://marc.info/?t=15535390081&r=1&w=2 Heiner Kallweit (4): ethtool: sync ethtool-copy.h with linux-next from 03/28/2019 ethtool: simplify handling

Re: [PATCH v3 net-next 13/13] net: Use common nexthop init and release helpers

2019-03-28 Thread David Ahern
On 3/28/19 9:50 AM, Alexei Starovoitov wrote: > > patch 5 isn't pretty still and you didn't answer my question > why pointer to fib6_flags is worse than duplicated check. fib6_flags (prefix flags) has nothing to do with a fib6_nh initialization, and I do want to add a 6th input argument for somet

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-28 Thread Petr Machata
Andrew Lunn writes: > I argued this is a PHY layer status information. We don't really want > to have to modify every MAC driver to call into phylib/phylink. Yes, > we can have a netdev_ops for those drivers which ignore the Linux PHY > layer, but ideally we want to transparently call into the

Re: [patch net-next v4 10/12] dsa: do not support ndo_get_phys_port_name for non-legacy ports

2019-03-28 Thread Florian Fainelli
On 3/28/19 5:56 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Since each non-legacy slave has its own devlink port instance > correctly set, rely on devlink core to generate correct phys port name. > > Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli -- Florian

Re: [patch net-next v4 09/12] dsa: implement ndo_get_devlink_port

2019-03-28 Thread Florian Fainelli
On 3/28/19 5:56 AM, Jiri Pirko wrote: > From: Jiri Pirko > > In order for devlink compat functions to work, implement > ndo_get_devlink_port. Legacy slaves does not have devlink port instances > created for themselves. > > Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli Thanks for ma

Re: [PATCHv3 net-next] sched: add dualpi2 scheduler module

2019-03-28 Thread Stephen Hemminger
On Thu, 28 Mar 2019 09:12:19 +0100 Olga Albisser wrote: > Additional details can be found in the draft: > https://www.ietf.org/id/draft-ietf-tsvwg-aqm-dualq-coupled > > Signed-off-by: Olga Albisser > Signed-off-by: Koen De Schepper > Signed-off-by: Oliver Tilmans > Signed-off-by: Bob Briscoe

Re: [PATCH v2 2/2] samples, selftests/bpf: add NULL check for ksym_search

2019-03-28 Thread Daniel Borkmann
On 03/27/2019 03:45 PM, Daniel T. Lee wrote: > Since, ksym_search added with verification logic for symbols existence, > it could return NULL when the kernel symbols are not loaded. > > This commit will add NULL check logic after ksym_search. > > Signed-off-by: Daniel T. Lee > --- > Changes in v

[PATCH net-next] selftests: tc-testing: Add pedit tests

2019-03-28 Thread Dmytro Linkin
Add 36 pedit action tests to check pedit options described in tc-pedit(8) man page. Test cases can be specified by categories: actions, pedit, raw_op, layered_op. RAW_OP cases check offset option for u8, u16 and u32 offset size. LAYERED_OP cases check fields option for eth, ip, ip6, tcp and udp hea

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

2019-03-28 Thread Daniel Borkmann
On 03/28/2019 12:33 PM, luca.bocca...@gmail.com wrote: > 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 > Acked-by: Andrey Ignatov Applied, thanks!

Re: [PATCH bpf] bpf, libbpf: fix quiet install_headers

2019-03-28 Thread Andrii Nakryiko
On Thu, Mar 28, 2019 at 8:54 AM Daniel Borkmann wrote: > > Both btf.h and xsk.h headers are not installed quietly due to > missing '\' for the call to QUIET_INSTALL. Lets fix it. > > Before: > > # make install_headers > INSTALL headers > if [ ! -d '''/usr/local/include/bpf' ]; then instal

Re: [PATCH bpf 0/2] libbpf: minor packaging fixes

2019-03-28 Thread Björn Töpel
On Thu, 28 Mar 2019 at 16:39, Daniel Borkmann wrote: > > On 03/27/2019 02:51 PM, Björn Töpel wrote: > > The DPDK project is moving forward with its AF_XDP PMD, and during > > that process some libbpf issues surfaced [1]. > > Great to hear! > > > This series address two, minor, packaging issues for

[PATCH net 1/2] net: sched: introduce and use qstats read helpers

2019-03-28 Thread Paolo Abeni
Classful qdiscs can't access directly the child qdiscs backlog length: if such qdisc is NOLOCK, per CPU values should be accounted instead. Most qdiscs no not respect the above. As a result, qstats fetching for most classful qdisc is currently incorrect: if the child qdisc is NOLOCK, it always rep

[PATCH net 0/2] net: sched: fix stats accounting for child NOLOCK qdiscs

2019-03-28 Thread Paolo Abeni
Currently, stats accounting for NOLOCK qdisc enslaved to classful (lock) qdiscs is buggy. Per CPU values are ignored in most places, as a result, stats dump in the above scenario always report 0 length backlog and parent backlog len is not updated correctly on NOLOCK qdisc removal. The first patch

[PATCH bpf] bpf, libbpf: fix quiet install_headers

2019-03-28 Thread Daniel Borkmann
Both btf.h and xsk.h headers are not installed quietly due to missing '\' for the call to QUIET_INSTALL. Lets fix it. Before: # make install_headers INSTALL headers if [ ! -d '''/usr/local/include/bpf' ]; then install -d -m 755 '''/usr/local/include/bpf'; fi; install btf.h -m 644 '''/us

[PATCH net 2/2] net: sched: introduce and use qdisc tree flush/purge helpers

2019-03-28 Thread Paolo Abeni
The same code to flush qdisc tree and purge the qdisc queue is duplicated in many places and in most cases it does not respect NOLOCK qdisc: the global backlog len is used and the per CPU values are ignored. This change addresses the above, factoring-out the relevant code and using the helpers int

Re: [PATCH v3 net-next 13/13] net: Use common nexthop init and release helpers

2019-03-28 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 08:53:58PM -0700, David Ahern wrote: > From: David Ahern > > With fib_nh_common in place, move common initialization and release > code into helpers used by both ipv4 and ipv6. For the moment, the init > is just the lwt encap and the release is both the netdev reference an

[PATCH net-next 10/10] s390/qeth: send IDX cmds via qeth_send_control_data()

2019-03-28 Thread Julian Wiedmann
This converts the IDX code to use qeth_send_control_data(), replacing a bunch of duplicated IO code and unbounded waits. It also allows the IDX sequence to benefit from the improved timeout & notify infrastructure, so that we can eliminate the DOWN -> ACTIVATING -> UP transition in the channel stat

[PATCH net-next 07/10] s390/qeth: clarify default cmd callback

2019-03-28 Thread Julian Wiedmann
Current code makes it look like qeth_send_control_data_cb() is some sort of default callback for all cmds. But in practice, it is only used for half of the cmd buffers we issue. Reduce the confusion by only setting this callback for cmds that actually want it, and while at it give the callback a na

[PATCH net-next 01/10] s390/qeth: defer RX modesetting

2019-03-28 Thread Julian Wiedmann
.ndo_set_rx_mode gets called in process context, but while holding the addr_list spinlock. Which means we currently can't sleep while re-programming the HW, and need to poll for IO completion. That's bad, in particular since receiving the cmd response can fail silently and we're then polling until

[PATCH 5/5] batman-adv: Fix genl notification for throughput_override

2019-03-28 Thread Simon Wunderlich
From: Sven Eckelmann The throughput_override sysfs file is not below the meshif but below a hardif. The kobj has therefore not a pointer which can be used to find the batadv_priv data. The pointer stored in the hardif object must be used instead to find the correct meshif private data. Fixes: 7e

[PATCH net-next 08/10] s390/qeth: let qeth_notify_reply() set the notify reason

2019-03-28 Thread Julian Wiedmann
As trivial cleanup before adding more users to qeth_notify_reply(), move the setup of reply->rc from the caller into the helper. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/driver

[PATCH net-next 02/10] s390/qeth: remove locking for RX modeset cache

2019-03-28 Thread Julian Wiedmann
The L2 and L3 .ndo_set_rx_mode callbacks maintain an address cache to decide which addresses have changed since the last modeset. When the card is set offline, qeth_l?_stop_card() drains this cache. This happens only after 1) the net_device has been detached, and 2) any pending RX modeset has comp

Re: [PATCH v3 34/36] thunderbolt: Make rest of the logging to happen at debug level

2019-03-28 Thread Joe Perches
On Thu, 2019-03-28 at 15:36 +0300, Mika Westerberg wrote: > Now that the driver can handle every possible tunnel types there is no > point to log everything as info level so turn these to happen at debug > level instead. trivia: > diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path

[PATCH net-next 09/10] s390/qeth: use callback to finalize cmd

2019-03-28 Thread Julian Wiedmann
To avoid concurrency issues, some parts of the cmd setup are delayed until qeth_send_control_data() holds the IO channel's irq_pending "lock". Rather than hard-coding those setup steps for each cmd type, have the cmd provide a callback. This will make it easier to also issue IDX commands via qeth_s

[PATCH net-next 05/10] s390/qeth: convert IP table spinlock to mutex

2019-03-28 Thread Julian Wiedmann
All users of the lock are running in process context now. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 2 +- drivers/s390/net/qeth_core_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 34 +- drivers/s390/net/qeth_l3_sys.c| 20

[PATCH net-next 04/10] s390/qeth: defer IPv6 address notifier events

2019-03-28 Thread Julian Wiedmann
The inet6addr_chain is atomic. So instead of starting the cmd IO for SETIP / DELIP straight from the notifier callback, run it from a workqueue. This is the last step towards removal of cmd IO completion polling. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 1 + driver

[PATCH net-next 06/10] s390/qeth: don't poll for cmd IO completion

2019-03-28 Thread Julian Wiedmann
All callers are running in process context now, so we can safely sleep in qeth_send_control_data() while waiting for a cmd to complete. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 11 +-- drivers/s390/net/qeth_core_main.c | 60 --

[PATCH net-next 03/10] s390/qeth: add wrapper for IP table access

2019-03-28 Thread Julian Wiedmann
Extract a little helper, so that high-level callers can manipulate the IP table without worrying about the locking. This will make it easier to convert the code to a different locking primitive later on. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l3_main.c | 33 +---

[PATCH net-next 00/10] s390/qeth: updates 2019-03-28

2019-03-28 Thread Julian Wiedmann
Hi Dave, please apply the following patchset to net-next. This reworks the control IO code in qeth so that we no longer need to poll for cmd completion, and refactors the IDX setup code to also use this improved IO path. Thanks, Julian Julian Wiedmann (10): s390/qeth: defer RX modesetting s

Re: [PATCH bpf 0/2] libbpf: minor packaging fixes

2019-03-28 Thread Daniel Borkmann
On 03/27/2019 02:51 PM, Björn Töpel wrote: > The DPDK project is moving forward with its AF_XDP PMD, and during > that process some libbpf issues surfaced [1]. Great to hear! > This series address two, minor, packaging issues for libbpf. The > header file xsk.h was missing from the instal_headers

[net-next, PATCH 2/2] net: page_pool: add helper funtion to unmap dma addresses

2019-03-28 Thread Ilias Apalodimas
The page_pool API has no users for it's DMA capabilities yet. Unmapping DMA addresses used by network drivers will be needed for real users. commit 1567b85eb8ad ("net: page_pool: don't use page->private to store dma_addr_t") uses 'struct page' to store the addresses. This patch provides a helper

[net-next, PATCH 1/2] net: page_pool: add helper funtion to retrieve dma addresses

2019-03-28 Thread Ilias Apalodimas
The page_pool API has no users for it's DMA capabilities yet. Retrieving DMA addresses used by network drivers will be needed for real users. commit 1567b85eb8ad ("net: page_pool: don't use page->private to store dma_addr_t") uses 'struct page' to store the addresses. This patch provides a helper

Re: New xdpsock sample

2019-03-28 Thread Jonathan Lemon
> On Mar 28, 2019, at 5:35 AM, Björn Töpel wrote: > > Magnus and I took the route to simplify the sample, to make it easier > for new users. I still think that was the right path. Should there be > a sample showcasing all the knobs/pulleys? One problem I ran into yesterday is that the bpf prog

Re: [PATCH ipsec-next 09/11] xfrm: remove afinfo pointer from xfrm_mode

2019-03-28 Thread Sabrina Dubroca
(just a couple of checkpatch-like comments) 2019-03-27, 18:31:38 +0100, Florian Westphal wrote: > diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c > index 6802d1aee424..cff048ad8562 100644 > --- a/net/ipv4/xfrm4_output.c > +++ b/net/ipv4/xfrm4_output.c > @@ -72,6 +72,8 @@ int xfrm4_o

[PATCH rdma-next 11/12] RDMA/mlx5: Move to single device multiport ports in switchdev mode

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Move from IB device (representor) per virtual function to single IB device with port per virtual function (port 1 represents the uplink). As number of ports is a static property of an IB device, declare the IB device with as many port as the possible according to the PCI bus. Si

[PATCH rdma-next 07/12] RDMA/mlx5: Move rep into port struct

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch In preparation of moving into a model of single IB device multiple ports move rep to be part of the port structure. We mark a representor device by setting is_rep, no functional change with this patch. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infin

[PATCH rdma-next 08/12] RDMA/mlx5: Move default representors SQ steering to rule to modify QP

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Currently the steering for SQs created on representors is done on creation, once we move to representors as ports of an IB device we need the port argument which is given only at the modify QP stage, adjust the code appropriately. Signed-off-by: Mark Bloch Signed-off-by: Leon R

[PATCH rdma-next 09/12] RDMA/mlx5: Refactor netdev affinity code

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch The design of representors is such that once an IB representor is created, the netdev of representor already exists, we can use that fact to simplify the netdev affinity code. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c |

[PATCH rdma-next 12/12] RDMA/mlx5: Remove VF representor profile

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Now that we have a single IB device with multipul ports we can remove the VF representor profile. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 39 --- drivers/infiniband/hw/mlx5/main.c| 46

[PATCH rdma-next 06/12] RDMA/mlx5: Use correct size for device resources

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch On allocation we use the array size and on destruction num_ports, use the array size of destruction as well, in this context the array corresponds to the native/actual ports on the NIC so no need to adjust this logic for representors. Signed-off-by: Mark Bloch Signed-off-by: Le

[PATCH rdma-next 10/12] RDMA/mlx5: Move SMI caps logic

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch We store the SMI information in the core device's struct, make sure we set that information only once (and not per port), while here make the for loop based on the actual size of the array. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx

[PATCH rdma-next 05/12] RDMA/mlx5: Move ports allocation to outside of INIT stage

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch In downstream patches we will need access to the ports before doing any stages, in order to set net device per representor. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 12 ++-- drivers/infiniband/hw/mlx5/main.c

[PATCH rdma-next 04/12] RDMA/mlx5: Free IB device on remove

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Simplify the code and move the deallocation of the IB device into the remove function. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 5 + drivers/infiniband/hw/mlx5/main.c | 4 ++-- 2 files changed, 3 insertions(+), 6

[PATCH mlx5-next 02/12] net/mlx5: E-Switch, add a new prio to be used by the RDMA side

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Create a new prio in the FDB, it will be used when inserting steering rules into the FDB from the RDMA side. We create a new PRIO so rules from the net side and rules from the RDMA side won't be inserted to the same PRIO, each side has it's own sandbox to play in. Signed-off-by:

[PATCH rdma-next 03/12] RDMA/mlx5: Move netdev info into the port struct

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Netdev info is stored in a separate array and holds data relevant on a per port basis, move it to be part of the port struct. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c| 30 ++-- drivers/infiniban

[PATCH mlx5-next 01/12] net/mlx5: E-Switch, don't use hardcoded values for FDB prios

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch When creating the FDB prios, use the enum values already defined and not the hardcoded values. Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 - drivers/net/ethernet/m

[PATCH rdma-next 00/12] Move IB representors to single IB device multiple ports

2019-03-28 Thread Leon Romanovsky
From: Leon Romanovsky >From Mark, Hi, This series starts from two refactoring patches performed in mlx5_core and they are part of a larger series intended to expose the ability to insert FDB steering rules by the RDMA side. They are followed by patches which move IB representors to single IB d

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-28 Thread Willem de Bruijn
> > > > > > > > > If skb_vlan_tag_present(skb) returns true, we set proto to > > > > > > > > > skb->protocol > > > > > > > > > and move on. > > > > > > > > > > > > > > > > > > But, we would need vlan_proto/present/tci in the flow_keys in > > > > > > > > > the future. > > > > > > > > > We don't cu

  1   2   >