[PATCHv2 iproute2-next] ip/geneve: fix ttl inherit behavior

2018-10-18 Thread Hangbin Liu
Currently when we add geneve with "ttl inherit", we only set ttl to 0, which is actually use whatever default value instead of inherit the inner protocol's ttl value. To make a difference with ttl inherit and ttl == 0, we add an attribute IFLA_GENEVE_TTL_INHERIT in kernel commit 52d0d404d39dd ("ge

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

2018-10-18 Thread Nambiar, Amritha
On 10/17/2018 10:41 PM, Cong Wang wrote: > 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

[PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats

2018-10-18 Thread Dan Carpenter
The struct type was copied from the line before but it should be "tx" instead of "rx". I have reviewed the code and I can't immediately see that this bug causes a runtime issue. Fixes: 36e53349b60b ("bnxt_en: Add additional extended port statistics.") Signed-off-by: Dan Carpenter --- This is fro

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

2018-10-18 Thread Peter Zijlstra
On Thu, Oct 18, 2018 at 01:10:15AM +0200, Daniel Borkmann wrote: > Wouldn't this then also allow the kernel side to use smp_store_release() > when it updates the head? We'd be pretty much at the model as described > in Documentation/core-api/circular-buffers.rst. > > Meaning, rough pseudo-code di

[net PATCH] net: sched: Fix for duplicate class dump

2018-10-18 Thread Phil Sutter
When dumping classes by parent, kernel would return classes twice: | # tc qdisc add dev lo root prio | # tc class show dev lo | class prio 8001:1 parent 8001: | class prio 8001:2 parent 8001: | class prio 8001:3 parent 8001: | # tc class show dev lo parent 8001: | class prio 8001:1 parent 8001: |

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

2018-10-18 Thread Davide Caratti
On Wed, 2018-10-17 at 22:35 -0700, Cong Wang wrote: > > (well, after some more thinking I looked again at that patch and yes, it > > lacked the most important thing:) > > Hmm, as I said, I am not sure if the logic is correct, if we have two > different > goto actions, we must have two pointers. >

Re: bond: take rcu lock in netpoll_send_skb_on_dev

2018-10-18 Thread Eran Ben Elisha
On 10/18/2018 8:46 AM, Cong Wang wrote: > 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&m=15391735

pull request (net): ipsec 2018-10-18

2018-10-18 Thread Steffen Klassert
1) Free the xfrm interface gro_cells when deleting the interface, otherwise we leak it. From Li RongQing. 2) net/core/flow.c does not exist anymore, so remove it from the MAINTAINERS file. 3) Fix a slab-out-of-bounds in _decode_session6. From Alexei Starovoitov. 4) Fix RCU protection wh

[PATCH 4/4] xfrm: policy: use hlist rcu variants on insert

2018-10-18 Thread Steffen Klassert
From: Florian Westphal bydst table/list lookups use rcu, so insertions must use rcu versions. Fixes: a7c44247f704e ("xfrm: policy: make xfrm_policy_lookup_bytype lockless") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_policy.c | 8 1 file changed,

[PATCH 2/4] MAINTAINERS: Remove net/core/flow.c

2018-10-18 Thread Steffen Klassert
net/core/flow.c does not exist anymore, so remove it from the IPSEC NETWORKING section of the MAINTAINERS file. Signed-off-by: Steffen Klassert --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index dcb0191c4f54..4ff21dac9b45 100644 --- a/MAINTAINERS +

[PATCH 1/4] xfrm: fix gro_cells leak when remove virtual xfrm interfaces

2018-10-18 Thread Steffen Klassert
From: Li RongQing The device gro_cells has been initialized, it should be freed, otherwise it will be leaked Fixes: f203b76d78092faf2 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_interface.c | 3 +++

[PATCH 3/4] net/xfrm: fix out-of-bounds packet access

2018-10-18 Thread Steffen Klassert
From: Alexei Starovoitov BUG: KASAN: slab-out-of-bounds in _decode_session6+0x1331/0x14e0 net/ipv6/xfrm6_policy.c:161 Read of size 1 at addr 8801d882eec7 by task syz-executor1/6667 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_ad

[PATCH 2/3] xfrm: use correct size to initialise sp->ovec

2018-10-18 Thread Steffen Klassert
From: Li RongQing This place should want to initialize array, not a element, so it should be sizeof(array) instead of sizeof(element) but now this array only has one element, so no error in this condition that XFRM_MAX_OFFLOAD_DEPTH is 1 Signed-off-by: Li RongQing Signed-off-by: Steffen Klasse

