Re: [PATCH] net/mlx4: Assign boolean values to a bool variable

2020-11-08 Thread Tariq Toukan
On 11/7/2020 8:53 AM, xiakaixu1...@gmail.com wrote: From: Kaixu Xia Fix the following coccinelle warnings: Hi Kaixu, Which coccinelle version gave this warning? ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Tosk Robot

Re: [PATCH v2] lan743x: correctly handle chips with internal PHY

2020-11-08 Thread Roelof Berg
My last customer has a fixed link setup, contact me if you need one. Maybe they let me have it and I can test all future patches on fixed link as well. I tested the current driver version on a Lan7430 EVM in a PC by the way and it seemed to be working. I have the EVM still here if needed. Greet

[PATCH v2] can: flexcan: fix reference count leak in flexcan ops

2020-11-08 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference

Re: [RFC net-next 00/28] ndo_ioctl rework

2020-11-08 Thread Arnd Bergmann
On Sun, Nov 8, 2020 at 1:06 AM Jakub Kicinski wrote: > > On Fri, 6 Nov 2020 23:17:15 +0100 Arnd Bergmann wrote: > > Any suggestions on how to proceed? I think the ndo_siocdevprivate > > change is the most interesting here, and I would like to get > > that merged. > > Splitting out / eliminating i

Re: [PATCH net-next RFC v1 06/10] nvme-tcp: Add DDP data-path

