Re: [PATCH bpf-next] libbpf: make libbpf.map source of truth for libbpf version

2019-08-14 Thread Andrey Ignatov
Andrii Nakryiko [Tue, 2019-08-13 21:46 -0700]: > On Tue, Aug 13, 2019 at 5:28 PM Andrey Ignatov wrote: > > > > Andrii Nakryiko [Tue, 2019-08-13 16:24 -0700]: > > > Currently libbpf version is specified in 2 places: libbpf.map and > > > Makefile. They easily get out of sync and it's very easy to

[PATCH bpf-next v4 1/8] xsk: replace ndo_xsk_async_xmit with ndo_xsk_wakeup

2019-08-14 Thread Magnus Karlsson
This commit replaces ndo_xsk_async_xmit with ndo_xsk_wakeup. This new ndo provides the same functionality as before but with the addition of a new flags field that is used to specifiy if Rx, Tx or both should be woken up. The previous ndo only woke up Tx, as implied by the name. The i40e and ixgbe

[PATCH bpf-next v4 4/8] ixgbe: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Magnus Karlsson
This patch adds support for the need_wakeup feature of AF_XDP. If the application has told the kernel that it might sleep using the new bind flag XDP_USE_NEED_WAKEUP, the driver will then set this flag if it has no more buffers on the NIC Rx ring and yield to the application. For Tx, it will set th

[PATCH bpf-next v4 0/8] add need_wakeup flag to the AF_XDP rings

2019-08-14 Thread Magnus Karlsson
This patch set adds support for a new flag called need_wakeup in the AF_XDP Tx and fill rings. When this flag is set by the driver, it means that the application has to explicitly wake up the kernel Rx (for the bit in the fill ring) or kernel Tx (for bit in the Tx ring) processing by issuing a sysc

[PATCH bpf-next v4 2/8] xsk: add support for need_wakeup flag in AF_XDP rings

2019-08-14 Thread Magnus Karlsson
This commit adds support for a new flag called need_wakeup in the AF_XDP Tx and fill rings. When this flag is set, it means that the application has to explicitly wake up the kernel Rx (for the bit in the fill ring) or kernel Tx (for bit in the Tx ring) processing by issuing a syscall. Poll() can w

[PATCH bpf-next v4 3/8] i40e: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Magnus Karlsson
This patch adds support for the need_wakeup feature of AF_XDP. If the application has told the kernel that it might sleep using the new bind flag XDP_USE_NEED_WAKEUP, the driver will then set this flag if it has no more buffers on the NIC Rx ring and yield to the application. For Tx, it will set th

[PATCH bpf-next v4 7/8] net/mlx5e: Move the SW XSK code from NAPI poll to a separate function

2019-08-14 Thread Magnus Karlsson
From: Maxim Mikityanskiy Two XSK tasks are performed during NAPI polling, that are not bound to hardware interrupts: TXing packets and polling for frames in the Fill Ring. They are special in a way that the hardware doesn't know about these tasks, so it doesn't trigger interrupts if there is stil

[PATCH bpf-next v4 5/8] libbpf: add support for need_wakeup flag in AF_XDP part

2019-08-14 Thread Magnus Karlsson
This commit adds support for the new need_wakeup flag in AF_XDP. The xsk_socket__create function is updated to handle this and a new function is introduced called xsk_ring_prod__needs_wakeup(). This function can be used by the application to check if Rx and/or Tx processing needs to be explicitly w

[PATCH bpf-next v4 6/8] samples/bpf: add use of need_wakeup flag in xdpsock

2019-08-14 Thread Magnus Karlsson
This commit adds using the need_wakeup flag to the xdpsock sample application. It is turned on by default as we think it is a feature that seems to always produce a performance benefit, if the application has been written taking advantage of it. It can be turned off in the sample app by using the '

[PATCH bpf-next v4 8/8] net/mlx5e: Add AF_XDP need_wakeup support

2019-08-14 Thread Magnus Karlsson
From: Maxim Mikityanskiy This commit adds support for the new need_wakeup feature of AF_XDP. The applications can opt-in by using the XDP_USE_NEED_WAKEUP bind() flag. When this feature is enabled, some behavior changes: RX side: If the Fill Ring is empty, instead of busy-polling, set the flag to

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-14 Thread Toshiaki Makita
Hi Alexei, thank you for taking a look! On 2019/08/14 10:44, Alexei Starovoitov wrote: On Tue, Aug 13, 2019 at 09:05:44PM +0900, Toshiaki Makita wrote: This is a rough PoC for an idea to offload TC flower to XDP. ... xdp_flow TCovs kmod 4.0 Mpps 1.

Re: [patch net-next] selftests: netdevsim: add devlink params tests

2019-08-14 Thread Jiri Pirko
Wed, Aug 14, 2019 at 12:41:08AM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 13 Aug 2019 15:04:46 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Test recently added netdevsim devlink param implementation. >> >> Signed-off-by: Jiri Pirko > >Thanks for the test, but it doesn't pass here

[PATCH net-next v4 2/2] qed: Add driver API for flashing the config attributes.

