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

2018-09-13 Thread kbuild test robot
Hi Joe, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Joe-Stringer/Add-socket-lookup-support/20180914-134632 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: x

Re: mlx5 driver loading failing on v4.19 / net-next / bpf-next

2018-09-13 Thread Jesper Dangaard Brouer
On Thu, 13 Sep 2018 15:55:29 -0700 Alexei Starovoitov wrote: > On Thu, Aug 30, 2018 at 1:35 AM, Tariq Toukan wrote: > > > > > > On 29/08/2018 6:05 PM, Jesper Dangaard Brouer wrote: > >> > >> Hi Saeed, > >> > >> I'm having issues loading mlx5 driver on v4.19 kernels (tested both > >> net-next a

[PATCH net] net: diag: Fix swapped src/dst in udp_dump_one.

2018-09-13 Thread Lorenzo Colitti
Since its inception, udp_dump_one had has a bug where userspace needs to swap src and dst addresses and ports in order to find the socket it wants. This is because udp_dump_one misuses __udp[46]_lib_lookup by passing the source address as the source address argument. Unfortunately, those functions

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

2018-09-13 Thread Willem de Bruijn
On Thu, Sep 13, 2018 at 11:53 PM Jason Wang wrote: > > > > On 2018年09月14日 11:40, Willem de Bruijn wrote: > > On Thu, Sep 13, 2018 at 11:27 PM Jason Wang wrote: > >> > >> > >> On 2018年09月13日 22:58, Willem de Bruijn wrote: > >>> On Thu, Sep 13, 2018 at 5:02 AM Jason Wang wrote: > > On 20

Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread Benjamin Poirier
On 2018/09/13 15:31, Jesse Brandeburg wrote: [...] > > --- > v1: initial RFC > > Jesse Brandeburg (14): > intel-ethernet: rename i40evf to iavf Seems like patch 1 didn't make it to netdev https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20180910/014025.html > iavf: diet and re

[PATCH net] veth: Orphan skb before GRO

2018-09-13 Thread Toshiaki Makita
GRO expects skbs not to be owned by sockets, but when XDP is enabled veth passed skbs owned by sockets. It caused corrupted sk_wmem_alloc. Paolo Abeni reported the following splat: [ 362.098904] refcount_t overflow at skb_set_owner_w+0x5e/0xa0 in iperf3[1644], uid/euid: 0/0 [ 362.108239] WARNI

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

2018-09-13 Thread Vasundhara Volam
On Wed, Sep 12, 2018 at 3:20 PM Jakub Kicinski wrote: > > 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 d

Re: [PATCH net] net/ipv6: do not copy DST_NOCOUNT flag on rt init

2018-09-13 Thread David Ahern
On 9/13/18 1:38 PM, Peter Oskolkov wrote: > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > index 3eed045c65a5..a3902f805305 100644 > --- a/net/ipv6/route.c > +++ b/net/ipv6/route.c > @@ -946,7 +946,7 @@ static void ip6_rt_init_dst_reject(struct rt6_info *rt, > struct fib6_info *ort) > > st

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

2018-09-13 Thread Jason Wang
On 2018年09月14日 11:40, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 11:27 PM Jason Wang wrote: On 2018年09月13日 22:58, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 5:02 AM Jason Wang wrote: On 2018年09月13日 07:27, Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 3:11 PM Willem de Brui

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

2018-09-13 Thread Willem de Bruijn
On Thu, Sep 13, 2018 at 11:27 PM Jason Wang wrote: > > > > On 2018年09月13日 22:58, Willem de Bruijn wrote: > > On Thu, Sep 13, 2018 at 5:02 AM Jason Wang wrote: > >> > >> > >> On 2018年09月13日 07:27, Willem de Bruijn wrote: > >>> On Wed, Sep 12, 2018 at 3:11 PM Willem de Bruijn > >>> wrote: > O

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

2018-09-13 Thread Jason Wang
On 2018年09月13日 22:58, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 5:02 AM Jason Wang wrote: On 2018年09月13日 07:27, Willem de Bruijn wrote: 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

Re: unexpected GRO/veth behavior

2018-09-13 Thread Toshiaki Makita
On 2018/09/11 20:07, Toshiaki Makita wrote: > On 2018/09/11 19:27, Eric Dumazet wrote: > ... >> Fix would probably be : >> >> diff --git a/drivers/net/veth.c b/drivers/net/veth.c >> index >> 8d679c8b7f25c753d77cfb8821d9d2528c9c9048..96bd94480942b469403abf017f9f9d5be1e23ef5 >> 100644 >> --- a/driv

