[PATCH 2/2 nf-next] netfilter: nft_meta: Add NFT_META_BRI_VLAN support

2019-06-19 Thread wenxu
From: wenxu nft add table bridge firewall nft add chain bridge firewall zones { type filter hook prerouting priority - 300 \; } nft add rule bridge firewall zones counter ct zone set vlan id map { 100 : 1, 200 : 2 } As above set the bridge port with pvid, the received packet don't contain the

[PATCH 1/2 nf-next] netfilter: nft_meta: add NFT_META_BRI_PVID support

2019-06-19 Thread wenxu
From: wenxu nft add table bridge firewall nft add chain bridge firewall zones { type filter hook prerouting priority - 300 \; } nft add rule bridge firewall zones counter ct zone set vlan id map { 100 : 1, 200 : 2 } As above set the bridge port with pvid, the received packet don't contain the

Re: [PATCH mlx5-next 11/15] RDMA/mlx5: Add vport metadata matching for IB representors

2019-06-19 Thread Mark Bloch
On 6/18/2019 23:51, Leon Romanovsky wrote: > On Wed, Jun 19, 2019 at 06:40:16AM +, Jianbo Liu wrote: >> The 06/19/2019 13:04, Leon Romanovsky wrote: >>> On Wed, Jun 19, 2019 at 04:44:26AM +, Jianbo Liu wrote: The 06/18/2019 18:19, Leon Romanovsky wrote: > On Mon, Jun 17, 2019 at

[PATCH V3] can: flexcan: fix stop mode acknowledgment

