Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-17 Thread Heiner Kallweit
On 18.10.2018 07:21, David Miller wrote: > From: Francois Romieu > Date: Thu, 18 Oct 2018 01:30:45 +0200 > >> Heiner Kallweit : >> [...] >>> This issue has been there more or less forever (at least it exists in >>> 3.16 already), so I can't provide a "Fixes" tag. >> >> Hardly forever. It fixes

Re: bond: take rcu lock in netpoll_send_skb_on_dev

2018-10-17 Thread Cong Wang
On Mon, Oct 15, 2018 at 4:36 AM Eran Ben Elisha wrote: > Hi, > > This suggested fix introduced a regression while using netconsole module > with mlx5_core module loaded. It is already reported here: https://marc.info/?l=linux-kernel=153917359528669=2 > > During irq handling, we hit a warning

Re: [net-next PATCH] net: sched: cls_flower: Classify packets using port ranges

2018-10-17 Thread Cong Wang
On Wed, Oct 17, 2018 at 9:42 PM David Miller wrote: > > From: Amritha Nambiar > Date: Fri, 12 Oct 2018 06:53:30 -0700 > > > Added support in tc flower for filtering based on port ranges. > > This is a rework of the RFC patch at: > > https://patchwork.ozlabs.org/patch/969595/ > > You never

