[PATCH bpf-next v9 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog

2018-04-28 Thread Yonghong Song
The test attached a raw_tracepoint program to raw_syscalls/sys_enter. It tested to get stack for user space, kernel space and user space with build_id request. It also tested to get user and kernel stack into the same buffer with back-to-back bpf_get_stack helper calls. If jit is not enabled, the

[PATCH bpf-next v9 02/10] bpf: add bpf_get_stack helper

2018-04-28 Thread Yonghong Song
Currently, stackmap and bpf_get_stackid helper are provided for bpf program to get the stack trace. This approach has a limitation though. If two stack traces have the same hash, only one will get stored in the stackmap table, so some stack traces are missing from user perspective. This patch

[PATCH bpf-next v9 10/10] tools/bpf: add a test for bpf_get_stack with tracepoint prog

2018-04-28 Thread Yonghong Song
The test_stacktrace_map and test_stacktrace_build_id are enhanced to call bpf_get_stack in the helper to get the stack trace as well. The stack traces from bpf_get_stack and bpf_get_stackid are compared to ensure that for the same stack as represented as the same hash, their ip addresses or build

[PATCH bpf-next v9 04/10] bpf: remove never-hit branches in verifier adjust_scalar_min_max_vals

2018-04-28 Thread Yonghong Song
In verifier function adjust_scalar_min_max_vals, when src_known is false and the opcode is BPF_LSH/BPF_RSH, early return will happen in the function. So remove the branch in handling BPF_LSH/BPF_RSH when src_known is false. Acked-by: Alexei Starovoitov Signed-off-by: Yonghong

[PATCH bpf-next v9 08/10] tools/bpf: add a verifier test case for bpf_get_stack helper and ARSH

2018-04-28 Thread Yonghong Song
The test_verifier already has a few ARSH test cases. This patch adds a new test case which takes advantage of newly improved verifier behavior for bpf_get_stack and ARSH. Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/test_verifier.c | 45 +

[PATCH bpf-next v9 01/10] bpf: change prototype for stack_map_get_build_id_offset

2018-04-28 Thread Yonghong Song
This patch didn't incur functionality change. The function prototype got changed so that the same function can be reused later. Signed-off-by: Yonghong Song --- kernel/bpf/stackmap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH bpf-next v9 06/10] tools/bpf: add bpf_get_stack helper to tools headers

2018-04-28 Thread Yonghong Song
The tools header file bpf.h is synced with kernel uapi bpf.h. The new helper is also added to bpf_helpers.h. Signed-off-by: Yonghong Song --- tools/include/uapi/linux/bpf.h| 42 +-- tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 2 files

[PATCH bpf-next v9 03/10] bpf/verifier: refine retval R0 state for bpf_get_stack helper

2018-04-28 Thread Yonghong Song
The special property of return values for helpers bpf_get_stack and bpf_probe_read_str are captured in verifier. Both helpers return a negative error code or a length, which is equal to or smaller than the buffer size argument. This additional information in the verifier can avoid the condition

[PATCH bpf-next v9 05/10] bpf/verifier: improve register value range tracking with ARSH

2018-04-28 Thread Yonghong Song
When helpers like bpf_get_stack returns an int value and later on used for arithmetic computation, the LSH and ARSH operations are often required to get proper sign extension into 64-bit. For example, without this patch: 54: R0=inv(id=0,umax_value=800) 54: (bf) r8 = r0 55:

[PATCH bpf-next v9 00/10] bpf: add bpf_get_stack helper

2018-04-28 Thread Yonghong Song
Currently, stackmap and bpf_get_stackid helper are provided for bpf program to get the stack trace. This approach has a limitation though. If two stack traces have the same hash, only one will get stored in the stackmap table regardless of whether BPF_F_REUSE_STACKID is specified or not, so some

[PATCH bpf-next v9 07/10] samples/bpf: move common-purpose trace functions to selftests

2018-04-28 Thread Yonghong Song
There is no functionality change in this patch. The common-purpose trace functions, including perf_event polling and ksym lookup, are moved from trace_output_user.c and bpf_load.c to selftests/bpf/trace_helpers.c so that these function can be reused later in selftests. Acked-by: Alexei

Re: [PATCH bpf-next] bpf: remove tracepoints from bpf core

2018-04-28 Thread David Miller
From: Alexei Starovoitov Date: Sat, 28 Apr 2018 19:56:37 -0700 > tracepoints to bpf core were added as a way to provide introspection > to bpf programs and maps, but after some time it became clear that > this approach is inadequate, so prog_id, map_id and corresponding >

Re: [PATCH net-next 0/2 v4] netns: uevent filtering

2018-04-28 Thread Eric W. Biederman
Christian Brauner writes: > Hey everyone, > > This is the new approach to uevent filtering as discussed (see the > threads in [1], [2], and [3]). It only contains *non-functional > changes*. > > This series deals with with fixing up uevent filtering logic: > -

Re: [PATCH net-next 2/2 v4] netns: restrict uevents

2018-04-28 Thread Eric W. Biederman
> + /* fix credentials */ > + if (owning_user_ns != _user_ns) { > + struct netlink_skb_parms *parms = _CB(skb); > + kuid_t root_uid; > + kgid_t root_gid; > + > + /* fix uid */ > + root_uid = make_kuid(owning_user_ns, 0); > +

Re: [bpf-next PATCH v2 3/3] bpf: selftest additions for SOCKHASH

2018-04-28 Thread John Fastabend
On 04/27/2018 05:10 PM, Alexei Starovoitov wrote: > On Fri, Apr 27, 2018 at 04:24:43PM -0700, John Fastabend wrote: >> This runs existing SOCKMAP tests with SOCKHASH map type. To do this >> we push programs into include file and build two BPF programs. One >> for SOCKHASH and one for SOCKMAP. >>

[PATCH bpf-next v3 3/4] bpf: selftest additions for SOCKHASH

2018-04-28 Thread John Fastabend
This runs existing SOCKMAP tests with SOCKHASH map type. To do this we push programs into include file and build two BPF programs. One for SOCKHASH and one for SOCKMAP. We then run the entire test suite with each type. Signed-off-by: John Fastabend ---

[PATCH bpf-next v3 4/4] bpf: bpftool, support for sockhash

2018-04-28 Thread John Fastabend
This adds the SOCKHASH map type to bpftools so that we get correct pretty printing. Signed-off-by: John Fastabend --- tools/bpf/bpftool/map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index a6cdb64..4420b1a

[PATCH bpf-next v3 2/4] bpf: sockmap, add hash map support

2018-04-28 Thread John Fastabend
Sockmap is currently backed by an array and enforces keys to be four bytes. This works well for many use cases and was originally modeled after devmap which also uses four bytes keys. However, this has become limiting in larger use cases where a hash would be more appropriate. For example users

[PATCH bpf-next v3 0/4] Hash support for sock

2018-04-28 Thread John Fastabend
In the original sockmap implementation we got away with using an array similar to devmap. However, unlike devmap where an ifindex has a nice 1:1 function into the map we have found some use cases with sockets that need to be referenced using longer keys. This series adds support for a sockhash

[PATCH bpf-next v3 1/4] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-04-28 Thread John Fastabend
This patch only refactors the existing sockmap code. This will allow much of the psock initialization code path and bpf helper codes to work for both sockmap bpf map types that are backed by an array, the currently supported type, and the new hash backed bpf map type sockhash. Most the fallout

Re: [llc_ui_release] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004

2018-04-28 Thread Linus Torvalds
On Sat, Apr 28, 2018 at 7:12 PM Fengguang Wu wrote: > FYI this happens in mainline kernel 4.17.0-rc2. > It looks like a new regression. > It occurs in 5 out of 5 boots. > [main] 375 sockets created based on info from socket cachefile. > [main] Generating file

[PATCH bpf-next] bpf: remove tracepoints from bpf core

2018-04-28 Thread Alexei Starovoitov
tracepoints to bpf core were added as a way to provide introspection to bpf programs and maps, but after some time it became clear that this approach is inadequate, so prog_id, map_id and corresponding get_next_id, get_fd_by_id, get_info_by_fd, prog_query APIs were introduced and fully adopted by

Re: ip6-in-ip{4,6} ipsec tunnel issues with 1280 MTU

2018-04-28 Thread David Ahern
On 4/27/18 9:44 AM, Ashwanth Goli wrote: > On 2018-04-27 20:18, David Ahern wrote: >> On 4/27/18 5:02 AM, Ashwanth Goli wrote: >>> On 2018-04-26 17:21, Paolo Abeni wrote: Hi, [fixed CC list] On Wed, 2018-04-25 at 21:43 +0530, Ashwanth Goli wrote: > Hi Pablo,

[PATCH bpf-next 1/2] bpf: Fix helpers ctx struct types in uapi doc

2018-04-28 Thread Andrey Ignatov
Helpers may operate on two types of ctx structures: user visible ones (e.g. `struct bpf_sock_ops`) when used in user programs, and kernel ones (e.g. `struct bpf_sock_ops_kern`) in kernel implementation. UAPI documentation must refer to only user visible structures. The patch replaces references

[PATCH bpf-next 0/2] Fix BPF helpers documentation

2018-04-28 Thread Andrey Ignatov
BPF helpers documentation in UAPI refers to kernel ctx structures when it has to refer to user visible ones. Fix it. Andrey Ignatov (2): bpf: Fix helpers ctx struct types in uapi doc bpf: Sync bpf.h to tools/ include/uapi/linux/bpf.h | 12 ++-- tools/include/uapi/linux/bpf.h |

[PATCH bpf-next 2/2] bpf: Sync bpf.h to tools/

2018-04-28 Thread Andrey Ignatov
The patch syncs bpf.h to tools/. Signed-off-by: Andrey Ignatov --- tools/include/uapi/linux/bpf.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index da77a93..730f448 100644 ---

[PATCH] wireless: ipw2100: fix spelling mistake: "decsribed" -> "described"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in comment and in the ord_data text Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +- drivers/net/wireless/intel/ipw2x00/ipw2100.h | 2 +- 2 files

[PATCH] can: cc770: fix spelling mistake: "comptibility" -> "compatibility"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in module parameter description text Signed-off-by: Colin Ian King --- drivers/net/can/cc770/cc770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net-next] net: phy: Fix modular PHYLIB build

2018-04-28 Thread David Miller
From: Florian Fainelli Date: Fri, 27 Apr 2018 12:41:49 -0700 > After commit c59530d0d5dc ("net: Move PHY statistics code into PHY > library helpers") we made net/core/ethtool.c reference symbols which are > part of the library which can be modular. David introduced a

Re: [PATCH net-next v2 4/7] net: mscc: Add initial Ocelot switch support

2018-04-28 Thread kbuild test robot
Hi Alexandre, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Alexandre-Belloni/Microsemi-Ocelot-Ethernet-switch-support/20180429-024136 config: x86_64-allmodconfig (attached as .config) compiler: gcc-7

Re: [PATCH net-next] net: phy: Fix modular PHYLIB build

2018-04-28 Thread Marcelo Ricardo Leitner
On Fri, Apr 27, 2018 at 12:41:49PM -0700, Florian Fainelli wrote: > After commit c59530d0d5dc ("net: Move PHY statistics code into PHY > library helpers") we made net/core/ethtool.c reference symbols which are > part of the library which can be modular. David introduced a temporary > fix with

[PATCH net-next 6/8] r8169: simplify rtl_hw_start_8169

2018-04-28 Thread Heiner Kallweit
Currently done: - if mac_version in (01, 02, 03, 04) RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb); - if mac_version in (01, 02, 03, 04) rtl_set_rx_tx_config_registers(tp); - if mac_version not in (01, 02, 03, 04) RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb);

