[PATCH REPOST v5 iproute2 1/8] utils: Move BIT macro to common header

2017-08-16 Thread Leon Romanovsky
BIT() macro was implemented and used by devlink for now, but following patches of rdmatool will reuse the same macro, so put it in common header file. Signed-off-by: Leon Romanovsky --- devlink/devlink.c | 2 +- include/utils.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --gi

[PATCH REPOST v5 iproute2 4/8] rdma: Add link object

2017-08-16 Thread Leon Romanovsky
Link (port) object represent struct ib_port to the user space. Link properties: * Port capabilities * IB subnet prefix * LID, SM_LID and LMC * Port state * Physical state Signed-off-by: Leon Romanovsky --- rdma/Makefile | 2 +- rdma/link.c | 277

[PATCH REPOST v5 iproute2 8/8] rdma: Add initial manual for the tool

2017-08-16 Thread Leon Romanovsky
Signed-off-by: Leon Romanovsky --- man/man8/rdma-dev.8 | 55 +++ man/man8/rdma-link.8 | 55 +++ man/man8/rdma.8 | 102 +++ 3 files changed, 212 insertions(+) create mode 100644 man/man8/rdma-d

[PATCH REPOST v5 iproute2 7/8] rdma: Add json output to link object

2017-08-16 Thread Leon Romanovsky
An example for the JSON output for two devices system. root@mtr-leonro:~# rdma link -d -p -j [{ "ifindex": 1, "port": 1, "ifname": "mlx5_0/1", "subnet_prefix": "fe80:::", "lid": 13399, "sm_lid": 49151, "lmc": 0, "state": "

[PATCH REPOST v5 iproute2 6/8] rdma: Implement json output for dev object

2017-08-16 Thread Leon Romanovsky
The example output for machine with two devices root@mtr-leonro:~# rdma dev -j -p [{ "ifindex": 1, "ifname": "mlx5_0", "node_type": "ca", "fw": "2.8.", "node_guid": "5254:00c0:fe12:3457", "sys_image_guid": 5254:00c0:fe12:3457", "caps": [

[PATCH REPOST v5 iproute2 5/8] rdma: Add json and pretty outputs

2017-08-16 Thread Leon Romanovsky
Signed-off-by: Leon Romanovsky --- rdma/rdma.c | 31 --- rdma/rdma.h | 4 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/rdma/rdma.c b/rdma/rdma.c index 74c09e8b..f9f4f2a2 100644 --- a/rdma/rdma.c +++ b/rdma/rdma.c @@ -16,7 +16,7 @@ static void h

[PATCH REPOST v5 iproute2 0/8] RDMAtool

2017-08-16 Thread Leon Romanovsky
This is fifth revision of series implementing the RDAMtool - the tool to configure RDMA devices. It looks like everyone who was interested to read cover letter already did it, so I'll start from the changelog: Changelog: v4->v5: * Rebased to latest net-next branch * Moved BIT() macro from devl

[PATCH REPOST v5 iproute2 3/8] rdma: Add dev object

2017-08-16 Thread Leon Romanovsky
Device (dev) object represents struct ib_device to the user space. Device properties: * Device capabilities * FW version to the device output * node_guid and sys_image_guid * node_type Signed-off-by: Leon Romanovsky --- rdma/Makefile | 2 +- rdma/dev.c| 230 +++

[PATCH REPOST v5 iproute2 2/8] rdma: Add basic infrastructure for RDMA tool

2017-08-16 Thread Leon Romanovsky
RDMA devices are cross-functional devices from one side, but very tailored for the specific markets from another. Such diversity caused to spread of RDMA related configuration across various tools, e.g. devlink, ip, ethtool, ib specific and vendor specific solutions. This patch adds ability to fi