2019-08-14 Thread Sudarsana Reddy Kalluru
The patch adds driver interface for reading the config attributes from user provided buffer, and updates these values on nvm config flash partition. This is basically an expansion of our existing ethtool -f implementation. The management FW has exposed an additional method of configuring some of t

[PATCH net-next v4 1/2] qed: Add API for configuring NVM attributes.

2019-08-14 Thread Sudarsana Reddy Kalluru
The patch adds API for configuring the NVM config attributes using Management FW (MFW) interfaces. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 17 drivers/net/ethernet/qlogic/qed/qed_mcp.c | 32 ++

[PATCH net-next v4 0/2] qed*: Support for NVM config attributes.

2019-08-14 Thread Sudarsana Reddy Kalluru
The patch series adds support for managing the NVM config attributes. Patch (1) adds functionality to update config attributes via MFW. Patch (2) adds driver interface for updating the config attributes. Changes from previous versions: --- v4: Added more details on the

PLEASE CONFIRM PURCHASE ORDER

2019-08-14 Thread Mr NARESH KUMAR
Could you please confirm if your recieved our purchase order last week. If no please confirm let me resend it to you. NARESH KUMAR Executive Purchase Saiapextrading Ltd Dubai, KSA. (T/F): +96-2667-264 777 / 778 (Mo): +96 94284 02803 Website - http://www.saiapexgeneraltrading.com

Re: pull-request: bpf-next 2019-08-14

2019-08-14 Thread Daniel Borkmann
On 8/14/19 1:59 AM, Jakub Kicinski wrote: On Wed, 14 Aug 2019 01:16:39 +0200, Daniel Borkmann wrote: Hi David, hi Jakub, The following pull-request contains BPF updates for your *net-next* tree. Pulled, let me know if I did it wrong đŸ€ž LGTM, thanks a lot! :-)

Re: [v5,0/4] tools: bpftool: add net attach/detach command to attach XDP prog

2019-08-14 Thread Daniel T. Lee
On Wed, Aug 14, 2019 at 6:43 AM Jakub Kicinski wrote: > > On Tue, 13 Aug 2019 11:46:17 +0900, Daniel T. Lee wrote: > > Currently, bpftool net only supports dumping progs attached on the > > interface. To attach XDP prog on interface, user must use other tool > > (eg. iproute2). By this patch, with

Re: [PATCH] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-14 Thread Stefan Roese
Hi Rene, On 17.07.19 14:53, René van Dorst wrote: +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -39,7 +39,8 @@ NETIF_F_SG | NETIF_F_TSO | \ NETIF_F_TSO6 | \ NETIF_F_IPV6_CSUM) -#define NE

Re: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-14 Thread Allan W. Nielsen
Hi Y.b. and Andrew, The 08/14/2019 04:28, Y.b. Lu wrote: > > > I'd like to trap all IEEE 1588 PTP Ethernet frames to CPU through etype > > 0x88f7. > > > > Is this the correct way to handle PTP for this switch? For other switches we > > don't need such traps. The switch itself identifies PTP frame

[PATCH net] net/packet: fix race in tpacket_snd()

2019-08-14 Thread Eric Dumazet
packet_sendmsg() checks tx_ring.pg_vec to decide if it must call tpacket_snd(). Problem is that the check is lockless, meaning another thread can issue a concurrent setsockopt(PACKET_TX_RING ) to flip tx_ring.pg_vec back to NULL. Given that tpacket_snd() grabs pg_vec_lock mutex, we can perform th

Re: [v2, 4/4] ocelot: add VCAP IS2 rule to trap PTP Ethernet frames

2019-08-14 Thread Allan W . Nielsen
The 08/14/2019 04:56, Y.b. Lu wrote: > > -Original Message- > > From: Allan W . Nielsen > > Sent: Tuesday, August 13, 2019 2:25 PM > > To: Y.b. Lu > > Cc: netdev@vger.kernel.org; David S . Miller ; > > Alexandre Belloni ; Microchip Linux Driver > > Support > > Subject: Re: [v2, 4/4] ocel

[PATCH 3/7] netfilter: nf_tables: use-after-free in failing rule with bound set

2019-08-14 Thread Pablo Neira Ayuso
If a rule that has already a bound anonymous set fails to be added, the preparation phase releases the rule and the bound set. However, the transaction object from the abort path still has a reference to the set object that is stale, leading to a use-after-free when checking for the set->bound fiel

[PATCH 2/7] netfilter: nf_flow_table: fix offload for flows that are subject to xfrm

2019-08-14 Thread Pablo Neira Ayuso
From: Florian Westphal This makes the previously added 'encap test' pass. Because its possible that the xfrm dst entry becomes stale while such a flow is offloaded, we need to call dst_check() -- the notifier that handles this for non-tunneled traffic isn't sufficient, because SA or or policies m

[PATCH 0/7] Netfilter fixes for net

2019-08-14 Thread Pablo Neira Ayuso
Hi, This patchset contains Netfilter fixes for net: 1) Extend selftest to cover flowtable with ipsec, from Florian Westphal. 2) Fix interaction of ipsec with flowtable, also from Florian. 3) User-after-free with bound set to rule that fails to load. 4) Adjust state and timeout for flows that e

