Assertion faileda at samples/bpf/test_maps

2016-10-01 Thread Louie Lu
Hi everyone, I'm now playing net-next samples/bpf things, and I found that test_maps will give an assertion ``` test_maps: /home/grd/linux/net-next/samples/bpf/test_maps.c:146: test_percpu_hashmap_sanity: Assertion `bpf_lookup_elem(map_fd, &key, value) == -1 && errno == ENOENT' failed. [1]207

[RFC PATCH net-next 5/5] bpf: Add tests for the LRU bpf_htab

2016-10-01 Thread Martin KaFai Lau
This patch has some unit tests and a test_lru_dist. The test_lru_dist reads in the numeric keys from a file. The files used here are generated by a modified fio-genzipf tool originated from the fio test suit. The sample data file can be found here: https://github.com/iamkafai/bpf-lru The zipf.*

[RFC PATCH net-next 4/5] bpf: Add BPF_MAP_TYPE_LRU_PERCPU_HASH

2016-10-01 Thread Martin KaFai Lau
Provide a LRU version of the existing BPF_MAP_TYPE_PERCPU_HASH Signed-off-by: Martin KaFai Lau --- include/uapi/linux/bpf.h | 1 + kernel/bpf/hashtab.c | 129 --- kernel/bpf/syscall.c | 8 ++- 3 files changed, 130 insertions(+), 8 deletions

[RFC PATCH net-next 3/5] bpf: ADD BPF_MAP_TYPE_LRU_HASH

2016-10-01 Thread Martin KaFai Lau
Provide a LRU version of the existing BPF_MAP_TYPE_HASH. Signed-off-by: Martin KaFai Lau --- include/uapi/linux/bpf.h | 1 + kernel/bpf/hashtab.c | 234 --- 2 files changed, 222 insertions(+), 13 deletions(-) diff --git a/include/uapi/linux/bpf.

[RFC PATCH net-next 2/5] bpf: Refactor codes handling percpu map

2016-10-01 Thread Martin KaFai Lau
Refactor the codes that populate the value of a htab_elem in a BPF_MAP_TYPE_PERCPU_HASH typed bpf_map. Signed-off-by: Martin KaFai Lau --- kernel/bpf/hashtab.c | 47 +-- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/kernel/bpf/hashtab

[RFC PATCH net-next 1/5] bpf: LRU List

2016-10-01 Thread Martin KaFai Lau
Introduce bpf_lru_list which will provide LRU capability to the bpf_htab in the later patch. General Thoughts: 1. Target use case. Read is more often than update. (i.e. bpf_lookup_elem() is more often than bpf_update_elem()). If bpf_prog does a bpf_lookup_elem() first and then an in-place

[PATCH net] Panic when tc_lookup_action_n finds a partially initialized action.

2016-10-01 Thread Krister Johansen
A tc_action_ops structure is visibile as soon as it is placed in the act_base list. When tcf_regsiter_action adds an item to this list and drops act_mod_lock, registration is not complete until register_pernet_subsys() finishes. If two threads attempt to modify a tc action in a way that triggers

Re: [PATCH] realtek: rtl8xxxu: Use const init arrays

2016-10-01 Thread Jes Sorensen
Joe Perches writes: > On Sat, 2016-10-01 at 16:32 -0400, Jes Sorensen wrote: >> Your output shows it moving to the text segment - if it's in a different >> segment, eg. rodata, you should use output demonstrating that to justify >> the change. > > For size, rodata _is_ text Well then maybe use so

Re: [PATCH] realtek: rtl8xxxu: Use const init arrays

2016-10-01 Thread Joe Perches
On Sat, 2016-10-01 at 16:32 -0400, Jes Sorensen wrote: > Your output shows it moving to the text segment - if it's in a different > segment, eg. rodata, you should use output demonstrating that to justify > the change. For size, rodata _is_ text

[PATCH iproute2 9/9] man pages: add man page for skbmod action

2016-10-01 Thread Jamal Hadi Salim
From: Lucas Bates Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim --- man/man8/Makefile| 2 +- man/man8/tc-skbmod.8 | 137 +++ 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 man/man8/tc-skbmod.8 diff --git

[PATCH iproute2 6/9] actions: add skbmod action

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action pedit munge offset -14 u8 set

[PATCH iproute2 5/9] action gact: list pipe as a valid action

