Re: [PATCH net-next 06/18] ionic: Add basic adminq support

2019-06-20 Thread kbuild test robot
Hi Shannon, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Shannon-Nelson/ionic-Add-basic-framework-for-IONIC-Network-device-driver/20190621-110046 config: mips-allmodconfig (attached as .config) compiler:

[PATCH v2 bpf-next 5/7] selftests/bpf: switch test to new attach_perf_event API

2019-06-20 Thread Andrii Nakryiko
Use new bpf_program__attach_perf_event() in test previously relying on direct ioctl manipulations. Signed-off-by: Andrii Nakryiko --- .../bpf/prog_tests/stacktrace_build_id_nmi.c | 24 --- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/bp

[PATCH v2 bpf-next 7/7] selftests/bpf: convert existing tracepoint tests to new APIs

2019-06-20 Thread Andrii Nakryiko
Convert existing tests that attach to tracepoints to use bpf_program__attach_tracepoint API instead. Signed-off-by: Andrii Nakryiko --- .../bpf/prog_tests/stacktrace_build_id.c | 49 +++- .../selftests/bpf/prog_tests/stacktrace_map.c | 42 +++--- .../bpf/prog_tests/stack

[PATCH v2 bpf-next 4/7] libbpf: add tracepoint/raw tracepoint attach API

2019-06-20 Thread Andrii Nakryiko
Add APIs allowing to attach BPF program to kernel tracepoints. Raw tracepoint attach API is also added for uniform per-BPF-program API, but is mostly a wrapper around existing bpf_raw_tracepoint_open call. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 98 +

[PATCH v2 bpf-next 3/7] libbpf: add kprobe/uprobe attach API

2019-06-20 Thread Andrii Nakryiko
Add ability to attach to kernel and user probes and retprobes. Implementation depends on perf event support for kprobes/uprobes. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 207 +++ tools/lib/bpf/libbpf.h | 8 ++ tools/lib/bpf/libbpf.map

[PATCH v2 bpf-next 0/7] libbpf: add tracing attach APIs

2019-06-20 Thread Andrii Nakryiko
This patchset adds the following APIs to allow attaching BPF programs to tracing entities: - bpf_program__attach_perf_event for attaching to any opened perf event FD, allowing users full control; - bpf_program__attach_kprobe for attaching to kernel probes (both entry and return probes); - bpf_p

[PATCH v2 bpf-next 2/7] libbpf: add ability to attach/detach BPF to perf event

2019-06-20 Thread Andrii Nakryiko
bpf_program__attach_perf_event allows to attach BPF program to existing perf event, providing most generic and most low-level way to attach BPF programs. libbpf_perf_event_disable_and_close API is added to disable and close existing perf event by its FD. Signed-off-by: Andrii Nakryiko --- tools

[PATCH v2 bpf-next 6/7] selftests/bpf: add kprobe/uprobe selftests

2019-06-20 Thread Andrii Nakryiko
Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as expected. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/attach_probe.c | 151 ++ .../selftests/bpf/progs/test_attach_probe.c | 55 +++ 2 files changed, 206 insertions(+) create mode 100

[PATCH v2 bpf-next 1/7] libbpf: make libbpf_strerror_r agnostic to sign of error

2019-06-20 Thread Andrii Nakryiko
It's often inconvenient to switch sign of error when passing it into libbpf_strerror_r. It's better for it to handle that automatically. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/str_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/str_error.c b/to

Re: [PATCH bpf-next 5/7] selftests/bpf: switch test to new attach_perf_event API

2019-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2019 at 5:08 PM Stanislav Fomichev wrote: > > On 06/20, Andrii Nakryiko wrote: > > Use new bpf_program__attach_perf_event() in test previously relying on > > direct ioctl manipulations. > Maybe use new detach/disable routine at the end of the > test_stacktrace_build_id_nmi as well?

Re: [PATCH bpf-next 4/7] libbpf: add tracepoint/raw tracepoint attach API

2019-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2019 at 5:07 PM Stanislav Fomichev wrote: > > On 06/20, Andrii Nakryiko wrote: > > Add APIs allowing to attach BPF program to kernel tracepoints. Raw > > tracepoint attach API is also added for uniform per-BPF-program API, > > but is mostly a wrapper around existing bpf_raw_tracepo

Re: [PATCH bpf-next 3/7] libbpf: add kprobe/uprobe attach API

2019-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2019 at 5:04 PM Stanislav Fomichev wrote: > > On 06/20, Andrii Nakryiko wrote: > > Add ability to attach to kernel and user probes and retprobes. > > Implementation depends on perf event support for kprobes/uprobes. > > > > Signed-off-by: Andrii Nakryiko > > --- > > tools/lib/bpf

Re: [PATCH bpf-next 2/7] libbpf: add ability to attach/detach BPF to perf event

2019-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2019 at 5:01 PM Stanislav Fomichev wrote: > > On 06/20, Andrii Nakryiko wrote: > > bpf_program__attach_perf_event allows to attach BPF program to existing > > perf event, providing most generic and most low-level way to attach BPF > > programs. > > > > libbpf_perf_event_disable_and

