Re: [Linux-kernel-mentees][PATCH] rtl8150: set memory to all 0xFFs on failed register reads

2020-09-15 Thread Petko Manolov
On 20-09-16 08:22:27, Greg KH wrote: > On Wed, Sep 16, 2020 at 10:35:40AM +0530, Anant Thazhemadam wrote: > > get_registers() copies whatever memory is written by the > > usb_control_msg() call even if the underlying urb call ends up failing. > > > > If get_registers() fails, or ends up reading 0

[PATCH net-next 14/15] mlxsw: spectrum_buffers: Introduce shared buffer ops

2020-09-15 Thread Ido Schimmel
From: Petr Machata The size of the internal buffer is currently calculated in the SPAN module. Logically it belongs to the spectrum_buffers module, where it should be moved. However, that being a chip-specific operation, it needs dynamic dispatch. There currently is a chip-specific structure for

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 9:25 AM Greg Kroah-Hartman wrote: > > On Tue, Sep 15, 2020 at 11:49:12PM +0300, Oded Gabbay wrote: > > On Tue, Sep 15, 2020 at 11:42 PM David Miller wrote: > > > > > > From: Oded Gabbay > > > Date: Tue, 15 Sep 2020 20:10:08 +0300 > > > > > > > This is the second version o

[PATCH net-next 06/15] mlxsw: spectrum: Track buffer sizes in struct mlxsw_sp_hdroom

2020-09-15 Thread Ido Schimmel
From: Petr Machata So far, port buffers were always autoconfigured. When dcbnl_setbuffer callback is implemented, it will allow the user to change the buffer size configuration by hand. The sizes therefore need to be a configuration parameter, not always deduced, and therefore belong to struct ml

[PATCH net-next 11/15] mlxsw: spectrum_buffers: Move here the new headroom code

2020-09-15 Thread Ido Schimmel
From: Petr Machata Move all the headroom code to the spectrum_buffers module, where it belongs. Rename mlxsw_sp_pg_buf_threshold_get() and mlxsw_sp_pg_buf_pack() to ..._hdroom_... to match the naming convention of the new headroom code. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Sign

[PATCH net-next 05/15] mlxsw: spectrum: Track lossiness in struct mlxsw_sp_hdroom

2020-09-15 Thread Ido Schimmel
From: Petr Machata Client-side configuration has lossiness as an attribute of a priority. Therefore add a "lossy" attribute to struct mlxsw_sp_hdroom_prio. To a Spectrum ASIC, lossiness is a feature of a port buffer. Therefore add struct mlxsw_sp_hdroom_buf, which in the following patches will g

[PATCH net-next 01/15] mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom

2020-09-15 Thread Ido Schimmel
From: Petr Machata The port headroom handling is currently strewn across several modules and tricky to follow: MTU, DCB PFC, DCB ETS and ethtool pause all influence the settings, and then there is the completely separate initial configuraion in spectrum_buffers. A following patch will implement t

[PATCH net-next 08/15] mlxsw: spectrum_dcb: Convert ETS handler fully to mlxsw_sp_hdroom_configure()

2020-09-15 Thread Ido Schimmel
From: Petr Machata The ETS handler performs the headroom configuration in three steps: first it resizes the buffers and adds any new ones. Then it redirects priorities to the new buffers. And finally it sets the size of the now-unused buffers to zero. This way no packet drops are introduced. Bot

[PATCH net-next 15/15] mlxsw: spectrum_buffers: Manage internal buffer in the hdroom code

2020-09-15 Thread Ido Schimmel
From: Petr Machata Traffic mirroring modes that are in-chip implemented on egress need an internal buffer to work. As the only client, the SPAN module was managing the buffer so far. However logically it belongs to the buffers module. E.g. buffer size validation needs to take the size of the inte

[PATCH net-next 00/15] mlxsw: Refactor headroom management

2020-09-15 Thread Ido Schimmel
From: Ido Schimmel Petr says: On Spectrum, port buffers, also called port headroom, is where packets are stored while they are parsed and the forwarding decision is being made. For lossless traffic flows, in case shared buffer admission is not allowed, headroom is also where to put the extra tra

[PATCH net-next 13/15] mlxsw: spectrum_buffers: Convert mlxsw_sp_port_headroom_init()

2020-09-15 Thread Ido Schimmel
From: Petr Machata Currently mlxsw_sp_port_headroom_init() configures both priomap and buffers by hand. Additionally, for port buffers, it configures buffer 0 with a size that it will never again have if PFC configuration is touched. Rewrite the init code to become a client of the new hdroom cod

[PATCH net-next 10/15] mlxsw: spectrum: Move here the three-step headroom configuration from DCB

2020-09-15 Thread Ido Schimmel
From: Petr Machata The ETS handler performs the headroom configuration in three steps: first it resizes the buffers and adds any new ones. Then it redirects priorities to the new buffers. And finally it sets the size of the now-unused buffers to zero. This way no packet drops are introduced. Thi

