Re: [PATCH net v1] net: broadcom: fix a mistake about ioremap resource

2020-05-04 Thread Dejin Zheng
On Mon, May 04, 2020 at 08:28:52PM -0700, Florian Fainelli wrote: > > > On 5/4/2020 7:03 PM, Dejin Zheng wrote: > > Commit d7a5502b0bb8b ("net: broadcom: convert to > > devm_platform_ioremap_resource_byname()") will broke this driver. > > idm_base and nicpm_base were optional, after this change,

[PATCH net-next v6 1/2] ethtool: provide UAPI for PHY master/slave configuration.

2020-05-04 Thread Oleksij Rempel
This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of auto-negotiation support, we needed to be able to configure the MASTER-SLAVE role of the port manually or from an application in user space. The same UAPI can be used for 1000BASE-T or MultiGBASE-T devices to force MASTER or S

[PATCH net-next v6 0/2] provide support for PHY master/slave configuration

2020-05-04 Thread Oleksij Rempel
changes v6: - use NL_SET_ERR_MSG_ATTR in ethnl_update_linkmodes - add sanity checks in the ioctl interface - use bool for ethnl_validate_master_slave_cfg() changes v5: - set MASTER_SLAVE_CFG_UNSUPPORTED as default value - send a netlink error message on validation error - more code fixes changes

[PATCH net-next v6 2/2] net: phy: tja11xx: add support for master-slave configuration

2020-05-04 Thread Oleksij Rempel
The TJA11xx PHYs have a vendor specific Master/Slave configuration bit, which is not compatible with IEEE 803.2-2018 spec for 100Base-T1 devices. So, provide a custom config_ange call back to solve this problem. Signed-off-by: Oleksij Rempel --- drivers/net/phy/nxp-tja11xx.c | 43 +++

Re: [PATCH bpf-next 1/4] selftests/bpf: generalize helpers to control backround listener

2020-05-04 Thread Andrii Nakryiko
On Mon, May 4, 2020 at 10:37 AM Stanislav Fomichev wrote: > > Move the following routines that let us start a background listener > thread and connect to a server by fd to the test_prog: > * start_server_thread - start background INADDR_ANY thread > * stop_server_thread - stop the thread > * conne

Re: net: rtw88: fix an issue about leak system resources

2020-05-04 Thread Markus Elfring
> Brian, Thanks very much for your reminder, Reminders can hopefully trigger positive effects. > These comments have always bothered me. Thanks for such information. > Now I can put it on my blacklist. I find it unfortunate that you choose to adjust your communication preferences in this dir

Re: [PATCH] net/mlx5: reduce stack usage in qp_read_field

2020-05-04 Thread Leon Romanovsky
On Mon, May 04, 2020 at 05:41:56PM +0200, Arnd Bergmann wrote: > On Sun, May 3, 2020 at 7:30 AM Leon Romanovsky wrote: > > On Thu, Apr 30, 2020 at 04:37:14PM +0200, Arnd Bergmann wrote: > > > On Thu, Apr 30, 2020 at 7:22 AM Leon Romanovsky wrote: > > > > > > While warning limit is generally 1024

Re: [PATCH net] net: dsa: Do not leave DSA master with NULL netdev_ops

2020-05-04 Thread Allen
When ndo_get_phys_port_name() for the CPU port was added we introduced an early check for when the DSA master network device in dsa_master_ndo_setup() already implements ndo_get_phys_port_name(). When we perform the teardown operation in dsa_master_ndo_teardown() we would not be checking that cpu_

[PATCH] net: emac: Fix use correct return type for ndo_start_xmit()

2020-05-04 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/qualcomm/emac/emac-mac.c | 5 +++-- drivers/net/ethernet/qualcomm/emac/emac-mac.h | 5 +++-- drivers/net/ethern

Re: [PATCH 5/5] sysctl: pass kernel pointers to ->proc_handler

2020-05-04 Thread Christoph Hellwig
On Mon, May 04, 2020 at 12:01:11PM -0700, Kees Cook wrote: > > if (error) > > - goto out; > > + goto out_free_buf; > > > > /* careful: calling conventions are nasty here */ > > Is this comment still valid after doing these cleanups? The comment is pretty old so I dec

Re: [RFC PATCH bpf-next 13/13] MAINTAINERS, xsk: update AF_XDP section after moves/adds

2020-05-04 Thread Björn Töpel
On 2020-05-05 05:02, Joe Perches wrote: On Mon, 2020-05-04 at 13:37 +0200, Björn Töpel wrote: Update MAINTAINERS to correctly mirror the current AF_XDP socket file layout. Also, add the AF_XDP files of libbpf. [] diff --git a/MAINTAINERS b/MAINTAINERS [] @@ -18451,8 +18451,12 @@ R: Jonat

