[PATCH bpf-next v3 09/11] nfp: bpf: use extack support to improve debugging

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for eBPF offload in the driver. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c| 31 ++-- drivers/net/ethernet/netronome/nfp/bpf/main.h| 2 +- dr

[PATCH bpf-next v3 07/11] net: sched: create tc_can_offload_extack() wrapper

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Create a wrapper around tc_can_offload() that takes an additional extack pointer argument in order to output an error message if TC offload is disabled on the device. In this way, the error message is handled by the core and can be the same for all drivers. Signed-off-by: Q

[PATCH bpf-next v3 08/11] nfp: bpf: plumb extack into functions related to XDP offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Pass a pointer to an extack object to nfp_app_xdp_offload() in order to prepare for extack usage in the nfp driver. Next step will be to forward this extack pointer to nfp_net_bpf_offload(), once this function is able to use it for printing error messages. Signed-off-by: Que

[PATCH bpf-next v3 04/11] net: sched: cls_u32: propagate extack support for filter offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_u32. This makes it possible to use netlink extack messages in the future at replacement time for this filter, although it is not used at this point. Sig

[PATCH bpf-next v3 01/11] net: sched: add extack support to change() classifier operation

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Add an extra argument to `->change()` operation for passing a pointer to a struct netlink_ext_ack. Update the operation for all classifiers accordingly. Extack is not used at this point. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- include/net/sch_generic

[PATCH bpf-next v3 02/11] net: sched: cls_flower: propagate extack support for filter offload

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_flower. This makes it possible to use netlink extack messages in the future at replacement time for this filter, although it is not used at this point.

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: > Hi, > > this patch adds extack support for TC classifier subsystem. The first > patch fixes some code style issues for this patch series pointed out > by checkpatch. The other patches until the last one prepares extack > handling for the

