Re: [PATCH bpf-next] flow_dissector: lookup netns by skb->sk if skb->dev is NULL

2018-09-24 Thread Song Liu
On Mon, Sep 24, 2018 at 1:52 PM Willem de Bruijn wrote: > > From: Willem de Bruijn > > BPF flow dissectors are configured per network namespace. > __skb_flow_dissect looks up the netns through dev_net(skb->dev). > > In some dissector paths skb->dev is NULL, such as for Unix sockets. > In these ca

[PATCH net-next 3/3] r8169: improve a check in rtl_init_one

2018-09-24 Thread Heiner Kallweit
The check for pci_is_pcie() is redundant here because all chip versions >=18 are PCIe only anyway. In addition use dma_set_mask_and_coherent() instead of separate calls to pci_set_dma_mask() and pci_set_consistent_dma_mask(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.

[PATCH net-next 2/3] r8169: improve rtl8169_irq_mask_and_ack

2018-09-24 Thread Heiner Kallweit
Code can be slightly simplified by acking even events we're not interested in. In addition add a comment making clear that the read has no functional purpose and is just a PCI commit. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 7 +++ 1 file changed, 3 insertion

[PATCH net-next 1/3] r8169: use default watchdog timeout

2018-09-24 Thread Heiner Kallweit
The networking core has a default watchdog timeout of 5s. I see no need to define an own timeout of 6s which is basically the same. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next 0/3] r8169: series with smaller improvements

2018-09-24 Thread Heiner Kallweit
This series includes smaller improvements, nothing exciting. Heiner Kallweit (3): r8169: use default watchdog timeout r8169: improve rtl8169_irq_mask_and_ack r8169: improve a check in rtl_init_one drivers/net/ethernet/realtek/r8169.c | 18 ++ 1 file changed, 6 insertions(+)

Re: [PATCH v2 net-next 0/9] bnxt_en: devlink param updates

2018-09-24 Thread Vasundhara Volam
On Mon, Sep 24, 2018 at 10:11 PM Jakub Kicinski wrote: > > On Mon, 24 Sep 2018 10:46:12 +0530, Vasundhara Volam wrote: > > This patchset adds support for 3 generic and 1 driver-specific devlink > > parameters. Add documentation for these configuration parameters. > > > > Also, this patchset adds s

