[PATCH iproute2 2/2] ip/tunnel: No need to free answer after rtnl_talk() on error

2017-12-19 Thread Serhey Popovych
Since rtnl_talk() never returns with answer buffer allocated on error we do not need to release it manually. After this initializing answer with NULL before rtnl_talk() is useless. Signed-off-by: Serhey Popovych --- ip/link_gre.c|3 +-- ip/link_gre6.c |3 +-- ip/link_ip6tnl.c |

[PATCH iproute2 1/2] utils: ll_addr: Handle ARPHRD_IP6GRE in ll_addr_n2a()

2017-12-19 Thread Serhey Popovych
ll_addr_n2a() correctly prints tunnel endpoints for gre, ipip, sit and ip6tnl, but not for ip6gre. Fix this by adding ARPHRD_IP6GRE to IPv6 tunnel endpoing address conversion. Before: --- $ ip link show ... 18: ip6tnl0: mtu 1452 qdisc noop state DOWN mode DEFAULT group default link/tunne

[PATCH iproute2 0/2] ip/tunnel: Do not free() answer on rtnl_talk() error, correct ip6gre

2017-12-19 Thread Serhey Popovych
In this series I present next set of improvements/fixes: 1) If rtnl_talk(), called with answer != NULL fails it never returns with allocated answer: no need to initialize answer and free() it in the caller on error. 2) Correct ip6gre print endpoint address printing with ll_addr

Re: [bpf-next V1-RFC PATCH 10/14] tun: setup xdp_rxq_info

2017-12-19 Thread Jason Wang
On 2017年12月13日 19:20, Jesper Dangaard Brouer wrote: Driver hook points for xdp_rxq_info: * init+reg: tun_attach * unreg : __tun_detach I've done some manual testing of this tun driver, but I would appriciate good review and someone else running their use-case tests, as I'm not 100% sure

Re: [net 05/14] net/mlx5e: Fix features check of IPv6 traffic

2017-12-19 Thread Or Gerlitz
On Wed, Dec 20, 2017 at 12:24 AM, Saeed Mahameed wrote: > From: Gal Pressman > > The assumption that the next header field contains the transport > protocol is wrong for IPv6 packets with extension headers. > Instead, we should look the inner-most next header field in the buffer. > This will fix

Re: [net 04/14] net/mlx5e: Fix ETS BW check

2017-12-19 Thread Or Gerlitz
On Wed, Dec 20, 2017 at 12:24 AM, Saeed Mahameed wrote: > > From: Huy Nguyen > > Fix bug that allows ets bw sum to be 0% when ets tc type exists. > > Fixes: 08fb1dacdd76 ('net/mlx5e: Support DCBNL IEEE ETS') > Signed-off-by: Moshe Shemesh > Reviewed-by: Huy Nguyen Huy, if you are the author,

[PATCH iproute2 2/3] utils: ll_map: Update name and type for existing entry

2017-12-19 Thread Serhey Popovych
In case of we update existing entry we need not only rehash but also update name in existing entry. Need to update device type too since cached interface might be deleted and new with same index, but different type added (e.g. eth0 and ppp0). Reuse new entry initialization path to avoid duplicati

[PATCH iproute2 1/3] vxcan,veth: Forbid "type" for peer device

2017-12-19 Thread Serhey Popovych
It is already given for original device we configure this peer for. Results from following command before/after change applied are shown below: $ ip link add dev veth1a type veth peer name veth1b \ type veth peer name veth1c Before: --- After: -- Error: a

[PATCH iproute2 3/3] utils: ll_map: Make network device name fixed size array of char

2017-12-19 Thread Serhey Popovych
Network device names are fixed in size and never exceed IFNAMSIZ (16 bytes). Make name fixed size array to always malloc() same size chunk of memory and use memcpy()/memcmp() with constant IFNAMSIZ to benefit from possible compiler optimizations replacing call to a function with two/four load/stor

[PATCH iproute2 0/3] Forbid "type" for peer, update ifname and make it array in ll_cache

2017-12-19 Thread Serhey Popovych
In this series I present following improvements and fixes: 1) Forbid "type" parameter when parsing command line for peer in iplink_vxcan.c and link_veth.c using iplink_parse(): we already known it. 2) In ll_remember_index() update ifname, not only rehash it. It might be changed

[PATCH] selftests: net: Adding config fragment CONFIG_NUMA=y

2017-12-19 Thread Naresh Kamboju
kernel config fragement CONFIG_NUMA=y is need for reuseport_bpf_numa. Signed-off-by: Naresh Kamboju --- tools/testing/selftests/net/config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/config b/tools/testing/selftests/net/config index e57b4ac..7177bea 100644 --

Re: [PATCH v1 2/4] lib/net_utils: Introduce mac_pton_from_user()

2017-12-19 Thread Greg Kroah-Hartman
On Tue, Dec 19, 2017 at 09:14:10PM +0200, Andy Shevchenko wrote: > Some drivers are getting MAC from user space. Make a helper for them. > > Signed-off-by: Andy Shevchenko > --- > include/linux/kernel.h | 1 + > lib/net_utils.c| 12 > 2 files changed, 13 insertions(+) Don'