Re: [PATCH net-next 8/8] net: sched: cls_u32: add extack support

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 12:20:27 -0500, Alexander Aring wrote: > @@ -780,14 +787,18 @@ static int u32_set_parms(struct net *net, struct > tcf_proto *tp, > u32 handle = nla_get_u32(tb[TCA_U32_LINK]); > struct tc_u_hnode *ht_down = NULL, *ht_old; > > - if (TC_U3

[PATCH v3 net-next 0/4] l2tp: set l2specific_len based on l2specific_type

2018-01-16 Thread Lorenzo Bianconi
Do not rely on l2specific_len value provided by userspace but set sublayer length according to l2specific_type. Mark L2TP_ATTR_L2SPEC_LEN attribute as not used Changes since v2: - drop the patch related to a fix in the switch default case in l2tp_nl_cmd_session_create() - use L2SPECTYPE_NONE as

[PATCH v3 net-next 2/4] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-16 Thread Lorenzo Bianconi
Remove l2specific_len dependency while building l2tpv3 header or parsing the received frame since default L2-Specific Sublayer is always four bytes long and we don't need to rely on a user supplied value. Moreover in l2tp netlink code there are no sanity checks to enforce the relation between l2spe

[PATCH v3 net-next 3/4] l2tp: remove l2specific_len configurable parameter

2018-01-16 Thread Lorenzo Bianconi
Remove l2specific_len configuration parameter since now L2-Specific Sublayer length is computed according to l2specific_type provided by userspace. Reviewed-by: Guillaume Nault Tested-by: Guillaume Nault Signed-off-by: Lorenzo Bianconi --- net/l2tp/l2tp_core.c| 1 - net/l2tp/l2tp_core.h

[PATCH v3 net-next 4/4] l2tp: mark L2TP_ATTR_L2SPEC_LEN as not used

2018-01-16 Thread Lorenzo Bianconi
Reviewed-by: Guillaume Nault Tested-by: Guillaume Nault Signed-off-by: Lorenzo Bianconi --- include/uapi/linux/l2tp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/l2tp.h b/include/uapi/linux/l2tp.h index 71e62795104d..7d570c7bd117 100644 --- a/include/u

[PATCH v3 net-next 1/4] l2tp: double-check l2specific_type provided by userspace

2018-01-16 Thread Lorenzo Bianconi
Add sanity check on l2specific_type provided by userspace in l2tp_nl_cmd_session_create() since just L2TP_L2SPECTYPE_DEFAULT and L2TP_L2SPECTYPE_NONE are currently supported. Moreover explicitly set l2specific_type to L2TP_L2SPECTYPE_DEFAULT only if the userspace does not provide a value for it Re

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 04:46 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: [..] Ugh, this is going to conflict with our series too :( (and I CCed you on ours) Would it be OK for you to hold off until Jiri's code gets merged and ours comes down via bpf-next? That

[PATCH] cfg80211: fix station info handling bugs

2018-01-16 Thread Johannes Berg
From: Johannes Berg Fix two places where the structure isn't initialized to zero, and thus can't be filled properly by the driver. Fixes: 4a4b8169501b ("cfg80211: Accept multiple RSSI thresholds for CQM") Fixes: 9930380f0bd8 ("cfg80211: implement IWRATE") Signed-off-by: Johannes Berg --- Dave,

[PATCH bpf] bpf: reject stores into ctx via st and xadd

2018-01-16 Thread Daniel Borkmann
Alexei found that verifier does not reject stores into context via BPF_ST instead of BPF_STX. And while looking at it, we also should not allow XADD variant of BPF_STX. The context rewriter is only assuming either BPF_LDX_MEM- or BPF_STX_MEM-type operations, thus reject anything other than that so

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: > On 18-01-16 04:46 PM, Jakub Kicinski wrote: > > On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: > > [..] > > > Ugh, this is going to conflict with our series too :( (and I CCed you > > on ours) > > > > Would it be OK for

Re: [PATCH net-next 8/8] net: sched: cls_u32: add extack support

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 9:20 AM, Alexander Aring wrote: > - if (root_ht == ht) > + if (root_ht == ht) { > + NL_SET_ERR_MSG(extack, "Not allowd to delete root node"); s/allowd/allowed/

[PATCH iproute2-next] tc: red: allow setting th_min and th_max to the same value

2018-01-16 Thread Jakub Kicinski
Setting th_min and th_max to the same value may be useful for DCTCP deployments. The original DCTCP paper describes it as a simplest way of achieving simple ECN threshold marking. Indeed, there doesn't seem to be any simpler qdisc in Linux which would allow such a setup today. Signed-off-by: Jak

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 9:20 AM, Alexander Aring wrote: > @@ -1117,8 +1146,10 @@ int tcf_exts_validate(struct net *net, struct > tcf_proto *tp, struct nlattr **tb, > } > #else > if ((exts->action && tb[exts->action]) || > - (exts->police && tb[exts->police])) > +

Re: [PATCH bpf] bpf: reject stores into ctx via st and xadd

2018-01-16 Thread Alexei Starovoitov
On Tue, Jan 16, 2018 at 11:30:10PM +0100, Daniel Borkmann wrote: > Alexei found that verifier does not reject stores into context > via BPF_ST instead of BPF_STX. And while looking at it, we > also should not allow XADD variant of BPF_STX. > > The context rewriter is only assuming either BPF_LDX_M

Re: [PATCH -next] bpf: cpumap: make some functions static

2018-01-16 Thread Daniel Borkmann
On 01/16/2018 12:27 PM, Wei Yongjun wrote: > Fixes the following sparse warnings: > > kernel/bpf/cpumap.c:146:6: warning: > symbol '__cpu_map_queue_destructor' was not declared. Should it be static? > kernel/bpf/cpumap.c:225:16: warning: > symbol 'cpu_map_build_skb' was not declared. Should it b

Re: [PATCH net-next 7/8] net: sched: cls: add extack support for tc_setup_cb_call

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 9:20 AM, Alexander Aring wrote: > int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts, > -enum tc_setup_type type, void *type_data, bool err_stop) > +enum tc_setup_type type, void *type_data, bool err_stop, > +

[bpf-next PATCH 2/3] libbpf: cleanup Makefile, remove unused elements

2018-01-16 Thread Jesper Dangaard Brouer
The plugin_dir_SQ variable is not used, remove it. The function update_dir is also unused, remove it. The variable $VERSION_FILES is empty, remove it. These all originates from the introduction of the Makefile, and is likely a copy paste from tools/lib/traceevent/Makefile. Fixes: 1b76c13e4b36 ("

[bpf-next PATCH 3/3] libbpf: Makefile set specified permission mode

2018-01-16 Thread Jesper Dangaard Brouer
The third parameter to do_install was not used by $(INSTALL) command. Fix this by only setting the -m option when the third parameter is supplied. The use of a third parameter was introduced in commit eb54e522a000 ("bpf: install libbpf headers on 'make install'"). Without this change, the header

[bpf-next PATCH 1/3] libbpf: install the header file libbpf.h

2018-01-16 Thread Jesper Dangaard Brouer
It seems like an oversight not to install the header file for libbpf, given the libbpf.so + libbpf.a files are installed. Signed-off-by: Jesper Dangaard Brouer --- tools/lib/bpf/Makefile |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/b

[bpf-next PATCH 0/3] libbpf: cleanups to Makefile

2018-01-16 Thread Jesper Dangaard Brouer
This patchset contains some small improvements and cleanup for the Makefile in tools/lib/bpf/. It worries me that the libbpf.so shared library is not versioned, but it not addressed in this patchset. --- Jesper Dangaard Brouer (3): libbpf: install the header file libbpf.h libbpf: cle

Re: [RFC bpf-next PATCH] bpf: add comments to BPF ld/ldx sizes

2018-01-16 Thread Daniel Borkmann
On 01/16/2018 12:31 PM, Jesper Dangaard Brouer wrote: > Doc BPF ld/ldx size defines, as it help me understand the code in filter.c. > > Signed-off-by: Jesper Dangaard Brouer > --- > 0 files changed > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index 395d261948de..4729d9

Re: [PATCH] samples/bpf: Fix trailing semicolon

2018-01-16 Thread Daniel Borkmann
On 01/16/2018 03:15 PM, Luis de Bethencourt wrote: > The trailing semicolon is an empty statement that does no operation. > Removing it since it doesn't do anything. > > Signed-off-by: Luis de Bethencourt Applied to bpf-next, thanks Luis!

[PATCH net-next] net: stmmac: Fix reception of Broadcom switches tags

2018-01-16 Thread Florian Fainelli
Broadcom tags inserted by Broadcom switches put a 4 byte header after the MAC SA and before the EtherType, which may look like some sort of 0 length LLC/SNAP packet (tcpdump and wireshark do think that way). With ACS enabled in stmmac the packets were truncated to 8 bytes on reception, whereas clea

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 05:41 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: On 18-01-16 04:46 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wrote: [..] I would say precedence should be Jiri's patches, Alex's patches and then your

Re: [patch net-next v10 00/13] net: sched: allow qdiscs to share filter block instances

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 10:33 AM, Jiri Pirko wrote: From: Jiri Pirko For patches 1-9: Reviewed-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim cheers, jamal

Re: [patch net-next v10 00/13] net: sched: allow qdiscs to share filter block instances

2018-01-16 Thread David Ahern
On 1/16/18 7:33 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the filters added to qdiscs are independent. So for example if you > have 2 netdevices and you create ingress qdisc on both and you want to add > identical filter rules both, you need to add them twice. This patchset > makes t

[PATCH net-next] ipv6: mcast: remove dead code

2018-01-16 Thread Eric Dumazet
From: Eric Dumazet Since commit 41033f029e39 ("snmp: Remove duplicate OUTMCAST stat increment") one line of code became unneeded. Signed-off-by: Eric Dumazet ---  net/ipv6/mcast.c |2 --  1 file changed, 2 deletions(-) diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 40b223a930a39e01

[PATCH bpf-next 5/6] nfp: bpf: print map lookup problems into verifier log

2018-01-16 Thread Jakub Kicinski
Use the verifier log to output error messages if map lookup can't be offloaded. Signed-off-by: Jakub Kicinski Acked-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ne

[PATCH bpf-next 4/6] libbpf: fix string comparison for guessing eBPF program type

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet libbpf is able to deduce the type of a program from the name of the ELF section in which it is located. However, the comparison is made on the first n characters, n being determined with sizeof() applied to the reference string (e.g. "xdp"). When such section names are suppos

[PATCH bpf-next 6/6] nfp: bpf: reject program on instructions unknown to the JIT compiler

2018-01-16 Thread Jakub Kicinski
From: Quentin Monnet If an eBPF instruction is unknown to the driver JIT compiler, we can reject the program at verification time. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Reviewed-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 5 + drivers/net/et

[PATCH bpf-next 3/6] tools: bpftool: add -DPACKAGE when including bfd.h

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang bfd.h is requiring including of config.h except when PACKAGE or PACKAGE_VERSION are defined. /* PR 14072: Ensure that config.h is included first. */ #if !defined PACKAGE && !defined PACKAGE_VERSION #error config.h must be included before this header #endif This check h

[PATCH bpf-next 2/6] bpf: annotate bpf_insn_print_t with __printf

2018-01-16 Thread Jakub Kicinski
Functions of type bpf_insn_print_t take printf-like format string, mark the type accordingly. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- kernel/bpf/disasm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/disasm.h b/kernel/bpf/disasm.h index

[PATCH bpf-next 1/6] bpf: offload: make bpf_offload_dev_match() reject host+host case

2018-01-16 Thread Jakub Kicinski
Daniel suggests it would be more logical for bpf_offload_dev_match() to return false is either the program or the map are not offloaded, rather than treating the both not offloaded case as a "matching CPU/host device". This makes no functional difference today, since verifier only calls bpf_offloa

[PATCH bpf-next 0/6] bpf: various fixes and improvements

2018-01-16 Thread Jakub Kicinski
Hi! This series combines a number of random improvements ranging from libbpf to nfp driver. NFP patches make better use of the verifier log. There is a requested adjustment to the map offload code, and a warning fix for a W=1 build to the disassembler. Quentin also fixes the libbpf program type

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread David Ahern
On 1/16/18 9:20 AM, Alexander Aring wrote: > This patch adds extack support for generic cls handling. The extack > will be set deeper to each called function which is not part of netdev > core api. > > Cc: David Ahern > Signed-off-by: Alexander Aring > --- > net/sched/cls_api.c | 55 >

Re: [patch net-next v10 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 7:33 AM, Jiri Pirko wrote: > static int __init tc_filter_init(void) > { > + int err; > + > tc_filter_wq = alloc_ordered_workqueue("tc_filter_workqueue", 0); > if (!tc_filter_wq) > return -ENOMEM; > > + err = register_pernet_subs

[PATCH bpf-next 0/3] bpf: add dumping and disassembler for non-host JITs

2018-01-16 Thread Jakub Kicinski
Hi, Currently bpftool could disassemble host jited image, for example x86_64, using libbfd. However it couldn't disassemble offload jited image. There are two reasons: 1. bpf_obj_get_info_by_fd/struct bpf_prog_info couldn't get the address of jited image and image's length. 2. Even aft

[PATCH bpf-next 3/3] tools: bpftool: improve architecture detection by using ifindex

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang The current architecture detection method in bpftool is designed for host case. For offload case, we can't use the architecture of "bpftool" itself. Instead, we could call the existing "ifindex_to_name_ns" to get DEVNAME, then read pci id from /sys/class/dev/DEVNAME/device/vendo

[PATCH bpf-next 1/3] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang For host JIT, there are "jited_len"/"bpf_func" fields in struct bpf_prog used by all host JIT targets to get jited image and it's length. While for offload, targets are likely to have different offload mechanisms that these info are kept in device private data fields. Therefore,

[PATCH bpf-next 2/3] nfp: bpf: set new jit info fields

2018-01-16 Thread Jakub Kicinski
From: Jiong Wang This patch set those new jit info fields introduced in this patch set. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Daniel Borkmann
Hey David, and others, [+Alexei] On 01/17/2018 12:27 AM, Jamal Hadi Salim wrote: > On 18-01-16 05:41 PM, Jakub Kicinski wrote: >> On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: >>> On 18-01-16 04:46 PM, Jakub Kicinski wrote: On Tue, 16 Jan 2018 12:20:19 -0500, Alexander Aring wro

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread Jamal Hadi Salim
On 18-01-16 06:58 PM, David Ahern wrote: On 1/16/18 9:20 AM, Alexander Aring wrote: } if (n->nlmsg_type != RTM_NEWTFILTER || !(n->nlmsg_flags & NLM_F_CREATE)) { + NL_SET_ERR_MSG(extack, "Need both RTM_NEWTFILTER and NLM_F_CREA

Re: [PATCH bpf-next 0/3] bpf: add dumping and disassembler for non-host JITs

2018-01-16 Thread Jakub Kicinski
On Tue, 16 Jan 2018 16:05:18 -0800, Jakub Kicinski wrote: > Hi, Ah, forgot to insert "Jiong says:" here :) > Currently bpftool could disassemble host jited image, for example x86_64, > using libbfd. However it couldn't disassemble offload jited image. > > There are two reasons: > > 1. bpf_obj

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-16 Thread Jeff Moyer
Hi, Christoph, Christoph Hellwig writes: > On Mon, Jan 15, 2018 at 09:53:10AM +0100, Christoph Hellwig wrote: >> > pselect, as an example, crams the sigmask and size together. Why not >> > just do that? libaio can take care of setting that up. >> >> Yes, I could try that. It's just another d

pull-request: bpf-next 2018-01-17

2018-01-16 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add initial BPF map offloading for nfp driver. Currently only programs were supported so far w/o being able to access maps. Offloaded programs are right now only allowed to perform

Re: [PATCH bpf-next 0/6] bpf: various fixes and improvements

2018-01-16 Thread Daniel Borkmann
On 01/17/2018 12:51 AM, Jakub Kicinski wrote: > Hi! > > This series combines a number of random improvements ranging from > libbpf to nfp driver. NFP patches make better use of the verifier > log. There is a requested adjustment to the map offload code, and > a warning fix for a W=1 build to the

Re: [bpf-next PATCH 0/3] libbpf: cleanups to Makefile

2018-01-16 Thread Daniel Borkmann
On 01/17/2018 12:20 AM, Jesper Dangaard Brouer wrote: > This patchset contains some small improvements and cleanup for > the Makefile in tools/lib/bpf/. > > It worries me that the libbpf.so shared library is not versioned, but > it not addressed in this patchset. Looks good; applied it to bpf-nex

linux-next: manual merge of the net-next tree with the net tree

2018-01-16 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got conflicts in: net/sched/sch_ingress.c net/sched/sch_api.c include/net/sch_generic.h between commit: 81d947e2b8dd ("net, sched: fix panic when updating miniq {b,q}stats") from the net tree and commits: 54160ef6ec64 ("net: sche

Re: [PATCH net-next 0/8] net: sched: cls: add extack support

2018-01-16 Thread Daniel Borkmann
On 01/17/2018 01:08 AM, Daniel Borkmann wrote: > Hey David, and others, [+Alexei] > > On 01/17/2018 12:27 AM, Jamal Hadi Salim wrote: >> On 18-01-16 05:41 PM, Jakub Kicinski wrote: >>> On Tue, 16 Jan 2018 17:12:57 -0500, Jamal Hadi Salim wrote: On 18-01-16 04:46 PM, Jakub Kicinski wrote:

[PATCH] net:l2tp: Allow MAC to be configured via netlink

2018-01-16 Thread Isaac Lee
The linux kernel by default uses random MAC address for l2tp interfaces. However, there are situations where it is desirable to have a deterministic MAC address. A sample scenario would be where the host IP stack is attached directly to a tunnel hence the "random" address is now propagated via ARP

[PATCH net-next] tcp: avoid negotitating ECN for BBR

2018-01-16 Thread Yuchung Cheng
This patch keeps BBR from negotiating ECN if sysctl ECN is set. Prior to this patch, BBR negotiates ECN if enabled, sends CWR upon receiving ECE ACKs but does not react to them. This can cause confusion from the protocol perspective. Therefore this patch prevents the connection from negotiating ECN

Re: [bpf-next PATCH 5/7] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-01-16 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 10:11:11AM -0800, John Fastabend wrote: > This implements a BPF ULP layer to allow policy enforcement and > monitoring at the socket layer. In order to support this a new > program type BPF_PROG_TYPE_SK_MSG is used to run the policy at > the sendmsg/sendpage hook. To attach

[PATCHv2 net-next 1/1] forcedeth: remove unused variable

2018-01-16 Thread Zhu Yanjun
The variable miistat is not used. So it is removed. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun --- v1->v2: Keep readl function --- drivers/net/ethernet/nvidia/forcedeth.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethern

[PATCH net-next] devlink: Make some functions static

2018-01-16 Thread Wei Yongjun
Fixes the following sparse warnings: net/core/devlink.c:2297:25: warning: symbol 'devlink_resource_find' was not declared. Should it be static? net/core/devlink.c:2322:6: warning: symbol 'devlink_resource_validate_children' was not declared. Should it be static? Signed-off-by: Wei Yongjun ---

[PATCH net-next] mlxsw: spectrum: Make function mlxsw_sp_kvdl_part_occ() static

2018-01-16 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:289:5: warning: symbol 'mlxsw_sp_kvdl_part_occ' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH net-next 2/8] net: sched: cls_api: handle generic cls errors

2018-01-16 Thread David Ahern
On 1/16/18 4:19 PM, Jamal Hadi Salim wrote: > On 18-01-16 06:58 PM, David Ahern wrote: >> On 1/16/18 9:20 AM, Alexander Aring wrote: > > >>>   } >>>     if (n->nlmsg_type != RTM_NEWTFILTER || >>>   !(n->nlmsg_flags & NLM_F_CREATE)) { >>> +    NL_SET_ERR_MSG(ext

Re: [PATCH bpf-next 1/3] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-16 Thread Alexei Starovoitov
On Tue, Jan 16, 2018 at 04:05:19PM -0800, Jakub Kicinski wrote: > From: Jiong Wang > > For host JIT, there are "jited_len"/"bpf_func" fields in struct bpf_prog > used by all host JIT targets to get jited image and it's length. While for > offload, targets are likely to have different offload mech

Re: [PATCH bpf-next 3/3] tools: bpftool: improve architecture detection by using ifindex

2018-01-16 Thread Alexei Starovoitov
On Tue, Jan 16, 2018 at 04:05:21PM -0800, Jakub Kicinski wrote: > From: Jiong Wang > > The current architecture detection method in bpftool is designed for host > case. > > For offload case, we can't use the architecture of "bpftool" itself. > Instead, we could call the existing "ifindex_to_name

Re: pull-request: bpf-next 2018-01-17

2018-01-16 Thread David Miller
From: Daniel Borkmann Date: Wed, 17 Jan 2018 02:01:28 +0100 > The following pull-request contains BPF updates for your *net-next* tree. ... > Please consider pulling these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git Pulled, thanks Daniel.

[PATCH] Bluetooth: 6lowpan: Fix disconnect bug in 6lowpan

2018-01-16 Thread Guo Yi
This patch fix the bluetooth 6lowpan disconnect fail bug. The type of the same address type have different define value in HCI layer and L2CAP layer.That makes disconnect fail due to wrong network type.User will not be able to disconnect from console with the network type that used in connect. Th

Re: [PATCH bpf-next 3/3] tools: bpftool: improve architecture detection by using ifindex

2018-01-16 Thread Jakub Kicinski
CC: Francois On Tue, 16 Jan 2018 19:42:15 -0800, Alexei Starovoitov wrote: > > + switch (vendor_id) { > > + case 0x19ee: > > + device_id = read_sysfs_netdev_hex_int(devname, "device"); > > + if (device_id != 0x4000 && > > + device_id != 0x6000 && > > +

Re: [PATCH net] net: validate untrusted gso packets

2018-01-16 Thread Jason Wang
On 2018年01月17日 04:29, Willem de Bruijn wrote: From: Willem de Bruijn Validate gso packet type and headers on kernel entry. Reuse the info gathered by skb_probe_transport_header. Syzbot found two bugs by passing bad gso packets in packet sockets. Untrusted user packets are limited to a small s

Re: [PATCH bpf-next v2 09/11] nfp: bpf: use extack support to improve debugging

2018-01-16 Thread David Ahern
On 1/16/18 12:11 PM, Jakub Kicinski wrote: > On Tue, 16 Jan 2018 10:36:01 +0100, Jiri Pirko wrote: >>> @@ -303,7 +305,8 @@ static int nfp_net_bpf_load(struct nfp_net *nn, struct >>> bpf_prog *prog) >>> /* Load up the JITed code */ >>> err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_BPF); >>>

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-16 Thread Al Viro
On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote: > if (sigmask) { > - if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask))) > + if (!access_ok(VERIFY_READ, sigmask, > +sizeof(void *) + sizeof(size_t)) || > + __

Re: [PATCH net] net: validate untrusted gso packets

2018-01-16 Thread Willem de Bruijn
On Tue, Jan 16, 2018 at 11:04 PM, Jason Wang wrote: > > > On 2018年01月17日 04:29, Willem de Bruijn wrote: >> >> From: Willem de Bruijn >> >> Validate gso packet type and headers on kernel entry. Reuse the info >> gathered by skb_probe_transport_header. >> >> Syzbot found two bugs by passing bad gso

Re: [PATCH net] net: validate untrusted gso packets

2018-01-16 Thread Willem de Bruijn
On Tue, Jan 16, 2018 at 11:33 PM, Willem de Bruijn wrote: > On Tue, Jan 16, 2018 at 11:04 PM, Jason Wang wrote: >> >> >> On 2018年01月17日 04:29, Willem de Bruijn wrote: >>> >>> From: Willem de Bruijn >>> >>> Validate gso packet type and headers on kernel entry. Reuse the info >>> gathered by skb_pr

net merged into net-next

2018-01-16 Thread David Miller
Daniel, please double check my merge work especially wrt. your packet scheduler fix. Thanks!

Re: [bpf-next PATCH 5/7] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-01-16 Thread John Fastabend
On 01/16/2018 06:25 PM, Alexei Starovoitov wrote: > On Fri, Jan 12, 2018 at 10:11:11AM -0800, John Fastabend wrote: >> This implements a BPF ULP layer to allow policy enforcement and >> monitoring at the socket layer. In order to support this a new >> program type BPF_PROG_TYPE_SK_MSG is used to ru

[linux-next] kernel Oops when booting powerpc

2018-01-16 Thread Abdul Haleem
Greeting's linux-next kernel booted with kernel Oops on powerpc machine. Machine Type: Power 8 [bare-metal & PowerVM LPAR] kernel version: 4.15.0-rc7-next-20180115 test: Boot config: attached bootlogs: - ses 0:0:3:0: Attached Enclosure device ses 0:0:4:0: Attached Enclosure device Roundi

Re: [bpf-next PATCH 5/7] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-01-16 Thread Alexei Starovoitov
On Tue, Jan 16, 2018 at 09:49:16PM -0800, John Fastabend wrote: > > > but this program will see only first SG ? > > Correct, to read further into the msg we would need to have a helper > or some other way to catch reads/writes past the first 4k and read > the next sg. We have the same limitation

Re: WARNING in can_rcv

2018-01-16 Thread Oliver Hartkopp
On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde wrote: On 01/16/2018 06:58 PM, syzbot wrote: Hello, syzkaller hit the following crash on a8750ddca918032d6349adbf9a4b6555e7db20da git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/

[PATCH v2 net-next] virtio_net: Add ethtool stats

2018-01-16 Thread Toshiaki Makita
The main purpose of this patch is adding a way of checking per-queue stats. It's useful to debug performance problems on multiqueue environment. $ ethtool -S ens10 NIC statistics: rx_queue_0_packets: 2090408 rx_queue_0_bytes: 3164825094 rx_queue_1_packets: 2082531 rx_queue_1_by

[PATCH net 0/2] cxgb4: fix issues in rule processing for tc-flower offload

2018-01-16 Thread Rahul Lakkireddy
Patch 1 sets filter type to indicate IPv6 when processing flow match parameters. Patch 2 fixes endianness issue when processing vlan flow match parameters. Kumar Sanghvi (2): cxgb4: set filter type to 1 for ETH_P_IPV6 cxgb4: fix endianness for vlan value in cxgb4_tc_flower drivers/net/ether

[PATCH net 1/2] cxgb4: set filter type to 1 for ETH_P_IPV6

2018-01-16 Thread Rahul Lakkireddy
From: Kumar Sanghvi For ethtype_key = ETH_P_IPV6, set filter type as 1 in cxgb4_tc_flower code when processing flow match parameters. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 3 +++ 1

[PATCH net 2/2] cxgb4: fix endianness for vlan value in cxgb4_tc_flower

2018-01-16 Thread Rahul Lakkireddy
From: Kumar Sanghvi Don't change endianness when assigning vlan value in cxgb4_tc_flower code when processing flow match parameters. The value gets converted to network order as part of filtering code in set_filter_wr. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by:

Re: [PATCH net-next] net: stmmac: Fix reception of Broadcom switches tags

2018-01-16 Thread Giuseppe CAVALLARO
Hi Florian for gmac4.x and gmac3.x series the ACS bit is the Automatic Pad or CRC Stripping, so the core strips the Pad or FCS on frames if the value of the length field is < 1536 bytes. For MAC10-100 there is the Bit 8 (ASTP) of the reg0 that does the same if len is < 46bytes. In your patch I

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-16 Thread Christoph Hellwig
On Wed, Jan 17, 2018 at 04:27:21AM +, Al Viro wrote: > On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote: > > if (sigmask) { > > - if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask))) > > + if (!access_ok(VERIFY_READ, sigmask, > > +

Re: WARNING in can_rcv

2018-01-16 Thread Eric Biggers
On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: > > > On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: > > On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde > > wrote: > > > On 01/16/2018 06:58 PM, syzbot wrote: > > > > Hello, > > > > > > > > syzkaller hit the following crash on

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-16 Thread Christian Zigotzky
Hi Skateman, Fantastic! Many thanks for testing the RC8 of kernel 4.15 without PAMU support. @All Further information: http://forum.hyperion-entertainment.biz/viewtopic.php?f=58&p=43706#p43706 Cheers, Christian On 16. Jan 2018, at 23:05, mad skateman wrote: Fantastic Christian.. Your lates

[PATCH net-next 0/2] cxgb4: reduce memory footprint for collecting firmware dump

2018-01-16 Thread Rahul Lakkireddy
Firmware dump can be large (upto 2 GB). In low memory conditions, ethtool fails to allocate such large memory. So, use zlib deflate to compress collected firmware dump. Patch 1 updates collection logic to use compression. Patch 2 adds zlib deflate to compress collected firmware dump. Thanks, R

[PATCH net-next 2/2] cxgb4: use zlib deflate to compress firmware dump

2018-01-16 Thread Rahul Lakkireddy
Use zlib deflate to compress firmware dump. Collect and compress as much firmware dump as possible into a 32 MB buffer. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/Makefile| 1 + drivers/net/etherne

[PATCH net-next 1/2] cxgb4: update dump collection logic to use compression

2018-01-16 Thread Rahul Lakkireddy
Update firmware dump collection logic to use compression when available. Let collection logic attempt to do compression, instead of returning out of memory early. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/

Re: net merged into net-next

2018-01-16 Thread Saeed Mahameed
Dave, The resolution of the mlx5_ifc conflict was wrong and it causes a build break in mlx5, oops :(. I hope my resolution instructions in my pull request didn't mislead you. I will post a patch. -Saeed.

[PATCH net-next] cxgb4: IPv6 filter takes 2 tids

2018-01-16 Thread Ganesh Goudar
on T6, IPv6 filter would occupy 2 tids instead of 4. Signed-off-by: Kumar Sanghvi Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 113 +++--- 1 file changed, 80 insertions(+), 33 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/c

RE: [PATCH net-next v2] net: sched: red: don't reset the backlog on every stat dump

2018-01-16 Thread Nogah Frankel
> -Original Message- > From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > Sent: Monday, January 15, 2018 6:01 AM > To: da...@davemloft.net; j...@resnulli.us; Nogah Frankel > > Cc: netdev@vger.kernel.org; oss-driv...@netronome.com; > xiyou.wangc...@gmail.com; eduma...@google.com;

Re: [PATCH 32/32] aio: implement io_pgetevents

2018-01-16 Thread Christoph Hellwig
On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote: > I'd be willing to bet the issue is in your io_syscall6 implementation. > You pass in arg5 where arg6 should be used. Don't feel bad, it took me > the better part of today to figure that out. :) > > Here's an incremental diff on top of

Re: WARNING in can_rcv

2018-01-16 Thread Dmitry Vyukov
On Wed, Jan 17, 2018 at 8:12 AM, Eric Biggers wrote: > On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: >> >> >> On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: >> > On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde >> > wrote: >> > > On 01/16/2018 06:58 PM, syzbot wrote: >> > > >

[PATCH iproute2-next] bpf: support map offload

2018-01-16 Thread Jakub Kicinski
When program is loaded with a specified ifindex, use that ifindex also when creating maps. Signed-off-by: Jakub Kicinski --- lib/bpf.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/bpf.c b/lib/bpf.c index d32f1b808180..2db151e4dd3c 100644 --- a/lib/bpf.c +++ b/li

[PATCH net-next] net/mlx5: Fix build break

2018-01-16 Thread Saeed Mahameed
The latest merge between net and net-next introduced a complier assert in mlx5 driver. In hca_cap_bits older fields are kept along with newer fields that should have replaced them. Fixes: c02b3741eb99 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") Signed-off-by: Saeed Mahameed

<    1   2   3