Re: linux-next: build failure after merge of the net-next tree

2018-05-28 Thread Christoph Hellwig
> [Christoph, I noticed that the comment above datagram_poll in > net/core/datagram.c needs the function name updated] I'll send a fix for that. > > I have added the following merge fix patch for today: This looks correct, thanks!

Re: [RFC v5 2/5] virtio_ring: support creating packed ring

2018-05-28 Thread Tiwei Bie
On Tue, May 29, 2018 at 10:49:11AM +0800, Jason Wang wrote: > On 2018年05月22日 16:16, Tiwei Bie wrote: > > This commit introduces the support for creating packed ring. > > All split ring specific functions are added _split suffix. > > Some necessary stubs for packed ring are also added. > > > >

Re: [RFC v5 3/5] virtio_ring: add packed ring support

2018-05-28 Thread Tiwei Bie
On Tue, May 29, 2018 at 11:18:57AM +0800, Jason Wang wrote: > On 2018年05月22日 16:16, Tiwei Bie wrote: [...] > > +static void detach_buf_packed(struct vring_virtqueue *vq, > > + unsigned int id, void **ctx) > > +{ > > + struct vring_desc_state_packed *state; > > + struct

Re: [PATCH v3 net-next 2/2] tcp: minor optimization around tcp_hdr() usage in tcp receive path

2018-05-28 Thread Eric Dumazet
On 05/28/2018 05:41 PM, Yafang Shao wrote: > OK. > > And what about introducing a new helper tcp_hdr_fast() ? > > /* use it when tcp header has not been pulled yet */ > static inline struct tcphdr *tcp_hdr_fast(const struct sk_buff *skb) > > { > > return (const struct tcphdr

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-28 Thread Stephen Hemminger
On Fri, 25 May 2018 16:06:58 -0700 "Samudrala, Sridhar" wrote: > On 5/25/2018 3:38 PM, Stephen Hemminger wrote: > > On Thu, 24 May 2018 09:55:13 -0700 > > Sridhar Samudrala wrote: > > > >> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > >> index 03ed492c4e14..0f4ba52b641d

Re: [PATCH v3 00/11] Modify action API for implementing lockless actions

2018-05-28 Thread Cong Wang
On Sun, May 27, 2018 at 2:17 PM, Vlad Buslov wrote: > Currently, all netlink protocol handlers for updating rules, actions and > qdiscs are protected with single global rtnl lock which removes any > possibility for parallelism. This patch set is a first step to remove > rtnl lock dependency from

Re: [PATCH net-next 00/12] Misc. bug fixes & some minor additions to HNS3 driver

2018-05-28 Thread David Miller
From: Salil Mehta Date: Fri, 25 May 2018 19:42:55 +0100 > This patch-set provides some bug fixes figured out during testing > and review. It also provides some additions due to running of the > existing code on the new revision of the HNS3 hardware. Series applied.

[v2] MAINTAINERS: add myself as maintainer for QorIQ PTP clock driver

2018-05-28 Thread Yangbo Lu
Added myself as maintainer for QorIQ PTP clock driver. Since gianfar_ptp.c was renamed to ptp_qoriq.c, let's maintain it under QorIQ PTP clock driver. Signed-off-by: Yangbo Lu --- Changes for v2: - Dropped dpaa2/rtc part. --- MAINTAINERS | 10 -- 1 files changed, 8

RE: [PATCH 5/5] MAINTAINERS: add myself as maintainer for QorIQ PTP clock driver

2018-05-28 Thread Y.b. Lu
Hi David, > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, May 29, 2018 11:07 AM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; devicet...@vger.kernel.org; > linux-ker...@vger.kernel.org; richardcoch...@gmail.com; Claudiu Manoil > ; robh...@kernel.org

linux-next: build failure after merge of the net-next tree

2018-05-28 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: net/xdp/xsk.c: In function 'xsk_poll': net/xdp/xsk.c:207:22: error: implicit declaration of function 'datagram_poll'; did you mean 'datagram_poll_mask'?

linux-next: build failure after merge of the net-next tree

2018-05-28 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: x86_64-linux-ld: unknown architecture of input file `net/bpfilter/bpfilter_umh.o' is incompatible with i386:x86-64 output Caused by commit d2ba09c17a06 ("net: add skeleton of bpfilter

Re: [RFC v5 3/5] virtio_ring: add packed ring support

2018-05-28 Thread Jason Wang
On 2018年05月22日 16:16, Tiwei Bie wrote: This commit introduces the support (without EVENT_IDX) for packed ring. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 474 ++- 1 file changed, 468 insertions(+), 6 deletions(-) diff --git

Re: [PATCH net-next] net: sched: shrink struct Qdisc

2018-05-28 Thread David Miller
From: Paolo Abeni Date: Fri, 25 May 2018 16:28:44 +0200 > The struct Qdisc has a lot of holes, especially after commit > a53851e2c321 ("net: sched: explicit locking in gso_cpu fallback"), > which as a side effect, moved the fields just after 'busylock' > on a new cacheline. > > Since both

Re: [PATCH net-next] qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID

2018-05-28 Thread David Miller
From: Bjørn Mork Date: Fri, 25 May 2018 15:00:20 +0200 > SIMCOM are reusing a single device ID for many (all of their?) > different modems, based on different chipsets and firmwares. Newer > Qualcomm chipset generations require setting DTR to wake the QMI > function. The SIM7600E modem is using

Re: [PATCH] net: netsec: reduce DMA mask to 40 bits

2018-05-28 Thread David Miller
From: Ard Biesheuvel Date: Fri, 25 May 2018 14:50:37 +0200 > The netsec network controller IP can drive 64 address bits for DMA, and > the DMA mask is set accordingly in the driver. However, the SynQuacer > SoC, which is the only silicon incorporating this IP at the moment, > integrates this IP

linux-next: build warning after merge of the net-next tree

2018-05-28 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning: net/core/filter.c: In function 'sk_msg_convert_ctx_access': net/core/filter.c:6450:6: warning: unused variable 'off' [-Wunused-variable] int off; ^~~ Introduced by commit

Re: [PATCH net] ipv6: sr: fix memory OOB access in seg6_do_srh_encap/inline

2018-05-28 Thread David Miller
From: Mathieu Xhonneux Date: Fri, 25 May 2018 13:29:41 +0100 > seg6_do_srh_encap and seg6_do_srh_inline can possibly do an > out-of-bounds access when adding the SRH to the packet. This no longer > happen when expanding the skb not only by the size of the SRH (+ > outer IPv6 header), but also by

Re: [PATCH V0:net-next 0/4] net: ethernet: stmmac: add support for stm32mp1

2018-05-28 Thread David Miller
From: Christophe Roullier Date: Fri, 25 May 2018 09:46:37 +0200 > Patches to have Ethernet support on stm32mp1 Series applied.

Re: [PATCH 5/5] MAINTAINERS: add myself as maintainer for QorIQ PTP clock driver

2018-05-28 Thread David Miller
From: Yangbo Lu Date: Fri, 25 May 2018 12:40:38 +0800 > Added myself as maintainer for QorIQ PTP clock driver. > Since gianfar_ptp.c was renamed to ptp_qoriq.c, let's > also maintain it under QorIQ PTP clock driver. > > Signed-off-by: Yangbo Lu Because of the dependency on the staging tree

Re: [PATCH 2/5] ptp_qoriq: move some definitions to header file

2018-05-28 Thread David Miller
From: Yangbo Lu Date: Fri, 25 May 2018 12:40:35 +0800 > This patch is to move some definitions in ptp_qoriq.c > to the header file. > > Signed-off-by: Yangbo Lu Applied.

Re: [PATCH 3/5] net: ethernet: gianfar_ethtool: get phc index through drvdata

2018-05-28 Thread David Miller
From: Yangbo Lu Date: Fri, 25 May 2018 12:40:36 +0800 > Global variable gfar_phc_index was used to get and store > phc index through gianfar_ptp driver. However gianfar_ptp > had been renamed as ptp_qoriq for QorIQ common PTP driver. > This gfar_phc_index doesn't work any more, and the phc index

Re: [PATCH 4/5] dt-bindings: ptp: add ptp-qoriq.txt

2018-05-28 Thread David Miller
From: Yangbo Lu Date: Fri, 25 May 2018 12:40:37 +0800 > This patch is to add a documentation for ptp_qoriq dt-bindings. > The description for ptp_qoriq dt-bindings was actually moved > from Documentation/devicetree/bindings/net/fsl-tsec-phy.txt, > since gianfar_ptp driver was moved to ptp_qoriq

Re: [PATCH 1/5] ptp: rework gianfar_ptp as QorIQ common PTP driver

2018-05-28 Thread David Miller
From: Yangbo Lu Date: Fri, 25 May 2018 12:40:34 +0800 > gianfar_ptp was the PTP clock driver for 1588 timer > module of Freescale QorIQ eTSEC (Enhanced Three-Speed > Ethernet Controllers) platforms. Actually QorIQ DPAA > (Data Path Acceleration Architecture) platforms is > also using the same

Re: [PATCH net-next] ifb: fix packets checksum

2018-05-28 Thread David Miller
From: Jon Maxwell Date: Fri, 25 May 2018 07:38:29 +1000 > Fixup the checksum for CHECKSUM_COMPLETE when pulling skbs on RX path. > Otherwise we get splats when tc mirred is used to redirect packets to ifb. > > Before fix: > > nic: hw csum failure > > Signed-off-by: Jon Maxwell Applied.

Re: [PATCH net-next] net: phy: realtek: add suspend/resume callbacks for RTL8211B

2018-05-28 Thread David Miller
From: Heiner Kallweit Date: Thu, 24 May 2018 22:40:12 +0200 > Add RTL8211B suspend / resume callbacks. > > Signed-off-by: Heiner Kallweit Applied.

Re: [PATCH net-next v12 0/5] Enable virtio_net to act as a standby for a passthru device

2018-05-28 Thread David Miller
From: Sridhar Samudrala Date: Thu, 24 May 2018 09:55:12 -0700 > The main motivation for this patch is to enable cloud service providers > to provide an accelerated datapath to virtio-net enabled VMs in a > transparent manner with no/minimal guest userspace changes. This also > enables

linux-next: manual merge of the net-next tree with the s390 tree

2018-05-28 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: arch/s390/net/Makefile between commit: 866f4c8e0e26 ("s390/net: add pnetid support") from the s390 tree and commit: e1cf4befa297 ("bpf, s390x: remove ld_abs/ld_ind") from the net-next tree. I fixed it up (see

Re: [PATCH net-next] vrf: add CRC32c offload to device features

2018-05-28 Thread David Miller
From: Davide Caratti Date: Thu, 24 May 2018 17:49:35 +0200 > SCTP sockets originated in a VRF can improve their performance if CRC32c > computation is delegated to underlying devices: update device features, > setting NETIF_F_SCTP_CRC. Iterating the following command in the topology > proposed

Re: [PATCH] net: stmmac: Use mutex instead of spinlock

2018-05-28 Thread David Miller
From: Thierry Reding Date: Thu, 24 May 2018 16:09:07 +0200 > From: Thierry Reding > > Some drivers, such as DWC EQOS on Tegra, need to perform operations that > can sleep under this lock (clk_set_rate() in tegra_eqos_fix_speed()) for > proper operation. Since there is no need for this lock to

Re: [PATCH net-next v2 1/1] bnx2x: Collect the device debug information during Tx timeout.

2018-05-28 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Thu, 24 May 2018 04:57:51 -0700 > Tx-timeout mostly happens due to some issue in the device. In such cases, > debug dump would be helpful for identifying the cause of the issue. > This patch adds support to spill debug data during the Tx timeout. Here >

[PATCH] drivers/net: Fix various unnecessary characters after logging newlines

2018-05-28 Thread Joe Perches
Remove and coalesce formats when there is an unnecessary character after a logging newline. These extra characters cause logging defects. Miscellanea: o Coalesce formats Signed-off-by: Joe Perches --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +-

Re: [RFC v5 2/5] virtio_ring: support creating packed ring

2018-05-28 Thread Jason Wang
On 2018年05月22日 16:16, Tiwei Bie wrote: This commit introduces the support for creating packed ring. All split ring specific functions are added _split suffix. Some necessary stubs for packed ring are also added. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 801

[PATCH bpf-next] bpf: hide the unused 'off' variable

2018-05-28 Thread YueHaibing
The local variable is only used while CONFIG_IPV6 enabled net/core/filter.c: In function ‘sk_msg_convert_ctx_access’: net/core/filter.c:6489:6: warning: unused variable ‘off’ [-Wunused-variable] int off; ^ This puts it into #ifdef. Fixes: 303def35f64e ("bpf: allow sk_msg programs to read

Re: [PATCH 0/9] Netfilter/IPVS fixes for net

2018-05-28 Thread David Miller
From: Pablo Neira Ayuso Date: Tue, 29 May 2018 01:42:12 +0200 > The following patchset contains Netfilter/IPVS fixes for your net tree: > > 1) Null pointer dereference when dumping conntrack helper configuration, >from Taehee Yoo. > > 2) Missing sanitization in ebtables extension name

Re: [PATCH v2 net] tun: Fix NULL pointer dereference in XDP redirect

2018-05-28 Thread Jason Wang
On 2018年05月28日 18:37, Toshiaki Makita wrote: Calling XDP redirection requires bh disabled. Softirq can call another XDP function and redirection functions, then the percpu static variable ri->map can be overwritten to NULL. This is a generic XDP case called from tun. [ 3535.736058] BUG:

[RFC V5 PATCH 4/8] vhost_net: do not explicitly manipulate vhost_used_elem

2018-05-28 Thread Jason Wang
Two helpers of setting/getting used len were introduced to avoid explicitly manipulating vhost_used_elem in zerocopy code. This will be used to hide used_elem internals and simplify packed ring implementation. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 11 +--

[RFC V5 PATCH 0/8] Packed ring layout for vhost

2018-05-28 Thread Jason Wang
Hi all: This RFC implement packed ring layout. The code were tested with Tiwei's RFC V5 at https://lkml.org/lkml/2018/5/22/138. Some fixups and tweaks were needed on top of Tiwei's code to make it run for event index. Pktgen reports about 20% improvement on TX PPS when doing pktgen from guest to

[RFC V5 PATCH 3/8] vhost: do not use vring_used_elem

2018-05-28 Thread Jason Wang
Instead of depending on the exported vring_used_elem, this patch switches to use a new internal structure vhost_used_elem which embed vring_used_elem in itself. This could be used to let vhost to record extra metadata for the incoming packed ring layout. Signed-off-by: Jason Wang ---

[RFC V5 PATCH 1/8] vhost: move get_rx_bufs to vhost.c

2018-05-28 Thread Jason Wang
Move get_rx_bufs() to vhost.c and rename it to vhost_get_bufs(). This helps to hide vring internal layout from specific device implementation. Packed ring implementation will benefit from this. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 83

[RFC V5 PATCH 2/8] vhost: hide used ring layout from device

2018-05-28 Thread Jason Wang
We used to return descriptor head by vhost_get_vq_desc() to device and pass it back to vhost_add_used() and its friends. This exposes the internal used ring layout to device which makes it hard to be extended for e.g packed ring layout. So this patch tries to hide the used ring layout by -

[RFC V5 PATCH 6/8] virtio: introduce packed ring defines

2018-05-28 Thread Jason Wang
Signed-off-by: Jason Wang --- include/uapi/linux/virtio_config.h | 9 + include/uapi/linux/virtio_ring.h | 13 + 2 files changed, 22 insertions(+) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 308e209..5903d51 100644 ---

[RFC V5 PATCH 8/8] vhost: event suppression for packed ring

2018-05-28 Thread Jason Wang
This patch introduces basic support for event suppression aka driver and device area. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c| 191 --- drivers/vhost/vhost.h| 10 +- include/uapi/linux/virtio_ring.h | 19 3 files

[RFC V5 PATCH 7/8] vhost: packed ring support

2018-05-28 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/net.c | 13 +- drivers/vhost/vhost.c | 585 ++ drivers/vhost/vhost.h | 13 +- 3 files changed, 566 insertions(+), 45 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[RFC V5 PATCH 5/8] vhost: vhost_put_user() can accept metadata type

2018-05-28 Thread Jason Wang
We assumes used ring update is the only user for vhost_put_user() in the past. This may not be the case for the incoming packed ring which may update the descriptor ring for used. So introduce a new type parameter. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 14 +++--- 1 file

RE: [PATCH, net-next] net: ethernet: freescale: fix false-positive string overflow warning

2018-05-28 Thread Andy Duan
From: Arnd Bergmann Sent: 2018年5月28日 23:50 > While compile-testing on arm64 with gcc-8.1, I ran into a build diagnostic: > > drivers/net/ethernet/freescale/fec_main.c: In function 'fec_probe': > drivers/net/ethernet/freescale/fec_main.c:3517:25: error: '%d' directive > writing between 1 and 10

Re: [PATCH v3 net-next 2/2] tcp: minor optimization around tcp_hdr() usage in tcp receive path

2018-05-28 Thread Yafang Shao
On Tue, May 29, 2018 at 12:36 AM, Eric Dumazet wrote: > On Mon, May 28, 2018 at 8:36 AM Yafang Shao wrote: > >> This is additional to the commit ea1627c20c34 ("tcp: minor optimizations > around tcp_hdr() usage"). >> At this point, skb->data is same with tcp_hdr() as tcp header has not >> been

[PATCH 1/9] netfilter: nf_tables: fix NULL pointer dereference on nft_ct_helper_obj_dump()

2018-05-28 Thread Pablo Neira Ayuso
From: Taehee Yoo In the nft_ct_helper_obj_dump(), always priv->helper4 is dereferenced. But if family is ipv6, priv->helper6 should be dereferenced. Steps to reproduces: #test.nft table ip6 filter { ct helper ftp { type "ftp" protocol tcp }

[PATCH 3/9] netfilter: nft_meta: fix wrong value dereference in nft_meta_set_eval

2018-05-28 Thread Pablo Neira Ayuso
From: Taehee Yoo In the nft_meta_set_eval, nftrace value is dereferenced as u32 from sreg. But correct type is u8. so that sometimes incorrect value is dereferenced. Steps to reproduce: %nft add table ip filter %nft add chain ip filter input { type filter hook input priority 4\; }

[PATCH 6/9] netfilter: provide correct argument to nla_strlcpy()

2018-05-28 Thread Pablo Neira Ayuso
From: Eric Dumazet Recent patch forgot to remove nla_data(), upsetting syzkaller a bit. BUG: KASAN: slab-out-of-bounds in nla_strlcpy+0x13d/0x150 lib/nlattr.c:314 Read of size 1 at addr 8801ad1f4fdd by task syz-executor189/4509 CPU: 1 PID: 4509 Comm: syz-executor189 Not tainted 4.17.0-rc6+

[PATCH 9/9] netfilter: nf_tables: increase nft_counters_enabled in nft_chain_stats_replace()

2018-05-28 Thread Pablo Neira Ayuso
From: Taehee Yoo When a chain is updated, a counter can be attached. if so, the nft_counters_enabled should be increased. test commands: %nft add table ip filter %nft add chain ip filter input { type filter hook input priority 4\; } %iptables-compat -Z input %nft delete chain ip

[PATCH 4/9] netfilter: nft_limit: fix packet ratelimiting

2018-05-28 Thread Pablo Neira Ayuso
Credit calculations for the packet ratelimiting are not correct, as per the applied ratelimit of 25/second and burst 8, a total of 33 packets should have been accepted. This is true in iptables(33) but not in nftables (~65). For packet ratelimiting, use: div_u64(limit->nsecs,

[PATCH 8/9] netfilter: nf_tables: fix NULL-ptr in nf_tables_dump_obj()

2018-05-28 Thread Pablo Neira Ayuso
From: Taehee Yoo The table field in nft_obj_filter is not an array. In order to check tablename, we should check if the pointer is set. Test commands: %nft add table ip filter %nft add counter ip filter ct1 %nft reset counters Splat looks like: [ 306.510504] kasan:

[PATCH 7/9] netfilter: nf_tables: disable preemption in nft_update_chain_stats()

2018-05-28 Thread Pablo Neira Ayuso
This patch fixes the following splat. [118709.054937] BUG: using smp_processor_id() in preemptible [] code: test/1571 [118709.054970] caller is nft_update_chain_stats.isra.4+0x53/0x97 [nf_tables] [118709.054980] CPU: 2 PID: 1571 Comm: test Not tainted 4.17.0-rc6+ #335 [...]

[PATCH 5/9] ipvs: fix buffer overflow with sync daemon and service

2018-05-28 Thread Pablo Neira Ayuso
From: Julian Anastasov syzkaller reports for buffer overflow for interface name when starting sync daemons [1] What we do is that we copy user structure into larger stack buffer but later we search NUL past the stack buffer. The same happens for sched_name when adding/editing virtual server.

[PATCH 0/9] Netfilter/IPVS fixes for net

2018-05-28 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter/IPVS fixes for your net tree: 1) Null pointer dereference when dumping conntrack helper configuration, from Taehee Yoo. 2) Missing sanitization in ebtables extension name through compat, from Paolo Abeni. 3) Broken fetch of tracing

[PATCH 2/9] netfilter: ebtables: handle string from userspace with care

2018-05-28 Thread Pablo Neira Ayuso
From: Paolo Abeni strlcpy() can't be safely used on a user-space provided string, as it can try to read beyond the buffer's end, if the latter is not NULL terminated. Leveraging the above, syzbot has been able to trigger the following splat: BUG: KASAN: stack-out-of-bounds in strlcpy

BUG: unable to handle kernel (3)

2018-05-28 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:861d9dd37526 Merge tag 'kbuild-fixes-v4.17-2' of git://git.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10bffd0f80 kernel config: https://syzkaller.appspot.com/x/.config?x=982e2df1b9e60b02

[PATCH net-next] net: remove bypassed check in sch_direct_xmit()

2018-05-28 Thread Song Liu
Check sch_direct_xmit() at the end of sch_direct_xmit() will be bypassed. This is because "ret" from sch_direct_xmit() will be either NETDEV_TX_OK or NETDEV_TX_BUSY, and only ret == NETDEV_TX_OK == 0 will reach the condition: if (ret && netif_xmit_frozen_or_stopped(txq)) return false;

possible deadlock in sock_hash_free

2018-05-28 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7a1a98c171ea Merge branch 'bpf-sendmsg-hook' git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=131f406780 kernel config: https://syzkaller.appspot.com/x/.config?x=e4078980b886800c dashboard link:

Re: [PATCH net-next] ifb: fix packets checksum

2018-05-28 Thread Jonathan Maxwell
On Sat, May 26, 2018 at 6:43 AM, David Miller wrote: > From: Jon Maxwell > Date: Fri, 25 May 2018 07:38:29 +1000 > >> Fixup the checksum for CHECKSUM_COMPLETE when pulling skbs on RX path. >> Otherwise we get splats when tc mirred is used to redirect packets to ifb. >> >> Before fix: >> >> nic:

Re: [PATCH v3 02/11] net: sched: change type of reference and bind counters

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:20AM +0300, Vlad Buslov wrote: > Change type of action reference counter to refcount_t. > > Change type of action bind counter to atomic_t. > This type is used to allow decrementing bind counter without testing > for 0 result. > > Signed-off-by: Vlad Buslov >

Re: [PATCH v3 05/11] net: sched: implement action API that deletes action by index

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:23AM +0300, Vlad Buslov wrote: > Implement new action API function that atomically finds and deletes action > from idr by index. Intended to be used by lockless actions that do not rely > on rtnl lock. > > Signed-off-by: Vlad Buslov Reviewed-by: Marcelo Ricardo

Re: [PATCH v3 04/11] net: sched: always take reference to action

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:22AM +0300, Vlad Buslov wrote: > Without rtnl lock protection it is no longer safe to use pointer to tc > action without holding reference to it. (it can be destroyed concurrently) > > Remove unsafe action idr lookup function. Instead of it, implement safe tcf > idr

Re: [PATCH v3 07/11] net: sched: implement reference counted action release

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:25AM +0300, Vlad Buslov wrote: > Implement helper delete function that uses new action ops 'delete', instead > of destroying action directly. This is required so act API could delete > actions by index, without holding any references to action that is being > deleted.

Re: [PATCH v3 03/11] net: sched: implement unlocked action init API

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:21AM +0300, Vlad Buslov wrote: > Add additional 'rtnl_held' argument to act API init functions. It is > required to implement actions that need to release rtnl lock before loading > kernel module and reacquire if afterwards. > > Signed-off-by: Vlad Buslov

Re: [PATCH v3 08/11] net: sched: don't release reference on action overwrite

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:26AM +0300, Vlad Buslov wrote: > Return from action init function with reference to action taken, > even when overwriting existing action. > > Action init API initializes its fourth argument (pointer to pointer to tc > action) to either existing action with same

Re: [PATCH v3 01/11] net: sched: use rcu for action cookie update

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:19AM +0300, Vlad Buslov wrote: > Implement functions to atomically update and free action cookie > using rcu mechanism. > > Signed-off-by: Vlad Buslov > Signed-off-by: Jiri Pirko Reviewed-by: Marcelo Ricardo Leitner > --- > include/net/act_api.h | 2 +- >

Re: [PATCH v3 06/11] net: sched: add 'delete' function to action ops

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:24AM +0300, Vlad Buslov wrote: > Extend action ops with 'delete' function. Each action type to implements > its own delete function that doesn't depend on rtnl lock. > > Implement delete function that is required to delete actions without > holding rtnl lock. Use

Re: [PATCH v3 09/11] net: sched: use reference counting action init

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:27AM +0300, Vlad Buslov wrote: > Change action API to assume that action init function always takes > reference to action, even when overwriting existing action. This is > necessary because action API continues to use action pointer after init > function is done. At

Re: [PATCH v3 10/11] net: sched: atomically check-allocate action

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:28AM +0300, Vlad Buslov wrote: > Implement function that atomically checks if action exists and either takes > reference to it, or allocates idr slot for action index to prevent > concurrent allocations of actions with same index. Use EBUSY error pointer > to indicate

Re: [PATCH net-next 05/14] nfp: abm: add simple RED offload

2018-05-28 Thread Jakub Kicinski
Hi Nogah! On Mon, 28 May 2018 18:49:51 +0300, Nogah Frankel wrote: > > +static int > > +nfp_abm_red_replace(struct net_device *netdev, struct nfp_abm_link *alink, > > + struct tc_red_qopt_offload *opt) > > +{ > > + struct nfp_port *port = nfp_port_from_netdev(netdev); > > + int

Re: [PATCH net] sctp: not allow to set rto_min with a value below 200 msecs

2018-05-28 Thread Marcelo Ricardo Leitner
On Sat, May 26, 2018 at 09:01:00PM -0400, Neil Horman wrote: > On Sat, May 26, 2018 at 05:50:39PM +0200, Dmitry Vyukov wrote: > > On Sat, May 26, 2018 at 5:42 PM, Michael Tuexen > > wrote: > > >> On 25. May 2018, at 21:13, Neil Horman wrote: > > >> > > >> On Sat, May 26, 2018 at 01:41:02AM

Re: [PATCH net-next v16 4/8] netfilter: Add nf_ct_get_tuple_skb callback

2018-05-28 Thread Toke Høiland-Jørgensen
Pablo Neira Ayuso writes: > On Mon, May 28, 2018 at 04:27:46PM +0200, Toke Høiland-Jørgensen wrote: > [...] >> diff --git a/net/netfilter/core.c b/net/netfilter/core.c >> index 0f6b8172fb9a..520565198f0e 100644 >> --- a/net/netfilter/core.c >> +++ b/net/netfilter/core.c >> @@ -572,6 +572,27 @@

Re: [PATCH v3 11/11] net: sched: change action API to use array of pointers to actions

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 12:17:29AM +0300, Vlad Buslov wrote: ... > -int tcf_action_destroy(struct list_head *actions, int bind) > +int tcf_action_destroy(struct tc_action *actions[], int bind) > { > const struct tc_action_ops *ops; > - struct tc_action *a, *tmp; > - int ret = 0; > +

Re: [PATCH] iptables-compat: homogenize error message

2018-05-28 Thread Pablo Neira Ayuso
On Sun, May 27, 2018 at 06:39:01PM +0530, Arushi Singhal wrote: > There is a difference between error messages in iptables and > iptables-compat: > > #sudo iptables-compat -D INPUT 4 > iptables: No chain/target/match by that name. > > #sudo iptables -D INPUT 4 > iptables: Index of deletion too

Re: [PATCH net-next] netfilter: nat: make symbol nat_hook static

2018-05-28 Thread Pablo Neira Ayuso
On Sat, May 26, 2018 at 09:48:53AM +, Wei Yongjun wrote: > Fixes the following sparse warning: > > net/netfilter/nf_nat_core.c:1039:20: warning: > symbol 'nat_hook' was not declared. Should it be static? Applied, thanks.

[PATCH net-next v17 5/8] sch_cake: Add NAT awareness to packet classifier

2018-05-28 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack

[PATCH net-next v17 3/8] sch_cake: Add optional ACK filter

2018-05-28 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs

[PATCH net-next v17 0/8] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-28 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most

[PATCH net-next v17 6/8] sch_cake: Add DiffServ handling

2018-05-28 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple,

[PATCH net-next v17 2/8] sch_cake: Add ingress mode

2018-05-28 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to

[PATCH net-next v17 1/8] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-28 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth

[PATCH net-next v17 4/8] netfilter: Add nf_ct_get_tuple_skb global lookup function

2018-05-28 Thread Toke Høiland-Jørgensen
This adds a global netfilter function to extract a conntrack tuple from an skb. The function uses a new function added to nf_ct_hook, which will try to get the tuple from skb->_nfct, and do a full lookup if that fails. This makes it possible to use the lookup function before the skb has passed

[PATCH net-next v17 8/8] sch_cake: Conditionally split GSO segments

2018-05-28 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on

[PATCH net-next v17 7/8] sch_cake: Add overhead compensation support to the rate shaper

2018-05-28 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature

Re: [PATCH net-next v16 5/8] sch_cake: Add NAT awareness to packet classifier

2018-05-28 Thread Toke Høiland-Jørgensen
Pablo Neira Ayuso writes: > On Mon, May 28, 2018 at 04:27:46PM +0200, Toke Høiland-Jørgensen wrote: >> When CAKE is deployed on a gateway that also performs NAT (which is a >> common deployment mode), the host fairness mechanism cannot distinguish >> internal hosts from each other, and so fails

Re: Is it possible to get device information via CMSG?

2018-05-28 Thread Eric S. Raymond
Michal Kubecek : > > 1. Is there a cmsg_level/cmsg_type combination that will return the > > name of the device the packet arrived through? > > Not name directly, AFAIK, but you can set SOL_IP / IP_PKTINFO (or > SOL_IPV6 / IPV6_RECVPKTINFO) socket option and get IP_PKTINFO > (IPV6_PKTINFO)

Re: [PATCH net-next v16 5/8] sch_cake: Add NAT awareness to packet classifier

2018-05-28 Thread Pablo Neira Ayuso
On Mon, May 28, 2018 at 04:27:46PM +0200, Toke Høiland-Jørgensen wrote: > When CAKE is deployed on a gateway that also performs NAT (which is a > common deployment mode), the host fairness mechanism cannot distinguish > internal hosts from each other, and so fails to work correctly. > > To fix

Proposal

2018-05-28 Thread Miss Zeliha Omer Faruk
-- Hello I have been trying to contact you. Did you get my business proposal? Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turke

Re: [PATCH 3/4 RFCv2] net: dsa: realtek-smi: Add Realtek SMI driver

2018-05-28 Thread Andrew Lunn
> +struct rtl8366_mib_counter { > + unsignedbase; > + unsignedoffset; > + unsignedlength; > + const char *name; > +}; > +void rtl8366_get_strings(struct dsa_switch *ds, int port, uint8_t *data) > +{ > + struct realtek_smi *smi = ds->priv; > +

Re: [PATCH net-next v16 4/8] netfilter: Add nf_ct_get_tuple_skb callback

2018-05-28 Thread Pablo Neira Ayuso
On Mon, May 28, 2018 at 04:27:46PM +0200, Toke Høiland-Jørgensen wrote: [...] > diff --git a/net/netfilter/core.c b/net/netfilter/core.c > index 0f6b8172fb9a..520565198f0e 100644 > --- a/net/netfilter/core.c > +++ b/net/netfilter/core.c > @@ -572,6 +572,27 @@ void nf_conntrack_destroy(struct

Re: [RFC net-next 0/4] net: sched: support replay of filter offload when binding to block

2018-05-28 Thread Jakub Kicinski
On Mon, 28 May 2018 13:48:28 +0300, Or Gerlitz wrote: > On Fri, May 25, 2018 at 5:25 AM, Jakub Kicinski wrote: > > This series from John adds the ability to replay filter offload requests > > when new offload callback is being registered on a TC block. This is most > > likely to take place for

Re: [PATCH 3/4 RFCv2] net: dsa: realtek-smi: Add Realtek SMI driver

2018-05-28 Thread Andrew Lunn
> +#ifdef CONFIG_RTL8366_SMI_DEBUG_FS > + struct dentry *debugfs_root; > + u8 dbg_vlan_4k_page; > +#endif Hi Linus I think you forgot to remove this. Andrew

[PATCH 3/4 RFCv2] net: dsa: realtek-smi: Add Realtek SMI driver

2018-05-28 Thread Linus Walleij
This adds a driver core for the Realtek SMI chips and a subdriver for the RTL8366RB. I just added this chip simply because it is all I can test. The code is a massaged variant of the code that has been sitting out-of-tree in OpenWRT for years in the absence of a proper switch subsystem. I have

[PATCH 2/4 RFCv2] net: dsa: Add bindings for Realtek SMI DSAs

2018-05-28 Thread Linus Walleij
The Realtek SMI family is a set of DSA chips that provide switching in routers. This binding just follows the pattern set by other switches but with the introduction of an embedded irqchip to demux and handle the interrupts fired by the single line from the chip. This interrupt construction is

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-28 Thread Greg Thelen
Jason Gunthorpe wrote: On Fri, May 25, 2018 at 05:32:52PM -0700, Greg Thelen wrote: On Fri, May 25, 2018 at 2:32 PM Arnd Bergmann wrote: > Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends > on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a >

Re: INFO: rcu detected stall in is_bpf_text_address

2018-05-28 Thread Marcelo Ricardo Leitner
On Sun, May 20, 2018 at 04:26:03PM +0800, Xin Long wrote: > On Sat, May 19, 2018 at 11:57 PM, Eric Dumazet wrote: > > SCTP experts, please take a look. > > > > On 05/19/2018 08:55 AM, syzbot wrote: > >> Hello, > >> > >> syzbot found the following crash on: > >> > >> HEAD commit:73fcb1a370c7

[PATCH 0/4 RFCv2] Realtek SMI RTL836x DSA driver

2018-05-28 Thread Linus Walleij
This is a second RFC version of the DSA driver for Realtek RTL8366x especially RTL8366RB. I've been beating my head against this one and I'm not really clear on why my ethernet frames are not coming through to the CPU port on the chip. It appears when using ethtool -S on the ports that packets

[PATCH 1/4 RFCv2] net: phy: realtek: Support RTL8366RB variant

2018-05-28 Thread Linus Walleij
The RTL8366RB is an ASIC with five internal PHYs for LAN0..LAN3 and WAN. The PHYs are spawn off the main device so they can be handled in a distributed manner by the Realtek PHY driver. All that is really needed is the power save feature enablement and letting the PHY driver core pick up the IRQ

[PATCH 4/4 RFCv2] ARM: dts: Add ethernet and switch to D-Link DIR-685

2018-05-28 Thread Linus Walleij
This adds the Ethernet and Realtek switch device to the D-Link DIR-685 Gemini-based device. Signed-off-by: Linus Walleij --- ChangeLog RFCv1->RFCv2 - Rebased, use the new DT bindings --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 153 - 1 file changed, 152 insertions(+), 1

  1   2   3   >