[PATCH 5/7] netfilter: nf_flow_table: teardown flow timeout race

2019-08-14 Thread Pablo Neira Ayuso
Flows that are in teardown state (due to RST / FIN TCP packet) still have their offload flag set on. Hence, the conntrack garbage collector may race to undo the timeout adjustment that the fixup routine performs, leaving the conntrack entry in place with the internal offload timeout (one day). Upd

[PATCH 7/7] netfilter: nft_flow_offload: skip tcp rst and fin packets

2019-08-14 Thread Pablo Neira Ayuso
TCP rst and fin packets do not qualify to place a flow into the flowtable. Most likely there will be no more packets after connection closure. Without this patch, this flow entry expires and connection tracking picks up the entry in ESTABLISHED state using the fixup timeout, which makes this look i

[PATCH 1/7] selftests: netfilter: extend flowtable test script for ipsec

2019-08-14 Thread Pablo Neira Ayuso
From: Florian Westphal 'flow offload' expression should not offload flows that will be subject to ipsec, but it does. This results in a connectivity blackhole for the affected flows -- first packets will go through (offload happens after established state is reached), but all remaining ones bypa

[PATCH 6/7] netfilter: conntrack: Use consistent ct id hash calculation

2019-08-14 Thread Pablo Neira Ayuso
From: Dirk Morris Change ct id hash calculation to only use invariants. Currently the ct id hash calculation is based on some fields that can change in the lifetime on a conntrack entry in some corner cases. The current hash uses the whole tuple which contains an hlist pointer which will change

[PATCH 4/7] netfilter: nf_flow_table: conntrack picks up expired flows

2019-08-14 Thread Pablo Neira Ayuso
Update conntrack entry to pick up expired flows, otherwise the conntrack entry gets stuck with the internal offload timeout (one day). The TCP state also needs to be adjusted to ESTABLISHED state and tracking is set to liberal mode in order to give conntrack a chance to pick up the expired flow. F

tc - mirred ingress not supported at the moment

2019-08-14 Thread Martin Olsson
Hi Cong! Ah sorry. Already implemented. Great! Hmmm. Then why don't the manual at https://www.linux.org/docs/man8/tc-mirred.html to reflect the changes? That was the place I checked to see if ingress was still not implemented. In the commit you point at, the sentence "Currently only egress is imp

Re: [PATCH] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-14 Thread René van Dorst
Hi Stefan, Quoting Stefan Roese : Hi Rene, On 17.07.19 14:53, René van Dorst wrote: +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -39,7 +39,8 @@ NETIF_F_SG | NETIF_F_TSO | \ NETIF_F_TSO6 | \

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-14 Thread Quentin Monnet
2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov > On Tue, Aug 13, 2019 at 02:09:18PM +0100, Quentin Monnet wrote: >> This series adds a "bpftool map count" subcommand to count the number of >> entries present in a BPF map. This results from a customer request for a >> tool to count the number of en

can: tcan4x5x: spi bits_per_word issue on Raspberry PI

2019-08-14 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
Hi all, I am trying to use a tcan4550 together with a Raspberry PI 3 B. I am using the tcan4x5x driver from net-next. I always get the following error during startup. tcan4x5x spi0.0: Probe failed, err=-22 tcan4x5x: probe of spi0.0 failed with error -22 I realized that this happ

Re: [PATCH] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-14 Thread Stefan Roese
Hi Rene, On 14.08.19 11:26, René van Dorst wrote: Hi Stefan, Quoting Stefan Roese : Hi Rene, On 17.07.19 14:53, René van Dorst wrote: +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -39,7 +39,8 @@ NETIF_F_SG | NETIF_F_TSO | \

[PATCH net 2/2] rxrpc: Fix read-after-free in rxrpc_queue_local()

2019-08-14 Thread David Howells
rxrpc_queue_local() attempts to queue the local endpoint it is given and then, if successful, prints a trace line. The trace line includes the current usage count - but we're not allowed to look at the local endpoint at this point as we passed our ref on it to the workqueue. Fix this by reading t

[PATCH net-next 3/4 v2] net: ethernet: mediatek: Rename NEXT_RX_DESP_IDX to NEXT_DESP_IDX

2019-08-14 Thread Stefan Roese
Rename the NEXT_RX_DESP_IDX macro to NEXT_DESP_IDX, so that it better can be used for TX ops as well. This will be used in the upcoming MT7628/88 support (same functionality for RX and TX in this macro). Signed-off-by: Stefan Roese Cc: René van Dorst Cc: Daniel Golle Cc: Sean Wang Cc: John Cri

[PATCH net-next 1/4 v2] dt-bindings: net: mediatek: Add support for MediaTek MT7628/88 SoC

2019-08-14 Thread Stefan Roese
Add compatible for the ethernet IP core on MT7628/88 SoCs. Its compatible with the older Ralink Rt5350F SoC. And OpenWrt already uses this compatible string for the MT76x8. Signed-off-by: Stefan Roese Cc: René van Dorst Cc: Daniel Golle Cc: Sean Wang Cc: John Crispin Cc: devicet...@vger.kerne