[PATCH net-next 12/15] mlxsw: spectrum_buffers: Inline mlxsw_sp_sb_max_headroom_cells()

2020-09-15 Thread Ido Schimmel
From: Petr Machata This function is now only used from the buffers module, and is a trivial field reference. Just inline it and drop the related artifacts. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h

[PATCH net-next 07/15] mlxsw: spectrum: Split headroom autoresize out of buffer configuration

2020-09-15 Thread Ido Schimmel
From: Petr Machata Split mlxsw_sp_port_headroom_set() to three functions. mlxsw_sp_hdroom_bufs_reset_sizes() changes the sizes of the individual PG buffers, and mlxsw_sp_hdroom_configure_buffers() will actually apply the configuration. A third function, mlxsw_sp_hdroom_bufs_fit(), verifies that t

[PATCH net-next 02/15] mlxsw: spectrum: Unify delay handling between PFC and pause

2020-09-15 Thread Ido Schimmel
From: Petr Machata When a priority is marked as lossless using DCB PFC, or when pause frames are enabled on a port, mlxsw adds to port buffers an extra space to cover the traffic that will arrive between the time that a pause or PFC frame is emitted, and the time traffic actually stops. This is c

[PATCH net-next 04/15] mlxsw: spectrum: Track priorities in struct mlxsw_sp_hdroom

2020-09-15 Thread Ido Schimmel
From: Petr Machata The mapping from priorities to buffers determines which buffers should be configured. Lossiness of these priorities combined with the mapping determines whether a given buffer should be lossy. Currently this configuration is stored implicitly in DCB ETS, PFC and ethtool PAUSE

[PATCH net-next 03/15] mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom

2020-09-15 Thread Ido Schimmel
From: Petr Machata MTU influences sizes of auto-allocated buffers. Make it a part of port buffer configuration and have __mlxsw_sp_port_headroom_set() take it from there, instead of as an argument. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/et

[PATCH net-next 09/15] mlxsw: spectrum_dcb: Convert mlxsw_sp_port_pg_prio_map() to hdroom code

2020-09-15 Thread Ido Schimmel
From: Petr Machata The new hdroom code has certain conventions: iteration over priorities is done through a variable named `prio', configuration is not pushed unless it is dirty, but a `force' flag can be used to override this, updated configuration is written to port. Convert the function mlxsw_

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Greg Kroah-Hartman
On Tue, Sep 15, 2020 at 11:49:12PM +0300, Oded Gabbay wrote: > On Tue, Sep 15, 2020 at 11:42 PM David Miller wrote: > > > > From: Oded Gabbay > > Date: Tue, 15 Sep 2020 20:10:08 +0300 > > > > > This is the second version of the patch-set to upstream the GAUDI NIC code > > > into the habanalabs dr

Re: [Linux-kernel-mentees][PATCH] rtl8150: set memory to all 0xFFs on failed register reads

2020-09-15 Thread Greg KH
On Wed, Sep 16, 2020 at 10:35:40AM +0530, Anant Thazhemadam wrote: > get_registers() copies whatever memory is written by the > usb_control_msg() call even if the underlying urb call ends up failing. > > If get_registers() fails, or ends up reading 0 bytes, meaningless and > junk register values

[PATCH bpf-next v3] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Yonghong Song
If a bucket contains a lot of sockets, during bpf_iter traversing a bucket, concurrent userspace bpf_map_update_elem() and bpf program bpf_sk_storage_{get,delete}() may experience some undesirable delays as they will compete with bpf_iter for bucket lock. Note that the number of buckets for bpf_sk

Re: [PATCH -next 1/3] rtlwifi: rtl8723ae: fix comparison pointer to bool warning in rf.c

2020-09-15 Thread Kalle Valo
Zheng Bin wrote: > Fixes coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.c:52:5-22: WARNING: > Comparison to bool > drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.c:482:6-14: WARNING: > Comparison to bool > > Signed-off-by: Zheng Bin 3 patches applied to wireles

Re: [PATCH -next 1/3] rtlwifi: rtl8188ee: fix comparison pointer to bool warning in phy.c

2020-09-15 Thread Kalle Valo
Zheng Bin wrote: > Fixes coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1584:14-18: WARNING: > Comparison to bool > > Signed-off-by: Zheng Bin 3 patches applied to wireless-drivers-next.git, thanks. 6996e70f1fe4 rtlwifi: rtl8188ee: fix comparison pointer to boo

Re: [PATCH bpf-next v2] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Yonghong Song
On 9/15/20 10:37 PM, Martin KaFai Lau wrote: On Tue, Sep 15, 2020 at 03:35:07PM -0700, Yonghong Song wrote: If a bucket contains a lot of sockets, during bpf_iter traversing a bucket, concurrent userspace bpf_map_update_elem() and bpf program bpf_sk_storage_{get,delete}() may experience some

Re: [PATCH] qtnfmac: Remove unused macro QTNF_DMP_MAX_LEN

