Re: [RFC v3 0/3] Add VRF support for VXLAN underlay

2018-11-20 Thread David Ahern
On 11/20/18 7:23 AM, Alexis Bauvin wrote: > We are trying to isolate the VXLAN traffic from different VMs with VRF as > shown > in the schemas below: > > +-+ ++ > | +--+| | ++ | > | | |

[PATCH bpf-next v2] bpf: fix a compilation error when CONFIG_BPF_SYSCALL is not defined

2018-11-20 Thread Yonghong Song
Kernel test robot (l...@intel.com) reports a compilation error at https://www.spinics.net/lists/netdev/msg534913.html introduced by commit 838e96904ff3 ("bpf: Introduce bpf_func_info"). If CONFIG_BPF is defined and CONFIG_BPF_SYSCALL is not defined, the following error will appear:

[PATCH mlx5-next 06/11] net/mlx5: FWPage, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_core_req_pages_handler on MLX5_EVENT_TYPE_PAGE_REQUEST and let FW page logic to register its own handler when its ready. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 11 - .../net/ethernet/mellanox/mlx5/core/main.c|

[PATCH mlx5-next 05/11] net/mlx5: E-Switch, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_eswitch_vport_event on MLX5_EVENT_TYPE_NIC_VPORT_CHANGE and let the eswitch register its own handler when its ready. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 4 -- .../net/ethernet/mellanox/mlx5/core/eswitch.c | 44

[PATCH mlx5-next 11/11] net/mlx5: Improve core device events handling

2018-11-20 Thread Saeed Mahameed
Register a separate handler per event type, rather than listening for all events and looking for the events to handle in a switch case. Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/events.c | 223 +++--- 1 file changed, 136 insertions(+), 87 deletions(-)

[PATCH mlx5-next 07/11] net/mlx5: CmdIF, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_cmd_comp_handler on MLX5_EVENT_TYPE_CMD and let command interface to register its own handler when its ready. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 48 ++- drivers/net/ethernet/mellanox/mlx5/core/eq.c

[PATCH mlx5-next 02/11] net/mlx5: FWTrace, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_fw_tracer_event on MLX5_EVENT_TYPE_DEVICE_TRACER and let fw tracer to register its own handler when its ready. Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 27 ++- .../mellanox/mlx5/core/diag/fw_tracer.h

[PATCH mlx5-next 00/11] mlx5 core internal firmware events handling improvements

2018-11-20 Thread Saeed Mahameed
Hi This patchset is for mlx5-next shared branch, and will be applied there once the review is done. The main idea of this change is to define a flexible scalable and simpler low level mlx5 core APIs to upper level components for better features decoupling and maximum code locality and

[PATCH mlx5-next 09/11] net/mlx5: CQ ERR, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_eq_cq_event on MLX5_EVENT_TYPE_CQ_ERROR and register a specific CQ ERROR handler via the new API. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 66 +--- 1 file changed, 44 insertions(+), 22 deletions(-) diff

Re: [PATCH net v2] net/sched: act_police: fix race condition on state variables

2018-11-20 Thread Cong Wang
On Tue, Nov 20, 2018 at 1:19 PM Davide Caratti wrote: > > after 'police' configuration parameters were converted to use RCU instead > of spinlock, the state variables used to compute the traffic rate (namely > 'tcfp_toks', 'tcfp_ptoks' and 'tcfp_t_c') are erroneously read/updated in > the traffic

[PATCH bpf-next v2 2/2] bpf: libbpf: move map name retry into libbpf.c

2018-11-20 Thread Stanislav Fomichev
To be in line with the previous commit ("bpf: libbpf: retry program creation without the name"), do the retry at the higher level, not the syscall level. Signed-off-by: Stanislav Fomichev --- tools/lib/bpf/bpf.c| 11 +-- tools/lib/bpf/libbpf.c | 11 +++ 2 files changed, 12

[PATCH bpf-next v2 1/2] bpf: libbpf: retry program creation without the name