[PATCH net-next 4/8] r8169: improve CPlusCmd handling

2018-04-28 Thread Heiner Kallweit
tp->cp_cmd is supposed to reflect the current value of the CplusCmd register. Several (quite old) changes however directly change this register w/o updating tp->cp_cmd. Also we have places in the code reading this register where we could use the cached value. In addition: - Properly initialize

[PATCH net-next 8/8] r8169: move common initializations to tp->hw_start

2018-04-28 Thread Heiner Kallweit
The chip-specific init code includes quite some calls which are identical for all chips. So move these calls to tp->hw_start(). In addition move rtl_set_rx_max_size() a little to make sure it's defined before it's used. Unfortunately the diff generated by git is a little bit hard to read.

[PATCH net-next 5/8] r8169: improve handling of CPCMD quirk mask

2018-04-28 Thread Heiner Kallweit
Both quirk masks are the same, so we can merge them. The quirk mask includes most bits so it's actually easier to define a mask with the bits to keep. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 35 ++-- 1 file changed,

[PATCH net-next 3/8] r8169: replace magic number for INTT mask with a constant

2018-04-28 Thread Heiner Kallweit
Use a proper constant for INTT bit mask. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH net-next 7/8] r8169: remove calls to rtl_set_rx_mode

2018-04-28 Thread Heiner Kallweit
__dev_open() calls the ndo_set_rx_mode callback anyway, so we don't have to do it here too. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next 2/8] r8169: improve rtl8169_set_features

