[PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-07-30 Thread Zhu Lingshan
This commit introduces struct vhost_vring_call which replaced raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. Besides eventfd_ctx, it contains a spin lock and an irq_bypass_producer in its structure. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang --- drivers/vhost/vdpa.c | 4

[PATCH net-next] ip_vti: Fix unused variable warning

2020-07-30 Thread YueHaibing
If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n, net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable] Signed-off-by: YueHaibing --- net/ipv4/ip_vti.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c in

[PATCH net 2/5] fsl/fman: fix dereference null return value

2020-07-30 Thread Florinel Iordache
Check before using returned value to avoid dereferencing null pointer. Fixes: 18a6c85f ("fsl/fman: Add FMan Port Support") Signed-off-by: Florinel Iordache --- drivers/net/ethernet/freescale/fman/fman_port.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH net 1/5] fsl/fman: use 32-bit unsigned integer

2020-07-30 Thread Florinel Iordache
Potentially overflowing expression (ts_freq << 16 and intgr << 16) declared as type u32 (32-bit unsigned) is evaluated using 32-bit arithmetic and then used in a context that expects an expression of type u64 (64-bit unsigned) which ultimately is used as 16-bit unsigned by typecasting to u16. Fixed

[PATCH net 3/5] fsl/fman: fix unreachable code

2020-07-30 Thread Florinel Iordache
The parameter 'priority' is incorrectly forced to zero which ultimately induces logically dead code in the subsequent lines. Fixes: 57ba4c9b ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache --- drivers/net/ethernet/freescale/fman/fman_memac.c | 1 - 1 file changed, 1 deletion

[PATCH net 0/5] DPAA FMan driver fixes

2020-07-30 Thread Florinel Iordache
Here are several fixes for the DPAA FMan driver. Florinel Iordache (5): fsl/fman: use 32-bit unsigned integer fsl/fman: fix dereference null return value fsl/fman: fix unreachable code fsl/fman: check dereferencing null pointer fsl/fman: fix eth hash table allocation drivers/net/ethern

[PATCH net 5/5] fsl/fman: fix eth hash table allocation

