[PATCH v5 01/11] dt-bindings: usb: convert usb-device.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert usb-device.txt to YAML schema usb-device.yaml Signed-off-by: Chunfeng Yun --- v5: changes suggested by Rob: 1. limit the pattern length 2. remove properties description for hard wired USB devices in usb-hcd.yaml depends on series: https://patchwork.kernel.org/project/linux-us

[PATCH v5 07/11] dt-bindings: phy: convert MIPI DSI PHY binding to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert MIPI DSI PHY binding to YAML schema mediatek,dsi-phy.yaml Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Chun-Kuang Hu --- v5: add Reviewed-by Rob & Chun-Kuang v4: 1. add maintainer Philipp add support mt8183 suggested by Chun-

[PATCH v5 08/11] dt-bindings: usb: convert mediatek,musb.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert mediatek,musb.txt to YAML schema mediatek,musb.yaml Cc: Min Guo Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4~v5: no changes v3: add Reviewed-by Rob v2: new patch --- .../devicetree/bindings/usb/mediatek,musb.txt | 57 - .../bindings/usb/mediatek,musb.yaml

[PATCH v5 09/11] dt-bindings: usb: convert mediatek,mtk-xhci.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml Signed-off-by: Chunfeng Yun --- v5: changes suggested by Rob 1. refer to usb-xhci.yaml instead of usb-hcd.yaml 2. remove unnecessary maxItems 3. add items for all phys may be supported 4. change pattern, and limit pattern

[PATCH v5 04/11] dt-bindings: phy: convert phy-mtk-tphy.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert phy-mtk-tphy.txt to YAML schema mediatek,tphy.yaml Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v5: no changes v4: add Reviewed-by Rob v3: 1. fix dt_binding_check error in example after add mtu3.yaml Changes suggested by Rob: 2. fix wrong indentation 3. remove '|' d

[PATCH v5 03/11] dt-bindings: phy: convert phy-mtk-xsphy.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert phy-mtk-xsphy.txt to YAML schema mediatek,xsphy.yaml Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v5: no changes v4: add Reviewed-by Rob v3: 1. remove type for property with standard unit suffix suggested by Rob 2. remove '|' for descritpion 3. fix yamllint warning v

[PATCH v5 05/11] dt-bindings: phy: convert phy-mtk-ufs.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert phy-mtk-ufs.txt to YAML schema mediatek,ufs-phy.yaml Cc: Stanley Chu Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Stanley Chu --- v5: no changes v4: add Reviewed-by Stanley v3: add Reviewed-by Rob v2: fix binding check warning of reg in example --- .../bindings/ph

[PATCH v5 02/11] dt-bindings: net: btusb: change reference file name

2020-12-24 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- v5: add Acked-by Rob v2~v4: no changes --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH v5 10/11] dt-bindings: usb: convert mediatek,mtu3.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml Signed-off-by: Chunfeng Yun --- v5: changes suggested by Rob 1. remove unnecessary maxItems 2. define all phys supported v4: 1. refer to usb-drd.yaml insstead of usb/generic.txt the following ones suggested by Rob: 2. add the

[PATCH v5 06/11] dt-bindings: phy: convert HDMI PHY binding to YAML schema

2020-12-24 Thread Chunfeng Yun
Convert HDMI PHY binding to YAML schema mediatek,hdmi-phy.yaml Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Chun-Kuang Hu --- v5: add Reviewed-by Chun-Kuang v4: add maintainer Philipp v3: add Reviewed-by Rob v2: fix binding check warnin

[PATCH v5 11/11] MAINTAINERS: update MediaTek PHY/USB entry

2020-12-24 Thread Chunfeng Yun
Due to the phy/usb bindings are converted into YAML schema and also renamed, update entries. Meanwhile add drivers/usb/host/mtk-xhci* files. Signed-off-by: Chunfeng Yun --- v3~v5: no changes v2: new patch --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAI

[PATCH net v5 1/2] vhost_net: fix ubuf refcount incorrectly when sendmsg fails

2020-12-24 Thread wangyunjian
From: Yunjian Wang Currently the vhost_zerocopy_callback() maybe be called to decrease the refcount when sendmsg fails in tun. The error handling in vhost handle_tx_zerocopy() will try to decrease the same refcount again. This is wrong. To fix this issue, we only call vhost_net_ubuf_put() when vq

[PATCH net v5 2/2] vhost_net: fix tx queue stuck when sendmsg fails