2020-11-08 Thread Boris Pismenny
On 09/10/2020 1:29, Sagi Grimberg wrote: > >> static int nvme_tcp_recv_data(struct nvme_tcp_queue *queue, struct sk_buff >> *skb, >> @@ -1115,6 +1222,7 @@ static int nvme_tcp_try_send_cmd_pdu(struct >> nvme_tcp_request *req) >> bool inline_data = nvme_tcp_has_inline_data(req); >> u

[PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-11-08 Thread Joe Perches
On Sun, 2020-11-08 at 08:34 +0100, Lukas Bulwahn wrote: > On Sat, 7 Nov 2020, Joe Perches wrote: > > On Fri, 2020-11-06 at 23:55 -0800, Nick Desaulniers wrote: > > > Clang is more aggressive about -Wformat warnings when the format flag > > > specifies a type smaller than the parameter. Fixes 8 inst

Re: [RFC net-next 00/28] ndo_ioctl rework

2020-11-08 Thread Kalle Valo
Jakub Kicinski writes: >> For the wireless drivers, removing the old drivers >> instead of just the dead code might be an alternative, depending >> on whether anyone thinks there might still be users. > > Dunno if you want to dig into removal with a series like this, > anything using ioctls will

Re: [PATCH 1/2] mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure

2020-11-08 Thread Kalle Valo
Tsuchiya Yuto writes: > When FLR is performed but without fw reset for some reasons (e.g. on > Surface devices, fw reset requires another quirk), it fails to reset > properly. You can trigger the issue on such devices via debugfs entry > for reset: > > $ echo 1 | sudo tee /sys/kernel/debug/mw

Re: [RFC net-next 00/28] ndo_ioctl rework

2020-11-08 Thread Arnd Bergmann
On Sun, Nov 8, 2020 at 12:21 PM Kalle Valo wrote: > Jakub Kicinski writes: > > So I don't know what to do. Should we try adding a warning like below? :) > > "This ancient driver will be removed from the kernel in 2022, but if >it still works send report to <...@...> to avoid the removal." >

[PATCH] net: pch_gbe: remove unneeded variable retval in __pch_gbe_suspend

2020-11-08 Thread xiakaixu1987
From: Kaixu Xia Fix the following coccicheck warning: ./drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2415:5-11: Unneeded variable: "retval". Return "0" on line 2435 Reported-by: Tosk Robot Signed-off-by: Kaixu Xia --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 3 +-- 1 f

Re: [PATCH 1/2] mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure

2020-11-08 Thread Tsuchiya Yuto
On Sun, 2020-11-08 at 13:31 +0200, Kalle Valo wrote: > Tsuchiya Yuto writes: > > > When FLR is performed but without fw reset for some reasons (e.g. on > > Surface devices, fw reset requires another quirk), it fails to reset > > properly. You can trigger the issue on such devices via debugfs entr

RE: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-08 Thread David Laight
From: Andrew Lunn > Sent: 07 November 2020 22:33 > > On Sat, Nov 07, 2020 at 09:39:42AM -0800, Joe Perches wrote: > > On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > > > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > > > It is good to remember that there are multiple readers of source > > >

[RFC PATCH net-next 0/3] Offload learnt bridge addresses to DSA

2020-11-08 Thread Vladimir Oltean
This small series tries to make DSA behave a bit more sanely when bridged with "foreign" (non-DSA) interfaces. When a station A connected to a DSA switch port needs to talk to another station B connected to a non-DSA port through the Linux bridge, DSA must explicitly add a route for station B towar

[RFC PATCH net-next 1/3] net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work

2020-11-08 Thread Vladimir Oltean
Currently DSA doesn't add FDB entries on the CPU port, because it only does so through switchdev events added_by_user and associated with a DSA net_device, and there are none of those for the CPU port. But actually FDB entries towards the CPU port make sense for some use cases where certain addres

[RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread Vladimir Oltean
Some DSA switches (and not only) cannot learn source MAC addresses from packets injected from the CPU. They only perform hardware address learning from inbound traffic. This can be problematic when we have a bridge spanning some DSA switch ports and some non-DSA ports (which we'll call "foreign in

[RFC PATCH net-next 2/3] net: dsa: move switchdev event implementation under the same switch/case statement

2020-11-08 Thread Vladimir Oltean
We'll need to start listening to SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE events even for interfaces where dsa_slave_dev_check returns false, so we need that check inside the switch-case statement for SWITCHDEV_FDB_*. This movement also avoids two useless allocation / free paths for switchdev_work, which

Re: [PATCH v2] lan743x: correctly handle chips with internal PHY

2020-11-08 Thread Sven Van Asbroeck
On Sat, Nov 7, 2020 at 11:14 PM Andrew Lunn wrote: > > This also has nothing to do with the problem you are fixing. It is a > sensible thing to do, but it should be a separate patch, and target > net-next, since it is not a fix. > Agreed - I will spin a truly minimal v3.

Re: [PATCH v2] lan743x: correctly handle chips with internal PHY

2020-11-08 Thread Sven Van Asbroeck
Hi Roelof, great to meet another user of the lan743x ! On Sun, Nov 8, 2020 at 2:43 AM Roelof Berg wrote: > > My last customer has a fixed link setup, contact me if you need one. Maybe > they let me have it and I can test all future patches on fixed link as well. Is this a commercially available

Re: [PATCH net-next RFC v1 06/10] nvme-tcp: Add DDP data-path

2020-11-08 Thread Boris Pismenny
On 09/10/2020 2:00, Sagi Grimberg wrote: >>>   static >>>   int nvme_tcp_offload_socket(struct nvme_tcp_queue *queue, >>>   struct nvme_tcp_config *config) >>> @@ -630,6 +720,7 @@ static void nvme_tcp_error_recovery(struct >>> nvme_ctrl *ctrl) >>>   static int nvme_tcp_process_n

[PATCH v3] lan743x: correctly handle chips with internal PHY

2020-11-08 Thread Sven Van Asbroeck
From: Sven Van Asbroeck Commit 6f197fb63850 ("lan743x: Added fixed link and RGMII support") assumes that chips with an internal PHY will never have a devicetree entry. This is incorrect: even for these chips, a devicetree entry can be useful e.g. to pass the mac address from bootloader to chip:

[PATCH] netlabel: fix our progress tracking in netlbl_unlabel_staticlist()

2020-11-08 Thread Paul Moore
The current NetLabel code doesn't correctly keep track of the netlink dump state in some cases, in particular when multiple interfaces with large configurations are loaded. The problem manifests itself by not reporting the full configuration to userspace, even though it is loaded and active in the

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread DENG Qingfang
On Sun, Nov 8, 2020 at 9:20 PM Vladimir Oltean wrote: > > Some DSA switches (and not only) cannot learn source MAC addresses from > packets injected from the CPU. They only perform hardware address > learning from inbound traffic. > > This can be problematic when we have a bridge spanning some DSA

[PATCH net V2] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-08 Thread Tariq Toukan
With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Fixes: 2342a8512a1e ("net: Add TLS TX offload features") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- Documentation/networking/tls-offload.rst | 4 net/core/dev.c

Re: [PATCH net-next RFC v1 07/10] nvme-tcp : Recalculate crc in the end of the capsule

2020-11-08 Thread Boris Pismenny
On 09/10/2020 1:44, Sagi Grimberg wrote: >> crc offload of the nvme capsule. Check if all the skb bits >> are on, and if not recalculate the crc in SW and check it. > Can you clarify in the patch description that this is only > for pdu data digest and not header digest? Will do > >> This patch

[PATCH iproute2-next v3 03/11] lib: json_print: Add print_on_off()

2020-11-08 Thread Petr Machata
The value of a number of booleans is shown as "on" and "off" in the plain output, and as an actual boolean in JSON mode. Add a function that does that. RDMA tool already uses a function named print_on_off(). This function always shows "on" and "off", even in JSON mode. Since there are probably ver

[PATCH iproute2-next v3 04/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_open()

2020-11-08 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 --- Notes: v2: - Add SPDX-License-Identifier devlink/Makefile| 2 +-

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

2020-11-08 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 v3 00/11] Add a tool for configuration of DCB

2020-11-08 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 v3 05/11] lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare()

2020-11-08 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 v3 07/11] lib: Extract from iplink_vlan a helper to parse key:value arrays

2020-11-08 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 v3 08/11] lib: parse_mapping: Update argc, argv on error

2020-11-08 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 v3 11/11] dcb: Add a subtool for the DCB ETS object