Re: [PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Subash Abhinov Kasiviswanathan
I'm probably forgetting a bit of the original context. Say you have one of these "network devices in IP mode". What happens with the device *before* you attach an rmnet child? Can it pass traffic before that point at all, or does the modem expect MAP already? Hi Dan All traffic needs to be i

Re: [PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-16 Thread Cong Wang
On Wed, Aug 16, 2017 at 1:39 AM, Xin Long wrote: > On Wed, Aug 9, 2017 at 7:33 AM, Cong Wang wrote: >> On Mon, Aug 7, 2017 at 7:33 PM, Xin Long wrote: >>> On Tue, Aug 8, 2017 at 9:15 AM, Cong Wang wrote: This looks like a completely API burden? >>> netfilter xt targets are not really compa

Re: [net-next PATCH 07/10] bpf: add access to sock fields and pkt data from sk_skb programs

2017-08-16 Thread Alexei Starovoitov
On 8/15/17 10:33 PM, John Fastabend wrote: +static int sk_skb_prologue(struct bpf_insn *insn_buf, bool direct_write, + const struct bpf_prog *prog) +{ + struct bpf_insn *insn = insn_buf; + + if (!direct_write) + return 0; + + /* if (!skb->c

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-16 Thread Alexei Starovoitov
On 8/15/17 10:32 PM, John Fastabend wrote: + +static void smap_do_verdict(struct smap_psock *psock, struct sk_buff *skb) +{ + struct sock *sock; + int rc; + + /* Because we use per cpu values to feed input from sock redirect +* in BPF program to do_sk_redirect_map() call

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread Jay Vosburgh
Dan Williams wrote: [...] >You'll probably say "aim for the 75% case" or something like that, >which is fine, but then you're depending on your 75% case to be (a) >single AP, (b) never move (eg, only bond wifi + ethernet), (c) little >radio interference. I'm not sure I'd buy that. If I've put wo

[PATCH] netfilter: ipset: ipset list may return wrong member count for set with timeout

2017-08-16 Thread Vishwanath Pai
Simple testcase: $ ipset create test hash:ip timeout 5 $ ipset add test 1.2.3.4 $ ipset add test 1.2.2.2 $ sleep 5 $ ipset l Name: test Type: hash:ip Revision: 5 Header: family inet hashsize 1024 maxelem 65536 timeout 5 Size in memory: 296 References: 0 Number of entries: 2 Members: We return "N

Re: [PATCH net RESEND] PCI: fix oops when try to find Root Port for a PCI device

2017-08-16 Thread Michael Ellerman
Thierry Reding writes: ... > > In case of Tegra, dev actually points to the root port. Now if I read > the above code correctly, highest_pcie_bridge will still be NULL in that > case, which in turn will return NULL from pci_find_pcie_root_port(). But > shouldn't it really return dev? > > The patch

Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Jason Wang
On 2017年08月17日 00:55, Michael S. Tsirkin wrote: On Wed, Aug 16, 2017 at 10:14:33PM +0800, Jason Wang wrote: From: Eric Dumazet tun_build_skb() is not thread safe since it uses per queue page frag, this will break things when multiple threads are sending through same queue. Switch to use per-t

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread Ben Greear
On 08/16/2017 08:18 PM, Dan Williams wrote: On Wed, 2017-08-16 at 19:36 -0700, Ben Greear wrote: On 08/16/2017 07:11 PM, Dan Williams wrote: On Wed, 2017-08-16 at 14:31 -0700, David Miller wrote: From: Dan Williams Date: Wed, 16 Aug 2017 16:22:41 -0500 My biggest suggestion is that perhaps

[PATCH net v2 0/2] net: ixgbe: Use new flag to disable Relaxed Ordering

2017-08-16 Thread Ding Tianhong
The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to indicate that Relaxed Ordering Attributes (RO) should not be used for Transaction Layer Packets (TLP) targeted toward these affected Root Port, it will clear the bit4 in the PCIe Device Control register, so the PCIe device drivers cou

[PATCH net v2 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-08-16 Thread Ding Tianhong
The ixgbe driver use the compile check to determine if it can send TLPs to Root Port with the Relaxed Ordering Attribute set, this is too inconvenient, now the new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to the kernel and we could check the bit4 in the PCIe Device Control register to

[PATCH net v2 1/2] Revert commit 1a8b6d76dc5b ("net:add one common config...")

2017-08-16 Thread Ding Tianhong
The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to indicate that Relaxed Ordering Attributes (RO) should not be used for Transaction Layer Packets (TLP) targeted toward these affected Root Port, it will clear the bit4 in the PCIe Device Control register, so the PCIe device drivers cou

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread Dan Williams
On Wed, 2017-08-16 at 19:36 -0700, Ben Greear wrote: > On 08/16/2017 07:11 PM, Dan Williams wrote: > > On Wed, 2017-08-16 at 14:31 -0700, David Miller wrote: > > > From: Dan Williams > > > Date: Wed, 16 Aug 2017 16:22:41 -0500 > > > > > > > My biggest suggestion is that perhaps bonding should gro

Re: [PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Dan Williams
On Wed, 2017-08-16 at 18:55 -0600, Subash Abhinov Kasiviswanathan wrote: > RmNet driver provides a transport agnostic MAP (multiplexing and > aggregation protocol) support in embedded module. Module provides > virtual network devices which can be attached to any IP-mode > physical device. This will

[PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
Because we remove the tcp_tw_recycle support in the commit 4396e46187c ('tcp: remove tcp_tw_recycle') and also delete the code 'af_ops->route_req' for sysctl_tw_recycle in tcp_conn_request. Now when we call the 'af_ops->route_req', the dist always is NULL, and we remove the unnecessay check. Signe

[PATCH net-next v2 0/2] simplify the tcp_conn_request.

2017-08-16 Thread Tonghao Zhang
These patches are not bugfix. But just simplify the tcp_conn_request function. These patches are based on Davem's net-next tree. Tonghao Zhang (2): tcp: Remove unnecessary dst check in tcp_conn_request. tcp: Remove the unused parameter for tcp_try_fastopen. include/net/tcp.h | 3 +--

[PATCH net-next v2 2/2] tcp: Remove the unused parameter for tcp_try_fastopen.

2017-08-16 Thread Tonghao Zhang
The parameter dst of tcp_try_fastopen and tcp_fastopen_create_child is not used anymore. We remove it. Signed-off-by: Tonghao Zhang --- include/net/tcp.h | 3 +-- net/ipv4/tcp_fastopen.c | 6 ++ net/ipv4/tcp_input.c| 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --gi

Re: [PATCH net] PCI: fix the return value for the pci_find_pcie_root_port()

2017-08-16 Thread David Miller
From: Ding Tianhong Date: Thu, 17 Aug 2017 10:25:30 +0800 > The pci_find_pcie_root_port() would return NULL if the given > dev is already a Root Port, it looks like unfriendly to the > PCIe Root Port device, Thierry and Bjorn suggest to let this > function return the given dev under this circumst

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread David Miller
From: Dan Williams Date: Wed, 16 Aug 2017 21:11:47 -0500 > You'll probably say "aim for the 75% case" or something like that, > which is fine, but then you're depending on your 75% case to be (a) > single AP, (b) never move (eg, only bond wifi + ethernet), (c) little > radio interference. I'm no

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread Ben Greear
On 08/16/2017 07:11 PM, Dan Williams wrote: On Wed, 2017-08-16 at 14:31 -0700, David Miller wrote: From: Dan Williams Date: Wed, 16 Aug 2017 16:22:41 -0500 My biggest suggestion is that perhaps bonding should grow hysteresis for link speeds. Since WiFi can change speed every packet, you pr

[PATCH net] PCI: fix the return value for the pci_find_pcie_root_port()

2017-08-16 Thread Ding Tianhong
The pci_find_pcie_root_port() would return NULL if the given dev is already a Root Port, it looks like unfriendly to the PCIe Root Port device, Thierry and Bjorn suggest to let this function return the given dev under this circumstances. Fixes: 0e405232871d6 ("PCI: fix oops when try to find Root P

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread Dan Williams
On Wed, 2017-08-16 at 14:31 -0700, David Miller wrote: > From: Dan Williams > Date: Wed, 16 Aug 2017 16:22:41 -0500 > > > My biggest suggestion is that perhaps bonding should grow > hysteresis > > for link speeds. Since WiFi can change speed every packet, you > probably > > don't want the bond ch

[PATCH net-next] liquidio: remove support for deprecated f/w cmd OCTNET_CMD_RESET_PF

2017-08-16 Thread Felix Manlunas
From: Rick Farrington Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c| 9 - drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 1 - 2 files changed, 10 deletions(-) diff --git a/drivers/net/ethernet/cavium/

Re: [PATCH net 0/2] net: ixgbe: Use new flag to disable Relaxed Ordering

2017-08-16 Thread Ding Tianhong
On 2017/8/17 1:56, David Miller wrote: > From: Ding Tianhong > Date: Wed, 16 Aug 2017 17:41:45 +0800 > >> The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added >> to indicate that Relaxed Ordering Attributes (RO) should not >> be used for Transaction Layer Packets (TLP) targeted toward

Re: [PATCH net RESEND] PCI: fix oops when try to find Root Port for a PCI device

2017-08-16 Thread Ding Tianhong
On 2017/8/17 4:59, David Miller wrote: > From: Bjorn Helgaas > Date: Wed, 16 Aug 2017 15:02:37 -0500 > >> Your fix looks right to me. > > Someone please submit this fix formally because this change is now in > Linus's tree. > I will send it. > Thank you. > > . >

Re: [PATCH] i40e{,vf}: Fix out-of-bound cpumask read in IRQ affinity handler

2017-08-16 Thread Stefano Brivio
On Thu, 17 Aug 2017 03:01:09 +0200 Stefano Brivio wrote: > Before posting, however, I checked patchwork at: > > https://patchwork.ozlabs.org/project/intel-wired-lan/list/ > > and also your git tree (listed in MAINTAINERS) at: > > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh

Re: [PATCH next] neigh: initialize neigh entry correctly during arp processing

2017-08-16 Thread महेश बंडेवार
On Wed, Aug 16, 2017 at 5:32 PM, Sowmini Varadhan wrote: > On (08/16/17 17:02), Mahesh Bandewar wrote: >> >> From: Mahesh Bandewar >> >> If the ARP processing creates a neigh entry, it's immediately marked >> as STALE without timer and stays that way in that state as long as >> host do not send t

Re: [PATCH] i40e{,vf}: Fix out-of-bound cpumask read in IRQ affinity handler

2017-08-16 Thread Stefano Brivio
Hi Jeff, On Wed, 16 Aug 2017 17:25:24 -0700 Jeff Kirsher wrote: > On Tue, 2017-08-15 at 12:30 +0200, Stefano Brivio wrote: > > The cpumask used in i40e{,vf}_irq_affinity_notify() is allocated > > by irq_affinity_notify() with alloc_cpumask_var(), which doesn't > > allocate NR_CPUS bits, but only

Re: [PATCH net-next 2/3 v4] net: arp: Add support for raw IP device

2017-08-16 Thread Subash Abhinov Kasiviswanathan
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index cf73510..d6650e2 100644 --- a/include/uapi/linux/if_arp.h +++ b/include/uapi/linux/if_arp.h @@ -59,6 +59,7 @@ #define ARPHRD_LAPB 516 /* LAPB */ #define ARPHRD_DDCMP517

Re: [PATCH next] neigh: initialize neigh entry correctly during arp processing

2017-08-16 Thread 吉藤英明
Hi, 2017-08-17 9:02 GMT+09:00 Mahesh Bandewar : > From: Mahesh Bandewar > > If the ARP processing creates a neigh entry, it's immediately marked > as STALE without timer and stays that way in that state as long as > host do not send traffic to that neighbour. > > I observed this on hosts which ar

[PATCH net-next 2/3 v5] net: arp: Add support for raw IP device

2017-08-16 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index cf73510..a2a6356 100644 ---

[PATCH net-next 0/3 v5] Add support for rmnet driver

2017-08-16 Thread Subash Abhinov Kasiviswanathan
-- v1: Same as the RFC patch with some minor fixes for issues reported by kbuild test robot. v1->v2: Change datatypes and remove config IOCTL as mentioned by David. Also fix checkpatch issues and remove some unused code. v2->v3: Move location to drivers/net and rename to rmnet. Change the userspa

[PATCH net-next 3/3 v5] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-16 Thread Subash Abhinov Kasiviswanathan
RmNet driver provides a transport agnostic MAP (multiplexing and aggregation protocol) support in embedded module. Module provides virtual network devices which can be attached to any IP-mode physical device. This will be used to provide all MAP functionality on future hardware in a single consiste

[PATCH net-next 1/3 v5] net: ether: Add support for multiplexing and aggregation type

2017-08-16 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan --- include/uapi/linux/if_ether.h | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH v3] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
From: "Levin, Alexander (Sasha Levin)" This is useful for directly looking up a task based on class id rather than having to scan through all open file descriptors. Signed-off-by: Sasha Levin --- include/uapi/linux/inet_diag.h | 1 + net/ipv4/inet_diag.c | 11 +++ 2 files ch

Re: [PATCH next] neigh: initialize neigh entry correctly during arp processing

2017-08-16 Thread Sowmini Varadhan
On (08/16/17 17:02), Mahesh Bandewar wrote: > > From: Mahesh Bandewar > > If the ARP processing creates a neigh entry, it's immediately marked > as STALE without timer and stays that way in that state as long as > host do not send traffic to that neighbour. Perhaps I dont understand the specifi

Re: [PATCH v2] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
On Wed, Aug 16, 2017 at 01:15:57PM -0700, Cong Wang wrote: >On Wed, Aug 16, 2017 at 1:13 PM, Levin, Alexander (Sasha Levin) > wrote: >> Ping? > >I guess you missed the comment saying you need to check >the return value of nla_put_u32(). Indeed I did. Odd, I don't see the mail locally, but I can fi

Re: [PATCH] i40e{,vf}: Fix out-of-bound cpumask read in IRQ affinity handler

2017-08-16 Thread Jeff Kirsher
On Tue, 2017-08-15 at 12:30 +0200, Stefano Brivio wrote: > The cpumask used in i40e{,vf}_irq_affinity_notify() is allocated > by irq_affinity_notify() with alloc_cpumask_var(), which doesn't > allocate NR_CPUS bits, but only nr_cpumask_bits bits. If we just > dereference it, we'll read way more tha

Re: [PATCH v2] i40e/i40evf: use cpumask_copy() for assigning cpumask

2017-08-16 Thread Jeff Kirsher
On Wed, 2017-08-16 at 19:52 +0200, Juergen Gross wrote: > Using direct assignment for a cpumask is wrong, cpumask_copy() should > be used instead. > > Otherwise crashes like the following might happen: > > [62792.326374] BUG: unable to handle kernel paging request at > 8800049ff000 > [62792.3

Re: [PATCH] Adding-Agile-SD-TCP-module-and-modifying-Kconfig-and-makefile

2017-08-16 Thread kbuild test robot
Hi mohamedalrshah, [auto build test ERROR on net/master] [also build test ERROR on v4.13-rc5 next-20170816] [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/commits/mohamedalrshah/Adding-Agile-SD-TCP

Re: [PATCH net] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-16 Thread Willem de Bruijn
On Wed, Aug 16, 2017 at 7:55 PM, Thiago Macieira wrote: > On Wednesday, 16 August 2017 16:27:17 PDT Willem de Bruijn wrote: >> Actually, it is safe even without the check. Overflow of the signed integer >> is benign here. > > Usually, it's a bad idea to allow UB to happen. > > Where is the overflo

Re: [PATCH v3] openvswitch: enable NSH support

2017-08-16 Thread Yang, Yi
On Wed, Aug 16, 2017 at 11:15:28PM +0800, Eric Garver wrote: > On Wed, Aug 16, 2017 at 01:35:30PM +0800, Yi Yang wrote: > > + > > +#define NSH_DST_PORT4790 /* UDP Port for NSH on VXLAN. */ > > +#define ETH_P_NSH 0x894F /* Ethertype for NSH. */ > > ETH_P_NSH probably belongs in incl

[PATCH next] neigh: initialize neigh entry correctly during arp processing

2017-08-16 Thread Mahesh Bandewar
From: Mahesh Bandewar If the ARP processing creates a neigh entry, it's immediately marked as STALE without timer and stays that way in that state as long as host do not send traffic to that neighbour. I observed this on hosts which are in IPv6 environment, where there is very little to no IPv4

Re: [PATCH net] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-16 Thread Thiago Macieira
On Wednesday, 16 August 2017 16:27:17 PDT Willem de Bruijn wrote: > Actually, it is safe even without the check. Overflow of the signed integer > is benign here. Usually, it's a bad idea to allow UB to happen. Where is the overflow? I didn't see it in the patches so far. -- Thiago Macieira - th

Re: [PATCH v3] openvswitch: enable NSH support

2017-08-16 Thread Yang, Yi
On Wed, Aug 16, 2017 at 10:03:22PM +0800, Jiri Benc wrote: > On Wed, 16 Aug 2017 17:31:30 +0800, Yang, Yi wrote: > > On Wed, Aug 16, 2017 at 11:19:21AM +0200, Jiri Benc wrote: > > > > --- a/include/uapi/linux/openvswitch.h > > > > +++ b/include/uapi/linux/openvswitch.h > > > [...] > > > > +#define

Re: [PATCH net] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-16 Thread Willem de Bruijn
> static inline int sk_peek_offset(struct sock *sk, int flags) > { > - if (unlikely(flags & MSG_PEEK)) { > - s32 off = READ_ONCE(sk->sk_peek_off); > - if (off >= 0) > - return off; > - } > + if (unlikely(flags & MSG_PEEK)) > +

Re: [PATCH] Adding-Agile-SD-TCP-module-and-modifying-Kconfig-and-makefile

2017-08-16 Thread kbuild test robot
Hi mohamedalrshah, [auto build test ERROR on net/master] [also build test ERROR on v4.13-rc5 next-20170816] [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/commits/mohamedalrshah/Adding-Agile-SD-TCP

Re: [PATCH net] ptr_ring: use kmalloc_array()

2017-08-16 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Aug 2017 10:36:47 -0700 > From: Eric Dumazet > > As found by syzkaller, malicious users can set whatever tx_queue_len > on a tun device and eventually crash the kernel. > > Lets remove the ALIGN(XXX, SMP_CACHE_BYTES) thing since a small > ring buffer is not fas

Re: [PATCH net] ipv4: better IP_MAX_MTU enforcement

2017-08-16 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Aug 2017 11:09:12 -0700 > From: Eric Dumazet > > While working on yet another syzkaller report, I found > that our IP_MAX_MTU enforcements were not properly done. > > gcc seems to reload dev->mtu for min(dev->mtu, IP_MAX_MTU), and > final result can be bigger t

Re: [PATCH net] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-16 Thread Willem de Bruijn
On Wed, Aug 16, 2017 at 4:20 PM, Paolo Abeni wrote: > On Wed, 2017-08-16 at 11:18 -0400, Willem de Bruijn wrote: >> > If I read the above correctly, you are arguining in favor of the >> > addittional flag version, right? >> >> I was. Though if we are going to thread the argument from the caller >>

Re: [PATCH net-next 0/3] vmbus sendpacket cleanups

2017-08-16 Thread David Miller
From: Stephen Hemminger Date: Wed, 16 Aug 2017 08:56:23 -0700 > These patches remove and consolidate vmbus_sendpacket functions. > > They should go through the net-next tree since these API's > were only used by the netvsc driver. Series applied, thanks.

[PATCH v2 net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-16 Thread Eric Dumazet
From: Eric Dumazet refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Eric Dumazet --- v2: fix a missing chan

Re: [PATCH net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-16 Thread Eric Dumazet
On Wed, 2017-08-16 at 12:24 -0700, Eric Dumazet wrote: > From: Eric Dumazet > > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

Re: [net-next PATCH 0/2] bpf: sockmap build fixes

2017-08-16 Thread John Fastabend
On 08/16/2017 03:42 PM, David Miller wrote: > From: David Miller > Date: Wed, 16 Aug 2017 15:35:16 -0700 (PDT) > >> From: John Fastabend >> Date: Wed, 16 Aug 2017 15:01:52 -0700 >> >>> Two build fixes for sockmap, this should resolve the build errors >>> and warnings that were reported. Thanks e

Re: [net-next PATCH 0/2] bpf: sockmap build fixes

2017-08-16 Thread David Miller
From: David Miller Date: Wed, 16 Aug 2017 15:35:16 -0700 (PDT) > From: John Fastabend > Date: Wed, 16 Aug 2017 15:01:52 -0700 > >> Two build fixes for sockmap, this should resolve the build errors >> and warnings that were reported. Thanks everyone. > > Series applied, thanks John. Actually,

[PATCH net-next] net: ipv6: put host and anycast routes on device with address

2017-08-16 Thread David Ahern
One nagging difference between ipv4 and ipv6 is host routes for ipv6 addresses are installed using the loopback device or VRF / L3 Master device. e.g., 2001:db8:1::/120 dev veth0 proto kernel metric 256 pref medium local 2001:db8:1::1 dev lo table local proto kernel metric 0 pref medium U

Re: [net-next PATCH 0/2] bpf: sockmap build fixes

2017-08-16 Thread David Miller
From: John Fastabend Date: Wed, 16 Aug 2017 15:01:52 -0700 > Two build fixes for sockmap, this should resolve the build errors > and warnings that were reported. Thanks everyone. Series applied, thanks John.

RE: [PATCH net-next 1/3] VMCI: only load on VMware hypervisor

2017-08-16 Thread Dexuan Cui
> From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > > Without the patch, vmw_vsock_vmci_transport.ko and vmw_vmci.ko can > > automatically load when an application creates an AF_VSOCK socket. > > > > This is the expected good behavior on VMware hypervisor, but as we > > are going to add hv_sock.

Re: [net-next PATCH 2/2] bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER

2017-08-16 Thread John Fastabend
On 08/16/2017 03:06 PM, David Ahern wrote: > On 8/16/17 4:02 PM, John Fastabend wrote: >> diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile >> index aa24287..897daa0 100644 >> --- a/kernel/bpf/Makefile >> +++ b/kernel/bpf/Makefile >> @@ -3,7 +3,10 @@ obj-y := core.o >> obj-$(CONFIG_BPF_SYSCAL

Re: [net-next PATCH 2/2] bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER

2017-08-16 Thread Daniel Borkmann
On 08/17/2017 12:02 AM, John Fastabend wrote: Resolve issues with !CONFIG_BPF_SYSCALL and !STREAM_PARSER net/core/filter.c: In function ‘do_sk_redirect_map’: net/core/filter.c:1881:3: error: implicit declaration of function ‘__sock_map_lookup_elem’ [-Werror=implicit-function-declaration] sk

Re: [net-next PATCH 1/2] bpf: sockmap state change warning fix

2017-08-16 Thread Daniel Borkmann
On 08/17/2017 12:02 AM, John Fastabend wrote: psock will uninitialized in default case we need to do the same psock lookup and check as in other branch. Fixes compile warning below. kernel/bpf/sockmap.c: In function ‘smap_state_change’: kernel/bpf/sockmap.c:156:21: warning: ‘psock’ may be used u

Re: [net-next PATCH 2/2] bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER

2017-08-16 Thread David Ahern
On 8/16/17 4:02 PM, John Fastabend wrote: > diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile > index aa24287..897daa0 100644 > --- a/kernel/bpf/Makefile > +++ b/kernel/bpf/Makefile > @@ -3,7 +3,10 @@ obj-y := core.o > obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o

[net-next PATCH 2/2] bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER

2017-08-16 Thread John Fastabend
Resolve issues with !CONFIG_BPF_SYSCALL and !STREAM_PARSER net/core/filter.c: In function ‘do_sk_redirect_map’: net/core/filter.c:1881:3: error: implicit declaration of function ‘__sock_map_lookup_elem’ [-Werror=implicit-function-declaration] sk = __sock_map_lookup_elem(ri->map, ri->ifindex);

[net-next PATCH 1/2] bpf: sockmap state change warning fix

2017-08-16 Thread John Fastabend
psock will uninitialized in default case we need to do the same psock lookup and check as in other branch. Fixes compile warning below. kernel/bpf/sockmap.c: In function ‘smap_state_change’: kernel/bpf/sockmap.c:156:21: warning: ‘psock’ may be used uninitialized in this function [-Wmaybe-uninitia

[net-next PATCH 0/2] bpf: sockmap build fixes

2017-08-16 Thread John Fastabend
Two build fixes for sockmap, this should resolve the build errors and warnings that were reported. Thanks everyone. --- John Fastabend (2): bpf: sockmap state change warning fix bpf: sock_map fixes for !CONFIG_BPF_SYSCALL and !STREAM_PARSER include/linux/bpf.h | 10

[PATCH net] tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP

2017-08-16 Thread Neal Cardwell
In some situations tcp_send_loss_probe() can realize that it's unable to send a loss probe (TLP), and falls back to calling tcp_rearm_rto() to schedule an RTO timer. In such cases, sometimes tcp_rearm_rto() realizes that the RTO was eligible to fire immediately or at some point in the past (delta_u

Re: [bug report] net: dsa: ksz: fix skb freeing

2017-08-16 Thread Andrew Lunn
On Thu, Aug 17, 2017 at 12:27:19AM +0300, Dan Carpenter wrote: > Hello Vivien Didelot, > > The patch e71cb9e00922: "net: dsa: ksz: fix skb freeing" from Aug 9, > 2017, leads to the following static checker warning: > > net/dsa/tag_ksz.c:64 ksz_xmit() > warn: 'nskb' was already freed.

Re: [patch net-next 1/3] idr: Use unsigned long instead of int

2017-08-16 Thread Alexey Dobriyan
[CC trimmed] On Tue, Aug 15, 2017 at 10:12:16PM -0400, Chris Mi wrote: > IDR uses internally radix tree which uses unsigned long. It doesn't > makes sense to have index as signed value. It doesn't. But it makes sense to use "unsigned int" because it generates smaller code on x86_64.

Re: [net-next PATCH 00/10] BPF: sockmap and sk redirect support

2017-08-16 Thread John Fastabend
On 08/16/2017 02:35 PM, David Ahern wrote: > On 8/16/17 1:34 PM, John Fastabend wrote: >>> I also have a build error. >>> >>> $ git grep -n __sock_map_lookup_elem >>> include/linux/bpf.h:316:struct sock *__sock_map_lookup_elem(struct bpf_map >>> *map, u32 key); >>> kernel/bpf/sockmap.c:558:struct

Re: [net-next PATCH 00/10] BPF: sockmap and sk redirect support

2017-08-16 Thread David Ahern
On 8/16/17 1:34 PM, John Fastabend wrote: >> I also have a build error. >> >> $ git grep -n __sock_map_lookup_elem >> include/linux/bpf.h:316:struct sock *__sock_map_lookup_elem(struct bpf_map >> *map, u32 key); >> kernel/bpf/sockmap.c:558:struct sock *__sock_map_lookup_elem(struct bpf_map >> *

[PATCH net-next] macvlan: add offload features for encapsulation

2017-08-16 Thread Dimitris Michailidis
Currently macvlan devices do not set their hw_enc_features making encapsulated Tx packets resort to SW fallbacks. Add encapsulation GSO offloads to ->features as is done for the other GSOs and set ->hw_enc_features. Signed-off-by: Dimitris Michailidis --- drivers/net/macvlan.c | 3 ++- 1 file ch

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread David Miller
From: Dan Williams Date: Wed, 16 Aug 2017 16:22:41 -0500 > My biggest suggestion is that perhaps bonding should grow hysteresis > for link speeds. Since WiFi can change speed every packet, you probably > don't want the bond characteristics changing every couple seconds just > in case your WiFi li

Re: [patch net-next] net: sched: cls_flower: fix ndo_setup_tc type for stats call

2017-08-16 Thread David Miller
From: Jiri Pirko Date: Wed, 16 Aug 2017 17:15:18 +0200 > From: Jiri Pirko > > I made a stupid mistake using TC_CLSFLOWER_STATS instead of > TC_SETUP_CLSFLOWER. Funny thing is that both are defined as "2" so it > actually did not cause any harm. Anyway, fixing it now. > > Fixes: 2572ac53c46f ("

Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread David Miller
From: Jason Wang Date: Wed, 16 Aug 2017 22:14:33 +0800 > From: Eric Dumazet > > tun_build_skb() is not thread safe since it uses per queue page frag, > this will break things when multiple threads are sending through same > queue. Switch to use per-thread generator (no lock involved). > > Fixe

[bug report] net: dsa: ksz: fix skb freeing

2017-08-16 Thread Dan Carpenter
Hello Vivien Didelot, The patch e71cb9e00922: "net: dsa: ksz: fix skb freeing" from Aug 9, 2017, leads to the following static checker warning: net/dsa/tag_ksz.c:64 ksz_xmit() warn: 'nskb' was already freed. net/dsa/tag_ksz.c 35 static struct sk_buff *ksz_xmit(struct sk_buff

Re: [PATCH net] dccp: defer ccid_hc_tx_delete() at dismantle time

2017-08-16 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Aug 2017 07:03:15 -0700 > From: Eric Dumazet > > syszkaller team reported another problem in DCCP [1] > > Problem here is that the structure holding RTO timer > (ccid2_hc_tx_rto_expire() handler) is freed too soon. > > We can not use del_timer_sync() to cancel

Re: [PATCH][V2] net/mlx4: fix spelling mistake: "availible" -> "available"

2017-08-16 Thread David Miller
From: Colin King Date: Wed, 16 Aug 2017 14:42:50 +0100 > From: Colin Ian King > > Trivial fix to spelling mistakes in the mlx4 driver. > > Signed-off-by: Colin Ian King Applied. When respinning, unless you make significant changes, always integrate the ACK's and SIGNOFF's your change has ac

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread Dan Williams
On Wed, 2017-08-16 at 14:44 -0600, James Feeney wrote: > On 08/13/2017 11:42 AM, Andreas Born wrote: > > On a side note I would recommend some of my own reading to you > > about > > patch submission in general [1] and on netdev specifically [2]. > > Mmm - [2] and [3], I suspect.  Thanks Andreas.  

Re: [net-next PATCH 00/10] BPF: sockmap and sk redirect support

2017-08-16 Thread David Miller
From: John Fastabend Date: Wed, 16 Aug 2017 12:34:44 -0700 > Thanks Eric, I'll have a fix shortly. The faster you fix these regressions the better :-)

Re: [PATCH net V3] openvswitch: fix skb_panic due to the incorrect actions attrlen

2017-08-16 Thread David Miller
From: Liping Zhang Date: Wed, 16 Aug 2017 13:30:07 +0800 > From: Liping Zhang > > For sw_flow_actions, the actions_len only represents the kernel part's > size, and when we dump the actions to the userspace, we will do the > convertions, so it's true size may become bigger than the actions_len.

Re: [PATCH] qdisc: add tracepoint qdisc:qdisc_dequeue for dequeued SKBs

2017-08-16 Thread David Miller
From: Jesper Dangaard Brouer Date: Tue, 15 Aug 2017 21:11:03 +0200 > The main purpose of this tracepoint is to monitor bulk dequeue > in the network qdisc layer, as it cannot be deducted from the > existing qdisc stats. > > The txq_state can be used for determining the reason for zero packet > d

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread David Miller
From: James Feeney Date: Wed, 16 Aug 2017 14:44:27 -0600 > On 08/13/2017 11:42 AM, Andreas Born wrote: >> On a side note I would recommend some of my own reading to you about >> patch submission in general [1] and on netdev specifically [2]. > > Mmm - [2] and [3], I suspect. Thanks Andreas. I'

Re: [PATCH net RESEND] PCI: fix oops when try to find Root Port for a PCI device

2017-08-16 Thread David Miller
From: Bjorn Helgaas Date: Wed, 16 Aug 2017 15:02:37 -0500 > Your fix looks right to me. Someone please submit this fix formally because this change is now in Linus's tree. Thank you.

Re: Regression: Bug 196547 - Since 4.12 - bonding module not working with wireless drivers

2017-08-16 Thread James Feeney
On 08/13/2017 11:42 AM, Andreas Born wrote: > On a side note I would recommend some of my own reading to you about > patch submission in general [1] and on netdev specifically [2]. Mmm - [2] and [3], I suspect. Thanks Andreas. I'll be studying those. Yeah, I'm still learning what is needed and

Re: [PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-16 Thread Nikolay Aleksandrov
On 16/08/17 20:01, David Lamparter wrote: > This implements holding dst metadata information in the bridge layer, > but only for unicast entries in the MAC table. Multicast is still left > to design and implement. > > Signed-off-by: David Lamparter > --- Hi David, Sorry but I do not agree with

Re: [PATCH net] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-16 Thread Paolo Abeni
On Wed, 2017-08-16 at 11:18 -0400, Willem de Bruijn wrote: > > If I read the above correctly, you are arguining in favor of the > > addittional flag version, right? > > I was. Though if we are going to thread the argument from the caller > to __skb_try_recv_from_queue to avoid rereading sk->sk_pee

[net-next:master 1065/1071] sockmap.c:undefined reference to `strp_done'

2017-08-16 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: cf9d01405925e3f8144c99d7bf7b184449794066 commit: 174a79ff9515f400b9a6115643dafd62a635b7e6 [1065/1071] bpf: sockmap with sk redirect support config: i386-randconfig-n0-201733 (attached as .config) compiler: g

Re: [PATCH net] ipv6: fix NULL dereference in ip6_route_dev_notify()

2017-08-16 Thread Cong Wang
On Wed, Aug 16, 2017 at 12:37 PM, Eric Dumazet wrote: > On Wed, 2017-08-16 at 12:15 -0700, Eric Dumazet wrote: >> On Wed, 2017-08-16 at 11:50 -0700, Cong Wang wrote: >> > On Tue, Aug 15, 2017 at 4:09 AM, Eric Dumazet >> > wrote: >> > > From: Eric Dumazet >> > > >> > > Based on a syzkaller repor

Re: [PATCH v2] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Cong Wang
On Wed, Aug 16, 2017 at 1:13 PM, Levin, Alexander (Sasha Levin) wrote: > Ping? I guess you missed the comment saying you need to check the return value of nla_put_u32().

Re: [PATCH v2] net: inet: diag: expose sockets cgroup classid

2017-08-16 Thread Levin, Alexander (Sasha Levin)
Ping? On Thu, Jul 27, 2017 at 02:13:52PM -0400, Sasha Levin wrote: >This is useful for directly looking up a task based on class id rather than >having to scan through all open file descriptors. > >Signed-off-by: Sasha Levin >--- > >Changes in V2: > - Addressed comments from Cong Wang (use nla_pu

[net-next:master 1065/1071] net//core/filter.c:1881:8: error: implicit declaration of function '__sock_map_lookup_elem'

2017-08-16 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: cf9d01405925e3f8144c99d7bf7b184449794066 commit: 174a79ff9515f400b9a6115643dafd62a635b7e6 [1065/1071] bpf: sockmap with sk redirect support config: cris-etrax-100lx_v2_defconfig (attached as .config) compile

  1   2   3   >