Re: [v3] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-04 Thread Markus Elfring
> Thanks for your feedback, and yes, I'd like to further adjust the description > details > to make the patch more clear and better. Thanks for such a positive response. > But because Jakub seems to prefer v1, so I'm somehow confused Such a view can be reasonable. The change acceptance varies

Re: [PATCH 04/15] ath10k: fix gcc-10 zero-length-bounds warnings

2020-05-04 Thread Kalle Valo
"Gustavo A. R. Silva" writes: > On 5/4/20 06:54, Kalle Valo wrote: >> "Gustavo A. R. Silva" writes: >> >>> Hi Arnd, >>> >>> On 4/30/20 16:30, Arnd Bergmann wrote: gcc-10 started warning about out-of-bounds access for zero-length arrays: In file included from drivers/net/wire

Re: [PATCH] docs: dt: fix broken links due to txt->yaml renames

2020-05-04 Thread Rob Herring
On Mon, May 4, 2020 at 12:56 PM Uwe Kleine-König wrote: > > Hi Sam, > > On Mon, May 04, 2020 at 07:45:22PM +0200, Sam Ravnborg wrote: > > On Mon, May 04, 2020 at 11:30:20AM +0200, Mauro Carvalho Chehab wrote: > > > There are some new broken doc links due to yaml renames > > > at DT. Developers sho

Re: [PATCH net-next 1/7] dt-binding: ti: am65x: document common platform time sync cpts module

2020-05-04 Thread Rob Herring
On Fri, 1 May 2020 23:50:05 +0300, Grygorii Strashko wrote: > Document device tree bindings for TI AM654/J721E SoC The Common Platform > Time Sync (CPTS) module. The CPTS module is used to facilitate host control > of time sync operations. Main features of CPTS module are: > - selection of multip

Re: [PATCH net-next 1/7] dt-binding: ti: am65x: document common platform time sync cpts module

2020-05-04 Thread Rob Herring
On Fri, May 01, 2020 at 11:50:05PM +0300, Grygorii Strashko wrote: > Document device tree bindings for TI AM654/J721E SoC The Common Platform > Time Sync (CPTS) module. The CPTS module is used to facilitate host control > of time sync operations. Main features of CPTS module are: > - selection of

Re: [RFC net-next 1/3] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX325x (AC3x)

2020-05-04 Thread Vadym Kochan
Hi Ido, On Sat, May 02, 2020 at 06:20:49PM +0300, Vadym Kochan wrote: > Hi Ido, > > On Thu, Mar 05, 2020 at 04:49:37PM +0200, Ido Schimmel wrote: > > On Tue, Feb 25, 2020 at 04:30:54PM +, Vadym Kochan wrote: > > > +int mvsw_pr_port_learning_set(struct mvsw_pr_port *port, bool learn) > > > +{

[PATCH v2] igb: Report speed and duplex as unknown when device is runtime suspended

2020-05-04 Thread Kai-Heng Feng
igb device gets runtime suspended when there's no link partner. We can't get correct speed under that state: $ cat /sys/class/net/enp3s0/speed 1000 In addition to that, an error can also be spotted in dmesg: [ 385.991957] igb :03:00.0 enp3s0: PCIe link lost Since device can only be runtime s

Re: [RFC PATCH net-next 2/5] vxlan: ecmp support for mac fdb entries

2020-05-04 Thread Roopa Prabhu
On Mon, May 4, 2020 at 8:36 PM David Ahern wrote: > > On 5/4/20 4:28 PM, Roopa Prabhu wrote: > > diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h > > index cd144e3..eefcda8 100644 > > --- a/include/uapi/linux/neighbour.h > > +++ b/include/uapi/linux/neighbour.h > > @@ -

Re: [RFC PATCH net-next 1/5] nexthop: support for fdb ecmp nexthops

2020-05-04 Thread Roopa Prabhu
On Mon, May 4, 2020 at 8:23 PM David Ahern wrote: > > On 5/4/20 4:28 PM, Roopa Prabhu wrote: > > include/net/nexthop.h| 14 ++ > > include/uapi/linux/nexthop.h | 1 + > > net/ipv4/nexthop.c | 101 > > +-- > > 3 files changed, 93 in

Re: [RFC PATCH net-next 5/5] selftests: net: add fdb nexthop tests

2020-05-04 Thread David Ahern
On 5/4/20 4:28 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > This commit adds ipv4 and ipv6 basic fdb tests to fib_nexthops.sh. > Started with a separate test script for fdb nexthops but seems like > its better for basic tests to live in fib_nexthops.sh for overall > nexthop API coverage. > >

Re: [RFC PATCH net-next 2/5] vxlan: ecmp support for mac fdb entries

2020-05-04 Thread David Ahern
On 5/4/20 4:28 PM, Roopa Prabhu wrote: > diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h > index cd144e3..eefcda8 100644 > --- a/include/uapi/linux/neighbour.h > +++ b/include/uapi/linux/neighbour.h > @@ -29,6 +29,7 @@ enum { > NDA_LINK_NETNSID, > NDA_SRC_VN

Re: [PATCH net v1] net: broadcom: fix a mistake about ioremap resource

2020-05-04 Thread Florian Fainelli
On 5/4/2020 7:03 PM, Dejin Zheng wrote: > Commit d7a5502b0bb8b ("net: broadcom: convert to > devm_platform_ioremap_resource_byname()") will broke this driver. > idm_base and nicpm_base were optional, after this change, they are > mandatory. it will probe fails with -22 when the dtb doesn't have

Re: [PATCH net-next v2 10/10] net: phy: Send notifier when starting the cable test

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Given that it takes time to run a cable test, send a notify message at > the start, as well as when it is completed. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 08/10] net: phy: marvell: Add cable test support

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > The Marvell PHYs have a couple of different register sets for > performing cable tests. Page 7 provides the simplest to use. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 09/10] net: phy: Put interface into oper testing during cable test

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Since running a cable test is disruptive, put the interface into > operative state testing while the test is running. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [RFC PATCH net-next 1/5] nexthop: support for fdb ecmp nexthops