2018-04-28 Thread Heiner Kallweit
__rtl8169_set_features is used in rtl8169_set_features only, so we can inline it. In addition: - Remove check (features ^ dev->features), __netdev_update_features check's already that requested features differ from current ones. - Don't mask out unsupported flags, there's no benefit in it.

[PATCH net-next 1/8] r8169: remove unneeded call to __rtl8169_set_features in rtl_open

2018-04-28 Thread Heiner Kallweit
RxChkSum and RxVlan aren't touched outside __rtl8169_set_features (except in probe), so they are always in sync with dev->features. And the RxConfig flags are set in rtl_set_rx_mode() which is called via dev_set_rx_mode() from __dev_open(). Therefore we can safely remove this call. Signed-off-by:

[PATCH net-next 0/8] r8169: further improvements w/o functional change

2018-04-28 Thread Heiner Kallweit
This series aims at further improving and simplifying the code w/o any intended functional changes. Series was tested on: RTL8169sb, RTL8168d, RTL8168e-vl Heiner Kallweit (8): r8169: remove unneeded call to __rtl8169_set_features in rtl_open r8169: improve rtl8169_set_features r8169:

Re: [PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog

2018-04-28 Thread Yonghong Song
On 4/28/18 12:06 PM, Alexei Starovoitov wrote: On Sat, Apr 28, 2018 at 11:17:30AM -0700, Y Song wrote: On Sat, Apr 28, 2018 at 9:56 AM, Alexei Starovoitov wrote: On Sat, Apr 28, 2018 at 12:02:04AM -0700, Yonghong Song wrote: The test attached a raw_tracepoint

Re: [PATCH net-next v2 4/7] net: mscc: Add initial Ocelot switch support

2018-04-28 Thread kbuild test robot
Hi Alexandre, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Alexandre-Belloni/Microsemi-Ocelot-Ethernet-switch-support/20180429-024136 config: sh-allmodconfig (attached as .config) compiler:

[PATCH net-next 0/2 v4] netns: uevent filtering

2018-04-28 Thread Christian Brauner
Hey everyone, This is the new approach to uevent filtering as discussed (see the threads in [1], [2], and [3]). It only contains *non-functional changes*. This series deals with with fixing up uevent filtering logic: - uevent filtering logic is simplified - locking time on uevent_sock_list is

[PATCH net-next 1/2 v4] uevent: add alloc_uevent_skb() helper

2018-04-28 Thread Christian Brauner
This patch adds alloc_uevent_skb() in preparation for follow up patches. Signed-off-by: Christian Brauner --- v3->v4: * non-functional changes: initialize some variables again explicitly to make it obvious to readers that they are correctly set v2->v3: * new

[PATCH net-next 2/2 v4] netns: restrict uevents

2018-04-28 Thread Christian Brauner
commit 07e98962fa77 ("kobject: Send hotplug events in all network namespaces") enabled sending hotplug events into all network namespaces back in 2010. Over time the set of uevents that get sent into all network namespaces has shrunk. We have now reached the point where hotplug events for all

Re: [PATCH net-next 2/2 v3] netns: restrict uevents

2018-04-28 Thread Christian Brauner
On Fri, Apr 27, 2018 at 11:30:26AM -0500, Eric W. Biederman wrote: > Christian Brauner writes: > > --- > > lib/kobject_uevent.c | 140 ++- > > 1 file changed, 99 insertions(+), 41 deletions(-) > > > > diff --git

Re: [PATCH net-next 1/2 v3] uevent: add alloc_uevent_skb() helper

2018-04-28 Thread Christian Brauner
On Fri, Apr 27, 2018 at 11:39:44AM -0500, Eric W. Biederman wrote: > Christian Brauner writes: > > > This patch adds alloc_uevent_skb() in preparation for follow up patches. > > > > Signed-off-by: Christian Brauner > > --- > >

Re: [PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog

2018-04-28 Thread Alexei Starovoitov
On Sat, Apr 28, 2018 at 11:17:30AM -0700, Y Song wrote: > On Sat, Apr 28, 2018 at 9:56 AM, Alexei Starovoitov > wrote: > > On Sat, Apr 28, 2018 at 12:02:04AM -0700, Yonghong Song wrote: > >> The test attached a raw_tracepoint program to sched/sched_switch. > >> It

Re: [PATCH 1/1] tg3: fix meaningless hw_stats reading after tg3_halt memset 0 hw_stats

2018-04-28 Thread Michael Chan
On Fri, Apr 27, 2018 at 8:15 PM, Zumeng Chen wrote: > diff --git a/drivers/net/ethernet/broadcom/tg3.h > b/drivers/net/ethernet/broadcom/tg3.h > index 3b5e98e..6727d93 100644 > --- a/drivers/net/ethernet/broadcom/tg3.h > +++ b/drivers/net/ethernet/broadcom/tg3.h > @@

Re: [PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog

2018-04-28 Thread Y Song
On Sat, Apr 28, 2018 at 9:56 AM, Alexei Starovoitov wrote: > On Sat, Apr 28, 2018 at 12:02:04AM -0700, Yonghong Song wrote: >> The test attached a raw_tracepoint program to sched/sched_switch. >> It tested to get stack for user space, kernel space and user >> space

Re: [PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog

2018-04-28 Thread Alexei Starovoitov
On Sat, Apr 28, 2018 at 12:02:04AM -0700, Yonghong Song wrote: > The test attached a raw_tracepoint program to sched/sched_switch. > It tested to get stack for user space, kernel space and user > space with build_id request. It also tested to get user > and kernel stack into the same buffer with

Re: [PATCH bpf-next v8 05/10] bpf/verifier: improve register value range tracking with ARSH

2018-04-28 Thread Alexei Starovoitov
On Sat, Apr 28, 2018 at 12:02:00AM -0700, Yonghong Song wrote: > When helpers like bpf_get_stack returns an int value > and later on used for arithmetic computation, the LSH and ARSH > operations are often required to get proper sign extension into > 64-bit. For example, without this patch: >

Re: [PATCH net-next v5] Add Common Applications Kept Enhanced (cake) qdisc

2018-04-28 Thread Toke Høiland-Jørgensen
Toke Høiland-Jørgensen writes: > +static inline struct tcphdr *cake_get_tcphdr(struct sk_buff *skb) > +{ > + struct ipv6hdr *ipv6h; > + struct iphdr *iph; > + struct tcphdr *th; > + > + > + switch (skb->protocol) { > + case cpu_to_be16(ETH_P_IP): As someone was

Re: [Cake] [PATCH iproute2-next v7] Add support for cake qdisc

2018-04-28 Thread Toke Høiland-Jørgensen
Stephen Hemminger writes: > On Fri, 27 Apr 2018 21:57:20 +0200 > Toke Høiland-Jørgensen wrote: > >> sch_cake is intended to squeeze the most bandwidth and latency out of even >> the slowest ISP links and routers, while presenting an API simple enough >>

Re: [PATCH bpf-next] bpf: Allow bpf_current_task_under_cgroup in interrupt

2018-04-28 Thread Alexei Starovoitov
On 4/28/18 12:32 AM, Teng Qin wrote: Currently, the bpf_current_task_under_cgroup helper has a check where if the BPF program is running in_interrupt(), it will return -EINVAL. This prevents the helper to be used in many useful scenarios, particularly BPF programs attached to Perf Events. This

Re: [linux-sunxi] Re: [PATCH 1/5] dt-bindings: allow dwmac-sun8i to use other devices' exported regmap

2018-04-28 Thread Chen-Yu Tsai
Hi Rob, On Tue, Apr 17, 2018 at 7:17 AM, Icenowy Zheng wrote: > > > 于 2018年4月17日 GMT+08:00 上午2:47:45, Rob Herring 写到: >>On Wed, Apr 11, 2018 at 10:16:37PM +0800, Icenowy Zheng wrote: >>> On some Allwinner SoCs the EMAC clock register needed by dwmac-sun8i >>is

[net-next v2] ipv6: sr: extract the right key values for "seg6_make_flowlabel"

2018-04-28 Thread Ahmed Abdelsalam
The seg6_make_flowlabel() is used by seg6_do_srh_encap() to compute the flowlabel from a given skb. It relies on skb_get_hash() which eventually calls __skb_flow_dissect() to extract the flow_keys struct values from the skb. In case of IPv4 traffic, calling seg6_make_flowlabel() after skb_push(),

Re: [net-next] ipv6: sr: Extract the right key values for "seg6_make_flowlabel"

2018-04-28 Thread Ahmed Abdelsalam
On Fri, 27 Apr 2018 13:59:07 -0400 (EDT) David Miller wrote: > From: Ahmed Abdelsalam > Date: Thu, 26 Apr 2018 16:11:11 +0200 > > > @@ -119,6 +119,9 @@ int seg6_do_srh_encap(struct sk_buff *skb, struct > > ipv6_sr_hdr *osrh, int proto) > > int

Re: [PATCHv2 net] bridge: check iface upper dev when setting master via ioctl

2018-04-28 Thread Nikolay Aleksandrov
On 27/04/18 15:59, Hangbin Liu wrote: When we set a bond slave's master to bridge via ioctl, we only check the IFF_BRIDGE_PORT flag. Although we will find the slave's real master at netdev_master_upper_dev_link() later, it already does some settings and allocates some resources. It would be

[PATCH] net: ethernet: ucc: fix spelling mistake: "tx-late-collsion" -> "tx-late-collision"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in tx_fw_stat_gstrings text Signed-off-by: Colin Ian King --- drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] liquidio: fix spelling mistake: "mac_tx_multi_collison" -> "mac_tx_multi_collision"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in oct_stats_strings text Signed-off-by: Colin Ian King --- drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] qed: fix spelling mistake: "checksumed" -> "checksummed"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in DP_INFO message text Signed-off-by: Colin Ian King --- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-28 Thread Jiri Pirko
Fri, Apr 27, 2018 at 07:06:59PM CEST, sridhar.samudr...@intel.com wrote: >This patch enables virtio_net to switch over to a VF datapath when a VF >netdev is present with the same MAC address. It allows live migration >of a VM with a direct attached VF without the need to setup a bond/team >between

[PATCH] mwifiex: fix spelling mistake: "capabilties" -> "capabilities"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in function names and text strings Signed-off-by: Colin Ian King --- drivers/net/wireless/marvell/mwifiex/sta_event.c | 10 +- drivers/net/wireless/marvell/mwifiex/uap_event.c | 8

Re: [PATCH net-next v9 2/4] net: Introduce generic failover module

2018-04-28 Thread Jiri Pirko
Fri, Apr 27, 2018 at 07:06:58PM CEST, sridhar.samudr...@intel.com wrote: >This provides a generic interface for paravirtual drivers to listen >for netdev register/unregister/link change events from pci ethernet >devices with the same MAC and takeover their datapath. The notifier and >event

Re: [PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-28 Thread Jiri Pirko
Fri, Apr 27, 2018 at 07:06:59PM CEST, sridhar.samudr...@intel.com wrote: >This patch enables virtio_net to switch over to a VF datapath when a VF >netdev is present with the same MAC address. It allows live migration >of a VM with a direct attached VF without the need to setup a bond/team >between

Re: [PATCH net-next v8 2/4] net: Introduce generic failover module

2018-04-28 Thread Dan Carpenter
Hi Sridhar, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Sridhar-Samudrala/Enable-virtio_net-to-act-as-a-standby-for-a-passthru-device/20180427-183842 smatch warnings:

Re: [PATCH net-next v9 2/4] net: Introduce generic failover module

2018-04-28 Thread Jiri Pirko
Fri, Apr 27, 2018 at 07:06:58PM CEST, sridhar.samudr...@intel.com wrote: >This provides a generic interface for paravirtual drivers to listen >for netdev register/unregister/link change events from pci ethernet >devices with the same MAC and takeover their datapath. The notifier and >event

net: smsc95xx: aligment issues

2018-04-28 Thread Stefan Wahren
Hi, after connecting a Raspberry Pi 1 B to my local network i'm seeing aligment issues under /proc/cpu/alignment: User: 0 System: 142 (_decode_session4+0x12c/0x3c8) Skipped:0 Half: 0 Word: 0 DWord: 127 Multi: 15 User faults:2

Re: [PATCH net-next v9 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-04-28 Thread Jiri Pirko
Fri, Apr 27, 2018 at 07:06:57PM CEST, sridhar.samudr...@intel.com wrote: >This feature bit can be used by hypervisor to indicate virtio_net device to >act as a standby for another device with the same MAC address. > >VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. >

[PATCH net-next] can: dev: use skb_put_zero to simplfy code

2018-04-28 Thread YueHaibing
use helper skb_put_zero to replace the pattern of skb_put() && memset() Signed-off-by: YueHaibing --- drivers/net/can/dev.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index b177956..d8140a9

[PATCH bpf-next] bpf: Allow bpf_current_task_under_cgroup in interrupt

2018-04-28 Thread Teng Qin
Currently, the bpf_current_task_under_cgroup helper has a check where if the BPF program is running in_interrupt(), it will return -EINVAL. This prevents the helper to be used in many useful scenarios, particularly BPF programs attached to Perf Events. This commit removes the check. Tested a few

[PATCH bpf-next v8 03/10] bpf/verifier: refine retval R0 state for bpf_get_stack helper

2018-04-28 Thread Yonghong Song
The special property of return values for helpers bpf_get_stack and bpf_probe_read_str are captured in verifier. Both helpers return a negative error code or a length, which is equal to or smaller than the buffer size argument. This additional information in the verifier can avoid the condition

[PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog

2018-04-28 Thread Yonghong Song
The test attached a raw_tracepoint program to sched/sched_switch. It tested to get stack for user space, kernel space and user space with build_id request. It also tested to get user and kernel stack into the same buffer with back-to-back bpf_get_stack helper calls. Whenever the kernel stack is

[PATCH bpf-next v8 10/10] tools/bpf: add a test for bpf_get_stack with tracepoint prog

2018-04-28 Thread Yonghong Song
The test_stacktrace_map and test_stacktrace_build_id are enhanced to call bpf_get_stack in the helper to get the stack trace as well. The stack traces from bpf_get_stack and bpf_get_stackid are compared to ensure that for the same stack as represented as the same hash, their ip addresses or build

[PATCH bpf-next v8 05/10] bpf/verifier: improve register value range tracking with ARSH

2018-04-28 Thread Yonghong Song
When helpers like bpf_get_stack returns an int value and later on used for arithmetic computation, the LSH and ARSH operations are often required to get proper sign extension into 64-bit. For example, without this patch: 54: R0=inv(id=0,umax_value=800) 54: (bf) r8 = r0 55:

[PATCH bpf-next v8 07/10] samples/bpf: move common-purpose trace functions to selftests

2018-04-28 Thread Yonghong Song
There is no functionality change in this patch. The common-purpose trace functions, including perf_event polling and ksym lookup, are moved from trace_output_user.c and bpf_load.c to selftests/bpf/trace_helpers.c so that these function can be reused later in selftests. Acked-by: Alexei

[PATCH bpf-next v8 01/10] bpf: change prototype for stack_map_get_build_id_offset

2018-04-28 Thread Yonghong Song
This patch didn't incur functionality change. The function prototype got changed so that the same function can be reused later. Signed-off-by: Yonghong Song --- kernel/bpf/stackmap.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH bpf-next v8 06/10] tools/bpf: add bpf_get_stack helper to tools headers

2018-04-28 Thread Yonghong Song
The tools header file bpf.h is synced with kernel uapi bpf.h. The new helper is also added to bpf_helpers.h. Signed-off-by: Yonghong Song --- tools/include/uapi/linux/bpf.h| 42 +-- tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 2 files

[PATCH bpf-next v8 04/10] bpf: remove never-hit branches in verifier adjust_scalar_min_max_vals

2018-04-28 Thread Yonghong Song
In verifier function adjust_scalar_min_max_vals, when src_known is false and the opcode is BPF_LSH/BPF_RSH, early return will happen in the function. So remove the branch in handling BPF_LSH/BPF_RSH when src_known is false. Acked-by: Alexei Starovoitov Signed-off-by: Yonghong

[PATCH bpf-next v8 08/10] tools/bpf: add a verifier test case for bpf_get_stack helper and ARSH

2018-04-28 Thread Yonghong Song
The test_verifier already has a few ARSH test cases. This patch adds a new test case which takes advantage of newly improved verifier behavior for bpf_get_stack and ARSH. Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/test_verifier.c | 45 +

[PATCH bpf-next v8 02/10] bpf: add bpf_get_stack helper

2018-04-28 Thread Yonghong Song
Currently, stackmap and bpf_get_stackid helper are provided for bpf program to get the stack trace. This approach has a limitation though. If two stack traces have the same hash, only one will get stored in the stackmap table, so some stack traces are missing from user perspective. This patch

[PATCH bpf-next v8 00/10] bpf: add bpf_get_stack helper

2018-04-28 Thread Yonghong Song
Currently, stackmap and bpf_get_stackid helper are provided for bpf program to get the stack trace. This approach has a limitation though. If two stack traces have the same hash, only one will get stored in the stackmap table regardless of whether BPF_F_REUSE_STACKID is specified or not, so some

[PATCH V2 net-next 4/6] liquidio: Moved common definition octnic_gather to octeon_network.h

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha Moving common definition octnic_gather to octeon_network.h Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas ---

[PATCH V2 net-next 6/6] liquidio: enhanced ethtool --set-channels feature

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha Enhancing driver to accept max supported queues for ethtool --set-channels Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas ---

[PATCH V2 net-next 5/6] liquidio: Moved common function setup_glists to lio_core.c

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha Moved common function setup_glists to lio_core.c and reamed it to lio_setup_glists Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas

[PATCH V2 net-next 2/6] liquidio: Moved common function list_delete_head to octeon_network.h

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha Moved common function list_delete_head to octeon_network.h and renamed it to lio_list_delete_head Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas

[PATCH V2 net-next 3/6] liquidio: Moved common function delete_glists to lio_core.c

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha Moved common function delete_glists to lio_core.c and renamed it to lio_delete_glists Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas

[PATCH V2 net-next 1/6] liquidio: Moved common function if_cfg_callback to lio_core.c

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha Moved common function if_cfg_callback to lio_core.c and renamed it to lio_if_cfg_callback. Signed-off-by: Intiyaz Basha Acked-by: Derek Chickles Signed-off-by: Felix Manlunas

[PATCH V2 net-next 0/6] liquidio: enhanced ethtool --set-channels feature

2018-04-28 Thread Felix Manlunas
From: Intiyaz Basha For the ethtool --set-channels feature, the liquidio driver currently accepts max combined value as the queue count configured during driver load time, where max combined count is the total count of input and output queues. This limitation is

[PATCH v6 net-next 1/3] lan78xx: Lan7801 Support for Fixed PHY

2018-04-28 Thread Raghuram Chary J
Adding Fixed PHY support to the lan78xx driver. Signed-off-by: Raghuram Chary J --- v0->v1: * Remove driver version #define * Modify netdev_info to netdev_dbg * Move lan7801 specific to new routine and add switch case * Minor cleanup v1->v2:

[PATCH v6 net-next 3/3] lan78xx: Modify error messages

2018-04-28 Thread Raghuram Chary J
Modify the error messages when phy registration fails. Signed-off-by: Raghuram Chary J --- v5->v6: * Modified error msg --- drivers/net/usb/lan78xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/lan78xx.c

[PATCH v6 net-next 2/3] lan78xx: Remove DRIVER_VERSION for lan78xx driver

2018-04-28 Thread Raghuram Chary J
Remove driver version info from the lan78xx driver. Signed-off-by: Raghuram Chary J --- drivers/net/usb/lan78xx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 81dfd10c3b92..54f8db887e3d

[PATCH v6 net-next 0/3] lan78xx updates along with Fixed phy Support

2018-04-28 Thread Raghuram Chary J
These series of patches handle few modifications in driver and adds support for fixed phy. Raghuram Chary J (3): lan78xx: Lan7801 Support for Fixed PHY lan78xx: Remove DRIVER_VERSION for lan78xx driver lan78xx: Modify error messages drivers/net/usb/Kconfig | 1 +