Re: [PATCH v2 bpf-next 00/11] BTF-defined BPF map definitions

2019-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2019 at 7:49 AM Lorenz Bauer wrote: > > On Tue, 18 Jun 2019 at 22:37, Andrii Nakryiko > wrote: > > > > I would just drop the object-scope pinning. We avoided using it and I'm > > > not > > > aware if anyone else make use. It also has the ugly side-effect that this > > > relies o

Re: [RFC PATCH bpf-next 6/8] libbpf: allow specifying map definitions using BTF

2019-06-20 Thread Andrii Nakryiko
On Thu, Jun 20, 2019 at 2:28 AM Lorenz Bauer wrote: > > On Mon, 17 Jun 2019 at 22:00, Andrii Nakryiko > wrote: > > > In my mind, BPF loaders should be able to pass through BTF to the kernel > > > as a binary blob as much as possible. That's why I want the format to > > > be "self describing". Co

Re: [PATCH v2 net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-20 Thread Sean Wang
On Thu, Jun 20, 2019 at 6:02 AM Frank Wunderlich wrote: > > Tested on Bananapi R2 (mt7623) > > Tested-by: "Frank Wunderlich" These changes also look good to me, thanks for add the patch to enrich different application variants. Acked-by: Sean Wang > > Am 20. Juni 2019 14:21:53 MESZ schrieb "R

Re: [PATCH net-next 13/18] ionic: Add initial ethtool support

2019-06-20 Thread Michal Kubecek
On Thu, Jun 20, 2019 at 01:24:19PM -0700, Shannon Nelson wrote: > Add in the basic ethtool callbacks for device information > and control. > > Signed-off-by: Shannon Nelson > --- ... > +static int ionic_get_link_ksettings(struct net_device *netdev, > + struct ethto

Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-06-20 Thread Florian Fainelli
On 6/20/2019 4:56 PM, Vivien Didelot wrote: > This patch adds support for enabling or disabling the flooding of > unknown multicast traffic on the CPU ports, depending on the value > of the switchdev SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED attribute. > > This allows the user to prevent the CPU to

Re: [Intel-wired-lan] [PATCH net-next v3 1/6] igb: clear out tstamp after sending the packet.

2019-06-20 Thread Brown, Aaron F
On Mon, 2019-06-17 at 12:31 -0700, Vedang Patel wrote: > skb->tstamp is being used at multiple places. On the transmit side, it > is used to determine the launchtime of the packet. It is also used to > determine the software timestamp after the packet has been transmitted. > > So, clear out the ts

Re: [PATCH 2/2] net: intel: igb: add RR2DCDELAY to ethtool registers dump

2019-06-20 Thread Brown, Aaron F
On Tue, 2019-06-18 at 14:55 +0300, Artem Bityutskiy wrote: > From: Artem Bityutskiy > > This patch adds the RR2DCDELAY register to the ethtool registers dump. > RR2DCDELAY exists on I210 and I211 Intel Gigabit Ethernet chips and it stands > for "Read Request To Data Completion Delay". Here is how

Re: [PATCH 1/2] net: intel: igb: minor ethool regdump amendment

2019-06-20 Thread Brown, Aaron F
On Tue, 2019-06-18 at 14:55 +0300, Artem Bityutskiy wrote: > From: Artem Bityutskiy > > This patch has no functional impact and it is just a preparation > for the following patch. It removes an early return from the > 'igb_get_regs()' function by moving the 82576-only registers > dump into an "if

Re: [PATCH net-next] ipv6: Convert gateway validation to use fib6_info

2019-06-20 Thread David Ahern
On 6/20/19 5:43 PM, Wei Wang wrote: > I am not very convinced that fib6_lookup() could be equivalent to > rt6_lookup(). Specifically, rt6_lookup() calls rt6_device_match() > while fib6_lookup() calls rt6_select() to match the oif. From a brief > glance, it does seem to be similar, especially consid

Re: [PATCH v3 net-next 0/5] ipv6: avoid taking refcnt on dst during route lookup

2019-06-20 Thread David Ahern
On 6/20/19 6:36 PM, Wei Wang wrote: > From: Wei Wang > > Ipv6 route lookup code always grabs refcnt on the dst for the caller. > But for certain cases, grabbing refcnt is not always necessary if the > call path is rcu protected and the caller does not cache the dst. > Another issue in the route l

Re: Stats for XDP actions

2019-06-20 Thread David Ahern
On 6/20/19 2:42 PM, Toke Høiland-Jørgensen wrote: >>> I don't recall seeing any follow-up on this. Did you have a chance to >>> formulate your ideas? :) >>> >> >> Not yet. Almost done with the nexthop changes. Once that is out of the >> way I can come back to this. > > Ping? :) > Definitely back

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-20 Thread Lucas Bates
On Tue, Jun 18, 2019 at 4:52 AM Nicolas Dichtel wrote: > >> From my point of view, if all tests are not successful by default, it > >> scares > >> users and prevent them to use those tests suite to validate their patches. > > > > For me, explicitly telling the user that a test was skipped, and /w

[PATCH v3 net-next 1/5] ipv6: introduce RT6_LOOKUP_F_DST_NOREF flag in ip6_pol_route()

2019-06-20 Thread Wei Wang
From: Wei Wang This new flag is to instruct the route lookup function to not take refcnt on the dst entry. The user which does route lookup with this flag must properly use rcu protection. ip6_pol_route() is the major route lookup function for both tx and rx path. In this function: Do not take re

[PATCH v3 net-next 4/5] ipv6: convert rx data path to not take refcnt on dst

2019-06-20 Thread Wei Wang
From: Wei Wang ip6_route_input() is the key function to do the route lookup in the rx data path. All the callers to this function are already holding rcu lock. So it is fairly easy to convert it to not take refcnt on the dst: We pass in flag RT6_LOOKUP_F_DST_NOREF and do skb_dst_set_noref(). This

[PATCH v3 net-next 2/5] ipv6: initialize rt6->rt6i_uncached in all pre-allocated dst entries

2019-06-20 Thread Wei Wang
From: Wei Wang Initialize rt6->rt6i_uncached on the following pre-allocated dsts: net->ipv6.ip6_null_entry net->ipv6.ip6_prohibit_entry net->ipv6.ip6_blk_hole_entry This is a preparation patch for later commits to be able to distinguish dst entries in uncached list by doing: !list_empty(rt6->rt6

[PATCH v3 net-next 3/5] ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic

2019-06-20 Thread Wei Wang
From: Wei Wang This patch specifically converts the rule lookup logic to honor this flag and not release refcnt when traversing each rule and calling lookup() on each routing table. Similar to previous patch, we also need some special handling of dst entries in uncached list because there is alwa

[PATCH v3 net-next 0/5] ipv6: avoid taking refcnt on dst during route lookup

2019-06-20 Thread Wei Wang
From: Wei Wang Ipv6 route lookup code always grabs refcnt on the dst for the caller. But for certain cases, grabbing refcnt is not always necessary if the call path is rcu protected and the caller does not cache the dst. Another issue in the route lookup logic is: When there are multiple custom r

[PATCH v3 net-next 5/5] ipv6: convert major tx path to use RT6_LOOKUP_F_DST_NOREF

2019-06-20 Thread Wei Wang
From: Wei Wang For tx path, in most cases, we still have to take refcnt on the dst cause the caller is caching the dst somewhere. But it still is beneficial to make use of RT6_LOOKUP_F_DST_NOREF flag while doing the route lookup. It is cause this flag prevents manipulating refcnt on net->ipv6.ip6

Re: [PATCH bpf-next 5/7] selftests/bpf: switch test to new attach_perf_event API

2019-06-20 Thread Stanislav Fomichev
On 06/20, Andrii Nakryiko wrote: > Use new bpf_program__attach_perf_event() in test previously relying on > direct ioctl manipulations. Maybe use new detach/disable routine at the end of the test_stacktrace_build_id_nmi as well? > Signed-off-by: Andrii Nakryiko > --- > .../bpf/prog_tests/stacktr

Re: [PATCH bpf-next 4/7] libbpf: add tracepoint/raw tracepoint attach API

2019-06-20 Thread Stanislav Fomichev
On 06/20, Andrii Nakryiko wrote: > Add APIs allowing to attach BPF program to kernel tracepoints. Raw > tracepoint attach API is also added for uniform per-BPF-program API, > but is mostly a wrapper around existing bpf_raw_tracepoint_open call. > > Signed-off-by: Andrii Nakryiko > --- > tools/li

Re: [PATCH bpf-next 3/7] libbpf: add kprobe/uprobe attach API

2019-06-20 Thread Stanislav Fomichev
On 06/20, Andrii Nakryiko wrote: > Add ability to attach to kernel and user probes and retprobes. > Implementation depends on perf event support for kprobes/uprobes. > > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/libbpf.c | 207 +++ > tools/lib/bpf

Re: [PATCH bpf-next 2/7] libbpf: add ability to attach/detach BPF to perf event

2019-06-20 Thread Stanislav Fomichev
On 06/20, Andrii Nakryiko wrote: > bpf_program__attach_perf_event allows to attach BPF program to existing > perf event, providing most generic and most low-level way to attach BPF > programs. > > libbpf_perf_event_disable_and_close API is added to disable and close > existing perf event by its FD

[RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-06-20 Thread Vivien Didelot
This patch adds support for enabling or disabling the flooding of unknown multicast traffic on the CPU ports, depending on the value of the switchdev SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED attribute. This allows the user to prevent the CPU to be flooded with a lot of undesirable traffic that the net

Re: [PATCH net-next] ipv6: Convert gateway validation to use fib6_info

2019-06-20 Thread Wei Wang
On Thu, Jun 20, 2019 at 12:05 PM David Ahern wrote: > > From: David Ahern > > Gateway validation does not need a dst_entry, it only needs the fib > entry to validate the gateway resolution and egress device. So, > convert ip6_nh_lookup_table from ip6_pol_route to fib6_table_lookup > and ip6_route

[PATCH bpf-next 3/7] libbpf: add kprobe/uprobe attach API

2019-06-20 Thread Andrii Nakryiko
Add ability to attach to kernel and user probes and retprobes. Implementation depends on perf event support for kprobes/uprobes. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 207 +++ tools/lib/bpf/libbpf.h | 8 ++ tools/lib/bpf/libbpf.map

[PATCH bpf-next 7/7] selftests/bpf: convert existing tracepoint tests to new APIs

2019-06-20 Thread Andrii Nakryiko
Convert existing tests that attach to tracepoints to use bpf_program__attach_tracepoint API instead. Signed-off-by: Andrii Nakryiko --- .../bpf/prog_tests/stacktrace_build_id.c | 49 +++- .../selftests/bpf/prog_tests/stacktrace_map.c | 42 +++--- .../bpf/prog_tests/stack

[PATCH bpf-next 6/7] selftests/bpf: add kprobe/uprobe selftests

2019-06-20 Thread Andrii Nakryiko
Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as expected. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/attach_probe.c | 151 ++ .../selftests/bpf/progs/test_attach_probe.c | 55 +++ 2 files changed, 206 insertions(+) create mode 100

[PATCH bpf-next 4/7] libbpf: add tracepoint/raw tracepoint attach API

2019-06-20 Thread Andrii Nakryiko
Add APIs allowing to attach BPF program to kernel tracepoints. Raw tracepoint attach API is also added for uniform per-BPF-program API, but is mostly a wrapper around existing bpf_raw_tracepoint_open call. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 99 +

[PATCH bpf-next 5/7] selftests/bpf: switch test to new attach_perf_event API

2019-06-20 Thread Andrii Nakryiko
Use new bpf_program__attach_perf_event() in test previously relying on direct ioctl manipulations. Signed-off-by: Andrii Nakryiko --- .../bpf/prog_tests/stacktrace_build_id_nmi.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/bpf/

[PATCH bpf-next 0/7] libbpf: add tracing attach APIs

2019-06-20 Thread Andrii Nakryiko
This patchset adds the following APIs to allow attaching BPF programs to tracing entities: - bpf_program__attach_perf_event for attaching to any opened perf event FD, allowing users full control; - bpf_program__attach_kprobe for attaching to kernel probes (both entry and return probes); - bpf_p

[PATCH bpf-next 1/7] libbpf: make libbpf_strerror_r agnostic to sign of error

2019-06-20 Thread Andrii Nakryiko
It's often inconvenient to switch sign of error when passing it into libbpf_strerror_r. It's better for it to handle that automatically. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/str_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/str_error.c b/to

[PATCH bpf-next 2/7] libbpf: add ability to attach/detach BPF to perf event

2019-06-20 Thread Andrii Nakryiko
bpf_program__attach_perf_event allows to attach BPF program to existing perf event, providing most generic and most low-level way to attach BPF programs. libbpf_perf_event_disable_and_close API is added to disable and close existing perf event by its FD. Signed-off-by: Andrii Nakryiko --- tools

Re: [PATCH net-next 5/5] ipv6: convert major tx path to use RT6_LOOKUP_F_DST_NOREF

2019-06-20 Thread kbuild test robot
Hi Wei, 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/Wei-Wang/ipv6-avoid-taking-refcnt-on-dst-during-route-lookup/20190621-052244 config: i386-randconfig-x077-201924 (attached as .config) compiler:

Re: [RFC bpf-next 0/7] Programming socket lookup with BPF

2019-06-20 Thread Joe Stringer
On Wed, Jun 19, 2019 at 2:14 AM Jakub Sitnicki wrote: > > Hey Florian, > > Thanks for taking a look at it. > > On Tue, Jun 18, 2019 at 03:52 PM CEST, Florian Westphal wrote: > > Jakub Sitnicki wrote: > >> - XDP programs using bpf_sk_lookup helpers, like load balancers, can't > >>find the lis

Re: [PATCH net-next v4 1/7] igb: clear out tstamp after sending the packet

2019-06-20 Thread Eric Dumazet
On 6/20/19 1:32 PM, Patel, Vedang wrote: > > Ahh.. that’s clearly a false statement. Skb->tstamp is cleared so > that it is not interpreted as a software timestamp when trying to > send the Hardware TX timestamp to the userspace. I will rephrase the > commit message in the next version. > > S

Re: [PATCH net-next 02/18] ionic: Add hardware init and device commands

2019-06-20 Thread Andrew Lunn
On Thu, Jun 20, 2019 at 01:24:08PM -0700, Shannon Nelson wrote: > + err = ionic_debugfs_add_dev(ionic); > + if (err) { > + dev_err(dev, "Cannot add device debugfs: %d , aborting\n", err); > + goto err_out_clear_drvdata; > + } Hi Shannon debugfs should not fail,

Re: [PATCH iproute2 v2 0/3] refactor the cmd_exec()

2019-06-20 Thread Stephen Hemminger
On Tue, 18 Jun 2019 16:49:32 +0200 Matteo Croce wrote: > Refactor the netns and ipvrf code so less steps are needed to exec commands > in a netns or a VRF context. > Also remove some code which became dead. bloat-o-meter shows a tiny saving. > > Matteo Croce (3): > netns: switch netns in the c

Re: [PATCH net-next 01/18] ionic: Add basic framework for IONIC Network device driver

2019-06-20 Thread Andrew Lunn
> +++ b/drivers/net/ethernet/pensando/ionic/ionic.h > @@ -0,0 +1,27 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ > + > +#ifndef _IONIC_H_ > +#define _IONIC_H_ > + > +#define DRV_NAME "ionic" > +#define DRV_DESCRIPTION

Re: [PATCH net-next v4 2/7] etf: Add skip_sock_check

2019-06-20 Thread Patel, Vedang
> On Jun 20, 2019, at 1:16 AM, Sergei Shtylyov > wrote: > > On 19.06.2019 20:40, Vedang Patel wrote: > >> Currently, etf expects a socket with SO_TXTIME option set for each packet >> it encounters. So, it will drop all other packets. But, in the future >> commits we are planning to add functi

Re: network unstable on odroid-c1/meson8b.

2019-06-20 Thread Aymeric
Le 20/06/2019 à 17:53, Heiner Kallweit a écrit : > On 20.06.2019 09:55, Aymeric wrote: >> Hi, >> On 2019-06-20 00:14, Heiner Kallweit wrote: >>> On 19.06.2019 22:18, Aymeric wrote: Hello all, >>> Kernel 3.10 didn't have a dedicated RTL8211F PHY driver yet, therefore >>> I assume the gen

Re: Stats for XDP actions

2019-06-20 Thread Toke Høiland-Jørgensen
David Ahern writes: > On 4/18/19 8:24 AM, Toke Høiland-Jørgensen wrote: >>> >>> Understood. Hopefully in March I will get some time to come back to this >>> and propose an idea on what I would like to see - namely, the admin has >>> a config option at load time to enable driver counters vers

Re: [PATCH net-next v4 1/7] igb: clear out tstamp after sending the packet

2019-06-20 Thread Patel, Vedang
> On Jun 20, 2019, at 10:07 AM, Eric Dumazet wrote: > > > > On 6/20/19 9:49 AM, Patel, Vedang wrote: >> >> >>> On Jun 20, 2019, at 3:47 AM, Eric Dumazet wrote: >>> >>> >>> >>> On 6/19/19 10:40 AM, Vedang Patel wrote: skb->tstamp is being used at multiple places. On the transmit sid

[PATCH net-next 04/18] ionic: Add basic lif support

2019-06-20 Thread Shannon Nelson
The LIF is the Logical Interface, which represents the external connections. The NIC can multiplex many LIFs to a single port, but in most setups, LIF0 is the primary control for the port. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 3 +- drivers/net/ethe

[PATCH net-next 11/18] ionic: Add Rx filter and rx_mode nod support

2019-06-20 Thread Shannon Nelson
Add the Rx filtering and rx_mode NDO callbacks. Also add the deferred work thread handling needed to manage the filter requests otuside of the netif_addr_lock spinlock. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 391 +- .../net/ethernet/pen

[PATCH net-next 12/18] ionic: Add async link status check and basic stats

2019-06-20 Thread Shannon Nelson
Add code to handle the link status event, and wire up the basic netdev hardware stats. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 117 ++ .../net/ethernet/pensando/ionic/ionic_lif.h | 1 + 2 files changed, 118 insertions(+) diff --git a

[PATCH net-next 14/18] ionic: Add Tx and Rx handling

2019-06-20 Thread Shannon Nelson
Add both the Tx and Rx queue setup and handling. The related stats display come later. Instead of using the generic napi routines used by the slow-path command, the Tx and Rx paths are simplified and inlined in one file in order to get better compiler optimizations. Signed-off-by: Shannon Nelson

[PATCH net-next 18/18] ionic: Add coalesce and other features

2019-06-20 Thread Shannon Nelson
Interrupt coalescing, tunable copybreak value, and tx timeout. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 +- .../ethernet/pensando/ionic/ionic_ethtool.c | 105 ++ .../net/ethernet/pensando/ionic/ionic_lif.c | 18 ++- .../net/ethern

[PATCH net-next 09/18] ionic: Add the basic NDO callbacks for netdev support

2019-06-20 Thread Shannon Nelson
Set up the initial NDO structure and callbacks for netdev to use, and register the netdev. This will allow us to do a few basic operations on the device, but no traffic yet. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 1 + .../ethernet/pensando/ionic/ioni

[PATCH net-next 16/18] ionic: Add driver stats

2019-06-20 Thread Shannon Nelson
Add in the detailed statistics for ethtool -S that the driver keeps as it processes packets. Display of the additional debug statistics can be enabled through the ethtool priv-flags feature. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 3 +- .../ethernet/p

[PATCH net-next 08/18] ionic: Add notifyq support

2019-06-20 Thread Shannon Nelson
The AdminQ is fine for sending messages and requests to the NIC, but we also need to have events published from the NIC to the driver. The NotifyQ handles this for us, using the same interrupt as AdminQ. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 16 ++ .

[PATCH net-next 15/18] ionic: Add netdev-event handling

2019-06-20 Thread Shannon Nelson
When the netdev gets a new name from userland, pass that name down to the NIC for internal tracking. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 + .../net/ethernet/pensando/ionic/ionic_lif.c | 65 +++ 2 files changed, 67 insertions(+)

[PATCH net-next 13/18] ionic: Add initial ethtool support

2019-06-20 Thread Shannon Nelson
Add in the basic ethtool callbacks for device information and control. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../net/ethernet/pensando/ionic/ionic_dev.h | 3 + .../ethernet/pensando/ionic/ionic_ethtool.c | 533 ++ .../ethe

[PATCH net-next 17/18] ionic: Add RSS support

2019-06-20 Thread Shannon Nelson
Add code to manipulate through ethtool the RSS configuration used by the NIC. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 73 +++ .../net/ethernet/pensando/ionic/ionic_lif.c | 93 +++ .../net/ethernet/pensando/ionic/ionic_lif.h

[PATCH net-next 10/18] ionic: Add management of rx filters

2019-06-20 Thread Shannon Nelson
Set up the infrastructure for managing Rx filters. We can't ask the hardware for what filters it has, so we keep a local list of filters that we've pushed into the HW. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 4 +- .../net/ethernet/pensando/ionic/ionic

[PATCH net-next 07/18] ionic: Add adminq action

2019-06-20 Thread Shannon Nelson
Add AdminQ specific message requests and completion handling. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 7 ++ .../net/ethernet/pensando/ionic/ionic_main.c | 106 ++ 2 files changed, 113 insertions(+) diff --git a/drivers/net/ethernet/pe

[PATCH net-next 06/18] ionic: Add basic adminq support

2019-06-20 Thread Shannon Nelson
Most of the NIC configuration happens through the AdminQ message queue. NAPI is used for basic interrupt handling and message queue management. These routines are set up to be shared among different types of queues when used in slow-path handling. Signed-off-by: Shannon Nelson --- drivers/net/

[PATCH net-next 00/18] Add ionic driver

2019-06-20 Thread Shannon Nelson
This is the first version of a patch series that adds the ionic driver, supporting the Pensando ethernet devices. In this first patchset we implement basic network driver functionality. Later patchsets will add more advanced features. Shannon Nelson (18): ionic: Add basic framework for IONIC N

[PATCH net-next 03/18] ionic: Add port management commands

2019-06-20 Thread Shannon Nelson
The port management commands apply to the physical port associated with the PCI device, which might be shared among several logical interfaces. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 4 + .../ethernet/pensando/ionic/ionic_bus_pci.c | 16 +++ .../ne

[PATCH net-next 02/18] ionic: Add hardware init and device commands

2019-06-20 Thread Shannon Nelson
The ionic device has a small set of PCI registers, including a device control and data space, and a large set of message commands. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile |2 +- drivers/net/ethernet/pensando/ionic/ionic.h | 21 + .../net/ethernet/p

[PATCH net-next 05/18] ionic: Add interrupts and doorbells

2019-06-20 Thread Shannon Nelson
The ionic interrupt model is based on interrupt control blocks accessed through the PCI BAR. Doorbell registers are used by the driver to signal to the NIC that requests are waiting on the message queues. Interrupts are used by the NIC to signal to the driver that answers are waiting on the compl

[PATCH net-next 01/18] ionic: Add basic framework for IONIC Network device driver

2019-06-20 Thread Shannon Nelson
This patch adds a basic driver framework for the Pensando IONIC network device. There is no functionality right now other than the ability to load and unload. Signed-off-by: Shannon Nelson --- .../networking/device_drivers/index.rst | 1 + .../device_drivers/pensando/ionic.rst |

[PATCH net-next 02/12] net: sched: add tcf_block_cb_alloc()

2019-06-20 Thread Pablo Neira Ayuso
Add a new helper function to allocate tcf_block_cb objects. Signed-off-by: Pablo Neira Ayuso --- include/net/pkt_cls.h | 8 net/sched/cls_api.c | 23 +++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h

[PATCH net-next 01/12] net: sched: move tcf_block_cb before indr_block

2019-06-20 Thread Pablo Neira Ayuso
The indr_block infrastructure will depend on the tcf_block_cb object, move this code on top to avoid forward declarations. Signed-off-by: Pablo Neira Ayuso --- net/sched/cls_api.c | 484 ++-- 1 file changed, 242 insertions(+), 242 deletions(-) dif

[PATCH net-next 08/12] net: cls_api: do not expose tcf_block to drivers

2019-06-20 Thread Pablo Neira Ayuso
Expose the block index which is sufficient to look up for the tcf_block_cb object. Signed-off-by: Pablo Neira Ayuso --- drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 2 +- include/net/pkt_cls.h | 2

[PATCH net-next 05/12] net: sched: add release callback to struct tcf_block_cb

2019-06-20 Thread Pablo Neira Ayuso
Call it on tcf_block_cb object to release the driver private block area. Signed-off-by: Pablo Neira Ayuso --- include/net/pkt_cls.h | 6 -- net/sched/cls_api.c | 10 -- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h in

[PATCH net-next 03/12] net: sched: add tcf_block_cb_free()

2019-06-20 Thread Pablo Neira Ayuso
Just a stub to release tcf_block_cb objects, follow up patch extends it to have a release callback in it for the private data. Signed-off-by: Pablo Neira Ayuso --- include/net/pkt_cls.h | 5 + net/sched/cls_api.c | 6 ++ 2 files changed, 11 insertions(+) diff --git a/include/net/pkt_c

[PATCH net-next 00/12] netfilter: add hardware offload infrastructure

2019-06-20 Thread Pablo Neira Ayuso
Hi, This patchset adds support for Netfilter hardware offloads. This patchset reuses the existing block infrastructure, the netdev_ops->ndo_setup_tc() interface, TC_SETUP_CLSFLOWER classifier and the flow rule API. Patch #1 moves tcf_block_cb code before the indirect block infrastructur

[PATCH net-next 12/12] netfilter: nf_tables: add hardware offload support

2019-06-20 Thread Pablo Neira Ayuso
This patch adds hardware offload support for nftables through the existing netdev_ops->ndo_setup_tc() interface, the TC_SETUP_CLSFLOWER classifier and the flow rule API. This hardware offload support is available for the NFPROTO_NETDEV family and the ingress hook. Each nftables expression has a ne

[PATCH net-next 10/12] net: flow_offload: add flow_block_cb API

2019-06-20 Thread Pablo Neira Ayuso
This patch renames: * struct tcf_block_cb to flow_block_cb. * struct tc_block_offload to flow_block_offload. And it exposes the flow_block_cb API through net/flow_offload.h. This renames the existing codebase to adapt it to this name. This patch also adds flow_block_cb_splice(). Signed-off-by:

[PATCH net-next 11/12] net: flow_offload: don't allow block sharing until drivers support this

2019-06-20 Thread Pablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c| 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 drivers/net/ethernet/mscc/ocelot_flower.c | 4 ++-- drivers/net/ethernet/mscc/ocelot_tc.c | 4 ++-- driv

[PATCH net-next 04/12] net: sched: add tcf_block_setup()

2019-06-20 Thread Pablo Neira Ayuso
This new function allows us to handle tcf_block_cb registrations / unregistrations from the core, in order to remove a dependency with the tcf_block object and the .reoffload cls_api callback. The tcf_block_cb_add() call places the tcf_block_cb object, which has been set up by the driver, in the t

[PATCH net-next 06/12] net: sched: add tcf_setup_block_offload()

2019-06-20 Thread Pablo Neira Ayuso
Most drivers do the same thing to set up the block, add a helper function to do this. Signed-off-by: Pablo Neira Ayuso --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 26 - drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 28 -- drivers/net/ethernet/che

[PATCH net-next 09/12] net: sched: remove tcf_block_cb_{register,unregister}()

2019-06-20 Thread Pablo Neira Ayuso
Now replaced by the tcf_block_setup() core registration, remove this. Signed-off-by: Pablo Neira Ayuso --- include/net/pkt_cls.h | 41 +-- net/sched/cls_api.c | 59 --- 2 files changed, 1 insertion(+), 99 deletions

[PATCH net-next 07/12] net: use tcf_block_setup() infrastructure

2019-06-20 Thread Pablo Neira Ayuso
This allows us to register / unregister tcf_block_cb objects from the core. The idea is to allocate and to set up the tcf_block_cb objects from the driver, attach them to the tc_block_offload->cb_list, then the core iterates over this block list to registers them. Signed-off-by: Pablo Neira Ayuso

Re: [PATCH net-next v6 08/11] ipv6: Dump route exceptions if requested

2019-06-20 Thread David Ahern
On 6/20/19 1:02 PM, Stefano Brivio wrote: > Same as my comment about IPv4, except that, for IPv6, distinction > between skip and skip_in_node is strictly needed, but buckets and > nexthops are traversed in the same order and 'sernum' changes don't > affect that. ok

Re: [PATCH net-next v6 04/11] ipv4: Dump route exceptions if requested

2019-06-20 Thread David Ahern
On 6/20/19 1:01 PM, Stefano Brivio wrote: >>> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c >>> index 94e5d83db4db..03f51e5192e5 100644 >>> --- a/net/ipv4/fib_trie.c >>> +++ b/net/ipv4/fib_trie.c >>> @@ -2078,28 +2078,51 @@ void fib_free_table(struct fib_table *tb) >>> call_rcu(&tb->rc

[PATCH net-next] ipv6: Convert gateway validation to use fib6_info

2019-06-20 Thread David Ahern
From: David Ahern Gateway validation does not need a dst_entry, it only needs the fib entry to validate the gateway resolution and egress device. So, convert ip6_nh_lookup_table from ip6_pol_route to fib6_table_lookup and ip6_route_check_nh to use fib6_lookup over rt6_lookup. ip6_pol_route is a

Re: [PATCH net-next v6 08/11] ipv6: Dump route exceptions if requested

2019-06-20 Thread Stefano Brivio
On Thu, 20 Jun 2019 08:24:22 -0600 David Ahern wrote: > On 6/19/19 5:59 PM, Stefano Brivio wrote: > > + if (filter->dump_exceptions) { > > + struct fib6_nh_exception_dump_walker w = { .dump = arg, > > + .rt = rt, > > +

Re: [PATCH net-next v6 06/11] ipv6/route: Don't match on fc_nh_id if not set in ip6_route_del()

2019-06-20 Thread Stefano Brivio
On Thu, 20 Jun 2019 08:16:28 -0600 David Ahern wrote: > On 6/19/19 5:59 PM, Stefano Brivio wrote: > > If fc_nh_id isn't set, we shouldn't try to match against it. This > > actually matters just for the RTF_CACHE case below (where this is > > already handled): if iproute2 gets a route exception an

Re: [PATCH net-next v6 04/11] ipv4: Dump route exceptions if requested

2019-06-20 Thread Stefano Brivio
On Thu, 20 Jun 2019 07:31:32 -0600 David Ahern wrote: > On 6/19/19 5:59 PM, Stefano Brivio wrote: > > diff --git a/include/net/route.h b/include/net/route.h > > index 065b47754f05..e7f65388a6d4 100644 > > --- a/include/net/route.h > > +++ b/include/net/route.h > > @@ -44,6 +44,7 @@ > > #define R

Re: [PATCH net-next v6 03/11] ipv4/route: Allow NULL flowinfo in rt_fill_info()

2019-06-20 Thread Stefano Brivio
On Thu, 20 Jun 2019 07:15:55 -0600 David Ahern wrote: > On 6/19/19 5:59 PM, Stefano Brivio wrote: > > In the next patch, we're going to use rt_fill_info() to dump exception > > routes upon RTM_GETROUTE with NLM_F_ROOT, meaning userspace is requesting > > a dump and not a specific route selection,

Re: [PATCH net] net/sched: flower: fix infinite loop in fl_walk()

2019-06-20 Thread Cong Wang
On Thu, Jun 20, 2019 at 5:52 AM Davide Caratti wrote: > > hello Cong, thanks for reading. > > On Wed, 2019-06-19 at 15:04 -0700, Cong Wang wrote: > > On Wed, Jun 19, 2019 at 2:10 PM Davide Caratti wrote: > > > on some CPUs (e.g. i686), tcf_walker.cookie has the same size as the IDR. > > > In this

Re: [PATCH net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-20 Thread Neil Horman
On Thu, Jun 20, 2019 at 12:18:41PM -0400, Willem de Bruijn wrote: > On Thu, Jun 20, 2019 at 12:14 PM Neil Horman wrote: > > > > On Thu, Jun 20, 2019 at 11:16:13AM -0400, Willem de Bruijn wrote: > > > On Thu, Jun 20, 2019 at 10:24 AM Neil Horman > > > wrote: > > > > > > > > On Thu, Jun 20, 2019 a

Re: [PATCH v2 net-next 2/2] net: dsa: mt7530: Add MT7621 TRGMII mode support

2019-06-20 Thread Frank Wunderlich
Tested on Bananapi R2 (mt7623) with 5.2-rc5 + net-next Tested-by: Frank Wunderlich Am 20. Juni 2019 14:21:55 MESZ schrieb "René van Dorst" : >This patch add support TRGMII mode for MT7621 internal MT7530 switch. >MT7621 TRGMII has only one fix speed mode of 1200MBit. > >Also adding support for m

[PATCH 00/11] XDP unaligned chunk placement support

2019-06-20 Thread Kevin Laatz
This patchset adds the ability to use unaligned chunks in the XDP umem. Currently, all chunk addresses passed to the umem are masked to be chunk size aligned (default is 2k, max is PAGE_SIZE). This limits where we can place chunks within the umem as well as limiting the packet sizes that are suppo

[PATCH 11/11] doc/af_xdp: include unaligned chunk case

2019-06-20 Thread Kevin Laatz
The addition of unaligned chunks mode, the documentation needs to be updated to indicate that the incoming addr to the fill ring will only be masked if the user application is run in the aligned chunk mode. This patch also adds a line to explicitly indicate that the incoming addr will not be masked

[PATCH 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-06-20 Thread Kevin Laatz
This patch adds support for the unaligned chunks mode. The addition of the unaligned chunks option will allow users to run the application with more relaxed chunk placement in the XDP umem. Unaligned chunks mode can be used with the '-u' or '--unaligned' command line options. Signed-off-by: Kevin

  1   2   >