2020-11-08 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

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

2020-11-08 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 v3 10/11] Add skeleton of a new tool, dcb

2020-11-08 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 v3 06/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_recv_run()

2020-11-08 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 v3 09/11] lib: parse_mapping: Recognize a keyword "all"

2020-11-08 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

Re: [PATCH net] net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled

2020-11-08 Thread Tariq Toukan
On 11/5/2020 6:00 PM, Jakub Kicinski wrote: On Thu, 5 Nov 2020 15:22:53 +0200 Tariq Toukan wrote: On 11/4/2020 11:25 PM, Jakub Kicinski wrote: On Wed, 4 Nov 2020 12:21:41 +0200 Tariq Toukan wrote: With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSU

Re: [PATCH v3] lan743x: correctly handle chips with internal PHY

2020-11-08 Thread Andrew Lunn
On Sun, Nov 08, 2020 at 09:06:53AM -0500, Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > Commit 6f197fb63850 ("lan743x: Added fixed link and RGMII support") > assumes that chips with an internal PHY will never have a devicetree > entry. This is incorrect: even for these chips, a devicetre

Re: [PATCH v2 20/39] docs: ABI: testing: make the files compatible with ReST output

2020-11-08 Thread Jonathan Cameron
On Mon, 2 Nov 2020 15:42:50 +0100 Mauro Carvalho Chehab wrote: > Em Mon, 2 Nov 2020 13:46:41 +0100 > Greg Kroah-Hartman escreveu: > > > On Mon, Nov 02, 2020 at 12:04:36PM +0100, Fabrice Gasnier wrote: > > > On 10/30/20 11:09 AM, Mauro Carvalho Chehab wrote: > > > > Em Fri, 30 Oct 2020 10:

MSG_ZEROCOPY_FIXED

2020-11-08 Thread Victor Stewart
hi all, i'm seeking input / comment on the idea of implementing full fledged zerocopy UDP networking that uses persistent buffers allocated in userspace... before I go off on a solo tangent with my first patches lol. i'm sure there's been lots of thought/discussion on this before. of course Wille

[PATCH net v4] lan743x: correctly handle chips with internal PHY

2020-11-08 Thread Sven Van Asbroeck
From: Sven Van Asbroeck Commit 6f197fb63850 ("lan743x: Added fixed link and RGMII support") assumes that chips with an internal PHY will never have a devicetree entry. This is incorrect: even for these chips, a devicetree entry can be useful e.g. to pass the mac address from bootloader to chip:

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread Vladimir Oltean
On Sun, Nov 08, 2020 at 10:09:25PM +0800, DENG Qingfang wrote: > Can it be turned off for switches that support SA learning from CPU? Is there a good reason I would add another property per switch and not just do it unconditionally?