Re: [PATCH v10 1/5] add infrastructure for tagging functions as error injectable

2017-12-19 Thread Masami Hiramatsu
On Tue, 19 Dec 2017 18:14:17 -0800 Alexei Starovoitov wrote: > On 12/18/17 10:29 PM, Masami Hiramatsu wrote: > >> > >> +#if defined(__KERNEL__) && !defined(__ASSEMBLY__) > >> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE > > > > BTW, CONFIG_BPF_KPROBE_OVERRIDE is also confusable name. > > Since this feature

Re: [RFC] hv_netvsc: automatically name slave VF network device

2017-12-19 Thread Jiri Pirko
Wed, Dec 20, 2017 at 12:53:53AM CET, jakub.kicin...@netronome.com wrote: >On Tue, 19 Dec 2017 15:44:05 -0800, Stephen Hemminger wrote: >> On Tue, 19 Dec 2017 15:20:57 -0800 >> Jakub Kicinski wrote: >> >> > On Tue, 19 Dec 2017 14:50:17 -0800, Stephen Hemminger wrote: >> > > On Tue, 19 Dec 2017 1

Re: RCU callback crashes

2017-12-19 Thread Jakub Kicinski
On Tue, 19 Dec 2017 22:22:27 -0800, Jakub Kicinski wrote: > > >I get this: > > > > Could you try to run it with kasan on? > > I didn't manage to reproduce it with KASAN on so far :( Even enabling > object debugging to get the second splat in my email (which is more > useful) actually makes

Re: [Intel-wired-lan] v4.15-rc2 on thinkpad x60: ethernet stopped working

2017-12-19 Thread Neftin, Sasha
On 12/18/2017 17:50, Neftin, Sasha wrote: On 12/18/2017 13:58, Pavel Machek wrote: On Mon 2017-12-18 13:24:40, Neftin, Sasha wrote: On 12/18/2017 12:26, Pavel Machek wrote: Hi! In v4.15-rc2+, network manager can not see my ethernet card, and manual attempts to ifconfig it up did not really h

Re: RCU callback crashes

2017-12-19 Thread Jakub Kicinski
On Wed, 20 Dec 2017 07:11:18 +0100, Jiri Pirko wrote: > Wed, Dec 20, 2017 at 02:59:21AM CET, kubak...@wp.pl wrote: > >Hi! > > > >If I run the netdevsim test long enough on a kernel with no debugging > > Just running tools/testing/selftests/bpf/test_offload.py? Yes, like this: while ./linux/to

Re: [PATCH V2 net-next 02/17] net: hns3: add support to modify tqps number