[PATCH net-next 4/4 v2] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-14 Thread Stefan Roese
This patch adds support for the MediaTek MT7628/88 SoCs to the common MediaTek ethernet driver. Some minor changes are needed for this and a bigger change, as the MT7628 does not support QDMA (only PDMA). Signed-off-by: Stefan Roese Cc: René van Dorst Cc: Daniel Golle Cc: Sean Wang Cc: John Cr

[PATCH net-next 2/4 v2] net: ethernet: mediatek: Rename MTK_QMTK_INT_STATUS to MTK_QDMA_INT_STATUS

2019-08-14 Thread Stefan Roese
Currently all QDMA registers are named "MTK_QDMA_foo" in this driver with one exception: MTK_QMTK_INT_STATUS. This patch renames MTK_QMTK_INT_STATUS to MTK_QDMA_INT_STATUS so that all macros follow this rule. Signed-off-by: Stefan Roese Cc: René van Dorst Cc: Daniel Golle Cc: Sean Wang Cc: Joh

[PATCH bpf-next] tools: bpftool: compile with $(EXTRA_WARNINGS)

2019-08-14 Thread Quentin Monnet
Compile bpftool with $(EXTRA_WARNINGS), as defined in scripts/Makefile.include, and fix the new warnings produced. Simply leave -Wswitch-enum out of the warning list, as we have several switch-case structures where it is not desirable to process all values of an enum. Remove -Wshadow from the war

[PATCH net 2/2] igb: Fix constant media auto sense switching when no cable is connected.

2019-08-14 Thread Manfred Rudigier
At least on the i350 there is an annoying behavior that is maybe also present on 82580 devices, but was probably not noticed yet as MAS is not widely used. If no cable is connected on both fiber/copper ports the media auto sense code will constantly swap between them as part of the watchdog task a

[PATCH net 1/2] igb: Enable media autosense for the i350.

2019-08-14 Thread Manfred Rudigier
This patch enables the hardware feature "Media Auto Sense" also on the i350. It works in the same way as on the 82850 devices. Hardware designs using dual PHYs (fiber/copper) can enable this feature by setting the MAS enable bits in the NVM_COMPAT register (0x03) in the EEPROM. Signed-off-by: Manf

Re: [PATCH net-next] page_pool: fix logic in __page_pool_get_cached

2019-08-14 Thread Jesper Dangaard Brouer
On Tue, 13 Aug 2019 10:45:09 -0700 Jonathan Lemon wrote: > __page_pool_get_cached() will return NULL when the ring is > empty, even if there are pages present in the lookaside cache. > > It is also possible to refill the cache, and then return a > NULL page. > > Restructure the logic so elimina

Re: [PATCH net-next] page_pool: fix logic in __page_pool_get_cached

2019-08-14 Thread Ilias Apalodimas
Hi Jonathan, Thanks! On Tue, Aug 13, 2019 at 10:45:09AM -0700, Jonathan Lemon wrote: > __page_pool_get_cached() will return NULL when the ring is > empty, even if there are pages present in the lookaside cache. > > It is also possible to refill the cache, and then return a > NULL page. > > Rest

Re: [PATCH] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-14 Thread René van Dorst
Hi Stefan, Quoting Stefan Roese : Hi Rene, On 14.08.19 11:26, René van Dorst wrote: Great, Thanks for addressing this issue. I hope we can collaborate to also support mt76x8 in my PHYLINK patches [0][1]. I am close to posting V2 of the patches but I am currently waiting on some fiber

Re: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-14 Thread Andrew Lunn
> [Y.b. Lu] PTP messages over Ethernet will use two multicast addresses. > 01-80-C2-00-00-0E for peer delay messages. > 01-1B-19-00-00-00 for other messages. > > But only 01-80-C2-00-00-0E could be handled by hardware filter for BPDU > frames (01-80-C2-00-00-0x). > For PTP messages handling, trap

[PATCH bpf-next v4] libbpf: add xsk_ring_prod__nb_free() function

2019-08-14 Thread Eelco Chaudron
When an AF_XDP application received X packets, it does not mean X frames can be stuffed into the producer ring. To make it easier for AF_XDP applications this API allows them to check how many frames can be added into the ring. The patch below looks like a name change only, but the xsk_prod__ pref

Re: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-14 Thread Andrew Lunn
On Wed, Aug 14, 2019 at 10:57:12AM +0200, Allan W. Nielsen wrote: > Hi Y.b. and Andrew, > > The 08/14/2019 04:28, Y.b. Lu wrote: > > > > I'd like to trap all IEEE 1588 PTP Ethernet frames to CPU through etype > > > 0x88f7. > > > > > > Is this the correct way to handle PTP for this switch? For oth

[PATCH bpf-next v2] net: Don't call XDP_SETUP_PROG when nothing is changed

2019-08-14 Thread Maxim Mikityanskiy
Don't uninstall an XDP program when none is installed, and don't install an XDP program that has the same ID as the one already installed. dev_change_xdp_fd doesn't perform any checks in case it uninstalls an XDP program. It means that the driver's ndo_bpf can be called with XDP_SETUP_PROG asking