2020-12-24 Thread wangyunjian
From: Yunjian Wang Currently the driver doesn't drop a packet which can't be sent by tun (e.g bad packet). In this case, the driver will always process the same packet lead to the tx queue stuck. To fix this issue: 1. in the case of persistent failure (e.g bad packet), the driver can skip thi

[PATCH net v5 0/2] fixes for vhost_net

2020-12-24 Thread wangyunjian
From: Yunjian Wang This series include two fixes patches for vhost_net. --- v5: * update patch 2/2 add -ENOBUFS check v4: * update patch 2/2 return check and commit log suggested * by Willem de Bruijn v3: * update patch 2/2 code styles and commit log suggested * by Jason Wang an

Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-24 Thread Jason Wang
On 2020/12/25 上午10:37, Yongji Xie wrote: On Thu, Dec 24, 2020 at 3:37 PM Yongji Xie wrote: On Thu, Dec 24, 2020 at 10:41 AM Jason Wang wrote: On 2020/12/23 下午8:14, Yongji Xie wrote: On Wed, Dec 23, 2020 at 5:05 PM Jason Wang wrote: On 2020/12/22 下午10:52, Xie Yongji wrote: To support vh

Re: [RFC v2 06/13] vduse: Introduce VDUSE - vDPA Device in Userspace

2020-12-24 Thread Jason Wang
On 2020/12/24 下午4:34, Yongji Xie wrote: Yes, the disadvantage is the performance. But it should be simpler (I guess) and we know it can succeed. Yes, another advantage is that we can support the VM using anonymous memory. Exactly. I think I can try this in v3. And the MMU-based IOMMU

Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-24 Thread Jason Wang
On 2020/12/24 下午3:37, Yongji Xie wrote: On Thu, Dec 24, 2020 at 10:41 AM Jason Wang wrote: On 2020/12/23 下午8:14, Yongji Xie wrote: On Wed, Dec 23, 2020 at 5:05 PM Jason Wang wrote: On 2020/12/22 下午10:52, Xie Yongji wrote: To support vhost-vdpa bus driver, we need a way to share the vhost

Re: [PATCH net v4 1/2] vhost_net: fix ubuf refcount incorrectly when sendmsg fails

2020-12-24 Thread Jason Wang
On 2020/12/24 上午10:25, wangyunjian wrote: From: Yunjian Wang Currently the vhost_zerocopy_callback() maybe be called to decrease the refcount when sendmsg fails in tun. The error handling in vhost handle_tx_zerocopy() will try to decrease the same refcount again. This is wrong. To fix this is

[PATCH -net] net: sched: prevent invalid Scell_log shift count

2020-12-24 Thread Randy Dunlap
Check Scell_log shift size in red_check_params() and modify all callers of red_check_params() to pass Scell_log. This prevents a shift out-of-bounds as detected by UBSAN: UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22 shift exponent 72 is too large for 32-bit type 'int' Fixes: 8afa1

Re: [PATCH net v2] tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS

2020-12-24 Thread Jason Wang
On 2020/12/25 上午10:52, wangyunjian wrote: From: Yunjian Wang Currently the tun_napi_alloc_frags() function returns -ENOMEM when the number of iovs exceeds MAX_SKB_FRAGS + 1. However this is inappropriate, we should use -EMSGSIZE instead of -ENOMEM. The following distinctions are matters: 1.

Re: [PATCH net v4 2/2] vhost_net: fix tx queue stuck when sendmsg fails

2020-12-24 Thread Jason Wang
On 2020/12/24 下午5:09, wangyunjian wrote: -EAGAIN and -ENOBFS are fine. But I don't see how -ENOMEM can be returned. The tun_build_skb() and tun_napi_alloc_frags() return -ENOMEM when memory allocation fails. Thanks You're right. So I think we need check them all. In the future, we need th

[PATCH v4] net: neighbor: fix a crash caused by mod zero

2020-12-24 Thread weichenchen
pneigh_enqueue() tries to obtain a random delay by mod NEIGH_VAR(p, PROXY_DELAY). However, NEIGH_VAR(p, PROXY_DELAY) migth be zero at that point because someone could write zero to /proc/sys/net/ipv4/neigh/[device]/proxy_delay after the callers check it. This patch uses prandom_u32_max() to get a

[PATCH net v2] tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS

2020-12-24 Thread wangyunjian
From: Yunjian Wang Currently the tun_napi_alloc_frags() function returns -ENOMEM when the number of iovs exceeds MAX_SKB_FRAGS + 1. However this is inappropriate, we should use -EMSGSIZE instead of -ENOMEM. The following distinctions are matters: 1. the caller need to drop the bad packet when -E