2020-05-04 Thread David Ahern
On 5/4/20 4:28 PM, Roopa Prabhu wrote: > include/net/nexthop.h| 14 ++ > include/uapi/linux/nexthop.h | 1 + > net/ipv4/nexthop.c | 101 > +-- > 3 files changed, 93 insertions(+), 23 deletions(-) pretty cool that you can extend thi

[PATCH net-next] net: nxp: Fix use correct return type for ndo_start_xmit()

2020-05-04 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/nxp/lpc_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/nxp/lp

Re: [PATCH net-next v2 07/10] net: ethtool: Add helpers for reporting test results

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > The PHY drivers can use these helpers for reporting the results. The > results get translated into netlink attributes which are added to the > pre-allocated skbuf. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 06/10] net: ethtool: Add infrastructure for reporting cable test results

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Provide infrastructure for PHY drivers to report the cable test > results. A netlink skb is associated to the phydev. Helpers will be > added which can add results to this skb. Once the test has finished > the results are sent to user space. > > When n

Re: [PATCH net-next v2 05/10] net: ethtool: Make helpers public

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Make some helpers for building ethtool netlink messages available > outside the compilation unit, so they can be used for building > messages which are not simple get/set. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 04/10] net: ethtool: Add attributes for cable test reports

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Add the attributes needed to report cable test results to userspace. > The reports are expected to be per twisted pair. A nested property per > pair can report the result of the cable test. A nested property can > also report the length of the cable to a

Re: [PATCH net-next v2 03/10] net: ethtool: netlink: Add support for triggering a cable test

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Add new ethtool netlink calls to trigger the starting of a PHY cable > test. > > Add Kconfig'ury to ETHTOOL_NETLINK so that PHYLIB is not a module when > ETHTOOL_NETLINK is builtin, which would result in kernel linking errors. > > v2: > Remove unwanted

Re: [PATCH net-next v2 02/10] net: phy: Add support for polling cable test

2020-05-04 Thread Florian Fainelli
On 5/4/2020 5:18 PM, Andrew Lunn wrote: > Some PHYs are not capable of generating interrupts when a cable test > finished. They do however support interrupts for normal operations, > like link up/down. As such, the PHY state machine would normally not > poll the PHY. > > Add support for indicat

[PATCH net-next 0/5] Crypto/chcr: Fix issues regarding algorithm implementation in driver

2020-05-04 Thread Devulapally Shiva Krishna
The following series of patches fixes the issues which came during self-tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. Patch 1: Fixes gcm(aes) hang issue and rfc4106-gcm encryption issue. Patch 2: Fixes ctr, cbc, xts and rfc3686-ctr extra test failures. Patch 3: Fixes ccm(aes) extra test fa

[PATCH net-next 2/5] Crypto/chcr: fix ctr, cbc, xts and rfc3686-ctr failed tests

2020-05-04 Thread Devulapally Shiva Krishna
This solves the following issues observed during self test when CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is enabled. 1. Added fallback for cbc, ctr and rfc3686 if req->nbytes is zero and for xts added a fallback case if req->nbytes is not multiple of 16. 2. In case of cbc-aes, solved wrong iv update. Wh

[PATCH net-next 1/5] Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests

2020-05-04 Thread Devulapally Shiva Krishna
This patch fixes two issues observed during self tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. 1. gcm(aes) hang issue , that happens during decryption. 2. rfc4106-gcm-aes-chcr encryption unexpectedly succeeded. For gcm-aes decryption , authtag is not mapped due to sg_nents_for_len(upto si

[PATCH net-next 4/5] Crypto/chcr: support for 48 byte key_len in aes-xts

2020-05-04 Thread Devulapally Shiva Krishna
Added support for 48 byte key length for aes-xts. Signed-off-by: Ayush Sawal Signed-off-by: Devulapally Shiva Krishna --- drivers/crypto/chelsio/chcr_algo.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/dri

[PATCH net-next 5/5] Crypto/chcr: fix for hmac(sha) test fails

2020-05-04 Thread Devulapally Shiva Krishna
The hmac(sha) test fails for a zero length source text data. For hmac(sha) minimum length of the data must be of block-size. So fix this by including the data_len for the last block. Signed-off-by: Ayush Sawal Signed-off-by: Devulapally Shiva Krishna --- drivers/crypto/chelsio/chcr_algo.c | 2 +

[PATCH net-next 3/5] Crypto/chcr: fix for ccm(aes) failed test

2020-05-04 Thread Devulapally Shiva Krishna
The ccm(aes) test fails when req->assoclen > ~240bytes. The problem is the value assigned to auth_offset is wrong. As auth_offset is unsigned char, it can take max value as 255. So fix it by making it unsigned int. Signed-off-by: Ayush Sawal Signed-off-by: Devulapally Shiva Krishna --- drivers

[PATCH net-next] net: altera: Fix use correct return type for ndo_start_xmit()

2020-05-04 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/altera/altera_tse_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/et

Re: [RFC PATCH bpf-next 13/13] MAINTAINERS, xsk: update AF_XDP section after moves/adds

2020-05-04 Thread Joe Perches
On Mon, 2020-05-04 at 13:37 +0200, Björn Töpel wrote: > Update MAINTAINERS to correctly mirror the current AF_XDP socket file > layout. Also, add the AF_XDP files of libbpf. [] > diff --git a/MAINTAINERS b/MAINTAINERS [] > @@ -18451,8 +18451,12 @@ R: Jonathan Lemon > L: netdev@vger.kernel.org

[PATCH net-next] net: allwinner: Fix use correct return type for ndo_start_xmit()

2020-05-04 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. And emac_start_xmit() can leak one skb if 'channel' == 3. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/allwinner/sun4i-emac.c | 4 ++-- 1 file changed, 2 in

RE: [PATCH net-next] ixgbe: fix signed-integer-overflow warning

2020-05-04 Thread Kirsher, Jeffrey T
> -Original Message- > From: Xie XiuQi > Sent: Monday, May 4, 2020 19:45 > To: Kirsher, Jeffrey T ; da...@davemloft.net > Cc: intel-wired-...@lists.osuosl.org; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: [PATCH net-next] ixgbe: fix signed-integer-overflow warning >

[PATCH net-next] ixgbe: fix signed-integer-overflow warning

2020-05-04 Thread Xie XiuQi
ubsan report this warning, fix it by adding a unsigned suffix. UBSAN: signed-integer-overflow in drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:2246:26 65535 * 65537 cannot be represented in type 'int' CPU: 21 PID: 7 Comm: kworker/u256:0 Not tainted 5.7.0-rc3-debug+ #39 Hardware name: Huawei TaiS

Re: bgmac-enet driver broken in 5.7

2020-05-04 Thread Dejin Zheng
On Mon, May 04, 2020 at 05:37:18PM -0700, Jonathan Richardson wrote: > On Mon, May 4, 2020 at 5:30 PM Dejin Zheng wrote: > > > > On Mon, May 04, 2020 at 12:32:55PM -0700, Jonathan Richardson wrote: > > > Hi, > > > > > > Commit d7a5502b0bb8b (net: broadcom: convert to > > > devm_platform_ioremap_re

Re: [RFC PATCH net-next 1/5] nexthop: support for fdb ecmp nexthops

2020-05-04 Thread Roopa Prabhu
On Mon, May 4, 2020 at 3:28 PM Roopa Prabhu wrote: > > From: Roopa Prabhu > > This patch introduces ecmp nexthops and nexthop groups > for mac fdb entries. In subsequent patches this is used > by the vxlan driver fdb entries. The use case is > E-VPN multihoming [1,2,3] which requires bridged vxla

[PATCH net v1] net: broadcom: fix a mistake about ioremap resource

2020-05-04 Thread Dejin Zheng
Commit d7a5502b0bb8b ("net: broadcom: convert to devm_platform_ioremap_resource_byname()") will broke this driver. idm_base and nicpm_base were optional, after this change, they are mandatory. it will probe fails with -22 when the dtb doesn't have them defined. so revert part of this commit and mak

Re: [PATCH net-next v2 3/3] net: phy: mscc: use phy_package_shared

2020-05-04 Thread Florian Fainelli
On 5/4/2020 2:31 PM, Michael Walle wrote: > Use the new phy_package_shared common storage to ease the package > initialization and to access the global registers. > > Signed-off-by: Michael Walle > Tested-by: Vladimir Oltean Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 2/3] net: phy: bcm54140: use phy_package_shared

2020-05-04 Thread Florian Fainelli
On 5/4/2020 2:31 PM, Michael Walle wrote: > Use the new phy_package_shared common storage to ease the package > initialization and to access the global registers. > > Signed-off-by: Michael Walle Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 1/3] net: phy: add concept of shared storage for PHYs

