Re: [iproute2-next v3] devlink: display elapsed time during flash update

2020-10-19 Thread Jiri Pirko
Mon, Oct 19, 2020 at 09:05:34PM CEST, jacob.e.kel...@intel.com wrote: >> -Original Message- >> From: David Ahern >> Sent: Saturday, October 17, 2020 8:35 AM >> To: Keller, Jacob E ; netdev@vger.kernel.org; Jiri >> Pirko >> >> Cc: Shannon Nelson >> Subject: Re: [iproute2-next v3] devlink

Re: [PATCH] can: mcp251xfd: fix semicolon.cocci warnings

2020-10-19 Thread Marc Kleine-Budde
On 10/19/20 2:08 PM, kernel test robot wrote: > From: kernel test robot > > drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c:176:2-3: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: f4f77366f21d ("can: mcp251xfd: rename

Re: [PATCH v4 0/4] can: add support for ETAS ES58X CAN USB

2020-10-19 Thread Marc Kleine-Budde
On 10/16/20 7:13 PM, Vincent Mailhol wrote: > The purpose of this patch series is to introduce a new CAN USB > driver to support ETAS USB interfaces (ES58X series). > > During development, issues in drivers/net/can/dev.c were discovered, > the fix for those issues are included in this patch series

[PATCH net] net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup

2020-10-19 Thread Xie He
This driver calls ether_setup to set up the network device. The ether_setup function would add the IFF_TX_SKB_SHARING flag to the device. This flag indicates that it is safe to transmit shared skbs to the device. However, this is not true. This driver may pad the frame (in eth_tx) before transmiss

Re: [PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer

2020-10-19 Thread Jason Wang
On 2020/10/19 下午5:06, Zhenzhong Duan wrote: In case failure to setup Post interrupt for an IRQ, it make no sense to assign irqfd->producer to the producer. This change makes code more robust. It's better to describe what issue we will get without this patch. Thanks Signed-off-by: Zhenz

Re: [PATCH 1/4] ftgmac100: Fix race issue on TX descriptor[0]

2020-10-19 Thread Benjamin Herrenschmidt
On Tue, 2020-10-20 at 04:13 +, Joel Stanley wrote: > On Mon, 19 Oct 2020 at 23:20, Benjamin Herrenschmidt > wrote: > > > > On Mon, 2020-10-19 at 16:57 +0800, Dylan Hung wrote: > > > These rules must be followed when accessing the TX descriptor: > > > > > > 1. A TX descriptor is "cleanable" o

Re: [PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled

2020-10-19 Thread Jason Wang
On 2020/10/19 下午5:06, Zhenzhong Duan wrote: If Post interrupt is disabled due to hardware limit or forcely disabled by "intremap=nopost" parameter, return -EINVAL so that the legacy mode IRQ isn't registered as IRQ bypass producer. Is there any side effect if it was still registered? Wit

Re: [PATCH net-next v1] net: evaluate net.conf.ipvX.all.ignore_routes_with_linkdown

2020-10-19 Thread Vincent Bernat
❦ 19 octobre 2020 17:53 -07, Jakub Kicinski: > I'm not hearing any objections, but I have two questions: > - do you intend to merge it for 5.10 or 5.11? Because it has a fixes >tag, yet it's marked for net-next. If we put it in 5.10 it may get >pulled into stable immediately, knowing how

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 19:57 -0700, Jakub Kicinski wrote: > > I suspect the problem is that the HW (and yes this would be a HW bug) > > doesn't order the CPU -> memory and the CPU -> MMIO path. > > > > What I think happens is that the store to txde0 is potentially still in > > a buffer somewhere on

RE: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Dylan Hung
> -Original Message- > From: Jakub Kicinski [mailto:k...@kernel.org] > Sent: Tuesday, October 20, 2020 3:01 AM > To: Joel Stanley > Cc: Dylan Hung ; Benjamin Herrenschmidt > ; David S . Miller ; > netdev@vger.kernel.org; Linux Kernel Mailing List > ; Po-Yu Chuang ; > linux-aspeed ; OpenBMC

Re: [PATCH net v2] Revert "virtio-net: ethtool configurable RXCSUM"

2020-10-19 Thread Jason Wang
On 2020/10/20 上午1:32, Michael S. Tsirkin wrote: This reverts commit 3618ad2a7c0e78e4258386394d5d5f92a3dbccf8. When the device does not have a control vq (e.g. when using a version of QEMU based on upstream v0.10 or older, or when specifying ctrl_vq=off,ctrl_rx=off,ctrl_vlan=off,ctrl_rx_extra=o

[PATCH v2] rtnetlink: fix data overflow in rtnl_calcit()

2020-10-19 Thread zhudi
"ip addr show" command execute error when we have a physical network card with a large number of VFs The return value of if_nlmsg_size() in rtnl_calcit() will exceed range of u16 data type when any network cards has a larger number of VFs. rtnl_vfinfo_size() will significant increase needed dump s

Re: [PATCH] wireguard: convert selftest/{counter,ratelimiter}.c to KUnit

2020-10-19 Thread kernel test robot
Hi Daniel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 7cf726a59435301046250c42131554d9ccc566b8] url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/wireguard-convert-selftest-counter-ratelimiter-c-to-KUnit/20201020-042650 base:7cf726a59435

[RFC, net-next 1/3] net: dsa: ethtool preempt ops support on slave ports

2020-10-19 Thread Xiaoliang Yang
Preempt_set and preempt_get are new functions of ethtool ops, which is to configure frame preemption according to 802.1qbu and 802.3br. Add them on slave ports of DSA framework, so that DSA devices can support to configure frame preemption by using ethtool. Signed-off-by: Xiaoliang Yang --- incl

Re: [PATCH 4/4] ftgmac100: Restart MAC HW once

2020-10-19 Thread Joel Stanley
On Mon, 19 Oct 2020 at 08:57, Dylan Hung wrote: > > The interrupt handler may set the flag to reset the mac in the future, > but that flag is not cleared once the reset has occured. > > Fixes: 10cbd6407609 ("ftgmac100: Rework NAPI & interrupts handling") > Signed-off-by: Dylan Hung > Signed-off-b

[RFC, net-next 2/3] net: dsa: felix: add preempt queues set support for vsc9959

2020-10-19 Thread Xiaoliang Yang
VSC9959 support preempt queues according to 802.1qbu and 802.3br. This patch add ethtool preempt set to configure preemption. In user space, it can be set like this: ethtool --set-frame-preemption swp0 enable min-frag-size 0 Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix

Re: [PATCH 1/4] ftgmac100: Fix race issue on TX descriptor[0]

2020-10-19 Thread Joel Stanley
On Mon, 19 Oct 2020 at 23:20, Benjamin Herrenschmidt wrote: > > On Mon, 2020-10-19 at 16:57 +0800, Dylan Hung wrote: > > These rules must be followed when accessing the TX descriptor: > > > > 1. A TX descriptor is "cleanable" only when its value is non-zero > > and the owner bit is set to "softwar

[RFC, net-next 0/3] net: dsa: felix: frame preemption support

2020-10-19 Thread Xiaoliang Yang
VSC9959 supports frame preemption according to 802.1qbu and 802.3br. This patch series use ethtool to enable and configure frame preemption, then use tc-taprio preempt set to mark the preempt queues and express queueus. This series depends on series: "ethtool: Add support for frame preemption" lin

[RFC, net-next 3/3] net: dsa: felix: tc-taprio preempt set support

2020-10-19 Thread Xiaoliang Yang
After using ethtool to enable and configure frame preemption on vsc9959, use tc-taprio preempt set to mark the preempt queues and express queueus. Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix_vsc9959.c | 16 1 file changed, 16 insertions(+) diff --git a/driver

from Linda

2020-10-19 Thread Linda Hills
Hello, how are you today? This is Linda, I have written to you before but no reply, please I want you to text me on WhatsApp +1(408)9903267 There is something very important that I want to talk to you about. Linda.

[PATCH v3 0/3] net: dsa: mv88e6xxx: serdes link without phy

2020-10-19 Thread Chris Packham
This small series gets my hardware into a working state. The key points are to make sure we don't force the link and that we ask the MAC for the link status. I also have updated my dts to say `phy-mode = "1000base-x";` and `managed = "in-band-status";` I've included patch #3 in this series but I d

[PATCH v3 2/3] net: dsa: mv88e6xxx: Support serdes ports on MV88E6097/6095/6185

2020-10-19 Thread Chris Packham
Implement serdes_power, serdes_get_lane and serdes_pcs_get_state ops for the MV88E6097/6095/6185 so that ports 8 & 9 can be supported as serdes ports and directly connected to other network interfaces or to SFPs without a PHY. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn --- Changes in

[PATCH v3 1/3] net: dsa: mv88e6xxx: Don't force link when using in-band-status

2020-10-19 Thread Chris Packham
When a port is configured with 'managed = "in-band-status"' don't force the link up, the switch MAC will detect the link status correctly. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn --- Changes in v3: - None Changes in v2: - Add review from Andrew drivers/net/dsa/mv88e6xxx/chip.c |

[PATCH v3 3/3] net: dsa: mv88e6xxx: Support serdes ports on MV88E6123/6131

2020-10-19 Thread Chris Packham
Implement serdes_power, serdes_get_lane and serdes_pcs_get_state ops for the MV88E6123 so that the ports without a built-in PHY supported as serdes ports and directly connected to other network interfaces or to SFPs. Also implement serdes_get_regs_len and serdes_get_regs to aid future debugging. S

Re: [iproute2-next v3] devlink: display elapsed time during flash update

2020-10-19 Thread David Ahern
On 10/19/20 1:20 PM, Jakub Kicinski wrote: > On Mon, 19 Oct 2020 19:05:34 + Keller, Jacob E wrote: >>> The DEVLINK attributes are ridiculously long -- >>> DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT is 40 characters -- which >>> forces really long code lines or oddly wrapped lines. Going forward >

Re: [PATCH net-next v1] net: evaluate net.conf.ipvX.all.ignore_routes_with_linkdown

2020-10-19 Thread Jakub Kicinski
On Mon, 19 Oct 2020 20:56:36 -0600 David Ahern wrote: > On 10/19/20 6:53 PM, Jakub Kicinski wrote: > > On Sat, 17 Oct 2020 14:50:11 +0200 Vincent Bernat wrote: > >> Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl > >> ignores a route whose interface is down. It is provided as

Re: [PATCH bpf 1/2] bpf_redirect_neigh: Support supplying the nexthop as a helper parameter

2020-10-19 Thread David Ahern
On 10/19/20 12:23 PM, Daniel Borkmann wrote: > Looks good to me, thanks! I'll wait till David gets a chance as well to > review. > One thing that would have made sense to me (probably worth a v2) is to > keep the > fib lookup flag you had back then, meaning sth like BPF_FIB_SKIP_NEIGH > which > wou

Re: [PATCH net] nexthop: Fix performance regression in nexthop deletion

2020-10-19 Thread Jakub Kicinski
On Fri, 16 Oct 2020 20:29:14 +0300 Ido Schimmel wrote: > From: Ido Schimmel > > While insertion of 16k nexthops all using the same netdev ('dummy10') > takes less than a second, deletion takes about 130 seconds: Applied, thank you!

Re: [PATCH bpf 1/2] bpf_redirect_neigh: Support supplying the nexthop as a helper parameter

2020-10-19 Thread David Ahern
On 10/19/20 10:04 AM, Toke Høiland-Jørgensen wrote: > @@ -4906,6 +4910,16 @@ struct bpf_fib_lookup { > __u8dmac[6]; /* ETH_ALEN */ > }; > > +struct bpf_redir_neigh { > + /* network family for lookup (AF_INET, AF_INET6) */ > + __u8nh_family; Define every byte. This is a

RE: [EXT] Re: [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO

2020-10-19 Thread Andy Duan
From: Andrew Lunn Sent: Tuesday, October 20, 2020 10:40 AM > On Tue, Oct 20, 2020 at 12:14:04PM +1000, Greg Ungerer wrote: > > Hi Andrew, > > > > Commit f166f890c8f0 ("[PATCH] net: ethernet: fec: Replace interrupt > > driven MDIO with polled IO") breaks the FEC driver on at least one of > > the Co

Re: [PATCH net-next v1] net: evaluate net.conf.ipvX.all.ignore_routes_with_linkdown

2020-10-19 Thread David Ahern
[ fix Andy's address ] On 10/17/20 6:50 AM, Vincent Bernat wrote: > Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl > ignores a route whose interface is down. It is provided as a > per-interface sysctl. However, while a "all" variant is exposed, it > was a noop since it was ne

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Jakub Kicinski
On Tue, 20 Oct 2020 10:23:41 +1100 Benjamin Herrenschmidt wrote: > On Mon, 2020-10-19 at 12:00 -0700, Jakub Kicinski wrote: > > On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > > > b/drivers/net/ethernet/faraday/ftgmac100.c >

Re: [PATCH net-next v1] net: evaluate net.conf.ipvX.all.ignore_routes_with_linkdown

2020-10-19 Thread David Ahern
On 10/19/20 6:53 PM, Jakub Kicinski wrote: > On Sat, 17 Oct 2020 14:50:11 +0200 Vincent Bernat wrote: >> Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl >> ignores a route whose interface is down. It is provided as a >> per-interface sysctl. However, while a "all" variant is ex

Re: [PATCH] wireguard: convert selftest/{counter,ratelimiter}.c to KUnit

2020-10-19 Thread kernel test robot
Hi Daniel, Thank you for the patch! Yet something to improve: [auto build test ERROR on 7cf726a59435301046250c42131554d9ccc566b8] url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/wireguard-convert-selftest-counter-ratelimiter-c-to-KUnit/20201020-042650 base:7cf726a59435301046

Re: [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO

2020-10-19 Thread Andrew Lunn
On Tue, Oct 20, 2020 at 12:14:04PM +1000, Greg Ungerer wrote: > Hi Andrew, > > Commit f166f890c8f0 ("[PATCH] net: ethernet: fec: Replace interrupt driven > MDIO with polled IO") breaks the FEC driver on at least one of > the ColdFire platforms (the 5208). Maybe others, that is all I have > tested

Re: [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO

2020-10-19 Thread Greg Ungerer
Hi Andrew, Commit f166f890c8f0 ("[PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO") breaks the FEC driver on at least one of the ColdFire platforms (the 5208). Maybe others, that is all I have tested on so far. Specifically the driver no longer finds any PHY devices whe

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Florian Fainelli
On 10/15/2020 2:27 PM, Vladimir Oltean wrote: Currently any DSA switch that implements the multicast ops (properly, that is) gets these errors after just sitting for a while, with at least 2 ports bridged: [ 286.013814] mscc_felix :00:00.5 swp3: failed (err=-2) to del object (id=3) The

Re: [PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config

2020-10-19 Thread Jason Wang
On 2020/10/19 下午5:07, we...@ucloud.cn wrote: From: wenxu Qemu get virtio_net_config from the vdpa driver. So The vdpa driver should set the VIRTIO_NET_S_LINK_UP flag to virtio_net_config like vdpa_sim. Or the link of virtio net NIC in the virtual machine will never up. Fixes: 1a86b377aa21 ("

[PATCH net v2] net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device

2020-10-19 Thread Xie He
The hdlc_rcv function is used as hdlc_packet_type.func to process any skb received in the kernel with skb->protocol == htons(ETH_P_HDLC). The purpose of this function is to provide second-stage processing for skbs not assigned a "real" L3 skb->protocol value in the first stage. This function assum

Re: [PATCH 1/2] staging: wfx: fix use of uninitialized pointer

2020-10-19 Thread Nathan Chancellor
On Mon, Oct 19, 2020 at 06:06:03PM +0200, Jerome Pouiller wrote: > From: Jérôme Pouiller > > With -Wuninitialized, the compiler complains: > > drivers/staging/wfx/data_tx.c:34:19: warning: variable 'band' is > uninitialized when used here [-Wuninitialized] > if (rate->idx >= band->n_bitrate

Re: [PATCH v4] net: dsa: seville: the packet buffer is 2 megabits, not megabytes

2020-10-19 Thread Jakub Kicinski
On Mon, 19 Oct 2020 08:06:25 +0300 Maxim Kochetkov wrote: > The VSC9953 Seville switch has 2 megabits of buffer split into 4360 > words of 60 bytes each. 2048 * 1024 is 2 megabytes instead of 2 megabits. > 2 megabits is (2048 / 8) * 1024 = 256 * 1024. > > Signed-off-by: Maxim Kochetkov > Reviewed

Re: [PATCHv5] selftests: rtnetlink: load fou module for kci_test_encap_fou() test

2020-10-19 Thread Jakub Kicinski
On Mon, 19 Oct 2020 11:09:28 +0800 Po-Hsu Lin wrote: > The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh > needs the fou module to work. Otherwise it will fail with: > > $ ip netns exec "$testns" ip fou add port ipproto 47 > RTNETLINK answers: No such file or directory >

Re: [PATCH net] drivers/net/wan/hdlc: In hdlc_rcv, check to make sure dev is an HDLC device

2020-10-19 Thread Xie He
On Mon, Oct 19, 2020 at 3:49 PM Jakub Kicinski wrote: > > Cool! FWIW when you resend you can also trim the subject to just say: > > net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device > > There's no need for the full file path. OK. I'll do that. Thanks!

[PATCH iproute2-next 13/15] lib: parse_mapping: Recognize a keyword "all"

2020-10-19 Thread Petr Machata
The DCB tool will have to provide an interface to a number of fixed-size arrays. Unlike the egress- and ingress-qos-map, it makes good sense to have an interface to set all members to the same value. For example to set strict priority on all TCs besides select few, or to reset allocated bandwidth t

[PATCH iproute2-next 08/15] lib: Extract from devlink/mnlg a helper, mnlu_socket_open()

2020-10-19 Thread Petr Machata
This little dance of mnl_socket_open(), option setting, and bind, is the same regardless of tool. Extract into a new module that should hold helpers for working with libmnl, mnl_util.c. Signed-off-by: Petr Machata --- devlink/Makefile| 2 +- devlink/mnlg.c | 19 --- inc

[PATCH iproute2-next 02/15] lib: Add parse_one_of(), parse_on_off()

2020-10-19 Thread Petr Machata
Take from the macsec code parse_one_of() and adapt so that it passes the primary result as the main return value, and error result through a pointer. That is the simplest way to make the code reusable across data types without introducing extra magic. Also from macsec take the specialization of pa

[PATCH iproute2-next 07/15] ip: iplink_bridge_slave: Port over to parse_on_off()

2020-10-19 Thread Petr Machata
Invoke parse_on_off() from bridge_slave_parse_on_off() instead of hand-rolling one. Exit on failure, because the invarg that was ivoked here before would. Signed-off-by: Petr Machata --- ip/iplink_bridge_slave.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ip/

[PATCH iproute2-next 04/15] lib: Add parse_flag_on_off(), set_flag()

2020-10-19 Thread Petr Machata
Some iplink code makes a heavy use of code that sets or unsets a certain flag depending on whether "on" or "off" of specified. Extract this logic into a new function, parse_flag_on_off(). The bit that sets or clears a flag will be useful separately, so add it to a named function, set_flag(). Signe

[PATCH iproute2-next 06/15] ip: iplink_vlan: Port over to parse_flag_on_off()

2020-10-19 Thread Petr Machata
Convert bridge/link.c from a hand-rolled on_off parsing to the new global one. Signed-off-by: Petr Machata --- ip/iplink_vlan.c | 55 +--- 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/ip/iplink_vlan.c b/ip/iplink_vlan.c index 1e6817f

[PATCH iproute2-next 00/15] Add a tool for configuration of DCB

2020-10-19 Thread Petr Machata
The Linux DCB interface allows configuration of a broad range of hardware-specific attributes, such as TC scheduling, flow control, per-port buffer configuration, TC rate, etc. Currently a common libre tool for configuration of DCB is OpenLLDP. This suite contains a daemon that uses Linux DCB inte

[PATCH iproute2-next 10/15] lib: Extract from devlink/mnlg a helper, mnlu_socket_recv_run()

2020-10-19 Thread Petr Machata
Receiving a message in libmnl is a somewhat involved operation. Devlink's mnlg library has an implementation that is going to be handy for other tools as well. Extract it into a new helper. Signed-off-by: Petr Machata --- devlink/mnlg.c | 56 ++--- includ

[PATCH iproute2-next 12/15] lib: parse_mapping: Update argc, argv on error

2020-10-19 Thread Petr Machata
Currently argc and argv are not updated unless parsing of all of the mapping was successful. However in that case, "ip link" will point at the wrong argument when complaining: # ip link add name eth0.100 link eth0 type vlan id 100 egress 1:1 2:foo Error: argument "1" is wrong: invalid egre

[PATCH iproute2-next 09/15] lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare()

2020-10-19 Thread Petr Machata
Allocation of a new netlink message with the two usual headers is reusable with other netlink netlink message types. Extract it into a helper, mnlu_msg_prepare(). Take the second header as an argument, instead of passing in parameters to initialize it, and copy it in. Signed-off-by: Petr Machata

[PATCH iproute2-next 11/15] lib: Extract from iplink_vlan a helper to parse key:value arrays

2020-10-19 Thread Petr Machata
VLAN netdevices have two similar attributes: ingress-qos-map and egress-qos-map. These attributes can be configured with a series of 802.1-priority-to-skb-priority (and vice versa) mappings. A reusable helper along those lines will be handy for configuration of various priority-to-tc, tc-to-algorit

[PATCH iproute2-next 05/15] ip: iplink: Convert to use parse_on_off(), parse_flag_on_off()

2020-10-19 Thread Petr Machata
Invoke parse_flag_on_off() instead of rolling a custom function. Several places have the on/off logic reversed vs. how the flag is specified (e.g. IFF_NOARP vs. "arp" on command line). For those, invoke parse_on_off() and then set_flag() with a negated value. Signed-off-by: Petr Machata --- ip/i

[PATCH iproute2-next 01/15] Unify batch processing across tools

2020-10-19 Thread Petr Machata
The code for handling batches is largely the same across iproute2 tools. Extract a helper to handle the batch, and adjust the tools to dispatch to this helper. Sandwitch the invocation between prologue / epilogue code specific for each tool. Signed-off-by: Petr Machata --- bridge/bridge.c | 38

[PATCH iproute2-next 14/15] Add skeleton of a new tool, dcb

2020-10-19 Thread Petr Machata
The Linux DCB interface allows configuration of a broad range of hardware-specific attributes, such as TC scheduling, flow control, per-port buffer configuration, TC rate, etc. Add a new tool to show that configuration and tweak it. DCB allows configuration of several objects, and possibly could e

[PATCH iproute2-next 03/15] bridge: link: Port over to parse_on_off()

2020-10-19 Thread Petr Machata
Convert bridge/link.c from a custom on_off parser to the new global one. Signed-off-by: Petr Machata --- bridge/link.c | 79 --- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/bridge/link.c b/bridge/link.c index 3bc7af209b8b..fa6ed

[PATCH iproute2-next 15/15] dcb: Add a subtool for the DCB ETS object

2020-10-19 Thread Petr Machata
ETS, for "Enhanced Transmission Selection", is a set of configurations that permit configuration of mapping of priorities to traffic classes, traffic selection algorithm to use per traffic class, bandwidth allocation, etc. Add a dcb subtool to allow showing and tweaking of individual ETS configura

Re: [PATCH net-next v1] net: evaluate net.conf.ipvX.all.ignore_routes_with_linkdown

2020-10-19 Thread Jakub Kicinski
On Sat, 17 Oct 2020 14:50:11 +0200 Vincent Bernat wrote: > Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl > ignores a route whose interface is down. It is provided as a > per-interface sysctl. However, while a "all" variant is exposed, it > was a noop since it was never evalua

Re: [PATCH net] net: dsa: tag_ksz: KSZ8795 and KSZ9477 also use tail tags

2020-10-19 Thread Jakub Kicinski
On Fri, 16 Oct 2020 20:24:49 +0300 Vladimir Oltean wrote: > On Fri, Oct 16, 2020 at 07:16:03PM +0200, Christian Eggers wrote: > > I added it manually because the commit ID is not from Linus' tree. Is there > > any > > value using Fixes tags with id's from other trees? > > Yes, that's what "git

[PATCH net] net: Properly typecast int values to set sk_max_pacing_rate

2020-10-19 Thread Ke Li
In setsockopt(SO_MAX_PACING_RATE) on 64bit systems, sk_max_pacing_rate, after extended from 'u32' to 'unsigned long', takes unintentionally hiked value whenever assigned from an 'int' value with MSB=1, due to binary sign extension in promoting s32 to u64, e.g. 0x8000 becomes 0x8000.

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Vladimir Oltean
On Tue, Oct 20, 2020 at 02:06:32AM +0200, Andrew Lunn wrote: > I agree with the analysis. This is how i designed it! [...] > So i decided to keep it KISS and not bother with reference counting. Well, I can't argue with that then... > The other part of the argument is that DSA is stateless, in tha

Re: [PATCH v2 2/3] net: dsa: mv88e6xxx: Support serdes ports on MV88E6097/6095/6185

2020-10-19 Thread Andrew Lunn
On Mon, Oct 19, 2020 at 03:43:54PM +1300, Chris Packham wrote: > Implement serdes_power, serdes_get_lane and serdes_pcs_get_state ops for > the MV88E6097/6095/6185 so that ports 8 & 9 can be supported as serdes > ports and directly connected to other network interfaces or to SFPs > without a PHY. >

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Jakub Kicinski
On Tue, 20 Oct 2020 02:07:46 +0200 Andrew Lunn wrote: > On Mon, Oct 19, 2020 at 04:55:14PM -0700, Jakub Kicinski wrote: > > On Fri, 16 Oct 2020 00:27:11 +0300 Vladimir Oltean wrote: > > > Currently any DSA switch that implements the multicast ops (properly, > > > that is) gets these errors after

Re: [PATCH v3] net: mii: Report advertised link capabilities when autonegotiation is off

2020-10-19 Thread Andrew Lunn
On Mon, Oct 19, 2020 at 02:04:15PM +0200, Łukasz Stelmach wrote: > Unify the set of information returned by mii_ethtool_get_link_ksettings(), > mii_ethtool_gset() and phy_ethtool_ksettings_get(). Make the mii_*() > functions report advertised settings when autonegotiation if disabled. > > Suggeste

Re: [PATCH net] ibmvnic: save changed mac address to adapter->mac_addr

2020-10-19 Thread Jakub Kicinski
On Thu, 15 Oct 2020 23:57:15 -0500 Lijun Pan wrote: > After mac address change request completes successfully, the new mac > address need to be saved to adapter->mac_addr as well as > netdev->dev_addr. Otherwise, adapter->mac_addr still holds old > data. Do you observe this in practice? Can you sh

Re: [RFC PATCH net-next 7/9] net: dsa: microchip: ksz9477: add hardware time stamping support

2020-10-19 Thread Vladimir Oltean
On Mon, Oct 19, 2020 at 07:24:33PM +0200, Christian Eggers wrote: > Add routines required for TX hardware time stamping. > > The KSZ9563 only supports one step time stamping > (HWTSTAMP_TX_ONESTEP_P2P), which requires linuxptp-2.0 or later. PTP > mode is permanently enabled (changes tail tag; depe

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Andrew Lunn
On Mon, Oct 19, 2020 at 04:55:14PM -0700, Jakub Kicinski wrote: > On Fri, 16 Oct 2020 00:27:11 +0300 Vladimir Oltean wrote: > > Currently any DSA switch that implements the multicast ops (properly, > > that is) gets these errors after just sitting for a while, with at least > > 2 ports bridged: > >

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Andrew Lunn
On Fri, Oct 16, 2020 at 12:27:11AM +0300, Vladimir Oltean wrote: > Currently any DSA switch that implements the multicast ops (properly, > that is) gets these errors after just sitting for a while, with at least > 2 ports bridged: > > [ 286.013814] mscc_felix :00:00.5 swp3: failed (err=-2) to

Re: [PATCH] net: korina: cast KSEG0 address to pointer in kfree

2020-10-19 Thread Jakub Kicinski
On Sun, 18 Oct 2020 20:42:55 +0200 Valentin Vidic wrote: > Fixes gcc warning: > > passing argument 1 of 'kfree' makes pointer from integer without a cast > > Fixes: 3af5f0f5c74e ("net: korina: fix kfree of rx/tx descriptor array") > Reported-by: kernel test robot > Signed-off-by: Valentin Vidic

Re: [PATCH net] r8169: fix operation under forced interrupt threading

2020-10-19 Thread Jakub Kicinski
On Sun, 18 Oct 2020 18:38:59 +0200 Heiner Kallweit wrote: > For several network drivers it was reported that using > __napi_schedule_irqoff() is unsafe with forced threading. One way to > fix this is switching back to __napi_schedule, but then we lose the > benefit of the irqoff version in general.

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Jakub Kicinski
On Fri, 16 Oct 2020 00:27:11 +0300 Vladimir Oltean wrote: > Currently any DSA switch that implements the multicast ops (properly, > that is) gets these errors after just sitting for a while, with at least > 2 ports bridged: > > [ 286.013814] mscc_felix :00:00.5 swp3: failed (err=-2) to del ob

Re: [PATCH v1 1/2] net: ftgmac100: move phy connect out from ftgmac100_setup_mdio

2020-10-19 Thread Benjamin Herrenschmidt
On Thu, 2020-10-15 at 15:49 +0300, Ivan Mikhaylov wrote: > Split MDIO registration and PHY connect into ftgmac100_setup_mdio and > ftgmac100_mii_probe. Please keep me CCod on ftgmac100 patches. > Signed-off-by: Ivan Mikhaylov Acked-by: Benjamin Herrenschmidt > --- > drivers/net/ethernet/fara

Re: [PATCH 1/4] ftgmac100: Fix race issue on TX descriptor[0]

2020-10-19 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 16:57 +0800, Dylan Hung wrote: > These rules must be followed when accessing the TX descriptor: > > 1. A TX descriptor is "cleanable" only when its value is non-zero > and the owner bit is set to "software" Can you elaborate ? What is the point of that change ? The owner bit

Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue

2020-10-19 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 12:00 -0700, Jakub Kicinski wrote: > On Mon, 19 Oct 2020 08:57:03 + Joel Stanley wrote: > > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > > > b/drivers/net/ethernet/faraday/ftgmac100.c > > > index 00024dd41147..9a99a87f29f3 100644 > > > --- a/drivers/net/ethern

Re: [PATCH bpf 0/3] bpf: Enforce NULL check on new _OR_NULL return types

2020-10-19 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (refs/heads/master): On Mon, 19 Oct 2020 12:42:06 -0700 you wrote: > This set enforces NULL check on the new helper return types, > RET_PTR_TO_BTF_ID_OR_NULL and RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL. > > Martin KaFai Lau (3): > bpf: Enforce id generati

Re: [PATCH 4/4] ftgmac100: Restart MAC HW once

2020-10-19 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 16:57 +0800, Dylan Hung wrote: > The interrupt handler may set the flag to reset the mac in the > future, > but that flag is not cleared once the reset has occured. > > Fixes: 10cbd6407609 ("ftgmac100: Rework NAPI & interrupts handling") > Signed-off-by: Dylan Hung > Signed-

Re: [PATCH 3/4] ftgmac100: Add a dummy read to ensure running sequence

2020-10-19 Thread Benjamin Herrenschmidt
On Mon, 2020-10-19 at 16:57 +0800, Dylan Hung wrote: > On the AST2600 care must be taken to ensure writes appear correctly when > modifying the interrupt reglated registers. > > Add a function to perform a read after all writes to the IER and ISR > registers. You need to elaborate here. MMIO wri

Re: [PATCH bpf 1/3] bpf: Enforce id generation for all may-be-null register type

2020-10-19 Thread Alexei Starovoitov
On Mon, Oct 19, 2020 at 12:43 PM Martin KaFai Lau wrote: > > The commit af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper") > introduces RET_PTR_TO_BTF_ID_OR_NULL and > the commit eaa6bcb71ef6 ("bpf: Introduce bpf_per_cpu_ptr()") > introduces RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL. > Note that for R

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-19 Thread Jason Gunthorpe
On Mon, Oct 19, 2020 at 12:42:15PM -0700, Nick Desaulniers wrote: > On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote: > > > > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This is a upcoming change to clean up a new warning treewide. > > > I am won

Re: [PATCH] rtl8180: avoid accessing the data mapped to streaming DMA

2020-10-19 Thread Maciej S. Szmigiero
On 19.10.2020 04:54, Jia-Ju Bai wrote: > In rtl8180_tx(), skb->data is mapped to streaming DMA on line 476: > mapping = dma_map_single(..., skb->data, ...); > > On line 459, skb->data is assigned to hdr after cast: > struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; > > Then hdr-

Re: [PATCH net] drivers/net/wan/hdlc: In hdlc_rcv, check to make sure dev is an HDLC device

2020-10-19 Thread Jakub Kicinski
On Mon, 19 Oct 2020 15:36:14 -0700 Xie He wrote: > On Mon, Oct 19, 2020 at 2:22 PM Jakub Kicinski wrote: > > > > Looks correct to me. I spotted there is also IFF_WAN_HDLC added by > > 7cdc15f5f9db ("WAN: Generic HDLC now uses IFF_WAN_HDLC private flag.") > > would using that flag also be correct a

Re: [PATCH] wireguard: convert selftest/{counter,ratelimiter}.c to KUnit

2020-10-19 Thread Jason A. Donenfeld
Hi Daniel, Thanks for this patch. KUnit looks interesting. But I'm not totally sure what this would gain here, except more complicated infrastructure to handle. We're already running these tests in our CI on every single commit made to a variety of trees on a variety of architectures -- see https:

Re: [PATCH net] drivers/net/wan/hdlc: In hdlc_rcv, check to make sure dev is an HDLC device

2020-10-19 Thread Xie He
On Mon, Oct 19, 2020 at 2:22 PM Jakub Kicinski wrote: > > Looks correct to me. I spotted there is also IFF_WAN_HDLC added by > 7cdc15f5f9db ("WAN: Generic HDLC now uses IFF_WAN_HDLC private flag.") > would using that flag also be correct and cleaner potentially? > > Up to you, just wanted to make

Re: [PATCHv4 net-next 16/16] sctp: enable udp tunneling socks

2020-10-19 Thread Marcelo Ricardo Leitner
Ah, please note that net-next is closed. https://lore.kernel.org/netdev/20201015123116.743005ca%40kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/T/ Marcelo

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Tue, 2020-10-20 at 00:12 +0200, Andrew Lunn wrote: > > I think in my case those extra modes only supported in SGMII mode, > > like > > 10 and 100Mbps modes, effectively get filtered out because the MAC > > doesn't support them in the 1000BaseX mode either. > > There are different things here. W

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Russell King - ARM Linux admin
On Tue, Oct 20, 2020 at 12:12:32AM +0200, Andrew Lunn wrote: > > The auto-negotiation is a bit of a weird thing in this case, as there > > are two negotiations occurring, the 1000BaseX between the PCS/PMA PHY > > and the module PHY, and the 1000BaseT between the module PHY and the > > copper link p

Re: [PATCHv4 net-next 16/16] sctp: enable udp tunneling socks

2020-10-19 Thread Marcelo Ricardo Leitner
On Mon, Oct 19, 2020 at 08:25:33PM +0800, Xin Long wrote: > --- a/Documentation/networking/ip-sysctl.rst > +++ b/Documentation/networking/ip-sysctl.rst > @@ -2640,6 +2640,12 @@ addr_scope_policy - INTEGER > > Default: 1 > > +udp_port - INTEGER Need to be more verbose here, and also menti

Re: [PATCHv4 net-next 07/16] sctp: add encap_port for netns sock asoc and transport

2020-10-19 Thread Marcelo Ricardo Leitner
On Mon, Oct 19, 2020 at 08:25:24PM +0800, Xin Long wrote: > --- a/Documentation/networking/ip-sysctl.rst > +++ b/Documentation/networking/ip-sysctl.rst > @@ -2640,6 +2640,15 @@ addr_scope_policy - INTEGER > > Default: 1 > > +encap_port - INTEGER > + The default remote UDP encapsalutio

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
> I think in my case those extra modes only supported in SGMII mode, like > 10 and 100Mbps modes, effectively get filtered out because the MAC > doesn't support them in the 1000BaseX mode either. There are different things here. What ethtool reports, and what is programmed into the advertise regis

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Mon, 2020-10-19 at 23:59 +0200, Andrew Lunn wrote: > > I suppose that part would be pretty harmless, as you would likely > > want > > that behavior whenever that if condition was triggered. So > > m88e_finisar_config_init could likely be merged into > > m88e_config_init. > > I think so

Re: [PATCH] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode

2020-10-19 Thread Andrew Lunn
> > Hi Robert > > > > That looks like a layering violation. Maybe move this into > > phylink_mii_c22_pcs_config(), it is accessing MII_BMCR anyway. > > Could do - do we think there's any harm in just disabling BMCR_ISOLATE > in all cases in that function? We have something similar in phylib: /*

Re: [PATCH] SUNRPC: fix copying of multiple pages in gss_read_proxy_verf()

2020-10-19 Thread J. Bruce Fields
On Mon, Oct 19, 2020 at 03:46:39PM +, Martijn de Gouw wrote: > Hi > > On 19-10-2020 17:23, J. Bruce Fields wrote: > > On Mon, Oct 19, 2020 at 01:42:27PM +0200, Martijn de Gouw wrote: > >> When the passed token is longer than 4032 bytes, the remaining part > >> of the token must be copied from

Re: [PATCH net-next 2/2] net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY

2020-10-19 Thread Dan Murphy
Andrew On 10/19/20 4:55 PM, Andrew Lunn wrote: On Mon, Oct 19, 2020 at 04:33:18PM -0500, Dan Murphy wrote: Andrew On 10/16/20 5:02 PM, Andrew Lunn wrote: On Thu, Oct 08, 2020 at 11:23:47AM -0500, Dan Murphy wrote: The DP83TD510E is an ultra-low power Ethernet physical layer transceiver that

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Russell King - ARM Linux admin
On Mon, Oct 19, 2020 at 09:32:56PM +, Robert Hancock wrote: > On Mon, 2020-10-19 at 22:08 +0100, Russell King - ARM Linux admin > wrote: > > On Mon, Oct 19, 2020 at 02:49:13PM -0600, Robert Hancock wrote: > > > The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel > > > 81E PHY > >

Re: [PATCH net] vdpa/mlx5: Fix miss to set VIRTIO_NET_S_LINK_UP for virtio_net_config

2020-10-19 Thread Jakub Kicinski
On Mon, 19 Oct 2020 22:17:07 +0800 we...@ucloud.cn wrote: > From: wenxu > > Qemu get virtio_net_config from the vdpa driver. So The vdpa driver > should set the VIRTIO_NET_S_LINK_UP flag to virtio_net_config like > vdpa_sim. Or the link of virtio net NIC in the virtual machine will > never up. >

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Mon, 2020-10-19 at 23:45 +0200, Andrew Lunn wrote: > > I have a local patch that just falls back to trying 1000BaseX mode > > if the driver reports SGMII isn't supported and it seems like it > > might be a copper module, but that is a bit of a hack that may need > > to be handled differently. >

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
> I suppose that part would be pretty harmless, as you would likely want > that behavior whenever that if condition was triggered. So > m88e_finisar_config_init could likely be merged into > m88e_config_init. I think so as well. > Mainly what stopped me from making all of these changes ge

Re: [PATCH net-next 2/2] net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY

2020-10-19 Thread Andrew Lunn
On Mon, Oct 19, 2020 at 04:33:18PM -0500, Dan Murphy wrote: > Andrew > > On 10/16/20 5:02 PM, Andrew Lunn wrote: > > On Thu, Oct 08, 2020 at 11:23:47AM -0500, Dan Murphy wrote: > > > The DP83TD510E is an ultra-low power Ethernet physical layer transceiver > > > that supports 10M single pair cable.

  1   2   3   4   >