Re: [net-next V3 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation

2017-10-02 Thread Jesper Dangaard Brouer
On Mon, 2 Oct 2017 18:02:46 -0700 Alexei Starovoitov wrote: > On Mon, Oct 02, 2017 at 06:05:29PM +0200, Jesper Dangaard Brouer wrote: > > + while ((xdp_pkt = __ptr_ring_consume(rcpu->queue))) { > > + struct sk_buff *skb; > > + int ret; > > + > > +

[PATCH 2/7] crypto:chelsio: Check error code with IS_ERR macro

2017-10-02 Thread Harsh Jain
Check and return proper error code. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c index bdb1014..e4bf32d 100644 --- a/d

[PATCH 4/7] crypto:chelsio:Use x8_ble gf multiplication to calculate IV.

2017-10-02 Thread Harsh Jain
gf128mul_x8_ble() will reduce gf Multiplication iteration by 8. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 11 +-- drivers/crypto/chelsio/chcr_crypto.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/

[PATCH 0/7]crypto:chelsio: Bugs fixes

2017-10-02 Thread Harsh Jain
It includes bug fix and performance improvement changes. Harsh Jain (7): crypto:gf128mul: The x8_ble multiplication functions crypto:chelsio:Use x8_ble gf multiplication to calculate IV. crypto:chelsio:Remove allocation of sg list to implement 2K limit of dsgl header crypto:chelsio:Mov

[PATCH 3/7] crypto:gf128mul: The x8_ble multiplication functions

2017-10-02 Thread Harsh Jain
It multiply GF(2^128) elements in the ble format. It will be used by chelsio driver to fasten gf multiplication. Signed-off-by: Harsh Jain --- crypto/gf128mul.c | 13 + include/crypto/gf128mul.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crypto/gf

[PATCH 5/7] crypto:chelsio:Remove allocation of sg list to implement 2K limit of dsgl header

2017-10-02 Thread Harsh Jain
Update DMA address index instead of allocating new sg list to impose 2k size limit for each entry. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 237 +++ drivers/crypto/chelsio/chcr_algo.h | 3 +- drivers/crypto/chelsio/chcr_core.h |

[PATCH 1/7] crypto:chelsio: Remove unused parameter

2017-10-02 Thread Harsh Jain
Remove unused parameter sent to latest fw. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 43 +++--- drivers/crypto/chelsio/chcr_algo.h | 12 +-- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/drivers/crypto/chelsio/ch

[PATCH 6/7] crypto:chelsio:Move DMA un/mapping to chcr from lld cxgb4 driver

2017-10-02 Thread Harsh Jain
Allow chcr to do DMA mapping/Unmapping instead of lld cxgb4. It moves "Copy AAD to dst buffer" requirement from driver to firmware. Signed-off-by: Ganesh Goudar Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 1645 ++ drivers/crypto/chelsio/c

[PATCH 7/7] crypto:chelsio: Fix memory leak

2017-10-02 Thread Harsh Jain
Fix memory leak when device does not support crypto. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c i

[PATCH net-next] cxgb4: Update comment for min_mtu

2017-10-02 Thread Ganesh Goudar
From: Arjun Vynipadath We have lost a comment for minimum mtu value set for netdevice with 'commit d894be57ca92 ("ethernet: use net core MTU range checking in more drivers"). Updating it accordingly. Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio

Re: [PATCH net-next 3/3] bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports

2017-10-02 Thread kbuild test robot
Hi Roopa, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Roopa-Prabhu/bridge-neigh-msg-proxy-and-flood-suppression-support/20171003-124610 config: tile-allyesconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget

[PATCH v2 net-next 2/8] bpf: introduce BPF_PROG_QUERY command

2017-10-02 Thread Alexei Starovoitov
introduce BPF_PROG_QUERY command to retrieve a set of either attached programs to given cgroup or a set of effective programs that will execute for events within a cgroup Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau for cgroup bits Acked-by: Tejun Heo

[PATCH v2 net-next 0/8] bpf: muli prog support for cgroup-bpf

2017-10-02 Thread Alexei Starovoitov
v1->v2: - fixed accidentally swapped two lines which caused static_key not going to zero - addressed Martin's feedback and changed prog_query to be consistent with verifier output: return -enospc and fill supplied buffer instead of just returning -enospc when buffer is too small to fit all prog

[PATCH v2 net-next 4/8] libbpf: introduce bpf_prog_detach2()

2017-10-02 Thread Alexei Starovoitov
introduce bpf_prog_detach2() that takes one more argument prog_fd vs bpf_prog_detach() that takes only attach_fd and type. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/lib/bpf/bpf.c | 12 tools/lib/bpf/bpf.h | 1 + 2 files changed, 13 insertions(+) diff -

[PATCH v2 net-next 5/8] samples/bpf: add multi-prog cgroup test case

2017-10-02 Thread Alexei Starovoitov
create 5 cgroups, attach 6 progs and check that progs are executed as: cgrp1 (MULTI progs A, B) -> cgrp2 (OVERRIDE prog C) -> cgrp3 (MULTI prog D) -> cgrp4 (OVERRIDE prog E) -> cgrp5 (NONE prog F) the event in cgrp5 triggers execution of F,D,A,B in that order. if prog F is d

[PATCH v2 net-next 6/8] libbpf: sync bpf.h

2017-10-02 Thread Alexei Starovoitov
tools/include/uapi/linux/bpf.h got out of sync with actual kernel header. Update it. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/include/uapi/linux/bpf.h | 55 +++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/too

[PATCH v2 net-next 3/8] bpf: enforce return code for cgroup-bpf programs

2017-10-02 Thread Alexei Starovoitov
with addition of tnum logic the verifier got smart enough and we can enforce return codes at program load time. For now do so for cgroup-bpf program types. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- kernel/bpf/verifier.c | 40 tools/te

[PATCH v2 net-next 1/8] bpf: multi program support for cgroup+bpf

2017-10-02 Thread Alexei Starovoitov
introduce BPF_F_ALLOW_MULTI flag that can be used to attach multiple bpf programs to a cgroup. The difference between three possible flags for BPF_PROG_ATTACH command: - NONE(default): No further bpf programs allowed in the subtree. - BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program

[PATCH v2 net-next 7/8] libbpf: add support for BPF_PROG_QUERY

2017-10-02 Thread Alexei Starovoitov
add support for BPF_PROG_QUERY command to libbpf Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/lib/bpf/bpf.c | 20 tools/lib/bpf/bpf.h | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c

[PATCH v2 net-next 8/8] samples/bpf: use bpf_prog_query() interface

2017-10-02 Thread Alexei Starovoitov
use BPF_PROG_QUERY command to strengthen test coverage Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- samples/bpf/test_cgrp2_attach2.c | 36 1 file changed, 36 insertions(+) diff --git a/samples/bpf/test_cgrp2_attach2.c b/samples/bpf/test_c

[PATCH net-next] cxgb4: add new T6 pci device id's

2017-10-02 Thread Ganesh Goudar
Add 0x6085 T6 device id. Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h index 37d90d6..633e975 100644

Re: [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Herbert Xu
On Mon, Oct 02, 2017 at 09:18:24PM -0700, Andy Lutomirski wrote: > > On Oct 2, 2017, at 7:25 PM, Jia-Ju Bai wrote: > > > > The SCTP program may sleep under a spinlock, and the function call path is: > > sctp_generate_t3_rtx_event (acquire the spinlock) > > sctp_do_sm > >sctp_side_effects > >

RE: [PATCH v2 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support

2017-10-02 Thread Razvan Stefanescu
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Monday, October 02, 2017 18:37 > To: Razvan Stefanescu > Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; linux- > ker...@vger.kernel.org; netdev@vger.kernel.org; ag...@suse.de; > a...@arndb.de; Alexandru

Re: [PATCH net-next 1/8] bpf: multi program support for cgroup+bpf

2017-10-02 Thread Alexei Starovoitov
On 10/2/17 9:26 PM, David Ahern wrote: On 10/2/17 9:21 PM, Alexei Starovoitov wrote: i'm not sure what you're trying to say. The first loop quoted above is inside cgroup_bpf_put() which is called when cgroup is destroyed. At this point we're detaching and prog_put all attached programs. While t

Re: [PATCH net] net: br: Fix igmp snooping offload with CONFIG_BRIDGE_VLAN_FILTERING

2017-10-02 Thread Toshiaki Makita
On 2017/10/03 9:55, Andrew Lunn wrote: > With CONFIG_BRIDGE_VLAN_FILTERING enabled, but the feature not enabled > via /sys/class/net/brX/bridge/vlan_filtering, mdb offloaded to the > kernel have the wrong VID. > > When an interface is added to the bridge, switchdev is first used to > notify the ha

Re: [PATCH net-next v2 3/3] tools: bpftool: add documentation

2017-10-02 Thread Alexei Starovoitov
On Mon, Oct 02, 2017 at 06:35:09PM -0700, Jakub Kicinski wrote: > > will pretty print them as verifier output as well? > > We tried to use LLVM as a library for this but the interface is > painfully unstable and it's a heavy dependency. The current thinking > is to try to put the instruction prin

Re: [PATCH net-next 1/8] bpf: multi program support for cgroup+bpf

2017-10-02 Thread David Ahern
On 10/2/17 9:21 PM, Alexei Starovoitov wrote: > > i'm not sure what you're trying to say. > The first loop quoted above is inside cgroup_bpf_put() > which is called when cgroup is destroyed. At this point > we're detaching and prog_put all attached programs. > While there is only one static_branch

Re: [PATCH net-next 1/8] bpf: multi program support for cgroup+bpf

2017-10-02 Thread Alexei Starovoitov
On 10/2/17 8:54 PM, David Ahern wrote: On 10/2/17 4:48 PM, Alexei Starovoitov wrote: diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c index 546113430049..70f679a94804 100644 --- a/kernel/bpf/cgroup.c +++ b/kernel/bpf/cgroup.c @@ -27,129 +27,361 @@ void cgroup_bpf_put(struct cgroup *cgrp)

Re: [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Andy Lutomirski
> On Oct 2, 2017, at 7:25 PM, Jia-Ju Bai wrote: > > The SCTP program may sleep under a spinlock, and the function call path is: > sctp_generate_t3_rtx_event (acquire the spinlock) > sctp_do_sm >sctp_side_effects > sctp_cmd_interpreter >sctp_make_init_ack > sctp_pack_cook

Re: [PATCH net-next 1/8] bpf: multi program support for cgroup+bpf

2017-10-02 Thread David Ahern
On 10/2/17 4:48 PM, Alexei Starovoitov wrote: > diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c > index 546113430049..70f679a94804 100644 > --- a/kernel/bpf/cgroup.c > +++ b/kernel/bpf/cgroup.c > @@ -27,129 +27,361 @@ void cgroup_bpf_put(struct cgroup *cgrp) > { > unsigned int type; >

[PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Jia-Ju Bai
The SCTP program may sleep under a spinlock, and the function call path is: sctp_generate_t3_rtx_event (acquire the spinlock) sctp_do_sm sctp_side_effects sctp_cmd_interpreter sctp_make_init_ack sctp_pack_cookie crypto_shash_setkey shash_setke

[PATCH] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Jia-Ju Bai
For the same reason, the orinoco driver may sleep in interrupt handler, and the function call path is: orinoco_rx_isr_tasklet orinoco_rx orinoco_mic crypto_shash_setkey shash_setkey_unaligned kmalloc(GFP_KERNEL) To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400 bfie...@fieldses.org (J. Bruce Fields) wrote: > Mainly I'd just like to know which you're asking for. Do you want me to > apply this, or to ACK it so someone else can? If it's sent as a series > I tend to assume the latter. > > But in this case I'm assuming it'

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 02 Oct 2017 16:46:29 +0300 Kalle Valo wrote: > We have a tree for wireless so usually it's better to submit wireless > changes on their own but here I assume Dave will apply this to his tree. > If not, please resubmit the wireless part in a separate patch. Ok, I note that. I'll wait Dave

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 16:07:36 +0300 Andy Shevchenko wrote: > > + {&gainctrl_lut_core0_rev0, ARRAY_SIZE(gainctrl_lut_core0_rev0), 26, > > 192, > > +32}, > > For all such cases I would rather put on one line disregard checkpatch > warning for better readability. I agree that it woul

Re: [PATCH net-next v2 3/3] tools: bpftool: add documentation

2017-10-02 Thread Jakub Kicinski
On Mon, 2 Oct 2017 17:55:02 -0700, Alexei Starovoitov wrote: > > +EXAMPLES > > + > > +**# bpftool prog show** > > +:: > > + > > + 10: xdp name:some_prog tag 00:5a:3d:21:23:62:0c:8b > > could you please remove ':' in the output to match what > show_fdinfo and kallsyms do ? Ack. > > +

[PATCH RESEND net 3/9] net/mac89x0: Fix and modernize log messages

2017-10-02 Thread Finn Thain
Fix misplaced newlines in conditional log messages. Add missing printk severity levels. Log the MAC address after the interface gets a meaningful name. Drop deprecated "out of memory" message as per checkpatch advice. Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 26 +

[PATCH RESEND net 4/9] net/mac89x0: Replace custom debug logging with netif_* calls

2017-10-02 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 47 --- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 4393d9b89f33..278df230c5f6 100644 ---

[PATCH RESEND net 2/9] net/mac89x0: Remove dead or unreachable code

2017-10-02 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/net/ethernet/cirrus/mac89x0.c | 36 --- 1 file changed, 36 deletions(-) diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index f910f0f386d6..8fc43c865621 100644 --- a/drivers/net/ethe

[PATCH RESEND net 1/9] net/smc9194: Remove bogus CONFIG_MAC reference

2017-10-02 Thread Finn Thain
The only version of smc9194.c with Mac support is the one in the linux-mac68k CVS repo. AFAIK that driver never made it to the mainline. Despite that, as of v2.3.45, arch/m68k/config.in listed CONFIG_SMC9194 under CONFIG_MAC. This mistake got carried over into Kconfig in v2.5.55. (See pre-git era

[PATCH RESEND net 0/9] Fixes, cleanup and modernization for some legacy ethernet NIC drivers

2017-10-02 Thread Finn Thain
This patch series fixes some logging bugs and adds some missing message severity levels. There are also cleanup patches for dead code and some Kconfig cruft. Custom debug message logging is converted to netif_* calls to reduce code duplication. All up, about 150 lines of code are eliminated. My

[PATCH RESEND net 6/9] net/sonic: Cleanup and modernize log messages

2017-10-02 Thread Finn Thain
Add missing printk severity levels. Don't print the valid silicon revision number (it's in the source). Avoid KERN_CONT usage as per advice from checkpatch. Avoid ifdef around printk calls. Cc: Thomas Bogendoerfer Cc: Chris Zankel Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/jazz

[PATCH RESEND net 9/9] net/mac8390: Fix log messages

2017-10-02 Thread Finn Thain
Before expansion, dev->name is "eth%d", so log the slot number instead. Log the MAC address after the interface gets a meaningful name. Disambiguate the two identical "Card type %s is unsupported" messages. Fix the duplicated driver name in the pr_warn() message. Fixes: 3a3a7f3b7fbd ("net: mac8390

[PATCH RESEND net 5/9] net/macmace: Fix and cleanup log messages

2017-10-02 Thread Finn Thain
Log the MAC address after the interface gets a meaningful name. Drop redundant debug messages for FIFO events recorded in the interface statistics (consistent with mace.c). Signed-off-by: Finn Thain --- drivers/net/ethernet/apple/macmace.c | 10 +++--- 1 file changed, 3 insertions(+), 7 dele

[PATCH RESEND net 8/9] net/8390: Fix redundant code

2017-10-02 Thread Finn Thain
The patch which introduced the 8390 core module parameter 'msg_enable' failed to do anything useful with it: it merely causes an ancient version string to be logged. Remove the other code that logs the same string. Use the msg_enable module parameter as the default value for ei_local->msg_enable.

[PATCH RESEND net 7/9] net/sonic: Replace custom debug logging with netif_* calls

2017-10-02 Thread Finn Thain
Also eliminate duplicated debug code by moving it into the core driver. Cc: Thomas Bogendoerfer Cc: Chris Zankel Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/jazzsonic.c | 17 ++ drivers/net/ethernet/natsemi/macsonic.c | 21 +--- drivers/net/ethernet/natsemi/sonic.c

Re: [net-next V3 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation

2017-10-02 Thread Alexei Starovoitov
On Mon, Oct 02, 2017 at 06:05:29PM +0200, Jesper Dangaard Brouer wrote: > + while ((xdp_pkt = __ptr_ring_consume(rcpu->queue))) { > + struct sk_buff *skb; > + int ret; > + > + /* Allow busy polling again */ > +

[PATCH net] net: br: Fix igmp snooping offload with CONFIG_BRIDGE_VLAN_FILTERING

2017-10-02 Thread Andrew Lunn
With CONFIG_BRIDGE_VLAN_FILTERING enabled, but the feature not enabled via /sys/class/net/brX/bridge/vlan_filtering, mdb offloaded to the kernel have the wrong VID. When an interface is added to the bridge, switchdev is first used to notify the hardware that a port has joined a bridge. This is imm

Re: [PATCH net-next v2 3/3] tools: bpftool: add documentation

2017-10-02 Thread Alexei Starovoitov
On Mon, Oct 02, 2017 at 04:11:30PM -0700, Jakub Kicinski wrote: > Add documentation for bpftool. Separate files for each subcommand. > Use rst format. Documentation is compiled into man pages using > rst2man. > > Signed-off-by: David Beckett > Signed-off-by: Jakub Kicinski > --- > tools/bpf/b

Re: [PATCH net v1 1/2] ARM: dts: imx: let's name the ptp interrupt for the fec ethernet driver

2017-10-02 Thread Andrew Lunn
On Mon, Oct 02, 2017 at 05:04:41PM -0700, Troy Kisky wrote: > imx7s/imx7d has the ptp interrupt newly added as well. > This will allow the ptp interrupt to have its own interrupt routine. > > Signed-off-by: Troy Kisky > --- > arch/arm/boot/dts/imx6qdl.dtsi | 1 + > arch/arm/boot/dts/imx6sx.dtsi

[PATCH net v1 1/2] ARM: dts: imx: let's name the ptp interrupt for the fec ethernet driver

2017-10-02 Thread Troy Kisky
imx7s/imx7d has the ptp interrupt newly added as well. This will allow the ptp interrupt to have its own interrupt routine. Signed-off-by: Troy Kisky --- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 2 ++ arch/arm/boot/dts/imx6ul.dtsi | 2 ++ arch/arm/boot/dts/imx7d.dt

[PATCH net v1 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-02 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky --- If this patch is taken before the c

[PATCH net-next 6/8] libbpf: sync bpf.h

2017-10-02 Thread Alexei Starovoitov
tools/include/uapi/linux/bpf.h got out of sync with actual kernel header. Update it. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/include/uapi/linux/bpf.h | 55 +++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/too

[PATCH net-next 1/8] bpf: multi program support for cgroup+bpf

2017-10-02 Thread Alexei Starovoitov
introduce BPF_F_ALLOW_MULTI flag that can be used to attach multiple bpf programs to a cgroup. The difference between three possible flags for BPF_PROG_ATTACH command: - NONE(default): No further bpf programs allowed in the subtree. - BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program

[PATCH net-next 5/8] samples/bpf: add multi-prog cgroup test case

2017-10-02 Thread Alexei Starovoitov
create 5 cgroups, attach 6 progs and check that progs are executed as: cgrp1 (MULTI progs A, B) -> cgrp2 (OVERRIDE prog C) -> cgrp3 (MULTI prog D) -> cgrp4 (OVERRIDE prog E) -> cgrp5 (NONE prog F) the event in cgrp5 triggers execution of F,D,A,B in that order. if prog F is d

[PATCH net-next 7/8] libbpf: add support for BPF_PROG_QUERY

2017-10-02 Thread Alexei Starovoitov
add support for BPF_PROG_QUERY command to libbpf Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/lib/bpf/bpf.c | 20 tools/lib/bpf/bpf.h | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c

[PATCH net-next 2/8] bpf: introduce BPF_PROG_QUERY command

2017-10-02 Thread Alexei Starovoitov
introduce BPF_PROG_QUERY command to retrieve a set of either attached programs to given cgroup or a set of effective programs that will execute for events within a cgroup Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann for cgroup bits Acked-by: Tejun Heo --- include/linux/bpf-cgrou

[PATCH net-next 3/8] bpf: enforce return code for cgroup-bpf programs

2017-10-02 Thread Alexei Starovoitov
with addition of tnum logic the verifier got smart enough and we can enforce return codes at program load time. For now do so for cgroup-bpf program types. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- kernel/bpf/verifier.c | 40 tools/te

[PATCH net-next 0/8] bpf: muli prog support for cgroup-bpf

2017-10-02 Thread Alexei Starovoitov
Hi, cgroup-bpf use cases are getting more advanced and running only one program per cgroup is no longer enough. Therefore introduce support for attaching multiple programs per cgroup and running a set of effective programs. These patches introduces BPF_F_ALLOW_MULTI flag for BPF_PROG_ATTACH cmd.

[PATCH net-next 4/8] libbpf: introduce bpf_prog_detach2()

2017-10-02 Thread Alexei Starovoitov
introduce bpf_prog_detach2() that takes one more argument prog_fd vs bpf_prog_detach() that takes only attach_fd and type. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/lib/bpf/bpf.c | 12 tools/lib/bpf/bpf.h | 1 + 2 files changed, 13 insertions(+) diff -

Re: [PATCH] rndis_host: support Novatel Verizon USB730L

2017-10-02 Thread David Miller
From: Aleksander Morgado Date: Wed, 27 Sep 2017 23:31:03 +0200 > I'm not sure if binding this logic to a specific vid:pid (1410:9030) > would be more appropriate here, or if it's ok to just bind > class/subclass/protocol (as in the activesync case). Let me know > what you think. I don't have en

[PATCH net-next v2 2/3] tools: bpf: add bpftool

2017-10-02 Thread Jakub Kicinski
Add a simple tool for querying and updating BPF objects on the system. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- tools/bpf/Makefile | 18 +- tools/bpf/bpftool/Makefile | 80 + tools/bpf/bpftool/comm

[PATCH net-next v2 0/3] tools: add bpftool

2017-10-02 Thread Jakub Kicinski
Hi! This set adds bpftool to the tools/ directory. The first patch renames tools/net to tools/bpf, the second one adds the new code, while the third adds simple documentation. v2: - report names, map ids, load time, uid; - add docs/man pages; - general cleanups & fixes. Thanks to David Bec

[PATCH net-next v2 3/3] tools: bpftool: add documentation

2017-10-02 Thread Jakub Kicinski
Add documentation for bpftool. Separate files for each subcommand. Use rst format. Documentation is compiled into man pages using rst2man. Signed-off-by: David Beckett Signed-off-by: Jakub Kicinski --- tools/bpf/bpftool/Documentation/Makefile | 34 +++ tools/bpf/bpftool/Documenta

[PATCH net-next v2 1/3] tools: rename tools/net directory to tools/bpf

2017-10-02 Thread Jakub Kicinski
We currently only have BPF tools in the tools/net directory. We are about to add more BPF tools there, not necessarily networking related, rename the directory and related Makefile targets to bpf. Suggested-by: Daniel Borkmann Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Da

Re: [PATCH net-next v2 1/2] libbpf: parse maps sections of varying size

2017-10-02 Thread Alexei Starovoitov
On 10/2/17 9:41 AM, Craig Gallek wrote: + /* Assume equally sized map definitions */ + map_def_sz = data->d_size / nr_maps; + if (!data->d_size || (data->d_size % nr_maps) != 0) { + pr_warning("unable to determine map definition size " + "s

Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-10-02 Thread Guedes, Andre
Hi all, On Mon, 2017-10-02 at 12:45 -0600, Levi Pearson wrote: > Hi Rodney, > > Some archives seem to have threaded it, but I have CC'd the > participants I saw in the original discussion thread since they may > not otherwise notice it amongst the normal traffic. > > On Fri, Sep 29, 2017 at 2:44

Re: [PATCH] fsl/fman: remove of_node

2017-10-02 Thread David Miller
From: Madalin Bucur Date: Mon, 2 Oct 2017 13:31:37 +0300 > The FMan MAC driver allocates a platform device for the Ethernet > driver to probe on. Setting pdev->dev.of_node with the MAC node > triggers the MAC driver probing of the new platform device. While > this fails quickly and does not affec

Re: [PATCH net-next] ibmvnic: Improve output for unsupported stats

2017-10-02 Thread David Miller
From: Andrew Lunn Date: Mon, 2 Oct 2017 23:57:23 +0200 > On Mon, Oct 02, 2017 at 03:31:39PM -0500, John Allen wrote: >> The vnic server can report -1 in the event that a given statistic is not >> supported. Currently, the -1 value is implicitly cast to an unsigned >> integer and appears through t

RE: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-10-02 Thread Rodney Cummings
Thanks Levi, Great discussion. It sounds like we're aligned. Qbv is essential in switches. My concern was the end-station side only. You're absolutely right that i210 LaunchTime doesn't do everything that is needed for scheduling. It still requires quite a bit of frame-juggling to ensure that

[PATCH net-next v6 0/4] bpf: add two helpers to read perf event enabled/running time

2017-10-02 Thread Yonghong Song
Hardware pmu counters are limited resources. When there are more pmu based perf events opened than available counters, kernel will multiplex these events so each event gets certain percentage (but not 100%) of the pmu time. In case that multiplexing happens, the number of samples or counter value w

[PATCH net-next v6 2/4] bpf: add a test case for helper bpf_perf_event_read_value

2017-10-02 Thread Yonghong Song
The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song --- samples/bpf/tracex6_kern.c| 26 ++ samples/bpf/tracex6_user.c| 13 - tools/include/uapi/linu

[PATCH net-next v6 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-10-02 Thread Yonghong Song
Hardware pmu counters are limited resources. When there are more pmu based perf events opened than available counters, kernel will multiplex these events so each event gets certain percentage (but not 100%) of the pmu time. In case that multiplexing happens, the number of samples or counter value w

[PATCH net-next v6 4/4] bpf: add a test case for helper bpf_perf_prog_read_value

2017-10-02 Thread Yonghong Song
The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song --- samples/bpf/trace_event_kern.c| 10 ++ samples/bpf/trace_event_user.c| 13 - tools/include/uapi/linux/bpf.h

[PATCH net-next v6 3/4] bpf: add helper bpf_perf_prog_read_value

2017-10-02 Thread Yonghong Song
This patch adds helper bpf_perf_prog_read_cvalue for perf event based bpf programs, to read event counter and enabled/running time. The enabled/running time is accumulated since the perf event open. The typical use case for perf event based bpf program is to attach itself to a single event. In suc

Re: [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-02

2017-10-02 Thread David Miller
From: Jeff Kirsher Date: Mon, 2 Oct 2017 12:48:37 -0700 > This series contains updates to i40e and i40evf. Pulled, thanks Jeff. I saw the feedback about "odd parenthesis" in patch #11 from Yuval Mintz, but I simply don't see it at all.

Re: [PATCH net-next] ibmvnic: Improve output for unsupported stats

2017-10-02 Thread Andrew Lunn
On Mon, Oct 02, 2017 at 03:31:39PM -0500, John Allen wrote: > The vnic server can report -1 in the event that a given statistic is not > supported. Currently, the -1 value is implicitly cast to an unsigned > integer and appears through the ethtool -S output as a very large number. > This patch impr

[PATCH v3 net-next] net: core: decouple ifalias get/set from rtnl lock

2017-10-02 Thread Florian Westphal
Device alias can be set by either rtnetlink (rtnl is held) or sysfs. rtnetlink hold the rtnl mutex, sysfs acquires it for this purpose. Add an extra mutex for it and use rcu to protect concurrent accesses. This allows the sysfs path to not take rtnl and would later allow to not hold it when dumpi

Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-10-02 Thread Levi Pearson
Hi Rodney, On Mon, Oct 2, 2017 at 1:40 PM, Rodney Cummings wrote: > It's a shame that someone built such hardware. Speaking as a manufacturer > of daisy-chainable products for industrial/automotive applications, I > wouldn't use that hardware in my products. The whole point of scheduling > is to

Re: [PATCH v2 net-next] net: core: decouple ifalias get/set from rtnl lock

2017-10-02 Thread Florian Westphal
Florian Westphal wrote: > + mutex_lock(&ifalias_mutex); > + > + old = rcu_dereference_protected(dev->ifalias, > + mutex_is_locked(&ifalias_mutex)); > + if (len) { > + memcpy(new_alias->ifalias, alias, len); > + new_alias->ifal

RE: [net-next 11/15] i40evf: Enable VF to request an alternate queue allocation

2017-10-02 Thread Brady, Alan
> -Original Message- > From: Yuval Mintz [mailto:yuv...@mellanox.com] > Sent: Monday, October 2, 2017 1:51 PM > To: Kirsher, Jeffrey T ; da...@davemloft.net > Cc: Brady, Alan ; netdev@vger.kernel.org; > nhor...@redhat.com; sassm...@redhat.com; jogre...@redhat.com > Subject: RE: [net-next 11

Re: [PATCH net-next] vhost_net: do not stall on zerocopy depletion

2017-10-02 Thread Willem de Bruijn
On Fri, Sep 29, 2017 at 9:25 PM, Willem de Bruijn wrote: > On Fri, Sep 29, 2017 at 3:38 PM, Michael S. Tsirkin wrote: >> On Wed, Sep 27, 2017 at 08:25:56PM -0400, Willem de Bruijn wrote: >>> From: Willem de Bruijn >>> >>> Vhost-net has a hard limit on the number of zerocopy skbs in flight. >>> W

Question about "prevent dst uses after free" and WARNING in nf_xfrm_me_harder / refcnt / 4.13.3

2017-10-02 Thread Denys Fedoryshchenko
Hi, I'm running now 4.13.3, is this patch required for 4.13 as well? (it doesnt apply cleanly, as in 4.13 tcp_prequeue use skb_dst_force_safe, so i just renamed it there to skb_dst_force ) This is what i get on PPPoE BRAS on this kernel, patch applied (no idea if its related to patch, but just

[PATCH v2 net-next] net: core: decouple ifalias get/set from rtnl lock

2017-10-02 Thread Florian Westphal
Device alias can be set by either rtnetlink (rtnl is held) or sysfs. rtnetlink hold the rtnl mutex, sysfs acquires it for this purpose. Add an extra mutex for it and use rcu to protect concurrent accesses. This allows the sysfs path to not take rtnl and would later allow to not hold it when dumpi

RE: [net-next 11/15] i40evf: Enable VF to request an alternate queue allocation

2017-10-02 Thread Yuval Mintz
> + case VIRTCHNL_OP_REQUEST_QUEUES: { > + struct virtchnl_vf_res_request *vfres = > + (struct virtchnl_vf_res_request *)msg; > + if (vfres->num_queue_pairs == adapter->num_req_queues) > { > + adapter->flags |= > I40EVF_FLAG_REINIT

RE: [PATCH net-next 01/10] net/smc: add missing dev_put

2017-10-02 Thread Parav Pandit
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Parav Pandit > Sent: Monday, October 02, 2017 3:36 PM > To: Ursula Braun ; da...@davemloft.net > Cc: netdev@vger.kernel.org; linux-r...@vger.kernel.org; linux- > s...@vger

Re: [PATCH net-next 2/2] flow_dissector: dissect tunnel info

2017-10-02 Thread Tom Herbert
On Mon, Oct 2, 2017 at 1:41 AM, Simon Horman wrote: > Move dissection of tunnel info from the flower classifier to the flow > dissector where all other dissection occurs. This should not have any > behavioural affect on other users of the flow dissector. > > Signed-off-by: Simon Horman > Reviewe

RE: [PATCH net-next 01/10] net/smc: add missing dev_put

2017-10-02 Thread Parav Pandit
Hi Ursula, Dave, Hans, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Ursula Braun > Sent: Wednesday, September 20, 2017 6:58 AM > To: da...@davemloft.net > Cc: netdev@vger.kernel.org; linux-r...@vger.kernel.org; linu

[PATCH net-next] ibmvnic: Improve output for unsupported stats

2017-10-02 Thread John Allen
The vnic server can report -1 in the event that a given statistic is not supported. Currently, the -1 value is implicitly cast to an unsigned integer and appears through the ethtool -S output as a very large number. This patch improves this behavior by reporting 0 in the event that a given statisti

Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables

2017-10-02 Thread Santosh Shilimkar
On 10/1/2017 10:56 PM, David Miller wrote: From: David Miller Date: Sun, 01 Oct 2017 22:54:19 -0700 (PDT) From: Avinash Repaka Date: Fri, 29 Sep 2017 18:13:50 -0700 This patch fixes the scope of has_fr and has_fmr variables as they are needed only in rds_ib_add_one(). Signed-off-by: Avinas

Re: [PATCH iproute2] iproute: build more easily on Android

2017-10-02 Thread enh
On Mon, Oct 2, 2017 at 10:36 AM, Stephen Hemminger wrote: > On Tue, 3 Oct 2017 02:03:37 +0900 > Lorenzo Colitti wrote: > >> iproute2 contains a bunch of kernel headers, including uapi ones. >> Android's libc uses uapi headers almost directly, and uses a >> script to fix kernel types that don't m

Re: [oss-drivers] Re: [PATCH net-next 2/2] flow_dissector: dissect tunnel info

2017-10-02 Thread Simon Horman
On Mon, Oct 02, 2017 at 12:36:33PM -0700, Tom Herbert wrote: > On Mon, Oct 2, 2017 at 1:41 AM, Simon Horman > wrote: > > Move dissection of tunnel info from the flower classifier to the flow > > dissector where all other dissection occurs. This should not have any > > behavioural affect on other

[net-next 04/15] i40e: Fix reporting of supported link modes

2017-10-02 Thread Jeff Kirsher
From: Filip Sadowski This patch fixes incorrect reporting of supported link modes on some NICs. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 20 ++-- drivers/net/ethernet/intel/i40

[net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-02

2017-10-02 Thread Jeff Kirsher
This series contains updates to i40e and i40evf. Shannon Nelson fixes an issue where when a machine has more CPUs than queue pairs, the counting gets a "little funky" and turns off Flow Director. So to correct it, limit the number of LAN queues initially allocated to be sure there are some left f

[net-next 10/15] i40e: ensure reset occurs when disabling VF

2017-10-02 Thread Jeff Kirsher
From: Jacob Keller It is possible although rare that we may not reset when i40e_vc_disable_vf() is called. This can lead to some weird circumstances with some values not being properly set. Modify i40e_reset_vf() to return a code indicating whether it reset or not. Now, i40e_vc_disable_vf() can

[net-next 07/15] i40e: don't hold spinlock while resetting VF

2017-10-02 Thread Jeff Kirsher
From: Jacob Keller When we refactored handling of the PVID in commit 9af52f60b2d9 ("i40e: use (add|rm)_vlan_all_mac helper functions when changing PVID") we introduced a scheduling while atomic regression. This occurred because we now held the spinlock across a call to i40e_reset_vf(), which res

[net-next 12/15] i40e: make i40evf_map_rings_to_vectors void

2017-10-02 Thread Jeff Kirsher
From: Mitch Williams This function cannot fail, so why is it returning a value? And why are we checking it? Why shouldn't we just make it void? Why is this commit message made up of only questions? Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers

[net-next 15/15] i40e: Stop dropping 802.1ad tags - eth proto 0x88a8

2017-10-02 Thread Jeff Kirsher
From: Scott Peterson Enable i40e to pass traffic with VLAN tags using the 802.1ad ethernet protocol ID (0x88a8). This requires NIC firmware providing version 1.7 of the API. With older NIC firmware 802.1ad tagged packets will continue to be dropped. No VLAN offloads nor RSS are supported for 80

[net-next 11/15] i40evf: Enable VF to request an alternate queue allocation

2017-10-02 Thread Jeff Kirsher
From: Alan Brady Currently the VF gets a default number of allocated queues from HW on init and it could choose to enable or disable those allocated queues. This makes it such that the VF can request more or less underlying allocated queues from the PF. First the VF negotiates the number of queu

[net-next 08/15] i40e: drop i40e_pf *pf from i40e_vc_disable_vf()

2017-10-02 Thread Jeff Kirsher
From: Jacob Keller It's never used, and the vf structure could get back to the PF if necessary. Lets just drop the extra unneeded parameter. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 7 +++ 1

  1   2   3   >