[PATCH net-next 0/3] mlxsw: Support dcbnl_setbuffer, dcbnl_getbuffer

2020-09-16 Thread Ido Schimmel
From: Ido Schimmel Petr says: On Spectrum, port buffers, also called port headroom, is where packets are stored while they are parsed and the forwarding decision is being made. For lossless traffic flows, in case shared buffer admission is not allowed, headroom is also where to put the extra tra

[PATCH net-next 3/3] mlxsw: spectrum_qdisc: Disable port buffer autoresize with qdiscs

2020-09-16 Thread Ido Schimmel
From: Petr Machata There are two interfaces to configure ETS: qdiscs and DCB. Historically, DCB ETS configuration was projected to ingress as well, and configured port buffers. Qdisc was not. Keep qdiscs behaving this way, and if an offloaded qdisc is configured on a port, move this port's headr

[PATCH net-next 1/3] mlxsw: spectrum_buffers: Support two headroom modes

2020-09-16 Thread Ido Schimmel
From: Petr Machata There are two interfaces to configure ETS: qdiscs and DCB. Historically, DCB ETS configuration was projected to ingress as well, and configured port buffers. Qdisc was not. So as not to break clients that today use DCB ETS and PFC and rely on getting a reasonable ingress buffe

[PATCH net-next 2/3] mlxsw: spectrum_dcb: Implement dcbnl_setbuffer / getbuffer

2020-09-16 Thread Ido Schimmel
From: Petr Machata Add dcbnl_setbuffer, which bounces requests if a headroom is in DCB mode. Implement dcbnl_getbuffer such that it can always be used to determine port-buffer configuration, regardless of headroom mode. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Sch

[PATCH -next] can: ti_hecc: use devm_platform_ioremap_resource_byname

2020-09-16 Thread Wang Xiaojun
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Wang Xiaojun --- drivers/net/can/ti_hecc.c | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) diff --gi

Re: [PATCH] net: make netdev_wait_allrefs wake-able

2020-09-16 Thread Francesco Ruggeri
> static inline void dev_put(struct net_device *dev) > { > + struct task_struct *destroy_task = dev->destroy_task; > + > this_cpu_dec(*dev->pcpu_refcnt); > + if (destroy_task) > + wake_up_process(destroy_task); > } I just realized that this introduces a race, i

Re: [PATCH net] ibmvnic: Fix returning uninitialized return code

2020-09-16 Thread Saeed Mahameed
On Wed, 2020-09-16 at 17:12 -0500, Thomas Falcon wrote: > If successful, __ibmvnic_open and reset_sub_crq_queues, > if no device queues exist, will return an uninitialized > variable rc. Return zero on success instead. > > Fixes: 57a49436f4e8 ("ibmvnic: Reset sub-crqs during driver reset") > Fixes

Re: [EXT] Re: [net-next PATCH 0/2] Introduce mbox tracepoints for Octeontx2

2020-09-16 Thread Jiri Pirko
Wed, Sep 16, 2020 at 07:19:36PM CEST, sundeep.l...@gmail.com wrote: >On Wed, Sep 16, 2020 at 4:04 PM Jiri Pirko wrote: >> >> Mon, Sep 07, 2020 at 12:59:45PM CEST, sundeep.l...@gmail.com wrote: >> >Hi Jakub, >> > >> >On Sat, Sep 5, 2020 at 2:07 AM Jakub Kicinski wrote: >> >> >> >> On Fri, 4 Sep 20

[PATCH] [PATCH] net/sched : cbs : fix calculation error of idleslope credits

2020-09-16 Thread Xiaoyong Yan
in the function cbs_dequeue_soft, when q->credits <0, [now - q->last] should be accounted for sendslope,not idleslope. so the solution as follows: when q->credits is less than 0, directly calculate delay time, activate hrtimer and when hrtimer fires, calculate idleslope credits and update it to q-

Re: [pull request][net-next 00/16] mlx5 updates 2020-09-15

2020-09-16 Thread Saeed Mahameed
On Wed, 2020-09-16 at 09:56 -0700, Jakub Kicinski wrote: > On Tue, 15 Sep 2020 13:25:17 -0700 sa...@kernel.org wrote: > > From: Saeed Mahameed > > > > Hi Dave & Jakub, > > > > This series adds some misc updates to mlx5 driver. > > > > For more information please see tag log below. > > > > Plea

Re: linux-next: Signed-off-by missing for commit in the net-next tree