2016-10-01 Thread Jamal Hadi Salim
From: Craig Dillabaugh Signed-off-by: Craig Dillabaugh Signed-off-by: Jamal Hadi Salim --- tc/m_gact.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tc/m_gact.c b/tc/m_gact.c index 2bfd9a7..dc04b9f 100644 --- a/tc/m_gact.c +++ b/tc/m_gact.c @@ -45,7 +45,7 @@ explain(v

[PATCH iproute2 8/9] man pages: Add tc-ife to Makefile

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim --- man/man8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/Makefile b/man/man8/Makefile index 9213769..4ad96ce 100644 --- a/man/man8/Makefile +++ b/man/man8/Makefile @@ -16,7 +16,7 @@ MAN8PAGES = $(TA

[PATCH iproute2 7/9] man pages: update ife action to include tcindex

2016-10-01 Thread Jamal Hadi Salim
From: Lucas Bates Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim --- man/man8/tc-ife.8 | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/man/man8/tc-ife.8 b/man/man8/tc-ife.8 index 7b3601e..aaf0f97 100644 --- a/man/man8/tc-ife.8 +++

[PATCH iproute2 4/9] actions ife: Introduce encoding and decoding of tcindex metadata

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim --- include/linux/tc_act/tc_ife.h | 3 ++- tc/m_ife.c| 29 +++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/include/linux/tc_act/tc_ife.h b/include/linux/tc_act/tc_ife.h inde

[PATCH iproute2 3/9] ife: improve help text

2016-10-01 Thread Jamal Hadi Salim
From: Roman Mashak Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim --- tc/m_ife.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index 588bad7..862461b 100644 --- a/tc/m_ife.c +++ b/tc/m_ife.c @@ -29,12 +29,13 @@ static void ife_expla

[PATCH iproute2 1/9] ife action: allow specifying index in hex

2016-10-01 Thread Jamal Hadi Salim
From: Roman Mashak Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim --- tc/m_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index 0219760..a5a7516 100644 --- a/tc/m_ife.c +++ b/tc/m_ife.c @@ -152,7 +152,7 @@ static int parse_ife(str

[PATCH iproute2 2/9] ife: print prio, mark and hash as unsigned

2016-10-01 Thread Jamal Hadi Salim
From: Roman Mashak Signed-off-by: Roman Mashak Signed-off-by: Jamal Hadi Salim --- tc/m_ife.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index a5a7516..588bad7 100644 --- a/tc/m_ife.c +++ b/tc/m_ife.c @@ -252,7 +252,7 @@ static int print_i

[PATCH iproute2 0/9] Cleanup backlog

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Variety of cleanup and new functionality I had sitting around on my private tree Craig Dillabaugh (1): action gact: list pipe as a valid action Jamal Hadi Salim (3): actions ife: Introduce encoding and decoding of tcindex metadata actions: add skbmod action man p

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-10-01 Thread Martin Blumenstingl
On Sat, Oct 1, 2016 at 10:15 PM, Martin Blumenstingl wrote: > On Wed, Sep 14, 2016 at 5:30 PM, Giuseppe CAVALLARO > wrote: >> Also you could check the AXI tuning and PBL value. To be honest >> (thinking about your problem) I can actually suspect some related >> problem on bus setup. So I suggest

Re: [PATCH] realtek: rtl8xxxu: Use const init arrays

2016-10-01 Thread Jes Sorensen
Joe Perches writes: > On Sat, 2016-10-01 at 14:53 -0400, Jes Sorensen wrote: >> Joe Perches writes: >> > Make the init arrays const to reduce data. >> > $ size drivers/net/wireless/realtek/rtl8xxxu/built-in.o* >> > (allyesconfig: x86-32) >> >   text data bss dec hex filename >>

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-10-01 Thread Martin Blumenstingl
On Wed, Sep 14, 2016 at 5:30 PM, Giuseppe CAVALLARO wrote: > as rule of thumb, I can only suggest you to see the RXDLY and TXDLY > and if you have (or need!) the resistor on PCB to have the 2ns of > extra delay. This can impact on RGMII case (1G). > Indeed, if this is true, I should expect some pr

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-10-01 Thread Martin Blumenstingl
On Wed, Sep 14, 2016 at 5:30 PM, Giuseppe CAVALLARO wrote: > Also you could check the AXI tuning and PBL value. To be honest > (thinking about your problem) I can actually suspect some related > problem on bus setup. So I suggest you to play with these value > (better if you ask for having values

Re: [PATCH] realtek: rtl8xxxu: Use const init arrays

2016-10-01 Thread Joe Perches
On Sat, 2016-10-01 at 14:53 -0400, Jes Sorensen wrote: > Joe Perches writes: > > Make the init arrays const to reduce data. > > $ size drivers/net/wireless/realtek/rtl8xxxu/built-in.o* (allyesconfig: > > x86-32) > >   textdata bss dec hex filename > >   80107 13651

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-10-01 Thread Russell King - ARM Linux
On Fri, Sep 30, 2016 at 07:16:12AM -0700, Eric Nelson wrote: > On ARM, the CPU can't handle misaligned memory cycles without > taking an alignment fault and NET_IP_ALIGN is set to 2. Let's get this right... With Linux on MMU parts: On ARMv6+, unaligned memory cycles using the LDR, LDRH and corre

[PATCH net-next 1/7] qed: Add Light L2 support

2016-10-01 Thread Yuval Mintz
Other protocols beside the networking driver need the ability of passing some L2 traffic, usually [although not limited] for the purpose of some management traffic. Signed-off-by: Yuval Mintz Signed-off-by: Ram Amrani --- drivers/net/ethernet/qlogic/Kconfig|8 + drivers/net/ethe

[PATCH net-next 7/7] qed: Add RoCE ll2 & GSI support

2016-10-01 Thread Yuval Mintz
From: Ram Amrani Add the RoCE-specific LL2 logic [as well as GSI support] over the 'generic' LL2 interface. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_hsi.h | 3 + drivers/net/ethernet/qlo

[PATCH net-next 6/7] qed: Add support for memory registeration verbs

2016-10-01 Thread Yuval Mintz
From: Ram Amrani Add slowpath configuration support for user, dma and memory regions registration. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_roce.c | 240 + include/linux/qed/qed_roce_if.h| 6 + 2 fil

[PATCH net-next 3/7] qed: Add support for RoCE hw init

2016-10-01 Thread Yuval Mintz
From: Ram Amrani This adds the backbone required for the various HW initalizations which are necessary for the qedr driver - FW notification, resource initializations, etc. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers

[PATCH net-next 4/7] qed: PD,PKEY and CQ verb support

2016-10-01 Thread Yuval Mintz
From: Ram Amrani Add support for the configurations of the protection domain and completion queues. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_roce.c | 324 + drivers/net/ethernet/qlogic/qed/qed_roce.h | 21 ++ inc

[PATCH net-next 2/7] qede: Add qedr framework

2016-10-01 Thread Yuval Mintz
From: Ram Amrani Adds a skeletal implementation of the qede RoCE driver - The qedr has some dependencies of the state of the underlying base interface. This adds some logic required with mutual registrations and the ability to pass updates on 'intresting' events. Signed-off-by: Ram Amrani Signe

[PATCH net-next 5/7] qed: Add support for QP verbs

2016-10-01 Thread Yuval Mintz
From: Ram Amrani Add support for the slowpath configurations of Queue Pair verbs which adds, deletes, modifies and queries Queue Pairs. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_cxt.h |1 + drivers/net/ethernet/qlogic/qed/qed_roce.c | 11

[PATCH net-next 0/7] qed*: Add qedr infrastructure support

2016-10-01 Thread Yuval Mintz
In the last couple of weeks we've been sending RFCs for the qedr driver - the RoCE driver for QLogic FastLinQ 4 line of adapters. Latest RFC can be found at [1]. At Doug's advice [2], we've decided to split the series into two: - first part contains the qed backbone that's necessary for all t

Re: [PATCH] net: Use ns_capable_noaudit() when determining net sysctl permissions

2016-10-01 Thread Dmitry Torokhov
On Sat, Oct 01, 2016 at 03:25:04AM -0400, David Miller wrote: > From: Dmitry Torokhov > Date: Fri, 30 Sep 2016 15:24:31 -0700 > > > From: Tyler Hicks > > > > The capability check should not be audited since it is only being used > > to determine the inode permissions. A failed check does not in

Re: [PATCH] realtek: rtl8xxxu: Use const init arrays

2016-10-01 Thread Jes Sorensen
Joe Perches writes: > Make the init arrays const to reduce data. > > $ size drivers/net/wireless/realtek/rtl8xxxu/built-in.o* (allyesconfig: > x86-32) >text data bss dec hex filename > 80107 13651 58 93816 16e78 > drivers/net/wireless/realtek/rtl8xxxu/

Re: [PATCH net v2] net: pktgen: fix pkt_size

2016-10-01 Thread Paolo Abeni
On Fri, 2016-09-30 at 08:39 -0700, Greg wrote: > On Fri, 2016-09-30 at 16:56 +0200, Paolo Abeni wrote: > > The commit 879c7220e828 ("net: pktgen: Observe needed_headroom > > of the device") increased the 'pkt_overhead' field value by > > LL_RESERVED_SPACE. > > As a side effect the generated packet

[PATCH] realtek: rtl8xxxu: Use const init arrays

2016-10-01 Thread Joe Perches
Make the init arrays const to reduce data. $ size drivers/net/wireless/realtek/rtl8xxxu/built-in.o* (allyesconfig: x86-32) textdata bss dec hex filename 80107 13651 58 93816 16e78 drivers/net/wireless/realtek/rtl8xxxu/built-in.o.new 65303 28435 58 93796

Re: [PATCH net v2] L2TP:Adjust intf MTU,factor underlay L3,overlay L2

2016-10-01 Thread James Chapman
On 30/09/16 03:39, R. Parameswaran wrote: > >>> + /* Adjust MTU, factor overhead - underlay L3 hdr, overlay L2 hdr*/ >>> + if (tunnel->sock->sk_family == AF_INET) >>> + overhead += (ETH_HLEN + sizeof(struct iphdr)); >>> + else if (tunnel->sock->sk_family == AF_INET6) >>> +

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-10-01 Thread Martin Blumenstingl
Hello Peppe, On Mon, Sep 26, 2016 at 8:17 AM, Giuseppe CAVALLARO wrote: > Hello André > > On 9/17/2016 11:23 PM, André Roth wrote: >> >> >> Hi all, >> >> I have an odroid c2 board which shows this issue. No data is >> transmitted or received after a moment of intense tx traffic. Copying a >> 1GB

Re: [PATCH 1/2] net/mlx5e: shut up maybe-uninitialized warning

2016-10-01 Thread Or Gerlitz
On Fri, Sep 30, 2016 at 7:17 PM, Arnd Bergmann wrote: > Build-testing this driver with -Wmaybe-uninitialized gives a new > false-positive > warning that I can't really explain: > > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function > 'mlx5e_configure_flower': > drivers/net/ethernet/mel

Re: mv643xxx_eth driver, failed to linearize skb with tiny unaligned fragment

2016-10-01 Thread Frans van de Wiel
Hi Eric thank you for your reply. I am not that familiar with driver programming, do you think it is safe to ignore the message without changing the driver?. We did extensive testing and found no data corruption so far. regards -Oorspronkelijk bericht- From: Eric Dumazet Sent: Thursd

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-10-01 Thread David Howells
Arnd Bergmann wrote: > Yes, good idea. We could probably share the part of the two functions that > sets the contents of the msg and pkt variables by moving it into a third > function, but I'm not sure if that actually improves readability or just > reduces the number of lines. And the ACK-sendi

[PATCH -next] net: qcom/emac: fix return value check in emac_sgmii_config()

2016-10-01 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Also add check for return value of platform_get_resource(). Fixes: 54e19bc74f33 ("net: qcom/emac: do not use devm on inte

Re: [ovs-dev] [PATCH/RFC 00/12] Programming Open vSwitch (-like) flows into hardware using SwitchDev

2016-10-01 Thread Or Gerlitz
On Sat, Oct 1, 2016 at 1:12 AM, pravin shelar wrote: [...] > Why not allow switchdev offload API for userspace similar to TC flower > offload? or we could use flower API for switchdev flow offload. Hi Pravin, Could you also share your thoughts on the RFC we've posted couple of days ago to the

[PATCH v3] net: hns: mark symbols static where possible

2016-10-01 Thread Baoyou Xie
We get a few warnings when building kernel with W=1: drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:76:21: warning: no previous prototype for 'hns_ae_get_handle' [-Wmissing-prototypes] drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:274:6: warning: no previous prototype for 'hns_ae_stop' [-W

Re: [PATCH] net: Use ns_capable_noaudit() when determining net sysctl permissions

2016-10-01 Thread David Miller
From: Dmitry Torokhov Date: Fri, 30 Sep 2016 15:24:31 -0700 > From: Tyler Hicks > > The capability check should not be audited since it is only being used > to determine the inode permissions. A failed check does not indicate a > violation of security policy but, when an LSM is enabled, a denia