2020-05-04 Thread Florian Fainelli
On 5/4/2020 2:31 PM, Michael Walle wrote: > There are packages which contain multiple PHY devices, eg. a quad PHY > transceiver. Provide functions to allocate and free shared storage. > > Usually, a quad PHY contains global registers, which don't belong to any > PHY. Provide convenience functio

Re: BUG: stack guard page was hit in unwind_next_frame

2020-05-04 Thread Cong Wang
On Mon, May 4, 2020 at 12:08 PM Josh Poimboeuf wrote: > > On Sat, May 02, 2020 at 11:36:11PM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:8999dc89 net/x25: Fix null-ptr-deref in x25_disconnect > > git tree: net > > console output: https

Re: [PATCH] net: rtw88: fix an issue about leak system resources

2020-05-04 Thread Dejin Zheng
On Mon, May 04, 2020 at 10:03:59AM -0700, Brian Norris wrote: > (Markus is clearly not taking the hint, but FYI for everyone else:) > > On Mon, May 4, 2020 at 8:00 AM Markus Elfring wrote: > > > BTW, In the past week, you asked me to change the commit comments in my > > > 6 patches like this one.

Re: [PATCH net-next v2 1/3] net: phy: add concept of shared storage for PHYs

2020-05-04 Thread Andrew Lunn
On Mon, May 04, 2020 at 11:31:34PM +0200, Michael Walle wrote: > There are packages which contain multiple PHY devices, eg. a quad PHY > transceiver. Provide functions to allocate and free shared storage. > > Usually, a quad PHY contains global registers, which don't belong to any > PHY. Provide c

Re: [PATCH net-next v2 3/3] net: phy: mscc: use phy_package_shared

2020-05-04 Thread Andrew Lunn
On Mon, May 04, 2020 at 11:31:36PM +0200, Michael Walle wrote: > Use the new phy_package_shared common storage to ease the package > initialization and to access the global registers. > > Signed-off-by: Michael Walle > Tested-by: Vladimir Oltean Reviewed-by: Andrew Lunn Andrew

Re: bgmac-enet driver broken in 5.7

2020-05-04 Thread Jonathan Richardson
On Mon, May 4, 2020 at 5:30 PM Dejin Zheng wrote: > > On Mon, May 04, 2020 at 12:32:55PM -0700, Jonathan Richardson wrote: > > Hi, > > > > Commit d7a5502b0bb8b (net: broadcom: convert to > > devm_platform_ioremap_resource_byname()) broke the bgmac-enet driver. > > probe fails with -22. idm_base an

Re: [PATCH net-next v2 2/3] net: phy: bcm54140: use phy_package_shared

2020-05-04 Thread Andrew Lunn
On Mon, May 04, 2020 at 11:31:35PM +0200, Michael Walle wrote: > Use the new phy_package_shared common storage to ease the package > initialization and to access the global registers. > > Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Andrew

Re: bgmac-enet driver broken in 5.7

2020-05-04 Thread Dejin Zheng
On Mon, May 04, 2020 at 12:32:55PM -0700, Jonathan Richardson wrote: > Hi, > > Commit d7a5502b0bb8b (net: broadcom: convert to > devm_platform_ioremap_resource_byname()) broke the bgmac-enet driver. > probe fails with -22. idm_base and nicpm_base were optional. Now they > are mandatory. Our upstre

[PATCH net-next v2 08/10] net: phy: marvell: Add cable test support

2020-05-04 Thread Andrew Lunn
The Marvell PHYs have a couple of different register sets for performing cable tests. Page 7 provides the simplest to use. Signed-off-by: Andrew Lunn --- drivers/net/phy/marvell.c | 202 ++ 1 file changed, 202 insertions(+) diff --git a/drivers/net/phy/marvel

[PATCH net-next v2 04/10] net: ethtool: Add attributes for cable test reports

2020-05-04 Thread Andrew Lunn
Add the attributes needed to report cable test results to userspace. The reports are expected to be per twisted pair. A nested property per pair can report the result of the cable test. A nested property can also report the length of the cable to any fault. v2: Grammar fixes Change length from u16

[PATCH net-next v2 07/10] net: ethtool: Add helpers for reporting test results

2020-05-04 Thread Andrew Lunn
The PHY drivers can use these helpers for reporting the results. The results get translated into netlink attributes which are added to the pre-allocated skbuf. Signed-off-by: Andrew Lunn --- include/linux/ethtool_netlink.h | 13 + include/linux/phy.h | 4 +++ net/ethtool/cab