[PATCH net-next v2] net: dsa: mv88e6xxx: check for mode change in port_setup_mac

2019-08-14 Thread Marek BehĂșn
The mv88e6xxx_port_setup_mac checks if the requested MAC settings are different from the current ones, and if not, does nothing (since chaning them requires putting the link down). In this check it only looks if the triplet [link, speed, duplex] is being changed. This patch adds support to also c

[PATCH net-next 1/4] net: bridge: mdb: move vlan comments

2019-08-14 Thread Nikolay Aleksandrov
Trivial patch to move the vlan comments in their proper places above the vid 0 checks. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 428af1abf8cc..ee6208c

[PATCH net-next 0/4] net: bridge: mdb: allow dump/add/del of host-joined entries

2019-08-14 Thread Nikolay Aleksandrov
Hi, This set makes the bridge dump host-joined mdb entries, they should be treated as normal entries since they take a slot and are aging out. We already have notifications for them but we couldn't dump them until now so they remained hidden. We dump them similar to how they're notified, in order t

[PATCH net-next 3/4] net: bridge: mdb: dump host-joined entries as well

2019-08-14 Thread Nikolay Aleksandrov
Currently we dump only the port mdb entries but we can have host-joined entries on the bridge itself and they should be treated as normal temp mdbs, they're already notified: $ bridge monitor all [MDB]dev br0 port br0 grp ff02::8 temp The group will not be shown in the bridge mdb output, but it ta

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-08-14 Thread Marcelo Ricardo Leitner
On Fri, Aug 02, 2019 at 09:58:12PM +0200, Bernd wrote: > 2019-08-02 21:14 GMT+02:00, Neal Cardwell : > > What's the exact kernel version you are using? > > It is the RHEL errata kernel 3.10.0-957.21.3.el7 (rhsa-2019:1481), i > need to check if there is a newer one. FWIW, this one doesn't have the

Re: [PATCH bpf-next v4 1/8] xsk: replace ndo_xsk_async_xmit with ndo_xsk_wakeup

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > This commit replaces ndo_xsk_async_xmit with ndo_xsk_wakeup. This new > ndo provides the same functionality as before but with the addition of > a new flags field that is used to specifiy if Rx, Tx or both should be > woken up. The previous ndo