2020-09-16 Thread Saeed Mahameed
On Thu, 2020-09-17 at 08:31 +1000, Stephen Rothwell wrote: > Hi all, > > Commits > > 0d2ffdc8d400 ("net/mlx5: Don't call timecounter cyc2time directly > from 1PPS flow") > 87f3495cbe8d ("net/mlx5: Release clock lock before scheduling a PPS > work") > aac2df7f022e ("net/mlx5: Rename ptp cloc

Re: [patch] freeaddrinfo.3: memory leaks in freeaddrinfo examples

2020-09-16 Thread Michael Kerrisk (man-pages)
Hi Marko, On Thu, 17 Sep 2020 at 07:34, Marko Hrastovec wrote: > > Hi, > > examples in freeaddrinfo.3 have a memory leak, which is replicated in many > real world programs copying an example from manual pages. The two examples > should have different order of lines, which is done in the followi

[PATCH net-next] net: stmmac: introduce rtnl_lock|unlock() on configuring real_num_rx|tx_queues

2020-09-16 Thread Wong Vee Khee
From: "Tan, Tee Min" For driver open(), rtnl_lock is acquired by network stack but not in the resume(). Therefore, we introduce lock_acquired boolean to control when to use rtnl_lock|unlock() within stmmac_hw_setup(). Fixes: 686cff3d7022 ("net: stmmac: Fix incorrect location to set real_num_rx|

Re: [PATCH] hinic: fix potential resource leak

2020-09-16 Thread luobin (L)
On 2020/9/17 11:03, Wei Li wrote: > + err = irq_set_affinity_hint(rq->irq, &rq->affinity_mask); > + if (err) > + goto err_irq; > + > + return 0; > + > +err_irq: > + rx_del_napi(rxq); > + return err; If irq_set_affinity_hint fails, irq should be freed as well.

Re: [PATCH] hinic: fix potential resource leak

2020-09-16 Thread liwei (GF)
Hi luobin, On 2020/9/17 11:44, luobin (L) wrote: > On 2020/9/17 11:03, Wei Li wrote: >> +err = irq_set_affinity_hint(rq->irq, &rq->affinity_mask); >> +if (err) >> +goto err_irq; >> + >> +return 0; >> + >> +err_irq: >> +rx_del_napi(rxq); >> +return err; > If irq_set_

[PATCH net-next] netlink: add spaces around '&' in netlink_recv/sendmsg()

2020-09-16 Thread Yang Yingliang
It's hard to read the code without spaces around '&', for better reading, add spaces around '&'. Signed-off-by: Yang Yingliang --- net/netlink/af_netlink.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index d2d144

[PATCH net 0/2] net: phy: Unbind fixes

2020-09-16 Thread Florian Fainelli
This patch series fixes a couple of issues with the unbinding of the PHY drivers and then bringing down a network interface. The first is a NULL pointer de-reference and the second was an incorrect warning being triggered. Florian Fainelli (2): net: phy: Avoid NPD upon phy_detach() when driver i

[PATCH net 2/2] net: phy: Do not warn in phy_stop() on PHY_DOWN

2020-09-16 Thread Florian Fainelli
When phy_is_started() was added to catch incorrect PHY states, phy_stop() would not be qualified against PHY_DOWN. It is possible to reach that state when the PHY driver has been unbound and the network device is then brought down. Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking") Signe

[PATCH net 1/2] net: phy: Avoid NPD upon phy_detach() when driver is unbound

2020-09-16 Thread Florian Fainelli
If we have unbound the PHY driver prior to calling phy_detach() (often via phy_disconnect()) then we can cause a NULL pointer de-reference accessing the driver owner member. The steps to reproduce are: echo unimac-mdio-0:01 > /sys/class/net/eth0/phydev/driver/unbind ip link set eth0 down Fixes: c

[PATCH] hinic: fix potential resource leak

2020-09-16 Thread Wei Li
In rx_request_irq(), it will just return what irq_set_affinity_hint() returns. If it is failed, the napi added is not deleted properly. Add a common exit for failures to do this. Signed-off-by: Wei Li --- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 19 --- 1 file changed, 12 i

[PATCH v4 net-next 3/5] netdevsim: devlink flash timeout message

2020-09-16 Thread Shannon Nelson
Add a simple devlink flash timeout message to exercise the message mechanism. Signed-off-by: Shannon Nelson --- drivers/net/netdevsim/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index 32f339fedb21..4123550e3f6e 100644 ---

[PATCH v4 net-next 2/5] devlink: collect flash notify params into a struct

2020-09-16 Thread Shannon Nelson
The dev flash status notify function parameter lists are getting rather long, so add a struct to be filled and passed rather than continuously changing the function signatures. Signed-off-by: Shannon Nelson --- include/net/devlink.h | 21 net/core/devlink.c| 80 +

[PATCH v4 net-next 4/5] ionic: update the fw update api

2020-09-16 Thread Shannon Nelson
Add the rest of the firmware api bits needed to support the driver running a firmware update. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_if.h| 33 ++- .../net/ethernet/pensando/ionic/ionic_main.c | 4 +++ 2 files changed, 29 insertions(+), 8 del

[PATCH v4 net-next 5/5] ionic: add devlink firmware update

2020-09-16 Thread Shannon Nelson
Add support for firmware update through the devlink interface. This update copies the firmware object into the device, asks the current firmware to install it, then asks the firmware to select the new firmware for the next boot-up. The install and select steps are launched as asynchronous requests

[PATCH v4 net-next 0/5] ionic: add devlink dev flash support

2020-09-16 Thread Shannon Nelson
Add support for using devlink's dev flash facility to update the firmware on an ionic device, and add a new timeout parameter to the devlink flash netlink message. For long-running flash commands, we add a timeout element to the dev flash notify message in order for a userland utility to display a

[PATCH v4 net-next 1/5] devlink: add timeout information to status_notify

2020-09-16 Thread Shannon Nelson
Add a timeout element to the DEVLINK_CMD_FLASH_UPDATE_STATUS netlink message for use by a userland utility to show that a particular firmware flash activity may take a long but bounded time to finish. Also add a handy helper for drivers to make use of the new timeout value. UI usage hints: - if

Re: [PATCH 1/1] net/rds: suppress page allocation failure error in recv buffer refill

2020-09-16 Thread Manjunath Patil
Hi Santosh, inline. On 9/16/2020 12:27 PM, santosh.shilim...@oracle.com wrote: On 9/16/20 12:08 PM, Manjunath Patil wrote: RDS/IB tries to refill the recv buffer in softirq context using GFP_NOWAIT flag. However alloc failure is handled by queueing a work to refill the recv buffer with GFP_KERN

linux-next: manual merge of the net-next tree with the net tree

2020-09-16 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/ipv4/route.c between commit: 2fbc6e89b2f1 ("ipv4: Update exception handling for multipath routes via same device") from the net tree and commit: 8b4510d76cde ("net: gain ipv4 mtu when mtu is not locked") from

RE: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread Hongbo Wang
> On Wed, Sep 16, 2020 at 10:28:38AM +, Hongbo Wang wrote: > > Hi Vladimir, > > > > if swp0 connects with customer, and swp1 connects with ISP, According > > to the VSC99599_1_00_TS.pdf, swp0 and swp1 will have different > > VLAN_POP_CNT && VLAN_AWARE_ENA, > > > > swp0 should set VLAN_CFG.VLAN_

Re: [PATCH 1/1] net/rds: suppress page allocation failure error in recv buffer refill

2020-09-16 Thread santosh . shilimkar
On 9/16/20 2:15 PM, Manjunath Patil wrote: Hi Santosh, inline. On 9/16/2020 12:27 PM, santosh.shilim...@oracle.com wrote: On 9/16/20 12:08 PM, Manjunath Patil wrote: RDS/IB tries to refill the recv buffer in softirq context using GFP_NOWAIT flag. However alloc failure is handled by queueing a

[PATCH] ptp: mark symbols static where possible

2020-09-16 Thread Herrington
We get 1 warning when building kernel with W=1: drivers/ptp/ptp_pch.c:182:5: warning: no previous prototype for ‘pch_ch_control_read’ [-Wmissing-prototypes] u32 pch_ch_control_read(struct pci_dev *pdev) drivers/ptp/ptp_pch.c:193:6: warning: no previous prototype for ‘pch_ch_control_write’ [-Wmis

[PATCH v2 net-next] netdev: Remove unused functions

2020-09-16 Thread YueHaibing
There is no callers in tree, so can remove it. Signed-off-by: YueHaibing Reviewed-by: Saeed Mahameed --- v2: fix title typo 'funtions' --> 'functions' --- include/linux/netdevice.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice

Re: [PATCH net] ethtool: add and use message type for tunnel info reply

2020-09-16 Thread Andrew Lunn
On Thu, Sep 17, 2020 at 01:04:10AM +0200, Michal Kubecek wrote: > Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd > field in genetlink header) for replies to tunnel info netlink request, i.e. > the same value as the request have. This is a problem because we are using >

[PATCH net-next v2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-16 Thread Florian Fainelli
The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Because the PHY driver can be probed with the clocks turned off we need to apply the dummy

[PATCH] net: make netdev_wait_allrefs wake-able

2020-09-16 Thread Francesco Ruggeri
The combination of aca_free_rcu, introduced in commit 2384d02520ff ("net/ipv6: Add anycast addresses to a global hashtable"), and fib6_info_destroy_rcu, introduced in commit 9b0a8da8c4c6 ("net/ipv6: respect rcu grace period before freeing fib6_info"), can result in an extra rcu grace period being n

Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-16 Thread Alexei Starovoitov
On Wed, Sep 16, 2020 at 01:24:16PM +0200, Jiri Olsa wrote: > Some kernels builds might inline vfs_getattr call within fstat > syscall code path, so fentry/vfs_getattr trampoline is not called. > > Alexei suggested [1] we should use security_inode_getattr instead, > because it's less likely to get

Re: [PATCH -next] net/sched: Remove unused function qdisc_queue_drop_head()

2020-09-16 Thread Yuehaibing
Pls drop this duplicate. On 2020/9/16 22:16, YueHaibing wrote: > It is not used since commit a09ceb0e0814 ("sched: remove qdisc->drop") > > Signed-off-by: YueHaibing > --- > include/net/sch_generic.h | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/include/net/sch_generic.h b/incl

[PATCH] net: phy: realtek: fix rtl8211e rx/tx delay config

2020-09-16 Thread Willy Liu
RGMII RX Delay and TX Delay settings will not applied if Force TX RX Delay Control bit is not set. Register bit for configuration pins: 13 = force Tx RX Delay controlled by bit12 bit11 12 = Tx Delay 11 = Rx Delay Fixes: f81dadbcf7fd ("net: phy: realtek: Add rtl8211e rx/tx delays config") Signed-of

[PATCH] net: phy: realtek: Replace 2.5Gbps name from RTL8125 to RTL8226

2020-09-16 Thread Willy Liu
According to PHY ID, 0x001cc800 should be named "RTL8226 2.5Gbps PHY" and 0x001cc840 should be named "RTL8226B_RTL8221B 2.5Gbps PHY". RTL8125 is not a single PHY solution, it integrates PHY/MAC/PCIE bus controller and embedded memory. Signed-off-by: Willy Liu --- drivers/net/phy/realtek.c | 38 +

[PATCH v3] mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo

2020-09-16 Thread Ye Bin
Fixes coccicheck warnig: net/mptcp/protocol.c:164:11-18: WARNING: Unsigned expression compared with zero: max_seq > 0 Fixes: ab174ad8ef76 ("mptcp: move ooo skbs into msk out of order queue") Reported-by: Hulk Robot Signed-off-by: Ye Bin --- net/mptcp/protocol.c | 5 +++-- 1 file changed, 3 ins

Re: [PATCH bpf-next v3 4/6] bpf: Introduce bpf_per_cpu_ptr()

2020-09-16 Thread kernel test robot
: powerpc-randconfig-s032-20200916 (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse

Re: [PATCH] can: m_can: Set pinmux into "default" state on start

2020-09-16 Thread Marek Vasut
On 9/1/20 8:56 PM, Marek Vasut wrote: > On 8/9/20 1:01 PM, Marek Vasut wrote: >> On 5/31/20 8:13 PM, Marek Vasut wrote: >>> On systems like stm32mp1 where pins have both "default" and "sleep" pinmux >>> states in DT, the pins are in "sleep" state by default. Switch the pins into >>> the "default" s

Re: [PATCH v2] ath10k: sdio: remove redundant check in for loop

2020-09-16 Thread Julian Calaby
Hi Alex, On Thu, Sep 17, 2020 at 3:09 AM Alex Dewar wrote: > > The for loop checks whether cur_section is NULL on every iteration, but > we know it can never be NULL as there is another check towards the > bottom of the loop body. Refactor to avoid this unnecessary check. > > Also, increment the

Re: [PATCH net-next 0/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition

2020-09-16 Thread Jakub Kicinski
On Wed, 16 Sep 2020 16:15:05 -0700 Paul E. McKenney wrote: > On Wed, Sep 16, 2020 at 11:45:21AM -0700, Jakub Kicinski wrote: > > Hi! > > > > So I unfolded the RFC patch into smaller chunks and fixed an issue > > in SRCU pointed out by build bot. Build bot has been quiet for > > a day but I'm not 1

Re: [PATCH net] net: dsa: microchip: ksz8795: really set the correct number of ports

2020-09-16 Thread David Miller
From: Matthias Schiffer Date: Wed, 16 Sep 2020 12:08:39 +0200 > The KSZ9477 and KSZ8795 use the port_cnt field differently: For the > KSZ9477, it includes the CPU port(s), while for the KSZ8795, it doesn't. > > It would be a good cleanup to make the handling of both drivers match, > but as a fir

Re: [PATCH net] ethtool: add and use message type for tunnel info reply

2020-09-16 Thread Jakub Kicinski
On Thu, 17 Sep 2020 01:04:10 +0200 (CEST) Michal Kubecek wrote: > Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd > field in genetlink header) for replies to tunnel info netlink request, i.e. > the same value as the request have. This is a problem because we are using >

Re: [PATCH net v2] geneve: add transport ports in route lookup for geneve

2020-09-16 Thread David Miller
From: Mark Gray Date: Wed, 16 Sep 2020 05:19:35 -0400 > This patch adds transport ports information for route lookup so that > IPsec can select Geneve tunnel traffic to do encryption. This is > needed for OVS/OVN IPsec with encrypted Geneve tunnels. > > This can be tested by configuring a host-h

Re: [PATCH -next] cxgb4vf: convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-16 Thread David Miller
From: Liu Shixin Date: Wed, 16 Sep 2020 10:50:18 +0800 > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Liu Shixin Looks good, applied to net-next, thanks.

Re: [PATCH] net: hns: kerneldoc fixes

2020-09-16 Thread David Miller
From: Lu Wei Date: Wed, 16 Sep 2020 10:04:28 +0800 > Fix some parameter description or spelling mistakes. > > Signed-off-by: Lu Wei Applied, thank you.

Re: [PATCH v3 net-next] ionic: dynamic interrupt moderation

2020-09-16 Thread David Miller
From: Shannon Nelson Date: Tue, 15 Sep 2020 16:59:03 -0700 > Use the dim library to manage dynamic interrupt > moderation in ionic. > > v3: rebase > v2: untangled declarations in ionic_dim_work() > > Signed-off-by: Shannon Nelson > Acked-by: Jakub Kicinski Applied, thank you.

Re: [PATCH net-next 1/1] net/smc: check variable before dereferencing in smc_close.c

2020-09-16 Thread David Miller
From: Karsten Graul Date: Tue, 15 Sep 2020 22:57:09 +0200 > smc->clcsock and smc->clcsock->sk are used before the check if they can > be dereferenced. Fix this by checking the variables first. > > Fixes: a60a2b1e0af1 ("net/smc: reduce active tcp_listen workers") > Reported-by: kernel test robot

Re: [PATCH 1/1] net/rds: suppress page allocation failure error in recv buffer refill

2020-09-16 Thread Manjunath Patil
On 9/16/2020 2:25 PM, santosh.shilim...@oracle.com wrote: On 9/16/20 2:15 PM, Manjunath Patil wrote: Hi Santosh, inline. On 9/16/2020 12:27 PM, santosh.shilim...@oracle.com wrote: On 9/16/20 12:08 PM, Manjunath Patil wrote: RDS/IB tries to refill the recv buffer in softirq context using GFP_N

Re: [PATCH net 5/7] net: mscc: ocelot: error checking when calling ocelot_init()

2020-09-16 Thread David Miller
From: Vladimir Oltean Date: Tue, 15 Sep 2020 21:22:27 +0300 > diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c > b/drivers/net/ethernet/mscc/ocelot_vsc7514.c > index 99872f1b7460..91a915d0693f 100644 > --- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c > +++ b/drivers/net/ethernet/mscc/ocel

Re: [PATCH net-next] net: bridge: mcast: don't ignore return value of __grp_src_toex_excl

2020-09-16 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 15 Sep 2020 17:57:24 +0300 > When we're handling TO_EXCLUDE report in EXCLUDE filter mode we should > not ignore the return value of __grp_src_toex_excl() as we'll miss > sending notifications about group changes. > > Fixes: 5bf1e00b6849 ("net: bridge: mcast:

Re: [PATCH net 4/7] net: mscc: ocelot: check for errors on memory allocation of ports

2020-09-16 Thread David Miller
From: Vladimir Oltean Date: Tue, 15 Sep 2020 21:22:26 +0300 > @@ -993,6 +993,8 @@ static int mscc_ocelot_probe(struct platform_device *pdev) > > ocelot->ports = devm_kcalloc(&pdev->dev, ocelot->num_phys_ports, >sizeof(struct ocelot_port *), GFP_KERNEL);

Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-16 Thread David Miller
From: Vladimir Oltean Date: Tue, 15 Sep 2020 21:22:24 +0300 > This is a problem because, at least theoretically, another timestampable > skb might use the same ocelot_port->ts_id before that is incremented. So > the logic of using and incrementing the timestamp id should be atomic > per port. Ha

Re: [PATCH v2] net: Phy: Add PHY lookup support on MDIO bus in case of ACPI probe

2020-09-16 Thread Vikas Singh
On Thu, Sep 10, 2020 at 6:42 PM Andrew Lunn wrote: > > On Thu, Sep 10, 2020 at 05:13:03PM +0530, Vikas Singh wrote: > > The function referred to (of_mdiobus_link_mdiodev()) is only built when > > CONFIG_OF_MDIO is enabled, which is again, a DT specific thing, and would > > not work in case of ACPI

Re: [PATCH net-next 0/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition

2020-09-16 Thread Paul E. McKenney
On Wed, Sep 16, 2020 at 11:45:21AM -0700, Jakub Kicinski wrote: > Hi! > > So I unfolded the RFC patch into smaller chunks and fixed an issue > in SRCU pointed out by build bot. Build bot has been quiet for > a day but I'm not 100% sure it's scanning my tree, so let's > give these patches some ML e

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Williams, Dan J
On Wed, 2020-09-16 at 10:22 +0200, Greg Kroah-Hartman wrote: > On Wed, Sep 16, 2020 at 11:02:39AM +0300, Oded Gabbay wrote: > > On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman > > wrote: > > > On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wrote: > > > > On Wed, Sep 16, 2020 at 9:25 AM

[PATCH net] ethtool: add and use message type for tunnel info reply

2020-09-16 Thread Michal Kubecek
Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd field in genetlink header) for replies to tunnel info netlink request, i.e. the same value as the request have. This is a problem because we are using two separate enums for userspace to kernel and kernel to userspace messa

Re: [PATCH net-next 0/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-16 Thread Florian Fainelli
On 9/16/2020 1:44 PM, Florian Fainelli wrote: Hi all, This patch series is intended to address the very specific case of the Broadcom STB internal Gigabit PHY devices that require both a dummy read because of a hardware issue with their MDIO interface. We also need to turn on their internal d

[PATCH v8 bpf-next 6/7] bpf: allow for tailcalls in BPF subprograms for x64 JIT

2020-09-16 Thread Maciej Fijalkowski
Relax verifier's restriction that was meant to forbid tailcall usage when subprog count was higher than 1. Also, do not max out the stack depth of program that utilizes tailcalls. Signed-off-by: Maciej Fijalkowski --- kernel/bpf/verifier.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH v8 bpf-next 7/7] selftests: bpf: introduce tailcall_bpf2bpf test suite

2020-09-16 Thread Maciej Fijalkowski
Add four tests to tailcalls selftest explicitly named "tailcall_bpf2bpf2_X" as their purpose is to validate that combination of tailcalls with bpf2bpf calls are working properly. Include also test_verifier's test cases, one negative that will exercise check_max_stack_depth check against caller's s

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Alex Dewar
On Wed, Sep 16, 2020 at 08:50:17PM +0100, Alex Dewar wrote: > In mt7531_cpu_port_config(), if the variable port is neither 5 nor 5, This should read "neither 5 nor 6", obviously. I'll fix in v2.

Re: [PATCH bpf-next v5 6/8] libbpf: add support for freplace attachment in bpf_link_create

2020-09-16 Thread Andrii Nakryiko
On Wed, Sep 16, 2020 at 2:21 PM Toke Høiland-Jørgensen wrote: > > Andrii Nakryiko writes: > > > On Wed, Sep 16, 2020 at 1:37 PM Andrii Nakryiko > > wrote: > >> > >> On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen > >> wrote: > >> > > >> > From: Toke Høiland-Jørgensen > >> > > >> > This

[PATCH net] drivers/net/wan/hdlc: Set skb->protocol before transmitting

2020-09-16 Thread Xie He
This patch sets skb->protocol before transmitting frames on the HDLC device, so that a user listening on the HDLC device with an AF_PACKET socket will see outgoing frames' sll_protocol field correctly set and consistent with that of incoming frames. 1. Control frames in hdlc_cisco and hdlc_ppp Wh

linux-next: Signed-off-by missing for commit in the net-next tree

2020-09-16 Thread Stephen Rothwell
Hi all, Commits 0d2ffdc8d400 ("net/mlx5: Don't call timecounter cyc2time directly from 1PPS flow") 87f3495cbe8d ("net/mlx5: Release clock lock before scheduling a PPS work") aac2df7f022e ("net/mlx5: Rename ptp clock info") fb609b5112bd ("net/mlx5: Always use container_of to find mdev poi

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Alex Dewar
[snip] > > > > /* Enable Mediatek header mode on the cpu port */ > > mt7530_write(priv, MT7530_PVC_P(port), > > @@ -2275,7 +2279,7 @@ mt7531_cpu_port_config(struct dsa_switch *ds, int > > port) > > { > > struct mt7530_priv *priv = ds->priv; > > phy_interface_t interface; > > -

Re: [PATCH bpf-next v5 4/8] bpf: support attaching freplace programs to multiple attach points

2020-09-16 Thread Andrii Nakryiko
On Wed, Sep 16, 2020 at 2:13 PM Toke Høiland-Jørgensen wrote: > > > [ will fix all your comments above ] > > >> @@ -3924,10 +3983,16 @@ static int tracing_bpf_link_attach(const union > >> bpf_attr *attr, struct bpf_prog * > >> prog->expected_attach_type == BPF_TRACE_ITER) > >>

Re: [PATCH] Convert enum pci_dev_flags to bit fields in struct pci_dev

2020-09-16 Thread Bjorn Helgaas
[+cc Kai-Heng, Colin, Myron] On Mon, Sep 14, 2020 at 03:57:56AM +, Krzysztof Wilczyński wrote: > All the flags defined in the enum pci_dev_flags are used to determine > whether a particular feature of an underlying PCI device should be used > or not - features are also often disabled via a dev

RE: [PATCH v3] hv_netvsc: Add validation for untrusted Hyper-V values

2020-09-16 Thread Haiyang Zhang
> -Original Message- > From: Andrea Parri (Microsoft) > Sent: Wednesday, September 16, 2020 5:47 AM > To: linux-ker...@vger.kernel.org > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; Wei Liu ; linux- > hyp...@vger.kernel.org; Andres Beltran ; Michael > Kelley ; Saruhan Kar

Re: Re: Altera TSE driver not working in 100mbps mode

2020-09-16 Thread David Bilsby
Hi Would you consider making the PhyLink modifications to the Altera TSE driver public as this would be very useful for a board we have which uses an SFP PHY connected to the TSE core via I2C. Currently we are using a fibre SFP and fixing the speed to 1G but would really like to be able to us

Re: [PATCH bpf-next v5 4/8] bpf: support attaching freplace programs to multiple attach points

2020-09-16 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Wed, Sep 16, 2020 at 2:13 PM Toke Høiland-Jørgensen > wrote: >> >> >> [ will fix all your comments above ] >> >> >> @@ -3924,10 +3983,16 @@ static int tracing_bpf_link_attach(const union >> >> bpf_attr *attr, struct bpf_prog * >> >> prog->expected_attac

Re: [PATCH net-next] net: stmmac: Add support to Ethtool get/set ring parameters

2020-09-16 Thread David Miller
From: Wong Vee Khee Date: Wed, 16 Sep 2020 15:40:20 +0800 > +int stmmac_reinit_ringparam(struct net_device *dev, u32 rx_size, u32 tx_size) > +{ > + struct stmmac_priv *priv = netdev_priv(dev); > + int ret = 0; > + > + if (netif_running(dev)) > + stmmac_release(dev); ... >

Re: [PATCH bpf-next v5 6/8] libbpf: add support for freplace attachment in bpf_link_create

2020-09-16 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Wed, Sep 16, 2020 at 1:37 PM Andrii Nakryiko > wrote: >> >> On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen >> wrote: >> > >> > From: Toke Høiland-Jørgensen >> > >> > This adds support for supplying a target btf ID for the bpf_link_create() >> > operation,

Re: [PATCH net-next 00/15] mlxsw: Refactor headroom management

2020-09-16 Thread David Miller
From: Ido Schimmel Date: Wed, 16 Sep 2020 09:35:13 +0300 > From: Ido Schimmel > > Petr says: > > On Spectrum, port buffers, also called port headroom, is where packets are > stored while they are parsed and the forwarding decision is being made. For > lossless traffic flows, in case shared buf

Re: [pull request][net-next 00/16] mlx5 updates 2020-09-15

2020-09-16 Thread David Miller
From: sa...@kernel.org Date: Tue, 15 Sep 2020 13:25:17 -0700 > From: Saeed Mahameed > > Hi Dave & Jakub, > > This series adds some misc updates to mlx5 driver. > > For more information please see tag log below. > > Please pull and let me know if there is any problem. Pulled, thank you.

Re: [PATCH bpf v5] xsk: do not discard packet when NETDEV_TX_BUSY

2020-09-16 Thread Daniel Borkmann
On 9/16/20 2:00 PM, Magnus Karlsson wrote: From: Magnus Karlsson In the skb Tx path, transmission of a packet is performed with dev_direct_xmit(). When NETDEV_TX_BUSY is set in the drivers, it signifies that it was not possible to send the packet right now, please try later. Unfortunately, the

Re: [PATCH bpf-next v5 5/8] bpf: Fix context type resolving for extension programs

2020-09-16 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Wed, Sep 16, 2020 at 12:59 PM Andrii Nakryiko > wrote: >> >> On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen >> wrote: >> > >> > From: Toke Høiland-Jørgensen >> > >> > Eelco reported we can't properly access arguments if the tracing >> > program is attached

Re: [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber connection

2020-09-16 Thread Andrew Lunn
On Wed, Sep 16, 2020 at 03:54:34PM -0500, Dan Murphy wrote: > Andrew > > On 9/15/20 3:17 PM, Andrew Lunn wrote: > > > + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Full_BIT, > > > + phydev->supported); > > > + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_H

Re: [PATCH bpf-next v5 4/8] bpf: support attaching freplace programs to multiple attach points

2020-09-16 Thread Toke Høiland-Jørgensen
[ will fix all your comments above ] >> @@ -3924,10 +3983,16 @@ static int tracing_bpf_link_attach(const union >> bpf_attr *attr, struct bpf_prog * >> prog->expected_attach_type == BPF_TRACE_ITER) >> return bpf_iter_link_attach(attr, prog); >> >> + if (attr->li

[PATCH net] ibmvnic: Fix returning uninitialized return code

2020-09-16 Thread Thomas Falcon
If successful, __ibmvnic_open and reset_sub_crq_queues, if no device queues exist, will return an uninitialized variable rc. Return zero on success instead. Fixes: 57a49436f4e8 ("ibmvnic: Reset sub-crqs during driver reset") Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Th

Re: [PATCH bpf-next v5 6/8] libbpf: add support for freplace attachment in bpf_link_create

2020-09-16 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Wed, Sep 16, 2020 at 2:21 PM Toke Høiland-Jørgensen > wrote: >> >> Andrii Nakryiko writes: >> >> > On Wed, Sep 16, 2020 at 1:37 PM Andrii Nakryiko >> > wrote: >> >> >> >> On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen >> >> wrote: >> >> > >> >> > From: T

Re: [PATCH bpf-next v5 2/8] bpf: verifier: refactor check_attach_btf_id()

2020-09-16 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Tue, Sep 15, 2020 at 5:50 PM Toke Høiland-Jørgensen > wrote: >> >> From: Toke Høiland-Jørgensen >> >> The check_attach_btf_id() function really does three things: >> >> 1. It performs a bunch of checks on the program to ensure that the >>attachment is valid. >>

[PATCH net-next] net/sched: Remove unused function qdisc_queue_drop_head()

2020-09-16 Thread YueHaibing
It is not used since commit a09ceb0e0814 ("sched: remove qdisc->drop") Signed-off-by: YueHaibing --- include/net/sch_generic.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d60e7c39d60c..6c762457122f 100644 --- a/include/net/

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Ilias Apalodimas
Hi Will, On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: [...] > > continue; > > } > > - if (ctx->image == NULL) > > - ctx->offset[i] = ctx->idx; > > if (ret) > > return ret; > > } > > +

[PATCH -next] net/sched: Remove unused function qdisc_queue_drop_head()

2020-09-16 Thread YueHaibing
It is not used since commit a09ceb0e0814 ("sched: remove qdisc->drop") Signed-off-by: YueHaibing --- include/net/sch_generic.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d60e7c39d60c..6c762457122f 100644 --- a/include/net/

Re: [PATCH] net/mlx5: IPsec: make spdxcheck.py happy

2020-09-16 Thread Greg Kroah-Hartman
On Wed, Sep 16, 2020 at 10:58:24AM +0200, Lukas Bulwahn wrote: > Commit 2d64663cd559 ("net/mlx5: IPsec: Add HW crypto offload support") > provided a proper SPDX license expression, but slipped in a typo. > > Fortunately, ./scripts/spdxcheck.py warns: > > drivers/net/ethernet/mellanox/mlx5/core/

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-16 Thread Jakub Kicinski
On Tue, 15 Sep 2020 15:57:16 +0300 Oded Gabbay wrote: > On Mon, Sep 14, 2020 at 7:50 PM Jakub Kicinski wrote: > > What's the use for a networking device which only communicates with > > itself, other than testing? > > No use, and we do have a suite of tests that runs from user-space on > the de

[PATCH net-next v9 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-09-16 Thread Vadym Kochan
The following features are supported: - VLAN-aware bridge offloading - VLAN-unaware bridge offloading - FDB offloading (learning, ageing) - Switchport configuration Currently there are some limitations like: - Only 1 VLAN-aware bridge instance supported - FDB ageing timeo

[PATCH net-next v9 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-16 Thread Vadym Kochan
Marvell Prestera 98DX3255 integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. Prestera Switchdev is a firmware based driver that operates via PCI bus. The current implementation supports only boards designed for the

[PATCH net-next v9 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-09-16 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34 +++

Re: [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber connection

2020-09-16 Thread Dan Murphy
Andrew On 9/15/20 3:17 PM, Andrew Lunn wrote: + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Full_BIT, +phydev->supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Half_BIT, +phydev->supported); +

[PATCH net-next v9 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-16 Thread Vadym Kochan
Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. The current implementation supports only boards designed for the Marvell Switchdev solution and requires special firmware. The core Preste

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-16 Thread Gustavo A. R. Silva
On 9/16/20 14:50, Alex Dewar wrote: [..] > > drivers/net/dsa/mt7530.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > [..] > > /* Enable Mediatek header mode on the cpu port */ > mt7530_write(priv, MT7530_PVC_P(port), > @@ -2275,7 +2279,7 @@ mt753

[PATCH] i40e: Fix use of uninitialized variable

2020-09-16 Thread Alex Dewar
In i40e_clean_rx_irq_zc(), the variable failure is only set when a condition is met, but then its value is used unconditionally. Fix this. Addresses-Coverity: 1496986 ("Uninitialized value") Fixes: 8cbf74149903 ("i40e, xsk: move buffer allocation out of the Rx processing loop") Signed-off-by: Ale

[PATCH net] drivers/net/wan/lapbether: Make skb->protocol consistent with the header

2020-09-16 Thread Xie He
This driver is a virtual driver stacked on top of Ethernet interfaces. When this driver transmits data on the Ethernet device, the skb->protocol setting is inconsistent with the Ethernet header prepended to the skb. This causes a user listening on the Ethernet interface with an AF_PACKET socket,

RE: [PATCH 5/5] dpaa2-eth: support PTP Sync packet one-step timestamping

2020-09-16 Thread Y.b. Lu
Hi Jakub, > -Original Message- > From: Jakub Kicinski > Sent: Thursday, September 10, 2020 10:43 PM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; David S . Miller ; Ioana > Ciornei ; Ioana Ciocoi Radulescu > ; Richard Cochran > > Subject: Re: [PATCH 5/5] dpaa2-eth: support PTP Sync packet

[PATCH net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-16 Thread Florian Fainelli
The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 30 +

Re: [Linux-kernel-mentees][PATCH] rtl8150: set memory to all 0xFFs on failed register reads

2020-09-16 Thread Anant Thazhemadam
On 16/09/20 11:49 am, Petko Manolov wrote: > On 20-09-16 10:35:40, Anant Thazhemadam wrote: >> get_registers() copies whatever memory is written by the >> usb_control_msg() call even if the underlying urb call ends up failing. > Not true, memcpy() is only called if "ret" is positive. Right. I'm r

  1   2   3   >