Re: [PATCH stable 4.4 0/9] fix SegmentSmack in stable branch (CVE-2018-5390)

2018-09-13 Thread maowenan
On 2018/9/13 20:44, Eric Dumazet wrote: > On Thu, Sep 13, 2018 at 5:32 AM Greg KH wrote: >> >> On Thu, Aug 16, 2018 at 05:24:09PM +0200, Greg KH wrote: >>> On Thu, Aug 16, 2018 at 02:33:56PM +0200, Michal Kubecek wrote: On Thu, Aug 16, 2018 at 08:05:50PM +0800, maowenan wrote: > On 201

[iproute2,RFC PATCH] tc: range: Introduce TC range classifier

2018-09-13 Thread Amritha Nambiar
Range classifier is introduced to support filters based on ranges. Only port-range filters are supported currently. This can be combined with flower classifier to support a combination of port-ranges and other parameters based on existing fields supported by cls_flower. Example: 1. Match on a port

[net-next, RFC PATCH] net: sched: cls_range: Introduce Range classifier

2018-09-13 Thread Amritha Nambiar
This patch introduces a range classifier to support filtering based on ranges. Only port-range filters are supported currently. This can be combined with flower classifier to support filters that are a combination of port-ranges and other parameters based on existing fields supported by cls_flower.

[net-next,RFC PATCH] Introduce TC Range classifier

2018-09-13 Thread Amritha Nambiar
This patch introduces a TC range classifier to support filtering based on ranges. Only port-range filters are supported currently. This can be combined with flower classifier to support filters that are a combination of port-ranges and other parameters based on existing fields supported by cls_flow

Re: [PATCH net v2] bonding: pass link-local packets to bonding master also.

2018-09-13 Thread महेश बंडेवार
On Thu, Sep 13, 2018 at 4:00 PM, Michal Soltys wrote: > On 2018-07-19 18:20, Michal Soltys wrote: >> On 07/19/2018 01:41 AM, Mahesh Bandewar wrote: >>> From: Mahesh Bandewar >>> >>> Commit b89f04c61efe ("bonding: deliver link-local packets with >>> skb->dev set to link that packets arrived on") c

Re: [PATCH net v2] bonding: pass link-local packets to bonding master also.

2018-09-13 Thread Michal Soltys
On 2018-07-19 18:20, Michal Soltys wrote: > On 07/19/2018 01:41 AM, Mahesh Bandewar wrote: >> From: Mahesh Bandewar >> >> Commit b89f04c61efe ("bonding: deliver link-local packets with >> skb->dev set to link that packets arrived on") changed the behavior >> of how link-local-multicast packets are

Re: [PATCH v2] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread David Miller
From: Johannes Berg Date: Thu, 13 Sep 2018 14:40:55 +0200 > From: Johannes Berg > > As reported by Reobert O'Callahan, since Viro's commit to kill > dev_ifsioc() we attempt to copy too much data in compat mode, > which may lead to EFAULT when the 32-bit version of struct ifreq > sits at/near th

Re: mlx5 driver loading failing on v4.19 / net-next / bpf-next

2018-09-13 Thread Alexei Starovoitov
On Thu, Aug 30, 2018 at 1:35 AM, Tariq Toukan wrote: > > > On 29/08/2018 6:05 PM, Jesper Dangaard Brouer wrote: >> >> Hi Saeed, >> >> I'm having issues loading mlx5 driver on v4.19 kernels (tested both >> net-next and bpf-next), while kernel v4.18 seems to work. It happens >> with a Mellanox Conn

Re: [PATCH] socket: fix struct ifreq size in compat ioctl

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

Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread David Miller
From: Jesse Brandeburg Date: Thu, 13 Sep 2018 15:31:30 -0700 > This series contains changes to i40evf so that it becomes a more > generic virtual function driver for current and future silicon. > > While doing the rename of i40evf to a more generic name of iavf, > we also put the driver on a sev

[RFC PATCH net-next v1 14/14] intel-ethernet: use correct module license