Re: [PATCH v2 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt

2018-09-24 Thread Vasundhara Volam
On Mon, Sep 24, 2018 at 9:54 PM Jakub Kicinski wrote: > > On Mon, 24 Sep 2018 10:46:21 +0530, Vasundhara Volam wrote: > > This patch adds a new file to add information about configuration > > parameters that are supported by bnxt_en driver via devlink. > > > > Cc: "David S. Miller" > > Cc: Jonath

netlink: 16 bytes leftover after parsing attributes in process `ip'.

2018-09-24 Thread David Ahern
On top of net-next I am see a dmesg error: netlink: 16 bytes leftover after parsing attributes in process `ip'. I traced it to address lists and commit: commit 6ecf4c37eb3e89b0832c9616089a5cdca3747da7 Author: Christian Brauner Date: Tue Sep 4 21:53:50 2018 +0200 ipv6: enable IFA_TARGET_N

Re: [PATCH v2 net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Florian Fainelli
On 09/24/2018 04:50 PM, Andrew Lunn wrote: > A HWMON device is only registered is the SFP module supports the > diagnostic page and is complient to SFF8472. Don't unconditionally > unregister the hwmon device when the SFP module is remove, otherwise > we access data structures which don't exist. >

Re: [PATCH net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Florian Fainelli
On 09/24/2018 04:46 PM, Andrew Lunn wrote: > On Mon, Sep 24, 2018 at 03:43:33PM -0700, Florian Fainelli wrote: >> On 09/24/2018 03:38 PM, Andrew Lunn wrote: >>> A HWMON device is only registered is the SFP module supports the >>> diagnostic page and is complient to SFF8472. Don't unconditionally >>

[PATCH v2 net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Andrew Lunn
A HWMON device is only registered is the SFP module supports the diagnostic page and is complient to SFF8472. Don't unconditionally unregister the hwmon device when the SFP module is remove, otherwise we access data structures which don't exist. Reported-by: Florian Fainelli Fixes: 1323061a018a (

Re: [PATCH net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Andrew Lunn
On Mon, Sep 24, 2018 at 03:43:33PM -0700, Florian Fainelli wrote: > On 09/24/2018 03:38 PM, Andrew Lunn wrote: > > A HWMON device is only registered is the SFP module supports the > > diagnostic page and is complient to SFF8472. Don't unconditionally > > unregister the hwmon device when the SFP mod

Re: [PATCH net-next v1 2/5] ipv6: allow link-local and multicast packets inside vrf

2018-09-24 Thread David Ahern
On 9/24/18 10:13 AM, Mike Manning wrote: > Packets that are multicast or to link-local addresses are not enslaved > to the vrf of the socket that they are received on. This is needed for > NDISC, but breaks applications that rely on receiving such packets when > in a VRF. Also to make IPv6 consiste

Re: [PATCH net-next v1 5/5] ipv6: add vrf table handling code for ipv6 mcast

2018-09-24 Thread David Ahern
On 9/24/18 10:13 AM, Mike Manning wrote: > From: Patrick Ruddy > > The code to obtain the correct table for the incoming interface was > missing for IPv6. This has been added along with the table creation > notification to fib rules for the RTNL_FAMILY_IP6MR address family. > > Signed-off-by: Pa

Re: [PATCH net-next v1 4/5] ipv6: do not drop vrf udp multicast packets

2018-09-24 Thread David Ahern
On 9/24/18 10:13 AM, Mike Manning wrote: > From: Dewi Morgan > > For bound udp sockets in a vrf, also check the sdif to get the index > for ingress devices enslaved to an l3mdev. Verify the multicast address > against the enslaved rather than the l3mdev device. > > Signed-off-by: Dewi Morgan >

Re: [PATCH net-next v1 3/5] ipv4: Allow sending multicast packets on specific i/f using VRF socket

2018-09-24 Thread David Ahern
On 9/24/18 10:13 AM, Mike Manning wrote: > From: Robert Shearman > > It is useful to be able to use the same socket for listening in a > specific VRF, as for sending multicast packets out of a specific > interface. However, the bound device on the socket currently takes > precedence and results i

Re: [PATCH net-next v1 1/5] net: allow binding socket in a VRF when there's an unbound socket

2018-09-24 Thread David Ahern
On 9/24/18 10:13 AM, Mike Manning wrote: > From: Robert Shearman > > There is no easy way currently for applications that want to receive > packets in the default VRF to be isolated from packets arriving in > VRFs, which makes using VRF-unaware applications in a VRF-aware system > a potential sec

Re: [PATCH net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Florian Fainelli
On 09/24/2018 03:38 PM, Andrew Lunn wrote: > A HWMON device is only registered is the SFP module supports the > diagnostic page and is complient to SFF8472. Don't unconditionally > unregister the hwmon device when the SFP module is remove, otherwise > we access data structures which don't exist. >

[PATCH net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Andrew Lunn
A HWMON device is only registered is the SFP module supports the diagnostic page and is complient to SFF8472. Don't unconditionally unregister the hwmon device when the SFP module is remove, otherwise we access data structures which don't exist. Reported-by: Florian Fainelli Fixes: 1323061a018a (

[PATCH net] bonding: avoid possible dead-lock

2018-09-24 Thread Mahesh Bandewar
From: Mahesh Bandewar Syzkaller reported this on a slightly older kernel but it's still applicable to the current kernel - == WARNING: possible circular locking dependency detected 4.18.0-next-20180823+ #46 Not tainted -

Re: [PATCH net v2 1/2] net: core: add member wol_enabled to struct net_device

2018-09-24 Thread Florian Fainelli
On 09/24/2018 12:58 PM, Heiner Kallweit wrote: > Add flag wol_enabled to struct net_device indicating whether > Wake-on-LAN is enabled. As first user phy_suspend() will use it to > decide whether PHY can be suspended or not. > > Fixes: f1e911d5d0df ("r8169: add basic phylib support") > Fixes: e8cf

Re: [PATCH net 2/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Florian Fainelli
On 09/24/2018 12:56 PM, Heiner Kallweit wrote: > On 24.09.2018 20:21, Florian Fainelli wrote: >> On 09/24/2018 11:11 AM, Heiner Kallweit wrote: >>> Core of the problem is that phy_suspend() suspends the PHY when it >>> should not because of WoL. phy_suspend() checks for WoL already, but >>> this wo

[PATCH net] bonding: pass link-local packets to bonding master also.

2018-09-24 Thread Mahesh Bandewar
From: Mahesh Bandewar Commit b89f04c61efe ("bonding: deliver link-local packets with skb->dev set to link that packets arrived on") changed the behavior of how link-local-multicast packets are processed. The change in the behavior broke some legacy use cases where these packets are expected to ar

[PATCH net-next] net: phy: improve handling delayed work

2018-09-24 Thread Heiner Kallweit
Using mod_delayed_work() allows to simplify handling delayed work and removes the need for the sync parameter in phy_trigger_machine(). Also introduce a helper phy_queue_state_machine() to encapsulate the low-level delayed work calls. No functional change intended. Signed-off-by: Heiner Kallweit

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Song Liu
> On Sep 24, 2018, at 2:05 PM, Eric Dumazet wrote: > >> >> Interesting, maybe a bnxt specific issue. >> >> It seems their model is to process TX/RX notification in the same queue, >> they throw away RX events if budget == 0 >> >> It means commit e7b9569102995ebc26821789628eef45bd9840d8 is w

Re: [bpf-next, v4 0/5] Introduce eBPF flow dissector

2018-09-24 Thread Willem de Bruijn
On Fri, Sep 14, 2018 at 5:51 PM Petar Penkov wrote: > > On Fri, Sep 14, 2018 at 2:47 PM, Y Song wrote: > > On Fri, Sep 14, 2018 at 12:24 PM Alexei Starovoitov > > wrote: > >> > >> On Fri, Sep 14, 2018 at 07:46:17AM -0700, Petar Penkov wrote: > >> > From: Petar Penkov > >> > > >> > This patch se

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
> > Interesting, maybe a bnxt specific issue. > > It seems their model is to process TX/RX notification in the same queue, > they throw away RX events if budget == 0 > > It means commit e7b9569102995ebc26821789628eef45bd9840d8 is wrong and > must be reverted. > > Otherwise, we have a possibility of

[PATCH net 1/7] asix: Check for supported Wake-on-LAN modes

2018-09-24 Thread Florian Fainelli
The driver currently silently accepts unsupported Wake-on-LAN modes (other than WAKE_PHY or WAKE_MAGIC) without reporting that to the user, which is confusing. Fixes: 2e55cc7210fe ("[PATCH] USB: usbnet (3/9) module for ASIX Ethernet adapters") Signed-off-by: Florian Fainelli --- drivers/net/usb

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
On Mon, Sep 24, 2018 at 1:00 PM Song Liu wrote: > > > > > On Sep 24, 2018, at 12:41 PM, Eric Dumazet wrote: > > > > On Mon, Sep 24, 2018 at 12:31 PM Song Liu wrote: > > > >> This triggers dev_watchdog() on a simple netperf TCP_RR on bnxt (I haven't > >> tested other drivers yet). > >> > >> I gue

[PATCH bpf-next] flow_dissector: lookup netns by skb->sk if skb->dev is NULL

2018-09-24 Thread Willem de Bruijn
From: Willem de Bruijn BPF flow dissectors are configured per network namespace. __skb_flow_dissect looks up the netns through dev_net(skb->dev). In some dissector paths skb->dev is NULL, such as for Unix sockets. In these cases fall back to looking up the netns by socket. Analyzing the codepat

Re: [PATCH net-next v1 5/5] ipv6: add vrf table handling code for ipv6 mcast

2018-09-24 Thread David Ahern
just started looking at this set. Compiler notes one problem: On 9/24/18 10:13 AM, Mike Manning wrote: > @@ -2146,6 +2157,7 @@ static void ip6_mr_forward(struct net *net, struct > mr_table *mrt, > > int ip6_mr_input(struct sk_buff *skb) > { > + struct rtable *rt = skb_rtable(skb); The a

bond: take rcu lock in bond_poll_controller

2018-09-24 Thread Dave Jones
Callers of bond_for_each_slave_rcu are expected to hold the rcu lock, otherwise a trace like below is shown WARNING: CPU: 2 PID: 179 at net/core/dev.c:6567 netdev_lower_get_next_private_rcu+0x34/0x40 CPU: 2 PID: 179 Comm: kworker/u16:15 Not tainted 4.19.0-rc5-backup+ #1 Workqueue: bond0 bond_mii_

[PATCH net v2 1/2] net: core: add member wol_enabled to struct net_device

2018-09-24 Thread Heiner Kallweit
Add flag wol_enabled to struct net_device indicating whether Wake-on-LAN is enabled. As first user phy_suspend() will use it to decide whether PHY can be suspended or not. Fixes: f1e911d5d0df ("r8169: add basic phylib support") Fixes: e8cfd9d6c772 ("net: phy: call state machine synchronously in ph

[PATCH net v2 2/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Heiner Kallweit
Core of the problem is that phy_suspend() suspends the PHY when it should not because of WoL. phy_suspend() checks for WoL already, but this works only if the PHY driver handles WoL (what is rarely the case). Typically WoL is handled by the MAC driver. This patch uses new member wol_enabled of str

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Song Liu
> On Sep 24, 2018, at 12:41 PM, Eric Dumazet wrote: > > On Mon, Sep 24, 2018 at 12:31 PM Song Liu wrote: > >> This triggers dev_watchdog() on a simple netperf TCP_RR on bnxt (I haven't >> tested other drivers yet). >> >> I guess this is because NAPI_STATE_SCHED is set when poll_one_napi() c

[PATCH net v2 0/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Heiner Kallweit
phy_suspend doesn't always recognize that WoL is enabled and therefore suspends the PHY when it should not. First idea to address the issue was to reuse checks used in mdio_bus_phy_may_suspend which check whether relevant devices are wakeup-enabled. Florian raised some concerns because drivers may

Re: [PATCH net 2/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Heiner Kallweit
On 24.09.2018 20:21, Florian Fainelli wrote: > On 09/24/2018 11:11 AM, Heiner Kallweit wrote: >> Core of the problem is that phy_suspend() suspends the PHY when it >> should not because of WoL. phy_suspend() checks for WoL already, but >> this works only if the PHY driver handles WoL (what is rarel

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
On Mon, Sep 24, 2018 at 12:31 PM Song Liu wrote: > This triggers dev_watchdog() on a simple netperf TCP_RR on bnxt (I haven't > tested other drivers yet). > > I guess this is because NAPI_STATE_SCHED is set when poll_one_napi() calls > napi->poll(). And then cleared by napi->poll(). Which part o

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Song Liu
> On Sep 24, 2018, at 8:30 AM, Eric Dumazet wrote: > > On Sun, Sep 23, 2018 at 10:04 PM David Miller wrote: >> >> Series applied, thanks Eric. > > Thanks David. > > Song, would you please this additional patch ? > > diff --git a/net/core/netpoll.c b/net/core/netpoll.c > index > 3219a2932

Re: [PATCH net-next] dpaa2-eth: Make Rx flow hash key configurable

2018-09-24 Thread David Miller
From: Ioana Ciocoi Radulescu Date: Mon, 24 Sep 2018 15:36:21 + > Until now, the Rx flow hash key was a 5-tuple (IP src, IP dst, > IP nextproto, L4 src port, L4 dst port) fixed value that we > configured at probe. > > Add support for configuring this hash key at runtime. > We support all stan

Re: [PATCH net] net: mvneta: fix the remaining Rx descriptor unmapping issues

2018-09-24 Thread David Miller
From: Antoine Tenart Date: Mon, 24 Sep 2018 16:56:13 +0200 > With CONFIG_DMA_API_DEBUG enabled we get DMA unmapping warning in > various places of the mvneta driver, for example when putting down an > interface while traffic is passing through. > > The issue is when using s/w buffer management,

Re: [PATCH net] ip_tunnel: be careful when accessing the inner header

2018-09-24 Thread David Miller
From: Paolo Abeni Date: Mon, 24 Sep 2018 15:48:19 +0200 > Cong noted that we need the same checks introduced by commit 76c0ddd8c3a6 > ("ip6_tunnel: be careful when accessing the inner header") > even for ipv4 tunnels. > > Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") > Suggested-by:

Re: [PATCH net-next] tls: Fixed uninitialised vars warning

2018-09-24 Thread David Miller
From: Vakul Garg Date: Mon, 24 Sep 2018 16:09:49 +0530 > In tls_sw_sendmsg() and tls_sw_sendpage(), it is possible that the > uninitialised variable 'ret' gets passed to sk_stream_error(). So > initialise local variable 'ret' to '0. The warnings were detected by > 'smatch' tool. > > Fixes: a4205

Re: [PATCH net-next] net/tls: Fixed race condition in async encryption

2018-09-24 Thread David Miller
From: Vakul Garg Date: Mon, 24 Sep 2018 15:35:56 +0530 > On processors with multi-engine crypto accelerators, it is possible that > multiple records get encrypted in parallel and their encryption > completion is notified to different cpus in multicore processor. This > leads to the situation wher

Re: [PATCH net-next 0/2] few NTF_ROUTER related updates

2018-09-24 Thread David Miller
From: Roopa Prabhu Date: Sat, 22 Sep 2018 21:26:18 -0700 > From: Roopa Prabhu > > This series allows setting of NTF_ROUTER by an external > entity (eg BGP E-VPN control plane). Also fixes missing > netlink notification on neigh NTF_ROUTER flag changes. Series applied, thanks.

Re: [PATCH v2 net] mpls: allow routes on ip6gre devices

2018-09-24 Thread David Miller
From: Saif Hasan Date: Fri, 21 Sep 2018 14:30:05 -0700 > Summary: > > This appears to be necessary and sufficient change to enable `MPLS` on > `ip6gre` tunnels (RFC4023). > > This diff allows IP6GRE devices to be recognized by MPLS kernel module > and hence user can configure interface to accep

Re: [PATCH net-next V2 0/2] net/sched: Add hardware specific counters to TC actions

2018-09-24 Thread David Miller
From: Eelco Chaudron Date: Fri, 21 Sep 2018 07:13:37 -0400 > Add hardware specific counters to TC actions which will be exported > through the netlink API. This makes troubleshooting TC flower offload > easier, as it possible to differentiate the packets being offloaded. > > Signed-off-by: Eelco

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Daniel Borkmann
On 09/24/2018 08:05 PM, Joe Stringer wrote: > On Mon, 24 Sep 2018 at 05:38, Daniel Borkmann wrote: >> On 09/24/2018 02:12 PM, Daniel Borkmann wrote: >>> Hi Joe, >>> >>> couple of comments inline: >>> >>> On 09/21/2018 07:10 PM, Joe Stringer wrote: This patch adds new BPF helper functions, bpf

Re: BUG: jumbo frames broken after commit xen-netfront: Fix race between device setup and open

2018-09-24 Thread Brandon Holbrook
We are experiencing this bug on stable Gentoo (4.14.67) on EC2. I see the original "Fix race between device setup and open" commit is present in 4.14, but the fix commit(s) have not yet been backported.  As your fix seems to have resolved the issue and not caused any other ill effects, will you

Re: [PATCH net] af_key: free SKBs under RCU protection

2018-09-24 Thread stranche
On 2018-09-23 11:15, Eric Dumazet wrote: On 09/20/2018 12:25 PM, stran...@codeaurora.org wrote: Perhaps a cleaner solution here is to always clone the SKB in pfkey_broadcast_one(). That will ensure that the two kfree_skb() calls in pfkey_broadcast() will never be passed an SKB with sock_rfree()

Re: [PATCH net 2/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Florian Fainelli
On 09/24/2018 11:11 AM, Heiner Kallweit wrote: > Core of the problem is that phy_suspend() suspends the PHY when it > should not because of WoL. phy_suspend() checks for WoL already, but > this works only if the PHY driver handles WoL (what is rarely the case). > Typically WoL is handled by the MAC

Re: [PATCH] Documentation: Add HOWTO Korean translation into BPF and XDP Reference Guide.

2018-09-24 Thread Jonathan Corbet
On Fri, 21 Sep 2018 13:22:38 +0900 Changan Song wrote: > Signed-off-by: Changan Song > --- > Documentation/translations/ko_KR/bpf-xdp.txt | 3511 ++ > 1 file changed, 3511 insertions(+) > create mode 100644 Documentation/translations/ko_KR/bpf-xdp.txt I can't judge the quality

[PATCH net 2/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Heiner Kallweit
Core of the problem is that phy_suspend() suspends the PHY when it should not because of WoL. phy_suspend() checks for WoL already, but this works only if the PHY driver handles WoL (what is rarely the case). Typically WoL is handled by the MAC driver. This patch uses new member wol_enabled of str

[PATCH net 1/2] net: core: add member wol_enabled to struct net_device

2018-09-24 Thread Heiner Kallweit
Add flag wol_enabled to struct net_device indicating whether Wake-on-LAN is enabled. As first user phy_suspend() will use it to decide whether PHY can be suspended or not. Fixes: f1e911d5d0df ("r8169: add basic phylib support") Fixes: e8cfd9d6c772 ("net: phy: call state machine synchronously in ph

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Joe Stringer
On Mon, 24 Sep 2018 at 05:51, Daniel Borkmann wrote: > > On 09/24/2018 02:12 PM, Daniel Borkmann wrote: > > On 09/21/2018 07:10 PM, Joe Stringer wrote: > [...] > >> +/* bpf_sk_lookup performs the core lookup for different types of sockets, > >> + * taking a reference on the socket if it doesn't ha

[PATCH net 0/2] net: phy: fix WoL handling when suspending the PHY

2018-09-24 Thread Heiner Kallweit
phy_suspend doesn't always recognize that WoL is enabled and therefore suspends the PHY when it should not. First idea to address the issue was to reuse checks used in mdio_bus_phy_may_suspend which check whether relevant devices are wakeup-enabled. Florian raised some concerns because drivers may

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Joe Stringer
On Mon, 24 Sep 2018 at 05:38, Daniel Borkmann wrote: > > On 09/24/2018 02:12 PM, Daniel Borkmann wrote: > > Hi Joe, > > > > couple of comments inline: > > > > On 09/21/2018 07:10 PM, Joe Stringer wrote: > >> This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and > >> bpf_sk_lookup_udp()

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Joe Stringer
On Mon, 24 Sep 2018 at 05:12, Daniel Borkmann wrote: > > Hi Joe, > > couple of comments inline: Thanks for the review, I'll fix up those bits. > On 09/21/2018 07:10 PM, Joe Stringer wrote: > > This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and > > bpf_sk_lookup_udp() which allows

[PATCH RFC net-next] net: enable RPS on vlan devices

2018-09-24 Thread Shannon Nelson
This patch modifies the RPS processing code so that it searches for a matching vlan interface on the packet and then uses the RPS settings of the vlan interface.  If no vlan interface is found or the vlan interface does not have RPS enabled, it will fall back to the RPS settings of the underlying d

Re: Documentation: Add HOWTO Korean translation into BPF and XDP Reference Guide.

2018-09-24 Thread Tejun Heo
Hello, First of all, thanks a lot for the contribution. It'd be great to have a korean translation. I glanced over it and there often were areas where it was a bit challenging to understand without going back to the english version. I think this would still be helpful and a step in the right di

Re: pull-request: bpf 2018-09-24

2018-09-24 Thread David Miller
From: Daniel Borkmann Date: Mon, 24 Sep 2018 11:31:00 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Several fixes for BPF sockmap to only allow sockets being attached in >ESTABLISHED state, from John. > > 2) Fix up the license

Re: [PATCH v2 net-next 0/9] bnxt_en: devlink param updates

2018-09-24 Thread Jakub Kicinski
On Mon, 24 Sep 2018 10:46:12 +0530, Vasundhara Volam wrote: > This patchset adds support for 3 generic and 1 driver-specific devlink > parameters. Add documentation for these configuration parameters. > > Also, this patchset adds support to return proper error code if > HWRM_NVM_GET/SET_VARIABLE c

[PATCH 5/5] ixgbe: add AF_XDP zero-copy Tx support

2018-09-24 Thread Björn Töpel
From: Björn Töpel This patch adds zero-copy Tx support for AF_XDP sockets. It implements the ndo_xsk_async_xmit netdev ndo and performs all the Tx logic from a NAPI context. This means pulling egress packets from the Tx ring, placing the frames on the NIC HW descriptor ring and completing sent fr

[PATCH 4/5] ixgbe: move common Tx functions to ixgbe_txrx_common.h

2018-09-24 Thread Björn Töpel
From: Björn Töpel This patch prepares for the upcoming zero-copy Tx functionality by moving common functions used both by the regular path and zero-copy path. Signed-off-by: Björn Töpel --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c| 9 +++-- drivers/net/ethernet/intel/ixgbe/ixg

[PATCH 1/5] ixgbe: added Rx/Tx ring disable/enable functions

2018-09-24 Thread Björn Töpel
From: Björn Töpel Add functions for Rx/Tx ring enable/disable. Instead of resetting the whole device, only the affected ring is disabled or enabled. This plumbing is used in later commits, when zero-copy AF_XDP support is introduced. Signed-off-by: Björn Töpel --- drivers/net/ethernet/intel/i

[PATCH 2/5] ixgbe: move common Rx functions to ixgbe_txrx_common.h

2018-09-24 Thread Björn Töpel
From: Björn Töpel This patch prepares for the upcoming zero-copy Rx functionality, by moving/changing linkage of common functions, used both by the regular path and zero-copy path. Signed-off-by: Björn Töpel --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 29 +++ .../ethern

[PATCH 3/5] ixgbe: add AF_XDP zero-copy Rx support

2018-09-24 Thread Björn Töpel
From: Björn Töpel This patch adds zero-copy Rx support for AF_XDP sockets. Instead of allocating buffers of type MEM_TYPE_PAGE_SHARED, the Rx frames are allocated as MEM_TYPE_ZERO_COPY when AF_XDP is enabled for a certain queue. All AF_XDP specific functions are added to a new file, ixgbe_xsk.c.

[PATCH 0/5] Introducing ixgbe AF_XDP ZC support

2018-09-24 Thread Björn Töpel
From: Björn Töpel This patch set introduces zero-copy AF_XDP support for Intel's ixgbe driver. The ixgbe zero-copy code is located in its own file ixgbe_xsk.[ch], analogous to the i40e ZC support. Again, as in i40e, code paths have been copied from the XDP path to the zero-copy path. Going forwa

Re: [PATCH v2 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt

2018-09-24 Thread Jakub Kicinski
On Mon, 24 Sep 2018 10:46:21 +0530, Vasundhara Volam wrote: > This patch adds a new file to add information about configuration > parameters that are supported by bnxt_en driver via devlink. > > Cc: "David S. Miller" > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: Jiri Pirko > Cc: M

[PATCH net-next v3 07/10] net: sched: implement functions to put and flush all chains

2018-09-24 Thread Vlad Buslov
Extract code that flushes and puts all chains on tcf block to two standalone function to be shared with functions that locklessly get/put reference to block. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/sched/cls_api.c | 55 + 1 fil

[PATCH net-next v3 08/10] net: sched: protect block idr with spinlock

2018-09-24 Thread Vlad Buslov
Protect block idr access with spinlock, instead of relying on rtnl lock. Take tn->idr_lock spinlock during block insertion and removal. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/sched/cls_api.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ne

[PATCH net-next v3 10/10] net: sched: use reference counting for tcf blocks on rules update

2018-09-24 Thread Vlad Buslov
In order to remove dependency on rtnl lock on rules update path, always take reference to block while using it on rules update path. Change tcf_block_get() error handling to properly release block with reference counting, instead of just destroying it, in order to accommodate potential concurrent u

[PATCH net-next v3 09/10] net: sched: implement tcf_block_refcnt_{get|put}()

2018-09-24 Thread Vlad Buslov
Implement get/put function for blocks that only take/release the reference and perform deallocation. These functions are intended to be used by unlocked rules update path to always hold reference to block while working with it. They use on new fine-grained locking mechanisms introduced in previous

[PATCH net-next v3 03/10] net: sched: extend Qdisc with rcu

2018-09-24 Thread Vlad Buslov
Currently, Qdisc API functions assume that users have rtnl lock taken. To implement rtnl unlocked classifiers update interface, Qdisc API must be extended with functions that do not require rtnl lock. Extend Qdisc structure with rcu. Implement special version of put function qdisc_put_unlocked() t

[PATCH net-next v3 06/10] net: sched: change tcf block reference counter type to refcount_t

2018-09-24 Thread Vlad Buslov
As a preparation for removing rtnl lock dependency from rules update path, change tcf block reference counter type to refcount_t to allow modification by concurrent users. In block put function perform decrement and check reference counter once to accommodate concurrent modification by unlocked us

[PATCH net-next v3 02/10] net: sched: rename qdisc_destroy() to qdisc_put()

2018-09-24 Thread Vlad Buslov
Current implementation of qdisc_destroy() decrements Qdisc reference counter and only actually destroy Qdisc if reference counter value reached zero. Rename qdisc_destroy() to qdisc_put() in order for it to better describe the way in which this function currently implemented and used. Extract code

[PATCH net-next v3 04/10] net: sched: add helper function to take reference to Qdisc

2018-09-24 Thread Vlad Buslov
Implement function to take reference to Qdisc that relies on rcu read lock instead of rtnl mutex. Function only takes reference to Qdisc if reference counter isn't zero. Intended to be used by unlocked cls API. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- include/net/sch_generic.h | 13 +

[PATCH net-next v3 05/10] net: sched: use Qdisc rcu API instead of relying on rtnl lock

2018-09-24 Thread Vlad Buslov
As a preparation from removing rtnl lock dependency from rules update path, use Qdisc rcu and reference counting capabilities instead of relying on rtnl lock while working with Qdiscs. Create new tcf_block_release() function, and use it to free resources taken by tcf_block_find(). Currently, this f

[PATCH net-next v3 00/10] Refactor classifier API to work with Qdisc/blocks without rtnl lock

2018-09-24 Thread Vlad Buslov
Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a third step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag RT

[PATCH net-next v3 01/10] net: core: netlink: add helper refcount dec and lock function

2018-09-24 Thread Vlad Buslov
Rtnl lock is encapsulated in netlink and cannot be accessed by other modules directly. This means that reference counted objects that rely on rtnl lock cannot use it with refcounter helper function that atomically releases decrements reference and obtains mutex. This patch implements simple wrappe

[PATCH net-next v3 00/10] Refactor classifier API to work with Qdisc/blocks without rtnl lock

2018-09-24 Thread Vlad Buslov
Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a third step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag RT

[PATCH net-next v1 1/5] net: allow binding socket in a VRF when there's an unbound socket

2018-09-24 Thread Mike Manning
From: Robert Shearman There is no easy way currently for applications that want to receive packets in the default VRF to be isolated from packets arriving in VRFs, which makes using VRF-unaware applications in a VRF-aware system a potential security risk. So change the inet socket lookup to avoi

[PATCH net-next v1 3/5] ipv4: Allow sending multicast packets on specific i/f using VRF socket

2018-09-24 Thread Mike Manning
From: Robert Shearman It is useful to be able to use the same socket for listening in a specific VRF, as for sending multicast packets out of a specific interface. However, the bound device on the socket currently takes precedence and results in the packets not being sent. Relax the condition on

[PATCH net-next v1 0/5] vrf: allow simultaneous service instances in default and other VRFs

2018-09-24 Thread Mike Manning
Services currently have to be VRF-aware if they are using an unbound socket. One cannot have multiple service instances running in the default and other VRFs for services that are not VRF-aware and listen on an unbound socket. This is because there is no way of isolating packets received in the def

[PATCH net-next v1 4/5] ipv6: do not drop vrf udp multicast packets

2018-09-24 Thread Mike Manning
From: Dewi Morgan For bound udp sockets in a vrf, also check the sdif to get the index for ingress devices enslaved to an l3mdev. Verify the multicast address against the enslaved rather than the l3mdev device. Signed-off-by: Dewi Morgan Signed-off-by: Mike Manning --- net/ipv6/ip6_input.c |

[PATCH net-next v1 2/5] ipv6: allow link-local and multicast packets inside vrf

2018-09-24 Thread Mike Manning
Packets that are multicast or to link-local addresses are not enslaved to the vrf of the socket that they are received on. This is needed for NDISC, but breaks applications that rely on receiving such packets when in a VRF. Also to make IPv6 consistent with IPv4 which does handle multicast packets

[PATCH net-next v1 5/5] ipv6: add vrf table handling code for ipv6 mcast

2018-09-24 Thread Mike Manning
From: Patrick Ruddy The code to obtain the correct table for the incoming interface was missing for IPv6. This has been added along with the table creation notification to fib rules for the RTNL_FAMILY_IP6MR address family. Signed-off-by: Patrick Ruddy Signed-off-by: Mike Manning --- drivers/

[PATCH net-next] dpaa2-eth: Make Rx flow hash key configurable

2018-09-24 Thread Ioana Ciocoi Radulescu
Until now, the Rx flow hash key was a 5-tuple (IP src, IP dst, IP nextproto, L4 src port, L4 dst port) fixed value that we configured at probe. Add support for configuring this hash key at runtime. We support all standard header fields configurable through ethtool, but cannot differentiate between

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
On Sun, Sep 23, 2018 at 10:04 PM David Miller wrote: > > Series applied, thanks Eric. Thanks David. Song, would you please this additional patch ? diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 3219a2932463096566ce8ff336ecdf699422dd65..2ad45babe621b2c979ad5496b7df4342e4efbaa6 10064

Re: vlan missing with AF_PACKET and auxdata

2018-09-24 Thread Michael Walle
Am 2018-09-24 14:22, schrieb Jan Grashöfer: Hi Michael, On 24/09/2018 14:01, Michael Walle wrote: I'm using the AF_PACKET socket with setsockopt(PACKET_AUXDATA) to get the incoming VLAN tag. Correct me if I'm wrong, but as far as I see the first VLAN tag is always stripped - either in hardware

[PATCH net] ip_tunnel: be careful when accessing the inner header

2018-09-24 Thread Paolo Abeni
Cong noted that we need the same checks introduced by commit 76c0ddd8c3a6 ("ip6_tunnel: be careful when accessing the inner header") even for ipv4 tunnels. Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") Suggested-by: Cong Wang Signed-off-by: Paolo Abeni --- Note: the bug is probably p

Re: [PATCHv2 bpf-next 04/11] bpf: Add PTR_TO_SOCKET verifier type

2018-09-24 Thread Daniel Borkmann
On 09/21/2018 07:10 PM, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer > > --- > > v2: Reuse reg_type_mismatch() in more place

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Daniel Borkmann
On 09/24/2018 02:12 PM, Daniel Borkmann wrote: > On 09/21/2018 07:10 PM, Joe Stringer wrote: [...] >> +/* bpf_sk_lookup performs the core lookup for different types of sockets, >> + * taking a reference on the socket if it doesn't have the flag >> SOCK_RCU_FREE. >> + * Returns the socket as an 'un

OFFICE

2018-09-24 Thread OFFICE

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Daniel Borkmann
On 09/24/2018 02:12 PM, Daniel Borkmann wrote: > Hi Joe, > > couple of comments inline: > > On 09/21/2018 07:10 PM, Joe Stringer wrote: >> This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and >> bpf_sk_lookup_udp() which allows BPF programs to find out if there is a >> socket listeni

Re: vlan missing with AF_PACKET and auxdata

2018-09-24 Thread Jan Grashöfer
Hi Michael, On 24/09/2018 14:01, Michael Walle wrote: I'm using the AF_PACKET socket with setsockopt(PACKET_AUXDATA) to get the incoming VLAN tag. Correct me if I'm wrong, but as far as I see the first VLAN tag is always stripped - either in hardware or in net/core/dev.c in __netif_receive_skb

Re: [PATCHv2 bpf-next 08/11] selftests/bpf: Add tests for reference tracking

2018-09-24 Thread Daniel Borkmann
On 09/21/2018 07:10 PM, Joe Stringer wrote: > reference tracking: leak potential reference > reference tracking: leak potential reference on stack > reference tracking: leak potential reference on stack 2 > reference tracking: zero potential reference > reference tracking: copy and zero potential r

Re: [PATCHv2 bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-24 Thread Daniel Borkmann
Hi Joe, couple of comments inline: On 09/21/2018 07:10 PM, Joe Stringer wrote: > This patch adds new BPF helper functions, bpf_sk_lookup_tcp() and > bpf_sk_lookup_udp() which allows BPF programs to find out if there is a > socket listening on this host, and returns a socket pointer which the > BP

vlan missing with AF_PACKET and auxdata

2018-09-24 Thread Michael Walle
Hi, I'm using the AF_PACKET socket with setsockopt(PACKET_AUXDATA) to get the incoming VLAN tag. Correct me if I'm wrong, but as far as I see the first VLAN tag is always stripped - either in hardware or in net/core/dev.c in __netif_receive_skb_core() - and stored in skb->vlan_tci. Therefore,

Re: [PATCH net-next] mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement

2018-09-24 Thread Petr Machata
Ido Schimmel writes: > On Mon, Sep 24, 2018 at 12:04:17AM +0200, Andrew Lunn wrote: >> But doesn't that mean you reflash the device with the minimum version, >> when in fact there could be a much newer version in /lib/firmware? > > No, because we always enforce the latest version we post to > lin

  1   2   >