2017-12-19 Thread lipeng (Y)
On 2017/12/20 3:18, David Miller wrote: From: Lipeng Date: Tue, 19 Dec 2017 12:02:24 +0800 @@ -2651,6 +2651,19 @@ static int hns3_get_ring_config(struct hns3_nic_priv *priv) return ret; } +static void hns3_put_ring_config(struct hns3_nic_priv *priv) +{ + struct hnae3_han

Re: [PATCH V2 net-next 01/17] net: hns3: add support to query tqps number

2017-12-19 Thread lipeng (Y)
On 2017/12/20 3:16, David Miller wrote: From: Lipeng Date: Tue, 19 Dec 2017 12:02:23 +0800 @@ -5002,6 +5002,26 @@ static void hclge_uninit_ae_dev(struct hnae3_ae_dev *ae_dev) ae_dev->priv = NULL; } +static u32 hclge_get_max_channels(struct hnae3_handle *handle) +{ + stru

Re: RCU callback crashes

2017-12-19 Thread Jiri Pirko
Wed, Dec 20, 2017 at 02:59:21AM CET, kubak...@wp.pl wrote: >Hi! > >If I run the netdevsim test long enough on a kernel with no debugging Just running tools/testing/selftests/bpf/test_offload.py? >I get this: Could you try to run it with kasan on? > >[ 1400.450124] BUG: unable to handle kernel

Re: [PATCH net 1/2] cls_bpf: fix offload assumptions after callback conversion

2017-12-19 Thread Jiri Pirko
Tue, Dec 19, 2017 at 10:32:13PM CET, jakub.kicin...@netronome.com wrote: >cls_bpf used to take care of tracking what offload state a filter >is in, i.e. it would track if offload request succeeded or not. >This information would then be used to issue correct requests to >the driver, e.g. requests f

Re: r8169 regression: UDP packets dropped intermittantly

2017-12-19 Thread Jonathan Woithe
On Tue, Dec 19, 2017 at 01:25:23PM +0100, Michal Kubecek wrote: > On Tue, Dec 19, 2017 at 04:15:32PM +1030, Jonathan Woithe wrote: > > This clearly indicates that not every card using the r8169 driver is > > vulnerable to the problem. It also explains why Holger was unable to > > reproduce the res

Re: [PATCH net 0/3] Few mvneta fixes

2017-12-19 Thread Willy Tarreau
Hi Arnd, On Tue, Dec 19, 2017 at 09:18:35PM +0100, Arnd Bergmann wrote: > On Tue, Dec 19, 2017 at 5:59 PM, Gregory CLEMENT > wrote: > > Hello, > > > > here it is a small series of fixes found on the mvneta driver. They > > had been already used in the vendor kernel and are now ported to > > mainl

[PATCH net-next] virtio_net: Add ethtool stats

2017-12-19 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_packets: 4172939 tx_packets: 5855538 rx_bytes: 6317757408 tx_bytes: 8865151846 rx_dropped:

[PATCH net-next v4 4/6] net: sctp: Remove debug SCTP probe module

2017-12-19 Thread Masami Hiramatsu
Remove SCTP probe module since jprobe has been deprecated. That function is now replaced by sctp/sctp_probe and sctp/sctp_probe_path trace-events. You can use it via ftrace or perftools. Signed-off-by: Masami Hiramatsu --- net/sctp/Kconfig | 12 --- net/sctp/Makefile |3 - net/sctp/probe.

[PATCH net-next v4 6/6] net: dccp: Remove dccpprobe module

2017-12-19 Thread Masami Hiramatsu
Remove DCCP probe module since jprobe has been deprecated. That function is now replaced by dccp/dccp_probe trace-event. You can use it via ftrace or perftools. Signed-off-by: Masami Hiramatsu --- net/dccp/Kconfig | 17 net/dccp/Makefile |2 - net/dccp/probe.c | 203 ---

[PATCH net-next v4 5/6] net: dccp: Add DCCP sendmsg trace event

2017-12-19 Thread Masami Hiramatsu
Add DCCP sendmsg trace event (dccp/dccp_probe) for replacing dccpprobe. User can trace this event via ftrace or perftools. Signed-off-by: Masami Hiramatsu --- net/dccp/proto.c |5 +++ net/dccp/trace.h | 105 ++ 2 files changed, 110 inserti

[PATCH net-next v4 3/6] net: sctp: Add SCTP ACK tracking trace event

2017-12-19 Thread Masami Hiramatsu
Add SCTP ACK tracking trace event to trace the changes of SCTP association state in response to incoming packets. It is used for debugging SCTP congestion control algorithms, and will replace sctp_probe module. Note that this event a bit tricky. Since this consists of 2 events (sctp_probe and sctp

[PATCH net-next v4 1/6] net: tcp: Add trace events for TCP congestion window tracing

2017-12-19 Thread Masami Hiramatsu
This adds an event to trace TCP stat variables with slightly intrusive trace-event. This uses ftrace/perf event log buffer to trace those state, no needs to prepare own ring-buffer, nor custom user apps. User can use ftrace to trace this event as below; # cd /sys/kernel/debug/tracing # echo 1

[PATCH net-next v4 2/6] net: tcp: Remove TCP probe module

2017-12-19 Thread Masami Hiramatsu
Remove TCP probe module since jprobe has been deprecated. That function is now replaced by tcp/tcp_probe trace-event. You can use it via ftrace or perftools. Signed-off-by: Masami Hiramatsu --- net/Kconfig | 17 --- net/ipv4/Makefile|1 net/ipv4/tcp_probe.c | 301 ---

[PATCH net-next v4 0/6] net: tcp: sctp: dccp: Replace jprobe usage with trace events

2017-12-19 Thread Masami Hiramatsu
Hi, This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block. Previous version is here; https://lkml.org/lkml/2017/12/19/153 Changes from v3: All: Rebased on net-next

[PATCH bpf-next 4/8] bpf: offload: free prog->aux->offload when device disappears

2017-12-19 Thread Jakub Kicinski
All bpf offload operations should now be under bpf_devs_lock, it's safe to free and clear the entire offload structure, not only the netdev pointer. __bpf_prog_offload_destroy() will no longer be called multiple times. Suggested-by: Alexei Starovoitov Signed-off-by: Jakub Kicinski Reviewed-by:

[PATCH bpf-next 5/8] bpf: offload: free program id when device disappears

2017-12-19 Thread Jakub Kicinski
Bound programs are quite useless after their device disappears. They are simply waiting for reference count to go to zero, don't list them in BPF_PROG_GET_NEXT_ID by freeing their ID early. Note that orphaned offload programs will return -ENODEV on BPF_OBJ_GET_INFO_BY_FD so user will never see ID

[PATCH bpf-next 7/8] tools: bpftool: report device information for offloaded programs

2017-12-19 Thread Jakub Kicinski
Print the just-exposed device information about device to which program is bound. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/common.c | 52 ++ tools/bpf/bpftool/main.h | 2 ++ tools/bpf/bpftool/prog.c | 3 +++

[PATCH bpf-next 8/8] selftests/bpf: test device info reporting for bound progs

2017-12-19 Thread Jakub Kicinski
Check if bound programs report correct device info. Test in local namespace, in remote one, back to the local ns, remove the device and check that information is cleared. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/testing/selftests/bpf/test_offload.py | 107 +++

[PATCH bpf-next 1/8] bpf: offload: don't require rtnl for dev list manipulation

2017-12-19 Thread Jakub Kicinski
We only need to hold rtnl_lock() around ndo calls. The device offload initialization doesn't require it. Neither will soon- -to-come querying the offload info. Use struct rw_semaphore because map offload will require sleeping with the semaphore held for read. Suggested-by: Kirill Tkhai Signed-

[PATCH bpf-next 0/8] bpf: offload: report device back to user space (take 2)

2017-12-19 Thread Jakub Kicinski
Hi! This series is a redo of reporting offload device information to user space after the first attempt did not take into account name spaces. As requested by Kirill offloads are now protected by an r/w sem. This allows us to remove the workqueue and free the offload state fully when device is r

[PATCH bpf-next 2/8] bpf: offload: don't use prog->aux->offload as boolean

2017-12-19 Thread Jakub Kicinski
We currently use aux->offload to indicate that program is bound to a specific device. This forces us to keep the offload structure around even after the device is gone. Add a bool member to struct bpf_prog_aux to indicate if offload was requested. Suggested-by: Alexei Starovoitov Signed-off-by:

[PATCH bpf-next 6/8] bpf: offload: report device information for offloaded programs

2017-12-19 Thread Jakub Kicinski
Report to the user ifindex and namespace information of offloaded programs. If device has disappeared return -ENODEV. Specify the namespace using dev/inode combination. CC: Eric W. Biederman Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- fs/nsfs.c | 2 +-

[PATCH bpf-next 3/8] bpf: offload: allow netdev to disappear while verifier is running

2017-12-19 Thread Jakub Kicinski
To allow verifier instruction callbacks without any extra locking NETDEV_UNREGISTER notification would wait on a waitqueue for verifier to finish. This design decision was made when rtnl lock was providing all the locking. Use the read/write lock instead and remove the workqueue. Verifier will n

[PATCH net-next v3] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Prashant Bhole
- Checking return value with IS_ERROR_OR_NULL - Added error handling where it was not handled Signed-off-by: Prashant Bhole Acked-by: Jakub Kicinski --- v3: nit-pick: directly returning error instead of going to label drivers/net/netdevsim/bpf.c| 8 drivers/net/netdevsim/netdev.c

[PATCH] selftests/bpf: remove the DEBUG macro for test_dev_cgroup

2017-12-19 Thread Chen Rong
The test may fail if not enable DEBUG macro in dev_cgroup.c # ./test_dev_cgroup libbpf: load bpf program failed: Operation not permitted libbpf: failed to load program 'cgroup/dev' libbpf: failed to load object './dev_cgroup.o' Failed to load DEV_CGROUP program Removing the DEBUG macro m

[PATCH v3 net-next 3/5] net: sock: replace sk_state_load with inet_sk_state_load and remove sk_state_store

2017-12-19 Thread Yafang Shao
sk_state_load is only used by AF_INET/AF_INET6, so rename it to inet_sk_state_load and move it into inet_sock.h. sk_state_store is removed as it is not used any more. Signed-off-by: Yafang Shao --- include/net/inet_sock.h | 25 - include/net/sock.h |

[PATCH v3 net-next 1/5] tcp: Export to userspace the TCP state names for the trace events

2017-12-19 Thread Yafang Shao
From: "Steven Rostedt (VMware)" The TCP trace events (specifically tcp_set_state), maps emums to symbol names via __print_symbolic(). But this only works for reading trace events from the tracefs trace files. If perf or trace-cmd were to record these events, the event format file does not convert

[PATCH v3 net-next 0/5] replace tcp_set_state tracepoint with inet_sock_set_state

2017-12-19 Thread Yafang Shao
According to the discussion in the mail thread https://patchwork.kernel.org/patch/10099243/, tcp_set_state tracepoint is renamed to inet_sock_set_state tracepoint and is moved to include/trace/events/sock.h. With this new tracepoint, we can trace AF_INET/AF_INET6 sock state transitions. As there's

[PATCH v3 net-next 4/5] net: tracepoint: using sock_set_state tracepoint to trace DCCP state transition

2017-12-19 Thread Yafang Shao
With changes in inet_ files, DCCP state transitions are traced with inet_sock_set_state tracepoint. Signed-off-by: Yafang Shao --- net/dccp/proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 9d43c1f..7a75a1d 100644 --- a/net/dccp

[PATCH v3 net-next 5/5] net: tracepoint: using sock_set_state tracepoint to trace SCTP state transition

2017-12-19 Thread Yafang Shao
With changes in inet_ files, SCTP state transitions are traced with inet_sock_set_state tracepoint. As SCTP state names, i.e. SCTP_SS_CLOSED, SCTP_SS_ESTABLISHED, have the same value with TCP state names. So the output info still print the TCP state names, that makes the code easy. Signed-off-by:

[PATCH v3 net-next 2/5] net: tracepoint: replace tcp_set_state tracepoint with inet_sock_set_state tracepoint

2017-12-19 Thread Yafang Shao
As sk_state is a common field for struct sock, so the state transition tracepoint should not be a TCP specific feature. Currently it traces all AF_INET state transition, so I rename this tracepoint to inet_sock_set_state tracepoint with some minor changes and move it into trace/events/sock.h. We do

Re: [PATCH v4 04/36] nds32: Kernel booting and initialization

2017-12-19 Thread Greentime Hu
2017-12-20 6:01 GMT+08:00 Randy Dunlap : > On 12/17/2017 10:46 PM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch includes the kernel startup code. It can get dtb pointer >> passed from bootloader. It will create a temp mapping by tlb >> instructions at beginning and goto start_kernel.

Re: [PATCH v4 25/36] nds32: Miscellaneous header files

2017-12-19 Thread Greentime Hu
2017-12-19 17:54 GMT+08:00 Arnd Bergmann : > On Tue, Dec 19, 2017 at 6:34 AM, Greentime Hu wrote: >> Hi, Arnd: >> >> 2017-12-18 19:13 GMT+08:00 Arnd Bergmann : >>> On Mon, Dec 18, 2017 at 7:46 AM, Greentime Hu wrote: From: Greentime Hu This patch introduces some miscellaneous head

Re: [PATCH net-next v2] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Jakub Kicinski
On Wed, 20 Dec 2017 11:27:15 +0900, Prashant Bhole wrote: > diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c > index eb8c679fca9f..c2a02d1944b8 100644 > --- a/drivers/net/netdevsim/netdev.c > +++ b/drivers/net/netdevsim/netdev.c > @@ -147,10 +147,12 @@ struct device_type

Re: [PATCH -tip v3 0/6] net: tcp: sctp: dccp: Replace jprobe usage with trace events

2017-12-19 Thread Masami Hiramatsu
On Tue, 19 Dec 2017 10:01:56 -0800 Alexei Starovoitov wrote: > On Tue, Dec 19, 2017 at 05:56:55PM +0900, Masami Hiramatsu wrote: > > include/trace/events/sctp.h | 98 ++ > > include/trace/events/tcp.h | 80 +++ > > net/Kconfig | 17 -- > > net/dccp/Kcon

[PATCH net-next v2] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Prashant Bhole
- Checking return value with IS_ERROR_OR_NULL - Added error handling where it was not handled Signed-off-by: Prashant Bhole --- drivers/net/netdevsim/bpf.c| 8 drivers/net/netdevsim/netdev.c | 12 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/

[PATCH v3,net-next 2/2] ip6_gre: fix error path when ip6erspan_rcv failed

2017-12-19 Thread Haishuang Yan
Same as ipv4 code, when ip6erspan_rcv call return PACKET_REJECT, we should call icmpv6_send to send icmp unreachable message in error path. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Acked-by: William Tu Cc: William Tu Signed-off-by: Haishuang Yan --- Change since v2:

[PATCH v3,net-next 0/2] net: erspan: fix erspan_rcv/ip6erspan_rcv error path

2017-12-19 Thread Haishuang Yan
This patch series fix potential issue in error path. Haishuang Yan (2): ip_gre: fix error path when erspan_rcv failed ip6_gre: fix error path when ip6erspan_rcv failed net/ipv4/ip_gre.c | 2 ++ net/ipv6/ip6_gre.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) -- 1.8.3.1

[PATCH v3,net-next 1/2] ip_gre: fix error path when erspan_rcv failed

2017-12-19 Thread Haishuang Yan
When erspan_rcv call return PACKET_REJECT, we shoudn't call ipgre_rcv to process packets again, instead send icmp unreachable message in error path. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Acked-by: William Tu Cc: William Tu Signed-off-by: Haishuang Yan --- Chan

Re: [PATCH v10 1/5] add infrastructure for tagging functions as error injectable

2017-12-19 Thread Alexei Starovoitov
On 12/18/17 10:29 PM, Masami Hiramatsu wrote: +#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#ifdef CONFIG_BPF_KPROBE_OVERRIDE BTW, CONFIG_BPF_KPROBE_OVERRIDE is also confusable name. Since this feature override a function to just return with some return value (as far as I understand, or

[PATCH v3,net-next 0/2] net: erspan: fix potential memory leak

2017-12-19 Thread Haishuang Yan
This patch series fix potential memory leak issue. Haishuang Yan (2): ip_gre: fix potential memory leak in erspan_rcv ip6_gre: fix potential memory leak in ip6erspan_rcv net/ipv4/ip_gre.c | 4 +++- net/ipv6/ip6_gre.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) -- 1.8.3.1