2018-09-13 Thread Jesse Brandeburg
We recently updated all our SPDX identifiers to correctly indicate our net/ethernet/intel/* drivers were always released and intended to be released under GPL v2, but the MODULE_LICENSE declaration was never updated. Fix the MODULE_LICENSE to be GPL v2, for all our drivers. Signed-off-by: Jesse B

[RFC PATCH net-next v1 10/14] iavf: replace i40e_debug with iavf version

2018-09-13 Thread Jesse Brandeburg
Change another string (i40e_debug) Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c| 28 drivers/net/ethernet/intel/iavf/i40e_common.c| 12 +- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/

[RFC PATCH net-next v1 13/14] iavf: finish renaming files to iavf

2018-09-13 Thread Jesse Brandeburg
This finishes the process of renaming the files that make sense to rename (skipping adminq related files that talk to i40e) and fixes up the build and the #includes so that everything builds nicely. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/Makefile

[RFC PATCH net-next v1 09/14] iavf: rename i40e_hw to iavf_hw

2018-09-13 Thread Jesse Brandeburg
Fix up the i40e_hw names to new name, including versions inside other strings. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c| 42 +++ drivers/net/ethernet/intel/iavf/i40e_alloc.h | 21 +++- drivers/net/ethernet/intel/iavf/i40e_common.c

Re: [PATCH net-next] pktgen: Fix fall-through annotation

2018-09-13 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 13 Sep 2018 14:03:20 -0500 > Replace "fallthru" with a proper "fall through" annotation. > > This fix is part of the ongoing efforts to enabling > -Wimplicit-fallthrough > > Signed-off-by: Gustavo A. R. Silva Applied.

[RFC PATCH net-next v1 04/14] iavf: rename i40e_status to iavf_status

2018-09-13 Thread Jesse Brandeburg
This is just a rename of an internal variable i40e_status, but it was a pretty big change and so deserved it's own patch. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 94 +- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 8 +- dr

[RFC PATCH net-next v1 11/14] iavf: tracing infrastructure rename

2018-09-13 Thread Jesse Brandeburg
Rename the i40e_trace file and fix up all the callers to the new names inside the iavf_trace.h file. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/iavf_main.c| 2 +- .../intel/iavf/{i40e_trace.h => iavf_trace.h} | 28 +++--- drivers/net/etherne

[RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread Jesse Brandeburg
This series contains changes to i40evf so that it becomes a more generic virtual function driver for current and future silicon. While doing the rename of i40evf to a more generic name of iavf, we also put the driver on a severe diet due to how much of the code was unneeded or was unused. The out

[RFC PATCH net-next v1 06/14] iavf: remove references to old names

2018-09-13 Thread Jesse Brandeburg
Remove the register name references to I40E_VF* and change to IAVF_VF. Update the descriptor names and defines to the IAVF name. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28 ++-- drivers/net/ethernet/intel/iavf/i40e_common.c | 2 +- drivers/net/e

[RFC PATCH net-next v1 08/14] iavf: rename I40E_ADMINQ_DESC

2018-09-13 Thread Jesse Brandeburg
Take care of some renames containing I40E_ADMINQ_DESC. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 18 +- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/

[RFC PATCH net-next v1 02/14] iavf: diet and reformat

2018-09-13 Thread Jesse Brandeburg
Remove a bunch of unused code and reformat a few lines. Also remove some now un-necessary files. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 27 - drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h | 2276 + drivers/net/ethernet/in

[RFC PATCH net-next v1 05/14] iavf: move i40evf files to new name

2018-09-13 Thread Jesse Brandeburg
Simply move the i40evf files to the new name, updating the #includes to track the new names, and updating the Makefile as well. A future patch will remove the i40e references (after the code removal patches later in this series). Signed-off-by: Jesse Brandeburg --- v3: renamed more files after r

[RFC PATCH net-next v1 07/14] iavf: rename device ID defines

2018-09-13 Thread Jesse Brandeburg
Rename the device ID defines to have IAVF in them and remove all the unused defines. Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 22 +++ drivers/net/ethernet/intel/iavf/i40e_common.c | 29 +++ drivers/net/ethernet/intel/iavf/i40

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

2018-09-13 Thread Alexei Starovoitov
On Thu, Sep 13, 2018 at 02:24:03PM -0700, Joe Stringer wrote: > On Thu, 13 Sep 2018 at 14:22, Alexei Starovoitov > wrote: > > > > On Thu, Sep 13, 2018 at 02:17:17PM -0700, Joe Stringer wrote: > > > On Thu, 13 Sep 2018 at 14:02, Alexei Starovoitov > > > wrote: > > > > > > > > On Thu, Sep 13, 2018

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Tobin C. Harding
On Thu, Sep 13, 2018 at 02:58:52PM +0300, Eran Ben Elisha wrote: > > > On 9/13/2018 1:27 PM, Tobin C. Harding wrote: > > On Thu, Sep 13, 2018 at 11:18:16AM +0300, Eran Ben Elisha wrote: > > > Add devlink-health man page. Devlink-health tool will control device > > > health attributes, sensors, ac

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

2018-09-13 Thread Joe Stringer
On Thu, 13 Sep 2018 at 14:22, Alexei Starovoitov wrote: > > On Thu, Sep 13, 2018 at 02:17:17PM -0700, Joe Stringer wrote: > > On Thu, 13 Sep 2018 at 14:02, Alexei Starovoitov > > wrote: > > > > > > On Thu, Sep 13, 2018 at 01:55:01PM -0700, Joe Stringer wrote: > > > > On Thu, 13 Sep 2018 at 12:06,

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

2018-09-13 Thread Alexei Starovoitov
On Thu, Sep 13, 2018 at 02:17:17PM -0700, Joe Stringer wrote: > On Thu, 13 Sep 2018 at 14:02, Alexei Starovoitov > wrote: > > > > On Thu, Sep 13, 2018 at 01:55:01PM -0700, Joe Stringer wrote: > > > On Thu, 13 Sep 2018 at 12:06, Alexei Starovoitov > > > wrote: > > > > > > > > On Wed, Sep 12, 2018

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

2018-09-13 Thread Joe Stringer
On Thu, 13 Sep 2018 at 14:02, Alexei Starovoitov wrote: > > On Thu, Sep 13, 2018 at 01:55:01PM -0700, Joe Stringer wrote: > > On Thu, 13 Sep 2018 at 12:06, Alexei Starovoitov > > wrote: > > > > > > On Wed, Sep 12, 2018 at 5:06 PM, Alexei Starovoitov > > > wrote: > > > > On Tue, Sep 11, 2018 at 0

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

2018-09-13 Thread Alexei Starovoitov
On Thu, Sep 13, 2018 at 01:55:01PM -0700, Joe Stringer wrote: > On Thu, 13 Sep 2018 at 12:06, Alexei Starovoitov > wrote: > > > > On Wed, Sep 12, 2018 at 5:06 PM, Alexei Starovoitov > > wrote: > > > On Tue, Sep 11, 2018 at 05:36:36PM -0700, Joe Stringer wrote: > > >> This patch adds new BPF helpe

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

2018-09-13 Thread Willem de Bruijn
On Thu, Sep 13, 2018 at 4:57 PM Alexei Starovoitov wrote: > > On Thu, Sep 13, 2018 at 04:51:49PM -0400, Willem de Bruijn wrote: > > On Thu, Sep 13, 2018 at 3:45 PM Alexei Starovoitov > > wrote: > > > > > > On Thu, Sep 13, 2018 at 10:45:53AM -0700, Petar Penkov wrote: > > > > From: Petar Penkov >

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

2018-09-13 Thread Joe Stringer
On Thu, 13 Sep 2018 at 13:55, Joe Stringer wrote: > struct bpf_sock_tuple4 { > __be32 saddr; > __be32 daddr; > __be16 sport; > __be16 dport; > __u8 family; > }; > > struct bpf_sock_tuple6 { > __be32 saddr[4]; > __be32 daddr[4]; > __be16 sport; >

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

2018-09-13 Thread Alexei Starovoitov
On Thu, Sep 13, 2018 at 04:51:49PM -0400, Willem de Bruijn wrote: > On Thu, Sep 13, 2018 at 3:45 PM Alexei Starovoitov > wrote: > > > > On Thu, Sep 13, 2018 at 10:45:53AM -0700, Petar Penkov wrote: > > > From: Petar Penkov > > > > > > Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR

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

2018-09-13 Thread Joe Stringer
On Wed, 12 Sep 2018 at 17:13, Alexei Starovoitov wrote: > > 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 Ack, thanks for the review!

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

2018-09-13 Thread Joe Stringer
On Wed, 12 Sep 2018 at 17:11, Alexei Starovoitov wrote: > > 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 Ack, will do.

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

2018-09-13 Thread Joe Stringer
On Thu, 13 Sep 2018 at 12:06, Alexei Starovoitov wrote: > > On Wed, Sep 12, 2018 at 5:06 PM, Alexei Starovoitov > wrote: > > 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 B

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

2018-09-13 Thread Willem de Bruijn
On Thu, Sep 13, 2018 at 3:45 PM Alexei Starovoitov wrote: > > On Thu, Sep 13, 2018 at 10:45:53AM -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 >

[PATCH net] net/ipv6: do not copy DST_NOCOUNT flag on rt init

2018-09-13 Thread Peter Oskolkov
DST_NOCOUNT in dst_entry::flags tracks whether the entry counts toward route cache size (net->ipv6.sysctl.ip6_rt_max_size). If the flag is NOT set, dst_ops::pcpuc_entries counter is incremented in dist_init() and decremented in dst_destroy(). This flag is tied to allocation/deallocation of dst_en

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

2018-09-13 Thread Alexei Starovoitov
On Thu, Sep 13, 2018 at 10:45:53AM -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 > path. The BPF program is per-network namespace. > > Signed-off-by: Pe

[PATCH iproute2] libnetlink: fix leak and using unused memory on error

2018-09-13 Thread Stephen Hemminger
If an error happens in multi-segment message (tc only) then report the error and stop processing further responses. This also fixes refering to the buffer after free. The sequence check is not necessary here because the response message has already been validated to be in the window of the sequenc

Re: pull request: bluetooth 2018-09-13

2018-09-13 Thread David Miller
From: Johan Hedberg Date: Thu, 13 Sep 2018 12:45:51 +0300 > A few Bluetooth fixes for the 4.19-rc series: > > - Fixed rw_semaphore leak in hci_ldisc > - Fixed local Out-of-Band pairing data handling > > Let me know if there are any issues pulling. Thanks. Pulled, thanks Johan.

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

2018-09-13 Thread Alexei Starovoitov
On Wed, Sep 12, 2018 at 5:06 PM, Alexei Starovoitov wrote: > 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 hos

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

2018-09-13 Thread David Miller
From: Sabrina Dubroca Date: Wed, 12 Sep 2018 17:44:40 +0200 > 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 >

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

2018-09-13 Thread Joe Stringer
On Wed, 12 Sep 2018 at 16:17, Alexei Starovoitov wrote: > > On Tue, Sep 11, 2018 at 05:36:35PM -0700, Joe Stringer wrote: > > ... > > + > > +/* release function corresponding to acquire_reference_state(). > > Idempotent. */ > > +static int __release_reference_state(struct bpf_func_state *state, i

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

2018-09-13 Thread Joe Stringer
On Wed, 12 Sep 2018 at 15:50, Alexei Starovoitov wrote: > > On Tue, Sep 11, 2018 at 05:36:33PM -0700, Joe Stringer wrote: > > ... > > +static bool reg_type_mismatch(enum bpf_reg_type src, enum bpf_reg_type > > prev) > > +{ > > + return src != prev && (!reg_type_mismatch_ok(src) || > > +

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

2018-09-13 Thread David Miller
From: Roopa Prabhu Date: Wed, 12 Sep 2018 13:21:48 -0700 > 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 = >

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

2018-09-13 Thread महेश बंडेवार
On Thu, Sep 13, 2018 at 8:19 AM, Stephen Hemminger wrote: > > On Wed, 12 Sep 2018 23:07:20 -0700 > Mahesh Bandewar (महेश बंडेवार) wrote: > > > On Wed, Sep 12, 2018 at 5:33 PM, Stephen Hemminger > > wrote: > > > > > > On Wed, 12 Sep 2018 16:29:28 -0700 > > > Mahesh Bandewar wrote: > > > > > > >

Re: [PATCH net-next v3 1/2] netlink: ipv4 igmp join notifications

2018-09-13 Thread Patrick Ruddy
On Thu, 2018-09-13 at 10:03 -0700, Roopa Prabhu wrote: > On Thu, Sep 6, 2018 at 8:40 PM, Roopa Prabhu > wrote: > > On Thu, Sep 6, 2018 at 2:10 AM, Patrick Ruddy > > wrote: > > > Some userspace applications need to know about IGMP joins from the > > > kernel for 2 reasons: > > > 1. To allow the p

[bpf-next, v3 0/5] Introduce eBPF flow dissector

2018-09-13 Thread Petar Penkov
From: Petar Penkov This patch series hardens the RX stack by allowing flow dissection in BPF, as previously discussed [1]. Because of the rigorous checks of the BPF verifier, this provides significant security guarantees. In particular, the BPF flow dissector cannot get inside of an infinite loop

[bpf-next, v3 2/5] bpf: sync bpf.h uapi with tools/

2018-09-13 Thread Petar Penkov
From: Petar Penkov This patch syncs tools/include/uapi/linux/bpf.h with the flow dissector definitions from include/uapi/linux/bpf.h Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- tools/include/uapi/linux/bpf.h | 26 ++ 1 file changed, 26 insertions(+)

[bpf-next, v3 3/5] bpf: support flow dissector in libbpf and bpftool

2018-09-13 Thread Petar Penkov
From: Petar Penkov This patch extends libbpf and bpftool to work with programs of type BPF_PROG_TYPE_FLOW_DISSECTOR. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- tools/bpf/bpftool/prog.c | 1 + tools/lib/bpf/libbpf.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/

[bpf-next, v3 5/5] selftests/bpf: test bpf flow dissection

2018-09-13 Thread Petar Penkov
From: Petar Penkov Adds a test that sends different types of packets over multiple tunnels and verifies that valid packets are dissected correctly. To do so, a tc-flower rule is added to drop packets on UDP src port 9, and packets are sent from ports 8, 9, and 10. Only the packets on port 9 shou

[bpf-next, v3 4/5] flow_dissector: implements eBPF parser

2018-09-13 Thread Petar Penkov
From: Petar Penkov This eBPF program extracts basic/control/ip address/ports keys from incoming packets. It supports recursive parsing for IP encapsulation, and VLAN, along with IPv4/IPv6 and extension headers. This program is meant to show how flow dissection and key extraction can be done in e

[bpf-next, v3 1/5] flow_dissector: implements flow dissector BPF hook

2018-09-13 Thread Petar Penkov
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 path. The BPF program is per-network namespace. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- include/linux/bpf.h

Re: [RFC PATCH iproute2-next] System specification health API

2018-09-13 Thread Jakub Kicinski
On Thu, 13 Sep 2018 11:18:15 +0300, Eran Ben Elisha wrote: > The health spec is targeted for Real Time Alerting, in order to know when > something bad had happened to a PCI device By spec you mean some standards body spec you implement or this proposal is a spec? > - Provide alert debug informati

Re: [PATCH] hv_netvsc: fix schedule in RCU context

2018-09-13 Thread David Miller
From: Stephen Hemminger Date: Thu, 13 Sep 2018 08:03:43 -0700 > When netvsc device is removed it can call reschedule in RCU context. > This happens because canceling the subchannel setup work could (in theory) > cause a reschedule when manipulating the timer. > > To reproduce, run with lockdep e

[PATCH net-next 1/2] net/sched: act_police: use per-cpu counters

2018-09-13 Thread Davide Caratti
use per-CPU counters, instead of sharing a single set of stats with all cores. This removes the need of using spinlock when statistics are read or updated. Signed-off-by: Davide Caratti --- net/sched/act_police.c | 46 -- 1 file changed, 22 insertions(+),

[PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-09-13 Thread Davide Caratti
use RCU instead of spinlocks, to protect concurrent read/write on act_police configuration. This reduces the effects of contention in the data path, in case multiple readers are present. Signed-off-by: Davide Caratti --- net/sched/act_police.c | 156 - 1 f

[PATCH net-next 0/2] net/sched: act_police: lockless data path

2018-09-13 Thread Davide Caratti
the data path of 'police' action can be faster if we avoid using spinlocks: - patch 1 converts act_police to use per-cpu counters - patch 2 lets act_police use RCU to access its configuration data. test procedure (using pktgen from https://github.com/netoptimizer): # ip link add name eth1 type

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

2018-09-13 Thread Cong Wang
On Wed, Sep 12, 2018 at 1:24 AM Vlad Buslov wrote: > > > 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 takin

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

2018-09-13 Thread Cong Wang
On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote: > > > 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 a

Re: [PATCH net-next v3 1/2] netlink: ipv4 igmp join notifications

2018-09-13 Thread Roopa Prabhu
On Thu, Sep 6, 2018 at 8:40 PM, Roopa Prabhu wrote: > On Thu, Sep 6, 2018 at 2:10 AM, Patrick Ruddy > wrote: >> Some userspace applications need to know about IGMP joins from the >> kernel for 2 reasons: >> 1. To allow the programming of multicast MAC filters in hardware >> 2. To form a multicast

Re: What is the best forum (mailing list, irc etc) to ask questions about the usage of AF_XDP sockets.

2018-09-13 Thread Jakub Kicinski
On Thu, 13 Sep 2018 18:31:55 +0200, Konrad Djimeli wrote: > Hello, > > I have been working on trying to make use of AF_XDP sockets as part of a > project I working on, and I have been facing some issues but I am not > sure where to ask questions related to the usage of AF_XDP, since this > is a de

Re: [PATCH v4 0/3] IB/ipoib: Use dev_port to disambiguate port numbers

2018-09-13 Thread Doug Ledford
On Thu, 2018-09-06 at 17:51 +0300, Arseny Maslennikov wrote: > Pre-3.15 userspace had trouble distinguishing different ports > of a NIC on a single PCI bus/device/function. To solve this, > a sysfs field `dev_port' was introduced quite a while ago > (commit v3.14-rc3-739-g3f85944fe207), and some re

What is the best forum (mailing list, irc etc) to ask questions about the usage of AF_XDP sockets.

2018-09-13 Thread Konrad Djimeli
Hello, I have been working on trying to make use of AF_XDP sockets as part of a project I working on, and I have been facing some issues but I am not sure where to ask questions related to the usage of AF_XDP, since this is a development mailing list. Thanks Konrad www.djimeli.me

Re: [Patch net] net_sched: notify filter deletion when deleting a chain

2018-09-13 Thread David Miller
From: Cong Wang Date: Tue, 11 Sep 2018 14:22:23 -0700 > When we delete a chain of filters, we need to notify > user-space we are deleting each filters in this chain > too. > > Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") > Cc: Jiri Pirko > Signed-off-by: Cong Wang Applie

Re: [Patch net-next] llc: avoid blocking in llc_sap_close()

2018-09-13 Thread David Miller
From: Cong Wang Date: Tue, 11 Sep 2018 11:42:06 -0700 > llc_sap_close() is called by llc_sap_put() which > could be called in BH context in llc_rcv(). We can't > block in BH. > > There is no reason to block it here, kfree_rcu() should > be sufficient. > > Signed-off-by: Cong Wang Applied, tha

Re: [PATCH v4 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-13 Thread Doug Ledford
On Sun, 2018-09-09 at 23:55 +0300, Arseny Maslennikov wrote: > On Sun, Sep 09, 2018 at 09:11:46PM +0300, Arseny Maslennikov wrote: > > On Fri, Sep 07, 2018 at 09:43:59AM -0600, Jason Gunthorpe wrote: > > > On Thu, Sep 06, 2018 at 05:51:12PM +0300, Arseny Maslennikov wrote: > > > > Some tools may cu

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

2018-09-13 Thread Ilias Apalodimas
On Thu, Sep 13, 2018 at 04:32:06PM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:29:15 +0300 > Ilias Apalodimas wrote: > > > 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: > > > > >

RE: [PATCH] hv_netvsc: fix schedule in RCU context

2018-09-13 Thread Haiyang Zhang
> -Original Message- > From: Stephen Hemminger > Sent: Thursday, September 13, 2018 11:04 AM > To: KY Srinivasan ; Haiyang Zhang > > Cc: netdev@vger.kernel.org; Stephen Hemminger > Subject: [PATCH] hv_netvsc: fix schedule in RCU context > > When netvsc device is removed it can call r

Re: [PATCHv2 net] ipv6: use rt6_info members when dst is set in rt6_fill_node

2018-09-13 Thread David Miller
From: Xin Long Date: Tue, 11 Sep 2018 14:33:58 +0800 > In inet6_rtm_getroute, since Commit 93531c674315 ("net/ipv6: separate > handling of FIB entries from dst based routes"), it has used rt->from > to dump route info instead of rt. > > However for some route like cache, some of its information

Re: [PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang, Dongsheng
On 9/13/2018 8:42 PM, Andrew Lunn wrote: > On Thu, Sep 13, 2018 at 05:04:53PM +0800, Wang Dongsheng wrote: >> Share the mii_bus for others MAC device because QDF2400 emac >> include MDIO, and the motherboard has more than one PHY connected >> to an MDIO bus. >> >> Tested: QDF2400 (ACPI), buildin/in

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

2018-09-13 Thread Stephen Hemminger
On Wed, 12 Sep 2018 23:07:20 -0700 Mahesh Bandewar (महेश बंडेवार) wrote: > 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

Re: [PATCH v3 net-next 0/6] Add support for Lantiq / Intel vrx200 network

2018-09-13 Thread David Miller
From: Hauke Mehrtens Date: Sun, 9 Sep 2018 22:16:41 +0200 > This adds basic support for the GSWIP (Gigabit Switch) found in the > VRX200 SoC. > There are different versions of this IP core used in different SoCs, but > this driver was currently only tested on the VRX200 SoC line, for other > SoC

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Andrew Lunn
> devlink health sensor set pci/:01:00.0 name TX_COMP_ERROR > action reset off action dump on > Sets TX_COMP_ERROR sensor parameters for a specific device. > >>This is what I had in mind: > >>1. command interface error > >>2. command interface timeout > >>3. s

[PATCH] hv_netvsc: fix schedule in RCU context

2018-09-13 Thread Stephen Hemminger
When netvsc device is removed it can call reschedule in RCU context. This happens because canceling the subchannel setup work could (in theory) cause a reschedule when manipulating the timer. To reproduce, run with lockdep enabled kernel and unbind a network device from hv_netvsc (via sysfs). [

Re: [PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Timur Tabi
On 9/13/18 7:42 AM, Andrew Lunn wrote: This is a pretty big patch, and is hard to review. Could you try to break it up into a number of smaller patches. You could for example first refactor emacs_phy_config(), without making any functional changes. Then add the sharing. Maybe do OF an ACPI in dif

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

2018-09-13 Thread Willem de Bruijn
> > +static u32 virtnet_get_priv_flags(struct net_device *dev) > > +{ > > + struct virtnet_info *vi = netdev_priv(dev); > > + int priv_flags = 0; > > + > > + if (vi->sq[0].napi.weight) > > + priv_flags |= 0x1; > > + > > + return priv_flags; > > +} > > Why the use of priv

[PATCH v3 09/30] inet: frags: use rhashtables for reassembly units

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Some applications still rely on IP fragmentation, and to be fair linux reassembly unit is not working under any serious load. It uses static hash tables of 1024 buckets, and up to 128 items per bucket (!!!) A work queue is supposed to garbage collect items when host is under

[PATCH v3 08/30] rhashtable: add schedule points

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Rehashing and destroying large hash table takes a lot of time, and happens in process context. It is safe to add cond_resched() in rhashtable_rehash_table() and rhashtable_free_and_destroy() Signed-off-by: Eric Dumazet Acked-by: Herbert Xu Signed-off-by: David S. Miller (ch

[PATCH v3 18/30] inet: frags: get rid of ipfrag_skb_cb/FRAG_CB

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet ip_defrag uses skb->cb[] to store the fragment offset, and unfortunately this integer is currently in a different cache line than skb->next, meaning that we use two cache lines per skb when finding the insertion point. By aliasing skb->ip_defrag_offset and skb->dev, we pack al

[PATCH v3 14/30] inet: frags: do not clone skb in ip_expire()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet An skb_clone() was added in commit ec4fbd64751d ("inet: frag: release spinlock before calling icmp_send()") While fixing the bug at that time, it also added a very high cost for DDOS frags, as the ICMP rate limit is applied after this expensive operation (skb_clone() + consume

[PATCH v3 02/30] inet: frags: add a pointer to struct netns_frags

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet In order to simplify the API, add a pointer to struct inet_frags. This will allow us to make things less complex. These functions no longer have a struct inet_frags parameter : inet_frag_destroy(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_put(struct inet

[PATCH v3 22/30] net: modify skb_rbtree_purge to return the truesize of all purged skbs.

2018-09-13 Thread Stephen Hemminger
From: Peter Oskolkov Tested: see the next patch is the series. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: Eric Dumazet Cc: Florian Westphal Signed-off-by: David S. Miller (cherry picked from commit 385114dec8a49b5e5945e77ba7de6356106713f4) --- include/linux/skb

[PATCH v3 19/30] inet: frags: fix ip6frag_low_thresh boundary

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Giving an integer to proc_doulongvec_minmax() is dangerous on 64bit arches, since linker might place next to it a non zero value preventing a change to ip6frag_low_thresh. ip6frag_low_thresh is not used anymore in the kernel, but we do not want to prematuraly break user script

[PATCH v3 12/30] inet: frags: remove inet_frag_maybe_warn_overflow()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 2d44ed22e607f9a285b049de2263e3840673a260) --- include/net/inet_frag.h | 2 -- net/ieee802154/6lowpan/r

[PATCH v3 04/30] inet: frags: Convert timers to use timer_setup()

2018-09-13 Thread Stephen Hemminger
From: Kees Cook In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Alexander Aring Cc: Stefan Schmidt Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc:

[PATCH v3 23/30] ipv6: defrag: drop non-last frags smaller than min mtu

2018-09-13 Thread Stephen Hemminger
From: Florian Westphal don't bother with pathological cases, they only waste cycles. IPv6 requires a minimum MTU of 1280 so we should never see fragments smaller than this (except last frag). v3: don't use awkward "-offset + len" v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68).

[PATCH v3 25/30] net: add rb_to_skb() and other rb tree helpers

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Geeralize private netem_rb_to_skb() TCP rtx queue will soon be converted to rb-tree, so we will need skb_rbtree_walk() helpers. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 18a4c0eab2623cc95be98a1e6af1ad18e7695977) --- include/linux

  1   2   >