Re: [PATCH net-next v1] net/tls: Fixed return value when tls_complete_pending_work() fails

2018-09-12 Thread David Miller
From: Vakul Garg Date: Mon, 10 Sep 2018 22:53:46 +0530 > In tls_sw_sendmsg() and tls_sw_sendpage(), the variable 'ret' has > been set to return value of tls_complete_pending_work(). This allows > return of proper error code if tls_complete_pending_work() fails. > > Fixes: 3c4d7559159b ("tls: ker

Re: [PATCH][net-next][v2] netlink: remove hash::nelems check in netlink_insert

2018-09-12 Thread David Miller
From: Li RongQing Date: Tue, 11 Sep 2018 09:05:01 +0800 > The type of hash::nelems has been changed from size_t to atom_t > which in fact is int, so not need to check if BITS_PER_LONG, that > is bit number of size_t, is bigger than 32 > > and rht_grow_above_max() will be called to check if hasht

Re: [Patch net v2] rds: fix two RCU related problems

2018-09-12 Thread David Miller
From: Cong Wang Date: Mon, 10 Sep 2018 18:27:26 -0700 > When a rds sock is bound, it is inserted into the bind_hash_table > which is protected by RCU. But when releasing rds sock, after it > is removed from this hash table, it is freed immediately without > respecting RCU grace period. This could

Re: [PATCH net] Revert "rtnetlink: add rtnl_link_state check in rtnl_configure_link"

2018-09-12 Thread mcbirnie . l
From: Liam McBirnie Please reject this patch. The author of the original commit is working on a better patch. https://bugzilla.kernel.org/show_bug.cgi?id=201071

Re: bpf: btf: Change how section is supported in btf_header

2018-09-12 Thread Dmitry Vyukov
On Tue, Sep 11, 2018 at 8:10 PM, Martin KaFai Lau wrote: > On Tue, Sep 11, 2018 at 06:40:05PM +0200, Dmitry Vyukov wrote: >> Hi Martin, >> >> I am looking at the subj commit: >> >> static int btf_add_type(struct btf_verifier_env *env, struct btf_type *t) >> @@ -1754,9 +1756,9 @@ static int btf_ch

Re: [PATCH net-next 08/13] net: sched: rename tcf_block_get{_ext}() and tcf_block_put{_ext}()

2018-09-12 Thread Vlad Buslov
On Fri 07 Sep 2018 at 20:09, Cong Wang wrote: > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: >> >> Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually >> attach/detach block to specific Qdisc besides just taking/putting >> reference. Rename them according to their purpose.

Re: [PATCH net-next 09/13] net: sched: extend tcf_block with rcu

2018-09-12 Thread Vlad Buslov
On Fri 07 Sep 2018 at 19:52, Cong Wang wrote: > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: >> >> Extend tcf_block with rcu to allow safe deallocation when it is accessed >> concurrently. > > This sucks, please fold this patch into where you call rcu_read_lock() > on tcf block. > > This

Re: [PATCH net-next 13/13] net: sched: add flags to Qdisc class ops struct

2018-09-12 Thread Vlad Buslov
On Fri 07 Sep 2018 at 19:50, Cong Wang wrote: > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: >> >> Extend Qdisc_class_ops with flags. Create enum to hold possible class ops >> flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED >> to indicate that class ops function

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-12 Thread Marek Vasut
On 09/12/2018 02:46 AM, Andrew Lunn wrote: > On Wed, Sep 12, 2018 at 02:04:54AM +0200, Marek Vasut wrote: >> On 09/12/2018 01:32 AM, Andrew Lunn wrote: compatible = "marvell,mv88e6352", "marvell,mv88e6085"; >>> >>> Just "marvell,mv88e6085"; >>> >>> Please take a look at all the other DT files

Re: kernels > v4.12 oops/crash with ipsec-traffic: bisected to b838d5e1c5b6e57b10ec8af2268824041e3ea911: ipv4: mark DST_NOGC and remove the operation of dst_free()

2018-09-12 Thread Steffen Klassert
On Tue, Sep 11, 2018 at 09:02:48PM +0200, Tobias Hommel wrote: > > > Subject: [PATCH RFC] xfrm: Fix NULL pointer dereference when skb_dst_force > > > clears the dst_entry. > > > > > > Since commit 222d7dbd258d ("net: prevent dst uses after free") > > > skb_dst_force() might clear the dst_entry att

Re: [RFC v2 2/2] netlink: add ethernet address policy types

2018-09-12 Thread Johannes Berg
On Wed, 2018-09-12 at 10:49 +0200, Arend van Spriel wrote: > On 9/12/2018 10:36 AM, Johannes Berg wrote: > > From: Johannes Berg > > > > Commonly, ethernet addresses are just using a policy of > > { .len = ETH_ALEN } > > which leaves userspace free to send more data than it should, > > which

Re: [PATCH net-next v2] net: sched: change tcf_del_walker() to take idrinfo->lock

2018-09-12 Thread Vlad Buslov
On Fri 07 Sep 2018 at 19:12, Cong Wang wrote: > On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote: >> >> Action API was changed to work with actions and action_idr in concurrency >> safe manner, however tcf_del_walker() still uses actions without taking a >> reference or idrinfo->lock first, and

[net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
Add basic XDP support Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 234 +--- 1 file changed, 216 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index 666f

[net-next, PATCH 0/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
This patch series adds AF_XDP support socionext netsec driver In addition the new dma allocation scheme offers a 10% boost on Rx pps rate using 64b packets - patch [1/2]: Use a different allocation scheme for Rx DMA buffers to prepare the driver for AF_XDP support - patch [2/2]: Add XDP support wi

[net-next, PATCH 1/2, v2] net: socionext: different approach on DMA

2018-09-12 Thread Ilias Apalodimas
Current driver dynamically allocates an skb and maps it as DMA rx buffer. A following patch introduces AF_XDP functionality, so we need a different allocation scheme. Buffers are allocated dynamically and mapped into hardware. During the Rx operation the driver uses build_skb() to produce the neces

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Jesper Dangaard Brouer
On Wed, 12 Sep 2018 12:02:38 +0300 Ilias Apalodimas wrote: > @@ -1003,20 +1076,29 @@ static int netsec_setup_rx_dring(struct netsec_priv > *priv) > u16 len; > > buf = netsec_alloc_rx_data(priv, &dma_handle, &len); > - if (!buf) { > -

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
On Wed, Sep 12, 2018 at 11:14:57AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:02:38 +0300 > Ilias Apalodimas wrote: > > > @@ -1003,20 +1076,29 @@ static int netsec_setup_rx_dring(struct netsec_priv > > *priv) > > u16 len; > > > > buf = netsec_alloc_rx

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Jesper Dangaard Brouer
On Wed, 12 Sep 2018 12:02:38 +0300 Ilias Apalodimas wrote: > static const struct net_device_ops netsec_netdev_ops = { > .ndo_init = netsec_netdev_init, > .ndo_uninit = netsec_netdev_uninit, > @@ -1430,6 +1627,7 @@ static const struct net_device_ops netsec_ne

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Björn Töpel
Den ons 12 sep. 2018 kl 11:21 skrev Ilias Apalodimas : > > On Wed, Sep 12, 2018 at 11:14:57AM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 12 Sep 2018 12:02:38 +0300 > > Ilias Apalodimas wrote: > > > > > @@ -1003,20 +1076,29 @@ static int netsec_setup_rx_dring(struct > > > netsec_priv *priv)

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
On Wed, Sep 12, 2018 at 11:25:24AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:02:38 +0300 > Ilias Apalodimas wrote: > > > static const struct net_device_ops netsec_netdev_ops = { > > .ndo_init = netsec_netdev_init, > > .ndo_uninit = netsec_net

Re: [PATCH net-next 0/8] bnxt_en: devlink param updates

2018-09-12 Thread Jakub Kicinski
On Wed, 12 Sep 2018 12:09:37 +0530, Vasundhara Volam wrote: > On Tue, Sep 11, 2018 at 5:04 PM Jakub Kicinski wrote: > > On Tue, 11 Sep 2018 14:14:57 +0530, Vasundhara Volam wrote: > > > This patchset adds support for 4 generic and 1 driver-specific devlink > > > parameters. > > > > > > Also, this

[PATCH RFC 0/2] Flow sorted receive skb lists

2018-09-12 Thread Steffen Klassert
This patchset consists of two patches. Patch 1 adds support for flow sorted rx skb lists for IPv4. This means that it sorts the skb list so that packets from the same flow can to travel together through the stack. The second patch of this pachset is just a hack that disables GRO and does skb list

[PATCH RFC 2/2] net: Hack to enable skb list receive in the napi layer.

2018-09-12 Thread Steffen Klassert
This patch was used to test patch ("net: Support flow sorted skb lists for IPv4.") It is just a hack that disables GRO and does skb list receive instead. Not for merging! Signed-off-by: Steffen Klassert --- include/linux/netdevice.h | 5 - net/core/dev.c| 23 ++--

[PATCH RFC 1/2] net: Support flow sorted RX skb lists for IPv4.

2018-09-12 Thread Steffen Klassert
This patch sorts RX skb lists into separate flows, using a flow dissector, at the IP input layer. Packets of the same flow are chained at the frag_list pointer of the first skb of this flow. After ip_list_rcv_finish() the skb list has this layout: |-||-||-|

Re: [PATCH net-next v3 0/7] net: aquantia: implement WOL and EEE support

2018-09-12 Thread Igor Russkikh
>> Discussion outcome regarding driver version bumps was not finished >> (here https://patchwork.ozlabs.org/patch/954905/) >> David, could you suggest the best way to proceed on this? > > Having a channel for your driver that is outside of upstream and Linux > distribution packages creates lots

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-12 Thread Andrew Lunn
On Wed, Sep 12, 2018 at 10:38:41AM +0200, Marek Vasut wrote: > On 09/12/2018 02:46 AM, Andrew Lunn wrote: > > On Wed, Sep 12, 2018 at 02:04:54AM +0200, Marek Vasut wrote: > >> On 09/12/2018 01:32 AM, Andrew Lunn wrote: > compatible = "marvell,mv88e6352", "marvell,mv88e6085"; > >>> > >>> Just "

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-12 Thread Marek Vasut
On 09/12/2018 02:47 PM, Andrew Lunn wrote: > On Wed, Sep 12, 2018 at 10:38:41AM +0200, Marek Vasut wrote: >> On 09/12/2018 02:46 AM, Andrew Lunn wrote: >>> On Wed, Sep 12, 2018 at 02:04:54AM +0200, Marek Vasut wrote: On 09/12/2018 01:32 AM, Andrew Lunn wrote: >> compatible = "marvell,mv88e

[PATCH net 0/4] s390/qeth: fixes 2018-09-12

2018-09-12 Thread Julian Wiedmann
Hi Dave, please apply the following qeth fixes for -net. Patch 1 resolves a regression in an error path, while patch 2 enables the SG support by default that was newly introduced with 4.19. Patch 3 takes care of a longstanding problem with large-order allocations, and patch 4 fixes a potential ou

[PATCH net 1/4] s390/qeth: indicate error when netdev allocation fails

2018-09-12 Thread Julian Wiedmann
Bailing out on allocation error is nice, but we also need to tell the ccwgroup core that creating the qeth groupdev failed. Fixes: d3d1b205e89f ("s390/qeth: allocate netdevice early") Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH net 4/4] s390/qeth: don't dump past end of unknown HW header

2018-09-12 Thread Julian Wiedmann
For inbound data with an unsupported HW header format, only dump the actual HW header. We have no idea how much payload follows it, and what it contains. Worst case, we dump past the end of the Inbound Buffer and access whatever is located next in memory. Signed-off-by: Julian Wiedmann --- drive

[PATCH net 3/4] s390/qeth: use vzalloc for QUERY OAT buffer

2018-09-12 Thread Julian Wiedmann
From: Wenjia Zhang qeth_query_oat_command() currently allocates the kernel buffer for the SIOC_QETH_QUERY_OAT ioctl with kzalloc. So on systems with fragmented memory, large allocations may fail (eg. the qethqoat tool by default uses 132KB). Solve this issue by using vzalloc, backing the allocat

[PATCH net 2/4] s390/qeth: switch on SG by default for IQD devices

2018-09-12 Thread Julian Wiedmann
Scatter-gather transmit brings a nice performance boost. Considering the rather large MTU sizes at play, it's also totally the Right Thing To Do. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/s390/net/qeth_core_

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-12 Thread Andrew Lunn
> But the DT should correctly describe the hardware, if it doesn't, it's > just broken. It is more subtle than that. It can be broken, yet work, because it contains information which we don't use. I really expect there will be cut/paste errors, meaning the more specific compatible is sometimes wro

Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-12 Thread Marek Vasut
On 09/12/2018 03:32 PM, Andrew Lunn wrote: >> But the DT should correctly describe the hardware, if it doesn't, it's >> just broken. > > It is more subtle than that. It can be broken, yet work, because it > contains information which we don't use. I really expect there will be > cut/paste errors,

Re: [PATCH net-next] tcp: rate limit synflood warnings further

2018-09-12 Thread Willem de Bruijn
On Wed, Sep 12, 2018 at 2:35 AM David Miller wrote: > > From: Willem de Bruijn > Date: Sun, 9 Sep 2018 19:12:12 -0400 > > > From: Willem de Bruijn > > > > Convert pr_info to net_info_ratelimited to limit the total number of > > synflood warnings. > > > > Commit 946cedccbd73 ("tcp: Change possib

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Willem de Bruijn
On Tue, Sep 11, 2018 at 11:35 PM Jason Wang wrote: > > > > On 2018年09月11日 09:14, Willem de Bruijn wrote: > I cook a fixup, and it looks works in my setup: > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index b320b6b14749..9181c3f2f832 100644 > --- a

Re: [net-next, v2, 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-12 Thread Neil Armstrong
Hi Jose, On 11/09/2018 10:17, Jose Abreu wrote: > On 10-09-2018 19:15, Neil Armstrong wrote: >> >> RX is still ok but now TX fails almost immediately... >> >> With 100ms report : >> >> $ iperf3 -c 192.168.1.47 -t 0 -p 5202 -R -i 0.1 >> Connecting to host 192.168.1.47, port 5202 >> Reverse mode, re

Re: [PATCH net-next v2 2/2] net: stmmac: Fixup the tail addr setting in xmit path

2018-09-12 Thread Jose Abreu
Hi Florian, On 10-09-2018 19:46, Florian Fainelli wrote: > > Can you include the appropriate Fixes tag here so this can easily be > backported to relevant stable branches? Well I guess it goes since forever but it can only cause a major impact in xgmac2 operation, remaining shall be okay. I didn

Re: [PATCH net-next v2 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-12 Thread Jose Abreu
Hi Florian, Thanks for your input. On 10-09-2018 20:22, Florian Fainelli wrote: > On 09/10/2018 02:14 AM, Jose Abreu wrote: >> This follows David Miller advice and tries to fix coalesce timer in >> multi-queue scenarios. >> >> We are now using per-queue coalesce values and per-queue TX timer. >>

Re: [net-next, v2, 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-12 Thread Jose Abreu
Hi Neil, On 12-09-2018 14:50, Neil Armstrong wrote: > Hi Jose, > > On 11/09/2018 10:17, Jose Abreu wrote: >> On 10-09-2018 19:15, Neil Armstrong wrote: >>> RX is still ok but now TX fails almost immediately... >>> >>> With 100ms report : >>> >>> $ iperf3 -c 192.168.1.47 -t 0 -p 5202 -R -i 0.1 >>>

Re: kernels > v4.12 oops/crash with ipsec-traffic: bisected to b838d5e1c5b6e57b10ec8af2268824041e3ea911: ipv4: mark DST_NOGC and remove the operation of dst_free()

2018-09-12 Thread Tobias Hommel
On Wed, Sep 12, 2018 at 10:50:46AM +0200, Steffen Klassert wrote: > On Tue, Sep 11, 2018 at 09:02:48PM +0200, Tobias Hommel wrote: > > > > Subject: [PATCH RFC] xfrm: Fix NULL pointer dereference when > > > > skb_dst_force > > > > clears the dst_entry. > > > > > > > > Since commit 222d7dbd258d ("n

[PATCH net v2 0/3] tls: don't leave keys in kernel memory

2018-09-12 Thread Sabrina Dubroca
There are a few places where the RX/TX key for a TLS socket is copied to kernel memory. This series clears those memory areas when they're no longer needed. v2: add union tls_crypto_context, following Vakul Garg's comment swap patch 2 and 3, using new union in patch 3 Sabrina Dubroca (3): t

[PATCH net v2 3/3] tls: clear key material from kernel memory when do_tls_setsockopt_conf fails

2018-09-12 Thread Sabrina Dubroca
Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Sabrina Dubroca Signed-off-by: Sabrina Dubroca --- v2: use the new union tls_crypto_context net/tls/tls_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 737b386

[PATCH net v2 2/3] tls: zero the crypto information from tls_context before freeing

2018-09-12 Thread Sabrina Dubroca
This contains key material in crypto_send_aes_gcm_128 and crypto_recv_aes_gcm_128. Introduce union tls_crypto_context, and replace the two identical unions directly embedded in struct tls_context with it. We can then use this union to clean up the memory in the new tls_ctx_free() function. Fixes:

[PATCH net v2 1/3] tls: don't copy the key out of tls12_crypto_info_aes_gcm_128

2018-09-12 Thread Sabrina Dubroca
There's no need to copy the key to an on-stack buffer before calling crypto_aead_setkey(). Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Sabrina Dubroca --- net/tls/tls_sw.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw

Re: [PATCH net-next 1/5] bpf: use __GFP_COMP while allocating page

2018-09-12 Thread Tushar Dave
On 09/11/2018 12:38 PM, Tushar Dave wrote: Helper bpg_msg_pull_data() can allocate multiple pages while linearizing multiple scatterlist elements into one shared page. However, if the shared page has size > PAGE_SIZE, using copy_page_to_iter() causes below warning. e.g. [ 6367.019832] WARNING

Need input on placement of driver

2018-09-12 Thread Sunil Kovvuri
Hi David, I am trying to submit a driver into drivers/soc folder and Arnd is of the opinion that the driver should be moved to drivers/net/ethernet. Can you please go through below and give your feedback. HW functionality in brief # HW has a Admin function (AF) PCI device which has privilege acc

Re: [PATCH net-next 1/5] bpf: use __GFP_COMP while allocating page

2018-09-12 Thread John Fastabend
On 09/12/2018 09:21 AM, Tushar Dave wrote: > > > On 09/11/2018 12:38 PM, Tushar Dave wrote: >> Helper bpg_msg_pull_data() can allocate multiple pages while >> linearizing multiple scatterlist elements into one shared page. >> However, if the shared page has size > PAGE_SIZE, using >> copy_page_to

[PATCH bpf] bpf: btf: Fix end boundary calculation for type section

2018-09-12 Thread Martin KaFai Lau
The end boundary math for type section is incorrect in btf_check_all_metas(). It just happens that hdr->type_off is always 0 for now because there are only two sections (type and string) and string section must be at the end (ensured in btf_parse_str_sec). However, type_off may not be 0 if a new

Re: [PATCH bpf] bpf: btf: Fix end boundary calculation for type section

2018-09-12 Thread Yonghong Song
On 9/12/18 10:29 AM, Martin KaFai Lau wrote: The end boundary math for type section is incorrect in btf_check_all_metas(). It just happens that hdr->type_off is always 0 for now because there are only two sections (type and string) and string section must be at the end (ensured in btf_parse_s

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Florian Fainelli
On 9/9/2018 3:44 PM, Willem de Bruijn wrote: From: Willem de Bruijn Implement ethtool .set_coalesce (-C) and .get_coalesce (-c) handlers. Interrupt moderation is currently not supported, so these accept and display the default settings of 0 usec and 1 frame. Toggle tx napi through a bit in

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Willem de Bruijn
On Wed, Sep 12, 2018 at 1:42 PM Florian Fainelli wrote: > > > > On 9/9/2018 3:44 PM, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Implement ethtool .set_coalesce (-C) and .get_coalesce (-c) handlers. > > Interrupt moderation is currently not supported, so these accept and > > displa

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Florian Fainelli
On 9/12/2018 11:07 AM, Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 1:42 PM Florian Fainelli wrote: On 9/9/2018 3:44 PM, Willem de Bruijn wrote: From: Willem de Bruijn Implement ethtool .set_coalesce (-C) and .get_coalesce (-c) handlers. Interrupt moderation is currently not support

Re: [PATCH net-next v3 02/17] zinc: introduce minimal cryptography library

2018-09-12 Thread Jason A. Donenfeld
Hi Eric, On Wed, Sep 12, 2018 at 12:08 AM Eric Biggers wrote: > I'd strongly prefer the assembly to be readable too. Jason, I'm not sure if > you've actually read through the asm from the OpenSSL implementations, but the > generated .S files actually do lose a lot of semantic information that wa

Re: [bpf-next, v2 1/3] flow_dissector: implements flow dissector BPF hook

2018-09-12 Thread Willem de Bruijn
On Tue, Sep 11, 2018 at 11:47 PM Alexei Starovoitov wrote: > > On Fri, Sep 07, 2018 at 05:11:08PM -0700, Petar Penkov wrote: > > From: Petar Penkov > > > > Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and > > attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector >

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Willem de Bruijn
On Wed, Sep 12, 2018 at 2:16 PM Florian Fainelli wrote: > > > > On 9/12/2018 11:07 AM, Willem de Bruijn wrote: > > On Wed, Sep 12, 2018 at 1:42 PM Florian Fainelli > > wrote: > >> > >> > >> > >> On 9/9/2018 3:44 PM, Willem de Bruijn wrote: > >>> From: Willem de Bruijn > >>> > >>> Implement etht

Re: [PATCH net-next 2/5] eBPF: Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER

2018-09-12 Thread Tushar Dave
On 09/11/2018 08:57 PM, Alexei Starovoitov wrote: On Tue, Sep 11, 2018 at 09:38:01PM +0200, Tushar Dave wrote: Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER which uses the existing socket filter infrastructure for bpf program attach and load. SOCKET_SG_FILTER eBPF program receives str

Re: [PATCH net-next 3/5] ebpf: Add sg_filter_run()

2018-09-12 Thread Tushar Dave
On 09/11/2018 08:58 PM, Alexei Starovoitov wrote: On Tue, Sep 11, 2018 at 09:38:02PM +0200, Tushar Dave wrote: When sg_filter_run() is invoked it runs the attached eBPF prog of type BPF_PROG_TYPE_SOCKET_SG_FILTER which deals with struct scatterlist. Signed-off-by: Tushar Dave Acked-by: Sowm

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-12 Thread Tushar Dave
On 09/11/2018 09:00 PM, Alexei Starovoitov wrote: On Tue, Sep 11, 2018 at 09:38:04PM +0200, Tushar Dave wrote: Add a sample program that shows how socksg program is used and attached to socket filter. The kernel sample program deals with struct scatterlist that is passed as bpf context. When

Re: [PATCH bpf] bpf: btf: Fix end boundary calculation for type section

2018-09-12 Thread Daniel Borkmann
On 09/12/2018 07:29 PM, Martin KaFai Lau wrote: > The end boundary math for type section is incorrect in > btf_check_all_metas(). It just happens that hdr->type_off > is always 0 for now because there are only two sections > (type and string) and string section must be at the end (ensured > in btf

Re: [PATCH iproute2] q_cake: Add printing of no-split-gso option

2018-09-12 Thread Stephen Hemminger
On Wed, 12 Sep 2018 00:32:16 +0200 Toke Høiland-Jørgensen wrote: > When the GSO splitting was turned into dual split-gso/no-split-gso options, > the printing of the latter was left out. Add that, so output is consistent > with the options passed. > > Signed-off-by: Toke Høiland-Jørgensen Appli

Re: [PATCH net 0/4] s390/qeth: fixes 2018-09-12

2018-09-12 Thread David Miller
From: Julian Wiedmann Date: Wed, 12 Sep 2018 15:31:31 +0200 > please apply the following qeth fixes for -net. > > Patch 1 resolves a regression in an error path, while patch 2 enables > the SG support by default that was newly introduced with 4.19. > Patch 3 takes care of a longstanding problem

[PATCH bpf] bpf: use __GFP_COMP while allocating page

2018-09-12 Thread Tushar Dave
Helper bpg_msg_pull_data() can allocate multiple pages while linearizing multiple scatterlist elements into one shared page. However, if the shared page has size > PAGE_SIZE, using copy_page_to_iter() causes below warning. e.g. [ 6367.019832] WARNING: CPU: 2 PID: 7410 at lib/iov_iter.c:825 page_co

Re: [PATCH net-next 1/5] bpf: use __GFP_COMP while allocating page

2018-09-12 Thread Tushar Dave
On 09/12/2018 09:51 AM, John Fastabend wrote: On 09/12/2018 09:21 AM, Tushar Dave wrote: On 09/11/2018 12:38 PM, Tushar Dave wrote: Helper bpg_msg_pull_data() can allocate multiple pages while linearizing multiple scatterlist elements into one shared page. However, if the shared page has s

Re: [PATCH net 0/2] nfp: flower: fixes for flower offload

2018-09-12 Thread David Miller
From: Jakub Kicinski Date: Tue, 11 Sep 2018 06:38:43 -0700 > Two fixes for flower matching and tunnel encap. Pieter fixes > VLAN matching if the entire VLAN id is masked out and match > is only performed on the PCP field. Louis adds validation of > tunnel flags for encap, most importantly we sh

Re: [PATCH net-next] nfp: report FW vNIC stats in interface stats

2018-09-12 Thread David Miller
From: Jakub Kicinski Date: Tue, 11 Sep 2018 06:44:08 -0700 > Report in standard netdev stats drops and errors as well as > RX multicast from the FW vNIC counters. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Simon Horman Applied, thank you.

[PATCH net] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags

2018-09-12 Thread Roopa Prabhu
From: Roopa Prabhu This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071 Commit 5025f7f7d506 wrongly relied on __dev_change_flags to notify users of dev flag changes in the case when dev->rtnl_link_state = RTNL_LINK_INITIALIZED. Fix it by indicating flag changes explicitly to __d

[PATCH bpf] bpf/verifier: disallow pointer subtraction

2018-09-12 Thread Alexei Starovoitov
Subtraction of pointers was accidentally allowed for unpriv programs by commit 82abbf8d2fc4. Revert that part of commit. Fixes: 82abbf8d2fc4 ("bpf: do not allow root to mangle valid pointers") Reported-by: Jann Horn Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov --- kernel/bpf/ver

Re: [PATCH bpf] bpf/verifier: disallow pointer subtraction

2018-09-12 Thread Daniel Borkmann
On 09/12/2018 11:06 PM, Alexei Starovoitov wrote: > Subtraction of pointers was accidentally allowed for unpriv programs > by commit 82abbf8d2fc4. Revert that part of commit. > > Fixes: 82abbf8d2fc4 ("bpf: do not allow root to mangle valid pointers") > Reported-by: Jann Horn > Acked-by: Daniel Bo

Re: [PATCH bpf] bpf: use __GFP_COMP while allocating page

2018-09-12 Thread Daniel Borkmann
On 09/12/2018 10:15 PM, Tushar Dave wrote: > Helper bpg_msg_pull_data() can allocate multiple pages while > linearizing multiple scatterlist elements into one shared page. > However, if the shared page has size > PAGE_SIZE, using > copy_page_to_iter() causes below warning. > > e.g. > [ 6367.019832

Re: [bpf-next, v2 1/3] flow_dissector: implements flow dissector BPF hook

2018-09-12 Thread Alexei Starovoitov
On Wed, Sep 12, 2018 at 02:43:37PM -0400, Willem de Bruijn wrote: > On Tue, Sep 11, 2018 at 11:47 PM Alexei Starovoitov > wrote: > > > > On Fri, Sep 07, 2018 at 05:11:08PM -0700, Petar Penkov wrote: > > > From: Petar Penkov > > > > > > Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR

Re: [PATCH bpf-next 4/4] tools/bpf: bpftool: add net support

2018-09-12 Thread Daniel Borkmann
On 09/06/2018 01:58 AM, Yonghong Song wrote: > Add "bpftool net" support. Networking devices are enumerated > to dump device index/name associated with xdp progs. > > For each networking device, tc classes and qdiscs are enumerated > in order to check their bpf filters. > In addition, root handle

Re: [PATCH bpf-next 4/4] tools/bpf: bpftool: add net support

2018-09-12 Thread Daniel Borkmann
On 09/13/2018 12:29 AM, Daniel Borkmann wrote: > On 09/06/2018 01:58 AM, Yonghong Song wrote: >> Add "bpftool net" support. Networking devices are enumerated >> to dump device index/name associated with xdp progs. >> >> For each networking device, tc classes and qdiscs are enumerated >> in order to

Re: [PATCH bpf-next 04/11] bpf: Add PTR_TO_SOCKET verifier type

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:33PM -0700, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer > --- > include/linux/bpf.h |

Re: [PATCH bpf-next 05/11] bpf: Macrofy stack state copy

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:34PM -0700, Joe Stringer wrote: > An upcoming commit will need very similar copy/realloc boilerplate, so > refactor the existing stack copy/realloc functions into macros to > simplify it. > > Signed-off-by: Joe Stringer Acked-by: Alexei Starovoitov

Re: [bpf-next, v2 1/3] flow_dissector: implements flow dissector BPF hook

2018-09-12 Thread Willem de Bruijn
On Wed, Sep 12, 2018 at 6:25 PM Alexei Starovoitov wrote: > > On Wed, Sep 12, 2018 at 02:43:37PM -0400, Willem de Bruijn wrote: > > On Tue, Sep 11, 2018 at 11:47 PM Alexei Starovoitov > > wrote: > > > > > > On Fri, Sep 07, 2018 at 05:11:08PM -0700, Petar Penkov wrote: > > > > From: Petar Penkov

Re: [PATCH bpf-next 06/11] bpf: Add reference tracking to verifier

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:35PM -0700, Joe Stringer wrote: > Allow helper functions to acquire a reference and return it into a > register. Specific pointer types such as the PTR_TO_SOCKET will > implicitly represent such a reference. The verifier must ensure that > these references are released

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Willem de Bruijn
On Wed, Sep 12, 2018 at 3:11 PM Willem de Bruijn wrote: > > On Wed, Sep 12, 2018 at 2:16 PM Florian Fainelli wrote: > > > > > > > > On 9/12/2018 11:07 AM, Willem de Bruijn wrote: > > > On Wed, Sep 12, 2018 at 1:42 PM Florian Fainelli > > > wrote: > > >> > > >> > > >> > > >> On 9/9/2018 3:44 PM,

[PATCH net-next RFC] virtio_net: ethtool tx napi configuration

2018-09-12 Thread Willem de Bruijn
From: Willem de Bruijn Implement ethtool .set_priv_flags and .get_priv_flags handlers and use ethtool private flags to toggle transmit napi: ethtool --set-priv-flags eth0 tx-napi on ethtool --show-priv-flags eth0 Link: https://patchwork.ozlabs.org/patch/948149/ Suggested-by: Jason Wang Sug

[PATCH iproute2] iproute2: fix use-after-free

2018-09-12 Thread Mahesh Bandewar
From: Mahesh Bandewar A local program using iproute2 lib pointed out the issue and looking at the code it is pretty obvious - a = (struct nlmsghdr *)b; ... free(b); if (a->nlmsg_seq == seq) ... Fixes: 86bf43c7c2fd ("lib/libnetlink: update rtnl_talk to support malloc buff at

Re: [PATCH bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:36PM -0700, Joe Stringer wrote: > This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and > bpf_sk_lookup_udp() which allows BPF programs to find out if there is a > socket listening on this host, and returns a socket pointer which the > BPF program can then

Re: [PATCH bpf-next 08/11] selftests/bpf: Add tests for reference tracking

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:37PM -0700, Joe Stringer wrote: > reference tracking: leak potential reference > reference tracking: leak potential reference on stack > reference tracking: leak potential reference on stack 2 > reference tracking: zero potential reference > reference tracking: copy an

Re: [PATCH bpf-next 09/11] libbpf: Support loading individual progs

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:38PM -0700, Joe Stringer wrote: > Allow the individual program load to be invoked. This will help with > testing, where a single ELF may contain several sections, some of which > denote subprograms that are expected to fail verification, along with > some which are exp

Re: [PATCH bpf-next 10/11] selftests/bpf: Add C tests for reference tracking

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:39PM -0700, Joe Stringer wrote: > Signed-off-by: Joe Stringer really nice set of tests. please describe them briefly in commit log. Acked-by: Alexei Starovoitov

Re: [PATCH bpf-next 11/11] Documentation: Describe bpf reference tracking

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:40PM -0700, Joe Stringer wrote: > Signed-off-by: Joe Stringer just few words in commit log would be better than nothing. Acked-by: Alexei Starovoitov

Re: [PATCH iproute2] iproute2: fix use-after-free

2018-09-12 Thread Stephen Hemminger
On Wed, 12 Sep 2018 16:29:28 -0700 Mahesh Bandewar wrote: > From: Mahesh Bandewar > > A local program using iproute2 lib pointed out the issue and looking > at the code it is pretty obvious - > > a = (struct nlmsghdr *)b; > ... > free(b); > if (a->nlmsg_seq == seq) > ... >

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-12 Thread Sowmini Varadhan
> On 09/11/2018 09:00 PM, Alexei Starovoitov wrote: > >please no samples. > >Add this as proper test to tools/testing/selftests/bpf > >that reports PASS/FAIL and can be run automatically. > >samples/bpf is effectively dead code. Just a second. You do realize that RDS is doing real networking, so

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-12 Thread Alexei Starovoitov
On Wed, Sep 12, 2018 at 08:59:54PM -0400, Sowmini Varadhan wrote: > > On 09/11/2018 09:00 PM, Alexei Starovoitov wrote: > > >please no samples. > > >Add this as proper test to tools/testing/selftests/bpf > > >that reports PASS/FAIL and can be run automatically. > > >samples/bpf is effectively dead

Re: [PATCH v3 net-next 00/12] Preparing for phylib limkmodes

2018-09-12 Thread David Miller
From: Andrew Lunn Date: Wed, 12 Sep 2018 01:53:07 +0200 > phylib currently makes us of a u32 bitmap for advertising, supported, > and link partner capabilities. For a long time, this has been > sufficient, for devices up to 1Gbps. With more MAC/PHY combinations > now supporting speeds greater tha

Re: [PATCH net-next] qlcnic: Remove set but not used variables 'fw_mbx' and 'hdr_size'

2018-09-12 Thread David Miller
From: YueHaibing Date: Tue, 11 Sep 2018 11:51:29 + > From: Yue Haibing > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c: In function > 'qlcnic_sriov_pull_bc_msg': > drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c:907:

Re: [PATCH] net: dsa: mv88e6xxx: Make sure to configure ports with external PHYs

2018-09-12 Thread David Miller
From: Marek Vasut Date: Wed, 12 Sep 2018 00:15:24 +0200 > The MV88E6xxx can have external PHYs attached to certain ports and those > PHYs could even be on different MDIO bus than the one within the switch. > This patch makes sure that ports with such PHYs are configured correctly > according to t

Re: [PATCH net] geneve: add ttl inherit support

2018-09-12 Thread David Miller
From: Hangbin Liu Date: Wed, 12 Sep 2018 10:04:21 +0800 > Similar with commit 72f6d71e491e6 ("vxlan: add ttl inherit support"), > currently ttl == 0 means "use whatever default value" on geneve instead > of inherit inner ttl. To respect compatibility with old behavior, let's > add a new IFLA_GENE

Re: [PATCH bpf-next 4/4] tools/bpf: bpftool: add net support

2018-09-12 Thread Yonghong Song
On 9/12/18 3:29 PM, Daniel Borkmann wrote: On 09/06/2018 01:58 AM, Yonghong Song wrote: Add "bpftool net" support. Networking devices are enumerated to dump device index/name associated with xdp progs. For each networking device, tc classes and qdiscs are enumerated in order to check their b

Re: [PATCH bpf-next 4/4] tools/bpf: bpftool: add net support

2018-09-12 Thread Yonghong Song
On 9/12/18 3:40 PM, Daniel Borkmann wrote: On 09/13/2018 12:29 AM, Daniel Borkmann wrote: On 09/06/2018 01:58 AM, Yonghong Song wrote: Add "bpftool net" support. Networking devices are enumerated to dump device index/name associated with xdp progs. For each networking device, tc classes and

Re: [PATCH iproute2] iproute2: fix use-after-free

2018-09-12 Thread महेश बंडेवार
On Wed, Sep 12, 2018 at 5:33 PM, Stephen Hemminger wrote: > > On Wed, 12 Sep 2018 16:29:28 -0700 > Mahesh Bandewar wrote: > > > From: Mahesh Bandewar > > > > A local program using iproute2 lib pointed out the issue and looking > > at the code it is pretty obvious - > > > > a = (struct nlmsgh