Re: [PATCH mlx5-next v4 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-26 Thread Joe Perches
On Tue, 2021-01-26 at 08:01 +0200, Leon Romanovsky wrote: > On Mon, Jan 25, 2021 at 01:52:29PM -0800, Jakub Kicinski wrote: > > On Sun, 24 Jan 2021 15:11:16 +0200 Leon Romanovsky wrote: > > > +static int pci_enable_vfs_overlay(struct pci_dev *dev) { return 0; } > > > +static void pci_disable_vfs_ov

Re: [RFC v3 11/11] vduse: Introduce a workqueue for irq injection

2021-01-26 Thread Jason Wang
On 2021/1/19 下午1:07, Xie Yongji wrote: This patch introduces a dedicated workqueue for irq injection so that we are able to do some performance tuning for it. Signed-off-by: Xie Yongji If we want the split like this. It might be better to: 1) implement a simple irq injection on the ioctl

Re: [RFC v3 08/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-01-26 Thread Jason Wang
On 2021/1/19 下午1:07, Xie Yongji wrote: This VDUSE driver enables implementing vDPA devices in userspace. Both control path and data path of vDPA devices will be able to be handled in userspace. In the control path, the VDUSE driver will make use of message mechnism to forward the config operat

[PATCH bpf-next v2 0/6] AF_XDP Packet Drop Tracing

2021-01-26 Thread Ciara Loftus
This series introduces tracing infrastructure for AF_XDP sockets (xsks). A trace event 'xsk_packet_drop' is created which can be enabled by toggling /sys/kernel/debug/tracing/events/xsk/xsk_packet_drop/enable When enabled and packets are dropped in the kernel, traces are generated which describe

[PATCH bpf-next v2 2/6] selftests/bpf: restructure setting the packet count

2021-01-26 Thread Ciara Loftus
Prior to this, the packet count was fixed at 1 for every test. Future tracing tests need to modify the count, so make it possible to set the count from test_xsk.h using the -C opt. Signed-off-by: Ciara Loftus --- tools/testing/selftests/bpf/test_xsk.sh| 17 + tools/testin

[PATCH bpf-next v2 1/6] xsk: add tracepoints for packet drops

2021-01-26 Thread Ciara Loftus
This commit introduces static perf tracepoints for AF_XDP which report information about packet drops, such as the netdev, qid and high level reason for the drop. The tracepoint can be enabled/disabled by toggling /sys/kernel/debug/tracing/events/xsk/xsk_packet_drop/enable Signed-off-by: Ciara Lof

[PATCH] bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc

2021-01-26 Thread Bui Quang Minh
In 32-bit architecture, the result of sizeof() is a 32-bit integer so the expression becomes the multiplication between 2 32-bit integer which can potentially leads to integer overflow. As a result, bpf_map_area_alloc() allocates less memory than needed. Fix this by casting 1 operand to u64. Sign

Re: [PATCH v3] vhost_vdpa: fix the problem in vhost_vdpa_set_config_call

2021-01-26 Thread Jason Wang
On 2021/1/26 下午3:16, Cindy Lu wrote: In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue. Cc: sta...@vger.kernel.org Fixes: 776f395004d82 ("vhost_vdpa: Support config interrupt in vdpa") Sign

Re: [PATCH bpf-next 3/3] libbpf, xsk: select AF_XDP BPF program based on kernel version

2021-01-26 Thread Jesper Dangaard Brouer
On Fri, 22 Jan 2021 11:53:51 +0100 Björn Töpel wrote: > From: Björn Töpel > > Add detection for kernel version, and adapt the BPF program based on > kernel support. This way, users will get the best possible performance > from the BPF program. You say "detection for kernel version", but doesn'

Re: [PATCH v2 1/2 net-next] net: mscc: ocelot: fix error handling bugs in mscc_ocelot_init_ports()

2021-01-26 Thread Dan Carpenter
On Mon, Jan 25, 2021 at 04:18:07PM +, Vladimir Oltean wrote: > Hi Dan, > > On Mon, Jan 25, 2021 at 11:42:03AM +0300, Dan Carpenter wrote: > > diff --git a/drivers/net/ethernet/mscc/ocelot_net.c > > b/drivers/net/ethernet/mscc/ocelot_net.c > > index 9553eb3e441c..875ab8532d8c 100644 > > --- a/

Re: [PATCH bpf-next v2 0/6] AF_XDP Packet Drop Tracing

2021-01-26 Thread Toke Høiland-Jørgensen
Ciara Loftus writes: > This series introduces tracing infrastructure for AF_XDP sockets (xsks). > A trace event 'xsk_packet_drop' is created which can be enabled by toggling > > /sys/kernel/debug/tracing/events/xsk/xsk_packet_drop/enable > > When enabled and packets are dropped in the kernel, tra

Re: [PATCH v2 1/2 net-next] net: mscc: ocelot: fix error handling bugs in mscc_ocelot_init_ports()

2021-01-26 Thread Vladimir Oltean
On Tue, Jan 26, 2021 at 10:27:53AM +0300, Dan Carpenter wrote: > > If you resend, can you please squash this diff on top of your patch? > > Yep. I will resend. Thanks for basically writing v2 for me. Your > review comments were very clear but code is always 100% clear so that's > really great.

[PATCH net-next 1/1] stmmac: intel: Add ADL-S 1Gbps PCI IDs

2021-01-26 Thread Wong Vee Khee
From: "Wong, Vee Khee" Added PCI IDs for both Ethernet TSN Controllers on the ADL-S. Also, skip SerDes programming sequences as these are being carried out at the BIOS level for ADL-S. Signed-off-by: Wong, Vee Khee --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 19 +++ 1

[PATCH iproute2-next v2] tc/htb: Hierarchical QoS hardware offload

2021-01-26 Thread Maxim Mikityanskiy
This commit adds support for configuring HTB in offload mode. HTB offload eliminates the single qdisc lock in the datapath and offloads the algorithm to the NIC. The new 'offload' parameter is added to enable this mode: # tc qdisc replace dev eth0 root handle 1: htb offload Classes are create

Re: [PATCH nf-next v4 1/5] net: sched: Micro-optimize egress handling

2021-01-26 Thread Dan Carpenter
On Mon, Jan 25, 2021 at 11:39:08AM -0800, Jakub Kicinski wrote: > On Sun, 24 Jan 2021 11:33:01 +0100 Lukas Wunner wrote: > > On Fri, Jan 22, 2021 at 10:40:05AM +0100, Eric Dumazet wrote: > > > On Fri, Jan 22, 2021 at 9:55 AM Lukas Wunner wrote: > > > > sch_handle_egress() returns either the skb

[PATCH net-next 0/2] net: bridge: multicast: per-port EHT hosts limit

2021-01-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, This set adds a simple configurable per-port EHT tracked hosts limit. Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT changes are still only in net-next that shouldn't be a problem. Then patch 02 adds the ability to configure and retrieve t

Re: [PATCH] can: mcba_usb: remove h from printk format specifier

2021-01-26 Thread Marc Kleine-Budde
On 21-01-24 07:09:16, t...@redhat.com wrote: > From: Tom Rix > > This change fixes the checkpatch warning described in this commit > commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of > unnecessary %h[xudi] and %hh[xudi]") > > Standard integer promotion is already done and %hx

Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-01-26 Thread Oleksandr Mazur
On Mon, 25 Jan 2021 14:38:56 +0200 Oleksandr Mazur wrote: > + if (trap_item->action == DEVLINK_TRAP_ACTION_DROP && > + devlink->ops->trap_drop_counter_get) { > + err = devlink->ops->trap_drop_counter_get(devlink, > +   trap

Re: [Intel-wired-lan] igc: fix link speed advertising

2021-01-26 Thread Corinna Vinschen
Ping? It looks like this patch got lost somehow. Without this patch, setting link speed advertising is broken. Thanks, Corinna On Nov 17 20:50, Corinna Vinschen wrote: > Link speed advertising in igc has two problems: > > - When setting the advertisement via ethtool, the link speed is conver

Preemptible idr_alloc() in QRTR code

2021-01-26 Thread Mark Rutland
Hi, When fuzzing arm64 with Syzkaller, I'm seeing some splats where this_cpu_ptr() is used in the bowels of idr_alloc(), by way of radix_tree_node_alloc(), in a preemptible context: | BUG: using smp_processor_id() in preemptible [] code: syz-executor.1/32582 | caller is debug_smp_process

[PATCH] staging: rtl8723bs: fix wireless regulatory API misuse

2021-01-26 Thread Johannes Berg
From: Johannes Berg This code ends up calling wiphy_apply_custom_regulatory(), for which we document that it should be called before wiphy_register(). This driver doesn't do that, but calls it from ndo_open() with the RTNL held, which caused deadlocks. Since the driver just registers static regd

Re: [PATCH] staging: rtl8723bs: fix wireless regulatory API misuse

2021-01-26 Thread Greg Kroah-Hartman
On Tue, Jan 26, 2021 at 11:54:09AM +0100, Johannes Berg wrote: > From: Johannes Berg > > This code ends up calling wiphy_apply_custom_regulatory(), for which > we document that it should be called before wiphy_register(). This > driver doesn't do that, but calls it from ndo_open() with the RTNL >

Re: [PATCH] bpf: fix build for BPF preload when $(O) points to a relative path

2021-01-26 Thread Quentin Monnet
2021-01-25 16:32 UTC-0800 ~ Andrii Nakryiko > On Mon, Jan 25, 2021 at 7:49 AM Quentin Monnet wrote: >> >> Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative >> path for the output directory, may fail with the following error: >> >> $ make O=build bindeb-pkg >> ... >> /

Re: [patch net-next RFC 00/10] introduce line card support for modular switch

2021-01-26 Thread Jiri Pirko
Fri, Jan 22, 2021 at 03:13:12PM CET, and...@lunn.ch wrote: >> I don't see any way. The userspace is the one who can get the info, from >> the i2c driver. The mlxsw driver has no means to get that info itself. > >Hi Jiri > >Please can you tell us more about this i2c driver. Do you have any >architec

[PATCH net-next] hv_netvsc: Copy packets sent by Hyper-V out of the receive buffer

2021-01-26 Thread Andrea Parri (Microsoft)
Pointers to receive-buffer packets sent by Hyper-V are used within the guest VM. Hyper-V can send packets with erroneous values or modify packet fields after they are processed by the guest. To defend against these scenarios, copy (sections of) the incoming packet after validating their length an

[PATCH net] bonding: fix send_peer_notif data truncation

2021-01-26 Thread liaichun
send_peer_notif is u8, the value of this parameter is obtained from u8*int, the data may be truncated. And in practice, more than u8(256) characters are used. Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications") Signed-off-by: Aichun Li --- include/net

[PATCH v2 4/4] hv_netvsc: Restrict configurations on isolated guests

2021-01-26 Thread Andrea Parri (Microsoft)
Restrict the NVSP protocol version(s) that will be negotiated with the host to be NVSP_PROTOCOL_VERSION_61 or greater if the guest is running isolated. Moreover, do not advertise the SR-IOV capability and ignore NVSP_MSG_4_TYPE_SEND_VF_ASSOCIATION messages in isolated guests, which are not suppose

[PATCH v2 0/4] Drivers: hv: vmbus: Restrict devices and configurations on 'isolated' guests

2021-01-26 Thread Andrea Parri (Microsoft)
Changes since v1 [1]: - improve/add logging (Haiyang Zhang) - move NVSC version check after version negotiation (Haiyang Zhang) [1] https://lkml.kernel.org/r/20210119175841.22248-1-parri.and...@gmail.com Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Arnd

[PATCH V3 0/6] ethernet: fixes for stmmac driver

2021-01-26 Thread Joakim Zhang
Fixes for stmmac driver. --- ChangeLogs: V1->V2: * subject prefix: ethernet: stmmac: -> net: stmmac: * use dma_addr_t instead of unsigned int for physical address * use cpu_to_le32() V2-V3: * fix the build issue pointed out by kbuild bot. * add error handlin

[PATCH V3 2/6] net: stmmac: stop each tx channel independently

2021-01-26 Thread Joakim Zhang
If clear GMAC_CONFIG_TE bit, it would stop all tx channels, but users may only want to stop secific tx channel. Fixes: 48863ce5940f ("stmmac: add DMA support for GMAC 4.xx") Signed-off-by: Joakim Zhang --- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 4 1 file changed, 4 deletions(-)

[PATCH V3 3/6] net: stmmac: fix watchdog timeout during suspend/resume stress test

2021-01-26 Thread Joakim Zhang
stmmac_xmit() call stmmac_tx_timer_arm() at the end to modify tx timer to do the transmission cleanup work. Imagine such a situation, stmmac enters suspend immediately after tx timer modified, it's expire callback stmmac_tx_clean() would not be invoked. This could affect BQL, since netdev_tx_sent_q

[PATCH V3 6/6] net: stmmac: re-init rx buffers when mac resume back

2021-01-26 Thread Joakim Zhang
During suspend/resume stress test, we found descriptor write back by DMA could exhibit unusual behavior, e.g.: 003 [0xc4310030]: 0x0 0x40 0x0 0xb5010040 We can see that desc3 write back is 0xb5010040, it is still ownd by DMA, so application would not recycle this buffer. It will trigger fa

[PATCH V3 4/6] net: stmmac: fix dma physical address of descriptor when display ring

2021-01-26 Thread Joakim Zhang
Driver uses dma_alloc_coherent to allocate dma memory for descriptors, dma_alloc_coherent will return both the virtual address and physical address. AFAIK, virt_to_phys could not convert virtual address to physical address, for which memory is allocated by dma_alloc_coherent. Signed-off-by: Joakim

[PATCH V3 5/6] net: stmmac: fix wrongly set buffer2 valid when sph unsupport

2021-01-26 Thread Joakim Zhang
In current driver, buffer2 available only when hardware supports split header. Wrongly set buffer2 valid in stmmac_rx_refill when refill buffer address. You can see that desc3 is 0x8100 after initialization, but turn out to be 0x8300 after refill. Fixes: 67afd6d1cfdf ("net: stmmac: Add Spl

[PATCH V3 1/6] net: stmmac: remove redundant null check for ptp clock

2021-01-26 Thread Joakim Zhang
Remove redundant null check for ptp clock. Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check before clk_disable_unprepare()") Reviewed-by: Andrew Lunn Signed-off-by: Joakim Zhang --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet

Re: [RFC PATCH v3 00/13] virtio/vsock: introduce SOCK_SEQPACKET support

2021-01-26 Thread Stefano Garzarella
Hi Arseny, thanks for this new series! I'm a bit busy but I hope to review it tomorrow or on Thursday. Stefano On Mon, Jan 25, 2021 at 02:09:00PM +0300, Arseny Krasnov wrote: This patchset impelements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees t

Re: [PATCH] staging: rtl8723bs: fix wireless regulatory API misuse

2021-01-26 Thread Johannes Berg
On Tue, 2021-01-26 at 12:20 +0100, Greg Kroah-Hartman wrote: > > > Greg, can you take this for 5.11 please? Or if you prefer, since the > > patch that exposed this and broke the driver went through my tree, I > > can take it as well. > > Please feel free to take it through yours, as I don't think

Re: [PATCH net-next 3/3] net: page_pool: simplify page recycling condition tests

2021-01-26 Thread Ilias Apalodimas
On Mon, Jan 25, 2021 at 04:47:20PM +, Alexander Lobakin wrote: > pool_page_reusable() is a leftover from pre-NUMA-aware times. For now, > this function is just a redundant wrapper over page_is_pfmemalloc(), > so Inline it into its sole call site. > > Signed-off-by: Alexander Lobakin > --- >

Re: [PATCH net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-01-26 Thread Jesper Dangaard Brouer
On Fri, 22 Jan 2021 16:05:16 +0100 Igor Russkikh wrote: > DELAY may now be explicitly specified via common parameter -w What are you actually using this for? Notice there is also an option called "ratep" which can be used for setting the packet rate per sec. In the pktgen.c code, it will use t

[PATCH net] stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing

2021-01-26 Thread mohammad . athari . ismail
From: Voon Weifeng Fix an issue where dump stack is printed and Reset Adapter occurs when PSE0 GbE or/and PSE1 GbE is/are enabled. EHL PSE0 GbE and PSE1 GbE use 32 bits DMA addressing whereas EHL PCH GbE uses 64 bits DMA addressing. [ 25.535095] [ cut here ] [ 25.5402

Re: [PATCH net] team: protect features update by RCU to avoid deadlock

2021-01-26 Thread Jiri Pirko
Mon, Jan 25, 2021 at 08:44:16AM CET, ivec...@redhat.com wrote: >Function __team_compute_features() is protected by team->lock >mutex when it is called from team_compute_features() used when >features of an underlying device is changed. This causes >a deadlock when NETDEV_FEAT_CHANGE notifier for un

Re: [PATCH net v3] udp: ipv4: manipulate network header of NATed UDP GRO fraglist

2021-01-26 Thread Steffen Klassert
On Tue, Jan 26, 2021 at 09:31:29AM +0900, Dongseok Yi wrote: > On 1/25/21 9:45 PM, Steffen Klassert wrote: > > On Thu, Jan 21, 2021 at 10:24:39PM +0900, Dongseok Yi wrote: > > > > > > +static void __udpv4_gso_segment_csum(struct sk_buff *seg, > > > + __be32 *oldip, __be

pull-request: mac80211 2021-01-26

2021-01-26 Thread Johannes Berg
Hi Jakub, We have a few fixes - note one is for a staging driver, but acked by Greg and fixing the driver for a change that came through my tree. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 1c45ba93d34cd6af75228f34d0675200c81738b5:

Re: [PATCH net-next 2/2] samples: pktgen: new append mode

2021-01-26 Thread Jesper Dangaard Brouer
On Fri, 22 Jan 2021 16:05:17 +0100 Igor Russkikh wrote: > To configure various complex flows we for sure can create custom > pktgen init scripts, but sometimes thats not that easy. > > New "-a" (append) option in all the existing sample scripts allows > to append more "devices" into pktgen threa

Re: [PATCH] net: mdiobus: Prevent spike on MDIO bus reset signal

2021-01-26 Thread Andrew Lunn
On Tue, Jan 26, 2021 at 08:33:37AM +0100, Mike Looijmans wrote: > The mdio_bus reset code first de-asserted the reset by allocating with > GPIOD_OUT_LOW, then asserted and de-asserted again. In other words, if > the reset signal defaulted to asserted, there'd be a short "spike" > before the reset.

[PATCH net-next 01/10] netdevsim: fib: Convert the current occupancy to an atomic variable

2021-01-26 Thread Ido Schimmel
From: Amit Cohen When route is added/deleted, the appropriate counter is increased/decreased to maintain number of routes. User can limit the number of routes and then according to the appropriate counter, adding more routes than the limitation is forbidden. Currently, there is one lock which p

[PATCH net-next 02/10] netdevsim: fib: Perform the route programming in a non-atomic context

2021-01-26 Thread Ido Schimmel
From: Amit Cohen Currently, netdevsim implements dummy FIB offload and marks notified routes with RTM_F_TRAP flag. netdevsim does not defer route notifications to a work queue because it does not need to program any hardware. Given that netdevsim's purpose is to both give an example implementati

[PATCH net-next 04/10] net: ipv4: Publish fib_nlmsg_size()

2021-01-26 Thread Ido Schimmel
From: Amit Cohen Publish fib_nlmsg_size() to allow it to be used later on from fib_alias_hw_flags_set(). Remove the inline keyword since it shouldn't be used inside C files. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- net/ipv4/fib_lookup.h| 1 + net/ipv4/fib_semantics.c | 2

RE: [PATCH iproute2-next RESEND] devlink: Extend man page for port function set command

2021-01-26 Thread Parav Pandit
Hi Stephen, > From: Parav Pandit > Sent: Friday, January 22, 2021 10:32 AM > > Extended devlink-port man page for synopsis, description and example for > setting devlink port function attribute. > > Signed-off-by: Parav Pandit > Reviewed-by: Jiri Pirko Can you please review this short update

[PATCH net-next 03/10] net: ipv4: Pass fib_rt_info as const to fib_dump_info()

2021-01-26 Thread Ido Schimmel
From: Amit Cohen fib_dump_info() does not change 'fri', so pass it as 'const'. It will later allow us to invoke fib_dump_info() from fib_alias_hw_flags_set(). Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- net/ipv4/fib_lookup.h| 2 +- net/ipv4/fib_semantics.c | 2 +- 2 files ch

[PATCH net-next 00/10] Add notifications when route hardware flags change

2021-01-26 Thread Ido Schimmel
From: Ido Schimmel Routes installed to the kernel can be programmed to capable devices, in which case they are marked with one of two flags. RTM_F_OFFLOAD for routes that offload traffic from the kernel and RTM_F_TRAP for routes that trap packets to the kernel for processing (e.g., host routes).

Re: [PATCH net-next] bridge: Propagate NETDEV_NOTIFY_PEERS notifier

2021-01-26 Thread Hangbin Liu
On Tue, Jan 26, 2021 at 09:40:13AM +0200, Nikolay Aleksandrov wrote: > On 26/01/2021 06:09, Hangbin Liu wrote: > > After adding bridge as upper layer of bond/team, we usually clean up the > > IP address on bond/team and set it on bridge. When there is a failover, > > bond/team will not send gratuit

RE: [PATCH iproute2-next 2/2] vdpa: Add vdpa tool

2021-01-26 Thread Parav Pandit
> From: David Ahern > Sent: Tuesday, January 26, 2021 9:53 AM > > Looks fine. A few comments below around code re-use. > > On 1/22/21 4:26 AM, Parav Pandit wrote: > > diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c new file mode 100644 index > > ..942524b7 > > --- /dev/null > > +++ b/vdpa/vdpa.

Re: [PATCHv2 1/3] usbnet: specify naming of usbnet_set/get_link_ksettings

2021-01-26 Thread Andrew Lunn
On Tue, Jan 26, 2021 at 10:42:09AM +0100, Oliver Neukum wrote: > Am Freitag, den 22.01.2021, 02:10 +0100 schrieb Andrew Lunn: > > On Thu, Jan 21, 2021 at 01:57:29PM +0100, Oliver Neukum wrote: > > > The old generic functions assume that the devices includes > > > an MDIO interface. This is true onl

Re: [PATCH] net: mdiobus: Prevent spike on MDIO bus reset signal

2021-01-26 Thread Russell King - ARM Linux admin
On Tue, Jan 26, 2021 at 02:14:40PM +0100, Andrew Lunn wrote: > On Tue, Jan 26, 2021 at 08:33:37AM +0100, Mike Looijmans wrote: > > The mdio_bus reset code first de-asserted the reset by allocating with > > GPIOD_OUT_LOW, then asserted and de-asserted again. In other words, if > > the reset signal d

Re: [patch net-next RFC 00/10] introduce line card support for modular switch

2021-01-26 Thread Andrew Lunn
On Tue, Jan 26, 2021 at 12:33:26PM +0100, Jiri Pirko wrote: > Fri, Jan 22, 2021 at 03:13:12PM CET, and...@lunn.ch wrote: > >> I don't see any way. The userspace is the one who can get the info, from > >> the i2c driver. The mlxsw driver has no means to get that info itself. > > > >Hi Jiri > > > >Pl

Re: [PATCH net-next] bridge: Propagate NETDEV_NOTIFY_PEERS notifier

2021-01-26 Thread Nikolay Aleksandrov
On 26/01/2021 15:25, Hangbin Liu wrote: > On Tue, Jan 26, 2021 at 09:40:13AM +0200, Nikolay Aleksandrov wrote: >> On 26/01/2021 06:09, Hangbin Liu wrote: >>> After adding bridge as upper layer of bond/team, we usually clean up the >>> IP address on bond/team and set it on bridge. When there is a fa

[PATCH bpf-next] samples/bpf: Add include dir for MIPS Loongson64 to fix build errors

2021-01-26 Thread Tiezhu Yang
There exists many build errors when make M=samples/bpf on the Loongson platform, this issue is MIPS related, x86 compiles just fine. Here are some errors: CLANG-bpf samples/bpf/sockex2_kern.o In file included from samples/bpf/sockex2_kern.c:2: In file included from ./include/uapi/linux/in.h:24

UDP implementation and the MSG_MORE flag

2021-01-26 Thread Oliver Graute
Hello, we observe some unexpected behavior in the UDP implementation of the linux kernel. Some UDP packets send via the loopback interface are dropped in the kernel on the receive side when using sendto with the MSG_MORE flag. Every drop increases the InCsumErrors in /proc/self/net/snmp. Some exa

[PATCH net-next 07/10] net: Do not call fib6_info_hw_flags_set() when IPv6 is disabled

2021-01-26 Thread Ido Schimmel
From: Amit Cohen With the next patch mlxsw and netdevsim will fail in compilation if CONFIG_IPV6 is disabled. Do not call fib6_info_hw_flags_set() when IPv6 is disabled. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_router.c| 16 ++

[PATCH net-next 05/10] net: ipv4: Emit notification when fib hardware flags are changed

2021-01-26 Thread Ido Schimmel
From: Amit Cohen After installing a route to the kernel, user space receives an acknowledgment, which means the route was installed in the kernel, but not necessarily in hardware. The asynchronous nature of route installation in hardware can lead to a routing daemon advertising a route before it

[PATCH net-next 09/10] selftests: Extend fib tests to run with and without flags notifications

2021-01-26 Thread Ido Schimmel
From: Amit Cohen Run the test cases with both `fib_notify_on_flag_change` sysctls set to '1', and then with both sysctls set to '0' to verify there are no regressions in the test when notifications are added. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- tools/testing/selftests/dr

[PATCH net-next 06/10] net: Pass 'net' struct as first argument to fib6_info_hw_flags_set()

2021-01-26 Thread Ido Schimmel
From: Amit Cohen The next patch will emit notification when hardware flags are changed, in case that fib_notify_on_flag_change sysctl is set to 1. To know sysctl values, net struct is needed. This change is consistent with the IPv4 version, which gets 'net' struct as its first argument. Current

[PATCH net-next 08/10] net: ipv6: Emit notification when fib hardware flags are changed

2021-01-26 Thread Ido Schimmel
From: Amit Cohen After installing a route to the kernel, user space receives an acknowledgment, which means the route was installed in the kernel, but not necessarily in hardware. The asynchronous nature of route installation in hardware can lead to a routing daemon advertising a route before it

[PATCH net-next 10/10] selftests: netdevsim: Add fib_notifications test

2021-01-26 Thread Ido Schimmel
From: Amit Cohen Add test to check fib notifications behavior. The test checks route addition, route deletion and route replacement for both IPv4 and IPv6. When fib_notify_on_flag_change=0, expect single notification for route addition/deletion/replacement. When fib_notify_on_flag_change=1, ex

Re: [PATCH net-next] hv_netvsc: Copy packets sent by Hyper-V out of the receive buffer

2021-01-26 Thread Andrea Parri
On Tue, Jan 26, 2021 at 12:38:47PM +0100, Andrea Parri (Microsoft) wrote: > Pointers to receive-buffer packets sent by Hyper-V are used within the > guest VM. Hyper-V can send packets with erroneous values or modify > packet fields after they are processed by the guest. To defend against > these

Re: [PATCHv2 1/3] usbnet: specify naming of usbnet_set/get_link_ksettings

2021-01-26 Thread Oliver Neukum
Am Freitag, den 22.01.2021, 02:10 +0100 schrieb Andrew Lunn: > On Thu, Jan 21, 2021 at 01:57:29PM +0100, Oliver Neukum wrote: > > The old generic functions assume that the devices includes > > an MDIO interface. This is true only for genuine ethernet. > > Devices with a higher level of abstraction

Re: [PATCH net-next 4/4] rtnetlink: promote IFLA_VF_STATS to same level as IFLA_VF_INFO

2021-01-26 Thread Edwin Peer
On Mon, Jan 25, 2021 at 6:01 PM Jakub Kicinski wrote: > > Since changing the hierarchy does constitute an ABI change, it must > > be explicitly requested via RTEXT_FILTER_VF_SEPARATE_STATS. Otherwise, > > the old location is maintained for compatibility. > > We don't want any additions to the VF

Re: [PATCH] bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc

2021-01-26 Thread Lorenz Bauer
On Tue, 26 Jan 2021 at 08:26, Bui Quang Minh wrote: > > In 32-bit architecture, the result of sizeof() is a 32-bit integer so > the expression becomes the multiplication between 2 32-bit integer which > can potentially leads to integer overflow. As a result, > bpf_map_area_alloc() allocates less m

[PATCH net-next v2 1/2] net: bridge: multicast: add per-port EHT hosts limit

2021-01-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Add a default limit of 512 for number of tracked EHT hosts per-port. Signed-off-by: Nikolay Aleksandrov --- v2: no change net/bridge/br_multicast.c | 1 + net/bridge/br_multicast_eht.c | 7 +++ net/bridge/br_private.h | 2 ++ net/bridge/b

[PATCH net-next v2 0/2] net: bridge: multicast: per-port EHT hosts limit

2021-01-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, This set adds a simple configurable per-port EHT tracked hosts limit. Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT changes are still only in net-next that shouldn't be a problem. Then patch 02 adds the ability to configure and retrieve t

[PATCH net-next v2 2/2] net: bridge: multicast: make tracked EHT hosts limit configurable

2021-01-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Add two new port attributes which make EHT hosts limit configurable and export the current number of tracked EHT hosts: - IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT: configure/retrieve current limit - IFLA_BRPORT_MCAST_EHT_HOSTS_CNT: current number of tracked hosts Setting IFLA

[PATCH net-next] net: psample: Introduce stubs to remove NIC driver dependency

2021-01-26 Thread Chris Mi
In order to send sampled packets to userspace, NIC driver calls psample api directly. But it creates a hard dependency on module psample. Introduce psample_ops to remove the hard dependency. It is initialized when psample module is loaded and set to NULL when the module is unloaded. Signed-off-by:

Re: [PATCH net-next] bridge: Propagate NETDEV_NOTIFY_PEERS notifier

2021-01-26 Thread Nikolay Aleksandrov
On 26/01/2021 15:56, Nikolay Aleksandrov wrote: > On 26/01/2021 15:25, Hangbin Liu wrote: >> On Tue, Jan 26, 2021 at 09:40:13AM +0200, Nikolay Aleksandrov wrote: >>> On 26/01/2021 06:09, Hangbin Liu wrote: After adding bridge as upper layer of bond/team, we usually clean up the IP address

Re: Preemptible idr_alloc() in QRTR code

2021-01-26 Thread Matthew Wilcox
On Tue, Jan 26, 2021 at 10:47:34AM +, Mark Rutland wrote: > Hi, > > When fuzzing arm64 with Syzkaller, I'm seeing some splats where > this_cpu_ptr() is used in the bowels of idr_alloc(), by way of > radix_tree_node_alloc(), in a preemptible context: I sent a patch to fix this last June. The

RE: [PATCH v2 4/4] hv_netvsc: Restrict configurations on isolated guests

2021-01-26 Thread Haiyang Zhang
> -Original Message- > From: Andrea Parri (Microsoft) > Sent: Tuesday, January 26, 2021 6:57 AM > To: linux-ker...@vger.kernel.org > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger > ; Wei Liu ; Michael Kelley > ; linux-hyp...@vger.kernel.org; Tianyu Lan > ; Saruhan Karademir >

Re: [PATCH] bpf: fix build for BPF preload when $(O) points to a relative path

2021-01-26 Thread Quentin Monnet
2021-01-26 11:24 UTC+ ~ Quentin Monnet > 2021-01-25 16:32 UTC-0800 ~ Andrii Nakryiko >> On Mon, Jan 25, 2021 at 7:49 AM Quentin Monnet wrote: >>> >>> Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative >>> path for the output directory, may fail with the following error:

Re: [PATCH bpf-next] samples/bpf: Add include dir for MIPS Loongson64 to fix build errors

2021-01-26 Thread Daniel Borkmann
On 1/26/21 3:05 PM, Tiezhu Yang wrote: There exists many build errors when make M=samples/bpf on the Loongson platform, this issue is MIPS related, x86 compiles just fine. Here are some errors: [...] So we can do the similar things in samples/bpf/Makefile, just add platform specific and gener

Re: Linux Ipv6 stats support

2021-01-26 Thread David Ahern
On 1/25/21 4:26 AM, Yogesh Ankolekar wrote: > >    We are looking for below IPv6 stats support in linux. Looks below > stats are not supported. Will these stats will be supported in future or > it is already supported in some version. Please guide. I am not aware of anyone working on adding more

Re: [PATCH bpf-next] selftests/bpf: don't exit on failed bpf_testmod unload

2021-01-26 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Mon, 25 Jan 2021 22:50:18 -0800 you wrote: > Fix bug in handling bpf_testmod unloading that will cause test_progs exiting > prematurely if bpf_testmod unloading failed. This is especially problematic > when running a subset

Re: [EXT] Re: [PATCH net-next 2/2] samples: pktgen: new append mode

2021-01-26 Thread Igor Russkikh
Hi Jesper, Thanks for reviewing this. >> DELAY may now be explicitly specified via common parameter -w > > What are you actually using this for? Basically, for the second patch. When running multidev pktgen (using that -a option) with large amount of clones and bursts (-c and -b) I saw that s

[PATCH bpf v2] bpf: fix build for BPF preload when $(O) points to a relative path

2021-01-26 Thread Quentin Monnet
Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative path for the output directory, may fail with the following error: $ make O=build bindeb-pkg ... /.../linux/tools/scripts/Makefile.include:5: *** O=build does not exist. Stop. make[7]: *** [/.../linux/kernel/bpf/prel

Re: [PATCH net-next 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-01-26 Thread Vlastimil Babka
On 1/23/21 12:59 PM, Kevin Hao wrote: > In the current implementation of page_frag_alloc(), it doesn't have > any align guarantee for the returned buffer address. But for some > hardwares they do require the DMA buffer to be aligned correctly, > so we would have to use some workarounds like below i

Re: Preemptible idr_alloc() in QRTR code

2021-01-26 Thread Mark Rutland
On Tue, Jan 26, 2021 at 02:58:33PM +, Matthew Wilcox wrote: > On Tue, Jan 26, 2021 at 10:47:34AM +, Mark Rutland wrote: > > Hi, > > > > When fuzzing arm64 with Syzkaller, I'm seeing some splats where > > this_cpu_ptr() is used in the bowels of idr_alloc(), by way of > > radix_tree_node_all

Re: [PATCH wireless v2 -next] wcn36xx: Remove unnecessary memset

2021-01-26 Thread Kalle Valo
Zheng Yongjun wrote: > memcpy operation is next to memset code, and the size to copy is equals to > the size to > memset, so the memset operation is unnecessary, remove it. > > Signed-off-by: Zheng Yongjun > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 337c

Re: [PATCH bpf-next v3 3/3] xsk: build skb by page

2021-01-26 Thread Magnus Karlsson
On Mon, Jan 25, 2021 at 4:22 PM Xuan Zhuo wrote: > > On Mon, 25 Jan 2021 14:16:16 +0100, Magnus Karlsson > wrote: > > On Mon, Jan 25, 2021 at 1:43 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 25 Jan 2021 08:44:38 +0100, Magnus Karlsson > > > wrote: > > > > On Mon, Jan 25, 2021 at 3:27 AM Xuan

[PATCH v3] rtlwifi: Simplify bool comparison

2021-01-26 Thread Jiapeng Zhong
Fix the following coccicheck warning: ./drivers/net/wireless/realtek/rtlwifi/ps.c:798:7-21: WARNING: Comparison to bool ./drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:3848:7-17: WARNING: Comparison of 0/1 to bool variable Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- Changes

[PATCH] net: mdiobus: Prevent spike on MDIO bus reset signal

2021-01-26 Thread Mike Looijmans
The mdio_bus reset code first de-asserted the reset by allocating with GPIOD_OUT_LOW, then asserted and de-asserted again. In other words, if the reset signal defaulted to asserted, there'd be a short "spike" before the reset. Instead, directly assert the reset signal using GPIOD_OUT_HIGH, this re

Re: [RFC v3 10/11] vduse: grab the module's references until there is no vduse device

2021-01-26 Thread Jason Wang
On 2021/1/19 下午1:07, Xie Yongji wrote: The module should not be unloaded if any vduse device exists. So increase the module's reference count when creating vduse device. And the reference count is kept until the device is destroyed. Signed-off-by: Xie Yongji Looks like a bug fix. If yes, l

Re: [RFC v3 08/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-01-26 Thread Jason Wang
On 2021/1/19 下午1:07, Xie Yongji wrote: This VDUSE driver enables implementing vDPA devices in userspace. Both control path and data path of vDPA devices will be able to be handled in userspace. In the control path, the VDUSE driver will make use of message mechnism to forward the config operat

[PATCH mlx5-next v5 3/4] net/mlx5: Dynamically assign MSI-X vectors count

2021-01-26 Thread Leon Romanovsky
From: Leon Romanovsky The number of MSI-X vectors is PCI property visible through lspci, that field is read-only and configured by the device. The static assignment of an amount of MSI-X vectors doesn't allow utilize the newly created VF because it is not known to the device the future load and c

[PATCH mlx5-next v5 2/4] net/mlx5: Add dynamic MSI-X capabilities bits

2021-01-26 Thread Leon Romanovsky
From: Leon Romanovsky These new fields declare the number of MSI-X vectors that is possible to allocate on the VF through PF configuration. Value must be in range defined by min_dynamic_vf_msix_table_size and max_dynamic_vf_msix_table_size. The driver should continue to query its MSI-X table th

Re: [PATCH mlx5-next v4 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-26 Thread Leon Romanovsky
On Tue, Jan 26, 2021 at 12:20:11AM -0800, Joe Perches wrote: > On Tue, 2021-01-26 at 08:01 +0200, Leon Romanovsky wrote: > > On Mon, Jan 25, 2021 at 01:52:29PM -0800, Jakub Kicinski wrote: > > > On Sun, 24 Jan 2021 15:11:16 +0200 Leon Romanovsky wrote: > > > > +static int pci_enable_vfs_overlay(str

[PATCH mlx5-next v5 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-26 Thread Leon Romanovsky
From: Leon Romanovsky Extend PCI sysfs interface with a new callback that allows configure the number of MSI-X vectors for specific SR-IO VF. This is needed to optimize the performance of newly bound devices by allocating the number of vectors based on the administrator knowledge of targeted VM.

[PATCH net] r8169: work around RTL8125 UDP hw bug

2021-01-26 Thread Heiner Kallweit
It was reported that on RTL8125 network breaks under heavy UDP load, e.g. torrent traffic ([0], from comment 27). Realtek confirmed a hw bug and provided me with a test version of the r8125 driver including a workaround. Tests confirmed that the workaround fixes the issue. I modified the original v

[PATCH net-next 2/2] net: bridge: multicast: make tracked EHT hosts limit configurable

2021-01-26 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Add two new port attributes which make EHT hosts limit configurable and export the current number of tracked EHT hosts: - IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT: configure/retrieve current limit - IFLA_BRPORT_MCAST_EHT_HOSTS_CNT: current number of tracked hosts Setting IFLA

pull-request: wireless-drivers-2021-01-26

2021-01-26 Thread Kalle Valo
Hi, here's a pull request to net tree, more info below. Please let me know if there are any problems. Kalle The following changes since commit 6279d812eab67a6df6b22fa495201db6f2305924: Merge tag 'net-5.11-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (2021-01-08 12:12:30

Re: [PATCH net-next 0/2] net: bridge: multicast: per-port EHT hosts limit

2021-01-26 Thread Nikolay Aleksandrov
On 26/01/2021 11:21, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > Hi, > This set adds a simple configurable per-port EHT tracked hosts limit. > Patch 01 adds a default limit of 512 tracked hosts per-port, since the EHT > changes are still only in net-next that shouldn't be a problem

Re: [PATCH mlx5-next v4 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-26 Thread Leon Romanovsky
On Tue, Jan 26, 2021 at 12:57:06AM -0800, Joe Perches wrote: > On Tue, 2021-01-26 at 10:48 +0200, Leon Romanovsky wrote: > > On Tue, Jan 26, 2021 at 12:20:11AM -0800, Joe Perches wrote: > > > On Tue, 2021-01-26 at 08:01 +0200, Leon Romanovsky wrote: > > > > On Mon, Jan 25, 2021 at 01:52:29PM -0800,

[PATCH v2 net-next] hv_netvsc: Copy packets sent by Hyper-V out of the receive buffer

2021-01-26 Thread Andrea Parri (Microsoft)
Pointers to receive-buffer packets sent by Hyper-V are used within the guest VM. Hyper-V can send packets with erroneous values or modify packet fields after they are processed by the guest. To defend against these scenarios, copy (sections of) the incoming packet after validating their length an

  1   2   3   4   >