Re: [PATCH bpf-next v4 2/8] xsk: add support for need_wakeup flag in AF_XDP rings

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > This commit adds support for a new flag called need_wakeup in the > AF_XDP Tx and fill rings. When this flag is set, it means that the > application has to explicitly wake up the kernel Rx (for the bit in > the fill ring) or kernel Tx (for bit in t

Re: [PATCH bpf-next v4 3/8] i40e: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: This patch adds support for the need_wakeup feature of AF_XDP. If the application has told the kernel that it might sleep using the new bind flag XDP_USE_NEED_WAKEUP, the driver will then set this flag if it has no more buffers on the NIC Rx rin

Re: [PATCH net-next v2] net: dsa: mv88e6xxx: check for mode change in port_setup_mac

2019-08-14 Thread Andrew Lunn
On Wed, Aug 14, 2019 at 04:40:24PM +0200, Marek BehĂșn wrote: > The mv88e6xxx_port_setup_mac checks if the requested MAC settings are > different from the current ones, and if not, does nothing (since chaning > them requires putting the link down). > > In this check it only looks if the triplet [li

Re: [PATCH bpf-next v4 5/8] libbpf: add support for need_wakeup flag in AF_XDP part

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > This commit adds support for the new need_wakeup flag in AF_XDP. The > xsk_socket__create function is updated to handle this and a new > function is introduced called xsk_ring_prod__needs_wakeup(). This > function can be used by the application

Re: [PATCH bpf-next v4 6/8] samples/bpf: add use of need_wakeup flag in xdpsock

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: This commit adds using the need_wakeup flag to the xdpsock sample application. It is turned on by default as we think it is a feature that seems to always produce a performance benefit, if the application has been written taking advantage of it.

Re: [PATCH bpf-next v4 7/8] net/mlx5e: Move the SW XSK code from NAPI poll to a separate function

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > From: Maxim Mikityanskiy > > Two XSK tasks are performed during NAPI polling, that are not bound to > hardware interrupts: TXing packets and polling for frames in the Fill > Ring. They are special in a way that the hardware doesn't know about >

[net-next 1/1] tipc: clean up skb list lock handling on send path

2019-08-14 Thread Jon Maloy
The policy for handling the skb list locks on the send and receive paths is simple. - On the send path we never need to grab the lock on the 'xmitq' list when the destination is an exernal node. - On the receive path we always need to grab the lock on the 'inputq' list, irrespective of source

Re: [PATCH bpf-next v4 3/8] i40e: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Magnus Karlsson
On Wed, Aug 14, 2019 at 4:48 PM Jonathan Lemon wrote: > > > > On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > > > This patch adds support for the need_wakeup feature of AF_XDP. If the > > application has told the kernel that it might sleep using the new bind > > flag XDP_USE_NEED_WAKEUP, the dri

can: tcan4x5x: spi bits_per_word issue on Raspberry PI

2019-08-14 Thread FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
> Hi all, > > I am trying to use a tcan4550 together with a Raspberry PI 3 B. I am using the > tcan4x5x driver from net-next. > I always get the following error during startup. > tcan4x5x spi0.0: Probe failed, err=-22 > tcan4x5x: probe of spi0.0 failed with error -22 > > I realized th

[patch net-next v2 0/2] selftests: netdevsim: add devlink paramstests

2019-08-14 Thread Jiri Pirko
From: Jiri Pirko The first patch is just a helper addition as a dependency of the actual test in patch number two. Jiri Pirko (2): selftests: net: push jq workaround into separate helper selftests: netdevsim: add devlink params tests .../drivers/net/netdevsim/devlink.sh | 62 +

[patch net-next v2 1/2] selftests: net: push jq workaround into separate helper

2019-08-14 Thread Jiri Pirko
From: Jiri Pirko Push the jq return value workaround code into a separate helper so it could be used by the rest of the code. Signed-off-by: Jiri Pirko --- v1->v2: -new patch --- tools/testing/selftests/net/forwarding/lib.sh | 16 .../selftests/net/forwarding/tc_common.sh

[patch net-next v2 2/2] selftests: netdevsim: add devlink params tests

2019-08-14 Thread Jiri Pirko
From: Jiri Pirko Test recently added netdevsim devlink param implementation. Signed-off-by: Jiri Pirko --- v1->v2: -using cmd_jq helper --- .../drivers/net/netdevsim/devlink.sh | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/tools/testing/selfte

Re: [PATCH RFC 1/4] net: phy: swphy: emulate register MII_ESTATUS

2019-08-14 Thread Andrew Lunn
On Tue, Aug 13, 2019 at 11:24:56PM +0200, Heiner Kallweit wrote: > When the genphy driver binds to a swphy it will call > genphy_read_abilites that will try to read MII_ESTATUS if BMSR_ESTATEN > is set in MII_BMSR. So far this would read the default value 0x > and 1000FD and 1000HD are reported

[patch net-next v3 0/2] netdevsim: implement support for devlink region and snapshots

2019-08-14 Thread Jiri Pirko
From: Jiri Pirko Implement devlink region support for netdevsim and test it. --- Note the selftest patch depends on "[patch net-next] selftests: netdevsim: add devlink params tests" patch sent earlier today. Jiri Pirko (2): netdevsim: implement support for devlink region and snapshots selft

[patch net-next v3 1/2] netdevsim: implement support for devlink region and snapshots

2019-08-14 Thread Jiri Pirko
From: Jiri Pirko Implement dummy region of size 32K and allow user to create snapshots or random data using debugfs file trigger. Signed-off-by: Jiri Pirko --- v2->v3: - return -ENOMEM in case dummy_data cannot be allocated and don't print out error message. - return err in case snapshot crea

[patch net-next v3 2/2] selftests: netdevsim: add devlink regions tests

2019-08-14 Thread Jiri Pirko
From: Jiri Pirko Test netdevsim devlink region implementation. Signed-off-by: Jiri Pirko --- v1->v2: - new patch --- .../drivers/net/netdevsim/devlink.sh | 54 ++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/netdevs

Re: [PATCH bpf-next v4 8/8] net/mlx5e: Add AF_XDP need_wakeup support

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > From: Maxim Mikityanskiy > > This commit adds support for the new need_wakeup feature of AF_XDP. The > applications can opt-in by using the XDP_USE_NEED_WAKEUP bind() flag. > When this feature is enabled, some behavior changes: > > RX side: If the

Re: [PATCH net v2] ibmveth: Convert multicast list size for little-endian system

2019-08-14 Thread Thomas Falcon
On 8/13/19 9:43 PM, Jakub Kicinski wrote: On Mon, 12 Aug 2019 16:13:06 -0500, Thomas Falcon wrote: The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but t

Re: [PATCH bpf-next v4 4/8] ixgbe: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > This patch adds support for the need_wakeup feature of AF_XDP. If the > application has told the kernel that it might sleep using the new bind > flag XDP_USE_NEED_WAKEUP, the driver will then set this flag if it has > no more buffers on the NIC

Re: [PATCH bpf-next v4 3/8] i40e: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: > This patch adds support for the need_wakeup feature of AF_XDP. If the > application has told the kernel that it might sleep using the new bind > flag XDP_USE_NEED_WAKEUP, the driver will then set this flag if it has > no more buffers on the NIC Rx

Re: [PATCH bpf-next v4 3/8] i40e: add support for AF_XDP need_wakeup feature

2019-08-14 Thread Jonathan Lemon
On 14 Aug 2019, at 7:59, Magnus Karlsson wrote: On Wed, Aug 14, 2019 at 4:48 PM Jonathan Lemon wrote: On 14 Aug 2019, at 0:27, Magnus Karlsson wrote: This patch adds support for the need_wakeup feature of AF_XDP. If the application has told the kernel that it might sleep using the new

Re: [PATCH net-next] net: openvswitch: Set OvS recirc_id from tc chain index

2019-08-14 Thread Pravin Shelar
On Tue, Aug 13, 2019 at 1:29 AM Paul Blakey wrote: > > > On 8/12/2019 7:18 PM, Pravin Shelar wrote: > > On Sun, Aug 11, 2019 at 3:46 AM Paul Blakey wrote: > >> > >> On 8/8/2019 11:53 PM, Pravin Shelar wrote: > >>> On Wed, Aug 7, 2019 at 5:08 AM Paul Blakey wrote: > Offloaded OvS datapath ru

Re: [PATCH net-next 1/5] RDS: Re-add pf/sol access via sysctl

2019-08-14 Thread Doug Ledford
On Tue, 2019-08-13 at 11:20 -0700, Gerd Rausch wrote: > From: Andy Grover > Date: Tue, 24 Nov 2009 15:35:51 -0800 > > Although RDS has an official PF_RDS value now, existing software > expects to look for rds sysctls to determine it. We need to maintain > these for now, for backwards compatibilit

Re: [PATCH net-next 0/5] net/rds: Fixes from internal Oracle repo

2019-08-14 Thread Doug Ledford
On Tue, 2019-08-13 at 11:20 -0700, Gerd Rausch wrote: > This is the first set of (mostly old) patches from our internal > repository > in an effort to synchronize what Oracle had been using internally > with what is shipped with the Linux kernel. > > Andy Grover (2): > RDS: Re-add pf/sol access

Re: tc - mirred ingress not supported at the moment

2019-08-14 Thread Stephen Hemminger
On Wed, 14 Aug 2019 11:25:25 +0200 Martin Olsson wrote: > Hi Cong! > > Ah sorry. > Already implemented. Great! > > Hmmm. Then why don't the manual at > https://www.linux.org/docs/man8/tc-mirred.html to reflect the changes? > That was the place I checked to see if ingress was still not implement

Re: [PATCH net-next,v4 08/12] drivers: net: use flow block API

2019-08-14 Thread Edward Cree
On 13/08/2019 20:51, Pablo Neira Ayuso wrote: > On Mon, Aug 12, 2019 at 06:50:09PM +0100, Edward Cree wrote: >> Pablo, can you explain (because this commit message doesn't) why these per- >>  driver lists are needed, and what the information/state is that has module >>  (rather than, say, netdevice

Re: [PATCH RFC 2/4] net: phy: allow to bind genphy driver at probe time

2019-08-14 Thread Florian Fainelli
On 8/13/19 4:02 PM, Heiner Kallweit wrote: > On 14.08.2019 00:53, Florian Fainelli wrote: >> On 8/13/19 2:25 PM, Heiner Kallweit wrote: >>> In cases like a fixed phy that is never attached to a net_device we >>> may want to bind the genphy driver at probe time. Setting a PHY ID of >>> 0x to

Re: [PATCH net-next,v4 07/12] net: sched: use flow block API

2019-08-14 Thread Edward Cree
On 09/07/2019 21:55, Pablo Neira Ayuso wrote: > This patch adds tcf_block_setup() which uses the flow block API. > > This infrastructure takes the flow block callbacks coming from the > driver and register/unregister to/from the cls_api core. > > Signed-off-by: Pablo Neira Ayuso > --- > > @@ -796

Re: [PATCH net] batman-adv: fix uninit-value in batadv_netlink_get_ifindex()

2019-08-14 Thread David Miller
From: Eric Dumazet Date: Mon, 12 Aug 2019 04:57:27 -0700 > batadv_netlink_get_ifindex() needs to make sure user passed > a correct u32 attribute. ... > Fixes: b60620cf567b ("batman-adv: netlink: hardif query") > Signed-off-by: Eric Dumazet > Reported-by: syzbot Simon, I assume I will get this

Re: [PATCH net-next] mcast: ensure L-L IPv6 packets are accepted by bridge

2019-08-14 Thread Patrick Ruddy
Thanks both for the quick replies, answers inline... On Wed, 2019-08-14 at 02:55 +0300, Nikolay Aleksandrov wrote: > On 8/13/19 10:53 PM, Ido Schimmel wrote: > > + Bridge maintainers, Linus > > > > Good catch Ido, thanks! > First I'd say the subject needs to reflect that this is a bridge change

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-14 Thread Edward Cree
On 14/08/2019 10:42, Quentin Monnet wrote: > 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov > >> The same can be achieved by 'bpftool map dump|grep key|wc -l', no? > To some extent (with subtleties for some other map types); and we use a > similar command line as a workaround for now. But because

[PATCH bpf-next 0/4] selftests/bpf: test_progs: misc fixes

2019-08-14 Thread Stanislav Fomichev
* make output a bit easier to follow * add test__skip to indicate skipped tests * remove global success/error counts (use environment) * remove asserts from the tests Cc: Andrii Nakryiko Stanislav Fomichev (4): selftests/bpf: test_progs: change formatting of the condenced output selftests/bp

[PATCH bpf-next 1/4] selftests/bpf: test_progs: change formatting of the condenced output

2019-08-14 Thread Stanislav Fomichev
This makes it visually simpler to follow the output. Also, highlight with red color failures when outputting to tty. Before: #1 attach_probe:FAIL #2 bpf_obj_id:OK #3/1 bpf_verif_scale:loop3.o:OK #3/2 bpf_verif_scale:test_verif_scale1.o:OK #3/3 bpf_verif_scale:test_verif_scale2.o:OK #3/

[PATCH bpf-next 4/4] selftests/bpf: test_progs: remove asserts from subtests

2019-08-14 Thread Stanislav Fomichev
Otherwise they can bring the whole process down. Cc: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/prog_tests/bpf_obj_id.c | 30 ++- .../selftests/bpf/prog_tests/map_lock.c | 20 - .../selftests/bpf/prog_tests/spinlock.c | 10

[PATCH bpf-next 2/4] selftests/bpf: test_progs: test__skip

2019-08-14 Thread Stanislav Fomichev
Export test__skip() to indicate skipped tests and use it in test_send_signal_nmi(). Cc: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/prog_tests/send_signal.c | 1 + tools/testing/selftests/bpf/test_progs.c | 9 +++-- tools/testing/selftests/b

[PATCH bpf-next 3/4] selftests/bpf: test_progs: remove global fail/success counts

2019-08-14 Thread Stanislav Fomichev
Now that we have a global per-test/per-environment state, there is no longer the need to have global fail/success counters (and there is no need to save/get the diff before/after the test). Cc: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/prog_tests/bpf_obj_id.c |

Re: [PATCH net-next v6 6/6] net: mscc: PTP Hardware Clock (PHC) support

2019-08-14 Thread David Miller
From: Antoine Tenart Date: Mon, 12 Aug 2019 16:45:37 +0200 > This patch adds support for PTP Hardware Clock (PHC) to the Ocelot > switch for both PTP 1-step and 2-step modes. > > Signed-off-by: Antoine Tenart Richard, I really need your review on this patch. Thank you.

fallout from net-next netfilter changes

2019-08-14 Thread David Miller
This started happening after Jakub's pull of your net-next changes yesterday: ./include/uapi/linux/netfilter_ipv6/ip6t_LOG.h:5:2: warning: #warning "Please update iptables, this file will be removed soon!" [-Wcpp] #warning "Please update iptables, this file will be removed soon!" ^~~ In

Re: [PATCH net-next] r8169: fix sporadic transmit timeout issue

2019-08-14 Thread David Miller
From: Heiner Kallweit Date: Mon, 12 Aug 2019 20:47:40 +0200 > Holger reported sporadic transmit timeouts and it turned out that one > path misses ringing the doorbell. Fix was suggested by Eric. > > Fixes: ef14358546b1 ("r8169: make use of xmit_more") > Suggested-by: Eric Dumazet > Tested-by: H

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-14 Thread Quentin Monnet
2019-08-14 17:45 UTC+0100 ~ Edward Cree > On 14/08/2019 10:42, Quentin Monnet wrote: >> 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov >> >>> The same can be achieved by 'bpftool map dump|grep key|wc -l', no? >> To some extent (with subtleties for some other map types); and we use a >> similar co

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote: > > On 14/08/2019 10:42, Quentin Monnet wrote: > > 2019-08-13 18:51 UTC-0700 ~ Alexei Starovoitov > > > >> The same can be achieved by 'bpftool map dump|grep key|wc -l', no? > > To some extent (with subtleties for some other map types); and we us

Re: [PATCH net-next] mcast: ensure L-L IPv6 packets are accepted by bridge

2019-08-14 Thread Nikolay Aleksandrov
On 8/14/19 7:40 PM, Patrick Ruddy wrote: > Thanks both for the quick replies, answers inline... > > On Wed, 2019-08-14 at 02:55 +0300, Nikolay Aleksandrov wrote: >> On 8/13/19 10:53 PM, Ido Schimmel wrote: >>> + Bridge maintainers, Linus >>> >> >> Good catch Ido, thanks! >> First I'd say the subje

Re: [PATCH net] ipv6: Fix return value of ipv6_mc_may_pull() for malformed packets

2019-08-14 Thread David Miller
From: Stefano Brivio Date: Tue, 13 Aug 2019 00:46:01 +0200 > Commit ba5ea614622d ("bridge: simplify ip_mc_check_igmp() and > ipv6_mc_check_mld() calls") replaces direct calls to pskb_may_pull() > in br_ipv6_multicast_mld2_report() with calls to ipv6_mc_may_pull(), > that returns -EINVAL on buffer

Re: [PATCH bpf-next 1/4] selftests/bpf: test_progs: change formatting of the condenced output

2019-08-14 Thread Alexei Starovoitov
On Wed, Aug 14, 2019 at 9:47 AM Stanislav Fomichev wrote: > > This makes it visually simpler to follow the output. > Also, highlight with red color failures when outputting to tty. > > Before: > #1 attach_probe:FAIL > #2 bpf_obj_id:OK > #3/1 bpf_verif_scale:loop3.o:OK > #3/2 bpf_verif_scal

  1   2   >