2020-07-30 Thread Florinel Iordache
Fix memory allocation for ethernet address hash table. The code was wrongly allocating an array for eth hash table which is incorrect because this is the main structure for eth hash table (struct eth_hash_t) that contains inside a number of elements. Fixes: 57ba4c9b ("fsl/fman: Add FMan MAC suppor

[PATCH net 4/5] fsl/fman: check dereferencing null pointer

2020-07-30 Thread Florinel Iordache
Add a safe check to avoid dereferencing null pointer Fixes: 57ba4c9b ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache --- drivers/net/ethernet/freescale/fman/fman_dtsec.c | 4 ++-- drivers/net/ethernet/freescale/fman/fman_memac.c | 3 ++- drivers/net/ethernet/freescale/fman/f

RE: [PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-07-30 Thread Yoshihiro Shimoda
Hello! > From: Sergei Shtylyov, Sent: Friday, July 31, 2020 1:24 AM > > Hello! > > On 7/30/20 2:37 PM, Yoshihiro Shimoda wrote: > > >> From: Yuusuke Ashizuka, Sent: Thursday, July 30, 2020 7:02 PM > >> Subject: [PATCH v2] ravb: Fixed the problem that rmmod can not be done > > > > Thank you for

[PATCH bpf-next] bpf: fix compilation warning of selftests

2020-07-30 Thread Jianlin Lv
Clang compiler version: 12.0.0 The following warning appears during the selftests/bpf compilation: prog_tests/send_signal.c:51:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] 51 | write(pipe_c2p[1], buf, 1); | ^~~~

[PATCH v4 net-next 09/10] qed: align adjacent indent

2020-07-30 Thread Igor Russkikh
Fix indent on some of adjacent declarations. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- include/linux/qed/qed_if.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/qed/qed_if.h b/include/linux/qed

[PATCH v4 net-next 01/10] qed: move out devlink logic into a new file

2020-07-30 Thread Igor Russkikh
We are extending devlink infrastructure, thus move the existing stuff into a new file qed_devlink.c Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed_devlin

[PATCH v4 net-next 00/10] qed: introduce devlink health support

2020-07-30 Thread Igor Russkikh
This is a followup implementation after series https://patchwork.ozlabs.org/project/netdev/cover/20200514095727.1361-1-irussk...@marvell.com/ This is an implementation of devlink health infrastructure. With this we are now able to report HW errors to devlink, and it'll take its own actions depen

[PATCH v4 net-next 03/10] qed: fix kconfig help entries

2020-07-30 Thread Igor Russkikh
This patch replaces stubs in kconfig help entries with an actual description. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/ne

[PATCH v4 net-next 05/10] qed: health reporter init deinit seq

2020-07-30 Thread Igor Russkikh
Here we declare health reporter ops (empty for now) and register these in qed probe and remove callbacks. This way we get devlink attached to all kind of qed* PCI device entities: networking or storage offload entity. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by:

[PATCH v4 net-next 10/10] qede: make driver reliable on unload after failures

2020-07-30 Thread Igor Russkikh
In case recovery was not successful, netdev still should be present. But we should clear cdev if something bad happens on recovery. We also check cdev for null on dev close. That could be a case if recovery was not successful. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed

[PATCH v4 net-next 08/10] qed: implement devlink dump

2020-07-30 Thread Igor Russkikh
Gather and push out full device dump to devlink. Device dump is the same as with `ethtool -d`, but now its generated exactly at the moment bad thing happens. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/qed_dev

[PATCH v4 net-next 07/10] qed*: make use of devlink recovery infrastructure

2020-07-30 Thread Igor Russkikh
Remove forcible recovery trigger and put it as a normal devlink callback. This allows user to enable/disable it via devlink health set pci/:03:00.0 reporter fw_fatal auto_recover false Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- dr

[PATCH v4 net-next 06/10] qed: use devlink logic to report errors

2020-07-30 Thread Igor Russkikh
Use devlink_health_report to push error indications. We implement this in qede via callback function to make it possible to reuse the same for other drivers sitting on top of qed in future. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers

[PATCH v4 net-next 02/10] qed/qede: make devlink survive recovery

2020-07-30 Thread Igor Russkikh
Devlink instance lifecycle was linked to qed_dev object, that caused devlink to be recreated on each recovery. Changing it by making higher level driver (qede) responsible for its life. This way devlink now survives recoveries. qede now stores devlink structure pointer as a part of its device obj

[PATCH v4 net-next 04/10] qed: implement devlink info request

2020-07-30 Thread Igor Russkikh
Here we return existing fw & mfw versions, we also fetch device's serial number. The base device specific structure (qed_dev_info) was not directly available to the base driver before. Thus, here we create and store a private copy of this structure in qed_dev root object. Signed-off-by: Igor Russ

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-30 Thread Greg Kroah-Hartman
On Fri, Jul 31, 2020 at 07:33:06AM +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 31, 2020 at 07:53:01AM +0300, Leon Romanovsky wrote: > > On Thu, Jul 30, 2020 at 03:20:26PM -0400, Peilin Ye wrote: > > > rds_notify_queue_get() is potentially copying uninitialized kernel stack > > > memory to usersp

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-30 Thread Greg Kroah-Hartman
On Fri, Jul 31, 2020 at 07:53:01AM +0300, Leon Romanovsky wrote: > On Thu, Jul 30, 2020 at 03:20:26PM -0400, Peilin Ye wrote: > > rds_notify_queue_get() is potentially copying uninitialized kernel stack > > memory to userspace since the compiler may leave a 4-byte hole at the end > > of `cmsg`. > >

[PATCH] [net/ethtool] ethnl_set_linkmodes: remove redundant null check

2020-07-30 Thread Gaurav Singh
info cannot be NULL here since its being accessed earlier in the function: nlmsg_parse(info->nlhdr...). Remove this redundant NULL check. Signed-off-by: Gaurav Singh --- net/ethtool/linkmodes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ethtool/linkmodes.c b/net/et

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-30 Thread Leon Romanovsky
On Thu, Jul 30, 2020 at 03:20:26PM -0400, Peilin Ye wrote: > rds_notify_queue_get() is potentially copying uninitialized kernel stack > memory to userspace since the compiler may leave a 4-byte hole at the end > of `cmsg`. > > In 2016 we tried to fix this issue by doing `= { 0 };` on `cmsg`, which

[Linux-kernel-mentees] [PATCH net] openvswitch: Prevent kernel-infoleak in ovs_ct_put_key()

2020-07-30 Thread Peilin Ye
ovs_ct_put_key() is potentially copying uninitialized kernel stack memory into socket buffers, since the compiler may leave a 3-byte hole at the end of `struct ovs_key_ct_tuple_ipv4` and `struct ovs_key_ct_tuple_ipv6`. Fix it by initializing `orig` with memset(). Cc: sta...@vger.kernel.org Fixes:

[RFC PATCH bpf-next 3/3] samples/bpf: Add a simple bridge example accelerated with XDP

2020-07-30 Thread Yoshiki Komachi
This patch adds a simple example of XDP-based bridge with the new bpf_fdb_lookup helper. This program simply forwards packets based on the destination port given by FDB in the kernel. Note that both vlan filtering and learning features are currently unsupported in this example. There is another pl

[RFC PATCH bpf-next 2/3] bpf: Add helper to do forwarding lookups in kernel FDB table

2020-07-30 Thread Yoshiki Komachi
This patch adds a new bpf helper to access FDB in the kernel tables from XDP programs. The helper enables us to find the destination port of master bridge in XDP layer with high speed. If an entry in the tables is successfully found, egress device index will be returned. In cases of failure, packe

[RFC PATCH bpf-next 0/3] Add a new bpf helper for FDB lookup

2020-07-30 Thread Yoshiki Komachi
This series adds a new bpf helper for doing FDB lookup in the kernel tables from XDP programs. This helps users to accelerate Linux bridge with XDP. In the past, XDP generally required users to reimplement their own networking functionalities with specific manners of BPF programming by themselves,

[RFC PATCH bpf-next 1/3] net/bridge: Add new function to access FDB from XDP programs

2020-07-30 Thread Yoshiki Komachi
This patch adds a function to find the destination port from the FDB in the kernel tables, which mainly helps XDP programs to access FDB in the kernel via bpf helper. Note that, unlike the existing br_fdb_find_port(), this function takes an ingress device as an argument. The br_fdb_find_port() als

[PATCH net-next] tun: add missing rcu annotation in tun_set_ebpf()

2020-07-30 Thread Jason Wang
We expecte prog_p to be protected by rcu, so adding the rcu annotation to fix the following sparse warning: drivers/net/tun.c:3003:36: warning: incorrect type in argument 2 (different address spaces) drivers/net/tun.c:3003:36:expected struct tun_prog [noderef] __rcu **prog_p drivers/net/tun.c

Re: rcu warnings in tun

2020-07-30 Thread Jason Wang
On 2020/7/31 上午4:16, Michael S. Tsirkin wrote: drivers/net/tun.c:3003:36: warning: incorrect type in argument 2 (different address spaces) drivers/net/tun.c:3003:36:expected struct tun_prog [noderef] __rcu **prog_p drivers/net/tun.c:3003:36:got struct tun_prog **prog_p drivers/net/tun.

Re: [PATCH V4 0/6] IRQ offloading for vDPA

2020-07-30 Thread Jason Wang
On 2020/7/28 下午12:23, Zhu Lingshan wrote: This series intends to implement IRQ offloading for vhost_vdpa. By the feat of irq forwarding facilities like posted interrupt on X86, irq bypass can help deliver interrupts to vCPU directly. vDPA devices have dedicated hardware backends like VFIO pa

WARNING: ODEBUG bug in cancel_delayed_work

2020-07-30 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:27a2145d ibmvnic: Fix IRQ mapping disposal in error path git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=1427784890 kernel config: https://syzkaller.appspot.com/x/.config?x=ca6448d2af2ba351 dashboard li

WARNING in cancel_delayed_work

2020-07-30 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:83bdc727 random32: remove net_rand_state from the latent e.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10479f1290 kernel config: https://syzkaller.appspot.com/x/.config?x=e59ee776d5aa8d55 das

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-30 Thread Jason Wang
On 2020/7/29 下午10:15, Eli Cohen wrote: OK, we have a mode of operation that does not require driver intervention to manipulate the event queues so I think we're ok with this design. Good to know this. Thanks

Re: [PATCH net-next] rtnetlink: add support for protodown reason

2020-07-30 Thread Roopa Prabhu
On 7/30/20 4:38 PM, David Miller wrote: From: Roopa Prabhu Date: Mon, 27 Jul 2020 12:21:17 -0700 +/** + * dev_get_proto_down_reason - returns protodown reason + * + * @dev: device + */ +u32 dev_get_proto_down_reason(const struct net_device *dev) +{ + return dev->proto_down_reason; +}

Re: [PATCH net] bareudp: Disallow udp port 0.

2020-07-30 Thread Martin Varghese
On Thu, Jul 30, 2020 at 04:20:30PM -0700, Jakub Kicinski wrote: > On Thu, 30 Jul 2020 22:33:51 +0530 Martin Varghese wrote: > > From: Martin Varghese > > > > Kernel does not support udp destination port 0 on wire. Hence > > bareudp device with udp destination port 0 must be disallowed. > > > > F

[PATCH net v2] net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct

2020-07-30 Thread wenxu
From: wenxu When openvswitch conntrack offload with act_ct action. Fragment packets defrag in the ingress tc act_ct action and miss the next chain. Then the packet pass to the openvswitch datapath without the mru. The over mtu packet will be dropped in output action in openvswitch for over mtu.

[PATCH bpf-next] tools build: propagate build failures from tools/build/Makefile.build

2020-07-30 Thread Andrii Nakryiko
The '&&' command seems to have a bad effect when $(cmd_$(1)) exits with non-zero effect: the command failure is masked (despite `set -e`) and all but the first command of $(dep-cmd) is executed (successfully, as they are mostly printfs), thus overall returning 0 in the end. This means in practice

[net 4/4] net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq

2020-07-30 Thread Saeed Mahameed
From: Xin Xiong The function invokes bpf_prog_inc(), which increases the reference count of a bpf_prog object "rq->xdp_prog" if the object isn't NULL. The refcount leak issues take place in two error handling paths. When either mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the function simp

[net 1/4] net/mlx5e: CT: Support restore ipv6 tunnel

2020-07-30 Thread Saeed Mahameed
From: Jianbo Liu Currently the driver restores only IPv4 tunnel headers. Add support for restoring IPv6 tunnel header. Fixes: b8ce90370977 ("net/mlx5e: Restore tunnel metadata on miss") Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed ---

[net 3/4] net/mlx5e: E-Switch, Specify flow_source for rule with no in_port

2020-07-30 Thread Saeed Mahameed
From: Jianbo Liu The flow_source must be specified, even for rule without matching source vport, because some actions are only allowed in uplink. Otherwise, rule can't be offloaded and firmware syndrome happens. Fixes: 6fb0701a9cfa ("net/mlx5: E-Switch, Add support for offloading rules with no

[net 2/4] net/mlx5e: E-Switch, Add misc bit when misc fields changed for mirroring

2020-07-30 Thread Saeed Mahameed
From: Jianbo Liu The modified flow_context fields in FTE must be indicated in modify_enable bitmask. Previously, the misc bit in modify_enable is always set as source vport must be set for each rule. So, when parsing vxlan/gre/geneve/qinq rules, this bit is not set because those are all from the

[pull request][net 0/4] Mellanox, mlx5 fixes 2020-07-30

2020-07-30 Thread Saeed Mahameed
Hi Dave, This small patchset introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.18: ('net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq') For -stable v5.7: ('net/mlx5e: E-Switch, Add misc bit when misc fields changed for mir

Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-30 Thread Xie He
Brian Norris has approved this patch with "Reviewed-by" in the v1 email thread. I really appreciate his review. It's very hard for me to find reviewers for X.25 code so I'm grateful for anyone who could help. Thanks to everyone. Reviewed-by: Brian Norris

[PATCH net-next v2 2/2] hinic: add check for mailbox msg from VF

2020-07-30 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- V1~V2: fix W=1 C=1 warnings .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net/et

[PATCH net-next v2 1/2] hinic: add generating mailbox random index support

2020-07-30 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 13 ++ .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 136 ++ .../net/ethernet/huawei/

[PATCH net-next v2 0/2] hinic: mailbox channel enhancement

2020-07-30 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF .../

Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-30 Thread Xie He
I'm really sorry to have re-sent the patch when the patch is still in review. I don't intend to be disrespectful to anyone. And I apologize for any disrespectfulness this might appear. Sorry. I'm also sorry for not having sent the patch with the proper subject prefixed with "net" or "net-next". If

Re: [PATCH RFC net-next 0/3] Restructure drivers/net/phy

2020-07-30 Thread Andrew Lunn
On Tue, Jul 28, 2020 at 05:34:44PM -0700, Florian Fainelli wrote: > > > On 7/28/2020 5:28 PM, Doug Berger wrote: > > On 7/28/2020 9:28 AM, Ioana Ciornei wrote: > >>> Subject: Re: [PATCH RFC net-next 0/3] Restructure drivers/net/phy > >>> > I think that the MAINTAINERS file should also be upd

Re: [PATCH net-next v1 1/2] hinic: add generating mailbox random index support

2020-07-30 Thread luobin (L)
On 2020/7/31 0:25, Jakub Kicinski wrote: > On Thu, 30 Jul 2020 16:37:15 +0800 Luo bin wrote: >> +bool check_vf_mbox_random_id(struct hinic_mbox_func_to_func *func_to_func, >> + u8 *header) > > This set seems to add new W=1 C=1 warnings: > > drivers/net/ethernet/huawei/hini

Re: [PATCH] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-30 Thread Xie He
On Thu, Jul 30, 2020 at 5:24 PM Brian Norris wrote: > > Sure, I can do that: > > Reviewed-by: Brian Norris Thank you so much for your review, Brian! > I guess x25 is basically an abandoned project, if you're coming to me for > this? Yes, it does seem to me that X.25 is unmaintained. I'm submi

Re: pull-request: mac80211 2020-07-30

2020-07-30 Thread David Miller
From: Johannes Berg Date: Thu, 30 Jul 2020 17:08:35 +0200 > It's been a while, sorry. I have a few more fix that'd be nice > to get in, though I don't think they affect a majority of users. > > Please pull and let me know if there's any problem. No worries, we're all busy, pulled. Thank you.

Re: [PATCH net] net: gemini: Fix missing clk_disable_unprepare() in error path of gemini_ethernet_port_probe()

2020-07-30 Thread David Miller
From: Wang Hai Date: Thu, 30 Jul 2020 15:30:00 +0800 > Fix the missing clk_disable_unprepare() before return > from gemini_ethernet_port_probe() in the error handling case. > > Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit > ethernet") > Reported-by: Hulk Robot > Signed-

Re: [PATCH net] net: ll_temac: Use devm_platform_ioremap_resource_byname()

2020-07-30 Thread David Miller
From: Wang Hai Date: Thu, 30 Jul 2020 15:24:19 +0800 > platform_get_resource() may fail and return NULL, so we had better > check its return value to avoid a NULL pointer dereference a bit later > in the code. Fix it to use devm_platform_ioremap_resource_byname() > instead of calling platform_get

Re: [PATCH v2 net-next 3/3] ionic: separate interrupt for Tx and Rx

2020-07-30 Thread Jakub Kicinski
On Thu, 30 Jul 2020 17:00:58 -0700 Shannon Nelson wrote: > + max_cnt = lif->ionic->ntxqs_per_lif; > + if (ch->combined_count) { > + if (!test_bit(IONIC_LIF_F_SPLIT_INTR, lif->state) && > + (ch->combined_count == lif->nxqs)) { > + netdev_info(n

Re: [PATCH v1 0/3] net: ethernet: use generic power management

2020-07-30 Thread David Miller
From: Vaibhav Gupta Date: Thu, 30 Jul 2020 12:23:33 +0530 > Linux Kernel Mentee: Remove Legacy Power Management. > > The purpose of this patch series is to upgrade power management in net > ethernet > drivers. This has been done by upgrading .suspend() and .resume() callbacks. > > The upgrade

Re: [PATCH -next] bnxt_en: Remove superfluous memset()

2020-07-30 Thread David Miller
From: Li Heng Date: Thu, 30 Jul 2020 14:43:50 +0800 > Fixes coccicheck warning: > > ./drivers/net/ethernet/broadcom/bnxt/bnxt.c:3730:19-37: WARNING: > dma_alloc_coherent use in stats -> hw_stats already zeroes out > memory, so memset is not needed > > dma_alloc_coherent use in status already z

Re: [PATCH net-next] liquidio: Replace vmalloc with kmalloc in octeon_register_dispatch_fn()

2020-07-30 Thread David Miller
From: Wang Hai Date: Thu, 30 Jul 2020 14:11:40 +0800 > The size of struct octeon_dispatch is too small, it is better to use > kmalloc instead of vmalloc. > > Suggested-by: Joe Perches > Signed-off-by: Wang Hai Applied, thank you.

Re: [PATCH][next] mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy()

2020-07-30 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 29 Jul 2020 17:58:03 -0500 > Make use of the flex_array_size() helper to calculate the size of a > flexible array member within an enclosing structure. > > This helper offers defense-in-depth against potential integer > overflows, while at the same time mak

Re: [PATCH][next] net/sched: act_pedit: Use flex_array_size() helper in memcpy()

2020-07-30 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 29 Jul 2020 22:17:00 -0500 > Make use of the flex_array_size() helper to calculate the size of a > flexible array member within an enclosing structure. > > This helper offers defense-in-depth against potential integer > overflows, while at the same time mak

Re: [net-next 0/4] devlink flash update overwrite mask

2020-07-30 Thread Jakub Kicinski
LGTM, minor suggestions: - could you add opt-in support flags to struct devlink_ops, a'la ethtool_ops->supported_coalesce_params so that you don't have to modify all drivers to reject unsupported things? - could you split patch 2 into an ice change and a devlink core change?

Re: [PATCH net] ionic: unlock queue mutex in error path

2020-07-30 Thread David Miller
From: Shannon Nelson Date: Wed, 29 Jul 2020 10:52:17 -0700 > On an error return, jump to the unlock at the end to be sure > to unlock the queue_lock mutex. > > Fixes: 0925e9db4dc8 ("ionic: use mutex to protect queue operations") > Reported-by: kernel test robot > Reported-by: Julia Lawall > Si

Re: [PATCH] atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent

2020-07-30 Thread David Miller
From: Xin Xiong Date: Wed, 29 Jul 2020 21:06:59 +0800 > atmtcp_remove_persistent() invokes atm_dev_lookup(), which returns a > reference of atm_dev with increased refcount or NULL if fails. > > The refcount leaks issues occur in two error handling paths. If > dev_data->persist is zero or PRIV(de

Re: [PATCH net-next v2] Add Mellanox BlueField Gigabit Ethernet driver

2020-07-30 Thread Jakub Kicinski
On Thu, 30 Jul 2020 18:53:58 -0400 David Thompson wrote: > The logic in "mlxbf_gige_mdio.c" is the driver controlling > the Mellanox BlueField hardware that interacts with a PHY > device via MDIO/MDC pins. This driver does the following: > - At driver probe time, it configures several BlueField

Re: [PATCH] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-07-30 Thread Brian Norris
On Tue, Jul 28, 2020 at 6:42 PM Xie He wrote: > On Tue, Jul 28, 2020 at 12:52 PM -0700 > Brian Norris wrote: > > What is the intention with this X25 protocol? I guess the headers added > > in lapbeth_data_transmit() are supposed to be "invisible", as with this > > note in af_packet.c? ... > This

[PATCH v6 bpf-next 4/6] bpf, x64: rework pro/epilogue and tailcall handling in JIT

2020-07-30 Thread Maciej Fijalkowski
This commit serves two things: 1) it optimizes BPF prologue/epilogue generation 2) it makes possible to have tailcalls within BPF subprogram Both points are related to each other since without 1), 2) could not be achieved. In [1], Alexei says: "The prologue will look like: nop5 xor eax,eax  // tw

[PATCH v6 bpf-next 6/6] selftests: bpf: add dummy prog for bpf2bpf with tailcall

2020-07-30 Thread Maciej Fijalkowski
Introduce 6th test to taicalls kselftest that checks if tailcall can be correctly executed from the BPF subprogram. Signed-off-by: Maciej Fijalkowski --- .../selftests/bpf/prog_tests/tailcalls.c | 85 +++ tools/testing/selftests/bpf/progs/tailcall6.c | 38 + 2 files

[PATCH v6 bpf-next 0/6] bpf: tailcalls in BPF subprograms

2020-07-30 Thread Maciej Fijalkowski
v5->v6: - propagate only those poke descriptors that individual subprogram is actually using (Daniel) - drop the cumbersome check if poke desc got filled in map_poke_run() - move poke->ip renaming in bpf_jit_add_poke_descriptor() from patch 4 to patch 3 to provide bisectability (Daniel) v4->v5

[PATCH v6 bpf-next 3/6] bpf: rename poke descriptor's 'ip' member to 'tailcall_target'

2020-07-30 Thread Maciej Fijalkowski
Reflect the actual purpose of poke->ip and rename it to poke->tailcall_target so that it will not the be confused with another poke target that will be introduced in next commit. While at it, do the same thing with poke->ip_stable - rename it to poke->tailcall_target_stable. Signed-off-by: Maciej

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

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

[PATCH v6 bpf-next 1/6] bpf, x64: use %rcx instead of %rax for tail call retpolines

2020-07-30 Thread Maciej Fijalkowski
Currently, %rax is used to store the jump target when BPF program is emitting the retpoline instructions that are handling the indirect tailcall. There is a plan to use %rax for different purpose, which is storing the tail call counter. In order to preserve this value across the tailcalls, adjust

[PATCH v6 bpf-next 2/6] bpf: propagate poke descriptors to subprograms

2020-07-30 Thread Maciej Fijalkowski
Previously, there was no need for poke descriptors being present in subprogram's bpf_prog_aux struct since tailcalls were simply not allowed in them. Each subprog is JITed independently so in order to enable JITing subprograms that use tailcalls, do the following: - in fixup_bpf_calls() store the

Re: [PATCH net] net/bpfilter: initialize pos in __bpfilter_process_sockopt

2020-07-30 Thread Daniel Borkmann
On 7/30/20 6:13 PM, Christian Brauner wrote: On Thu, Jul 30, 2020 at 06:09:00PM +0200, Christoph Hellwig wrote: __bpfilter_process_sockopt never initialized the pos variable passed to the pipe write. This has been mostly harmless in the past as pipes ignore the offset, but the switch to kernel_

Re: [PATCH bpf-next] libbpf: make destructors more robust by handling ERR_PTR(err) cases

2020-07-30 Thread Daniel Borkmann
On 7/30/20 1:21 AM, Andrii Nakryiko wrote: Most of libbpf "constructors" on failure return ERR_PTR(err) result encoded as a pointer. It's a common mistake to eventually pass such malformed pointers into xxx__destroy()/xxx__free() "destructors". So instead of fixing up clean up code in selftests a

Re: [PATCH bpf-next] selftests/bpf: Omit nodad flag when adding addresses to loopback

2020-07-30 Thread Daniel Borkmann
On 7/30/20 2:53 PM, Jakub Sitnicki wrote: Setting IFA_F_NODAD flag for IPv6 addresses to add to loopback is unnecessary. Duplicate Address Detection does not happen on loopback device. Also, passing 'nodad' flag to 'ip address' breaks libbpf CI, which runs in an environment with BusyBox implemen

Re: [PATCH bpf-next v5 15/15] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-07-30 Thread Daniel Borkmann
On 7/29/20 10:55 AM, Jakub Sitnicki wrote: Hi Daniel, On Tue, Jul 28, 2020 at 10:47 PM CEST, Daniel Borkmann wrote: [...] Jakub, I'm actually seeing a slightly different one on my test machine with sk_lookup: # ./test_progs -t sk_lookup #14 cgroup_skb_sk_lookup:OK #73/1 query lookup prog:OK

[PATCH v2 net-next 2/3] ionic: tx separate servicing

2020-07-30 Thread Shannon Nelson
We give the tx clean path its own budget and service routine in order to give a little more leeway to be more aggressive, and in preparation for coming changes. We've found this gives us a little better performance in some packet processing scenarios without hurting other scenarios. Signed-off-by

[PATCH v2 net-next 3/3] ionic: separate interrupt for Tx and Rx

2020-07-30 Thread Shannon Nelson
Add the capability to split the Tx queues onto their own interrupts with their own napi contexts. This gives the opportunity for more direct control of Tx interrupt handling, such as CPU affinity and interrupt coalescing, useful for some traffic loads. v2: use ethtool -L, not a vendor specific pr

[PATCH v2 net-next 0/3] ionic txrx updates

2020-07-30 Thread Shannon Nelson
These are a few patches to do some cleanup in the packet handling and give us more flexibility in tuning performance by allowing us to put Tx handling on separate interrupts when it makes sense for particular traffic loads. v2: dropped the original patch 2 for ringsize change changed the separ

[PATCH v2 net-next 1/3] ionic: use fewer firmware doorbells on rx fill

2020-07-30 Thread Shannon Nelson
We really don't need to hit the Rx queue doorbell so many times, we can wait to the end and cause a little less thrash. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/

Re: [PATCH v4] net: ethernet: mtk_eth_soc: fix MTU warnings

2020-07-30 Thread David Miller
From: Frank Wunderlich Date: Wed, 29 Jul 2020 10:15:17 +0200 > From: Landen Chao > > in recent kernel versions there are warnings about incorrect MTU size > like these: > > eth0: mtu greater than device maximum > mtk_soc_eth 1b10.ethernet eth0: error -22 setting MTU to include DSA > overh

Re: [PATCH] net: nixge: fix potential memory leak in nixge_probe()

2020-07-30 Thread David Miller
From: Lu Wei Date: Wed, 29 Jul 2020 11:50:05 +0800 > If some processes in nixge_probe() fail, free_netdev(dev) > needs to be called to aviod a memory leak. > > Fixes: 87ab207981ec ("net: nixge: Separate ctrl and dma resources") > Fixes: abcd3d6fc640 ("net: nixge: Fix error path for obtaining mac

Re: [PATCH net-next] sfc_ef100: remove duplicated include from ef100_netdev.c

2020-07-30 Thread David Miller
From: YueHaibing Date: Wed, 29 Jul 2020 02:19:50 + > Remove duplicated include. > > Signed-off-by: YueHaibing Applied.

Re: [PATCH net] devlink: ignore -EOPNOTSUPP errors on dumpit

2020-07-30 Thread David Miller
From: Jakub Kicinski Date: Tue, 28 Jul 2020 16:15:07 -0700 > Number of .dumpit functions try to ignore -EOPNOTSUPP errors. > Recent change missed that, and started reporting all errors > but -EMSGSIZE back from dumps. This leads to situation like > this: > > $ devlink dev info > devlink answers:

Re: [PATCH net] rxrpc: Fix race between recvmsg and sendmsg on immediate call failure

2020-07-30 Thread David Miller
From: David Howells Date: Wed, 29 Jul 2020 00:03:56 +0100 > There's a race between rxrpc_sendmsg setting up a call, but then failing to > send anything on it due to an error, and recvmsg() seeing the call > completion occur and trying to return the state to the user. > > An assertion fails in rx

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

2020-07-30 Thread David Miller
From: Andres Beltran Date: Tue, 28 Jul 2020 18:53:21 -0400 > For additional robustness in the face of Hyper-V errors or malicious > behavior, validate all values that originate from packets that Hyper-V > has sent to the guest in the host-to-guest ring buffer. Ensure that > invalid values cannot

Re: [PATCH net] ptp: ptp_clockmatrix: update to support 4.8.7 firmware

2020-07-30 Thread David Miller
From: Date: Tue, 28 Jul 2020 16:00:30 -0400 > From: Min Li > > With 4.8.7 firmware, adjtime can change delta instead of absolute time, > which greately increases snap accuracy. PPS alignment doesn't have to > be set for every single TOD change. Other minor changes includes: > adding more debug

Re: [PATCH 0/6] l2tp: tidy up l2tp core API

2020-07-30 Thread David Miller
From: Tom Parkin Date: Tue, 28 Jul 2020 18:20:27 +0100 > This short series makes some minor tidyup changes to the L2TP core API. Series applied, thank you.

Re: [net-next] seg6: using DSCP of inner IPv4 packets

2020-07-30 Thread David Miller
From: Ahmed Abdelsalam Date: Tue, 28 Jul 2020 12:20:44 + > This patch allows copying the DSCP from inner IPv4 header to the > outer IPv6 header, when doing SRv6 Encapsulation. > > This allows forwarding packet across the SRv6 fabric based on their > original traffic class. > > Signed-off-by

Re: [PATCH v2 net-next] mscc: Add LCPLL Reset to VSC8574 Family of phy drivers

2020-07-30 Thread Florian Fainelli
On 7/30/20 4:36 PM, David Miller wrote: > From: Bryan Whitehead > Date: Mon, 27 Jul 2020 13:18:28 -0400 > >> @@ -929,6 +929,77 @@ static bool vsc8574_is_serdes_init(struct phy_device >> *phydev) >> } >> >> /* bus->mdio_lock should be locked when using this function */ >> +/* Page should alre

Re: [PATCH net-next] selftests: txtimestamp: add flag for timestamp validation tolerance.

2020-07-30 Thread David Miller
From: Jian Yang Date: Mon, 27 Jul 2020 14:14:38 -0700 > From: Jian Yang > > The txtimestamp selftest sets a fixed 500us tolerance. This value was > arrived at experimentally. Some platforms have higher variances. Make > this adjustable by adding the following flag: > > -t N: tolerance (usec) f

Re: [PATCH net-next] rtnetlink: add support for protodown reason

2020-07-30 Thread David Miller
From: Roopa Prabhu Date: Mon, 27 Jul 2020 12:21:17 -0700 > +/** > + * dev_get_proto_down_reason - returns protodown reason > + * > + * @dev: device > + */ > +u32 dev_get_proto_down_reason(const struct net_device *dev) > +{ > + return dev->proto_down_reason; > +} > +EXPORT_SYMBOL(dev_get_p

Re: [PATCH net-next 0/4] s390/qeth: updates 2020-07-30

2020-07-30 Thread Jakub Kicinski
On Thu, 30 Jul 2020 17:01:17 +0200 Julian Wiedmann wrote: > Hi Dave & Jakub, > > please apply the following patch series for qeth to netdev's net-next tree. > > This primarily brings some modernization to the RX path, laying the > groundwork for smarter RX refill policies. > Some of the patches a

Re: [PATCH net-next 4/4] s390/qeth: use all configured RX buffers

2020-07-30 Thread Jakub Kicinski
On Thu, 30 Jul 2020 17:01:21 +0200 Julian Wiedmann wrote: > The (misplaced) comment doesn't make any sense, enforcing an > uninitialized RX buffer won't help with IRQ reduction. > > So make the best use of all available RX buffers. Often one entry in the ring is left free to make it easy to diffe

Re: [PATCH v2 net-next] mscc: Add LCPLL Reset to VSC8574 Family of phy drivers

2020-07-30 Thread David Miller
From: Bryan Whitehead Date: Mon, 27 Jul 2020 13:18:28 -0400 > @@ -929,6 +929,77 @@ static bool vsc8574_is_serdes_init(struct phy_device > *phydev) > } > > /* bus->mdio_lock should be locked when using this function */ > +/* Page should already be set to MSCC_PHY_PAGE_EXTENDED_GPIO */ > +stat

Re: [PATCH net] selftests/bpf: fix netdevsim trap_flow_action_cookie read

2020-07-30 Thread David Miller
From: Hangbin Liu Date: Mon, 27 Jul 2020 19:04:55 +0800 > When read netdevsim trap_flow_action_cookie, we need to init it first, > or we will get "Invalid argument" error. > > Fixes: d3cbb907ae57 ("netdevsim: add ACL trap reporting cookie as a metadata") > Signed-off-by: Hangbin Liu Applied.

Re: [Patch net] ipv6: fix memory leaks on IPV6_ADDRFORM path

2020-07-30 Thread David Miller
From: Cong Wang Date: Sat, 25 Jul 2020 15:40:53 -0700 > IPV6_ADDRFORM causes resource leaks when converting an IPv6 socket > to IPv4, particularly struct ipv6_ac_socklist. Similar to > struct ipv6_mc_socklist, we should just close it on this path. > > This bug can be easily reproduced with the f

Re: [PATCH net-next v3 0/2] udp_tunnel: convert mlx5 to the new udp_tunnel infrastructure

2020-07-30 Thread Saeed Mahameed
On Tue, 2020-07-28 at 14:47 -0700, Jakub Kicinski wrote: > This set converts mlx5 to the new infrastructure. > > We need a small amount of special handling as mlx5 expects IANA VXLAN > port to always be programmed into the device. ethtool will show such > ports in a separate, type-less, fake table

  1   2   3   4   >