[PATCH iproute2] man: fix spelling errors

2020-11-08 Thread Stephen Hemminger
Lots of little typo errors on man pages. Found by running codespell Signed-off-by: Stephen Hemminger --- man/man8/ip-link.8.in| 8 man/man8/ip-macsec.8 | 2 +- man/man8/ip-neighbour.8 | 6 +++--- man/man8/ss.8| 2 +- man/man8/tc-cake.8 | 4 ++-- man/man8/tc-ct

Re: [PATCH iproute2] tc-vlan: fix help and error message strings

2020-11-08 Thread Stephen Hemminger
On Mon, 2 Nov 2020 11:59:46 +0100 Guillaume Nault wrote: > * "vlan pop" can be followed by a CONTROL keyword. > > * Add missing space in error message. > > Signed-off-by: Guillaume Nault Applied, thanks

[PATCH net] mptcp: provide rmem[0] limit

2020-11-08 Thread Paolo Abeni
The mptcp proto struct currently does not provide the required limit for forward memory scheduling. Under pressure sk_rmem_schedule() will unconditionally try to use such field and will oops. Address the issue inheriting the tcp limit, as we already do for the wmem one. Fixes: ("mptcp: add missin

Re: [PATCH iproute2] man: fix spelling errors

2020-11-08 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to iproute2/iproute2.git (refs/heads/main): On Sun, 8 Nov 2020 10:42:03 -0800 you wrote: > Lots of little typo errors on man pages. > Found by running codespell > > Signed-off-by: Stephen Hemminger > --- > man/man8/ip-link.8.in| 8 > man/man8/ip-macs

Re: [PATCH] mac80211: fix regression where EAPOL frames were sent in plaintext

2020-11-08 Thread Thomas Deutschmann
Hi, On 2020-10-19 18:01, Mathy Vanhoef wrote: When sending EAPOL frames via NL80211 they are treated as injected frames in mac80211. Due to commit 1df2bdba528b ("mac80211: never drop injected frames even if normally not allowed") these injected frames were not assigned a sta context in the funct

Re: [PATCH] mac80211: fix regression where EAPOL frames were sent in plaintext

2020-11-08 Thread Johannes Berg
On Sun, 2020-11-08 at 20:34 +0100, Thomas Deutschmann wrote: > > > Can we please get this applied to linux-5.10 and linux-5.9? It's tagged for that, so once it enters mainline will get picked up. Should be soon now, I assume. johannes

[PATCH iproute2-next v4 08/11] lib: parse_mapping: Update argc, argv on error

2020-11-08 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 v4 11/11] dcb: Add a subtool for the DCB ETS object

2020-11-08 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

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

2020-11-08 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 v4 10/11] Add skeleton of a new tool, dcb

2020-11-08 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 v4 06/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_recv_run()

2020-11-08 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 v4 03/11] lib: json_print: Add print_on_off()

2020-11-08 Thread Petr Machata
The value of a number of booleans is shown as "on" and "off" in the plain output, and as an actual boolean in JSON mode. Add a function that does that. RDMA tool already uses a function named print_on_off(). This function always shows "on" and "off", even in JSON mode. Since there are probably ver

[PATCH iproute2-next v4 09/11] lib: parse_mapping: Recognize a keyword "all"

2020-11-08 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 v4 00/11] Add a tool for configuration of DCB

2020-11-08 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 v4 07/11] lib: Extract from iplink_vlan a helper to parse key:value arrays

2020-11-08 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 v4 04/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_open()

2020-11-08 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 --- Notes: v2: - Add SPDX-License-Identifier devlink/Makefile| 2 +-

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

2020-11-08 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 v4 05/11] lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare()

2020-11-08 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

Re: [PATCH v2] net: bonding: alb disable balance for IPv6 multicast related mac

2020-11-08 Thread Jay Vosburgh
Jakub Kicinski wrote: >On Tue, 3 Nov 2020 13:05:59 -0800 Jakub Kicinski wrote: >> On Mon, 2 Nov 2020 15:56:43 +0800 LIU Yulong wrote: >> > According to the RFC 2464 [1] the prefix "33:33:xx:xx:xx:xx" is defined to >> > construct the multicast destination MAC address for IPv6 multicast traffic. >