2020-09-15 Thread Kalle Valo
YueHaibing wrote: > There is no caller in tree, so remove it. > > Signed-off-by: YueHaibing Patch applied to wireless-drivers-next.git, thanks. edadae4778b0 qtnfmac: Remove unused macro QTNF_DMP_MAX_LEN -- https://patchwork.kernel.org/patch/11765841/ https://wireless.wiki.kernel.org/en/dev

Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 10:28:44PM CEST, mo...@nvidia.com wrote: > >On 9/15/2020 4:37 PM, Jiri Pirko wrote: >> Tue, Sep 15, 2020 at 02:44:02PM CEST, mo...@nvidia.com wrote: >> > On 9/14/2020 4:54 PM, Jiri Pirko wrote: >> > > Mon, Sep 14, 2020 at 08:07:57AM CEST, mo...@mellanox.com wrote: >> > > >> >

Re: rtw88: rtw8822c: eliminate code duplication, use native swap() function

2020-09-15 Thread Kalle Valo
Ivan Safonov wrote: > swap_u32() duplicate native swap(), so replace swap_u32() with swap(). > > Signed-off-by: Ivan Safonov Patch applied to wireless-drivers-next.git, thanks. d10f6af58ef4 rtw88: rtw8822c: eliminate code duplication, use native swap() function -- https://patchwork.kernel.

Re: [PATCH net-next RFC v4 03/15] devlink: Add reload action stats

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 10:20:39PM CEST, mo...@nvidia.com wrote: > >On 9/15/2020 4:33 PM, Jiri Pirko wrote: >> Tue, Sep 15, 2020 at 02:30:19PM CEST, mo...@nvidia.com wrote: >> > On 9/14/2020 4:39 PM, Jiri Pirko wrote: >> > > Mon, Sep 14, 2020 at 08:07:50AM CEST, mo...@mellanox.com wrote: >> [..] >> >

Re: [PATCH] brcmsmac: phy_lcn: Eliminate defined but not used 'lcnphy_rx_iqcomp_table_rev0'

2020-09-15 Thread Kalle Valo
Jason Yan wrote: > This addresses the following gcc warning with "make W=1": > > drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:361:25: > warning: ‘lcnphy_rx_iqcomp_table_rev0’ defined but not used > [-Wunused-const-variable=] > 361 | struct lcnphy_rx_iqcomp lcnphy_rx_iqcomp_ta

Re: [PATCH] wlcore: Remove unused macro WL1271_SUSPEND_SLEEP

2020-09-15 Thread Kalle Valo
YueHaibing wrote: > commit 45aa7f071b06 ("wlcore: Use generic runtime pm calls for wowlan elp > configuration") > left behind this, remove it. > > Signed-off-by: YueHaibing Patch applied to wireless-drivers-next.git, thanks. d06e2f8b41b6 wlcore: Remove unused macro WL1271_SUSPEND_SLEEP --

Re: [PATCH] brcmsmac: main: Eliminate empty brcms_c_down_del_timer()

2020-09-15 Thread Kalle Valo
Jason Yan wrote: > This function does nothing so remove it. This addresses the following > coccicheck warning: > > drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:5103:6-15: > Unneeded variable: "callbacks". Return "0" on line 5105 > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan

Re: [PATCH] brcmsmac: phytbl_lcn: Remove unused variable 'dot11lcn_gain_tbl_rev1'