[PATCH 3/3] xfrm: use complete IPv6 addresses for hash

2018-10-18 Thread Steffen Klassert
From: Michal Kubecek In some environments it is common that many hosts share the same lower half of their IPv6 addresses (in particular ::1). As __xfrm6_addr_hash() and __xfrm6_daddr_saddr_hash() calculate the hash only from the lower halves, as much as 1/3 of the hosts ends up in one hashtable c

[PATCH 1/3] xfrm: remove unnecessary check in xfrmi_get_stats64

2018-10-18 Thread Steffen Klassert
From: Li RongQing if tstats of a device is not allocated, this device is not registered correctly and can not be used. Signed-off-by: Li RongQing Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_interface.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/xfrm/xfrm_interface.c b/net

pull request (net-next): ipsec-next 2018-10-18

2018-10-18 Thread Steffen Klassert
1) Remove an unnecessary dev->tstats check in xfrmi_get_stats64. From Li RongQing. 2) We currently do a sizeof(element) instead of a sizeof(array) check when initializing the ovec array of the secpath. Currently this array can have only one element, so code is OK but error-prone. Chang

[iproute PATCH] devlink: Fix error reporting in cmd_resource_set()

2018-10-18 Thread Phil Sutter
resource_path_parse() returns either zero or a negative error code, hence the negated value must be passed to strerror(). Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") Signed-off-by: Phil Sutter --- devlink/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

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

