Re: [PATCH v2 net-next] net:sched: add action inheritdsfield to skbedit

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 05:40:18AM +, Fu, Qiaobin wrote: > The new action inheritdsfield copies the field DS of > IPv4 and IPv6 packets into skb->priority. This enables > later classification of packets based on the DS field. > > Original idea by Jamal Hadi Salim > >

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

2018-05-28 Thread Arnd Bergmann
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 bytes into a region of size 5

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

2018-05-28 Thread Michal Kubecek
On Sat, May 26, 2018 at 05:39:12AM -0400, Eric S. Raymond wrote: > I'm trying to untangle some nasty code in the Mills implementation of > NTP. I could simplify it a lot if there were a way to query a packet > to find out the name of the network interface it arrived on. (At the > moment the code

[PATCH v3 net-next 1/2] tcp: use data length instead of skb->len in tcp_probe

2018-05-28 Thread Yafang Shao
At this point skb->len is including tcp header length, so it is meaningless to user. data length could be more helpful, with which we can easily filter out the packet without payload. Cc: Eric Dumazet Acked-by: Song Liu Signed-off-by: Yafang Shao

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

2018-05-28 Thread Nogah Frankel
On 26-May-18 7:53 AM, Jakub Kicinski wrote: Offload simple RED configurations. For now support only DCTCP like scenarios where min and max are the same. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/abm/main.c | 82 +++

Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Nikolay Aleksandrov
On 28/05/18 18:44, Petr Machata wrote: > Callers of br_fdb_find() need to hold the hash lock, which > br_fdb_find_port() doesn't do. Add the missing lock/unlock > pair. > > Signed-off-by: Petr Machata > --- > net/bridge/br_fdb.c | 2 ++ > 1 file changed, 2 insertions(+) > >

Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format

2018-05-28 Thread Jason Gunthorpe
On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote: > From: Yonatan Cohen > > The new mini-CQE format includes the stride index, byte count and > packet checksum. > Stride index is needed for striding WQ feature. > This patch exposes this capability and

[PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Petr Machata
Callers of br_fdb_find() need to hold the hash lock, which br_fdb_find_port() doesn't do. Add the missing lock/unlock pair. Signed-off-by: Petr Machata --- net/bridge/br_fdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c

Re: [PATCH v2 net-next] net:sched: add action inheritdsfield to skbedit

2018-05-28 Thread Jamal Hadi Salim
On 28/05/18 11:42 AM, Marcelo Ricardo Leitner wrote: On Mon, May 28, 2018 at 05:40:18AM +, Fu, Qiaobin wrote: The new action inheritdsfield copies the field DS of IPv4 and IPv6 packets into skb->priority. This enables later classification of packets based on the DS field. Original idea by

[PATCH net] ixgbe: fix parsing of TC actions for HW offload

2018-05-28 Thread Ondřej Hlavatý
The previous code was optimistic, accepting the offload of whole action chain when there was a single known action (drop/redirect). This results in offloading a rule which should not be offloaded, because its behavior cannot be reproduced in the hardware. For example: $ tc filter add dev eno1

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

2018-05-28 Thread Jason Gunthorpe
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 > > link

Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format

2018-05-28 Thread Yishai Hadas
On 5/28/2018 7:11 PM, Jason Gunthorpe wrote: On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote: From: Yonatan Cohen The new mini-CQE format includes the stride index, byte count and packet checksum. Stride index is needed for striding WQ feature. This patch exposes this

Re: [PATCH rdma-next v1 11/13] IB/mlx5: Add flow counters binding support

2018-05-28 Thread Jason Gunthorpe
On Sun, May 27, 2018 at 01:23:44PM +0300, Leon Romanovsky wrote: > + if (!mcounters->hw_cntrs_hndl) { > + mcounters->hw_cntrs_hndl = > + (void > *)mlx5_fc_create(to_mdev(ibcounters->device)->mdev, > +false); No

Re: possible deadlock in bpf_tcp_close

2018-05-28 Thread syzbot
syzbot has found a reproducer for 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=149ae2b780 kernel config: https://syzkaller.appspot.com/x/.config?x=e4078980b886800c

Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format

2018-05-28 Thread Jason Gunthorpe
On Mon, May 28, 2018 at 07:52:03PM +0300, Yishai Hadas wrote: > On 5/28/2018 7:11 PM, Jason Gunthorpe wrote: > >On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote: > >>From: Yonatan Cohen > >> > >>The new mini-CQE format includes the stride index, byte count and > >>packet checksum.

Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Stephen Hemminger
On Mon, 28 May 2018 17:44:16 +0200 Petr Machata wrote: > Callers of br_fdb_find() need to hold the hash lock, which > br_fdb_find_port() doesn't do. Add the missing lock/unlock > pair. > > Signed-off-by: Petr Machata > --- > net/bridge/br_fdb.c | 2 ++ > 1 file changed, 2 insertions(+) > >

Re: [PATCH net] net: sched: check netif_xmit_frozen_or_stopped() in sch_direct_xmit()

2018-05-28 Thread Song Liu
> On May 26, 2018, at 12:43 PM, John Fastabend wrote: > > On 05/25/2018 12:46 PM, Song Liu wrote: >> On Fri, May 25, 2018 at 11:11 AM, Song Liu wrote: >>> Summary: >>> >>> At the end of sch_direct_xmit(), we are in the else path of >>> !dev_xmit_complete(ret), which means ret ==

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

Re: Unable to create ip alias on bridge interface

2018-05-28 Thread Akshat Kakkar
Thanks for clarifying that first ip will be used as primary ip. I have 2 further queries on this. 1. How can this survive across reboots without having a custom script on boot up? Like some ifcfg file,etc. 2. is there a way to tell to make a given ip as primary, irrespective of order? On Mon, May

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

2018-05-28 Thread Andrew Lunn
On Mon, May 28, 2018 at 07:47:48PM +0200, Linus Walleij wrote: > 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

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

2018-05-28 Thread Andrew Lunn
> +Examples: > + > +switch { > + compatible = "realtek,rtl8366rb"; > + /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */ > + mdc-gpios = < 21 GPIO_ACTIVE_HIGH>; > + mdio-gpios = < 22 GPIO_ACTIVE_HIGH>; > + reset-gpios = < 14 GPIO_ACTIVE_LOW>; > + > +

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

2018-05-28 Thread Marcelo Ricardo Leitner
On Sun, May 27, 2018 at 10:58:35AM +0200, Michael Tuexen wrote: ... > >>> Patch looks fine, you probably want to note this hard minimum in man(7) > >>> sctp as > >>> well > >>> > >> I'm aware of some signalling networks which use RTO.min of smaller values > >> than 200ms. > >> So could this be

[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

[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 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

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

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 >

[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

[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

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

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 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: [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; > +

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 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

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 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

[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

[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

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.

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 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 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 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 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 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 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 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 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:

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:

[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;

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 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

[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 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 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 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 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

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

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

[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

[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 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 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 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 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 ---

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:

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

[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: [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] 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: [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 >

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] 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

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 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

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] 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 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

  1   2   3   >