[PATCH net v2 0/2] net/iucv: fixes 2020-11-09

2020-11-08 Thread Julian Wiedmann
Hi Jakub, please apply the following patch series to netdev's net tree. One fix in the shutdown path for af_iucv sockets. This is relevant for stable as well. Also sending along an update for the Maintainers file. v1 -> v2: use the correct Fixes tag in patch 1 (Jakub) Thanks, Julian Ursula Bra

[PATCH net v2 2/2] MAINTAINERS: remove Ursula Braun as s390 network maintainer

2020-11-08 Thread Julian Wiedmann
From: Ursula Braun I am retiring soon. Thus this patch removes myself from the MAINTAINERS file (s390 network). Signed-off-by: Ursula Braun [jwi: fix up the subject] Signed-off-by: Julian Wiedmann --- MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS

[PATCH net v2 1/2] net/af_iucv: fix null pointer dereference on shutdown

2020-11-08 Thread Julian Wiedmann
From: Ursula Braun syzbot reported the following KASAN finding: BUG: KASAN: nullptr-dereference in iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385 Read of size 2 at addr 021e by task syz-executor907/519 CPU: 0 PID: 519 Comm: syz-executor907 Not tainted 5.9.0-syzkaller-07043-gbcf

Re: [PATCH net 1/2] net/af_iucv: fix null pointer dereference on shutdown

2020-11-08 Thread Julian Wiedmann
On 06.11.20 18:59, Jakub Kicinski wrote: > On Fri, 6 Nov 2020 13:50:07 +0100 Julian Wiedmann wrote: >> From: Ursula Braun >> >> syzbot reported the following KASAN finding: >> >> BUG: KASAN: nullptr-dereference in iucv_send_ctrl+0x390/0x3f0 >> net/iucv/af_iucv.c:385 >> Read of size 2 at addr 000

[net-next] netfiler: conntrack: Add the option to set ct tcp flag - BE_LIBERAL per-ct basis.

2020-11-08 Thread nusiddiq
From: Numan Siddique Before calling nf_conntrack_in(), caller can set this flag in the connection template for a tcp packet and any errors in the tcp_in_window() will be ignored. A helper function - nf_ct_set_tcp_be_liberal(nf_conn) is added which sets this flag for both the directions of the nf

[PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

2020-11-08 Thread Hangbin Liu
This is a preparation for later main libbpf support in iproute2. bpf.c is moved to bpf_legacy.c first. A new file bpf_glue.c is added which could call both legacy libbpf code. There are two wrapper functions added for ipvrf. Function bpf_prog_load() is removed as it's conflict with libbpf function

[PATCHv4 iproute2-next 3/5] lib: add libbpf support

2020-11-08 Thread Hangbin Liu
This patch converts iproute2 to use libbpf for loading and attaching BPF programs when it is available, which is started by Toke's implementation[1]. With libbpf iproute2 could correctly process BTF information and support the new-style BTF-defined maps, while keeping compatibility with the old int

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

2020-11-08 Thread Hangbin Liu
This series converts iproute2 to use libbpf for loading and attaching BPF programs when it is available. This means that iproute2 will correctly process BTF information and support the new-style BTF-defined maps, while keeping compatibility with the old internal map definition syntax. This is achi

[PATCHv4 iproute2-next 5/5] examples/bpf: add bpf examples with BTF defined maps

2020-11-08 Thread Hangbin Liu
Users should try use the new BTF defined maps instead of struct bpf_elf_map defined maps. The tail call examples are not added yet as libbpf doesn't currently support declaratively populating tail call maps. Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- examples/bpf/README

[PATCHv4 iproute2-next 4/5] examples/bpf: move struct bpf_elf_map defined maps to legacy folder

2020-11-08 Thread Hangbin Liu
Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- examples/bpf/README| 14 +- examples/bpf/{ => legacy}/bpf_cyclic.c | 2 +- examples/bpf/{ => legacy}/bpf_graft.c | 2 +- examples/bpf/{ => legacy}/bpf_map_in_map.c | 2 +- examples/

[PATCHv4 iproute2-next 1/5] configure: add check_libbpf() for later libbpf support

2020-11-08 Thread Hangbin Liu
This patch adds a check to see if we have libbpf support. By default the system libbpf will be used, but static linking against a custom libbpf version can be achieved by passing LIBBPF_DIR to configure. Add another variable LIBBPF_FORCE to control whether to build iproute2 with libbpf. If set to

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

2020-11-08 Thread kaixuxia
On 2020/11/8 16:20, Tariq Toukan wrote: > > > 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? Hi Tariq, The version is coccinelle-1.0.7. Thanks, Kaixu > >

[PATCH] net: sched: fix misspellings using misspell-fixer tool

2020-11-08 Thread menglong8 . dong
From: Menglong Dong Some typos are found out by misspell-fixer tool: $ misspell-fixer -rnv ./net/sched/ ./net/sched/act_api.c:686 ./net/sched/act_bpf.c:68 ./net/sched/cls_rsvp.h:241 ./net/sched/em_cmp.c:44 ./net/sched/sch_pie.c:408 Fix typos found by misspell-fixer. Signed-off-by: Menglong Don

[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/

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

[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] 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

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 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

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

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

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

[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 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 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

[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 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 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 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 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 ++

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

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

答复: [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

[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 --

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

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 > >

[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: [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

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: [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: [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: [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 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: 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

[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

[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

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 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

[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 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 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

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

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 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

[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] 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 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: [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 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:

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

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:

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 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

[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

[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 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 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 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 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 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 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

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 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: [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] 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

[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:

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

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 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.

[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 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 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

[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

  1   2   >