Re: Re: [RFC v2 09/13] vduse: Add support for processing vhost iotlb message

2020-12-24 Thread Yongji Xie
On Thu, Dec 24, 2020 at 3:37 PM Yongji Xie wrote: > > On Thu, Dec 24, 2020 at 10:41 AM Jason Wang wrote: > > > > > > On 2020/12/23 下午8:14, Yongji Xie wrote: > > > On Wed, Dec 23, 2020 at 5:05 PM Jason Wang wrote: > > >> > > >> On 2020/12/22 下午10:52, Xie Yongji wrote: > > >>> To support vhost-vdp

Re: [PATCH v4 10/11] dt-bindings: usb: convert mediatek,mtu3.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
On Mon, 2020-12-21 at 12:26 -0700, Rob Herring wrote: > On Wed, Dec 16, 2020 at 05:30:11PM +0800, Chunfeng Yun wrote: > > Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v4: > > 1. refer to usb-drd.yaml insstead of usb/generic.txt > >

Re: [PATCH] net: phy: realtek: Add support for RTL9000AA/AN

2020-12-24 Thread Andrew Lunn
> +static int rtl9000a_ack_interrupt(struct phy_device *phydev) > +{ > + int err; > + > + err = phy_read(phydev, RTL8211F_INSR); > + > + return (err < 0) ? err : 0; > +} > + > +static int rtl9000a_config_intr(struct phy_device *phydev) > +{ > + u16 val; > + > + if (phydev->inter

[PATCH] net: phy: realtek: Add support for RTL9000AA/AN

2020-12-24 Thread Yuusuke Ashizuka
RTL9000AA/AN as 100BASE-T1 is following: - 100 Mbps - Full duplex - Link Status Change Interrupt Signed-off-by: Yuusuke Ashizuka Signed-off-by: Torii Kenichi --- drivers/net/phy/realtek.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/drivers/net/ph

Re: [PATCH] bpf: fix: address of local auto-variable assigned to a function parameter.

2020-12-24 Thread David Ahern
On 12/24/20 12:01 AM, YANG LI wrote: > Assigning local variable txq to the outputting parameter xdp->txq is not > safe, txq will be released after the end of the function call. > Then the result of using xdp is unpredictable. txq can only be accessed in this devmap context. Was it actually hit du

Re: [PATCH] nfp: remove h from printk format specifier

2020-12-24 Thread Joe Perches
On Thu, 2020-12-24 at 14:14 -0800, Tom Rix wrote: > On 12/24/20 12:21 PM, Simon Horman wrote: > > On Wed, Dec 23, 2020 at 12:20:53PM -0800, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This change fixes the checkpatch warning described in this commit > > > commit cbacb5ab0aa0 ("docs: pr

Re: [PATCH] nfp: remove h from printk format specifier

2020-12-24 Thread Tom Rix
On 12/24/20 12:21 PM, Simon Horman wrote: > On Wed, Dec 23, 2020 at 12:20:53PM -0800, 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] an

Re: [GIT PULL] virtio,vdpa: features, cleanups, fixes

2020-12-24 Thread pr-tracker-bot
The pull request you sent on Wed, 23 Dec 2020 07:24:48 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/64145482d3339d71f58857591d021588040543f4 Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe

2020-12-24 Thread Florian Fainelli
On 12/24/2020 10:06 AM, Konstantin Ryabitsev wrote: > On Wed, Dec 23, 2020 at 05:41:46PM -0800, Jakub Kicinski wrote: > Does patchwork not automagically add Fixes: lines from full up emails? > That seems like a reasonable automation. Looks like it's been a TODO for 3 years no

Re: [PATCH net] net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered

2020-12-24 Thread Richard Cochran
On Thu, Dec 24, 2020 at 06:24:05PM +0200, Grygorii Strashko wrote: > The CPTS driver registers PTP PHC clock when first netif is going up and > unregister it when all netif are down. Now ethtool will show: > - PTP PHC clock index 0 after boot until first netif is up; > - the last assigned PTP PHC

Re: [PATCH] nfp: remove h from printk format specifier

2020-12-24 Thread Simon Horman
On Wed, Dec 23, 2020 at 12:20:53PM -0800, 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 a

[PATCH net] ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst()

2020-12-24 Thread Guillaume Nault
RT_TOS() only clears one of the ECN bits. Therefore, when fib_compute_spec_dst() resorts to a fib lookup, it can return different results depending on the value of the second ECN bit. For example, ECT(0) and ECT(1) packets could be treated differently. $ ip netns add ns0 $ ip netns add ns1

Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe

2020-12-24 Thread Konstantin Ryabitsev
On Wed, Dec 23, 2020 at 05:41:46PM -0800, Jakub Kicinski wrote: > > >> Does patchwork not automagically add Fixes: lines from full up emails? > > >> That seems like a reasonable automation. > > > > > > Looks like it's been a TODO for 3 years now: > > > > > > https://github.com/getpatchwork/patc

Re: net: tso: add UDP segmentation support: adds regression for ax200 upload

2020-12-24 Thread Ben Greear
On 12/21/20 12:01 PM, Rainer Suhm wrote: Am 21.12.20 um 20:14 schrieb Eric Dumazet: On Mon, Dec 21, 2020 at 8:04 PM Eric Dumazet wrote: On Mon, Dec 21, 2020 at 7:46 PM Eric Dumazet wrote: On Sat, Dec 19, 2020 at 5:55 PM Ben Greear wrote: On 12/19/20 7:18 AM, Johannes Berg wrote: On Fri

[PATCH net] net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered

2020-12-24 Thread Grygorii Strashko
The CPTS driver registers PTP PHC clock when first netif is going up and unregister it when all netif are down. Now ethtool will show: - PTP PHC clock index 0 after boot until first netif is up; - the last assigned PTP PHC clock index even if PTP PHC clock is not registered any more after all net

Re: [PATCH v5 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-24 Thread Jesper Dangaard Brouer
On Tue, 22 Dec 2020 22:09:29 +0100 Lorenzo Bianconi wrote: > Introduce xdp_prepare_buff utility routine to initialize per-descriptor > xdp_buff fields (e.g. xdp_buff pointers). Rely on xdp_prepare_buff() in > all XDP capable drivers. > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net/ethe

Re: [PATCH net] tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS

2020-12-24 Thread Willem de Bruijn
On Thu, Dec 24, 2020 at 6:51 AM wangyunjian wrote: > > From: Yunjian Wang > > Currently the tun_napi_alloc_frags() function returns -ENOMEM when the > number of iovs exceeds MAX_SKB_FRAGS + 1. However this is inappropriate, > we should use -EMSGSIZE instead of -ENOMEM. > > Fixes: 90e33d459407 ("t

Re: [PATCH net] ppp: hold mutex when unbridging channels in unregister path

2020-12-24 Thread Guillaume Nault
On Thu, Dec 24, 2020 at 02:24:32PM +, Tom Parkin wrote: > On Thu, Dec 24, 2020 at 11:28:18 +0100, Guillaume Nault wrote: > > On Wed, Dec 23, 2020 at 06:47:30PM +, Tom Parkin wrote: > > > Channels are bridged using the PPPIOCBRIDGECHAN ioctl, which executes > > > with the ppp_mutex held. >

Re: [PATCH v5 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine

2020-12-24 Thread Jesper Dangaard Brouer
On Tue, 22 Dec 2020 22:09:28 +0100 Lorenzo Bianconi wrote: > Introduce xdp_init_buff utility routine to initialize xdp_buff fields > const over NAPI iterations (e.g. frame_sz or rxq pointer). Rely on > xdp_init_buff in all XDP capable drivers. > > Signed-off-by: Lorenzo Bianconi > --- > driver

[PATCH net-next v2 1/6] bcm63xx_enet: batch process rx path

2020-12-24 Thread Sieng Piaw Liew
Use netif_receive_skb_list to batch process rx skb. Tested on BCM6328 320 MHz using iperf3 -M 512, increasing performance by 12.5%. Before: [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-30.00 sec 120 MBytes 33.7 Mbits/sec 277 sender [ 4] 0.00-30.00 sec

[PATCH net-next v2 0/6] bcm63xx_enet: major makeover of driver

2020-12-24 Thread Sieng Piaw Liew
This patch series aim to improve the bcm63xx_enet driver by integrating the latest networking features, i.e. batched rx processing, BQL, build_skb, etc. The newer enetsw SoCs are found to be able to do unaligned rx DMA by adding NET_IP_ALIGN padding which, combined with these patches, improved pac

[PATCH net-next v2 6/6] bcm63xx_enet: improve rx loop

2020-12-24 Thread Sieng Piaw Liew
Use existing rx processed count to track against budget, thereby making budget decrement operation redundant. rx_desc_count can be calculated outside the rx loop, making the loop a bit smaller. Signed-off-by: Sieng Piaw Liew --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++-- 1 file chan

[PATCH net-next v2 5/6] bcm63xx_enet: convert to build_skb

2020-12-24 Thread Sieng Piaw Liew
We can increase the efficiency of rx path by using buffers to receive packets then build SKBs around them just before passing into the network stack. In contrast, preallocating SKBs too early reduces CPU cache efficiency. Check if we're in NAPI context when refilling RX. Normally we're almost alwa

[PATCH net-next v2 2/6] bcm63xx_enet: add BQL support

2020-12-24 Thread Sieng Piaw Liew
Add Byte Queue Limits support to reduce/remove bufferbloat in bcm63xx_enet. Signed-off-by: Sieng Piaw Liew --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/b

[PATCH net-next v2 3/6] bcm63xx_enet: add xmit_more support

2020-12-24 Thread Sieng Piaw Liew
Support bulking hardware TX queue by using netdev_xmit_more(). Signed-off-by: Sieng Piaw Liew --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broa

[PATCH net-next v2 4/6] bcm63xx_enet: alloc rx skb with NET_IP_ALIGN

2020-12-24 Thread Sieng Piaw Liew
Use netdev_alloc_skb_ip_align on newer SoCs with integrated switch (enetsw) when refilling RX. Increases packet processing performance by 30% (with netif_receive_skb_list). Non-enetsw SoCs cannot function with the extra pad so continue to use the regular netdev_alloc_skb. Tested on BCM6328 320 MH

Re: [PATCH net] ppp: hold mutex when unbridging channels in unregister path

2020-12-24 Thread Tom Parkin
On Thu, Dec 24, 2020 at 11:28:18 +0100, Guillaume Nault wrote: > On Wed, Dec 23, 2020 at 06:47:30PM +, Tom Parkin wrote: > > Channels are bridged using the PPPIOCBRIDGECHAN ioctl, which executes > > with the ppp_mutex held. > > > > Unbridging may occur in two code paths: firstly an explicit >

Re: [RFC PATCH 1/3] chelsio: cxgb: Remove ndo_poll_controller()

2020-12-24 Thread Ahmed S. Darwish
[[ Actually adding Eric to Cc ]] On Thu, Dec 24, 2020 at 02:11:46PM +0100, Ahmed S. Darwish wrote: > Since commit ac3d9dd034e5 ("netpoll: make ndo_poll_controller() > optional"), networking drivers which use NAPI for clearing their TX > completions should not provide an ndo_poll_controller(). Netp

[PATCH v2 -next] intel: iwlwifi: use DEFINE_MUTEX() for mutex lock

2020-12-24 Thread Zheng Yongjun
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl

[PATCH v2 -next] atmel: at76c50x: use DEFINE_MUTEX() for mutex lock

2020-12-24 Thread Zheng Yongjun
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun --- drivers/net/wireless/atmel/at76c50x-usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c

[RFC PATCH 3/3] chelsio: cxgb: Do not schedule a workqueue for external interrupts

2020-12-24 Thread Ahmed S. Darwish
cxgb's "elmer0" external interrupt handling code requires task context, so originally a workqueue was scheduled for it from the hardirq handler. Now that all of the external interrupt handling, elmer0 included, is run from a threaded-irq context, just directly call the real handler. Remove all th

[RFC PATCH 2/3] chelsio: cxgb: Move slow interrupt handling to threaded irqs

2020-12-24 Thread Ahmed S. Darwish
The t1_interrupt() irq handler calls del_timer_sync() down the chain: sge.c: t1_interrupt() -> subr.c: t1_slow_intr_handler() -> asic_slow_intr() || fpga_slow_intr() -> t1_pci_intr_handler() -> cxgb2.c: t1_fatal_err() # Cont. at [*] -> fpga_slow_

[RFC PATCH 1/3] chelsio: cxgb: Remove ndo_poll_controller()

2020-12-24 Thread Ahmed S. Darwish
Since commit ac3d9dd034e5 ("netpoll: make ndo_poll_controller() optional"), networking drivers which use NAPI for clearing their TX completions should not provide an ndo_poll_controller(). Netpoll simply triggers the necessary TX queues cleanup by synchronously calling the driver's NAPI poll handle

[RFC PATCH 0/3] chelsio: cxgb: Use threaded irqs

2020-12-24 Thread Ahmed S. Darwish
Folks, The t1_interrupt() irq handler calls del_timer_sync() down the chain: sge.c: t1_interrupt() -> subr.c: t1_slow_intr_handler() -> asic_slow_intr() || fpga_slow_intr() -> t1_pci_intr_handler() -> cxgb2.c: t1_fatal_err()# Cont. at [*] -> fp

[PATCH net] tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS

2020-12-24 Thread wangyunjian
From: Yunjian Wang Currently the tun_napi_alloc_frags() function returns -ENOMEM when the number of iovs exceeds MAX_SKB_FRAGS + 1. However this is inappropriate, we should use -EMSGSIZE instead of -ENOMEM. Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Yu

RE: [PATCH net 1/1] qede: fix offload for IPIP tunnel packets

2020-12-24 Thread Manish Chopra
> -Original Message- > From: Manish Chopra > Sent: Monday, December 21, 2020 8:26 PM > To: da...@davemloft.net > Cc: netdev@vger.kernel.org; Ariel Elior ; Igor Russkikh > ; Sudarsana Reddy Kalluru > Subject: [PATCH net 1/1] qede: fix offload for IPIP tunnel packets > > IPIP tunnels packe

Re: [PATCH net] ppp: hold mutex when unbridging channels in unregister path

2020-12-24 Thread Guillaume Nault
On Wed, Dec 23, 2020 at 06:47:30PM +, Tom Parkin wrote: > Channels are bridged using the PPPIOCBRIDGECHAN ioctl, which executes > with the ppp_mutex held. > > Unbridging may occur in two code paths: firstly an explicit > PPPIOCUNBRIDGECHAN ioctl, and secondly on channel unregister. The > latt

Re: Re: [PATCH] enic: Remove redundant free in enic_set_ringparam

2020-12-24 Thread dinghao . liu
> On Wed, 23 Dec 2020 20:38:33 +0800 Dinghao Liu wrote: > > The error handling paths in enic_alloc_vnic_resources() > > have called enic_free_vnic_resources() before returning. > > So we may not need to call it again on failure at caller > > side. > > > > Signed-off-by: Dinghao Liu > > But it's

Re: [net,v2] net/packet: fix packet receive on L3 devices without visible hard header

2020-12-24 Thread Xie He
On Fri, Nov 20, 2020 at 10:28 PM Eyal Birger wrote: > > Fix by changing af_packet RX ll visibility criteria to include the > existence of a '.create()' header operation, which is used when creating > a device hard header - via dev_hard_header() - by upper layers, and does > not exist in these L3 d

Re: [PATCH AUTOSEL 5.4 075/130] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-12-24 Thread Xie He
On Wed, Dec 23, 2020 at 9:01 AM Xie He wrote: > > I don't think this patch is suitable for stable branches. This patch is > part of a patch series that changes the lapb module from "establishing the > L2 connection only when needed by L3", to "establishing the L2 connection > automatically wheneve

RE: [PATCH net v4 2/2] vhost_net: fix tx queue stuck when sendmsg fails

2020-12-24 Thread wangyunjian
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, December 24, 2020 1:56 PM > To: wangyunjian > Cc: netdev@vger.kernel.org; m...@redhat.com; > willemdebruijn.ker...@gmail.com; virtualizat...@lists.linux-foundation.org; > Lilijun (Jerry) ; chenchanghu >

Re: [PATCH v4 09/11] dt-bindings: usb: convert mediatek,mtk-xhci.txt to YAML schema

2020-12-24 Thread Chunfeng Yun
On Mon, 2020-12-21 at 12:23 -0700, Rob Herring wrote: > On Wed, Dec 16, 2020 at 05:30:10PM +0800, Chunfeng Yun wrote: > > Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v4: update it according to Rob's suggestion > > 1. modify

Re: Re: [RFC v2 06/13] vduse: Introduce VDUSE - vDPA Device in Userspace

2020-12-24 Thread Yongji Xie
On Thu, Dec 24, 2020 at 11:01 AM Jason Wang wrote: > > > On 2020/12/23 下午10:17, Yongji Xie wrote: > > On Wed, Dec 23, 2020 at 4:08 PM Jason Wang wrote: > >> > >> On 2020/12/22 下午10:52, Xie Yongji wrote: > >>> This VDUSE driver enables implementing vDPA devices in userspace. > >>> Both control pat

[PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared.

2020-12-24 Thread YANG LI
Symbol 'btf_vmlinux' was not declared in the header file and does not add extern, so no other file uses it. It's better to add static to it. Signed-off-by: YANG LI Reported-by: Abaci --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/verifi