2020-09-15 Thread Kalle Valo
YueHaibing wrote: > drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c:108:18: > warning: ‘dot11lcn_gain_tbl_rev1’ defined but not used > [-Wunused-const-variable=] > static const u32 dot11lcn_gain_tbl_rev1[] = { > ^~ > > commit ebcfc66f56a

Re: [PATCH] brcmsmac: phy_lcn: Remove unused variable lcnphy_rx_iqcomp_table_rev0

2020-09-15 Thread Kalle Valo
YueHaibing wrote: > drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:361:25: > warning: ‘lcnphy_rx_iqcomp_table_rev0’ defined but not used > [-Wunused-const-variable=] > struct lcnphy_rx_iqcomp lcnphy_rx_iqcomp_table_rev0[] = { > ^

Re: [PATCH] brcmsmac: phytbl_lcn: Eliminate defined but not used 'dot11lcn_gain_tbl_rev1'

2020-09-15 Thread Kalle Valo
Jason Yan wrote: > This addresses the following gcc warning with "make W=1": > > drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c:108:18: > warning: ‘dot11lcn_gain_tbl_rev1’ defined but not used > [-Wunused-const-variable=] > 108 | static const u32 dot11lcn_gain_tbl_rev1[] = {

Re: [PATCH 28/29] brcmsmac: phytbl_lcn: Remove unused array 'dot11lcn_gain_tbl_rev1'

2020-09-15 Thread Kalle Valo
Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c:108:18: > warning: unused variable 'dot11lcn_gain_tbl_rev1' [-Wunused-const-variable] > static const u32 dot11lcn_gain_tbl_rev1[] = { > > Signed-off-by: L

Re: [PATCH] airo: switch from 'pci_' to 'dma_' API

2020-09-15 Thread Kalle Valo
Christophe JAILLET wrote: > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > When memory is allocated in 'mpi_map_c

[PATCH] sunrpc: cache : Replace seq_printf with seq_puts

2020-09-15 Thread Xu Wang
seq_puts is a lot cheaper than seq_printf, so use that to print literal strings. Signed-off-by: Xu Wang --- net/sunrpc/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index baef5ee43dbb..9e68e443f497 100644 --- a/net/sunrpc/

Re: [PATCH bpf-next v2] bpf: using rcu_read_lock for bpf_sk_storage_map iterator

2020-09-15 Thread Martin KaFai Lau
On Tue, Sep 15, 2020 at 03:35:07PM -0700, Yonghong Song wrote: > If a bucket contains a lot of sockets, during bpf_iter traversing > a bucket, concurrent userspace bpf_map_update_elem() and > bpf program bpf_sk_storage_{get,delete}() may experience > some undesirable delays as they will compete wit

[Linux-kernel-mentees][PATCH] rtl8150: set memory to all 0xFFs on failed register reads

2020-09-15 Thread Anant Thazhemadam
get_registers() copies whatever memory is written by the usb_control_msg() call even if the underlying urb call ends up failing. If get_registers() fails, or ends up reading 0 bytes, meaningless and junk register values would end up being copied over (and eventually read by the driver), and sinc

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 1:34 AM David Miller wrote: > > From: Oded Gabbay > Date: Wed, 16 Sep 2020 00:20:12 +0300 > > > I completely understand but you didn't answer my question. How come > > there are drivers which create netdev objects, and specifically sgi-xp > > in misc (but I also saw it in

Re: [PATCH v4 08/11] Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Dmitry Torokhov
On Wed, Sep 16, 2020 at 11:48:14AM +0800, Boqun Feng wrote: > For a Hyper-V vmbus, the size of the ringbuffer has two requirements: > > 1)it has to take one PAGE_SIZE for the header > > 2)it has to be PAGE_SIZE aligned so that double-mapping can work > > VMBUS_RING_SIZE() could calculate

[PATCH v4 05/11] Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header

2020-09-15 Thread Boqun Feng
There will be more places other than vmbus where we need to calculate the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to hyperv generic header. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley --- drivers/hv/channel.c | 13 - include/linux/hyperv.h | 15 +

[PATCH v4 06/11] hv: hyperv.h: Introduce some hvpfn helper functions

2020-09-15 Thread Boqun Feng
When a guest communicate with the hypervisor, it must use HV_HYP_PAGE to calculate PFN, so introduce a few hvpfn helper functions as the counterpart of the page helper functions. This is the preparation for supporting guest whose PAGE_SIZE is not 4k. Signed-off-by: Boqun Feng Reviewed-by: Michael

[PATCH v4 01/11] Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl

2020-09-15 Thread Boqun Feng
Since the hypervisor always uses 4K as its page size, the size of PFNs used for gpadl should be HV_HYP_PAGE_SIZE rather than PAGE_SIZE, so adjust this accordingly as the preparation for supporting 16K/64K page size guests. No functional changes on x86, since PAGE_SIZE is always 4k (equals to HV_HYP

[PATCH v4 09/11] HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Boqun Feng
For a Hyper-V vmbus, the size of the ringbuffer has two requirements: 1) it has to take one PAGE_SIZE for the header 2) it has to be PAGE_SIZE aligned so that double-mapping can work VMBUS_RING_SIZE() could calculate a correct ringbuffer size which fulfills both requirements, therefore

[PATCH v4 08/11] Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Boqun Feng
For a Hyper-V vmbus, the size of the ringbuffer has two requirements: 1) it has to take one PAGE_SIZE for the header 2) it has to be PAGE_SIZE aligned so that double-mapping can work VMBUS_RING_SIZE() could calculate a correct ringbuffer size which fulfills both requirements, therefore

[PATCH v4 10/11] Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-15 Thread Boqun Feng
For a Hyper-V vmbus, the size of the ringbuffer has two requirements: 1) it has to take one PAGE_SIZE for the header 2) it has to be PAGE_SIZE aligned so that double-mapping can work VMBUS_RING_SIZE() could calculate a correct ringbuffer size which fulfills both requirements, therefore

[PATCH v4 03/11] Drivers: hv: vmbus: Introduce types of GPADL

2020-09-15 Thread Boqun Feng
This patch introduces two types of GPADL: HV_GPADL_{BUFFER, RING}. The types of GPADL are purely the concept in the guest, IOW the hypervisor treat them as the same. The reason of introducing the types for GPADL is to support guests whose page size is not 4k (the page size of Hyper-V hypervisor).

[PATCH v4 04/11] Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()

2020-09-15 Thread Boqun Feng
Both the base_*_gpa should use the guest page number in Hyper-V page, so use HV_HYP_PAGE instead of PAGE. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley --- drivers/hv/hv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 749

[PATCH v4 02/11] Drivers: hv: vmbus: Move __vmbus_open()