2018-11-20 Thread Stanislav Fomichev
[Recent commit 23499442c319 ("bpf: libbpf: retry map creation without the name") fixed this issue for maps, let's do the same for programs.] Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name for programs. Pre

Re: [PATCH v2 3/4] libbpf: require size hint in bpf_prog_test_run

2018-11-20 Thread Lorenz Bauer
On Tue, 20 Nov 2018 at 19:18, Alexei Starovoitov wrote: > > On Tue, Nov 20, 2018 at 03:43:05PM +, Lorenz Bauer wrote: > > Require size_out to be non-NULL if data_out is given. This prevents > > accidental overwriting of process memory after the output buffer. > > > > Adjust callers of

[net-next 04/11] ice: Do not set LAN_EN for MAC-VLAN filters

2018-11-20 Thread Jeff Kirsher
From: Yashaswini Raghuram Prathivadi Bhayankaram In the action fields for a MAC-VLAN filter, do not set the LAN_EN flag if the MAC in the MAC-VLAN is unicast MAC. The unicast packets that match should not be forwarded to the wire. Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram

[net-next 02/11] ice: Cleanup duplicate control queue code

2018-11-20 Thread Jeff Kirsher
From: Bruce Allan 1. Assigning the register offset and mask values contains duplicate code that can easily be replaced with a macro. 2. Separate functions for freeing send queue and receive queue rings are not needed; replace with a single function that uses a pointer to the struct

[net-next 08/11] ice: Cleanup short function signatures

2018-11-20 Thread Jeff Kirsher
From: Bruce Allan Function signatures that do not exceed 80-characters should be on a single line. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_common.c | 3 +--

[PATCH net] MAINTAINERS: add myself as co-maintainer for r8169

2018-11-20 Thread Heiner Kallweit
Meanwhile I know the driver quite well and I refactored bigger parts of it. As a result people contact me already with r8169 questions. Therefore I'd volunteer to become co-maintainer of the driver also officially. Signed-off-by: Heiner Kallweit --- MAINTAINERS | 1 + 1 file changed, 1

[net-next 09/11] ice: Cosmetic formatting changes

2018-11-20 Thread Jeff Kirsher
From: Anirudh Venkataramanan 1. Fix several cases of double spacing 2. Fix typos 3. Capitalize abbreviations Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice.h | 10 +--

[net-next 10/11] ice: Use Tx|Rx in comments

2018-11-20 Thread Jeff Kirsher
From: Anirudh Venkataramanan In code comments, use Tx|Rx instead of tx|rx Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice.h | 20 +- drivers/net/ethernet/intel/ice/ice_common.c | 6

[net-next 03/11] ice: Pass the return value of ice_init_def_sw_recp()

2018-11-20 Thread Jeff Kirsher
From: Jaroslaw Ilgiewicz Added check of return value for ice_init_def_sw_recp(). Now we know if memory was correctly allocated. Signed-off-by: Jaroslaw Ilgiewicz Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

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

2018-11-20 Thread Jeff Kirsher
This series contains updates to the ice driver only. Akeem updates the driver to determine whether or not to do auto-negotiation based on the VSI state. Bruce cleans up the control queue code to remove duplicate code. Take advantage of some compiler optimizations by making some structures

[net-next 05/11] ice: Constify global structures that can/should be

2018-11-20 Thread Jeff Kirsher
From: Bruce Allan Indicate these structs should not be modified and take advantage of some compiler optimizations by making these structs const. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 11/11] ice: Fix possible NULL pointer de-reference

2018-11-20 Thread Jeff Kirsher
From: Bruce Allan A recent update to smatch is causing it to report the error "we previously assumed 'm_entry->vsi_list_info' could be null". Fix that. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 07/11] ice: Cleanup ice_tx_timeout()

2018-11-20 Thread Jeff Kirsher
From: Bruce Allan Clean up number of formatting issues and a comment that could use clarification. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 22 +-

[net-next 06/11] ice: Fix return value from NAPI poll

2018-11-20 Thread Jeff Kirsher
From: Dave Ertman ice_napi_poll is hard-coded to return zero when it's done. It should instead return the work done (if any work was done). The only time it should return zero is if an interrupt or poll is handled and no work is performed. So change the return value to be the minimum of work

[net-next 01/11] ice: Do autoneg based on VSI state

2018-11-20 Thread Jeff Kirsher
From: Akeem G Abodunrin If VSI state is up, we should do autoneg with link up, otherwise with link down. Signed-off-by: Akeem G Abodunrin Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 10

