[PATCH net-next] vxlan: fix dereference of nexthop group in nexthop update path

2020-05-30 Thread Roopa Prabhu
From: Roopa Prabhu fix dereference of nexthop group in fdb nexthop group update validation path. Fixes: 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries") Reported-by: Ido Schimmel Suggested-by: Ido Schimmel Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 4 ++-- 1 file changed,

Re: [PATCH net-next 1/6] r8169: change driver data type

2020-05-30 Thread Stephen Hemminger
On Sat, 30 May 2020 23:54:36 +0200 Heiner Kallweit wrote: > Change driver private data type to struct rtl8169_private * to avoid > some overhead. > > Signed-off-by: Heiner Kallweit > --- Are you sure about this. Using netdev_priv() is actually at a fixed offset from netdev, and almost always t

[GIT] Networking

2020-05-30 Thread David Miller
Another week, another set of bug fixes: 1) Fix pskb_pull length in __xfrm_transport_prep(), from Xin Long. 2) Fix double xfrm_state put in esp{4,6}_gro_receive(), also from Xin Long. 3) Re-arm discovery timer properly in mac80211 mesh code, from Linus Lüssing. 4) Prevent buffer overflow

Re: [PATCH net-next v2 0/3] vxlan fdb nexthop misc fixes

2020-05-30 Thread Roopa Prabhu
On Sat, May 30, 2020 at 9:59 PM David Miller wrote: > > From: Roopa Prabhu > Date: Sat, 30 May 2020 21:48:38 -0700 > > > Roopa Prabhu (3): > > vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID > > vxlan: few locking fixes in nexthop event handler > > vxlan: fix derefere

Re: [PATCH net-next v2 0/3] vxlan fdb nexthop misc fixes

2020-05-30 Thread David Miller
From: Roopa Prabhu Date: Sat, 30 May 2020 21:48:38 -0700 > Roopa Prabhu (3): > vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID > vxlan: few locking fixes in nexthop event handler > vxlan: fix dereference of nexthop group in nexthop update path Mid-air collision :-)

Re: [PATCH net] l2tp: add sk_family checks to l2tp_validate_socket