[PATCH v3,net-next 2/2] ip6_gre: fix potential memory leak in ip6erspan_rcv

2017-12-19 Thread Haishuang Yan
If md is NULL, tun_dst must be freed, otherwise it will cause memory leak. Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode") Cc: William Tu Signed-off-by: Haishuang Yan --- Changes since v3: * Rebase on latest master branch. * Fix wrong commit information. --- net/ipv6/ip6_gr

[PATCH v3,net-next 1/2] ip_gre: fix potential memory leak in erspan_rcv

2017-12-19 Thread Haishuang Yan
If md is NULL, tun_dst must be freed, otherwise it will cause memory leak. Fixes: 1a66a836da6 ("gre: add collect_md mode to ERSPAN tunnel") Cc: William Tu Signed-off-by: Haishuang Yan --- Changes since v3: * Rebase on latest master branch. * Fix wrong commit information. --- net/ipv4/ip_gr

[PATCH v4 iproute2 net-next] erspan: add erspan version II support

2017-12-19 Thread William Tu
The patch adds support for configuring the erspan v2, for both ipv4 and ipv6 erspan implementation. Three additional fields are added: 'erspan_ver' for distinguishing v1 or v2, 'erspan_dir' for specifying direction of the mirrored traffic, and 'erspan_hwid' for users to set ERSPAN engine ID within