[PATCH net-next v2 01/10] net: phy: Add cable test support to state machine

2020-05-04 Thread Andrew Lunn
Running a cable test is desruptive to normal operation of the PHY and can take a 5 to 10 seconds to complete. The RTNL lock cannot be held for this amount of time, and add a new state to the state machine for running a cable test. The driver is expected to implement two functions. The first is use

[PATCH net-next v2 02/10] net: phy: Add support for polling cable test

2020-05-04 Thread Andrew Lunn
Some PHYs are not capable of generating interrupts when a cable test finished. They do however support interrupts for normal operations, like link up/down. As such, the PHY state machine would normally not poll the PHY. Add support for indicating the PHY state machine must poll the PHY when perfor

[PATCH net-next v2 09/10] net: phy: Put interface into oper testing during cable test

2020-05-04 Thread Andrew Lunn
Since running a cable test is disruptive, put the interface into operative state testing while the test is running. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c

[PATCH net-next v2 05/10] net: ethtool: Make helpers public

2020-05-04 Thread Andrew Lunn
Make some helpers for building ethtool netlink messages available outside the compilation unit, so they can be used for building messages which are not simple get/set. Signed-off-by: Andrew Lunn --- net/ethtool/netlink.c | 4 ++-- net/ethtool/netlink.h | 2 ++ 2 files changed, 4 insertions(+), 2

[PATCH net-next v2 03/10] net: ethtool: netlink: Add support for triggering a cable test

2020-05-04 Thread Andrew Lunn
Add new ethtool netlink calls to trigger the starting of a PHY cable test. Add Kconfig'ury to ETHTOOL_NETLINK so that PHYLIB is not a module when ETHTOOL_NETLINK is builtin, which would result in kernel linking errors. v2: Remove unwanted white space change Remove ethnl_cable_test_act_ops and use

[PATCH net-next v2 00/10] Ethernet Cable test support

2020-05-04 Thread Andrew Lunn
Many copper Ethernet PHY have support for performing diagnostics of the cable. Are the cable shorted, broken, not plugged into anything at the other end? And they can report roughly how far along the cable any fault is. Add infrastructure in ethtool and phylib support for triggering a cable test a

[PATCH net-next v2 06/10] net: ethtool: Add infrastructure for reporting cable test results

2020-05-04 Thread Andrew Lunn
Provide infrastructure for PHY drivers to report the cable test results. A netlink skb is associated to the phydev. Helpers will be added which can add results to this skb. Once the test has finished the results are sent to user space. When netlink ethtool is not part of the kernel configuration

[PATCH net-next v2 10/10] net: phy: Send notifier when starting the cable test

2020-05-04 Thread Andrew Lunn
Given that it takes time to run a cable test, send a notify message at the start, as well as when it is completed. Signed-off-by: Andrew Lunn --- net/ethtool/cabletest.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/net/ethtool/cabletest.c b/net/eth

Re: [PATCH iproute2 v2 0/6] bridge vlan output fixes

2020-05-04 Thread Stephen Hemminger
On Fri, 1 May 2020 17:47:14 +0900 Benjamin Poirier wrote: > More fixes for `bridge vlan` and `bridge vlan tunnelshow` normal and JSON > mode output. > > Some column titles are changed, empty lines removed from the output, > interfaces with no vlans or tunnels are removed, columns are aligned. >

Re: [v3,iproute2 1/2] iproute2:tc:action: add a gate control action