2020-09-15 Thread Boqun Feng
Pure function movement, no functional changes. The move is made, because in a later change, __vmbus_open() will rely on some static functions afterwards, so we separate the move and the modification of __vmbus_open() in two patches to make it easy to review. Signed-off-by: Boqun Feng Reviewed-by:

[PATCH v4 11/11] scsi: storvsc: Support PAGE_SIZE larger than 4K

2020-09-15 Thread Boqun Feng
Hyper-V always use 4k page size (HV_HYP_PAGE_SIZE), so when communicating with Hyper-V, a guest should always use HV_HYP_PAGE_SIZE as the unit for page related data. For storvsc, the data is vmbus_packet_mpb_array. And since in scsi_cmnd, sglist of pages (in unit of PAGE_SIZE) is used, we need conv

[PATCH v4 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication

2020-09-15 Thread Boqun Feng
When communicating with Hyper-V, HV_HYP_PAGE_SIZE should be used since that's the page size used by Hyper-V and Hyper-V expects all page-related data using the unit of HY_HYP_PAGE_SIZE, for example, the "pfn" in hv_page_buffer is actually the HV_HYP_PAGE (i.e. the Hyper-V page) number. In order to

[PATCH v4 00/11] Hyper-V: Support PAGE_SIZE larger than 4K

2020-09-15 Thread Boqun Feng
This patchset add the necessary changes to support guests whose page size is larger than 4K. And the main architecture which we develop this for is ARM64 (also it's the architecture that I use to test this feature). Previous version: v1: https://lore.kernel.org/lkml/20200721014135.84140-1-boqun.f.

Re: pull-request: bpf 2020-09-15

2020-09-15 Thread David Miller
From: Alexei Starovoitov Date: Tue, 15 Sep 2020 19:03:16 -0700 > The following pull-request contains BPF updates for your *net* tree. > > We've added 12 non-merge commits during the last 19 day(s) which contain > a total of 10 files changed, 47 insertions(+), 38 deletions(-). > > The main chang

[PATCH] mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo

2020-09-15 Thread Ye Bin
Fixes make coccicheck warnig: net/mptcp/protocol.c:164:11-18: WARNING: Unsigned expression compared with zero: max_seq > 0 Reported-by: Hulk Robot Signed-off-by: Ye Bin --- net/mptcp/protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mptcp/protocol.c b/net/

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-09-15 Thread Jason Wang
On 2020/9/15 下午11:47, Kishon Vijay Abraham I wrote: Hi Jason, On 15/09/20 1:48 pm, Jason Wang wrote: Hi Kishon: On 2020/9/14 下午3:23, Kishon Vijay Abraham I wrote: Then you need something that is functional equivalent to virtio PCI which is actually the concept of vDPA (e.g vDPA provides alt

Re: [PATCH] net: core: explicitly call linkwatch_fire_event to speed up the startup of network services

2020-09-15 Thread Wen Yang
on 2020/8/6 PM5:09, Wen Yang wrote: 在 2020/8/5 上午6:58, David Miller 写道: From: Wen Yang Date: Sat,  1 Aug 2020 16:58:45 +0800 diff --git a/net/core/link_watch.c b/net/core/link_watch.c index 75431ca..6b9d44b 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c @@ -98,6 +98,9 @@ s

[PATCH -next] cxgb4vf: convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-15 Thread Liu Shixin
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin --- .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 92 +++ 1 file changed, 11 insertions(+), 81 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/c

[PATCH -next] ath5k: convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-15 Thread Liu Shixin
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin --- drivers/net/wireless/ath/ath5k/debug.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.

RE: [PATCH linux-can-next/flexcan] can: flexcan: fix TDC feature

2020-09-15 Thread Joakim Zhang
> -Original Message- > From: Marc Kleine-Budde > Sent: 2020年9月16日 6:16 > To: Joakim Zhang ; Michael Walle > > Cc: linux-...@vger.kernel.org; dl-linux-imx ; > netdev@vger.kernel.org > Subject: Re: [PATCH linux-can-next/flexcan] can: flexcan: fix TDC feature > > On 6/30/20 4:25 AM, Joakim

[PATCH] net: hns: kerneldoc fixes

2020-09-15 Thread Lu Wei
Fix some parameter description or spelling mistakes. Signed-off-by: Lu Wei --- .../net/ethernet/hisilicon/hns/hns_ethtool.c | 40 +-- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilico

pull-request: bpf 2020-09-15

2020-09-15 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. We've added 12 non-merge commits during the last 19 day(s) which contain a total of 10 files changed, 47 insertions(+), 38 deletions(-). The main changes are: 1) docs/bpf fixes, from Andrii. 2) ld_abs fix, from Dani

Re: [PATCH v3 bpf-next] selftests/bpf: merge most of test_btf into test_progs

2020-09-15 Thread Alexei Starovoitov
On Tue, Sep 15, 2020 at 05:48:19PM -0700, Andrii Nakryiko wrote: > Merge 183 tests from test_btf into test_progs framework to be exercised > regularly. All the test_btf tests that were moved are modeled as proper > sub-tests in test_progs framework for ease of debugging and reporting. > > No funct

Re: [PATCH net 0/7] Bugfixes in Microsemi Ocelot switch driver

2020-09-15 Thread Horatiu Vultur
The 09/15/2020 21:22, Vladimir Oltean wrote: > > From: Vladimir Oltean > > This is a series of 7 assorted patches for "net", on the drivers for the > VSC7514 MIPS switch (Ocelot-1), the VSC9953 PowerPC (Seville), and a few > more that are common to all supported devices since they are in the > c

Re: [PATCH bpf] bpf: fix a rcu warning for bpffs map pretty-print

2020-09-15 Thread Alexei Starovoitov
On Tue, Sep 15, 2020 at 5:58 PM Andrii Nakryiko wrote: > > On Tue, Sep 15, 2020 at 5:44 PM Yonghong Song wrote: > > > > Running selftest > > ./btf_btf -p > > the kernel had the following warning: > > [ 51.528185] WARNING: CPU: 3 PID: 1756 at kernel/bpf/hashtab.c:717 > > htab_map_get_next_k

Re: [PATCH bpf] bpf: bpf_skc_to_* casting helpers require a NULL check on sk

2020-09-15 Thread Alexei Starovoitov
On Tue, Sep 15, 2020 at 2:45 PM Song Liu wrote: > > On Tue, Sep 15, 2020 at 11:32 AM Martin KaFai Lau wrote: > > > > The bpf_skc_to_* type casting helpers are available to > > BPF_PROG_TYPE_TRACING. The traced PTR_TO_BTF_ID may be NULL. > > For example, the skb->sk may be NULL. Thus, these cast

Re: [PATCH bpf-next v6 0/5] Allow storage of flexible metadata information for eBPF programs

2020-09-15 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 4:47 PM Stanislav Fomichev wrote: > > Currently, if a user wants to store arbitrary metadata for an eBPF > program, for example, the program build commit hash or version, they > could store it in a map, and conveniently libbpf uses .data section to > populate an internal ma

Re: [PATCH bpf] bpf: fix a rcu warning for bpffs map pretty-print

2020-09-15 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 5:44 PM Yonghong Song wrote: > > Running selftest > ./btf_btf -p > the kernel had the following warning: > [ 51.528185] WARNING: CPU: 3 PID: 1756 at kernel/bpf/hashtab.c:717 > htab_map_get_next_key+0x2eb/0x300 > [ 51.529217] Modules linked in: > [ 51.529583]

[PATCH bpf-next v5 6/8] libbpf: add support for freplace attachment in bpf_link_create

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen This adds support for supplying a target btf ID for the bpf_link_create() operation, and adds a new bpf_program__attach_freplace() high-level API for attaching freplace functions with a target. Signed-off-by: Toke Høiland-Jørgensen --- tools/lib/bpf/bpf.c |

[PATCH bpf-next v5 1/8] bpf: change logging calls from verbose() to bpf_log() and use log pointer

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen In preparation for moving code around, change a bunch of references to env->log (and the verbose() logging helper) to use bpf_log() and a direct pointer to struct bpf_verifier_log. While we're touching the function signature, mark the 'prog' argument to bpf_check_type

[PATCH bpf-next v5 8/8] selftests/bpf: Adding test for arg dereference in extension trace

2020-09-15 Thread Toke Høiland-Jørgensen
From: Jiri Olsa Adding test that setup following program: SEC("classifier/test_pkt_md_access") int test_pkt_md_access(struct __sk_buff *skb) with its extension: SEC("freplace/test_pkt_md_access") int test_pkt_md_access_new(struct __sk_buff *skb) and tracing that extension with: SEC

[PATCH bpf-next v5 7/8] selftests: add test for multiple attachments of freplace program

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen This adds a selftest for attaching an freplace program to multiple targets simultaneously. Signed-off-by: Toke Høiland-Jørgensen --- .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 171 .../selftests/bpf/progs/freplace_get_constant.c|

[PATCH bpf-next v5 4/8] bpf: support attaching freplace programs to multiple attach points

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen This enables support for attaching freplace programs to multiple attach points. It does this by amending the UAPI for bpf_link_Create with a target btf ID that can be used to supply the new attachment point along with the target program fd. The target must be compatib

[PATCH v3 bpf-next] selftests/bpf: merge most of test_btf into test_progs

2020-09-15 Thread Andrii Nakryiko
Merge 183 tests from test_btf into test_progs framework to be exercised regularly. All the test_btf tests that were moved are modeled as proper sub-tests in test_progs framework for ease of debugging and reporting. No functional or behavioral changes were intended, I tried to preserve original beh

[PATCH net-next 0/5] nexthop: Small changes

2020-09-15 Thread Ido Schimmel
From: Ido Schimmel This patch set contains a few small changes that I split out of the RFC I sent last week [1]. Main change is the conversion of the nexthop notification chain to a blocking chain so that it could be reused by device drivers for nexthop objects programming in the future. Tested

[PATCH net-next 1/5] nexthop: Remove unused function declaration from header file

2020-09-15 Thread Ido Schimmel
From: Ido Schimmel Not used or implemented anywhere. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern --- include/net/nexthop.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/net/nexthop.h b/include/net/nexthop.h index 3a4f9e3b91a5..2e44efe5709b 100644 --- a/include/net/nex

[PATCH bpf-next v5 2/8] bpf: verifier: refactor check_attach_btf_id()

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The check_attach_btf_id() function really does three things: 1. It performs a bunch of checks on the program to ensure that the attachment is valid. 2. It stores a bunch of state about the attachment being requested in the verifier environment and struct bpf_p

[PATCH net-next 4/5] nexthop: Only emit a notification when nexthop is actually deleted

2020-09-15 Thread Ido Schimmel
From: Ido Schimmel Currently, the in-kernel delete notification is emitted from the error path of nexthop_add() and replace_nexthop(), which can be confusing to in-kernel listeners as they are not familiar with the nexthop. Instead, only emit the notification when the nexthop is actually deleted

[PATCH bpf-next v5 5/8] bpf: Fix context type resolving for extension programs

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen Eelco reported we can't properly access arguments if the tracing program is attached to extension program. Having following program: SEC("classifier/test_pkt_md_access") int test_pkt_md_access(struct __sk_buff *skb) with its extension: SEC("freplace/test_pkt

[PATCH bpf-next v5 3/8] bpf: move prog->aux->linked_prog and trampoline into bpf_link on attach

2020-09-15 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen In preparation for allowing multiple attachments of freplace programs, move the references to the target program and trampoline into the bpf_tracing_link structure when that is created. To do this atomically, introduce a new mutex in prog->aux to protect writing to th

[PATCH net-next 3/5] nexthop: Convert to blocking notification chain

2020-09-15 Thread Ido Schimmel
From: Ido Schimmel Currently, the only listener of the nexthop notification chain is the VXLAN driver. Subsequent patches will add more listeners (e.g., device drivers such as netdevsim) that need to be able to block when processing notifications. Therefore, convert the notification chain to a b

Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-15 Thread Moshe Shemesh
On 9/14/2020 4:54 PM, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:57AM CEST, mo...@mellanox.com wrote: [..] +static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev) +{ + struct mlx5_fw_reset *fw_reset = dev->priv.fw_reset; + + /* if this is the driver that initiated

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-15 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 7:50 PM Jakub Kicinski wrote: > > On Mon, 14 Sep 2020 13:48:14 + Omer Shpigelman wrote: > > On Thu, Sep 10, 2020 at 11:31 PM Jakub Kicinski wrote: > > > On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote: > > > > > Doesn't seem like this one shows any more informatio

[PATCH bpf] bpf: fix a rcu warning for bpffs map pretty-print

2020-09-15 Thread Yonghong Song
Running selftest ./btf_btf -p the kernel had the following warning: [ 51.528185] WARNING: CPU: 3 PID: 1756 at kernel/bpf/hashtab.c:717 htab_map_get_next_key+0x2eb/0x300 [ 51.529217] Modules linked in: [ 51.529583] CPU: 3 PID: 1756 Comm: test_btf Not tainted 5.9.0-rc1+ #878 [ 51.5

i4oe/XXV710 suspect tx_dropped stats

2020-09-15 Thread Jamal Hadi Salim
Ethtool reporting zero. ip -s reporting non-zero. Which is right? See attached for more details. cheers, jamal some bus info b3:00.0 Ethernet controller: Intel Corporation Ethernet Controller XXV710 for 25GbE SFP28 (rev 02) Subsystem: Super Micro Computer Inc Ethernet Controller XXV710

Re: [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 02:56:48PM CEST, mo...@nvidia.com wrote: > >On 9/15/2020 12:33 AM, Jakub Kicinski wrote: >> External email: Use caution opening links or attachments >> >> >> On Mon, 14 Sep 2020 09:07:48 +0300 Moshe Shemesh wrote: >> > @@ -3011,12 +3060,41 @@ static int devlink_nl_cmd_reload(

Re: [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 02:12:25PM CEST, mo...@nvidia.com wrote: > >On 9/14/2020 3:27 PM, Jiri Pirko wrote: >> Mon, Sep 14, 2020 at 08:07:48AM CEST, mo...@mellanox.com wrote: [..] >> > @@ -7392,6 +7485,11 @@ struct devlink *devlink_alloc(const struct >> > devlink_ops *ops, size_t priv_s

Re: [PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 02:31:38PM CEST, mo...@nvidia.com wrote: > >On 9/15/2020 10:44 AM, Jiri Pirko wrote: >> Tue, Sep 15, 2020 at 08:45:19AM CEST, ido...@idosch.org wrote: >> > On Mon, Sep 14, 2020 at 03:45:00PM +0200, Jiri Pirko wrote: >> > > Mon, Sep 14, 2020 at 08:07:51AM CEST, mo...@mellanox.co

Re: [PATCH net-next RFC v4 03/15] devlink: Add reload action stats

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 02:30:19PM CEST, mo...@nvidia.com wrote: > >On 9/14/2020 4:39 PM, Jiri Pirko wrote: >> Mon, Sep 14, 2020 at 08:07:50AM CEST, mo...@mellanox.com wrote: [..] >> > +/** >> > + *devlink_reload_implicit_actions_performed - Update devlink on >> > reload actions >> > + *

Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-15 Thread Jiri Pirko
Tue, Sep 15, 2020 at 02:44:02PM CEST, mo...@nvidia.com wrote: > >On 9/14/2020 4:54 PM, Jiri Pirko wrote: >> Mon, Sep 14, 2020 at 08:07:57AM CEST, mo...@mellanox.com wrote: >> >> [..] >> >> > +static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev) >> > +{ >> > + struct mlx5_fw_reset

Re: [PATCH 07/17] 53c700: improve non-coherent DMA handling

2020-09-15 Thread James Bottomley
On Tue, 2020-09-15 at 08:27 +0200, Christoph Hellwig wrote: > On Mon, Sep 14, 2020 at 08:20:18AM -0700, James Bottomley wrote: > > If you're going to change the macros from taking a device to taking > > a hostdata structure then the descriptive argument name needs to > > change ... it can't be dev

Re: [PATCH v2 bpf-next] selftests/bpf: merge most of test_btf into test_progs

2020-09-15 Thread Martin KaFai Lau
On Tue, Sep 15, 2020 at 04:37:50PM -0700, Alexei Starovoitov wrote: > On Mon, Sep 14, 2020 at 06:43:41PM -0700, Andrii Nakryiko wrote: > > Move almost 200 tests from test_btf into test_progs framework to be > > exercised > > regularly. Pretty-printing tests were left alone and renamed into > > tes

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-15 Thread Will Deacon
On Tue, Sep 15, 2020 at 04:53:44PM +0300, Ilias Apalodimas wrote: > On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: > > Hi Ilias, > > > > On Mon, Sep 14, 2020 at 07:03:55PM +0300, Ilias Apalodimas wrote: > > > Running the eBPF test_verifier leads to random errors looking like this: >

Re: [PATCH v2 bpf-next] selftests/bpf: merge most of test_btf into test_progs

2020-09-15 Thread Andrii Nakryiko
On Tue, Sep 15, 2020 at 4:37 PM Alexei Starovoitov wrote: > > On Mon, Sep 14, 2020 at 06:43:41PM -0700, Andrii Nakryiko wrote: > > Move almost 200 tests from test_btf into test_progs framework to be > > exercised > > regularly. Pretty-printing tests were left alone and renamed into > > test_btf_p

Re: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels

2020-09-15 Thread Florian Fainelli
On 9/15/2020 4:59 PM, Wong, Vee Khee wrote: My bad... Hi David Miller, (please don't top post) Can you help with the commit message fix or do you want to to send a new patch with the fix since the patches are applied on net-next? It has already been applied, so this is too late, just

RE: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels

2020-09-15 Thread Wong, Vee Khee
My bad... Hi David Miller, Can you help with the commit message fix or do you want to to send a new patch with the fix since the patches are applied on net-next? Regards, Vee Khee > -Original Message- > From: Florian Fainelli > Sent: Wednesday, September 16, 2020 6:54 AM > To: David M

[PATCH v3 net-next] ionic: dynamic interrupt moderation

2020-09-15 Thread Shannon Nelson
Use the dim library to manage dynamic interrupt moderation in ionic. v3: rebase v2: untangled declarations in ionic_dim_work() Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski --- .../ethernet/pensando/ionic/ionic_debugfs.c | 2 + .../net/ethernet/pensando/ionic/ionic_dev.h | 1 +

[PATCH ethtool-next 1/5] update UAPI header copies

2020-09-15 Thread Jakub Kicinski
Update to kernel commit 945c5704887e. Signed-off-by: Jakub Kicinski --- uapi/linux/ethtool_netlink.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h index cebdb52e6a05..8d3926c56769 100644 --- a/ua

[PATCH ethtool-next 2/5] pause: add --json support

2020-09-15 Thread Jakub Kicinski
No change in normal text output: # ./ethtool -a eth0 Pause parameters for eth0: Autonegotiate: on RX: on TX: on RX negotiated: on TX negotiated: on JSON: # ./ethtool --json -a eth0 [ { "ifname": "eth0", "autonegotiate": true, "rx": true,

[PATCH ethtool-next 4/5] add support for stats in subcommands

2020-09-15 Thread Jakub Kicinski
Add new parameters (-I | --include-statistics) which will control requesting statistic dumps from the kernel. Signed-off-by: Jakub Kicinski --- ethtool.8.in | 7 +++ ethtool.c| 8 internal.h | 1 + 3 files changed, 16 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in ind

  1   2   3   4   >