Re: [PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-20 Thread Alexei Starovoitov
On Mon, Nov 19, 2018 at 04:46:25PM -0800, Stanislav Fomichev wrote: > [Recent commit 23499442c319 ("bpf: libbpf: retry map creation without > the name") fixed this issue for maps, let's do the same for programs.] > > Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support > to specify

[PATCH v3 bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-20 Thread Nikita V. Shirokov
in this patch series i'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). first patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example of usage v2->v3: -

[PATCH v3 bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-20 Thread Nikita V. Shirokov
adding test/example of bpf_map__add_inner_map_fd usage Signed-off-by: Nikita V. Shirokov Acked-by: Yonghong Song --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/test_mapinmap.c | 49 + tools/testing/selftests/bpf/test_maps.c | 82

[PATCH v3 bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-20 Thread Nikita V. Shirokov
idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3)

Re: [PATCH v5 bpf-next 05/13] bpf: Introduce bpf_func_info

2018-11-20 Thread kbuild test robot
Hi Yonghong, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-Add-btf-func-info-support/20181120-181333 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Re: [PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-20 Thread Stanislav Fomichev
On 11/20, Alexei Starovoitov wrote: > On Mon, Nov 19, 2018 at 04:46:25PM -0800, Stanislav Fomichev wrote: > > [Recent commit 23499442c319 ("bpf: libbpf: retry map creation without > > the name") fixed this issue for maps, let's do the same for programs.] > > > > Since commit 88cda1c9da02 ("bpf:

[PATCH net v2] net/sched: act_police: fix race condition on state variables

2018-11-20 Thread Davide Caratti
after 'police' configuration parameters were converted to use RCU instead of spinlock, the state variables used to compute the traffic rate (namely 'tcfp_toks', 'tcfp_ptoks' and 'tcfp_t_c') are erroneously read/updated in the traffic path without any protection. Use a dedicated spinlock to avoid

Re: [PATCH v3 bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-20 Thread Alexei Starovoitov
On Mon, Nov 19, 2018 at 10:42:21PM -0800, Nikita V. Shirokov wrote: > idea is pretty simple. for specified map (pointed by struct bpf_map) > we would provide descriptor of already loaded map, which is going to be > used as a prototype for inner map. proposed workflow: > 1) open bpf's object

Re: [PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-20 Thread David Ahern
On 11/19/18 6:40 PM, Jakub Kicinski wrote: > On Mon, 19 Nov 2018 17:18:42 -0800, Stephen Hemminger wrote: >>> void jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short >>> num) >>> { >>> jsonw_name(self, prop); >> >> Do you really need this? it turns out that because of C

Re: [PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-20 Thread Daniel Borkmann
On 11/21/2018 12:04 AM, Alexei Starovoitov wrote: > On Tue, Nov 20, 2018 at 01:19:05PM -0800, Stanislav Fomichev wrote: >> On 11/20, Alexei Starovoitov wrote: >>> On Mon, Nov 19, 2018 at 04:46:25PM -0800, Stanislav Fomichev wrote: [Recent commit 23499442c319 ("bpf: libbpf: retry map creation

Re: [PATCH bpf-next] libbpf: make sure bpf headers are c++ include-able

2018-11-20 Thread Y Song
On Tue, Nov 20, 2018 at 10:19 AM Stanislav Fomichev wrote: > > Wrap headers in extern "C", to turn off C++ mangling. > This simplifies including libbpf in c++ and linking against it. > > Signed-off-by: Stanislav Fomichev > --- > tools/lib/bpf/bpf.h| 9 + > tools/lib/bpf/libbpf.h | 9

Re: [PATCH bpf-next] libbpf: make sure bpf headers are c++ include-able

2018-11-20 Thread Stanislav Fomichev
On 11/20, Y Song wrote: > On Tue, Nov 20, 2018 at 10:19 AM Stanislav Fomichev wrote: > > > > Wrap headers in extern "C", to turn off C++ mangling. > > This simplifies including libbpf in c++ and linking against it. > > > > Signed-off-by: Stanislav Fomichev > > --- > > tools/lib/bpf/bpf.h| 9

Re: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Andrew Lunn
> Andrew, > > Admittedly, my knowledge of what the kernel is doing behind the > scenes is limited. Me too. Lets see if anybody can make sense of the information you provided. Thanks Andrew

Re: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Florian Fainelli
On 11/20/18 1:39 PM, bryan.whiteh...@microchip.com wrote: >> -Original Message- >> From: Andrew Lunn >> Sent: Tuesday, November 20, 2018 2:31 PM >> To: Bryan Whitehead - C21958 >> Cc: da...@davemloft.net; netdev@vger.kernel.org; UNGLinuxDriver >> >> Subject: Re: [PATCH v1 net] lan743x:

Re: [PATCH bpf-next v2] libbpf: make sure bpf headers are c++ include-able

2018-11-20 Thread Y Song
On Tue, Nov 20, 2018 at 1:37 PM Stanislav Fomichev wrote: > > Wrap headers in extern "C", to turn off C++ mangling. > This simplifies including libbpf in c++ and linking against it. > > v2 changes: > * do the same for btf.h > > Signed-off-by: Stanislav Fomichev Acked-by: Yonghong Song > --- >

Re: [PATCH iproute2 22/22] rdma: make local functions static

2018-11-20 Thread David Ahern
On 11/15/18 3:36 PM, Stephen Hemminger wrote: > Several functions only used inside utils.c > > Signed-off-by: Stephen Hemminger > --- > rdma/rdma.h | 11 --- > rdma/utils.c | 12 ++-- > 2 files changed, 6 insertions(+), 17 deletions(-) > this patch breaks builds for me on

RE: [PATCH net-next 2/4] net/hyperv: use skb_vlan_tag_*() helpers

2018-11-20 Thread Haiyang Zhang
> -Original Message- > From: Michał Mirosław > Sent: Tuesday, November 20, 2018 7:21 AM > To: netdev@vger.kernel.org > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; de...@linuxdriverproject.org; Ajit Khaparde > ; Leon Romanovsky ; > linux-r...@vger.kernel.org; Saeed

RE: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Bryan.Whitehead
> -Original Message- > From: Andrew Lunn > Sent: Tuesday, November 20, 2018 2:31 PM > To: Bryan Whitehead - C21958 > Cc: da...@davemloft.net; netdev@vger.kernel.org; UNGLinuxDriver > > Subject: Re: [PATCH v1 net] lan743x: fix return value for > lan743x_tx_napi_poll > > On Tue, Nov 20,

Re: [PATCH net v2] net/sched: act_police: fix race condition on state variables

2018-11-20 Thread Eric Dumazet
On Tue, Nov 20, 2018 at 1:19 PM Davide Caratti wrote: > > after 'police' configuration parameters were converted to use RCU instead > of spinlock, the state variables used to compute the traffic rate (namely > 'tcfp_toks', 'tcfp_ptoks' and 'tcfp_t_c') are erroneously read/updated in > the traffic

[PATCH bpf-next] bpf: fix a compilation error when CONFIG_BPF_SYSCALL is not defined

2018-11-20 Thread Yonghong Song
Kernel test robot (l...@intel.com) reports a compilation error at https://www.spinics.net/lists/netdev/msg534913.html introduced by commit 838e96904ff3 ("bpf: Introduce bpf_func_info"). If CONFIG_BPF is defined and CONFIG_BPF_SYSCALL is not defined, the following error will appear:

Re: [PATCH v2 3/4] libbpf: require size hint in bpf_prog_test_run

2018-11-20 Thread Alexei Starovoitov
On Tue, Nov 20, 2018 at 07:43:57PM +, Lorenz Bauer wrote: > On Tue, 20 Nov 2018 at 19:18, Alexei Starovoitov > wrote: > > > > On Tue, Nov 20, 2018 at 03:43:05PM +, Lorenz Bauer wrote: > > > Require size_out to be non-NULL if data_out is given. This prevents > > > accidental overwriting of

Re: [iproute2-next PATCH v3 2/2] man: tc-flower: Add explanation for range option

2018-11-20 Thread David Ahern
On 11/15/18 5:55 PM, Amritha Nambiar wrote: > Add details explaining filtering based on port ranges. > > Signed-off-by: Amritha Nambiar > --- > man/man8/tc-flower.8 | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/man/man8/tc-flower.8

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-20 Thread Paweł Staszewski
W dniu 19.11.2018 o 22:59, David Ahern pisze: On 11/9/18 5:06 PM, David Ahern wrote: On 11/9/18 9:21 AM, David Ahern wrote: Is there possible to add only counters from xdp for vlans ? This will help me in testing. I will take a look today at adding counters that you can dump using bpftool.

Re: [iproute2-next PATCH v3 1/2] tc: flower: Classify packets based port ranges

2018-11-20 Thread David Ahern
On 11/15/18 5:55 PM, Amritha Nambiar wrote: > Added support for filtering based on port ranges. > UAPI changes have been accepted into net-next. > > Example: > 1. Match on a port range: > - > $ tc filter add dev enp4s0 protocol ip parent :\ > prio 1 flower ip_proto

Re: [PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-20 Thread Alexei Starovoitov
On Tue, Nov 20, 2018 at 01:19:05PM -0800, Stanislav Fomichev wrote: > On 11/20, Alexei Starovoitov wrote: > > On Mon, Nov 19, 2018 at 04:46:25PM -0800, Stanislav Fomichev wrote: > > > [Recent commit 23499442c319 ("bpf: libbpf: retry map creation without > > > the name") fixed this issue for maps,

Re: [PATCH v2 3/4] libbpf: require size hint in bpf_prog_test_run

2018-11-20 Thread Alexei Starovoitov
On Tue, Nov 20, 2018 at 03:43:05PM +, Lorenz Bauer wrote: > Require size_out to be non-NULL if data_out is given. This prevents > accidental overwriting of process memory after the output buffer. > > Adjust callers of bpf_prog_test_run to this behaviour. > > Signed-off-by: Lorenz Bauer >

Re: [PATCH net] MAINTAINERS: add myself as co-maintainer for r8169

2018-11-20 Thread David Miller
From: Heiner Kallweit Date: Tue, 20 Nov 2018 21:22:50 +0100 > Meanwhile I know the driver quite well and I refactored bigger parts > of it. As a result people contact me already with r8169 questions. > Therefore I'd volunteer to become co-maintainer of the driver also > officially. > >

Re: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Andrew Lunn
On Tue, Nov 20, 2018 at 01:26:43PM -0500, Bryan Whitehead wrote: > It has been noticed that under stress the lan743x driver will > sometimes hang or cause a kernel panic. It has been noticed > that returning '0' instead of 'weight' fixes this issue. > > fixes: rare kernel panic under heavy

[PATCH mlx5-next 04/11] net/mlx5: Clock, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_pps_event on MLX5_EVENT_TYPE_PPS_EVENT and let clock logic to register its own handler when its ready. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 4 .../ethernet/mellanox/mlx5/core/lib/clock.c | 24

[PATCH mlx5-next 08/11] net/mlx5: Resource tables, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to QP/SRQ resources events handlers on several FW events and let resources logic register resources events notifiers via the new API. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 29

[PATCH mlx5-next 03/11] net/mlx5: FPGA, Use async events chain

2018-11-20 Thread Saeed Mahameed
Remove the explicit call to mlx5_fpga_event on MLX5_EVENT_TYPE_FPGA_ERROR or MLX5_EVENT_TYPE_FPGA_QP_ERROR let fpga core to register its own handler when its ready. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 5 ---

[PATCH mlx5-next 01/11] net/mlx5: EQ, Introduce atomic notifier chain subscription API

2018-11-20 Thread Saeed Mahameed
Use atomic_notifier_chain to fire firmware events at internal mlx5 core components such as eswitch/fpga/clock/FW tracer/etc.., this is to avoid explicit calls from low level mlx5_core to upper components and to simplify the mlx5_core API for future developments. Simply provide register/unregister

[PATCH mlx5-next 10/11] net/mlx5: Device events, Use async events chain

2018-11-20 Thread Saeed Mahameed
Move all the generic async events handling into new specific events handling file events.c to keep eq.c file clean from concrete event logic handling. Use new API to register for NOTIFY_ANY to handle generic events and dispatch allowed events to mlx5_core consumers (mlx5_ib and mlx5e)

Re: [PATCH v5 bpf-next 00/13] bpf: Add btf func info support

2018-11-20 Thread Alexei Starovoitov
On Tue, Nov 20, 2018 at 11:26:37AM +, Edward Cree wrote: > On 19/11/18 23:29, Martin KaFai Lau wrote: > > The BTF support was added to kernel by Commit 69b693f0aefa > > ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced > > .BTF section into ELF file and is primarily > > used for

[PATCH bpf-next v2] libbpf: make sure bpf headers are c++ include-able

2018-11-20 Thread Stanislav Fomichev
Wrap headers in extern "C", to turn off C++ mangling. This simplifies including libbpf in c++ and linking against it. v2 changes: * do the same for btf.h Signed-off-by: Stanislav Fomichev --- tools/lib/bpf/bpf.h| 9 + tools/lib/bpf/btf.h| 8 tools/lib/bpf/libbpf.h | 9

[PATCH v4 bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-20 Thread Nikita V. Shirokov
in this patch series i'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). first patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example of usage v3->v4: -

[PATCH v4 bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-20 Thread Nikita V. Shirokov
idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3)

[PATCH v4 bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-20 Thread Nikita V. Shirokov
adding test/example of bpf_map__add_inner_map_fd usage Signed-off-by: Nikita V. Shirokov Acked-by: Yonghong Song --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/test_mapinmap.c | 49 + tools/testing/selftests/bpf/test_maps.c | 82

[PATCH net-next,v3 05/12] cls_flower: add statistics retrieval infrastructure and use it

2018-11-20 Thread Pablo Neira Ayuso
This patch provides the flow_stats structure that acts as container for tc_cls_flower_offload, then we can use to restore the statistics on the existing TC actions. Hence, tcf_exts_stats_update() is not used from drivers. Signed-off-by: Pablo Neira Ayuso --- v3: Suggested by Jiri Pirko:

[PATCH net-next,v3 07/12] cls_flower: don't expose TC actions to drivers anymore

2018-11-20 Thread Pablo Neira Ayuso
Now that drivers have been converted to use the flow action infrastructure, remove this field from the tc_cls_flower_offload structure. Signed-off-by: Pablo Neira Ayuso --- v3: no changes. include/net/pkt_cls.h | 1 - net/sched/cls_flower.c | 5 - 2 files changed, 6 deletions(-) diff

[PATCH net-next,v3 06/12] drivers: net: use flow action infrastructure

2018-11-20 Thread Pablo Neira Ayuso
This patch updates drivers to use the new flow action infrastructure. Signed-off-by: Pablo Neira Ayuso --- v3: rebase on top of previous patches. drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 74 +++--- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 250 +--

[PATCH net-next,v3 11/12] qede: place ethtool_rx_flow_spec after code after TC flower codebase

2018-11-20 Thread Pablo Neira Ayuso
This is a preparation patch to reuse the existing TC flower codebase from ethtool_rx_flow_spec. This patch is merely moving the core ethtool_rx_flow_spec parser after tc flower offload driver code so we can skip a few forward function declarations in the follow up patch. Signed-off-by: Pablo

[PATCH net-next,v3 01/12] flow_dissector: add flow_rule and flow_match structures and use them

2018-11-20 Thread Pablo Neira Ayuso
This patch wraps the dissector key and mask - that flower uses to represent the matching side - around the flow_match structure. To avoid a follow up patch that would edit the same LoCs in the drivers, this patch also wraps this new flow match structure around the flow rule object. This new

[PATCH net-next,v3 09/12] flow_dissector: add basic ethtool_rx_flow_spec to flow_rule structure translator

2018-11-20 Thread Pablo Neira Ayuso
This patch adds a function to translate the ethtool_rx_flow_spec structure to the flow_rule representation. This allows us to reuse code from the driver side given that both flower and ethtool_rx_flow interfaces use the same representation. Signed-off-by: Pablo Neira Ayuso --- v3: Suggested by

[PATCH net-next,v3 08/12] flow_dissector: add wake-up-on-lan and queue to flow_action

2018-11-20 Thread Pablo Neira Ayuso
These actions need to be added to support bcm sf2 features available through the ethtool_rx_flow interface. Reviewed-by: Florian Fainelli Signed-off-by: Pablo Neira Ayuso --- v3: no changes. include/net/flow_offload.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH net-next,v3 04/12] cls_api: add translator to flow_action representation

2018-11-20 Thread Pablo Neira Ayuso
This patch implements a new function to translate from native TC action to the new flow_action representation. Moreover, this patch also updates cls_flower to use this new function. Signed-off-by: Pablo Neira Ayuso --- v3: add tcf_exts_num_actions() and pass it to flow_rule_alloc() to calculate

[PATCH net-next,v3 10/12] dsa: bcm_sf2: use flow_rule infrastructure

2018-11-20 Thread Pablo Neira Ayuso
Update this driver to use the flow_rule infrastructure, hence we can use the same code to populate hardware IR from ethtool_rx_flow and the cls_flower interfaces. Signed-off-by: Pablo Neira Ayuso --- v3: adapt it to use new ethtool_rx_flow_rule_alloc() drivers/net/dsa/bcm_sf2_cfp.c | 109

[PATCH net-next,v3 12/12] qede: use ethtool_rx_flow_rule() to remove duplicated parser code

2018-11-20 Thread Pablo Neira Ayuso
The qede driver supports for ethtool_rx_flow_spec and flower, both codebases look very similar. This patch uses the ethtool_rx_flow_rule() infrastructure to remove the duplicated ethtool_rx_flow_spec parser and consolidate ACL offload support around the flow_rule infrastructure. Furthermore,

[PATCH net-next,v3 00/12] add flow_rule infrastructure

2018-11-20 Thread Pablo Neira Ayuso
Hi, This patchset is the third iteration [1] [2] [3] to introduce a kernel intermediate (IR) to express ACL hardware offloads. This round addresses feedback from Jiri Pirko: * Add net/core/flow_offload.c and include/net/flow_offload.h. * Add flow_rule_alloc() helper function. * Remove _key

[PATCH net-next,v3 02/12] net/mlx5e: support for two independent packet edit actions

2018-11-20 Thread Pablo Neira Ayuso
This patch adds pedit_headers_action structure to store the result of parsing tc pedit actions. Then, it calls alloc_tc_pedit_action() to populate the mlx5e hardware intermediate representation once all actions have been parsed. This patch comes in preparation for the new flow_action

[PATCH net-next,v3 03/12] flow_dissector: add flow action infrastructure

2018-11-20 Thread Pablo Neira Ayuso
This new infrastructure defines the nic actions that you can perform from existing network drivers. This infrastructure allows us to avoid a direct dependency with the native software TC action representation. Signed-off-by: Pablo Neira Ayuso --- v3: Suggested by Jiri Pirko: - Remove

[iproute2-next PATCH v2] man: tc-flower: Add explanation for range option

2018-11-20 Thread Amritha Nambiar
Add details explaining filtering based on port ranges. v2: Modified description to remove range as standalone option and updated as part of dst_port/src_port. Signed-off-by: Amritha Nambiar --- man/man8/tc-flower.8 | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff

Re: [PATCH bpf-next v2] libbpf: make sure bpf headers are c++ include-able

2018-11-20 Thread Alexei Starovoitov
On Tue, Nov 20, 2018 at 01:37:23PM -0800, Stanislav Fomichev wrote: > Wrap headers in extern "C", to turn off C++ mangling. > This simplifies including libbpf in c++ and linking against it. > > v2 changes: > * do the same for btf.h > > Signed-off-by: Stanislav Fomichev > --- >

Re: [PATCH bpf-next v2] libbpf: make sure bpf headers are c++ include-able

2018-11-20 Thread Alexei Starovoitov
On Tue, Nov 20, 2018 at 04:05:55PM -0800, Stanislav Fomichev wrote: > On 11/20, Alexei Starovoitov wrote: > > On Tue, Nov 20, 2018 at 01:37:23PM -0800, Stanislav Fomichev wrote: > > > Wrap headers in extern "C", to turn off C++ mangling. > > > This simplifies including libbpf in c++ and linking

Re: [PATCH net] sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit

2018-11-20 Thread Marcelo Ricardo Leitner
On Mon, Nov 19, 2018 at 12:39:55PM -0800, David Miller wrote: > From: Xin Long > Date: Sun, 18 Nov 2018 15:07:38 +0800 > > > Now sctp increases sk_wmem_alloc by 1 when doing set_owner_w for the > > skb allocked in sctp_packet_transmit and decreases by 1 when freeing > > this skb. > > > > But

RE: [PATCH v1 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-20 Thread Tristram.Ha
Slightly out of topic I am not sure why NAPI is used on the transmit side. Originally NAPI was designed to fix the receive interrupt happening on each receive frame problem, so on transmit side it is to avoid the transmit done interrupt on each transmit frame? Typically hardware has a way to

[Patch net-next 2/2] net: dump whole skb data in netdev_rx_csum_fault()

2018-11-20 Thread Cong Wang
Currently, we only dump a few selected skb fields in netdev_rx_csum_fault(). It is not suffient for debugging checksum fault. This patch introduces skb_dump() which dumps skb mac header, network header and its whole skb->data too. Cc: Herbert Xu Cc: Eric Dumazet Cc: David Miller Signed-off-by:

[Patch net-next 1/2] net: introduce skb_network_header_was_set()

2018-11-20 Thread Cong Wang
Signed-off-by: Cong Wang --- include/linux/skbuff.h | 5 + net/core/skbuff.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a2e8297a5b00..afddb5c17ce5 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-20 Thread Herbert Xu
On Tue, Nov 20, 2018 at 10:18:17AM -0800, Eric Dumazet wrote: > > > Something like this? Is it safe to linearize here? It looks safe to me. It's only unsafe if your skb is shared which from my grepping does not appear to be the case (and it cannot be shared if you're modifying skb->csum which

Re: [PATCH net v2] net/sched: act_police: fix race condition on state variables

2018-11-20 Thread Cong Wang
On Tue, Nov 20, 2018 at 3:30 PM Eric Dumazet wrote: > > On Tue, Nov 20, 2018 at 3:28 PM David Miller wrote: > > > > Applied. > > We need a fix to make lockdep happy, as reported by Cong. > > Cong, do you want to handle this ? > I hope Davide could send a followup fix and really test it with

Re: [PATCH v4 net-next 6/6] net: dsa: microchip: rename ksz_9477_reg.h to ksz9477_reg.h

2018-11-20 Thread Florian Fainelli
On 11/20/2018 3:55 PM, tristram...@microchip.com wrote: > From: Tristram Ha > > Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product > name is always KSZ. > > Signed-off-by: Tristram Ha > Reviewed-by: Woojung Huh > Reviewed-by: Andrew Lunn Reviewed-by: Florian

Re: [PATCH v4 net-next 1/6] net: dsa: microchip: replace license with GPL

2018-11-20 Thread Florian Fainelli
On 11/20/2018 3:55 PM, tristram...@microchip.com wrote: > From: Tristram Ha > > Replace license with GPL. > > Signed-off-by: Tristram Ha > Reviewed-by: Woojung Huh > Reviewed-by: Andrew Lunn > Acked-by: Pavel Machek Reviewed-by: Florian Fainelli -- Florian

[PATCH v5 bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-20 Thread Nikita V. Shirokov
in this patch series i'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). first patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example of usage v4->v5: -

[PATCH v5 bpf-next 2/2] bpf: adding tests for map_in_map helpber in libbpf

2018-11-20 Thread Nikita V. Shirokov
adding test/example of bpf_map__set_inner_map_fd usage Signed-off-by: Nikita V. Shirokov Acked-by: Yonghong Song --- tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_map_in_map.c | 49 +++ tools/testing/selftests/bpf/test_maps.c | 90

[PATCH v5 bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-20 Thread Nikita V. Shirokov
idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3)

Re: [PATCH v4 net-next 0/6] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2018-11-20 Thread David Miller
From: Date: Tue, 20 Nov 2018 15:55:04 -0800 > This series of patches is to modify the original KSZ9477 DSA driver so > that other KSZ switch drivers can be added and use the common code. Series applied.

Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-20 Thread David Ahern
On 11/20/18 2:05 AM, Nicolas Dichtel wrote: > Le 20/11/2018 à 00:46, David Ahern a écrit : > [snip] >> That revelation shows another hole: >> $ ip netns add foo >> $ ip netns set foo 0x > It also works with 0xf000 ... > >> $ ip netns list >> foo (id: 0) >> >> Seems like alloc_netid()

Re: [PATCH net v2] net/sched: act_police: fix race condition on state variables

2018-11-20 Thread Eric Dumazet
On Tue, Nov 20, 2018 at 3:28 PM David Miller wrote: > > From: Davide Caratti > Date: Tue, 20 Nov 2018 22:18:44 +0100 > > > after 'police' configuration parameters were converted to use RCU instead > > of spinlock, the state variables used to compute the traffic rate (namely > > 'tcfp_toks',

[PATCH v4 net-next 5/6] net: dsa: microchip: break KSZ9477 DSA driver into two files

2018-11-20 Thread Tristram.Ha
From: Tristram Ha Break KSZ9477 DSA driver into two files in preparation to add more KSZ switch drivers. Add common functions in ksz_common.h so that other KSZ switch drivers can access code in ksz_common.c. Add ksz_spi.h for common functions used by KSZ switch SPI drivers. Signed-off-by:

[PATCH v4 net-next 6/6] net: dsa: microchip: rename ksz_9477_reg.h to ksz9477_reg.h

2018-11-20 Thread Tristram.Ha
From: Tristram Ha Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product name is always KSZ. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz9477.c | 2 +-

[PATCH v4 net-next 1/6] net: dsa: microchip: replace license with GPL

2018-11-20 Thread Tristram.Ha
From: Tristram Ha Replace license with GPL. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Andrew Lunn Acked-by: Pavel Machek --- drivers/net/dsa/microchip/ksz_9477_reg.h | 17 +++-- drivers/net/dsa/microchip/ksz_common.c | 15 ++-

[PATCH v4 net-next 2/6] net: dsa: microchip: clean up code

2018-11-20 Thread Tristram.Ha
From: Tristram Ha Clean up code according to patch check suggestions. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz_common.c | 8 1 file changed, 4

[PATCH v4 net-next 3/6] net: dsa: microchip: rename some functions with ksz9477 prefix

2018-11-20 Thread Tristram.Ha
From: Tristram Ha Rename some functions with ksz9477 prefix to separate chip specific code from common code. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz_common.c |

[PATCH v4 net-next 0/6] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2018-11-20 Thread Tristram.Ha
From: Tristram Ha This series of patches is to modify the original KSZ9477 DSA driver so that other KSZ switch drivers can be added and use the common code. There are several steps to accomplish this achievement. First is to rename some function names with a prefix to indicate chip specific

  1   2   3   >