2020-05-04 Thread Stephen Hemminger
On Sun, 3 May 2020 14:32:50 +0800 Po Liu wrote: > + print_string(PRINT_ANY, "gate state", "\tgate-state %-8s", NAK Space in a json tag is not valid. Please run a dump command and feed it into JSON validation checker like Python.

Re: [v3,iproute2 1/2] iproute2:tc:action: add a gate control action

2020-05-04 Thread Stephen Hemminger
On Sun, 3 May 2020 14:32:50 +0800 Po Liu wrote: > Introduce a ingress frame gate control flow action. > Tc gate action does the work like this: > Assume there is a gate allow specified ingress frames can pass at > specific time slot, and also drop at specific time slot. Tc filter > chooses the i

[PATCH net-next 3/5] net: ipa: don't retry in ipa_endpoint_stop()

2020-05-04 Thread Alex Elder
The only reason ipa_endpoint_stop() had a retry loop was that the just-removed workaround required an IPA DMA command to occur between attempts. The gsi_channel_stop() call that implements the stop does its own retry loop, to cover a channel's transition from started to stop-in-progress to stopped

[PATCH net-next 0/5] net: ipa: kill endpoint stop workaround

2020-05-04 Thread Alex Elder
It turns out that a workaround that performs a small DMA operation between retried attempts to stop a GSI channel is not needed for any supported hardware. The hardware quirk that required the extra DMA operation was fixed after IPA v3.1. So this series gets rid of that workaround code, along wit

[PATCH net-next 5/5] net: ipa: kill ipa_cmd_dma_task_32b_addr_add()

2020-05-04 Thread Alex Elder
A recent commit removed the only use of ipa_cmd_dma_task_32b_addr_add(). This function (and the IPA immediate command it implements) is no longer needed, so get rid of it, along with all of the definitions associated with it. Isolate its removal in a commit so it can be easily added back again if

[PATCH net-next 4/5] net: ipa: kill ipa_endpoint_stop()

2020-05-04 Thread Alex Elder
The previous commit made ipa_endpoint_stop() be a trivial wrapper around gsi_channel_stop(). Since it no longer does anything special, just open-code it in the three places it's used. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 27 ++- drivers/net/ipa/

[PATCH net-next 1/5] net: ipa: fix a bug in ipa_endpoint_stop()

2020-05-04 Thread Alex Elder
In ipa_endpoint_stop(), for TX endpoints we set the number of retries to 0. When we break out of the loop, retries being 0 means we return EIO rather than the value of ret (which should be 0). Fix this by using a non-zero retry count for both RX and TX channels, and just break out of the loop aft

[PATCH net-next 2/5] net: ipa: get rid of workaround in ipa_endpoint_stop()

2020-05-04 Thread Alex Elder
In ipa_endpoint_stop(), a workaround is used for IPA version 3.5.1 where a 1-byte DMA request is issued between GSI channel stop retries. It turns out that this workaround is only required for IPA versions 3.1 and 3.2, and we don't support those. So remove the call to ipa_endpoint_stop_rx_dma() i

Re: [PATCH 1/1] selftests/bpf: add cls_redirect classifier

2020-05-04 Thread Alexei Starovoitov
On Sat, May 02, 2020 at 01:48:51AM +0200, Daniel Borkmann wrote: > On 4/27/20 11:45 AM, Lorenz Bauer wrote: > > On Sun, 26 Apr 2020 at 18:33, Alexei Starovoitov > > wrote: > [...] > > > > +/* Linux packet pointers are either aligned to NET_IP_ALIGN (aka 2 > > > > bytes), > > > > + * or not aligne

[PATCH net-next 0/3] net: ipa: kill endpoint delay mode workaround

2020-05-04 Thread Alex Elder
A "delay mode" feature was put in place to work around a problem where packets could passed to the modem before it was ready to handle them. That problem no longer exists, and we don't need the workaround any more so get rid of it. -Alex Alex Elder (3):

[PATCH net-next 3/3] net: ipa: remove endpoint delay mode feature

2020-05-04 Thread Alex Elder
A "delay mode" feature was put in place to work around a problem that was observed during development of the upstream IPA driver. It used TX endpoint "delay mode" in order to prevent transmitting packets toward the modem before it was ready. A race condition that would explain the problem has lon

[PATCH net-next 2/3] net: ipa: introduce ipa_endpoint_program_suspend()

2020-05-04 Thread Alex Elder
Create a new helper function that encapsulates enabling or disabling suspend on an RX endpoint. It returns the previous state of the endpoint (true means suspend mode was enabled). Create another function that handles enabling or disabling delay mode on a TX endpoint. Delay mode does not work co

[PATCH net-next 1/3] net: ipa: have ipa_endpoint_init_ctrl() return previous state

2020-05-04 Thread Alex Elder
Change ipa_endpoint_init_ctrl() so it returns the previous state (whether suspend or delay mode was enabled) rather than indicating whether the request caused a change in state. This makes it easier to understand what's happening where called. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_e

[PATCH net-next 0/2] net: ipa: limit special reset handling

2020-05-04 Thread Alex Elder
Some special handling done during channel reset should only be done for IPA hardare version 3.5.1. This series generalizes the meaning of a flag passed to indicate special behavior, then has the special handling be used only when appropriate. -Alex Alex El

[PATCH net-next 2/2] net: ipa: only reset channel twice for IPA v3.5.1

2020-05-04 Thread Alex Elder
In gsi_channel_reset(), RX channels are subjected to two consecutive CHANNEL_RESET commands. This workaround should only be used for IPA version 3.5.1, and for newer hardware "can lead to unwanted behavior." Only issue the second CHANNEL_RESET command for legacy hardware. Signed-off-by: Alex Eld

[PATCH net-next 1/2] net: ipa: rename db_enable flag

2020-05-04 Thread Alex Elder
In several places, a Boolean flag is used in the GSI code to indicate whether the "doorbell engine" should be enabled or not when a channel is configured. This is basically done to abstract this property from the IPA version; the GSI code doesn't otherwise "know" what the IPA hardware version is.

Re: [PATCH bpf-next 4/4] bpf: allow any port in bpf_bind helper

2020-05-04 Thread Andrey Ignatov
Stanislav Fomichev [Mon, 2020-05-04 10:34 -0700]: > We want to have a tighter control on what ports we bind to in > the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means > connect() becomes slightly more expensive. The expensive part > comes from the fact that we now need to call inet_csk_get_po

Re: max channels for mlx5

2020-05-04 Thread David Ahern
On 5/4/20 3:46 PM, Saeed Mahameed wrote: > what is the amount of msix avaiable for eth0 port ? > > businfo=$(ethtool -i eth0 | grep bus-info | cut -d":" -f2-) > cat /proc/interrupts | grep $businfo | wc -l 64 > > So if number of msix is 64, we can only use 63 for data path > completions .. >

[PATCH v2 net-next 4/6] net: dsa: sja1105: support flow-based redirection via virtual links

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Implement tc-flower offloads for redirect, trap and drop using non-critical virtual links. Commands which were tested to work are: # Send frames received on swp2 with a DA of 42:be:24:9b:76:20 to the # CPU and to swp3. This type of key (DA only) when the port's VLAN

[PATCH v2 net-next 5/6] net: dsa: sja1105: implement tc-gate using time-triggered virtual links

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Restrict the TTEthernet hardware support on this switch to operate as closely as possible to IEEE 802.1Qci as possible. This means that it can perform PTP-time-based ingress admission control on streams identified by {DMAC, VID, PCP}, which is useful when trying to ensure th

[PATCH v2 net-next 6/6] docs: net: dsa: sja1105: document intended usage of virtual links

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Add some verbiage describing how the hardware features of the switch are exposed to users through tc-flower. Signed-off-by: Vladimir Oltean --- Changes from v1: None. Changes from RFC: Patch is new. Documentation/networking/dsa/sja1105.rst | 116 +++

[PATCH v2 net-next 3/6] net: dsa: sja1105: make room for virtual link parsing in flower offload

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Virtual links are a sja1105 hardware concept of executing various flow actions based on a key extracted from the frame's DMAC, VID and PCP. Currently the tc-flower offload code supports only parsing the DMAC if that is the broadcast MAC address, and the VLAN PCP. Extract th

[PATCH v2 net-next 1/6] net: dsa: introduce a dsa_port_from_netdev public helper

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean As its implementation shows, this is synonimous with calling dsa_slave_dev_check followed by dsa_slave_to_port, so it is quite simple already and provides functionality which is already there. However there is now a need for these functions outside dsa_priv.h, for example i

[PATCH v2 net-next 2/6] net: dsa: sja1105: add static tables for virtual links

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean This patch adds the register definitions for the: - VL Lookup Table - VL Policing Table - VL Forwarding Table - VL Forwarding Parameters Table These are needed in order to perform TTEthernet operations: QoS classification, flow-based policing and/or frame redirecting with t

[PATCH v2 net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. v1 was submitted at: https://patchwork.ozlabs.org/project/netdev/cover/20200503211035.19363-1-olte...@gmail.com/ Changes in v2: Using a newly introduced d

[PATCH net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. Vladimir Oltean (6): net: dsa: introduce a dsa_port_from_netdev public helper net: dsa: sja1105: add static tables for virtual links net: dsa: sja110

Potential Race Condition in tls_hw_hash() and alike

2020-05-04 Thread Navid Emamdoost
Hi, I was wondering if a race condition in net/tls/tls_main.c may lead to a UAF or not? The scenario can be like this: 1) device is initialized and registered via chtls_register_dev() 2) while tls_hw_hash() is executed in one thread, the device gets detached (CPU2), and another thread tries to ac

[RFC PATCH net-next 4/5] vxlan: support for nexthop notifiers

2020-05-04 Thread Roopa Prabhu
From: Roopa Prabhu vxlan driver registers for nexthop add/del notifiers to cleanup fdb entries pointing to nexthops. Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/drivers/net/vxlan.c

[RFC PATCH net-next 5/5] selftests: net: add fdb nexthop tests

2020-05-04 Thread Roopa Prabhu
From: Roopa Prabhu This commit adds ipv4 and ipv6 basic fdb tests to fib_nexthops.sh. Started with a separate test script for fdb nexthops but seems like its better for basic tests to live in fib_nexthops.sh for overall nexthop API coverage. TODO: - runtime vxlan fdb tests: Its best to add test

[RFC PATCH net-next 3/5] nexthop: add support for notifiers

2020-05-04 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds nexthop add/del notifiers. To be used by vxlan driver in a later patch. Could possibly be used by switchdev drivers in the future. Signed-off-by: Roopa Prabhu --- include/net/netns/nexthop.h | 1 + include/net/nexthop.h | 12 net/ipv4/next

  1   2   3   4   >