[PATCH net] net: phy: realtek: support paged operations on RTL8201CP

2020-11-08 Thread Heiner Kallweit
The RTL8401-internal PHY identifies as RTL8201CP, and the init sequence in r8169, copied from vendor driver r8168, uses paged operations. Therefore set the same paged operation callbacks as for the other Realtek PHY's. Fixes: cdafdc29ef75 ("r8169: sync support for RTL8401 with vendor driver") Sign

[PATCH net-next] net: dsa: mv88e6xxx: 6352: parse VTU data before loading STU data

2020-11-08 Thread Tobias Waldekranz
On the 6352, doing a VTU GetNext op, followed by an STU GetNext op will leave you with both the member- and state- data in the VTU/STU data registers. But on the 6097 (which uses the same implementation), the STU GetNext will override the information gathered from the VTU GetNext. Separate the two

Re: BUG: corrupted list in kobject_add_internal

2020-11-08 Thread syzbot
syzbot suspects this issue was fixed by commit: commit a46b7ed4d52d09bd6c7ab53b2217d04fc2f02c65 Author: Sonny Sasaka Date: Fri Aug 14 19:09:09 2020 + Bluetooth: Fix auto-creation of hci_conn at Conn Complete event bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13d7579250

Re: [RFC PATCH net-next 1/3] net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work