2020-05-30 Thread David Miller
From: Eric Dumazet Date: Fri, 29 May 2020 11:32:25 -0700 > syzbot was able to trigger a crash after using an ISDN socket > and fool l2tp. > > Fix this by making sure the UDP socket is of the proper family. ... > Fixes: 6b9f34239b00 ("l2tp: fix races in tunnel creation") > Fixes: fd558d186df2 ("

Re: [PATCH v2 net] l2tp: do not use inet_hash()/inet_unhash()

2020-05-30 Thread David Miller
From: Eric Dumazet Date: Fri, 29 May 2020 11:20:53 -0700 > syzbot recently found a way to crash the kernel [1] > > Issue here is that inet_hash() & inet_unhash() are currently > only meant to be used by TCP & DCCP, since only these protocols > provide the needed hashinfo pointer. > > L2TP uses

Re: [PATCH net-next] mptcp: fix NULL ptr dereference in MP_JOIN error path

2020-05-30 Thread David Miller
From: Paolo Abeni Date: Fri, 29 May 2020 17:49:18 +0200 > When token lookup on MP_JOIN 3rd ack fails, the server > socket closes with a reset the incoming child. Such socket > has the 'is_mptcp' flag set, but no msk socket associated > - due to the failed lookup. > > While crafting the reset pac

Re: [PATCH net] sch_cake: Take advantage of skb->hash where appropriate

2020-05-30 Thread David Miller
From: Toke Høiland-Jørgensen Date: Fri, 29 May 2020 14:43:44 +0200 > While the other fq-based qdiscs take advantage of skb->hash and doesn't > recompute it if it is already set, sch_cake does not. > > This was a deliberate choice because sch_cake hashes various parts of the > packet header to su

Re: [PATCH RFT] ravb: Mask PHY mode to avoid inserting delays twice

2020-05-30 Thread David Miller
From: Geert Uytterhoeven Date: Fri, 29 May 2020 14:25:40 +0200 > Until recently, the Micrel KSZ9031 PHY driver ignored any PHY mode > ("RGMII-*ID") settings, but used the hardware defaults, augmented by > explicit configuration of individual skew values using the "*-skew-ps" > DT properties. The

Re: [PATCH net-next 0/2] selftests: forwarding: Two small changes

2020-05-30 Thread David Miller
From: Petr Machata Date: Fri, 29 May 2020 14:16:52 +0300 > Two unrelated changes in this patchset: > > - In patch #1, convert mirror tests from using ping directly to generating > ICMP packets by mausezahn. Using ping in tests is error-prone, because > ping is too smart. On a flaky system (n

[PATCH net-next v2 2/3] vxlan: few locking fixes in nexthop event handler

2020-05-30 Thread Roopa Prabhu
From: Roopa Prabhu - remove fdb from nh_list before the rcu grace period - protect fdb->vdev with rcu - hold spin lock before destroying fdb Fixes: c7cdbe2efc40 ("vxlan: support for nexthop notifiers") Signed-off-by: Roopa Prabhu Reviewed-by: Nikolay Aleksandrov --- drivers/net/vxlan.c | 32 +

[PATCH net-next v2 0/3] vxlan fdb nexthop misc fixes

2020-05-30 Thread Roopa Prabhu
From: Roopa Prabhu Roopa Prabhu (3): vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID vxlan: few locking fixes in nexthop event handler vxlan: fix dereference of nexthop group in nexthop update path drivers/net/vxlan.c | 40 +++- 1

[PATCH net-next v2 1/3] vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID

2020-05-30 Thread Roopa Prabhu
From: Roopa Prabhu NDA_NH_ID represents a remote ip or a group of remote ips. It allows use of nexthop groups in lieu of a remote ip or a list of remote ips supported by the fdb api. Current code ignores the other remote ip attrs when NDA_NH_ID is specified. In the spirit of strict checking, Thi

[PATCH net-next v2 3/3] vxlan: fix dereference of nexthop group in nexthop update path

2020-05-30 Thread Roopa Prabhu
From: Roopa Prabhu fix dereference of nexthop group in fdb nexthop group update validation path. Fixes: 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries") Reported-by: Ido Schimmel Suggested-by: Ido Schimmel Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 4 ++-- 1 file changed,

Re: [PATCH net-next 0/2] vxlan fdb nexthop misc fixes

2020-05-30 Thread David Miller
From: Roopa Prabhu Date: Thu, 28 May 2020 22:12:34 -0700 > From: Roopa Prabhu > > Roopa Prabhu (2): > vxlan: add check to prevent use of remote ip attributes with NDA_NH_ID > vxlan: few locking fixes in nexthop event handler Series applied, thanks.

Re: [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-05-28

2020-05-30 Thread David Miller
From: Jeff Kirsher Date: Thu, 28 May 2020 17:08:16 -0700 > This series contains updates to the ice driver only. Pulled, thanks Jeff.

Re: [PATCH] net: qrtr: Allocate workqueue before kernel_bind

2020-05-30 Thread David Miller
From: Chris Lew Date: Thu, 28 May 2020 16:05:26 -0700 > A null pointer dereference in qrtr_ns_data_ready() is seen if a client > opens a qrtr socket before qrtr_ns_init() can bind to the control port. > When the control port is bound, the ENETRESET error will be broadcasted > and clients will clo

Re: [PATCH net 0/3] mptcp: a bunch of fixes

2020-05-30 Thread David Miller
From: Paolo Abeni Date: Fri, 29 May 2020 17:43:28 +0200 > This patch series pulls together a few bugfixes for MPTCP bug observed while > doing stress-test with apache bench - forced to use MPTCP and multiple > subflows. Series applied, and patch #1 and #3 queued up for -stable, thanks.

Re: [PATCH net-next 0/6] r8169: again few improvements

2020-05-30 Thread David Miller
From: Heiner Kallweit Date: Sat, 30 May 2020 23:52:26 +0200 > Again a series with few r8169 improvements. Series applied, thanks Heiner.

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-30 Thread kbuild test robot
Hi Alexei, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on v5.7-rc7 next-20200529] [cannot apply to bpf-next/master bpf/master net/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the s

Re: [PATCH v2 bpf-next 2/4] bpf: Introduce sleepable BPF programs

2020-05-30 Thread kbuild test robot
Hi Alexei, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on v5.7-rc7 next-20200529] [cannot apply to bpf-next/master bpf/master net/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the s

Re: pull-request: wireless-drivers-next-2020-05-30

2020-05-30 Thread David Miller
From: Kalle Valo Date: Sat, 30 May 2020 14:47:29 + (UTC) > here's a pull request to net-next tree, more info below. Please let me know if > there are any problems. Pulled, thanks a lot Kalle.

Re: [PATCH net-next] net/smc: pre-fetch send buffer outside of send_lock

2020-05-30 Thread David Miller
From: Karsten Graul Date: Sat, 30 May 2020 16:42:37 +0200 > Pre-fetch send buffer for the CDC validation message before entering the > send_lock. Without that the send call might fail with -EBUSY because > there are no free buffers and waiting for buffers is not possible under > send_lock. > > S

Re: [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c

2020-05-30 Thread David Miller
From: Vladimir Oltean Date: Sat, 30 May 2020 17:03:22 +0300 > From: Vladimir Oltean > > Newer C compilers are complaining about the fact that there are no > function prototypes in sja1105_vl.c for the non-static functions. > Give them what they want. > > Signed-off-by: Vladimir Oltean This a

Re: [PATCH v2 net-next 00/13] New DSA driver for VSC9953 Seville switch

2020-05-30 Thread David Miller
From: David Miller Date: Sat, 30 May 2020 18:03:51 -0700 (PDT) > Looks good, series applied, thanks. Actually, reverted, this doesn't build: [davem@localhost net-next]$ make -s -j14 ld: drivers/net/dsa/ocelot/seville_vsc9953.o: in function `seville_driver_init': seville_vsc9953.c:(.init.text+0x

[PATCH net-next] switch cmsghdr_from_user_compat_to_kern() to copy_from_user()

2020-05-30 Thread Al Viro
no point getting compat_cmsghdr field-by-field Signed-off-by: Al Viro --- diff --git a/net/compat.c b/net/compat.c index afd7b444e0bf..5e3041a2c37d 100644 --- a/net/compat.c +++ b/net/compat.c @@ -183,20 +183,21 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,

Re: [PATCH v2 net-next 00/13] New DSA driver for VSC9953 Seville switch

2020-05-30 Thread David Miller
From: Vladimir Oltean Date: Sat, 30 May 2020 14:51:29 +0300 > From: Vladimir Oltean > > Looking at the Felix and Ocelot drivers, Maxim asked if it would be > possible to use them as a base for a new driver for the Seville switch > inside NXP T1040. Turns out, it is! The result is that the mscc_

Re: [PATCH net-next 0/2] Fix 2 non-critical issues in SJA1105 DSA

2020-05-30 Thread David Miller
From: Vladimir Oltean Date: Sat, 30 May 2020 13:29:51 +0300 > From: Vladimir Oltean > > This small series suppresses the W=1 warnings in the sja1105 driver and > it corrects some register offsets. I would like to target it against > net-next since it would have non-trivial conflicts with net, a

Re: [PATCH v2] net/sched: act_ct: add nat mangle action only for NAT-conntrack

2020-05-30 Thread David Miller
From: we...@ucloud.cn Date: Sat, 30 May 2020 13:54:51 +0800 > From: wenxu > > Currently add nat mangle action with comparing invert and ori tuple. > It is better to check IPS_NAT_MASK flags first to avoid non necessary > memcmp for non-NAT conntrack. > > Signed-off-by: wenxu Applied.

Re: [pull request][net-next 00/15] mlx5 cleanup 2020-05-29

2020-05-30 Thread David Miller
From: Saeed Mahameed Date: Fri, 29 May 2020 21:26:11 -0700 > While the TLS RX series is being discussed, If it is ok with you, > i would like to get this cleanup series merged into net-next. This is fine with me, pulled, thanks Saeed.

Re: [PATCH net] devinet: fix memleak in inetdev_init()

2020-05-30 Thread David Miller
From: Yang Yingliang Date: Sat, 30 May 2020 11:34:33 +0800 > When devinet_sysctl_register() failed, the memory allocated > in neigh_parms_alloc() should be freed. > > Fixes: 20e61da7ffcf ("ipv4: fail early when creating netdev named all or > default") > Signed-off-by: Yang Yingliang Applied a

Re: [PATCH net-next v3] hinic: add set_channels ethtool_ops support

2020-05-30 Thread David Miller
From: Luo bin Date: Fri, 29 May 2020 18:11:50 + > add support to change TX/RX queue number with ethtool -L ethx combined > > Signed-off-by: Luo bin Luo, I am not applying any of your patches until you fix the time on your computer. This causes a lot of issues and slows down my workflow be

Re: [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt

2020-05-30 Thread David Miller
From: Jia He Date: Sat, 30 May 2020 09:38:28 +0800 > When client on the host tries to connect(SOCK_STREAM, O_NONBLOCK) to the > server on the guest, there will be a panic on a ThunderX2 (armv8a server): ... > The race condition is as follows: > Task1Task2 > =

Re: [PATCH net-next 0/6] net: hns3: adds some cleanups for -next

2020-05-30 Thread David Miller
From: Huazhong Tan Date: Sat, 30 May 2020 09:08:26 +0800 > There are some cleanups for the HNS3 ethernet driver, fix an > incorrect print format, an incorrect comment and some coding > style issues, also remove some unused codes and macros. Series applied, thanks.

Re: [PATCH net-next 1/2] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c

2020-05-30 Thread Andrew Lunn
On Sat, May 30, 2020 at 01:29:52PM +0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > Newer compilers complain with W=1 builds that there are non-static > functions defined in sja1105_static_config.c that don't have a > prototype, because their prototype is defined in sja1105.h which this

Re: [PATCH stable-4.19.y] net: phy: reschedule state machine if AN has not completed in PHY_AN state

2020-05-30 Thread Russell King - ARM Linux admin
On Sun, May 31, 2020 at 12:43:15AM +0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > In kernel 4.19 (and probably earlier too) there are issues surrounding > the PHY_AN state. > > For example, if a PHY is in PHY_AN state and AN has not finished, then > what is supposed to happen is that

Re: [PATCH 09/12] x86/xen: save and restore steal clock

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:28 PM, Anchal Agarwal wrote: > From: Munehisa Kamata > > Save steal clock values of all present CPUs in the system core ops > suspend callbacks. Also, restore a boot CPU's steal clock in the system > core resume callback. For non-boot CPUs, restore after they're brought > up, because

Re: [PATCH 08/12] xen/time: introduce xen_{save,restore}_steal_clock

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:28 PM, Anchal Agarwal wrote: > From: Munehisa Kamata > > Currently, steal time accounting code in scheduler expects steal clock > callback to provide monotonically increasing value. If the accounting > code receives a smaller value than previous one, it uses a negative > value to calc

Re: [PATCH 05/12] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:26 PM, Anchal Agarwal wrote: > Many legacy device drivers do not implement power management (PM) > functions which means that interrupts requested by these drivers stay > in active state when the kernel is hibernated. > > This does not matter on bare metal and on most hypervisors becau

Re: [PATCH 04/12] x86/xen: add system core suspend and resume callbacks

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:26 PM, Anchal Agarwal wrote: > From: Munehisa Kamata > > Add Xen PVHVM specific system core callbacks for PM suspend and > hibernation support. The callbacks suspend and resume Xen > primitives,like shared_info, pvclock and grant table. Note that > Xen suspend can handle them in a dif

Re: [PATCH 03/12] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:25 PM, Anchal Agarwal wrote: > Introduce a small function which re-uses shared page's PA allocated > during guest initialization time in reserve_shared_info() and not > allocate new page during resume flow. > It also does the mapping of shared_info_page by calling > xen_hvm_init_share

Re: [PATCH 02/12] xenbus: add freeze/thaw/restore callbacks support

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:25 PM, Anchal Agarwal wrote: > > int xenbus_dev_resume(struct device *dev) > { > - int err; > + int err = 0; That's not necessary. > struct xenbus_driver *drv; > struct xenbus_device *xdev > = container_of(dev, struct xenbus_device, dev); > - >

Re: [PATCH stable-4.19.y] net: phy: reschedule state machine if AN has not completed in PHY_AN state

2020-05-30 Thread Vladimir Oltean
Hi Heiner, On Sun, 31 May 2020 at 01:36, Heiner Kallweit wrote: > > On 30.05.2020 23:43, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > In kernel 4.19 (and probably earlier too) there are issues surrounding > > the PHY_AN state. > > > > For example, if a PHY is in PHY_AN state and AN h

Re: [PATCH stable-4.19.y] net: phy: reschedule state machine if AN has not completed in PHY_AN state

2020-05-30 Thread Heiner Kallweit
On 30.05.2020 23:43, Vladimir Oltean wrote: > From: Vladimir Oltean > > In kernel 4.19 (and probably earlier too) there are issues surrounding > the PHY_AN state. > > For example, if a PHY is in PHY_AN state and AN has not finished, then > what is supposed to happen is that the state machine get

Re: [PATCH 01/12] xen/manage: keep track of the on-going suspend mode

2020-05-30 Thread Boris Ostrovsky
On 5/19/20 7:24 PM, Anchal Agarwal wrote: > > +enum suspend_modes { > + NO_SUSPEND = 0, > + XEN_SUSPEND, > + PM_SUSPEND, > + PM_HIBERNATION, > +}; > + > +/* Protected by pm_mutex */ > +static enum suspend_modes suspend_mode = NO_SUSPEND; > + > +bool xen_suspend_mode_is_xen_suspend

[PATCH net-next 4/6] r8169: move some calls to rtl8169_hw_reset

2020-05-30 Thread Heiner Kallweit
Move calls that are needed before and after calling rtl8169_hw_reset() into this function. This requires to move the function in the code. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 75 +++ 1 file changed, 36 insertions(+), 39 deletions(-)

[PATCH net-next 3/6] r8169: don't reset tx ring indexes in rtl8169_tx_clear

2020-05-30 Thread Heiner Kallweit
In places where the indexes have to be reset, we call rtl8169_init_ring_indexes() anyway after rtl8169_tx_clear(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/

[PATCH net-next 5/6] r8169: make rtl8169_down central chip quiesce function

2020-05-30 Thread Heiner Kallweit
Functionality for quiescing the chip is spread across different functions currently. Move it to rtl8169_down(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 33 --- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/drivers/net/e

[PATCH net-next 6/6] r8169: improve handling power management ops

2020-05-30 Thread Heiner Kallweit
Simplify handling the power management callbacks. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 28 --- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8

[PATCH net-next 1/6] r8169: change driver data type

2020-05-30 Thread Heiner Kallweit
Change driver private data type to struct rtl8169_private * to avoid some overhead. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 60 ++- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c

[PATCH net-next 2/6] r8169: enable WAKE_PHY as only WoL source when runtime-suspending

2020-05-30 Thread Heiner Kallweit
We go to runtime-suspend few secs after cable removal. As cable is removed "physical link up" is the only meaningful WoL source. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/r

[PATCH net-next 0/6] r8169: again few improvements

2020-05-30 Thread Heiner Kallweit
Again a series with few r8169 improvements. Heiner Kallweit (6): r8169: change driver data type r8169: enable WAKE_PHY as only WoL source when runtime-suspending r8169: don't reset tx ring indexes in rtl8169_tx_clear r8169: move some calls to rtl8169_hw_reset r8169: make rtl8169_down cen

[PATCH stable-4.19.y] net: phy: reschedule state machine if AN has not completed in PHY_AN state

2020-05-30 Thread Vladimir Oltean
From: Vladimir Oltean In kernel 4.19 (and probably earlier too) there are issues surrounding the PHY_AN state. For example, if a PHY is in PHY_AN state and AN has not finished, then what is supposed to happen is that the state machine gets rescheduled until it is, or until the link_timeout reach

Re: [PATCH v2 net-next 06/13] net: dsa: felix: create a template for the DSA tags on xmit

2020-05-30 Thread Vladimir Oltean
Hi Florian, On Sun, 31 May 2020 at 00:31, Florian Fainelli wrote: > > > > On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > With this patch we try to kill 2 birds with 1 stone. > > > > First of all, some switches that use tag_ocelot.c don't have the exact > > same bi

Re: [PATCH v2 net-next 05/13] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields

2020-05-30 Thread Florian Fainelli
On 5/30/2020 2:25 PM, Vladimir Oltean wrote: > Hi Florian, > > On Sun, 31 May 2020 at 00:18, Florian Fainelli wrote: >> >> >> >> On 5/30/2020 4:51 AM, Vladimir Oltean wrote: >>> From: Vladimir Oltean >>> >>> Currently Felix and Ocelot share the same bit layout in these per-port >>> registers,

Re: [PATCH v2 net-next 12/13] net: dsa: felix: move probing to felix_vsc9959.c

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Felix is not actually meant to be a DSA driver only for the switch > inside NXP LS1028A, but an umbrella for all Vitesse / Microsemi / > Microchip switches that are register-compatible with Ocelot and that are > using in

Re: [PATCH v2 net-next 06/13] net: dsa: felix: create a template for the DSA tags on xmit

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > With this patch we try to kill 2 birds with 1 stone. > > First of all, some switches that use tag_ocelot.c don't have the exact > same bitfield layout for the DSA tags. The destination ports field is > different for Sevi

Re: [PATCH v2 net-next 05/13] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields

2020-05-30 Thread Vladimir Oltean
Hi Florian, On Sun, 31 May 2020 at 00:18, Florian Fainelli wrote: > > > > On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > Currently Felix and Ocelot share the same bit layout in these per-port > > registers, but Seville does not. So we need reg_fields for that. > >

Re: [PATCH v2 net-next 05/13] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Currently Felix and Ocelot share the same bit layout in these per-port > registers, but Seville does not. So we need reg_fields for that. > > Actually since these are per-port registers, we need to also specify the > num

[PATCH v2 net-next 1/3] net: Make locking in sock_bindtoindex optional

2020-05-30 Thread Ferenc Fejes
The sock_bindtoindex intended for kernel wide usage however it will lock the socket regardless of the context. This modification relax this behavior optionally: locking the socket will be optional by calling the sock_bindtoindex with lock_sk = true. The modification applied to all users of the soc

[PATCH v2 net-next 3/3] selftests/bpf: Add test for SO_BINDTODEVICE opt of bpf_setsockopt

2020-05-30 Thread Ferenc Fejes
This test intended to verify if SO_BINDTODEVICE option works in bpf_setsockopt. Because we already in the SOL_SOCKET level in this connect bpf prog its safe to verify the sanity in the beginning of the connect_v4_prog by calling the bind_to_device test helper. The testing environment already creat

[PATCH v2 net-next 2/3] bpf: Allow SO_BINDTODEVICE opt in bpf_setsockopt

2020-05-30 Thread Ferenc Fejes
Extending the supported sockopts in bpf_setsockopt with SO_BINDTODEVICE. We call sock_bindtoindex with parameter lock_sk = false in this context because we already owning the socket. Signed-off-by: Ferenc Fejes --- net/core/filter.c | 27 ++- 1 file changed, 26 insertions

[PATCH v2 net-next 0/3] Extending bpf_setsockopt with SO_BINDTODEVICE sockopt

2020-05-30 Thread Ferenc Fejes
This option makes it possible to programatically bind sockets to netdevices. With the help of this option sockets of VRF unaware applications could be distributed between multiple VRFs with an eBPF program. This lets the applications benefit from multiple possible routes. v2: - splitting up the

[PATCH net-next v4 4/7] dpaa2-eth: Add congestion group taildrop

2020-05-30 Thread Ioana Ciornei
From: Ioana Radulescu The increase in number of ingress frame queues means we now risk depleting the buffer pool before the FQ taildrop kicks in. Congestion group taildrop allows us to control the number of frames that can accumulate on a group of Rx frame queues belonging to the same traffic cl

[PATCH net-next v4 5/7] dpaa2-eth: Update FQ taildrop threshold and buffer pool count

2020-05-30 Thread Ioana Ciornei
From: Ioana Radulescu Now that we have congestion group taildrop configured at all times, we can afford to increase the frame queue taildrop threshold; this will ensure a better response when receiving bursts of large-sized frames. Also decouple the buffer pool count from the Rx FQ taildrop thre

[PATCH net-next v4 1/7] dpaa2-eth: Add support for Rx traffic classes

2020-05-30 Thread Ioana Ciornei
From: Ioana Radulescu The firmware reserves for each DPNI a number of RX frame queues equal to the number of configured flows x number of configured traffic classes. Current driver configuration directs all incoming traffic to FQs corresponding to TC0, leaving all other priority levels unused.

[PATCH net-next v4 6/7] dpaa2-eth: Add PFC support through DCB ops

2020-05-30 Thread Ioana Ciornei
Add support in dpaa2-eth for PFC (Priority Flow Control) through the DCB ops. Instruct the hardware to respond to received PFC frames. Current firmware doesn't allow us to selectively enable PFC on the Rx side for some priorities only, so we will react to all incoming PFC frames (and stop transmit

[PATCH net-next v4 3/7] dpaa2-eth: Add helper functions

2020-05-30 Thread Ioana Ciornei
From: Ioana Radulescu Add convenient helper functions that determines whether Rx/Tx pause frames are enabled based on link state flags received from firmware. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei --- Changes in v4: - none drivers/net/ethernet/freescale/dpaa2/dpaa2-eth

[PATCH net-next v4 2/7] dpaa2-eth: Distribute ingress frames based on VLAN prio

2020-05-30 Thread Ioana Ciornei
From: Ioana Radulescu Configure static ingress classification based on VLAN PCP field. If the DPNI doesn't have enough traffic classes to accommodate all priority levels, the lowest ones end up on TC 0 (default on miss). Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei --- Changes i

[PATCH net-next v4 7/7] dpaa2-eth: Keep congestion group taildrop enabled when PFC on

2020-05-30 Thread Ioana Ciornei
Leave congestion group taildrop enabled for all traffic classes when PFC is enabled. Notification threshold is low enough such that it will be hit first and this also ensures that FQs on traffic classes which are not PFC enabled won't drain the buffer pool. FQ taildrop threshold is kept disabled a

[PATCH net-next v4 0/7] dpaa2-eth: add PFC support

2020-05-30 Thread Ioana Ciornei
This patch set adds support for Priority Flow Control in DPAA2 Ethernet devices. The first patch make the necessary changes so that multiple traffic classes are configured. The dequeue priority of the maximum 8 traffic classes is configured to be equal. The second patch adds a static distribution

Re: [PATCH v2 net-next 07/13] net: mscc: ocelot: split writes to pause frame enable bit and to thresholds

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > We don't want ocelot_port_set_maxlen to enable pause frame TX, just to > adjust the pause thresholds. > > Move the unconditional enabling of pause TX to ocelot_init_port. There > is no good place to put such setting beca

Re: [PATCH v2 net-next 10/13] net: mscc: ocelot: extend watermark encoding function

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Maxim Kochetkov > > The ocelot_wm_encode function deals with setting thresholds for pause > frame start and stop. In Ocelot and Felix the register layout is the > same, but for Seville, it isn't. The easiest way to accommodate Seville > hard

Re: [PATCH v2 net-next 08/13] net: mscc: ocelot: disable flow control on NPI interface

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > The Ocelot switches do not support flow control on Ethernet interfaces > where a DSA tag must be added. If pause frames are enabled, they will be > encapsulated in the DSA tag just like regular frames, and the DSA master

Re: [PATCH v2 net-next 09/13] net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Maxim Kochetkov > > Seville has a different bitwise layout than Ocelot and Felix. > > Signed-off-by: Maxim Kochetkov > Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v2 net-next 13/13] net: dsa: felix: introduce support for Seville VSC9953 switch

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Maxim Kochetkov > > This is another switch from Vitesse / Microsemi / Microchip, that has > 10 port (8 external, 2 internal) and is integrated into the Freescale / > NXP T1040 PowerPC SoC. It is very similar to Felix from NXP LS1028A, > exce

Re: [PATCH v2 net-next 11/13] net: dsa: felix: support half-duplex link modes

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Ping tested: > > [ 11.808455] mscc_felix :00:00.5 swp0: Link is Up - 1Gbps/Full - flow > control rx/tx > [ 11.816497] IPv6: ADDRCONF(NETDEV_CHANGE): swp0: link becomes ready > > [root@LS1028ARDB ~] # etht

Re: [PATCH v2 net-next 04/13] soc/mscc: ocelot: add MII registers description

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Maxim Kochetkov > > Add the register definitions for the MSCC MIIM MDIO controller in > preparation for seville_vsc9959.c to create its accessors for the > internal MDIO bus. > > Since we've introduced elements to ocelot_regfields that are

Re: [PATCH v2 net-next 03/13] net: mscc: ocelot: convert port registers to regmap

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > At the moment, there are some minimal register differences between > VSC7514 Ocelot and VSC9959 Felix. To be precise, the PCS1G registers are > missing from Felix because it was integrated with an NXP PCS. > > But with V

Re: [PATCH v2 net-next 02/13] net: dsa: felix: set proper link speed in felix_phylink_mac_config

2020-05-30 Thread Florian Fainelli
On 5/30/2020 4:51 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > state->speed holds a value of 10, 100, 1000 or 2500, but > SYS_MAC_FC_CFG_FC_LINK_SPEE and DEV_CLOCK_CFG_LINK_SPEED expect a value > in the range 0, 1, 2 or 3. > > Even truncated to 2 bits, we are still writing incorrect

Re: [PATCH net-next] net: phy: broadcom: don't export RDB/legacy access methods

2020-05-30 Thread Florian Fainelli
On 5/30/2020 1:34 PM, Michael Walle wrote: > Don't export __bcm_phy_enable_rdb_access() and > __bcm_phy_enable_legacy_access() functions. They aren't used outside this > module and it was forgotten to provide a prototype for these functions. > Just make them static for now. > > Fixes: 11ecf8c55

[PATCH net-next] net: phy: broadcom: don't export RDB/legacy access methods

2020-05-30 Thread Michael Walle
Don't export __bcm_phy_enable_rdb_access() and __bcm_phy_enable_legacy_access() functions. They aren't used outside this module and it was forgotten to provide a prototype for these functions. Just make them static for now. Fixes: 11ecf8c55b91 ("net: phy: broadcom: add cable test support") Reporte

Re: [PATCH] devres: keep both device name and resource name in pretty name

2020-05-30 Thread Vladimir Oltean
On Sat, 30 May 2020 at 23:06, Vladimir Oltean wrote: > > From: Vladimir Oltean > > Some device drivers have many memory regions, and sometimes debugging is > easiest using devmem on its register map. Take for example a networking > switch. Its memory map used to look like this in /proc/iomem: > >

[PATCH] devres: keep both device name and resource name in pretty name

2020-05-30 Thread Vladimir Oltean
From: Vladimir Oltean Some device drivers have many memory regions, and sometimes debugging is easiest using devmem on its register map. Take for example a networking switch. Its memory map used to look like this in /proc/iomem: 1fc00-1fc3f : pcie@1f000 1fc00-1fc3f : :0

Re: [PATCH net] tun: correct header offsets in napi frags mode

2020-05-30 Thread Willem de Bruijn
On Fri, May 29, 2020 at 11:14 PM Willem de Bruijn wrote: > > On Fri, May 29, 2020 at 8:27 PM David Miller wrote: > > > > From: Willem de Bruijn > > Date: Thu, 28 May 2020 13:05:32 -0400 > > > > > Temporarily pull ETH_HLEN to make control flow the same for frags and > > > not frags. Then push the

[PATCH net v2] tun: correct header offsets in napi frags mode

2020-05-30 Thread Willem de Bruijn
From: Willem de Bruijn Tun in IFF_NAPI_FRAGS mode calls napi_gro_frags. Unlike netif_rx and netif_gro_receive, this expects skb->data to point to the mac layer. But skb_probe_transport_header, __skb_get_hash_symmetric, and xdp_do_generic in tun_get_user need skb->data to point to the network hea

Re: [PATCH] nexthop: Fix Deletion display

2020-05-30 Thread Roopa Prabhu
On Sat, May 30, 2020 at 5:16 AM Donald Sharp wrote: > > Actually display that deletions are happening > when monitoring nexthops. > > Signed-off-by: Donald Sharp > --- Acked-by: Roopa Prabhu This can go to iproute2 net Thanks Donald. > ip/ipnexthop.c | 2 +- > 1 file changed, 1 insertion(

Re: [PATCH net-next 0/2] vxlan fdb nexthop misc fixes

2020-05-30 Thread Roopa Prabhu
On Sat, May 30, 2020 at 6:34 AM Ido Schimmel wrote: > > On Thu, May 28, 2020 at 10:12:34PM -0700, Roopa Prabhu wrote: > > From: Roopa Prabhu > > Hi Roopa, > > I noticed that sparse complains about the following problem in > the original submission (not handled by current set): > > drivers/net/vxl

[PATCH net-next] cls_flower: remove mpls_opts_policy

2020-05-30 Thread Guillaume Nault
Compiling with W=1 gives the following warning: net/sched/cls_flower.c:731:1: warning: ‘mpls_opts_policy’ defined but not used [-Wunused-const-variable=] The TCA_FLOWER_KEY_MPLS_OPTS contains a list of TCA_FLOWER_KEY_MPLS_OPTS_LSE. Therefore, the attributes all have the same type and we can't par

Re: [PATCH net-next 1/2] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c

2020-05-30 Thread Florian Fainelli
On 5/30/2020 3:29 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Newer compilers complain with W=1 builds that there are non-static > functions defined in sja1105_static_config.c that don't have a > prototype, because their prototype is defined in sja1105.h which this > translation uni

Re: [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c

2020-05-30 Thread Florian Fainelli
On 5/30/2020 7:03 AM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Newer C compilers are complaining about the fact that there are no > function prototypes in sja1105_vl.c for the non-static functions. > Give them what they want. > > Signed-off-by: Vladimir Oltean Reviewed-by: Florian

Re: [PATCH] flow_dissector: work around stack frame size warning

2020-05-30 Thread Guillaume Nault
On Fri, May 29, 2020 at 10:13:58PM +0200, Arnd Bergmann wrote: > The fl_flow_key structure is around 500 bytes, so having two of them > on the stack in one function now exceeds the warning limit after an > otherwise correct change: > > net/sched/cls_flower.c:298:12: error: stack frame size of 1056

RE: [PATCH net-next v3 2/7] dpaa2-eth: Distribute ingress frames based on VLAN prio

2020-05-30 Thread Ioana Ciornei
> Subject: RE: [PATCH net-next v3 2/7] dpaa2-eth: Distribute ingress frames > based > on VLAN prio > > > Subject: Re: [PATCH net-next v3 2/7] dpaa2-eth: Distribute ingress > > frames based on VLAN prio > > > > On Fri, 29 May 2020 21:41:38 + Ioana Ciornei wrote: > > > > Subject: Re: [PATCH n

[PATCH v2] net: dccp: Add SIOCOUTQ IOCTL support (send buffer fill)

2020-05-30 Thread Richard Sailer
From: Richard Sailer This adds support for the SIOCOUTQ IOCTL to call send buffer fill from the DCCP socket, like UDP and TCP already have. Regarding the used data field. DCCP uses per packet sequence numbers, not per byte, so sequence numbers can't be used like in TCP. sk_wmem_queued is not use

[PATCH net-next v2 3/3] bridge: mrp: Add support for role MRA

2020-05-30 Thread Horatiu Vultur
A node that has the MRA role, it can behave as MRM or MRC. Initially it starts as MRM and sends MRP_Test frames on both ring ports. If it detects that there are MRP_Test send by another MRM, then it checks if these frames have a lower priority than itself. In this case it would send MRP_Nack frame

[PATCH net-next v2 0/3] bridge: mrp: Add support for MRA role

2020-05-30 Thread Horatiu Vultur
This patch series extends the MRP with the MRA role. A node that has the MRA role can behave as a MRM or as a MRC. In case there are multiple nodes in the topology that has the MRA role then only one node can behave as MRM and all the others need to be have as MRC. The node that has the higher prio

[PATCH net-next v2 1/3] bridge: mrp: Update MRP frame type

2020-05-30 Thread Horatiu Vultur
Replace u16/u32 with be16/be32 in the MRP frame types. This fixes sparse warnings like: warning: cast to restricted __be16 Signed-off-by: Horatiu Vultur --- include/uapi/linux/mrp_bridge.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/uapi/l

[PATCH net-next v2 2/3] bridge: mrp: Set the priority of MRP instance

2020-05-30 Thread Horatiu Vultur
Each MRP instance has a priority, a lower value means a higher priority. The priority of MRP instance is stored in MRP_Test frame in this way all the MRP nodes in the ring can see other nodes priority. Signed-off-by: Horatiu Vultur --- include/net/switchdev.h| 1 + include/uapi/linux/if_

[PATCH] net: dccp: Add SIOCOUTQ IOCTL support (send buffer fill)

2020-05-30 Thread Richard Sailer
From: Richard Sailer This adds support for the SIOCOUTQ IOCTL to call send buffer fill from the DCCP socket, like UDP and TCP already have. Regarding the used data field. DCCP uses per packet sequence numbers, not per byte, so sequence numbers can't be used like in TCP. sk_wmem_queued is not use

  1   2   >