2019-06-19 Thread Joakim Zhang
To enter stop mode, the CPU should manually assert a global Stop Mode request and check the acknowledgment asserted by FlexCAN. The CPU must only consider the FlexCAN in stop mode when both request and acknowledgment conditions are satisfied. Fixes: de3578c198c6 ("can: flexcan: add self wakeup sup

Re: [PATCH mlx5-next 11/15] RDMA/mlx5: Add vport metadata matching for IB representors

2019-06-19 Thread Leon Romanovsky
On Wed, Jun 19, 2019 at 07:26:54AM +, Mark Bloch wrote: > > > On 6/18/2019 23:51, Leon Romanovsky wrote: > > On Wed, Jun 19, 2019 at 06:40:16AM +, Jianbo Liu wrote: > >> The 06/19/2019 13:04, Leon Romanovsky wrote: > >>> On Wed, Jun 19, 2019 at 04:44:26AM +, Jianbo Liu wrote: > The

[net-next, PATCH 2/2] net: netsec: remove loops in napi Rx process

2019-06-19 Thread Ilias Apalodimas
netsec_process_rx was running in a loop trying to process as many packets as possible before re-enabling interrupts. With the recent DMA changes this is not needed anymore as we manage to consume all the budget without looping over the function. Since it has no performance penalty let's remove that

[net-next, PATCH 1/2] net: netsec: initialize tx ring on ndo_open

2019-06-19 Thread Ilias Apalodimas
Since we changed the Tx ring handling and now depend not bit31 to figure out the owner of the descriptor, we should initialize this every time the device goes down-up instead of doing it once on driver init. If the value is not correctly initialized the device won't have any available descriptors

Re: [PATCH mlx5-next 11/15] RDMA/mlx5: Add vport metadata matching for IB representors

2019-06-19 Thread Mark Bloch
On 6/19/2019 00:43, Leon Romanovsky wrote: > On Wed, Jun 19, 2019 at 07:26:54AM +, Mark Bloch wrote: >> >> >> On 6/18/2019 23:51, Leon Romanovsky wrote: >>> On Wed, Jun 19, 2019 at 06:40:16AM +, Jianbo Liu wrote: The 06/19/2019 13:04, Leon Romanovsky wrote: > On Wed, Jun 19, 2019

Re: [PATCH mlx5-next 11/15] RDMA/mlx5: Add vport metadata matching for IB representors

2019-06-19 Thread Leon Romanovsky
On Wed, Jun 19, 2019 at 07:58:51AM +, Mark Bloch wrote: > > > On 6/19/2019 00:43, Leon Romanovsky wrote: > > On Wed, Jun 19, 2019 at 07:26:54AM +, Mark Bloch wrote: > >> > >> > >> On 6/18/2019 23:51, Leon Romanovsky wrote: > >>> On Wed, Jun 19, 2019 at 06:40:16AM +, Jianbo Liu wrote: >

[no subject]

2019-06-19 Thread Системный администратор .
ВНИМАНИЕ; В вашем почтовом ящике превышен лимит хранилища, который составляет 5 ГБ, как определено администратором, который в настоящее время работает на 10,9 ГБ. Возможно, вы не сможете отправлять или получать новую почту, пока вы не подтвердите свою почту. Чтобы подтвердить свой почтовый ящик

Re: [RFC bpf-next 0/7] Programming socket lookup with BPF

2019-06-19 Thread Jakub Sitnicki
Hey Florian, Thanks for taking a look at it. On Tue, Jun 18, 2019 at 03:52 PM CEST, Florian Westphal wrote: > Jakub Sitnicki wrote: >> - XDP programs using bpf_sk_lookup helpers, like load balancers, can't >>find the listening socket to check for SYN cookies with TPROXY redirect. > > Sorry

Re: [RFC PATCH 0/2] enable broadcom tagging for bcm531x5 switches

2019-06-19 Thread Benedikt Spranger
On Tue, 18 Jun 2019 11:16:23 -0700 Florian Fainelli wrote: > How is that a problem for other machines? Does that lead to some kind > of broadcast storm because there are machines that keep trying to > respond to ARP solicitations? Mirroring broadcast packages on the interface they are coming in,

Re: [net-next, PATCH 1/2] net: netsec: initialize tx ring on ndo_open

2019-06-19 Thread Ard Biesheuvel
On Wed, 19 Jun 2019 at 09:57, Ilias Apalodimas wrote: > > Since we changed the Tx ring handling and now depend not bit31 to figure s/not/on/ > out the owner of the descriptor, we should initialize this every time > the device goes down-up instead of doing it once on driver init. If the > value i

Re: [net-next, PATCH 2/2] net: netsec: remove loops in napi Rx process

2019-06-19 Thread Ard Biesheuvel
On Wed, 19 Jun 2019 at 09:57, Ilias Apalodimas wrote: > > netsec_process_rx was running in a loop trying to process as many packets > as possible before re-enabling interrupts. With the recent DMA changes > this is not needed anymore as we manage to consume all the budget without > looping over th

[PATCH v3 02/16] dt-bindings: net: Add a YAML schemas for the generic PHY options

2019-06-19 Thread Maxime Ripard
The networking PHYs have a number of available device tree properties that can be used in their device tree node. Add a YAML schemas for those. Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Changes from v1: - Add missing compatible options - add missin

[PATCH v3 01/16] dt-bindings: net: Add YAML schemas for the generic Ethernet options

2019-06-19 Thread Maxime Ripard
The Ethernet controllers have a good number of generic options that can be needed in a device tree. Add a YAML schemas for those. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Changes from v2: - Add back the deprecated properties using the deprecated keyword Changes from v1: -

[PATCH v3 04/16] MAINTAINERS: Add Ethernet PHY YAML file

2019-06-19 Thread Maxime Ripard
While the Ethernet PHY framework was marked as maintained, the device tree bindings associated to that framework was not listed under the maintained files. Fix that. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Ripard --- Changes from v1: - New patch --- MAINTAINERS | 1 + 1 file changed,

[PATCH v3 11/16] dt-bindings: net: dwmac: Deprecate the PHY reset properties

2019-06-19 Thread Maxime Ripard
Even though the DWMAC driver uses some driver specific properties, the PHY core has a bunch of generic properties and can deal with them nicely. Let's deprecate our specific properties. Reviewed-by: Martin Blumenstingl Signed-off-by: Maxime Ripard --- Changes from v2: - Use the deprecated k

[PATCH v3 05/16] dt-bindings: net: phy: The interrupt property is not mandatory

2019-06-19 Thread Maxime Ripard
Unlike what was initially claimed in the PHY binding, the interrupt property of a PHY can be omitted, and the OS will turn to polling instead. Document that. Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/ethernet-phy.y

[PATCH v3 03/16] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-19 Thread Maxime Ripard
The MDIO buses have a number of available device tree properties that can be used in their device tree node. Add a YAML schemas for those. Suggested-by: Andrew Lunn Signed-off-by: Maxime Ripard --- Changes from v2: - New patch --- Documentation/devicetree/bindings/net/mdio.txt | 38 +--

[PATCH v3 06/16] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

2019-06-19 Thread Maxime Ripard
Switch our Allwinner A10 EMAC controller binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard --- Changes from v2: - Switch from the deprecated phy property to phy-handle --- Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml | 55 +

[PATCH v3 08/16] dt-bindings: net: stmmac: Convert the binding to a schemas

2019-06-19 Thread Maxime Ripard
Switch the STMMAC / Synopsys DesignWare MAC controller binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard --- Changes from v2: - Switch to phy-connection-type instead of phy-mode - Fix the snps,*pbl properties type Changes from v1: - Restrict snps,tso to o

[PATCH v3 10/16] dt-bindings: net: sun8i-emac: Convert the binding to a schemas

2019-06-19 Thread Maxime Ripard
Switch our Allwinner H3 EMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Signed-off-by: Maxime Ripard --- Changes from v2: - Switch to phy-connection-ty

[PATCH v3 14/16] ARM: dts: sunxi: Switch from phy-mode to phy-connection-type

2019-06-19 Thread Maxime Ripard
The phy-mode device tree property has been deprecated in favor of phy-connection-type, let's replace it. Signed-off-by: Maxime Ripard --- Changes from v2: - new patch --- arch/arm/boot/dts/sun6i-a31-colombus.dts | 2 +- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +- arch/

[PATCH v3 09/16] dt-bindings: net: sun7i-gmac: Convert the binding to a schemas

2019-06-19 Thread Maxime Ripard
Switch our Allwinner A20 GMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Changes from v2: -

[PATCH v3 13/16] ARM: dts: sunxi: Switch from phy to phy-handle

2019-06-19 Thread Maxime Ripard
The phy device tree property has been deprecated in favor of phy-handle, let's replace it. Signed-off-by: Maxime Ripard --- Changes from v2: - new patch --- arch/arm/boot/dts/sun4i-a10-a1000.dts| 2 +- arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 2 +- arch/arm/boot

[PATCH v3 15/16] ARM: dts: sunxi: h3/h5: Switch from phy-mode to phy-connection-type

2019-06-19 Thread Maxime Ripard
The phy-mode device tree property has been deprecated in favor of phy-connection-type, let's replace it. Signed-off-by: Maxime Ripard --- Changes from v2: - new patch --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts| 2 +- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts

[PATCH v3 12/16] ARM: dts: sunxi: Switch to the generic PHY properties

2019-06-19 Thread Maxime Ripard
The DWMAC specific properties to manage the PHY have been superseeded by the generic PHY properties. Let's move to it. Reviewed-by: Andrew Lunn Tested-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- This patch should go through arm-soc. Changes from v1: - New patch --- arch/arm/boot/dts

[PATCH v3 07/16] dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

2019-06-19 Thread Maxime Ripard
Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard --- Changes from v2: - Add the generic MDIO YAML schema Changes from v1: - Add a select statement with the deprecated compatible, and remove it from the valid com

[PATCH v3 16/16] arm64: dts: allwinner: Switch from phy-mode to phy-connection-type

2019-06-19 Thread Maxime Ripard
The phy-mode device tree property has been deprecated in favor of phy-connection-type, let's replace it. Signed-off-by: Maxime Ripard --- Changes from v2: - new patch --- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts| 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-

[net-next, PATCH 2/2, v2] net: netsec: remove loops in napi Rx process

2019-06-19 Thread Ilias Apalodimas
netsec_process_rx was running in a loop trying to process as many packets as possible before re-enabling interrupts. With the recent DMA changes this is not needed anymore as we manage to consume all the budget without looping over the function. Since it has no performance penalty let's remove that

[net-next, PATCH 1/2, v2] net: netsec: initialize tx ring on ndo_open

2019-06-19 Thread Ilias Apalodimas
Since we changed the Tx ring handling and now depends on bit31 to figure out the owner of the descriptor, we should initialize this every time the device goes down-up instead of doing it once on driver init. If the value is not correctly initialized the device won't have any available descriptors

BPF NULL pointer deref + processes hang on sparc64

2019-06-19 Thread Meelis Roos
Tried todays git on Sun V445 (sparc64). It booted up fine but userspace hangs during apt upgrade setup triggers. Linux version 5.2.0-rc5-00224-gbed3c0d84e7e (mroos@v445) (gcc version 8.3.0 (Debian 8.3.0-7)) #33 SMP Wed Jun 19 11:26:36 EEST 2019 Dmesg has this: [ 3511.042187] Unable to handle

Re: [PATCH net-next v1 08/11] xdp: tracking page_pool resources and safe removal

2019-06-19 Thread Ivan Khoronzhuk
On Tue, Jun 18, 2019 at 08:54:07PM +0300, Ivan Khoronzhuk wrote: Hi, Jesper On Tue, Jun 18, 2019 at 05:19:51PM +0200, Jesper Dangaard Brouer wrote: [...] If we had to allow page_pool to be registered twice, via xdp_rxq_info_reg_mem_model() then I guess we could extend page_pool with a usage

Re: [PATCH mlx5-next 05/15] net/mlx5: E-Switch, Tag packet with vport number in VF vports and uplink ingress ACLs

2019-06-19 Thread Jianbo Liu
The 06/18/2019 18:31, Parav Pandit wrote: > > > > -Original Message- > > From: netdev-ow...@vger.kernel.org On > > Behalf Of Saeed Mahameed > > Sent: Tuesday, June 18, 2019 12:53 AM > > To: Saeed Mahameed ; Leon Romanovsky > > > > Cc: netdev@vger.kernel.org; linux-r...@vger.kernel.org;

Re: [PATCH v3 01/16] dt-bindings: net: Add YAML schemas for the generic Ethernet options

2019-06-19 Thread Andrew Lunn
Hi Maxime > + phy-connection-type: > +description: > + Operation mode of the PHY interface > +enum: > + # There is not a standard bus between the MAC and the PHY, > + # something proprietary is being used to embed the PHY in the > + # MAC. ... > + > + phy-mode: > +

Re: [PATCH net-next 0/8] mlxsw: Implement flower ingress device matching offload

2019-06-19 Thread David Miller
From: Ido Schimmel Date: Wed, 19 Jun 2019 09:41:01 +0300 > From: Ido Schimmel > > Jiri says: > > In case of using shared block, user might find it handy to be able to insert > filters to match on particular ingress device. This patchset exposes the > ingress ifindex through flow_dissector and

Re: [PATCH v3 10/16] dt-bindings: net: sun8i-emac: Convert the binding to a schemas

2019-06-19 Thread Rob Herring
On Wed, Jun 19, 2019 at 3:48 AM Maxime Ripard wrote: > > Switch our Allwinner H3 EMAC controller binding to a YAML schema to enable > the DT validation. Since that controller is based on a Synopsys IP, let's > add the validation to that schemas with a bunch of conditionals. > > Signed-off-by: Maxi

Re: [PATCH v3 08/16] dt-bindings: net: stmmac: Convert the binding to a schemas

2019-06-19 Thread Rob Herring
On Wed, Jun 19, 2019 at 3:48 AM Maxime Ripard wrote: > > Switch the STMMAC / Synopsys DesignWare MAC controller binding to a YAML > schema to enable the DT validation. > > Signed-off-by: Maxime Ripard > > --- > > Changes from v2: > - Switch to phy-connection-type instead of phy-mode > - Fix t

[PATCH iproute2 v2 2/2] uapi: update if_link.h

2019-06-19 Thread Denis Kirjanov
update if_link.h to commit 75345f888f700c4ab2448287e35d48c760b202e6 ("ipoib: show VF broadcast address") Signed-off-by: Denis Kirjanov --- include/uapi/linux/if_link.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index bfe7f

[PATCH iproute2 v2 1/2] ipaddress: correctly print a VF hw address in the IPoIB case

2019-06-19 Thread Denis Kirjanov
Current code assumes that we print Etheret mac and that doesn't work in IPoIB case with SRIOV-enabled hardware Before: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:f

Re: [PATCH v3 14/16] ARM: dts: sunxi: Switch from phy-mode to phy-connection-type

2019-06-19 Thread Andrew Lunn
On Wed, Jun 19, 2019 at 11:47:23AM +0200, Maxime Ripard wrote: > The phy-mode device tree property has been deprecated in favor of > phy-connection-type, let's replace it. Hi Maxime net/ethernet/stmicro/stmmac/dwmac-mediatek.c: dev_err(plat->dev, "not find phy-mode\n"); net/ethernet/st

Re: [PATCH v3 03/16] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-19 Thread Rob Herring
On Wed, Jun 19, 2019 at 3:47 AM Maxime Ripard wrote: > > The MDIO buses have a number of available device tree properties that can > be used in their device tree node. Add a YAML schemas for those. > > Suggested-by: Andrew Lunn > Signed-off-by: Maxime Ripard > > --- > > Changes from v2: > - Ne

Re: [PATCH v3 07/16] dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

2019-06-19 Thread Rob Herring
On Wed, Jun 19, 2019 at 3:48 AM Maxime Ripard wrote: > > Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable > the DT validation. > > Signed-off-by: Maxime Ripard > > --- > > Changes from v2: > - Add the generic MDIO YAML schema > > Changes from v1: > - Add a select st

Re: [net-next, PATCH 1/2, v2] net: netsec: initialize tx ring on ndo_open

2019-06-19 Thread David Miller
From: Ilias Apalodimas Date: Wed, 19 Jun 2019 13:04:00 +0300 > Since we changed the Tx ring handling and now depends on bit31 to figure > out the owner of the descriptor, we should initialize this every time > the device goes down-up instead of doing it once on driver init. If the > value is not

Re: [net-next, PATCH 2/2, v2] net: netsec: remove loops in napi Rx process

2019-06-19 Thread David Miller
From: Ilias Apalodimas Date: Wed, 19 Jun 2019 13:04:01 +0300 > netsec_process_rx was running in a loop trying to process as many packets > as possible before re-enabling interrupts. With the recent DMA changes > this is not needed anymore as we manage to consume all the budget without > looping o

[PATCH nf-next] netfilter: bridge: Fix non-untagged fragment packet

2019-06-19 Thread wenxu
From: wenxu ip netns exec ns1 ip a a dev eth0 10.0.0.7/24 ip netns exec ns2 ip link a link eth0 name vlan type vlan id 200 ip netns exec ns2 ip a a dev vlan 10.0.0.8/24 ip l add dev br0 type bridge vlan_filtering 1 brctl addif br0 veth1 brctl addif br0 veth2 bridge vlan add dev veth1 vid 200 pv

Re: [PATCH v3 06/16] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

2019-06-19 Thread Rob Herring
On Wed, Jun 19, 2019 at 3:48 AM Maxime Ripard wrote: > > Switch our Allwinner A10 EMAC controller binding to a YAML schema to enable > the DT validation. > > Signed-off-by: Maxime Ripard > > --- > > Changes from v2: > - Switch from the deprecated phy property to phy-handle > --- > Documentatio

Re: [PATCH v3 11/16] dt-bindings: net: dwmac: Deprecate the PHY reset properties

2019-06-19 Thread Rob Herring
On Wed, Jun 19, 2019 at 3:47 AM Maxime Ripard wrote: > > Even though the DWMAC driver uses some driver specific properties, the PHY > core has a bunch of generic properties and can deal with them nicely. > > Let's deprecate our specific properties. > > Reviewed-by: Martin Blumenstingl > Signed-of

Re: [PATCH net-next v2 00/12] xdp: page_pool fixes and in-flight accounting

2019-06-19 Thread David Miller
From: Jesper Dangaard Brouer Date: Tue, 18 Jun 2019 15:05:07 +0200 > This patchset fix page_pool API and users, such that drivers can use it for > DMA-mapping. A number of places exist, where the DMA-mapping would not get > released/unmapped, all these are fixed. This occurs e.g. when an xdp_fram

Re: [PATCH net-next 0/2] inet: fix defrag units dismantle races

2019-06-19 Thread David Miller
From: Eric Dumazet Date: Tue, 18 Jun 2019 11:08:58 -0700 > This series add a new pre_exit() method to struct pernet_operations > to solve a race in defrag units dismantle, without adding extra > delays to netns dismantles. Series applied, thanks Eric.

Re: [PATCH net-next 4/8] tcp: undo init congestion window on false SYNACK timeout

2019-06-19 Thread Eric Dumazet
On 4/29/19 3:46 PM, Yuchung Cheng wrote: > Linux implements RFC6298 and use an initial congestion window > of 1 upon establishing the connection if the SYNACK packet is > retransmitted 2 or more times. In cellular networks SYNACK timeouts > are often spurious if the wireless radio was dormant or

Re: [PATCH net-next 3/5] ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic

2019-06-19 Thread David Miller
From: Wei Wang Date: Tue, 18 Jun 2019 11:25:41 -0700 > @@ -237,13 +240,16 @@ static int __fib6_rule_action(struct fib_rule *rule, > struct flowi *flp, > goto out; > } > again: > - ip6_rt_put(rt); > + if (!(flags & RT6_LOOKUP_F_DST_NOREF) || > + !list_

[PATCH net] inet: clear num_timeout reqsk_alloc()

2019-06-19 Thread Eric Dumazet
KMSAN caught uninit-value in tcp_create_openreq_child() [1] This is caused by a recent change, combined by the fact that TCP cleared num_timeout, num_retrans and sk fields only when a request socket was about to be queued. Under syncookie mode, a temporary request socket is used, and req->num_time

Re: [PATCH net] inet: clear num_timeout reqsk_alloc()

2019-06-19 Thread Soheil Hassas Yeganeh
On Wed, Jun 19, 2019 at 12:38 PM Eric Dumazet wrote: > > KMSAN caught uninit-value in tcp_create_openreq_child() [1] > This is caused by a recent change, combined by the fact > that TCP cleared num_timeout, num_retrans and sk fields only > when a request socket was about to be queued. > > Under sy

Re: [PATCH RESEND nf-next] netfilter: add support for matching IPv4 options

2019-06-19 Thread Pablo Neira Ayuso
On Tue, Jun 18, 2019 at 10:13:55AM -0400, Stephen Suryaputra wrote: > On Tue, Jun 18, 2019 at 05:31:12PM +0200, Pablo Neira Ayuso wrote: > > > +{ > > > + unsigned char optbuf[sizeof(struct ip_options) + 41]; > > > > In other parts of the kernel this is + 40: > > > > net/ipv4/cipso_ipv4.c: unsign

Re: [PATCH net-next 3/5] ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic

2019-06-19 Thread Wei Wang
On Wed, Jun 19, 2019 at 9:07 AM David Miller wrote: > > From: Wei Wang > Date: Tue, 18 Jun 2019 11:25:41 -0700 > > > @@ -237,13 +240,16 @@ static int __fib6_rule_action(struct fib_rule *rule, > > struct flowi *flp, > > goto out; > > } > > again: > > - ip6_rt_put(

Re: [PATCH net-next v3 4/6] taprio: Add support for txtime-assist mode.

2019-06-19 Thread Patel, Vedang
Thanks for the input David. > On Jun 17, 2019, at 4:22 PM, David Miller wrote: > > From: Vedang Patel > Date: Mon, 17 Jun 2019 12:31:08 -0700 > >> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c >> index a41d7d4434ee..ab6080013666 100644 >> --- a/net/sched/sch_taprio.c >> +++ b/

Re: [PATCH net-next v3 2/6] etf: Add skip_sock_check

2019-06-19 Thread Patel, Vedang
Thanks Sergei for the input. > On Jun 18, 2019, at 2:28 AM, Sergei Shtylyov > wrote: > > Hello! > > On 17.06.2019 22:31, Vedang Patel wrote: > >> Currently, etf expects a socket with SO_TXTIME option set for each packet >> it encounters. So, it will drop all other packets. But, in the future

Re: [PATCH net] inet: clear num_timeout reqsk_alloc()

2019-06-19 Thread Yuchung Cheng
On Wed, Jun 19, 2019 at 9:46 AM Soheil Hassas Yeganeh wrote: > > On Wed, Jun 19, 2019 at 12:38 PM Eric Dumazet wrote: > > > > KMSAN caught uninit-value in tcp_create_openreq_child() [1] > > This is caused by a recent change, combined by the fact > > that TCP cleared num_timeout, num_retrans and s

[PATCH bpf-next v7 0/9] bpf: getsockopt and setsockopt hooks

2019-06-19 Thread Stanislav Fomichev
This series implements two new per-cgroup hooks: getsockopt and setsockopt along with a new sockopt program type. The idea is pretty similar to recently introduced cgroup sysctl hooks, but implementation is simpler (no need to convert to/from strings). What this can be applied to: * move business

[PATCH bpf-next v7 1/9] bpf: implement getsockopt and setsockopt hooks

2019-06-19 Thread Stanislav Fomichev
Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. BPF_CGROUP_GETSOCKOPT can modify the supplied buffer. Both of them reuse existing PTR_TO_PACKET{,_END} infrastructure. The bu

[PATCH bpf-next v7 2/9] bpf: sync bpf.h to tools/

2019-06-19 Thread Stanislav Fomichev
Export new prog type and hook points to the libbpf. Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index d0a23476f887..67059b4

[PATCH bpf-next v7 3/9] libbpf: support sockopt hooks

2019-06-19 Thread Stanislav Fomichev
Make libbpf aware of new sockopt hooks so it can derive prog type and hook point from the section names. Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/lib/bpf/libbpf.c| 5 + tools/lib/bpf/libbpf_probes.c | 1 + 2 files changed, 6 insertions(+) diff --git a/tools/lib/bp

[PATCH bpf-next v7 7/9] selftests/bpf: add sockopt test that exercises BPF_F_ALLOW_MULTI

2019-06-19 Thread Stanislav Fomichev
sockopt test that verifies chaining behavior. v7: * rework the test to verify cgroup getsockopt chaining Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/.gitignore| 1 + tools/testing/selftests/bpf/Makefile | 4 +- .../selftests/bpf/progs/s

[PATCH bpf-next v7 5/9] selftests/bpf: add sockopt test

2019-06-19 Thread Stanislav Fomichev
Add sockopt selftests: * require proper expected_attach_type * enforce context field read/write access * test bpf_sockopt_handled handler * test EPERM * test limiting optlen from getsockopt * test out-of-bounds access v7: * remove return 2; test retval=0 and optlen=-1 v3: * use DW for optval{,_en

[PATCH bpf-next v7 4/9] selftests/bpf: test sockopt section name

2019-06-19 Thread Stanislav Fomichev
Add tests that make sure libbpf section detection works. Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/test_section_names.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/bpf/test_section_names.c b/tools/testing/selfte

[PATCH bpf-next v7 8/9] bpf: add sockopt documentation

2019-06-19 Thread Stanislav Fomichev
Provide user documentation about sockopt prog type and cgroup hooks. v7: * add description for retval=0 and optlen=-1 v6: * describe cgroup chaining, add example v2: * use return code 2 for kernel bypass Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- Documentation/bpf/index.rst

[PATCH bpf-next v7 6/9] selftests/bpf: add sockopt test that exercises sk helpers

2019-06-19 Thread Stanislav Fomichev
socktop test that introduces new SOL_CUSTOM sockopt level and stores whatever users sets in sk storage. Whenever getsockopt is called, the original value is retrieved. v7: * use retval=0 and optlen-1 v6: * test 'ret=1' use-case as well (Alexei Starovoitov) v4: * don't call bpf_sk_fullsock helper

[PATCH bpf-next v7 9/9] bpftool: support cgroup sockopt

2019-06-19 Thread Stanislav Fomichev
Support sockopt prog type and cgroup hooks in the bpftool. Cc: Martin Lau Acked-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev --- tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 7 +-- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 2 +- tools/bpf/bpftool/bash-completion/

Re: [PATCH 1/2 nf-next] netfilter: nft_meta: add NFT_META_BRI_PVID support

2019-06-19 Thread Pablo Neira Ayuso
On Wed, Jun 19, 2019 at 03:16:24PM +0800, we...@ucloud.cn wrote: > From: wenxu > > nft add table bridge firewall > nft add chain bridge firewall zones { type filter hook prerouting priority - > 300 \; } > nft add rule bridge firewall zones counter ct zone set vlan id map { 100 : 1, > 200 : 2 }

Re: [PATCH 2/2 nf-next] netfilter: nft_meta: Add NFT_META_BRI_VLAN support

2019-06-19 Thread Pablo Neira Ayuso
On Wed, Jun 19, 2019 at 03:16:25PM +0800, we...@ucloud.cn wrote: > From: wenxu > > nft add table bridge firewall > nft add chain bridge firewall zones { type filter hook prerouting priority - > 300 \; } > nft add rule bridge firewall zones counter ct zone set vlan id map { 100 : 1, > 200 : 2 }

[PATCH net-next] br_netfilter: prevent UAF in brnf_exit_net()

2019-06-19 Thread Christian Brauner
Prevent a UAF in brnf_exit_net(). When unregister_net_sysctl_table() is called the ctl_hdr pointer will obviously be freed and so accessing it righter after is invalid. Fix this by stashing a pointer to the table we want to free before we unregister the sysctl header. Note that syzkaller falsely

Re: [PATCH RESEND nf-next] netfilter: add support for matching IPv4 options

2019-06-19 Thread Pablo Neira Ayuso
On Tue, Jun 11, 2019 at 08:09:12AM -0400, Stephen Suryaputra wrote: [...] > diff --git a/net/netfilter/nft_exthdr.c b/net/netfilter/nft_exthdr.c > index a940c9fd9045..4155a32fade7 100644 > --- a/net/netfilter/nft_exthdr.c > +++ b/net/netfilter/nft_exthdr.c [...] > +static int ipv4_find_option(struc

[PATCH net-next v4 1/7] igb: clear out tstamp after sending the packet

2019-06-19 Thread Vedang Patel
skb->tstamp is being used at multiple places. On the transmit side, it is used to determine the launchtime of the packet. It is also used to determine the software timestamp after the packet has been transmitted. So, clear out the tstamp value after it has been read so that we do not report false

[PATCH net-next v4 0/7] net/sched: Add txtime-assist support for taprio.

2019-06-19 Thread Vedang Patel
Changes in v4: - Remove inline directive from functions in foo.c. - Fix spacing in pkt_sched.h (for etf patch). Changes in v3: - Simplify implementation for taprio flags. - txtime_delay can only be set if txtime-assist mode is enabled. - txtime_delay and flags will only be visible in tc output if

[PATCH net-next v4 5/7] taprio: Add support for txtime-assist mode

2019-06-19 Thread Vedang Patel
Currently, we are seeing non-critical packets being transmitted outside of their timeslice. We can confirm that the packets are being dequeued at the right time. So, the delay is induced in the hardware side. The most likely reason is the hardware queues are starving the lower priority queues. In

[PATCH net-next v4 3/7] taprio: calculate cycle_time when schedule is installed

2019-06-19 Thread Vedang Patel
cycle time for a particular schedule is calculated only when it is first installed. So, it makes sense to just calculate it once right after the 'cycle_time' parameter has been parsed and store it in cycle_time. Signed-off-by: Vedang Patel --- net/sched/sch_taprio.c | 29 +++-

[PATCH net-next v4 4/7] taprio: Remove inline directive

2019-06-19 Thread Vedang Patel
Remove inline directive from length_to_duration(). We will let the compiler make the decisions. Signed-off-by: Vedang Patel --- net/sched/sch_taprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index a41d7d4434ee..6ef0cc03f

[PATCH net-next v4 6/7] taprio: make clock reference conversions easier

2019-06-19 Thread Vedang Patel
Later in this series we will need to transform from CLOCK_MONOTONIC (used in TCP) to the clock reference used in TAPRIO. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Vedang Patel --- net/sched/sch_taprio.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(

[PATCH net-next v4 7/7] taprio: Adjust timestamps for TCP packets

2019-06-19 Thread Vedang Patel
When the taprio qdisc is running in "txtime offload" mode, it will set the launchtime value (in skb->tstamp) for all the packets which do not have the SO_TXTIME socket option. But, the TCP packets already have this value set and it indicates the earliest departure time represented in CLOCK_MONOTONI

[PATCH net-next v4 2/7] etf: Add skip_sock_check

2019-06-19 Thread Vedang Patel
Currently, etf expects a socket with SO_TXTIME option set for each packet it encounters. So, it will drop all other packets. But, in the future commits we are planning to add functionality which where tstamp value will be set by another qdisc. Also, some packets which are generated from within the

[PATCH net-next] net: sched: act_ctinfo: tidy UAPI definition

2019-06-19 Thread Kevin Darbyshire-Bryant
Remove some enums from the UAPI definition that were only used internally and are NOT part of the UAPI. Signed-off-by: Kevin Darbyshire-Bryant --- include/net/tc_act/tc_ctinfo.h| 5 + include/uapi/linux/tc_act/tc_ctinfo.h | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) d

Re: [PATCH iproute2 v2 2/2] uapi: update if_link.h

2019-06-19 Thread Stephen Hemminger
On Wed, 19 Jun 2019 16:14:14 +0200 Denis Kirjanov wrote: > update if_link.h to commit 75345f888f700c4ab2448287e35d48c760b202e6 > ("ipoib: show VF broadcast address") > > Signed-off-by: Denis Kirjanov This is only on net-next so the patches should target iproute2-next. David can update from th

[PATCH net] ipv6: Default fib6_type to RTN_UNICAST when not set

2019-06-19 Thread David Ahern
From: David Ahern A user reported that routes are getting installed with type 0 (RTN_UNSPEC) where before the routes were RTN_UNICAST. One example is from accel-ppp which apparently still uses the ioctl interface and does not set rtmsg_type. Another is the netlink interface where ipv6 does not re

Re: [PATCH mlx5-next 11/15] RDMA/mlx5: Add vport metadata matching for IB representors

2019-06-19 Thread Mark Bloch
On 6/19/19 1:12 AM, Leon Romanovsky wrote: > On Wed, Jun 19, 2019 at 07:58:51AM +, Mark Bloch wrote: >> >> >> On 6/19/2019 00:43, Leon Romanovsky wrote: >>> On Wed, Jun 19, 2019 at 07:26:54AM +, Mark Bloch wrote: On 6/18/2019 23:51, Leon Romanovsky wrote: > On Wed, Jun

[PATCH net-next] ipv6: Check if route exists before notifying it

2019-06-19 Thread Ido Schimmel
From: Ido Schimmel When user space sends invalid information in RTA_MULTIPATH, the nexthop list in ip6_route_multipath_add() is empty and there is no route to notify. The code that emits the netlink notifications correctly checks if the route is not NULL, but I missed that for the in-kernel noti

Re: [PATCH RESEND nf-next] netfilter: add support for matching IPv4 options

2019-06-19 Thread Stephen Suryaputra
On Wed, Jun 19, 2019 at 07:18:32PM +0200, Pablo Neira Ayuso wrote: > > Rules with this options will load fine: > > ip option eol type 1 > ip option noop type 1 > ip option sec type 1 > ip option timestamp type 1 > ip option rr type 1 > ip option sid type 1 > > However, they will not ever match I

Re: [PATCH RESEND nf-next] netfilter: add support for matching IPv4 options

2019-06-19 Thread Pablo Neira Ayuso
On Wed, Jun 19, 2019 at 01:58:02PM -0400, Stephen Suryaputra wrote: > On Wed, Jun 19, 2019 at 07:18:32PM +0200, Pablo Neira Ayuso wrote: > > > > Rules with this options will load fine: > > > > ip option eol type 1 > > ip option noop type 1 > > ip option sec type 1 > > ip option timestamp type 1 >

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-19 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 04:28:31PM +0300, Paul Blakey wrote: ... > +static int tcf_ct_fill_params_nat(struct tcf_ct_params *p, > + struct tc_ct *parm, > + struct nlattr **tb, > + struct netlink_ext_ack *extack

[PATCH bpf] bpf: fix NULL deref in btf_type_is_resolve_source_only

2019-06-19 Thread Stanislav Fomichev
Commit 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") added invocations of btf_type_is_resolve_source_only before btf_type_nosize_or_null which checks for the NULL pointer. Swap the order of btf_type_nosize_or_null and btf_type_is_resolve_source_only to make sure the do the NULL

Re: [PATCH bpf] bpf: fix NULL deref in btf_type_is_resolve_source_only

2019-06-19 Thread Andrii Nakryiko
On Wed, Jun 19, 2019 at 12:01 PM Stanislav Fomichev wrote: > > Commit 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") > added invocations of btf_type_is_resolve_source_only before > btf_type_nosize_or_null which checks for the NULL pointer. > Swap the order of btf_type_nosize_or_

Re: [PATCH net-next] ipv6: Check if route exists before notifying it

2019-06-19 Thread David Ahern
On 6/19/19 11:55 AM, Ido Schimmel wrote: > diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c > index 1d16a01eccf5..241a0e9a07c3 100644 > --- a/net/ipv6/ip6_fib.c > +++ b/net/ipv6/ip6_fib.c > @@ -393,6 +393,8 @@ int call_fib6_multipath_entry_notifiers(struct net *net, > .nsiblings =

Re: [PATCH iproute2 v2 2/2] uapi: update if_link.h

2019-06-19 Thread David Ahern
On 6/19/19 11:47 AM, Stephen Hemminger wrote: > On Wed, 19 Jun 2019 16:14:14 +0200 > Denis Kirjanov wrote: > >> update if_link.h to commit 75345f888f700c4ab2448287e35d48c760b202e6 >> ("ipoib: show VF broadcast address") >> >> Signed-off-by: Denis Kirjanov > > This is only on net-next so the pat

Re: [PATCH bpf-next v7 1/9] bpf: implement getsockopt and setsockopt hooks

2019-06-19 Thread Andrii Nakryiko
On Wed, Jun 19, 2019 at 10:00 AM Stanislav Fomichev wrote: > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > BPF_CGROUP_GETSOCKOPT can modify the supplied buffer. >

Re: [PATCH net-next] ipv6: Check if route exists before notifying it

2019-06-19 Thread Ido Schimmel
On Wed, Jun 19, 2019 at 01:10:08PM -0600, David Ahern wrote: > On 6/19/19 11:55 AM, Ido Schimmel wrote: > > diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c > > index 1d16a01eccf5..241a0e9a07c3 100644 > > --- a/net/ipv6/ip6_fib.c > > +++ b/net/ipv6/ip6_fib.c > > @@ -393,6 +393,8 @@ int call_fib

Re: [PATCH net-next] ipv6: Check if route exists before notifying it

2019-06-19 Thread David Ahern
On 6/19/19 1:40 PM, Ido Schimmel wrote: > On Wed, Jun 19, 2019 at 01:10:08PM -0600, David Ahern wrote: >> On 6/19/19 11:55 AM, Ido Schimmel wrote: >>> diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c >>> index 1d16a01eccf5..241a0e9a07c3 100644 >>> --- a/net/ipv6/ip6_fib.c >>> +++ b/net/ipv6/ip6

Re: [PATCH bpf-next v7 1/9] bpf: implement getsockopt and setsockopt hooks

2019-06-19 Thread Stanislav Fomichev
On 06/19, Andrii Nakryiko wrote: > On Wed, Jun 19, 2019 at 10:00 AM Stanislav Fomichev wrote: > > > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > > BPF_CGRO

[PATCH net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-19 Thread Neil Horman
When an application is run that: a) Sets its scheduler to be SCHED_FIFO and b) Opens a memory mapped AF_PACKET socket, and sends frames with the MSG_DONTWAIT flag cleared, its possible for the application to hang forever in the kernel. This occurs because when waiting, the code in tpacket_snd call

Re: [PATCH net 0/3] net/af_iucv: fixes 2019-06-18

2019-06-19 Thread David Miller
From: Julian Wiedmann Date: Tue, 18 Jun 2019 20:42:58 +0200 > I spent a few cycles on transmit problems for af_iucv over regular > netdevices - please apply the following fixes to -net. > > The first patch allows for skb allocations outside of GFP_DMA, while the > second patch respects that driv

  1   2   >