[PATCH] netfilter: nft_paylaod: add base type NFT_PAYLOAD_LL_HEADER_NO_TAG

2019-06-10 Thread wenxu
From: wenxu nft add rule bridge firewall rule-100-ingress ip protocol icmp drop The rule like above "ip protocol icmp", the packet will not be matched, It tracelate base=NFT_PAYLOAD_LL_HEADER off=12 && base=NFT_PAYLOAD_NETWORK_HEADER off=11 if the packet contained with tag info. But the user do

RE: [PATCH V1 net-next 5/6] net: ena: add ethtool function for changing io queue sizes

2019-06-10 Thread Jubran, Samih
> -Original Message- > From: Michal Kubecek > Sent: Thursday, June 6, 2019 5:48 PM > To: netdev@vger.kernel.org > Cc: Jubran, Samih ; da...@davemloft.net; > Woodhouse, David ; Machulsky, Zorik > ; Matushevsky, Alexander ; > Bshara, Saeed ; Wilson, Matt ; > Liguori, Anthony ; Bshara, Naf

rtnetlink dump operations also share the rrtnl_mutex

2019-06-10 Thread wenxu
Hi all, When a netlink_route socket was created, the nlk->cb_mutex is get through nl_table[NETLINK_ROUTE].cb_mutex which is the rtnl_mutex. So all the netlink_route dump operation can contend for each other (ip l, ip a, ip r, tc ls). It will also contend with other RTM_NEW/DEL operations. S

[PATCH net-next 2/3] selftests: mlxsw: lib.sh: Add wait for dev with timeout

2019-06-10 Thread Ido Schimmel
From: Amit Cohen Add a function that waits for device with maximum number of iterations. It enables to limit the waiting and prevent infinite loop. This will be used by the subsequent patch which will set two ports to different speeds in order to make sure they cannot negotiate a link. Signed-o

[PATCH net-next 0/3] mlxsw: Add speed and auto-negotiation test

2019-06-10 Thread Ido Schimmel
From: Ido Schimmel Amit says: This patchset adds a selftest which tests different speeds and auto-negotiation. Patch #1 Adds functions that retrieve information from ethtool. Patch #2 Adds option to wait for device with limit of iterations. Patch #3 Adds the test. Amit Cohen (3): selftests

[PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Ido Schimmel
From: Amit Cohen Functions: 1. ethtool_set: params: cmd The function runs ethtool by cmd (ethtool -s cmd) and checks if there was an error in configuration 2. speeds_get: params: dev, with_mode (0 or 1) return value: Array of supported link modes with/wit

[PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-10 Thread Ido Schimmel
From: Amit Cohen Check configurations and packets transference with different variations of autoneg and speed. Test plan: 1. Test force of same speed with autoneg off 2. Test force of different speeds with autoneg off (should fail) 3. One side is autoneg on and other side sets force of common sp

Re: [PATCH net-next v2 3/3] net/mlx5e: use indirect calls wrapper for the rx packet handler

2019-06-10 Thread Paolo Abeni
Hi, On Fri, 2019-06-07 at 18:09 +, Saeed Mahameed wrote: > On Thu, 2019-06-06 at 23:56 +0200, Paolo Abeni wrote: > > We can avoid another indirect call per packet wrapping the rx > > handler call with the proper helper. > > > > To ensure that even the last listed direct call experience > > me

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

2019-06-10 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. Signed-off-by: Maxime Ripard --- Changes from v1: - Use an enum for phy-connection-types - Validate the items for the fixed-link array - Set the number of vali

[PATCH v2 03/11] MAINTAINERS: Add Ethernet PHY YAML file

2019-06-10 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. Signed-off-by: Maxime Ripard --- Changes from v1: - New patch --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --gi

[PATCH v2 06/11] dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

2019-06-10 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 v1: - Add a select statement with the deprecated compatible, and remove it from the valid compatibles --- Documentation/devicetree/bindings/net/all

[PATCH v2 07/11] dt-bindings: net: stmmac: Convert the binding to a schemas

2019-06-10 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 v1: - Restrict snps,tso to only a couple of compatibles - Use an enum for the compatibles - Add a custom select statement with the com

[PATCH v2 04/11] dt-bindings: net: phy: The interrupt property is not mandatory

2019-06-10 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. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/ethernet-phy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v2 08/11] dt-bindings: net: sun7i-gmac: Convert the binding to a schemas

2019-06-10 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. Signed-off-by: Maxime Ripard --- Changes from v1: - Add a file of its own ---

[PATCH v2 09/11] dt-bindings: net: sun8i-emac: Convert the binding to a schemas

2019-06-10 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 v1: - Add specific binding docume

[PATCH v2 11/11] ARM: dts: sunxi: Switch to the generic PHY properties

2019-06-10 Thread Maxime Ripard
The DWMAC specific properties to manage the PHY have been superseeded by the generic PHY properties. Let's move to it. Signed-off-by: Maxime Ripard --- This patch should go through arm-soc. Changes from v1: - New patch --- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 6 +++--- arch/

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

2019-06-10 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. Signed-off-by: Maxime Ripard --- Changes from v1: - New patch --- Documentation/devicetree/bindings/net/s

[PATCH v2 05/11] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

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

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

2019-06-10 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. Signed-off-by: Maxime Ripard --- Changes from v1: - Add missing compatible options - add missing phy speeds - Fix the maintainers entry - Add a

Re: [PATCH] netfilter: nft_paylaod: add base type NFT_PAYLOAD_LL_HEADER_NO_TAG

2019-06-10 Thread Florian Westphal
we...@ucloud.cn wrote: > From: wenxu > > nft add rule bridge firewall rule-100-ingress ip protocol icmp drop nft --debug=netlink add rule bridge firewall rule-100-ingress ip protocol icmp drop bridge firewall rule-100-ingress [ payload load 2b @ link header + 12 => reg 1 ] [ cmp eq reg 1 0

[PATCH net-next] bridge: Set the pvid for untaged packet before prerouting

2019-06-10 Thread wenxu
From: wenxu bridge vlan add dev veth1 vid 200 pvid untagged bridge vlan add dev veth2 vid 200 pvid untagged 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 { 10

[PATCH V2 net-next 4/6] net: ena: allow queue allocation backoff when low on memory

2019-06-10 Thread sameehj
From: Sameeh Jubran If there is not enough memory to allocate io queues the driver will try to allocate smaller queues. The backoff algorithm is as follows: 1. Try to allocate TX and RX and if successful. 1.1. return success 2. Divide by 2 the size of the larger of RX and TX queues (or both if

[PATCH V2 net-next 6/6] net: ena: update driver version from 2.0.3 to 2.1.0

2019-06-10 Thread sameehj
From: Sameeh Jubran Update driver version to match device specification. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/am

[PATCH V2 net-next 3/6] net: ena: make ethtool show correct current and max queue sizes

2019-06-10 Thread sameehj
From: Sameeh Jubran Currently ethtool -g shows the same size for current and max queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 -- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 2 files changed

[PATCH V2 net-next 5/6] net: ena: add ethtool function for changing io queue sizes

2019-06-10 Thread sameehj
From: Sameeh Jubran Implement the set_ringparam() function of the ethtool interface to enable the changing of io queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 25 +++ drivers/net/ethernet/amazon/e

[PATCH V2 net-next 2/6] net: ena: enable negotiating larger Rx ring size

2019-06-10 Thread sameehj
From: Sameeh Jubran Use MAX_QUEUES_EXT get feature capability to query the device. Signed-off-by: Netanel Belgazal Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 144 --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 15 ++ 2 files changed, 1

[PATCH V2 net-next 1/6] net: ena: add MAX_QUEUES_EXT get feature admin command

2019-06-10 Thread sameehj
From: Arthur Kiyanovski Add a new admin command to support different queue size for Tx/Rx queues (the change also support different SQ/CQ sizes) Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 56 +- drivers/net/eth

[PATCH V2 net-next 0/6] Support for dynamic queue size changes

2019-06-10 Thread sameehj
From: Sameeh Jubran This patchset introduces the following: * add new admin command for supporting different queue size for Tx/Rx * add support for Tx/Rx queues size modification through ethtool * allow queues allocation backoff when low on memory * update driver version Difference from v1: * Ch

Re: [PATCH v2 bpf-next 1/2] xdp: Add tracepoint for bulk XDP_TX

2019-06-10 Thread Toshiaki Makita
On 2019/06/07 18:32, Jesper Dangaard Brouer wrote: On Fri, 7 Jun 2019 11:22:00 +0900 Toshiaki Makita wrote: On 2019/06/07 4:41, Jesper Dangaard Brouer wrote: On Thu, 6 Jun 2019 20:04:20 +0900 Toshiaki Makita wrote: On 2019/06/05 16:59, Jesper Dangaard Brouer wrote: On Wed, 5 Jun 2019

Re: tp->copied_seq used before assignment in tcp_check_urg

2019-06-10 Thread Neal Cardwell
On Sun, Jun 9, 2019 at 11:12 PM Zhongjie Wang wrote: ... > It compares tp->copied_seq with tcp->rcv_nxt. > However, tp->copied_seq is only assigned to an appropriate sequence number > when > it copies data to user space. So here tp->copied_seq could be equal to 0, > which is its initial value, if

How long TCP state change from SYN_RECV to ESTABLISHED should take?

2019-06-10 Thread iam
While playing with eBPF i tried tcpstates.py (https://github.com/iovisor/bcc/blob/master/tools/tcpstates.py) and noticed very low time for TCP state transition SYN_RECV -> ESTABLISHED My numbers from tests: SYN_RECV -> ESTABLISHED 0.015 SYN_RECV -> ESTABLISHED 0.017 SYN_RECV -> ESTABLISHE

Re: [PATCH V1 net-next 5/6] net: ena: add ethtool function for changing io queue sizes

2019-06-10 Thread Michal Kubecek
On Mon, Jun 10, 2019 at 07:46:08AM +, Jubran, Samih wrote: > > -Original Message- > > From: Michal Kubecek > > Sent: Thursday, June 6, 2019 5:48 PM > > To: netdev@vger.kernel.org > > Cc: Jubran, Samih ; da...@davemloft.net; > > Woodhouse, David ; Machulsky, Zorik > > ; Matushevsky, Ale

Re: [RFC v2 PATCH 0/5] seg6: Segment routing fixes

2019-06-10 Thread Edward Cree
On 07/06/2019 19:55, Tom Herbert wrote: > This patch set includes fixes to bring the segment routing > implementation into conformance with the latest version of the > draft (draft-ietf-6man-segment-routing-header-19). AIUI the concept of "conformance" doesn't really belong in the context  of an In

Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 11:40:43AM +0300, Ido Schimmel wrote: > From: Amit Cohen > +declare -A speed_values > + > +speed_values=( [10baseT/Half]=0x001 > + [10baseT/Full]=0x002 > + [100baseT/Half]=0x004 > + [100baseT/Full]=0x008 > + [1000baseT/H

Re: [PATCH] net: phy: marvell10g: allow PHY to probe without firmware

2019-06-10 Thread Heiner Kallweit
On 06.06.2019 20:36, Andrew Lunn wrote: > 65;5402;1c> I don't like too much state changes outside control of the state > machine, >> like in phy_start / phy_stop / phy_error. I think it would be better >> if a state change request is sent to the state machine, and the state >> machine decides whet

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-10 Thread Andrew Lunn
> + # Skip 56G because this speed isn't supported with autoneg off. > + if [[ $speed == 56000 ]]; then > + continue > + fi Interesting. How is 56000 represented in ethtool? Listed in both "Supported link modes" and "Advertised link modes"? T

Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Ido Schimmel
On Mon, Jun 10, 2019 at 03:35:38PM +0200, Andrew Lunn wrote: > On Mon, Jun 10, 2019 at 11:40:43AM +0300, Ido Schimmel wrote: > > From: Amit Cohen > > +declare -A speed_values > > + > > +speed_values=( [10baseT/Half]=0x001 > > + [10baseT/Full]=0x002 > > + [100baseT/Half]=0x0

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-10 Thread Ido Schimmel
On Mon, Jun 10, 2019 at 03:48:20PM +0200, Andrew Lunn wrote: > > + # Skip 56G because this speed isn't supported with autoneg off. > > + if [[ $speed == 56000 ]]; then > > + continue > > + fi > > Interesting. How is 56000 represented in ethtool? List

Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Andrew Lunn
> +speeds_get() > +{ > + local dev=$1; shift > + local with_mode=$1; shift > + > + local speeds_str=$(ethtool "$dev" | \ > + # Snip everything before the link modes section. > + sed -n '/Supported link modes:/,$p' | \ > + # Quit processing the rest at

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 04:58:48PM +0300, Ido Schimmel wrote: > On Mon, Jun 10, 2019 at 03:48:20PM +0200, Andrew Lunn wrote: > > > + # Skip 56G because this speed isn't supported with autoneg off. > > > + if [[ $speed == 56000 ]]; then > > > + continue > > > +

Re: [RFC v2 PATCH 0/5] seg6: Segment routing fixes

2019-06-10 Thread Edward Cree
On 10/06/2019 15:03, Tom Herbert wrote: > On Mon, Jun 10, 2019, 5:54 AM Edward Cree > wrote: > > On 07/06/2019 19:55, Tom Herbert wrote: > > This patch set includes fixes to bring the segment routing > > implementation into conformance with the latest versi

Re: [PATCH] net: phy: marvell10g: allow PHY to probe without firmware

2019-06-10 Thread Russell King - ARM Linux admin
On Mon, Jun 10, 2019 at 03:40:10PM +0200, Heiner Kallweit wrote: > On 06.06.2019 20:36, Andrew Lunn wrote: > > 65;5402;1c> I don't like too much state changes outside control of the > > state machine, > >> like in phy_start / phy_stop / phy_error. I think it would be better > >> if a state change

Re: [PATCH v2 02/11] dt-bindings: net: Add a YAML schemas for the generic PHY options

2019-06-10 Thread Andrew Lunn
> +required: > + - reg > + - interrupts Hi Maxime Interrupts are not required. That is an error in the .txt binding document. Otherwise, this looks good: Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 03/11] MAINTAINERS: Add Ethernet PHY YAML file

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 11:25:42AM +0200, Maxime Ripard wrote: > 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. > > Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn

Re: [PATCH net-next v1 5/7] taprio: Add support for txtime offload mode.

2019-06-10 Thread Murali Karicheri
Vedang, On 06/07/2019 05:12 PM, Patel, Vedang wrote: Hi Murali, On Jun 7, 2019, at 11:52 AM, Murali Karicheri wrote: On 06/04/2019 04:06 PM, Patel, Vedang wrote: Hi Murali, On Jun 3, 2019, at 7:15 AM, Murali Karicheri wrote: Hi Vedang, On 05/28/2019 01:46 PM, Vedang Patel wrote: Curren

Re: [PATCH v2 04/11] dt-bindings: net: phy: The interrupt property is not mandatory

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 11:25:43AM +0200, Maxime Ripard wrote: > 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. Ah! Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 05/11] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

2019-06-10 Thread Andrew Lunn
> +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - phy > + - allwinner,sram Quoting ethernet.txt: - phy: the same as "phy-handle" property, not recommended for new bindings. - phy-handle: phandle, specifies a reference to a node representing a PHY device; this pr

Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Ido Schimmel
On Mon, Jun 10, 2019 at 03:59:14PM +0200, Andrew Lunn wrote: > > +speeds_get() > > +{ > > + local dev=$1; shift > > + local with_mode=$1; shift > > + > > + local speeds_str=$(ethtool "$dev" | \ > > + # Snip everything before the link modes section. > > + sed -n '/Supported

[PATCH net v2] vrf: Increment Icmp6InMsgs on the original netdev

2019-06-10 Thread Stephen Suryaputra
Get the ingress interface and increment ICMP counters based on that instead of skb->dev when the the dev is a VRF device. This is a follow up on the following message: https://www.spinics.net/lists/netdev/msg560268.html v2: Avoid changing skb->dev since it has unintended effect for local deli

Re: [PATCH v2 06/11] dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 11:25:45AM +0200, Maxime Ripard wrote: > Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable > the DT validation. > > Signed-off-by: Maxime Ripard Should there be a generic part to cover what is listed in: Documentation/devicetree/bindings/net/mdi

Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Andrew Lunn
> Andrew, are you suggestion to split speeds_get() into > supported_speeds_get() and advertised_speeds_get() and use each where > appropriate? Note that not all the tests are testing with autoneg on. Hi Ido Yes. You should be able to force all speeds in supported speeds. But if you try to auto-n

Re: [PATCH v2 11/11] ARM: dts: sunxi: Switch to the generic PHY properties

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 11:25:50AM +0200, Maxime Ripard wrote: > The DWMAC specific properties to manage the PHY have been superseeded by > the generic PHY properties. Let's move to it. > > Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 05/11] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

2019-06-10 Thread Maxime Ripard
Hi Andrew, On Mon, Jun 10, 2019 at 04:31:39PM +0200, Andrew Lunn wrote: > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + - phy > > + - allwinner,sram > > Quoting ethernet.txt: > > - phy: the same as "phy-handle" property, not recommended for new bindings.

Re: [PATCH net-next 1/3] selftests: mlxsw: Add ethtool_lib.sh

2019-06-10 Thread Florian Fainelli
On 6/10/2019 6:56 AM, Ido Schimmel wrote: > On Mon, Jun 10, 2019 at 03:35:38PM +0200, Andrew Lunn wrote: >> On Mon, Jun 10, 2019 at 11:40:43AM +0300, Ido Schimmel wrote: >>> From: Amit Cohen >>> +declare -A speed_values >>> + >>> +speed_values=( [10baseT/Half]=0x001 >>> + [10baseT

RE: [PATCH v2 10/11] dt-bindings: net: dwmac: Deprecate the PHY reset properties

2019-06-10 Thread Martin Blumenstingl
> 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. > > Signed-off-by: Maxime Ripard I am not sure about the yaml syntax for deprecated properties but the

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

2019-06-10 Thread Pablo Neira Ayuso
On Sat, Jun 01, 2019 at 10:27:06PM -0400, Stephen Suryaputra wrote: > On Mon, Jun 03, 2019 at 02:30:06PM +0200, Pablo Neira Ayuso wrote: > > > I developed this patchset to suit my employer needs and there is no plan > > > for a follow up patchset, however I think non-zero offset might be useful > >

[PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-10 Thread Björn Töpel
Here's yet another attempt tomove the XDP_QUERY_PROG{,_HW} code out from the drivers to generic netdev code. I took a bit different approach with the v3. In this revision I introduced to a new netdev_xdp structure that tracks the XDP programs, and instead of sharing the xdp_prog member between DRV

[PATCH bpf-next v3 3/5] net: xdp: remove XDP_QUERY_PROG{,_HW}

2019-06-10 Thread Björn Töpel
From: Björn Töpel Remove all use of XDP_QUERY_PROG{,_HW}, since it was moved to the generic code path. Signed-off-by: Björn Töpel --- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 .../net/ethernet/cavium/thunder/nicvf_main.c | 3 --- .../net/ethernet/freescale/dpaa2/dpaa2-eth.c |

[PATCH bpf-next v3 1/5] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev

2019-06-10 Thread Björn Töpel
From: Björn Töpel All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW} command of ndo_bpf. This commit refactors the query code up from the drivers to the netdev level. The xdp_prog member of the struct net_device has evolved into a struct netdev_xdp. The new structure contains an

[PATCH bpf-next v3 2/5] nfp, netdevsim: use dev_xdp_support_offload() function

2019-06-10 Thread Björn Töpel
From: Björn Töpel Make all drivers with XDP offloading support use dev_xdp_support_offload(). Signed-off-by: Björn Töpel --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 7 +++ drivers/net/netdevsim/netdev.c| 4 2 files changed, 11 insertions(+) diff --git

[PATCH bpf-next v3 5/5] net: xdp: remove xdp_attachment_flags_ok() and flags member

2019-06-10 Thread Björn Töpel
From: Björn Töpel The attachment flags check is done in the generic netdev code, so there is no need for this function anymore. Remove it and all uses of it. Further; Passing flags from struct netdev_bpf when attaching an XDP program is no longer necessary, so let us remove that member. Signed-

[PATCH bpf-next v3 4/5] net: xdp: refactor XDP flags checking

2019-06-10 Thread Björn Töpel
From: Björn Töpel Similar to query a driver for a loaded XDP program, each driver need to check the attachment flags when a program is loaded. E.g., if an XDP program was loaded without explicit flags (fallback mode), it must be reloaded/removed without explicit flags. This commit moves that ch

Re: [PATCH net] net_sched: sch_mqprio: handle return value of mqprio_queue_get

2019-06-10 Thread David Miller
From: Jacob Wen Date: Mon, 10 Jun 2019 14:38:21 +0800 > It may return NULL thus we can't ignore it. Please repost with a proper signoff.

Re: [PATCH net] net_sched: sch_mqprio: handle return value of mqprio_queue_get

2019-06-10 Thread David Miller
From: David Miller Date: Mon, 10 Jun 2019 09:05:26 -0700 (PDT) > From: Jacob Wen > Date: Mon, 10 Jun 2019 14:38:21 +0800 > >> It may return NULL thus we can't ignore it. > > Please repost with a proper signoff. Also, you are breaking the reverse christmas tree ordering of the local variables

Re: [PATCH bpf-next v3 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-10 Thread Stanislav Fomichev
On 06/08, Martin Lau wrote: > On Fri, Jun 07, 2019 at 09:29:13AM -0700, 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

Re: [PATCH V2 net-next 4/6] net: ena: allow queue allocation backoff when low on memory

2019-06-10 Thread David Miller
From: Date: Mon, 10 Jun 2019 14:19:16 +0300 > +static inline void set_io_rings_size(struct ena_adapter *adapter, > + int new_tx_size, int new_rx_size) Please do not ever use inline in foo.c files, let the compiler decide.

[PATCH next 0/5] r8169: improve handling of chip-specific configuration

2019-06-10 Thread Heiner Kallweit
This series improves and simplifies handling of chip-specific configuration. Heiner Kallweit (5): r8169: improve setting interrupt mask r8169: rename CPCMD_QUIRK_MASK and apply it on all chip versions r8169: remove callback hw_start from struct rtl_cfg_info r8169: remove member coalesce_in

[PATCH next 3/5] r8169: remove callback hw_start from struct rtl_cfg_info

2019-06-10 Thread Heiner Kallweit
After the latest changes we don't need separate functions rtl_hw_start_8168 and rtl_hw_start_8101 any longer. This allows us to simplify the code. For this change we need to move rtl_hw_start() and rtl_hw_start_8169(). rtl_hw_start_8169() is unchanged. Signed-off-by: Heiner Kallweit --- drivers

[PATCH next 2/5] r8169: rename CPCMD_QUIRK_MASK and apply it on all chip versions

2019-06-10 Thread Heiner Kallweit
CPCMD_QUIRK_MASK isn't specific to certain chip versions. The vendor driver applies this mask to all 8168 versions. Therefore remove QUIRK from the mask name and apply it on all chip versions. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 23 -

[PATCH next 1/5] r8169: improve setting interrupt mask

2019-06-10 Thread Heiner Kallweit
So far several places in the code deal with setting the interrupt mask for the respective chip versions. Improve this by having one function for this only. In addition don't set RxFIFOOver for all 8101 chip versions like in the vendor driver. Signed-off-by: Heiner Kallweit --- drivers/net/ethern

[PATCH bpf-next v4 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-10 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 v4 3/8] libbpf: support sockopt hooks

2019-06-10 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 v4 5/8] selftests/bpf: add sockopt test

2019-06-10 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 v3: * use DW for optval{,_end} loads v2: * use return code 2 for kernel bypass

[PATCH bpf-next v4 4/8] selftests/bpf: test sockopt section name

2019-06-10 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] Free cookie before we memdup a new one

2019-06-10 Thread Neil Horman
Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't leak cookie memory, free any previously allocated cookie first. Signed-off-by: Neil

[PATCH next 4/5] r8169: remove member coalesce_info from struct rtl_cfg_info

2019-06-10 Thread Heiner Kallweit
To prepare removal of struct rtl_cfg_info, set the coalesce config based on the chip version number. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main

[PATCH next 5/5] r8169: remove struct rtl_cfg_info

2019-06-10 Thread Heiner Kallweit
Simplify the code by removing struct rtl_cfg_info. Only info we need per PCI ID is whether it supports GBit or not. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 56 --- 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/drivers/n

[PATCH bpf-next v4 2/8] bpf: sync bpf.h to tools/

2019-06-10 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 7c6aef253173..174136a

[PATCH bpf-next v4 8/8] bpftool: support cgroup sockopt

2019-06-10 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/

[PATCH bpf-next v4 7/8] bpf: add sockopt documentation

2019-06-10 Thread Stanislav Fomichev
Provide user documentation about sockopt prog type and cgroup hooks. v2: * use return code 2 for kernel bypass Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- Documentation/bpf/index.rst | 1 + Documentation/bpf/prog_cgroup_sockopt.rst | 39 +++ 2 files

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

2019-06-10 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. v4: * don't call bpf_sk_fullsock helper v3: * drop (__u8 *)(long) casts for optval{,_end} v2: * new test Cc: Martin Lau Signed

[PATCH bpf-next v4 0/8] bpf: getsockopt and setsockopt hooks

2019-06-10 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

Re: [PATCH v12 1/5] can: m_can: Create a m_can platform framework

2019-06-10 Thread Dan Murphy
Bump On 6/6/19 8:16 AM, Dan Murphy wrote: Marc Bump On 5/31/19 6:51 AM, Dan Murphy wrote: Marc On 5/15/19 3:54 PM, Dan Murphy wrote: Marc On 5/9/19 11:11 AM, Dan Murphy wrote: Create a m_can platform framework that peripheral devices can register to and use common code and register sets.

Re: [PATCH V2 net-next 4/6] net: ena: allow queue allocation backoff when low on memory

2019-06-10 Thread Andrew Lunn
On Mon, Jun 10, 2019 at 09:18:40AM -0700, David Miller wrote: > From: > Date: Mon, 10 Jun 2019 14:19:16 +0300 > > > +static inline void set_io_rings_size(struct ena_adapter *adapter, > > +int new_tx_size, int new_rx_size) > > Please do not ever use inline in foo.c

Re: [PATCH] Free cookie before we memdup a new one

2019-06-10 Thread David Miller
From: Neil Horman Date: Mon, 10 Jun 2019 12:34:56 -0400 > Based on comments from Xin, even after fixes for our recent syzbot > report of cookie memory leaks, its possible to get a resend of an INIT > chunk which would lead to us leaking cookie memory. > > To ensure that we don't leak cookie memo

Re: [PATCH V2 net-next 4/6] net: ena: allow queue allocation backoff when low on memory

2019-06-10 Thread David Miller
From: Andrew Lunn Date: Mon, 10 Jun 2019 18:36:59 +0200 > On Mon, Jun 10, 2019 at 09:18:40AM -0700, David Miller wrote: >> From: >> Date: Mon, 10 Jun 2019 14:19:16 +0300 >> >> > +static inline void set_io_rings_size(struct ena_adapter *adapter, >> > + int new_tx_si

Re: [PATCH] Free cookie before we memdup a new one

2019-06-10 Thread Xin Long
On Tue, Jun 11, 2019 at 12:35 AM Neil Horman wrote: > > Based on comments from Xin, even after fixes for our recent syzbot > report of cookie memory leaks, its possible to get a resend of an INIT > chunk which would lead to us leaking cookie memory. > > To ensure that we don't leak cookie memory,

[PATCH v1 bpf-next] selftests/bpf : Clean up feature/ when make clean

2019-06-10 Thread Hechao Li
I got an error when compiling selftests/bpf: libbpf.c:411:10: error: implicit declaration of function 'reallocarray'; did you mean 'realloc'? [-Werror=implicit-function-declaration] progs = reallocarray(progs, nr_progs + 1, sizeof(progs[0])); It was caused by feature-reallocarray=1 in FEATURE-D

Re: [patch net-next v3 3/3] devlink: implement flash status monitoring

2019-06-10 Thread David Ahern
On 6/4/19 7:44 AM, Jiri Pirko wrote: > diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8 > index 1804463b2321..1021ee8d064c 100644 > --- a/man/man8/devlink-dev.8 > +++ b/man/man8/devlink-dev.8 > @@ -244,6 +244,17 @@ Sets the parameter internal_error_reset of specified > devlink device t

Re: [PATCH V2 net-next 4/6] net: ena: allow queue allocation backoff when low on memory

2019-06-10 Thread Bshara, Nafea
Sent from my iPhone > On Jun 10, 2019, at 9:38 AM, Andrew Lunn wrote: > >> On Mon, Jun 10, 2019 at 09:18:40AM -0700, David Miller wrote: >> From: >> Date: Mon, 10 Jun 2019 14:19:16 +0300 >> >>> +static inline void set_io_rings_size(struct ena_adapter *adapter, >>> + int

Re: [patch net-next v3 3/3] devlink: implement flash status monitoring

2019-06-10 Thread Jakub Kicinski
On Mon, 10 Jun 2019 11:09:19 -0600, David Ahern wrote: > On 6/4/19 7:44 AM, Jiri Pirko wrote: > > diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8 > > index 1804463b2321..1021ee8d064c 100644 > > --- a/man/man8/devlink-dev.8 > > +++ b/man/man8/devlink-dev.8 > > @@ -244,6 +244,17 @@ Sets

Re: [patch net-next v3 3/3] devlink: implement flash status monitoring

2019-06-10 Thread David Ahern
On 6/10/19 11:24 AM, Jakub Kicinski wrote: > On Mon, 10 Jun 2019 11:09:19 -0600, David Ahern wrote: >> On 6/4/19 7:44 AM, Jiri Pirko wrote: >>> diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8 >>> index 1804463b2321..1021ee8d064c 100644 >>> --- a/man/man8/devlink-dev.8 >>> +++ b/man/man

Re: [PATCH iproute2-next v2] tc: add support for action act_ctinfo

2019-06-10 Thread David Ahern
On 6/4/19 7:52 AM, Kevin Darbyshire-Bryant wrote: > ctinfo is a tc action restoring data stored in conntrack marks to > various fields. At present it has two independent modes of operation, > restoration of DSCP into IPv4/v6 diffserv and restoration of conntrack > marks into packet skb marks. > >

[PATCH RFC] net: phy: add state PERM_FAIL

2019-06-10 Thread Heiner Kallweit
This RFC patch is a follow-up to discussion [0]. In cases like missing PHY firmware we may want to keep the PHY from being brought up, but still allow MDIO access. Setting state PERM_FAIL in the probe or config_init callback allows to achieve this. [0] https://marc.info/?t=15597314222&r=1&w=2

Re: [PATCH next 0/5] r8169: improve handling of chip-specific configuration

2019-06-10 Thread David Miller
From: Heiner Kallweit Date: Mon, 10 Jun 2019 18:20:31 +0200 > This series improves and simplifies handling of chip-specific > configuration. Series applied.

Re: [PATCH RFC] net: phy: add state PERM_FAIL

2019-06-10 Thread Florian Fainelli
On 6/10/19 10:37 AM, Heiner Kallweit wrote: > This RFC patch is a follow-up to discussion [0]. In cases like missing > PHY firmware we may want to keep the PHY from being brought up, but > still allow MDIO access. Setting state PERM_FAIL in the probe or > config_init callback allows to achieve this

[PATCH bpf-next] selftests/bpf: fix constness of source arg for bpf helpers

2019-06-10 Thread Andrii Nakryiko
Fix signature of bpf_probe_read and bpf_probe_write_user to mark source pointer as const. This causes warnings during compilation for applications relying on those helpers. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/bpf_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 d

Re: [PATCH iproute2 v2] ip: reset netns after each command in batch mode

2019-06-10 Thread Stephen Hemminger
On Fri, 7 Jun 2019 22:41:22 +0200 Matteo Croce wrote: > When creating a new netns or executing a program into an existing one, > the unshare() or setns() calls will change the current netns. > In batch mode, this can run commands on the wrong interfaces, as the > ifindex value is meaningful only

Re: [patch net-next v3 3/3] devlink: implement flash status monitoring

2019-06-10 Thread Jakub Kicinski
On Mon, 10 Jun 2019 11:30:24 -0600, David Ahern wrote: > On 6/10/19 11:24 AM, Jakub Kicinski wrote: > > On Mon, 10 Jun 2019 11:09:19 -0600, David Ahern wrote: > >> On 6/4/19 7:44 AM, Jiri Pirko wrote: > >>> diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8 > >>> index 1804463b2321..1

Re: [PATCH iproute2] ip6tunnel: fix 'ip -6 {show|change} dev ' cmds

2019-06-10 Thread Stephen Hemminger
On Thu, 6 Jun 2019 16:44:26 -0700 Mahesh Bandewar wrote: > Inclusion of 'dev' is allowed by the syntax but not handled > correctly by the command. It produces no output for show > command and falsely successful for change command but does > not make any changes. > > can be verified with the fol

  1   2   3   >