[PATCH v3 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-17 Thread Song Liu
BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the skb. This patch enables direct access of skb for these programs. Two helper functions bpf_compute_and_save_data_pointers() and bpf_restore_data_pointers() are introduced. There are used in __cgroup_bpf_run_filter_skb(), to

[PATCH v3 bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-17 Thread Song Liu
Changes v2 -> v3: 1. Added helper function bpf_compute_and_save_data_pointers() and bpf_restore_data_pointers(). Changes v1 -> v2: 1. Updated the list of read-only fields, and read-write fields. 2. Added dummy sk to bpf_prog_test_run_skb(). This set enables BPF program of type

[PATCH v3 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-17 Thread Song Liu
Tests are added to make sure CGROUP_SKB cannot access: tc_classid, data_meta, flow_keys and can read and write: mark, prority, and cb[0-4] and can read other fields. To make selftest with skb->sk work, a dummy sk is added in bpf_prog_test_run_skb(). Signed-off-by: Song Liu ---

Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-17 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 17 Oct 2018 22:34:34 +0300 > If the skb space ends in an unresolved entry while dumping we'll miss > some unresolved entries. The reason is due to zeroing the entry counter > between dumping resolved and unresolved mfc entries. We should just > keep counting

Re: [PATCH net] net/sched: properly init chain in case of multiple control actions

2018-10-17 Thread Cong Wang
On Tue, Oct 16, 2018 at 10:38 AM Davide Caratti wrote: > > On Mon, 2018-10-15 at 11:31 -0700, Cong Wang wrote: > > On Sat, Oct 13, 2018 at 8:23 AM Davide Caratti wrote: > > > > > > On Fri, 2018-10-12 at 13:57 -0700, Cong Wang wrote: > > > > Why not just validate the fallback action in each

Re: [PATCH net] sctp: fix the data size calculation in sctp_data_size

2018-10-17 Thread David Miller
From: Xin Long Date: Wed, 17 Oct 2018 21:11:27 +0800 > sctp data size should be calculated by subtracting data chunk header's > length from chunk_hdr->length, not just data header. > > Fixes: 668c9beb9020 ("sctp: implement assign_number for > sctp_stream_interleave") > Signed-off-by: Xin Long

Re: [PATCH V1 net-next] net: ena: enable Low Latency Queues

2018-10-17 Thread David Miller
From: Date: Wed, 17 Oct 2018 15:33:23 +0300 > From: Arthur Kiyanovski > > Use the new API to enable usage of LLQ. > > Signed-off-by: Arthur Kiyanovski Applied.

Re: [PATCH V2 net-next] net: ena: Fix Kconfig dependency on X86

2018-10-17 Thread David Miller
From: Date: Wed, 17 Oct 2018 10:04:21 + > From: Netanel Belgazal > > The Kconfig limitation of X86 is to too wide. > The ENA driver only requires a little endian dependency. > > Change the dependency to be on little endian CPU. > > Signed-off-by: Netanel Belgazal Applied.

Re: [PATCH net] mlxsw: core: Fix use-after-free when flashing firmware during init

2018-10-17 Thread David Miller
From: Ido Schimmel Date: Wed, 17 Oct 2018 08:05:45 + > When the switch driver (e.g., mlxsw_spectrum) determines it needs to > flash a new firmware version it resets the ASIC after the flashing > process. The bus driver (e.g., mlxsw_pci) then registers itself again > with mlxsw_core which

Re: [PATCH net] udp6: fix encap return code for resubmitting

2018-10-17 Thread David Miller
From: Paolo Abeni Date: Wed, 17 Oct 2018 11:44:04 +0200 > The commit eb63f2964dbe ("udp6: add missing checks on edumux packet > processing") used the same return code convention of the ipv4 counterpart, > but ipv6 uses the opposite one: positive values means resubmit. > > This change addresses

Re: [PATCH net-next 0/2] tcp_bbr: TCP BBR changes for EDT pacing model

2018-10-17 Thread David Miller
From: Neal Cardwell Date: Tue, 16 Oct 2018 20:16:43 -0400 > Two small patches for TCP BBR to follow up with Eric's recent work to change > the TCP and fq pacing machinery to an "earliest departure time" (EDT) model: > > - The first patch adjusts the TCP BBR logic to work with the new >

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-17 Thread David Miller
From: Francois Romieu Date: Thu, 18 Oct 2018 01:30:45 +0200 > Heiner Kallweit : > [...] >> This issue has been there more or less forever (at least it exists in >> 3.16 already), so I can't provide a "Fixes" tag. > > Hardly forever. It fixes da78dbff2e05630921c551dbbc70a4b7981a8fff. I don't

[bpf-next v2 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread John Fastabend
Before using the psock returned by sk_psock_get() when adding it to a sockmap we need to ensure it is actually a sockmap based psock. Previously we were only checking this after incrementing the reference counter which was an error. This resulted in a slab-out-of-bounds error when the psock was

[bpf-next v2 0/2] Fix kcm + sockmap by checking psock type

2018-10-17 Thread John Fastabend
We check if the sk_user_data (the psock in skmsg) is in fact a sockmap type to late, after we read the refcnt which is an error. This series moves the check up before reading refcnt and also adds a test to test_maps to test trying to add a KCM socket into a sockmap. While reviewig this code I

[bpf-next v2 2/2] bpf: test_maps add a test to catch kcm + sockmap

2018-10-17 Thread John Fastabend
Adding a socket to both sockmap and kcm is not supported due to collision on sk_user_data usage. If selftests is run without KCM support we will issue a warning and continue with the tests. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/Makefile | 2 +-

Re: [PATCH net] sctp: not free the new asoc when sctp_wait_for_connect returns err

2018-10-17 Thread David Miller
From: Xin Long Date: Wed, 17 Oct 2018 03:06:12 +0800 > When sctp_wait_for_connect is called to wait for connect ready > for sp->strm_interleave in sctp_sendmsg_to_asoc, a panic could > be triggered if cpu is scheduled out and the new asoc is freed > elsewhere, as it will return err and later the

Re: [PATCH net] sctp: fix race on sctp_id2asoc

2018-10-17 Thread David Miller
From: Marcelo Ricardo Leitner Date: Tue, 16 Oct 2018 15:18:17 -0300 > syzbot reported an use-after-free involving sctp_id2asoc. Dmitry Vyukov > helped to root cause it and it is because of reading the asoc after it > was freed: > > CPU 1 CPU 2 > (working on socket

Re: [PATCH net] r8169: re-enable MSI-X on RTL8168g

2018-10-17 Thread David Miller
From: Heiner Kallweit Date: Tue, 16 Oct 2018 19:35:17 +0200 > Similar to d49c88d7677b ("r8169: Enable MSI-X on RTL8106e") after > e9d0ba506ea8 ("PCI: Reprogram bridge prefetch registers on resume") > we can safely assume that this also fixes the root cause of > the issue worked around by

Re: [PATCH v2 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-17 Thread Song Liu
> On Oct 17, 2018, at 9:44 PM, Alexei Starovoitov > wrote: > > On Wed, Oct 17, 2018 at 04:36:15PM -0700, Song Liu wrote: >> BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the >> skb. This patch enables direct access of skb for these programs. >> >> In

Re: [PATCH net] net: bpfilter: use get_pid_task instead of pid_task

2018-10-17 Thread David Miller
From: Taehee Yoo Date: Wed, 17 Oct 2018 00:35:10 +0900 > pid_task() dereferences rcu protected tasks array. > But there is no rcu_read_lock() in shutdown_umh() routine so that > rcu_read_lock() is needed. > get_pid_task() is wrapper function of pid_task. it holds rcu_read_lock() > then calls

Re: [PATCH net-next v2] net: dsa: mv88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-17 Thread David Miller
From: Marek Behún Date: Sat, 13 Oct 2018 14:40:31 +0200 > This is a fix for the port_set_speed method for the Topaz family. > Currently the same method is used as for the Peridot family, but > this is wrong for the SERDES port. > > On Topaz, the SERDES port is port 5, not 9 and 10 as in

Re: [PATCH net 0/2] geneve, vxlan: Don't set exceptions if skb->len < mtu

2018-10-17 Thread David Miller
From: Stefano Brivio Date: Fri, 12 Oct 2018 23:53:57 +0200 > This series fixes the exception abuse described in 2/2, and 1/2 > is just a preparatory change to make 2/2 less ugly. Series applied.

Re: [PATCH bpf] bpf: fix doc of bpf_skb_adjust_room() in uapi

2018-10-17 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 04:24:48PM +0200, Nicolas Dichtel wrote: > len_diff is signed. > > Fixes: fa15601ab31e ("bpf: add documentation for eBPF helpers (33-41)") > CC: Quentin Monnet > Signed-off-by: Nicolas Dichtel > --- > include/uapi/linux/bpf.h | 2 +- >

Re: [PATCH net-next] netpoll: allow cleanup to be synchronous

2018-10-17 Thread David Miller
From: Debabrata Banerjee Date: Fri, 12 Oct 2018 12:59:29 -0400 > @@ -826,7 +826,10 @@ static void netpoll_async_cleanup(struct work_struct > *work) > > void __netpoll_free_async(struct netpoll *np) > { > - schedule_work(>cleanup_work); > + if (rtnl_is_locked()) > +

Re: [PATCH v2 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-17 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 04:36:15PM -0700, Song Liu wrote: > BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the > skb. This patch enables direct access of skb for these programs. > > In __cgroup_bpf_run_filter_skb(), bpf_compute_data_pointers() is called > to compute proper

Re: [net-next PATCH] net: sched: cls_flower: Classify packets using port ranges

2018-10-17 Thread David Miller
From: Amritha Nambiar Date: Fri, 12 Oct 2018 06:53:30 -0700 > Added support in tc flower for filtering based on port ranges. > This is a rework of the RFC patch at: > https://patchwork.ozlabs.org/patch/969595/ You never addressed Cong's feedback asking you to explain why this can't be simply

RE: [PATCH v2 2/2] netdev/phy: add MDIO bus multiplexer driven by a regmap

2018-10-17 Thread Pankaj Bansal
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Sunday, October 7, 2018 11:39 PM > To: Pankaj Bansal ; Andrew Lunn > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH v2 2/2] netdev/phy: add MDIO bus multiplexer driven by a > regmap > > > > On

Re: [PATCH 00/16] octeontx2-af: NPA and NIX blocks initialization

2018-10-17 Thread David Miller
From: sunil.kovv...@gmail.com Date: Tue, 16 Oct 2018 16:57:04 +0530 > This patchset is a continuation to earlier submitted patch series > to add a new driver for Marvell's OcteonTX2 SOC's > Resource virtualization unit (RVU) admin function driver. Series applied.

RE: [PATCH v2 1/2] dt-bindings: net: add MDIO bus multiplexer driven by a regmap device

2018-10-17 Thread Pankaj Bansal
Hi Florian > -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Sunday, October 7, 2018 11:32 PM > To: Pankaj Bansal ; Andrew Lunn > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH v2 1/2] dt-bindings: net: add MDIO bus multiplexer driven > by > a regmap

Re: [bpf-next PATCH 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 08:37:39PM -0700, John Fastabend wrote: > Before using the psock returned by sk_psock_get() when adding it to a > sockmap we need to ensure it is actually a sockmap based psock. > Previously we were only checking this after incrementing the reference > counter which was an

[bpf-next PATCH 0/2] Fix kcm + sockmap by checking psock type

2018-10-17 Thread John Fastabend
We check if the sk_user_data (the psock in skmsg) is in fact a sockmap type to late, after we read the refcnt which is an error. This series moves the check up before reading refcnt and also adds a test to test_maps to test trying to add a KCM socket into a sockmap. While reviewig this code I

[bpf-next PATCH 2/2] bpf: test_maps add a test to catch kcm + sockmap

2018-10-17 Thread John Fastabend
Adding a socket to both sockmap and kcm is not supported due to collision on sk_user_data usage. If selftests is run without KCM support we will issue a warning and continue with the tests. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/Makefile |2 -

[bpf-next PATCH 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread John Fastabend
Before using the psock returned by sk_psock_get() when adding it to a sockmap we need to ensure it is actually a sockmap based psock. Previously we were only checking this after incrementing the reference counter which was an error. This resulted in a slab-out-of-bounds error when the psock was

Re: [PATCH bpf-next v3 00/13] bpf: add btf func info support

2018-10-17 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 04:30:22PM -0700, Yonghong Song wrote: > > This patch added func info support to the kernel so we can > get better ksym's for bpf function calls. Basically, > pairs of bpf function calls and their corresponding types > are passed to the kernel. Extracting function names

[net-next 12/14] net/mlx5: E-Switch, Enable setting goto slow path chain action

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey A pre-step for the tc offloads code to use this when a neigh is not available for encap rules. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 ++

[net-next 14/14] net/mlx5e: Support offloading tc priorities and chains for eswitch flows

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey Currently we fail when user specify a non-zero chain, this patch adds the support for it and tc priorities. To get to a new chain, use the tc goto action. Currently we support a fixed prio range 1-16, and chain range 0-3. Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz

[net-next 13/14] net/mlx5e: Use a slow path rule instead if vxlan neighbour isn't available

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey When adding a vxlan tc rule, and a neighbour isn't available, we don't insert any rule to hardware. Once we enable offloading flows with multiple priorities, a packet that should have matched this rule will continue in hardware pipeline and might match a wrong one. This is

[net-next 05/14] net/mlx5: Add cap bits for multi fdb encap

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey If set, the firmware supports creating of flow tables with encap enabled while VFs are configured, if we already created one (restriction still applies on the first creation). Signed-off-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed ---

[net-next 03/14] net/mlx5e: Change return type of tc add flow functions

2018-10-17 Thread Saeed Mahameed
From: Rabie Loulou Refactor the flow add utility functions to return err code instead of rule pointers. This will allow for simpler logic when one tc rule is duplicated to two HW rules in downstream patches. Signed-off-by: Rabie Loulou Signed-off-by: Shahar Klein Reviewed-by: Roi Dayan

[net-next 06/14] net/mlx5: Split FDB fast path prio to multiple namespaces

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey Towards supporting multi-chains and priorities, split the FDB fast path to multiple namespaces (sub namespaces), each with multiple priorities. This patch adds a new flow steering type, FS_TYPE_PRIO_CHAINS, which is like current FS_TYPE_PRIO, but may contain only namespaces,

[net-next 08/14] net/mlx5: E-Switch, Add chains and priorities

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey A chain is a group of priorities, so use the fdb parallel sub namespaces to implement chains, and a flow table for each priority in them. Because these namespaces are parallel and in series to the slow path fdb, the chains aren't connected to one another (but to the slow

[net-next 01/14] net/mlx5: E-Switch, Get counters for offloaded flows from callers

2018-10-17 Thread Saeed Mahameed
From: Mark Bloch There's no real reason for the e-switch logic to manage the creation of counters for offloaded flows. The API already has the directive for the caller to denote they want to attach a counter to the created flow. As such, we go and move the management of flow counters to the

[net-next 02/14] net/mlx5: Use flow counter IDs and not the wrapping cache object

2018-10-17 Thread Saeed Mahameed
From: Mark Bloch Currently, when a flow rule is created using the FS core layer, the caller has to pass the entire flow counter object and not just the counter HW handle (ID). This requires both the FS core and the caller to have knowledge about the inner implementation of the FS layer flow

[net-next 11/14] net/mlx5e: Avoid duplicated code for tc offloads add/del fdb rule

2018-10-17 Thread Saeed Mahameed
From: Or Gerlitz The code for adding/deleting fdb flow is repeated when user-space does flow add/del and when we add/del from the neigh update path - unify them to avoid the duplication. Signed-off-by: Or Gerlitz Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed ---

[pull request][net-next 00/14] Mellanox, mlx5 updates

2018-10-17 Thread Saeed Mahameed
Hi Dave, This series from Paul, Or and Mark provides the support for e-switch tc offloading of multiple priorities and chains, the series is based on a merge commit with mlx5-next branch for patches that are already submitted and reviewed through the netdev and rdma mailing lists. For more

[net-next 07/14] net/mlx5: E-Switch, Have explicit API to delete fwd rules

2018-10-17 Thread Saeed Mahameed
From: Or Gerlitz Be symmetric with the e-switch API to add rules which has a specific function to add fwd rules which are used as part of vport mirroring. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed ---

[net-next 10/14] net/mlx5e: For TC offloads, always add new flow instead of appending the actions

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey When replacing a tc flower rule, flower first requests to add the new rule (new action), then deletes the old one. But currently when asked to add a new tc flower flow, we append the actions (and counters to it). This can result in a fte with two flow counters or conflicting

[net-next 09/14] net/mlx5: Add a no-append flow insertion mode

2018-10-17 Thread Saeed Mahameed
From: Paul Blakey If no-append flag is set, we will add a new FTE, instead of appending the actions of the inserted rule when the same match already exists. While here, move the has_flow_tag boolean indicator to be a flag too. This patch doesn't change any functionality. Signed-off-by: Paul

[net-next 04/14] net/mlx5e: Split TC add rule path for nic vs e-switch

2018-10-17 Thread Saeed Mahameed
From: Roi Dayan Move to have clear separation on the code path to add nic vs e-switch flows. While here we break the code that deals with adding offloaded TC tool to few smaller stages, each on helper function. Besides getting us simpler and readable code, these are pre-steps for being able to

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-17 Thread Francois Romieu
Holger Hoffstätte : [...] > I continued to use the BQL patch in my private tree after it was reverted > and also had occasional timeouts, but *only* after I started playing > with ethtool to change offload settings. Without offloads or the BQL patch > everything has been rock-solid since then. >

[PATCH v2 bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-17 Thread Song Liu
Changes v1 -> v2: 1. Updated the list of read-only fields, and read-write fields. 2. Added dummy sk to bpf_prog_test_run_skb(). This set enables BPF program of type BPF_PROG_TYPE_CGROUP_SKB to access some __skb_buff data directly. Song Liu (2): bpf: add cg_skb_is_valid_access for

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-17 Thread Francois Romieu
Heiner Kallweit : [...] > This issue has been there more or less forever (at least it exists in > 3.16 already), so I can't provide a "Fixes" tag. Hardly forever. It fixes da78dbff2e05630921c551dbbc70a4b7981a8fff. -- Ueimor

[PATCH v2 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-17 Thread Song Liu
BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the skb. This patch enables direct access of skb for these programs. In __cgroup_bpf_run_filter_skb(), bpf_compute_data_pointers() is called to compute proper data_end for the BPF program. Signed-off-by: Song Liu ---

[PATCH v2 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-17 Thread Song Liu
Tests are added to make sure CGROUP_SKB cannot access: tc_classid, data_meta, flow_keys and can read and write: mark, prority, and cb[0-4] and can read other fields. To make selftest with skb->sk work, a dummy sk is added in bpf_prog_test_run_skb(). Signed-off-by: Song Liu ---

[PATCH bpf-next v3 13/13] tools/bpf: bpftool: add support for jited func types

2018-10-17 Thread Yonghong Song
This patch added support to print function signature if btf func_info is available. Note that ksym now uses function name instead of prog_name as prog_name has a limit of 16 bytes including ending '\0'. The following is a sample output for selftests test_btf with file test_btf_haskv.o: $

[PATCH bpf-next v3 06/13] tools/bpf: sync kernel uapi bpf.h header to tools directory

2018-10-17 Thread Yonghong Song
The kernel uapi bpf.h is synced to tools directory. Signed-off-by: Yonghong Song --- tools/include/uapi/linux/bpf.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f9187b41dff6..7ebbf4f06a65 100644 ---

[PATCH bpf-next v3 10/13] tools/bpf: do not use pahole if clang/llvm can generate BTF sections

2018-10-17 Thread Yonghong Song
Add additional checks in tools/testing/selftests/bpf and samples/bpf such that if clang/llvm compiler can generate BTF sections, do not use pahole. Signed-off-by: Yonghong Song --- samples/bpf/Makefile | 8 tools/testing/selftests/bpf/Makefile | 8 2 files

[PATCH bpf-next v3 12/13] tools/bpf: enhance test_btf file testing to test func info

2018-10-17 Thread Yonghong Song
Change the bpf programs test_btf_haskv.c and test_btf_nokv.c to have two sections, and enhance test_btf.c test_file feature to test btf func_info returned by the kernel. Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/test_btf.c | 87 ++--

[PATCH bpf-next v3 05/13] bpf: get better bpf_prog ksyms based on btf func type_id

2018-10-17 Thread Yonghong Song
This patch added interface to load a program with the following additional information: . prog_btf_fd . func_info and func_info_len where func_info will provides function range and type_id corresponding to each function. If verifier agrees with function range provided by the user, the

[PATCH bpf-next v3 09/13] tools/bpf: add support to read .BTF.ext sections

2018-10-17 Thread Yonghong Song
The .BTF section is already available to encode types. These types can be used for map pretty print. The whole .BTF will be passed to the kernel as well for which kernel can verify and return to the user space for pretty print etc. The llvm patch at https://reviews.llvm.org/D53261 will generate

[PATCH bpf-next v3 01/13] bpf: btf: Break up btf_type_is_void()

2018-10-17 Thread Yonghong Song
This patch breaks up btf_type_is_void() into btf_type_is_void() and btf_type_is_fwd(). It also adds btf_type_nosize() to better describe it is testing a type has nosize info. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- kernel/bpf/btf.c | 37

[PATCH bpf-next v3 08/13] tools/bpf: extends test_btf to test load/retrieve func_type info

2018-10-17 Thread Yonghong Song
A two function bpf program is loaded with btf and func_info. After successful prog load, the bpf_get_info syscall is called to retrieve prog info to ensure the types returned from the kernel matches the types passed to the kernel from the user space. Several negative tests are also added to test

[PATCH bpf-next v3 04/13] tools/bpf: add btf func/func_proto unit tests in selftest test_btf

2018-10-17 Thread Yonghong Song
Add several BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO unit tests in bpf selftest test_btf. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/lib/bpf/btf.c| 4 + tools/testing/selftests/bpf/test_btf.c | 216 + 2 files changed, 220

[PATCH bpf-next v3 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-10-17 Thread Yonghong Song
This patch adds BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO support to the type section. BTF_KIND_FUNC_PROTO is used to specify the type of a function pointer. With this, BTF has a complete set of C types (except float). BTF_KIND_FUNC is used to specify the signature of a defined subprogram.

[PATCH bpf-next v3 00/13] bpf: add btf func info support

2018-10-17 Thread Yonghong Song
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 map pretty print. pahole is used to convert dwarf to BTF for ELF files. This patch added func info support to the kernel

[PATCH bpf-next v3 11/13] tools/bpf: refactor to implement btf_get_from_id() in lib/bpf

2018-10-17 Thread Yonghong Song
The function get_btf() is implemented in tools/bpf/bpftool/map.c to get a btf structure given a map_info. This patch refactored this function to be function btf_get_from_id() in tools/lib/bpf so that it can be used later. Signed-off-by: Yonghong Song --- tools/bpf/bpftool/map.c | 68

[PATCH bpf-next v3 03/13] tools/bpf: sync kernel btf.h header

2018-10-17 Thread Yonghong Song
The kernel uapi btf.h is synced to the tools directory. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/include/uapi/linux/btf.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi/linux/btf.h

[PATCH bpf-next v3 07/13] tools/bpf: add new fields for program load in lib/bpf

2018-10-17 Thread Yonghong Song
The new fields are added for program load in lib/bpf so application uses api bpf_load_program_xattr() is able to load program with btf and func_info data. This functionality will be used in next patch by bpf selftest test_btf. Signed-off-by: Yonghong Song --- tools/lib/bpf/bpf.c | 3 +++

Re: [PATCH bpf-next 2/3] tools, perf: use smp_{rmb,mb} barriers instead of {rmb,mb}

2018-10-17 Thread Daniel Borkmann
On 10/17/2018 05:50 PM, Peter Zijlstra wrote: > On Wed, Oct 17, 2018 at 04:41:55PM +0200, Daniel Borkmann wrote: >> @@ -73,7 +73,8 @@ static inline u64 perf_mmap__read_head(struct perf_mmap >> *mm) >> { >> struct perf_event_mmap_page *pc = mm->base; >> u64 head =

Re: gianfar: Implement MAC reset and reconfig procedure

2018-10-17 Thread Daniel Walker
On Tue, Oct 16, 2018 at 03:03:07PM -0700, Florian Fainelli wrote: > On 10/16/2018 02:36 PM, Daniel Walker wrote: > > Hi, > > > > I would like to report an issue in the gianfar driver. The issue is as > > follows. > > > > We have a P2020 board that uses the gianfar driver, and we have a

[net-next 06/11] igc: Add transmit and receive fastpath and interrupt handlers

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin This patch adds support for allocating, configuring, and freeing Tx/Rx ring resources. With these changes in place the descriptor queues are in a state where they are ready to transmit or receive if provided buffers. This also adds the transmit and receive fastpath and

[net-next 01/11] igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin This patch adds the beginning framework onto which I am going to add the igc driver which supports the Intel(R) I225-LM/I225-V 2.5G Ethernet Controller. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/Kconfig

[net-next 07/11] igc: Add HW initialization code

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin Add code for hardware initialization and reset Add code for semaphore handling Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/Makefile | 2 +- drivers/net/ethernet/intel/igc/igc_base.c| 187

[net-next 08/11] igc: Add NVM support

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin Add code for NVM support and get MAC address, complete probe method. Signed-off-by: Sasha Neftin Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/Makefile | 2 +-

[net-next 05/11] igc: Add support for Tx/Rx rings

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin This change adds the defines and structures necessary to support both Tx and Rx descriptor rings. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/Makefile | 2 +- drivers/net/ethernet/intel/igc/igc.h

[net-next 04/11] igc: Add interrupt support

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin This patch set adds interrupt support for the igc interfaces. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 127 +++ drivers/net/ethernet/intel/igc/igc_defines.h | 40 +

[net-next 10/11] igc: Add setup link functionality

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin Add link establishment methods Add auto negotiation methods Add read MAC address method Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_base.c|

[net-next 11/11] igc: Add watchdog

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin Code completion, remove obsolete code Add watchdog methods Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 12 + drivers/net/ethernet/intel/igc/igc_defines.h | 11 +

[net-next 02/11] igc: Add support for PF

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin This patch adds the basic defines and structures needed by the PF for operation. With this it is possible to bring up the interface, but without being able to configure any of the filters on the interface itself. Add skeleton for a function pointers. Signed-off-by: Sasha

[net-next 09/11] igc: Add code for PHY support

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin Add PHY's ID support Add support for initialization, acquire and release of PHY Enable register access Signed-off-by: Sasha Neftin Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/Makefile | 2 +-

[net-next 03/11] igc: Add netdev

2018-10-17 Thread Jeff Kirsher
From: Sasha Neftin Now that we have the ability to configure the basic settings on the device we can start allocating and configuring a netdev for the interface. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h |

[net-next 00/11][pull request] 1GbE Intel Wired LAN Driver Updates 2018-10-17

2018-10-17 Thread Jeff Kirsher
This series adds support for the new igc driver. The igc driver is the new client driver supporting the Intel I225 Ethernet Controller, which supports 2.5GbE speeds. The reason for creating a new client driver, instead of adding support for the new device in e1000e, is that the silicon behaves

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-17 Thread Alexei Starovoitov
On 10/17/18 2:31 PM, Arnaldo Carvalho de Melo wrote: > > Keep all that info in a file, as I described above. Or keep it for a > while, to give that thread in userspace time to get it and tell the > kernel that it can trow it away. stashing by kernel into a file is a huge headache, since format of

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-17 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 17, 2018 at 07:08:37PM +, Alexei Starovoitov escreveu: > On 10/17/18 11:53 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Oct 17, 2018 at 04:36:08PM +, Alexei Starovoitov escreveu: > >> On 10/17/18 8:09 AM, David Ahern wrote: > >>> On 10/16/18 11:43 PM, Song Liu wrote: >

Re: [PATCH net] sctp: fix race on sctp_id2asoc

2018-10-17 Thread Neil Horman
On Tue, Oct 16, 2018 at 03:18:17PM -0300, Marcelo Ricardo Leitner wrote: > syzbot reported an use-after-free involving sctp_id2asoc. Dmitry Vyukov > helped to root cause it and it is because of reading the asoc after it > was freed: > > CPU 1 CPU 2 > (working on

Re: [PATCH linux-firmware] linux-firmware: liquidio: fix GPL compliance issue

2018-10-17 Thread John W. Linville
On Wed, Oct 17, 2018 at 07:34:42PM +, Manlunas, Felix wrote: > On Fri, Sep 28, 2018 at 04:50:51PM -0700, Felix Manlunas wrote: > > Part of the code inside the lio_vsw_23xx.bin firmware image is under GPL, > > but the LICENCE.cavium file neglects to indicate that. However, > > LICENCE.cavium

Re: [PATCH 2/2] net: emac: implement TCP TSO

2018-10-17 Thread Florian Fainelli
On 10/17/2018 12:53 PM, Christian Lamparter wrote: > This patch enables TSO(v4) hw feature for emac driver. > As atleast the APM82181's TCP/IP acceleration hardware > controller (TAH) provides TCP segmentation support in > the transmit path. > > Signed-off-by: Christian Lamparter > --- >

Re: [PATCH 1/2] net: emac: implement 802.1Q VLAN TX tagging support

2018-10-17 Thread Florian Fainelli
On 10/17/2018 01:08 PM, Florian Fainelli wrote: > On 10/17/2018 12:53 PM, Christian Lamparter wrote: >> As per' APM82181 Embedded Processor User Manual 26.1 EMAC Features: >> VLAN: >> - Support for VLAN tag ID in compliance with IEEE 802.3ac. >> - VLAN tag insertion or replacement for transmit

Re: [PATCH 1/2] net: emac: implement 802.1Q VLAN TX tagging support

2018-10-17 Thread Florian Fainelli
On 10/17/2018 12:53 PM, Christian Lamparter wrote: > As per' APM82181 Embedded Processor User Manual 26.1 EMAC Features: > VLAN: > - Support for VLAN tag ID in compliance with IEEE 802.3ac. > - VLAN tag insertion or replacement for transmit packets > > This patch completes the missing code for

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-17 Thread Holger Hoffstätte
On 10/17/18 21:27, Heiner Kallweit wrote: (snip) Good to know. What's your kernel version and RTL8168 chip version? Regarding the chip version the dmesg line with the XID would be relevant. 4.18.15 + PDS (custom CPU scheduler) + cherry pickings from mainline. Applied both the original patch in

Re: [PATCHv2 2/2] dt-bindings: can: xilinx_can: add Xilinx CAN FD 2.0 bindings

2018-10-17 Thread Rob Herring
On Fri, 12 Oct 2018 09:55:09 +0530, wrote: > From: Shubhrajyoti Datta > > Add compatible string and new attributes to support the Xilinx CAN > FD 2.0. > > Signed-off-by: Shubhrajyoti Datta > --- > Documentation/devicetree/bindings/net/can/xilinx_can.txt | 1 + > 1 file changed, 1

[PATCH 1/2] net: emac: implement 802.1Q VLAN TX tagging support

2018-10-17 Thread Christian Lamparter
As per' APM82181 Embedded Processor User Manual 26.1 EMAC Features: VLAN: - Support for VLAN tag ID in compliance with IEEE 802.3ac. - VLAN tag insertion or replacement for transmit packets This patch completes the missing code for the VLAN tx tagging support, as the the EMAC_MR1_VLE was

[PATCH 2/2] net: emac: implement TCP TSO

2018-10-17 Thread Christian Lamparter
This patch enables TSO(v4) hw feature for emac driver. As atleast the APM82181's TCP/IP acceleration hardware controller (TAH) provides TCP segmentation support in the transmit path. Signed-off-by: Christian Lamparter --- drivers/net/ethernet/ibm/emac/core.c | 101 ++-

Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-17 Thread Nikolay Aleksandrov
On 17/10/2018 22:34, Nikolay Aleksandrov wrote: > If the skb space ends in an unresolved entry while dumping we'll miss > some unresolved entries. The reason is due to zeroing the entry counter > between dumping resolved and unresolved mfc entries. We should just > keep counting until the whole

[PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-17 Thread Nikolay Aleksandrov
If the skb space ends in an unresolved entry while dumping we'll miss some unresolved entries. The reason is due to zeroing the entry counter between dumping resolved and unresolved mfc entries. We should just keep counting until the whole table is dumped and zero when we move to the next as we

Re: [PATCH linux-firmware] linux-firmware: liquidio: fix GPL compliance issue

2018-10-17 Thread Manlunas, Felix
On Fri, Sep 28, 2018 at 04:50:51PM -0700, Felix Manlunas wrote: > Part of the code inside the lio_vsw_23xx.bin firmware image is under GPL, > but the LICENCE.cavium file neglects to indicate that. However, > LICENCE.cavium does correctly specify the license that covers the other > Cavium firmware

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-17 Thread Heiner Kallweit
On 17.10.2018 21:11, Holger Hoffstätte wrote: > On 10/17/18 20:12, Heiner Kallweit wrote: >> On 16.10.2018 23:17, Holger Hoffstätte wrote: >>> On 10/16/18 22:37, Heiner Kallweit wrote: rtl_rx() and rtl_tx() are called only if the respective bits are set in the interrupt status register.

  1   2   >