2018-10-18 Thread Neil Horman
On Wed, Oct 17, 2018 at 09:47:05PM -0700, David Miller wrote: > 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) > > { > > - sche

[iproute PATCH] rdma: Fix for ineffective check in add_filter()

2018-10-18 Thread Phil Sutter
With 'name' field defined as array in struct filters, it will always contain a value irrespective of whether a name was assigned or not. Fix this by turning the field into a const char pointer. Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") Signed-off-by: Phil Sutt

[PATCH iproute2-next 0/3] rdma: IB device rename

2018-10-18 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: * Dropped RFC tag after kernel part was accepted * Updated commit message of first patch to include correct SHA1 --- Hi, This is comprehensive part of kernel series posted earlier. The kernel

[PATCH iproute2-next 1/3] rdma: Update kernel include file to support IB device renaming

2018-10-18 Thread Leon Romanovsky
From: Leon Romanovsky Bring kernel header file changes upto commit 05d940d3a3ec ("RDMA/nldev: Allow IB device rename through RDMA netlink") Signed-off-by: Leon Romanovsky --- rdma/include/uapi/rdma/rdma_netlink.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdma/includ

[PATCH iproute2-next 2/3] rdma: Introduce command execution helper with required device name

2018-10-18 Thread Leon Romanovsky
From: Leon Romanovsky In contradiction to various show commands, the set command explicitly requires to use device name as an argument. Provide new command execution helper which enforces it. Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 1 + rdma/utils.c | 10 ++ 2 files changed,

[PATCH iproute2-next 3/3] rdma: Add an option to rename IB device interface

2018-10-18 Thread Leon Romanovsky
From: Leon Romanovsky Enrich rdmatool with an option to rename IB devices, the command interface follows Iproute2 convention: "rdma dev set [OLD-DEVNAME] name NEW-DEVNAME" Signed-off-by: Leon Romanovsky --- rdma/dev.c | 35 +++ 1 file changed, 35 insertions(+)

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

2018-10-18 Thread Holger Hoffstätte
On 10/18/18 08:15, Jonathan Woithe wrote: On Thu, Oct 18, 2018 at 08:03:32AM +0200, Heiner Kallweit wrote: On 18.10.2018 07:58, Jonathan Woithe wrote: On Thu, Oct 18, 2018 at 01:30:51AM +0200, Francois Romieu wrote: Holger Hoffstätte : [...] The bug will induce delayed rx processing when a sp

[PATCH net v2] net/sched: act_gact: properly init 'goto chain'

2018-10-18 Thread Davide Caratti
the following script: # tc f a dev v0 egress chain 4 matchall action simple sdata "A triumph!" # tc f a dev v0 egress matchall action pass random determ goto chain 4 5 produces the following crash: BUG: unable to handle kernel NULL pointer dereference at PGD 0 P4D 0 Oops: 0

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

2018-10-18 Thread Jiri Pirko
Fri, Oct 12, 2018 at 03:53:30PM CEST, amritha.namb...@intel.com wrote: >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/ > >Example: >1. Match on a port range: >- >$ tc filter ad

Re: [iproute2 PATCH] tc: flower: Classify packets based port ranges

2018-10-18 Thread Jiri Pirko
Fri, Oct 12, 2018 at 03:54:42PM CEST, amritha.namb...@intel.com wrote: [...] >@@ -1516,6 +1625,22 @@ static int flower_print_opt(struct filter_util *qu, >FILE *f, > if (nl_type >= 0) > flower_print_port("src_port", tb[nl_type]); > >+ if (flower_port_range_attr_type(ip_p

[iproute PATCH] ip-route: Fix for memleak in error path

2018-10-18 Thread Phil Sutter
If call to rta_addattr_l() failed, parse_encap_seg6() would leak memory. Fix this by making sure calls to free() are not skipped. Fixes: bd59e5b1517b0 ("ip-route: Fix segfault with many nexthops") Signed-off-by: Phil Sutter --- ip/iproute_lwtunnel.c | 16 ++-- 1 file changed, 10 inse

[iproute PATCH] rdma: Don't pass garbage to rd_check_is_filtered()

2018-10-18 Thread Phil Sutter
Variables 'src_port' and 'dst_port' are initialized only if attributes RDMA_NLDEV_ATTR_RES_SRC_ADDR or RDMA_NLDEV_ATTR_RES_DST_ADDR are present. Make sure to pass them over to rd_check_is_filtered() only if that is the case. Fixes: 9a362cc71a455 ("rdma: Add CM_ID resource tracking information") Si

Re: [PATCH net v2] net/sched: act_gact: properly init 'goto chain'

2018-10-18 Thread Jamal Hadi Salim
On 2018-10-18 8:05 a.m., Davide Caratti wrote: the following script: # tc f a dev v0 egress chain 4 matchall action simple sdata "A triumph!" # tc f a dev v0 egress matchall action pass random determ goto chain 4 5 produces the following crash: BUG: unable to handle kernel NULL pointer d

Re: [iproute PATCH] devlink: Fix error reporting in cmd_resource_set()

2018-10-18 Thread Jiri Pirko
Thu, Oct 18, 2018 at 01:28:23PM CEST, p...@nwl.cc wrote: >resource_path_parse() returns either zero or a negative error code, >hence the negated value must be passed to strerror(). > >Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") >Signed-off-by: Phil Sutter Acked-

Re: [net PATCH] net: sched: Fix for duplicate class dump

2018-10-18 Thread Jiri Pirko
Thu, Oct 18, 2018 at 10:34:26AM CEST, p...@nwl.cc wrote: >When dumping classes by parent, kernel would return classes twice: > >| # tc qdisc add dev lo root prio >| # tc class show dev lo >| class prio 8001:1 parent 8001: >| class prio 8001:2 parent 8001: >| class prio 8001:3 parent 8001: >| # tc c

[PATCH bpf-next v3 0/7] Implement queue/stack maps

2018-10-18 Thread Mauricio Vasquez B
In some applications this is needed have a pool of free elements, for example the list of free L4 ports in a SNAT. None of the current maps allow to do it as it is not possible to get any element without having they key it is associated to, even if it were possible, the lack of locking mecanishms

[PATCH bpf-next v3 3/7] bpf/verifier: add ARG_PTR_TO_UNINIT_MAP_VALUE

2018-10-18 Thread Mauricio Vasquez B
ARG_PTR_TO_UNINIT_MAP_VALUE argument is a pointer to a memory zone used to save the value of a map. Basically the same as ARG_PTR_TO_UNINIT_MEM, but the size has not be passed as an extra argument. This will be used in the following patch that implements some new helpers that receive a pointer to

[PATCH bpf-next v3 1/7] bpf: rename stack trace map operations

2018-10-18 Thread Mauricio Vasquez B
In the following patches queue and stack maps (FIFO and LIFO datastructures) will be implemented. In order to avoid confusion and a possible name clash rename stack_map_ops to stack_trace_map_ops Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu --- include/linux/bpf_types.h |2 +- kern

[PATCH bpf-next v3 5/7] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-18 Thread Mauricio Vasquez B
The previous patch implemented a bpf queue/stack maps that provided the peek/pop/push functions. There is not a direct relationship between those functions and the current maps syscalls, hence a new MAP_LOOKUP_AND_DELETE_ELEM syscall is added, this is mapped to the pop operation in the queue/stack

[PATCH bpf-next v3 6/7] Sync uapi/bpf.h to tools/include

2018-10-18 Thread Mauricio Vasquez B
Sync both files. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu --- tools/include/uapi/linux/bpf.h | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f9187b41dff6..c8824

[PATCH bpf-next v3 2/7] bpf/syscall: allow key to be null in map functions

2018-10-18 Thread Mauricio Vasquez B
This commit adds the required logic to allow key being NULL in case the key_size of the map is 0. A new __bpf_copy_key function helper only copies the key from userpsace when key_size != 0, otherwise it enforces that key must be null. Signed-off-by: Mauricio Vasquez B Acked-by: Song Liu --- ke

[PATCH bpf-next v3 7/7] selftests/bpf: add test cases for queue and stack maps

2018-10-18 Thread Mauricio Vasquez B
test_maps: Tests that queue/stack maps are behaving correctly even in corner cases test_progs: Tests new ebpf helpers Signed-off-by: Mauricio Vasquez B --- tools/lib/bpf/bpf.c| 12 ++ tools/lib/bpf/bpf.h|2 tools/testing/sel

[PATCH bpf-next v3 4/7] bpf: add queue and stack maps

2018-10-18 Thread Mauricio Vasquez B
Queue/stack maps implement a FIFO/LIFO data storage for ebpf programs. These maps support peek, pop and push operations that are exposed to eBPF programs through the new bpf_map[peek/pop/push] helpers. Those operations are exposed to userspace applications through the already existing syscalls in

Re: [danie...@cisco.com: Re: gianfar: Implement MAC reset and reconfig procedure]

2018-10-18 Thread Daniel Walker
On Thu, Oct 18, 2018 at 12:16:06PM +, Claudiu Manoil wrote: > Hi, > > Sorry but I never heard about the phy you're quoting, this m88e1101, what is > it? > Link mode? (SGMII, RGMII, ?) > Our boards (the ones I know) have Vitesse or Atheros phys. > If the maccfg2 setting you're mentioning reall

[iproute PATCH] ip-route: Fix parse_encap_seg6() srh parsing

2018-10-18 Thread Phil Sutter
In case caller did not specify 'segs' parameter, parse_srh() would read garbage while iterating over 'segbuf'. Avoid this by initializing 'segbuf' to an empty string. Fixes: e8493916a8ede ("iproute: add support for SR-IPv6 lwtunnel encapsulation") Signed-off-by: Phil Sutter --- ip/iproute_lwtunn

[iproute PATCH] tipc: Drop unused variable 'genl'

2018-10-18 Thread Phil Sutter
Although initialized by call to libmnl, the variable is used only in a call to sizeof(). Drop it and call sizeof with its type instead. Fixes: f043759dd4928 ("tipc: add new TIPC configuration tool") Signed-off-by: Phil Sutter --- tipc/node.c | 9 +++-- 1 file changed, 3 insertions(+), 6 dele

[iproute PATCH] tc: Remove pointless assignments in batch()

2018-10-18 Thread Phil Sutter
All these assignments are later overwritten without reading in between, so just drop them. Fixes: 485d0c6001c4a ("tc: Add batchsize feature for filter and actions") Signed-off-by: Phil Sutter --- tc/tc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tc/tc.c b/tc/tc.c ind

Re: [net PATCH] net: sched: Fix for duplicate class dump

2018-10-18 Thread Eric Dumazet
On Thu, Oct 18, 2018 at 6:03 AM Jiri Pirko wrote: > > Thu, Oct 18, 2018 at 10:34:26AM CEST, p...@nwl.cc wrote: > >When dumping classes by parent, kernel would return classes twice: > > > >| # tc qdisc add dev lo root prio > >| # tc class show dev lo > >| class prio 8001:1 parent 8001: > >| class p

Re: [danie...@cisco.com: Re: gianfar: Implement MAC reset and reconfig procedure]

2018-10-18 Thread Daniel Walker
On Thu, Oct 18, 2018 at 12:16:06PM +, Claudiu Manoil wrote: > Hi, > > Sorry but I never heard about the phy you're quoting, this m88e1101, what is > it? > Link mode? (SGMII, RGMII, ?) > Our boards (the ones I know) have Vitesse or Atheros phys. > If the maccfg2 setting you're mentioning reall

Re: [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats

2018-10-18 Thread Michael Chan
On Thu, Oct 18, 2018 at 1:02 AM Dan Carpenter wrote: > > The struct type was copied from the line before but it should be "tx" > instead of "rx". I have reviewed the code and I can't immediately see > that this bug causes a runtime issue. > > Fixes: 36e53349b60b ("bnxt_en: Add additional extended

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

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 10:14 AM, Peter Zijlstra wrote: > On Thu, Oct 18, 2018 at 01:10:15AM +0200, Daniel Borkmann wrote: > >> Wouldn't this then also allow the kernel side to use smp_store_release() >> when it updates the head? We'd be pretty much at the model as described >> in Documentation/core-api/cir

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

2018-10-18 Thread David Ahern
On 10/17/18 11:36 PM, David Miller wrote: > 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 unres

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

2018-10-18 Thread Banerjee, Debabrata
> From: Neil Horman > Agreed, this doesn't make sense. If you want a synchronous cleanup, create > a wrapper function that creates a wait queue, calls __netpoll_free_async, > and blocks on the wait queue completion. Modify the cleanup_work > method(s) to complete the wait queue, and you've got

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

2018-10-18 Thread Debabrata Banerjee
This fixes a problem introduced by: commit 2cde6acd49da ("netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock") When using netconsole on a bond, __netpoll_cleanup can asynchronously recurse multiple times, each __netpoll_free_async call can result in more __netpoll_free_async's. Thi

Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter()

2018-10-18 Thread David Ahern
On 10/18/18 5:41 AM, Phil Sutter wrote: > With 'name' field defined as array in struct filters, it will always > contain a value irrespective of whether a name was assigned or not. > > Fix this by turning the field into a const char pointer. > > Fixes: 8cd644095842a ("devlink: Add support for dev

Re: [PATCH net v2] net/sched: act_gact: properly init 'goto chain'

2018-10-18 Thread Davide Caratti
hello Jamal, On Thu, 2018-10-18 at 08:52 -0400, Jamal Hadi Salim wrote: > Rejection is a good solution[1]. > Would be helpful to set an ext_ack to something like > "only one goto chain is supported currently" ok, that's material for a v3, if you / Cong / others are ok with the other hunks. On Th

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

2018-10-18 Thread Alexei Starovoitov
On Thu, Oct 18, 2018 at 05:04:34PM +0200, Daniel Borkmann wrote: > #endif /* _TOOLS_LINUX_ASM_IA64_BARRIER_H */ > diff --git a/tools/arch/powerpc/include/asm/barrier.h > b/tools/arch/powerpc/include/asm/barrier.h > index a634da0..905a2c6 100644 > --- a/tools/arch/powerpc/include/asm/barrier.h > +

Re: [PATCH v3 26/30] net: sk_buff rbnode reorg

2018-10-18 Thread Christoph Paasch
Hello, On Thu, Sep 13, 2018 at 8:00 AM Stephen Hemminger wrote: > > From: Eric Dumazet > > commit bffa72cf7f9df842f0016ba03586039296b4caaf upstream > > skb->rbnode shares space with skb->next, skb->prev and skb->tstamp > > Current uses (TCP receive ofo queue and netem) need to save/restore > tst

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

2018-10-18 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 comp

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

2018-10-18 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 --- net/bpf/tes

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

2018-10-18 Thread Song Liu
Changes v3 -> v4: 1. Fixed crash issue reported by Alexei. 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_s

[PATCH net-next] tcp: fix TCP_REPAIR xmit queue setup

2018-10-18 Thread Eric Dumazet
Andrey reported the following warning triggered while running CRIU tests: tcp_clean_rtx_queue() ... last_ackt = tcp_skb_timestamp_us(skb); WARN_ON_ONCE(last_ackt == 0); This is caused by 5f6188a8003d ("tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh"), as we end up having s

Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter()

2018-10-18 Thread Phil Sutter
Hi, On Thu, Oct 18, 2018 at 09:27:47AM -0600, David Ahern wrote: > On 10/18/18 5:41 AM, Phil Sutter wrote: > > With 'name' field defined as array in struct filters, it will always > > contain a value irrespective of whether a name was assigned or not. > > > > Fix this by turning the field into a

Re: [PATCH bpf-next v3 5/7] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-18 Thread Song Liu
On Thu, Oct 18, 2018 at 6:16 AM Mauricio Vasquez B wrote: > > The previous patch implemented a bpf queue/stack maps that > provided the peek/pop/push functions. There is not a direct > relationship between those functions and the current maps > syscalls, hence a new MAP_LOOKUP_AND_DELETE_ELEM sys

Re: [PATCH bpf-next v3 4/7] bpf: add queue and stack maps

2018-10-18 Thread Song Liu
On Thu, Oct 18, 2018 at 6:16 AM Mauricio Vasquez B wrote: > > Queue/stack maps implement a FIFO/LIFO data storage for ebpf programs. > These maps support peek, pop and push operations that are exposed to eBPF > programs through the new bpf_map[peek/pop/push] helpers. Those operations > are expose

Re: [PATCH bpf-next v3 7/7] selftests/bpf: add test cases for queue and stack maps

2018-10-18 Thread Song Liu
On Thu, Oct 18, 2018 at 6:16 AM Mauricio Vasquez B wrote: > > test_maps: > Tests that queue/stack maps are behaving correctly even in corner cases > > test_progs: > Tests new ebpf helpers > > Signed-off-by: Mauricio Vasquez B > --- > tools/lib/bpf/bpf.c| 12 ++ >

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

2018-10-18 Thread Edward Cree
On 17/10/18 18:50, Martin Lau wrote: > On Wed, Oct 17, 2018 at 10:25:21AM -0700, Yonghong Song wrote: >> What you stated is true, BTF_KIND_FUNC_PROTO corresponds to >> dwarf subroutine tag which has no name while BTF_KIND_FUNC >> must have a valid name. The original design is to have both >> since

RE: [danie...@cisco.com: Re: gianfar: Implement MAC reset and reconfig procedure]

2018-10-18 Thread Claudiu Manoil
>-Original Message- >From: Daniel Walker >Sent: Thursday, October 18, 2018 5:05 PM >To: Claudiu Manoil >Cc: Hemant Ramdasi ; netdev@vger.kernel.org >Subject: Re: [danie...@cisco.com: Re: gianfar: Implement MAC reset and >reconfig procedure] > [...] > >Here's some parts of the logs. I adde

Re: pull request (net): ipsec 2018-10-18

2018-10-18 Thread David Miller
From: Steffen Klassert Date: Thu, 18 Oct 2018 12:25:17 +0200 > 1) Free the xfrm interface gro_cells when deleting the >interface, otherwise we leak it. From Li RongQing. > > 2) net/core/flow.c does not exist anymore, so remove it >from the MAINTAINERS file. > > 3) Fix a slab-out-of-boun

Re: pull request (net-next): ipsec-next 2018-10-18

2018-10-18 Thread David Miller
From: Steffen Klassert Date: Thu, 18 Oct 2018 12:56:51 +0200 > 1) Remove an unnecessary dev->tstats check in xfrmi_get_stats64. >From Li RongQing. > > 2) We currently do a sizeof(element) instead of a sizeof(array) >check when initializing the ovec array of the secpath. >Currently th

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

2018-10-18 Thread Neil Horman
On Thu, Oct 18, 2018 at 03:17:06PM +, Banerjee, Debabrata wrote: > > From: Neil Horman > > > Agreed, this doesn't make sense. If you want a synchronous cleanup, create > > a wrapper function that creates a wait queue, calls __netpoll_free_async, > > and blocks on the wait queue completion.

Re: [danie...@cisco.com: Re: gianfar: Implement MAC reset and reconfig procedure]

2018-10-18 Thread Daniel Walker
On Thu, Oct 18, 2018 at 04:49:26PM +, Claudiu Manoil wrote: > I can only advise you to check whether the MACCFG2 register settings are > consistent > at this point, when ping fails. You should check the I/F Mode bits (22-23) > and the > Full Duplex bit (31), in big-endian format. If these

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

2018-10-18 Thread Jakub Kicinski
On Wed, 17 Oct 2018 15:23:12 -0700, Jeff Kirsher wrote: > 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

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

2018-10-18 Thread Jakub Kicinski
On Wed, 17 Oct 2018 15:23:14 -0700, Jeff Kirsher wrote: > +/** > + * igc_ioctl - I/O control method > + * @netdev: network interface device structure > + * @ifreq: frequency Is it? :) > + * @cmd: command > + */ > +static int igc_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) > +{ >

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

2018-10-18 Thread David Miller
From: Saeed Mahameed Date: Wed, 17 Oct 2018 17:08:45 -0700 > 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

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

2018-10-18 Thread David Miller
From: Jeff Kirsher Date: Wed, 17 Oct 2018 15:23:11 -0700 > 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

Re: [PATCH bpf-next v3 7/7] selftests/bpf: add test cases for queue and stack maps

2018-10-18 Thread Mauricio Vasquez
On 10/18/18 11:36 AM, Song Liu wrote: On Thu, Oct 18, 2018 at 6:16 AM Mauricio Vasquez B wrote: test_maps: Tests that queue/stack maps are behaving correctly even in corner cases test_progs: Tests new ebpf helpers Signed-off-by: Mauricio Vasquez B --- tools/lib/bpf/bpf.c

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

2018-10-18 Thread Eric Dumazet
On 10/17/2018 10:20 PM, 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 error. This resu

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

2018-10-18 Thread Banerjee, Debabrata
> From: Neil Horman > The team driver still seems > to be an outlier there though I think , in that it doesn't guarantee the > holding > of rtnl in its port add/delete paths. Not seeing where this is the case in the team driver today? They were actually calling __netpoll_cleanup synchronously

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

2018-10-18 Thread Heiner Kallweit
rtl_rx() and rtl_tx() are called only if the respective bits are set in the interrupt status register. Under high load NAPI may not be able to process all data (work_done == budget) and it will schedule subsequent calls to the poll callback. rtl_ack_events() however resets the bits in the interrupt

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

2018-10-18 Thread Eric Dumazet
On 10/18/2018 10:56 AM, Heiner Kallweit wrote: > rtl_rx() and rtl_tx() are called only if the respective bits are set > in the interrupt status register. Under high load NAPI may not be > able to process all data (work_done == budget) and it will schedule > subsequent calls to the poll callback.

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

2018-10-18 Thread Martin Lau
On Thu, Oct 18, 2018 at 05:47:11PM +0100, Edward Cree wrote: > On 17/10/18 18:50, Martin Lau wrote: > > On Wed, Oct 17, 2018 at 10:25:21AM -0700, Yonghong Song wrote: > >> What you stated is true, BTF_KIND_FUNC_PROTO corresponds to > >> dwarf subroutine tag which has no name while BTF_KIND_FUNC > >

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

2018-10-18 Thread Heiner Kallweit
On 18.10.2018 20:02, Eric Dumazet wrote: > > > On 10/18/2018 10:56 AM, Heiner Kallweit wrote: >> rtl_rx() and rtl_tx() are called only if the respective bits are set >> in the interrupt status register. Under high load NAPI may not be >> able to process all data (work_done == budget) and it will

Re: [PATCH] net/ipv4: fix tcp_poll for SMC fallback

2018-10-18 Thread David Miller
From: Karsten Graul Date: Tue, 16 Oct 2018 16:45:54 +0200 > Commit dd979b4df817 ("net: simplify sock_poll_wait") breaks tcp_poll for > SMC fallback: An AF_SMC socket establishes an internal TCP socket for the > CLC handshake with the remote peer. Whenever the SMC connection can not be > establ

Re: [PATCH net-next 0/2] sctp: fix sk_wmem_queued and use it to check for writable space

2018-10-18 Thread David Miller
From: Xin Long Date: Wed, 17 Oct 2018 03:07:49 +0800 > sctp doesn't count and use asoc sndbuf_used, sk sk_wmem_alloc and > sk_wmem_queued properly, which also causes some problem. > > This patchset is to improve it. Series applied, thanks.

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

2018-10-18 Thread Nambiar, Amritha
On 10/18/2018 5:17 AM, Jiri Pirko wrote: > Fri, Oct 12, 2018 at 03:53:30PM CEST, amritha.namb...@intel.com wrote: >> 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/ >> >> Example: >> 1. Match on a

Re: [iproute2 PATCH] tc: flower: Classify packets based port ranges

2018-10-18 Thread Nambiar, Amritha
On 10/18/2018 5:21 AM, Jiri Pirko wrote: > Fri, Oct 12, 2018 at 03:54:42PM CEST, amritha.namb...@intel.com wrote: > > [...] > >> @@ -1516,6 +1625,22 @@ static int flower_print_opt(struct filter_util *qu, >> FILE *f, >> if (nl_type >= 0) >> flower_print_port("src_port", tb[nl_ty

Issues in error queue polling

2018-10-18 Thread Ricardo Biehl Pasquali
The commit 7d4c04fc170087119727 ("net: add option to enable error queue packets waking select") (2013-03-28) introduced SO_SELECT_ERR_QUEUE, which masks POLLPRI with POLLERR event return in some socket poll callbacks. POLLERR event issued with sock_queue_err_skb() did not wake up a poll when POLLE

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

2018-10-18 Thread David Miller
From: Heiner Kallweit Date: Thu, 18 Oct 2018 19:56:01 +0200 > rtl_rx() and rtl_tx() are called only if the respective bits are set > in the interrupt status register. Under high load NAPI may not be > able to process all data (work_done == budget) and it will schedule > subsequent calls to the po

[PATCH bpf-next] tools: bpftool: use 4 context mode for the NFP disasm

2018-10-18 Thread Jakub Kicinski
The nfp driver is currently always JITing the BPF for 4 context/thread mode of the NFP flow processors. Tell this to the disassembler, otherwise some registers may be incorrectly decoded. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang --- tools/bpf/bpftool/common.c | 5 - tools

[PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Nitin Hande
This patch proposes to extend the sk_lookup() BPF API to the XDP hookpoint. The sk_lookup() helper supports a lookup on incoming packet to find the corresponding socket that will receive this packet. Current support for this BPF API is at the tc hookpoint. This patch will extend this API at XDP h

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

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 05:33 PM, Alexei Starovoitov wrote: > On Thu, Oct 18, 2018 at 05:04:34PM +0200, Daniel Borkmann wrote: >> #endif /* _TOOLS_LINUX_ASM_IA64_BARRIER_H */ >> diff --git a/tools/arch/powerpc/include/asm/barrier.h >> b/tools/arch/powerpc/include/asm/barrier.h >> index a634da0..905a2c6 100

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

2018-10-18 Thread Josh Boyer
On Wed, Oct 17, 2018 at 5:09 PM John W. Linville wrote: > > 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.cav

[PATCH net-next] MAINTAINERS: Update contact info for VRF entry

2018-10-18 Thread David Ahern
From: David Ahern Update Shrijeet's email address for the VRF entry. Signed-off-by: David Ahern --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7f1399ac028e..144cd0ca41ec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15745,7

Re: [PATCH] net: ethernet: fec: Add missing SPEED_

2018-10-18 Thread LABBE Corentin
On Thu, Oct 18, 2018 at 11:55:49AM -0700, Florian Fainelli wrote: > On 10/18/2018 11:47 AM, LABBE Corentin wrote: > > On Thu, Oct 18, 2018 at 11:39:24AM -0700, Florian Fainelli wrote: > >> On 10/18/2018 08:05 AM, Corentin Labbe wrote: > >>> Since commit 58056c1e1b0e ("net: ethernet: Use phy_set_max

[PATCH net] ip6_tunnel: Fix encapsulation layout

2018-10-18 Thread Stefano Brivio
Commit 058214a4d1df ("ip6_tun: Add infrastructure for doing encapsulation") added the ip6_tnl_encap() call in ip6_tnl_xmit(), before the call to ipv6_push_frag_opts() to append the IPv6 Tunnel Encapsulation Limit option (option 4, RFC 2473, par. 5.1) to the outer IPv6 header. As long as the option

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

2018-10-18 Thread Edward Cree
On 18/10/18 19:12, Martin Lau wrote: > The BTF verification and bpf_prog_load() has to treat > them differently. > > Are you suggesting they can be treated the same for > the kernel verification purpose? > > or > > The concern is, having two kind, BTF_KIND_FUNC_PROTO and > BTF_KIND_FUNC, is confusi

[PATCH iproute2] doc/man: spelling fixes

2018-10-18 Thread Stephen Hemminger
Use ispell and codespell to find/fix spelling errors in documentation and man pages. Signed-off-by: Stephen Hemminger --- doc/actions/actions-general | 14 +++--- doc/actions/ifb-README | 18 +- doc/actions/mirred-usage| 6 +++--- man/man8/ip-link.8.in |

Re: [PATCH bpf-next] tools: bpftool: use 4 context mode for the NFP disasm

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 08:34 PM, Jakub Kicinski wrote: > The nfp driver is currently always JITing the BPF for 4 context/thread > mode of the NFP flow processors. Tell this to the disassembler, > otherwise some registers may be incorrectly decoded. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Jiong W

[PATCH net-next] r8169: handle all interrupt events in the hard irq handler

2018-10-18 Thread Heiner Kallweit
Having a separate "slow event" handler isn't needed because all interrupt events trigger asynchronous activity. And in case of SYSErr we have bigger problems than performance anyway. This patch also allows to get rid of acking interrupt events in the NAPI poll callback. Signed-off-by: Heiner Kallw

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

2018-10-18 Thread John Fastabend
On 10/18/2018 10:34 AM, Eric Dumazet wrote: > > > On 10/17/2018 10:20 PM, 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 t

[net-next 00/13][pull request] Intel Wired LAN Doc Updates 2018-10-18

2018-10-18 Thread Jeff Kirsher
This series contains documentation fixes and updates for Intel wired LAN drivers. The following was done: - Updated incorrect URLs - removed document references which did not apply to the current in-kernel drivers - added documentation for fm10k driver - added missing documentation on exist

[net-next 09/13] Documentation: i40e: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Acked-by: Shannon Nelson --- Docu

  1   2   >