RCU callback crashes

2017-12-19 Thread Jakub Kicinski
Hi! If I run the netdevsim test long enough on a kernel with no debugging I get this: [ 1400.450124] BUG: unable to handle kernel paging request at 00046474e552 [ 1400.458005] IP: 0x46474e552 [ 1400.461231] PGD 0 P4D 0 [ 1400.464150] Oops: 0010 [#1] PREEMPT SMP [ 1400.468525] Modules linked

[PATCH v3,net-next] ip6_gre: fix a pontential issue in ip6erspan_rcv

2017-12-19 Thread Haishuang Yan
pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at the right place. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Cc: William Tu Acked-by: William Tu Signed-off-by: Haishuang Yan --- Change since v3: * Rebase on latest master branch. * Fix wrong co

Re: [PATCH v3 iproute2 net-next] erspan: add erspan version II support

2017-12-19 Thread William Tu
On Tue, Dec 19, 2017 at 5:28 PM, David Ahern wrote: > Hi William: > > On 12/19/17 6:08 PM, William Tu wrote: >> @@ -343,6 +355,26 @@ get_failed: >> invarg("invalid erspan index\n", *argv); >> if (erspan_idx & ~((1<<20) - 1) || erspan_idx == 0) >>

Re: [v2 PATCH -tip 1/6] net: tcp: Add trace events for TCP congestion window tracing

2017-12-19 Thread kbuild test robot
Hi Masami, I love your patch! Yet something to improve: [auto build test ERROR on net/master] [also build test ERROR on v4.15-rc4 next-20171219] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

RE: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Prashant Bhole
> From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > On Wed, 20 Dec 2017 09:54:59 +0900, Prashant Bhole wrote: > > > Ah, I would just error out in case we can't create any of the > > > sub-directories as well. > > > > Does that mean fatal error if we can't create any of the subdirector

Re: [PATCH bpf 11/11] bpf: add selftest for tcpbpf

2017-12-19 Thread Alexei Starovoitov
On 12/18/17 10:22 PM, Lawrence Brakmo wrote: - sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o test_tracepoint.o + sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o test_tracepoint.o \ + test_tcpbpf_kern.o it won't apply. please base patches on bpf-next tree +#!/usr/local/

Re: [PATCH v2,net-next 1/2] ip_gre: fix potential memory leak in erspan_rcv

2017-12-19 Thread Haishuang Yan
> On 2017年12月19日, at 下午11:36, David Miller wrote: > > From: Haishuang Yan > Date: Sat, 16 Dec 2017 10:48:38 +0800 > >> If md is NULL, tun_dst must be freed, otherwise it will cause memory >> leak. >> >> Fixes: 1a66a836da6 ("gre: add collect_md mode to ERSPAN tunnel") >> Cc: William Tu >> Si

Re: [PATCH v2,net-next] ip6_gre: fix a pontential issue in ip6erspan_rcv

2017-12-19 Thread Haishuang Yan
> On 2017年12月19日, at 下午11:34, David Miller wrote: > > From: Haishuang Yan > Date: Sat, 16 Dec 2017 10:25:25 +0800 > >> pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at >> the right place. >> >> Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") >> Acked

Re: [PATCH v3 iproute2 net-next] erspan: add erspan version II support

2017-12-19 Thread David Ahern
Hi William: On 12/19/17 6:08 PM, William Tu wrote: > @@ -343,6 +355,26 @@ get_failed: > invarg("invalid erspan index\n", *argv); > if (erspan_idx & ~((1<<20) - 1) || erspan_idx == 0) > invarg("erspan index must be >

Re: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Jakub Kicinski
On Wed, 20 Dec 2017 09:54:59 +0900, Prashant Bhole wrote: > > Ah, I would just error out in case we can't create any of the > > sub-directories as well. > > Does that mean fatal error if we can't create any of the subdirectories? Yes.

Re: [PATCH bpf 03/11] bpf: Add write access to tcp_sock and sock fields

2017-12-19 Thread Alexei Starovoitov
On 12/18/17 10:21 PM, Lawrence Brakmo wrote: +#define SOCK_OPS_SET_FIELD(FIELD_NAME, OBJ) \ + do { \ + int reg = BPF_REG_9; \ +

[PATCH v3 iproute2 net-next] erspan: add erspan version II support

2017-12-19 Thread William Tu
The patch adds support for configuring the erspan v2, for both ipv4 and ipv6 erspan implementation. Three additional fields are added: 'erspan_ver' for distinguishing v1 or v2, 'erspan_dir' for specifying direction of the mirrored traffic, and 'erspan_hwid' for users to set ERSPAN engine ID within

Re: [PATCH -tip v3 3/6] net: sctp: Add SCTP ACK tracking trace event

2017-12-19 Thread Masami Hiramatsu
On Tue, 19 Dec 2017 10:20:24 -0500 Steven Rostedt wrote: > On Tue, 19 Dec 2017 17:58:25 +0900 > Masami Hiramatsu wrote: > > > +TRACE_EVENT(sctp_probe, > > + > > + TP_PROTO(const struct sctp_endpoint *ep, > > +const struct sctp_association *asoc, > > +struct sctp_chunk

RE: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Prashant Bhole
> From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > On Wed, 20 Dec 2017 09:38:52 +0900, Prashant Bhole wrote: > > > > 2) In case sim0 or bpf_bound_progs are fail to create, we need to > > > > add checks before creating any file in them. > > > > > > What do you mean by "check before"

Re: [PATCH bpf 03/11] bpf: Add write access to tcp_sock and sock fields

2017-12-19 Thread Daniel Borkmann
On 12/19/2017 07:21 AM, Lawrence Brakmo wrote: > This patch adds a macro, SOCK_OPS_SET_FIELD, for writing to > struct tcp_sock or struct sock fields. This required adding a new > field "temp" to struct bpf_sock_ops_kern for temporary storage that > is used by sock_ops_convert_ctx_access. It is used

Re: [v2 PATCH -tip 3/6] net: sctp: Add SCTP ACK tracking trace event

2017-12-19 Thread kbuild test robot
Hi Masami, I love your patch! Perhaps something to improve: [auto build test WARNING on net/master] [also build test WARNING on v4.15-rc4 next-20171219] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH net] enic: add wq clean up budget

2017-12-19 Thread Govindarajulu Varadarajan
On Fri, 8 Dec 2017, Govindarajulu Varadarajan wrote: On Wed, 6 Dec 2017, David Miller wrote: From: Govindarajulu Varadarajan Date: Tue, 5 Dec 2017 11:14:41 -0800 In case of tx clean up, we set '-1' as budget. This means clean up until wq is empty or till (1 << 32) pkts are cleaned. Under h

Re: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Jakub Kicinski
On Wed, 20 Dec 2017 09:38:52 +0900, Prashant Bhole wrote: > > > 2) In case sim0 or bpf_bound_progs are fail to create, we need to add > > > checks before creating any file in them. > > > > What do you mean by "check before"? Checking if creation of each file > > fails or not, or something di

RE: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Prashant Bhole
> From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > On Wed, 20 Dec 2017 09:16:01 +0900, Prashant Bhole wrote: > > > From: David Miller [mailto:da...@davemloft.net] > > > > > > From: "Prashant Bhole" > > > Date: Tue, 19 Dec 2017 13:45:47 +0900 > > > > > > > I tried to evaluate whether

Re: [PATCH bpf-next] libbpf: Fix build errors.

2017-12-19 Thread Daniel Borkmann
On 12/19/2017 09:53 PM, David Miller wrote: > > These elf object pieces are of type Elf64_Xword and therefore could be > "long long" on some builds. > > Cast to "long long" and use printf format %lld to deal with this since > we are building with -Werror=format. > > Signed-off-by: David S. Mille

Re: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Jakub Kicinski
On Wed, 20 Dec 2017 09:16:01 +0900, Prashant Bhole wrote: > > From: David Miller [mailto:da...@davemloft.net] > > > > From: "Prashant Bhole" > > Date: Tue, 19 Dec 2017 13:45:47 +0900 > > > > > I tried to evaluate whether fixing return value of > > > debugfs_create_dir() (and > > > friends) wil

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Samudrala, Sridhar
On 12/19/2017 2:53 PM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 14:37:50 -0800 "Samudrala, Sridhar" wrote: On 12/19/2017 11:46 AM, Stephen Hemminger wrote: On Tue, 19 Dec 2017 11:42:33 -0800 "Samudrala, Sridhar" wrote: On 12/19/2017 10:41 AM, Stephen Hemminger wrote: On Tue, 19 Dec

RE: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir

2017-12-19 Thread Prashant Bhole
> From: David Miller [mailto:da...@davemloft.net] > > From: "Prashant Bhole" > Date: Tue, 19 Dec 2017 13:45:47 +0900 > > > I tried to evaluate whether fixing return value of > > debugfs_create_dir() (and > > friends) will be useful or not because it has not been changed since > > very long time.

Re: Linux ECN Handling

2017-12-19 Thread Neal Cardwell
On Tue, Dec 19, 2017 at 5:00 PM, Steve Ibanez wrote: > Hi Neal, > > I managed to track down the code path that the unACKed CWR packet is > taking. The tcp_rcv_established() function calls tcp_ack_snd_check() > at the end of step5 and then the return statement indicated below is > invoked, which pr

[PATCH v3 next-queue 06/10] ixgbe: restore offloaded SAs after a reset

2017-12-19 Thread Shannon Nelson
On a chip reset most of the table contents are lost, so must be restored. This scans the driver's ipsec tables and restores both the filled and empty table slots to their pre-reset values. v2: during restore, clean the tables before restarting Signed-off-by: Shannon Nelson --- drivers/net/ethe

[PATCH v3 next-queue 02/10] ixgbe: add ipsec register access routines

2017-12-19 Thread Shannon Nelson
Add a few routines to make access to the ipsec registers just a little easier, and throw in the beginnings of an initialization. v3: fixed a couple checkpatch warnings v2: Rx table selector becomes an enum with a shift Combine the clear table loops into one Name the table index shift valu

[PATCH v3 next-queue 10/10] ixgbe: register ipsec offload with the xfrm subsystem

2017-12-19 Thread Shannon Nelson
With all the support code in place we can now link in the ipsec offload operations and set the ESP feature flag for the XFRM subsystem to see. v3: added ifdef CONFIG_XFRM_OFFLOAD in ixgbe_features_check v2: added the xdo_dev_state_free callback to make XFRM happy changed use of NETIF_F_HW_CSU

[PATCH v3 next-queue 03/10] ixgbe: add ipsec engine start and stop routines

2017-12-19 Thread Shannon Nelson
Add in the code for running and stopping the hardware ipsec encryption/decryption engine. It is good to keep the engine off when not in use in order to save on the power draw. v2: add limiter to do-while loop waiting for paths to drain Signed-off-by: Shannon Nelson --- drivers/net/ethernet/int

[PATCH v3 next-queue 01/10] ixgbe: clean up ipsec defines

2017-12-19 Thread Shannon Nelson
Clean up the ipsec/macsec descriptor bit definitions to match the rest of the defines and file organization. Also recognise the bit-definition overlap in the error mask macro. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 20 +++- 1 file chang

Re: [PATCH v2] hv_netvsc: automatically name slave VF network device

2017-12-19 Thread Jakub Kicinski
On Tue, 19 Dec 2017 15:59:30 -0800, Stephen Hemminger wrote: > Rename the VF device to ethX_vf based on the ethX as the > synthetic device. This eliminates the need for delay on setup, > and the PCI (udev based) naming is not reproducible on Hyper-V > anyway. The name of the VF does not matter sin

[PATCH v3 next-queue 00/10] ixgbe: Add ipsec offload

2017-12-19 Thread Shannon Nelson
This is an implementation of the ipsec hardware offload feature for the ixgbe driver and Intel's 10Gbe series NICs: x540, x550, 82599. These patches apply to net-next v4.14 as well as Jeff Kirsher's next-queue v4.15-rc1-206-ge47375b. The ixgbe NICs support ipsec offload for 1024 Rx and 1024 Tx Sec

[PATCH v3 next-queue 09/10] ixgbe: ipsec offload stats

2017-12-19 Thread Shannon Nelson
Add a simple statistic to count the ipsec offloads. v2: change per ring counter to adapter rx and tx counters move tx_ipsec count to the tx clean code Signed-off-by: Shannon Nelson --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

[PATCH v3 next-queue 04/10] ixgbe: add ipsec data structures

2017-12-19 Thread Shannon Nelson
Set up the data structures to be used by the ipsec offload. v2: ipaddr[] becomes __be32 increase the hash table size Signed-off-by: Shannon Nelson --- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.h | 40 ++ 2

[PATCH v3 next-queue 07/10] ixgbe: process the Rx ipsec offload

2017-12-19 Thread Shannon Nelson
If the chip sees and decrypts an ipsec offload, set up the skb sp pointer with the ralated SA info. Since the chip is rude enough to keep to itself the table index it used for the decryption, we have to do our own table lookup, using the hash for speed. Signed-off-by: Shannon Nelson --- drivers

[PATCH v3 next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-19 Thread Shannon Nelson
If the skb has a security association referenced in the skb, then set up the Tx descriptor with the ipsec offload bits. While we're here, we fix an oddly named field in the context descriptor struct. v3: added ifdef CONFIG_XFRM_OFFLOAD check around call to ixgbe_ipsec_tx() v2: use ihl != 5 m

[PATCH v3 next-queue 05/10] ixgbe: add ipsec offload add and remove SA

2017-12-19 Thread Shannon Nelson
Add the functions for setting up and removing offloaded SAs (Security Associations) with the x540 hardware. We set up the callback structure but we don't yet set the hardware feature bit to be sure the XFRM service won't actually try to use us for an offload yet. The software tables are made up t

[PATCH v2] hv_netvsc: automatically name slave VF network device

2017-12-19 Thread Stephen Hemminger
Rename the VF device to ethX_vf based on the ethX as the synthetic device. This eliminates the need for delay on setup, and the PCI (udev based) naming is not reproducible on Hyper-V anyway. The name of the VF does not matter since all control operations take place the primary device. It does make

Re: [RFC] hv_netvsc: automatically name slave VF network device

2017-12-19 Thread Jakub Kicinski
On Tue, 19 Dec 2017 15:44:05 -0800, Stephen Hemminger wrote: > On Tue, 19 Dec 2017 15:20:57 -0800 > Jakub Kicinski wrote: > > > On Tue, 19 Dec 2017 14:50:17 -0800, Stephen Hemminger wrote: > > > On Tue, 19 Dec 2017 14:44:37 -0800 > > > "Samudrala, Sridhar" wrote: > > > > > > > -static vo

Re: [PATCH net-next] qed*: Utilize FW 8.33.1.0

2017-12-19 Thread Jakub Kicinski
On Tue, 19 Dec 2017 16:05:23 +0200, Tomer Tayar wrote: > Sorry for the very long patch. > The firmware changes are spread all over w/o a good modularity. Rings false. Significant portion of this patch is just whitespace and comment changes.

  1   2   3   4   >