2020-11-08 Thread Vladimir Oltean
On Sun, Nov 08, 2020 at 03:19:51PM +0200, Vladimir Oltean wrote: > diff --git a/net/dsa/slave.c b/net/dsa/slave.c > index 59c80052e950..30db8230e30b 100644 > --- a/net/dsa/slave.c > +++ b/net/dsa/slave.c > @@ -2062,72 +2062,62 @@ static int dsa_slave_netdevice_event(struct > notifier_block *nb, >

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread Andrew Lunn
On Sun, Nov 08, 2020 at 07:23:55PM +0200, Vladimir Oltean wrote: > On Sun, Nov 08, 2020 at 10:09:25PM +0800, DENG Qingfang wrote: > > Can it be turned off for switches that support SA learning from CPU? > > Is there a good reason I would add another property per switch and not > just do it uncondi

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 12:59:39AM +0100, Andrew Lunn wrote: > On Sun, Nov 08, 2020 at 07:23:55PM +0200, Vladimir Oltean wrote: > > On Sun, Nov 08, 2020 at 10:09:25PM +0800, DENG Qingfang wrote: > > > Can it be turned off for switches that support SA learning from CPU? > > > > Is there a good reas

Re: [PATCH net-next 02/11] net: hns3: add support for 1us unit GL configuration

2020-11-08 Thread tanhuazhong
On 2020/11/8 1:46, Jakub Kicinski wrote: On Sat, 7 Nov 2020 14:31:12 +0800 Huazhong Tan wrote: For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan Doesn't build. drivers/net/et

Re: [PATCH net-next 10/11] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-08 Thread tanhuazhong
On 2020/11/8 1:47, Jakub Kicinski wrote: On Sat, 7 Nov 2020 14:31:20 +0800 Huazhong Tan wrote: +static void hns3_update_cqe_mode(struct net_device *netdev, bool enable, bool is_tx) Wrap this to 80 characters, please. Will fix it. Thanks .

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread Andrew Lunn
> > We also need to make sure the static entries get removed correctly > > when a host moves. The mv88e6xxx will not replace a static entry with > > a dynamically learned one. It will probably rise an ATU violation > > interrupt that frames have come in the wrong port. > > This is a good one. Curr

[PATCH net-next] net: phy: microchip_t1: Don't set .config_aneg

2020-11-08 Thread Jisheng Zhang
The .config_aneg in microchip_t1 is genphy_config_aneg, so it's not needed, because the phy core will call genphy_config_aneg() if the .config_aneg is NULL. Signed-off-by: Jisheng Zhang --- drivers/net/phy/microchip_t1.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/phy/microchi

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-08 Thread Alexei Starovoitov
On Fri, Nov 06, 2020 at 04:38:13PM -0700, David Ahern wrote: > On 11/6/20 4:25 PM, Stephen Hemminger wrote: > >> > >> I think bumping the minimal version of libbpf with every iproute2 release > >> is necessary as well. > >> Today iproute2-next should require 0.2.0. The cycle after it should be > >

RE: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Andy Duan
From: Zhang Qilong Sent: Sunday, November 8, 2020 5:53 PM > pm_runtime_get_sync() will increment pm usage at first and it will resume the > device later. If runtime of the device has error or device is in inaccessible > state(or other error state), resume operation will fail. If we do not call pu

[PATCH V3 net] net/ethernet: Fix error return when ptp_clock is ERROR

2020-11-08 Thread Wang Qing
We always have to update the value of ret, otherwise the error value may be the previous one. And ptp_clock_register() never return NULL when PTP_1588_CLOCK enable. Signed-off-by: Wang Qing --- drivers/net/ethernet/ti/am65-cpts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

答复: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread zhangqilong
> From: Zhang Qilong Sent: Sunday, November 8, > 2020 5:53 PM > > pm_runtime_get_sync() will increment pm usage at first and it will > > resume the device later. If runtime of the device has error or device > > is in inaccessible state(or other error state), resume operation will > > fail. If we d

Re: [PATCHv2 net 1/2] selftest/bpf: add missed ip6ip6 test back

2020-11-08 Thread Hangbin Liu
On Fri, Nov 06, 2020 at 06:15:44PM -0800, Martin KaFai Lau wrote: > > - if (iph->nexthdr == 58 /* NEXTHDR_ICMP */) { > Same here. Can this check be kept? Hi Martin, I'm OK to keep the checking, then what about _ipip6_set_tunnel()? It also doesn't have the ICMP checking. Thanks Hangbin

RE: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Andy Duan
From: zhangqilong ent: Monday, November 9, 2020 10:52 AM > > From: Zhang Qilong Sent: Sunday, November 8, > > 2020 5:53 PM > > > pm_runtime_get_sync() will increment pm usage at first and it will > > > resume the device later. If runtime of the device has error or > > > device is in inaccessible

[PATCH V2 net-next 07/11] net: hns3: add hns3_state_init() to do state initialization

2020-11-08 Thread Huazhong Tan
To improve the readability and maintainability, add hns3_state_init() to initialize the state. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/h

[PATCH V2 net-next 06/11] net: hns3: add ethtool priv-flag for DIM

2020-11-08 Thread Huazhong Tan
Add a control private flag in ethtool for enable/disable DIM feature. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 71 ++

[PATCH V2 net-next 02/11] net: hns3: add support for querying maximum value of GL

2020-11-08 Thread Huazhong Tan
For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_en

[PATCH V2 net-next 11/11] net: hns3: add debugfs support for interrupt coalesce

2020-11-08 Thread Huazhong Tan
Since user may need to check the current configuration of the interrupt coalesce, so add debugfs support for query this info, which includes DIM profile, coalesce configuration of both software and hardware. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 126

[PATCH V2 net-next 10/11] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-08 Thread Huazhong Tan
Add a control private flag in ethtool for switching EQ/CQ mode. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 19 +++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2 ++ drive

[PATCH V2 net-next 05/11] net: hns3: add support for dynamic interrupt moderation

2020-11-08 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 87 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 4 ++ 3 files c

[PATCH V2 net-next 08/11] net: hns3: add a check for ethtool priv-flag interface

2020-11-08 Thread Huazhong Tan
Add a check for hns3_set_priv_flags() since if the capability is unsupported its private flags should not be modified as well. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/etherne

[PATCH V2 net-next 09/11] net: hns3: add support for EQ/CQ mode configuration

2020-11-08 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL can select EQ or CQ mode, so adds support for it. In CQ mode, the coalesced timer will restart upon new completion, while in EQ mode, the timer will not restart. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h

[PATCH V2 net-next 03/11] net: hns3: add support for 1us unit GL configuration

2020-11-08 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 26 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[PATCH V2 net-next 04/11] net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce

2020-11-08 Thread Huazhong Tan
Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 12 ++-- drivers/net/ethernet/hi

[PATCH V2 net-next 01/11] net: hns3: add support for configuring interrupt quantity limiting

2020-11-08 Thread Huazhong Tan
QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong

[PATCH V2 net-next 00/11] net: hns3: updates for -next

2020-11-08 Thread Huazhong Tan
There are several updates relating to the interrupt coalesce for the HNS3 ethernet driver. #1 adds support for QL(quantity limiting, interrupt coalesce based on the frame quantity). #2 queries the maximum value of GL from the firmware instead of a fixed value in code. #3 adds support for 1us

Re: [PATCH 2/2] selftests: pmtu.sh: improve the test result processing

2020-11-08 Thread Po-Hsu Lin
On Sun, Nov 8, 2020 at 7:02 AM Jakub Kicinski wrote: > > On Thu, 5 Nov 2020 18:50:51 +0800 Po-Hsu Lin wrote: > > This test will treat all non-zero return codes as failures, it will > > make the pmtu.sh test script being marked as FAILED when some > > sub-test got skipped. > > > > Improve the resu

[PATCH net V2] Exempt multicast addresses from five-second neighbor lifetime

2020-11-08 Thread Jeff Dike
Commit 58956317c8de ("neighbor: Improve garbage collection") guarantees neighbour table entries a five-second lifetime. Processes which make heavy use of multicast can fill the neighour table with multicast addresses in five seconds. At that point, neighbour entries can't be GC-ed because they ar

Re: [PATCH iproute2-next v4 03/11] lib: json_print: Add print_on_off()

2020-11-08 Thread Leon Romanovsky
On Sun, Nov 08, 2020 at 10:14:08PM +0100, Petr Machata wrote: > The value of a number of booleans is shown as "on" and "off" in the plain > output, and as an actual boolean in JSON mode. Add a function that does > that. > > RDMA tool already uses a function named print_on_off(). This function > alw

В вашей учетной записи была обнаружена необычная активность, пожалуйста, подтвердите свою учетную запись, чтобы получать ожидающую входящую почту

2020-11-08 Thread Afiq Farhan b. Azli
ВЕРИФИКАЦИЯ УЧЕТНОЙ ЗАПИСИ Уважаемый пользователь веб-почты, Мы заметили необычную активность в вашей учетной записи электронной почты, и в ближайшие 24 часа ваша учетная запись будет временно заблокирована для защиты вашей учетной записи электронной почты. Это может быть связано с тем, что к

Re: [PATCH bpf] libbpf: don't attempt to load unused subprog as an entry-point BPF program

2020-11-08 Thread Yonghong Song
On 11/6/20 4:02 PM, Andrii Nakryiko wrote: If BPF code contains unused BPF subprogram and there are no other subprogram calls (which can realistically happen in real-world applications given sufficiently smart Clang code optimizations), libbpf will erroneously assume that subprograms are entry

Re: [net-next v4 0/8]net: convert tasklets to use new tasklet_setup API

2020-11-08 Thread Allen Pais
Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the net/* drivers to use the new tasklet_setup() API The following series is based on net-next (9faebeb2d) Hi Aleen! I applied everything but the RDS patch

RE: [PATCH] samples/bpf: remove duplicate include

2020-11-08 Thread John Fastabend
menglong8.dong@ wrote: > From: Menglong Dong > > Obviously, 'bpf/bpf.h' in 'samples/bpf/hbm.c' is duplicated. > > Signed-off-by: Menglong Dong > --- Acked-by: John Fastabend

[RESEND PATCH v2] net/x25: Fix null-ptr-deref in x25_connect

2020-11-08 Thread Martin Schiller
This fixes a regression for blocking connects introduced by commit 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect"). The x25->neighbour is already set to "NULL" by x25_disconnect() now, while a blocking connect is waiting in x25_wait_for_connection_establishment(). Therefore

RE: [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress

2020-11-08 Thread John Fastabend
Martin KaFai Lau wrote: > Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test > are not using static scope. This patch fixes it. > > Targeting bpf-next branch as an improvement since it currently does not > break the build. > > Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header o

[PATCH bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-08 Thread Wang Hai
progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, it should be closed. Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on interface") Signed-off-by: Wang Hai --- tools/bpf/bpftool/net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/

  1   2   >