general protection fault in find_match (2)

2020-12-22 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:3db1a3fa Merge tag 'staging-5.11-rc1' of git://git.kernel... git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=1103eadf50 kernel config: https://syzkaller.appspot.com/x/.config?x=2764fc28a92339f9 das

[RFC PATCH 0/1] net: arcnet: Fix RESET sequence

2020-12-22 Thread Ahmed S. Darwish
Folks, At drivers/net/arcnet/arcnet.c, there is: irqreturn_t arcnet_interrupt(int irq, void *dev_id) { ... if (status & RESETflag) { arcnet_close(dev); arcnet_open(dev); } ... } struct net_device_ops arcnet_netdev_ops = {

[RFC PATCH 1/1] net: arcnet: Fix RESET flag handling

2020-12-22 Thread Ahmed S. Darwish
The main arcnet interrupt handler calls arcnet_close() then arcnet_open(), if the RESET status flag is encountered. This is invalid: 1) In general, interrupt handlers should never call ->ndo_stop() and ->ndo_open() functions. They are usually full of blocking calls and other methods t

Re: [PATCH net v2 2/3] net: move the xps cpus retrieval out of net-sysfs

2020-12-22 Thread Antoine Tenart
Hi Alexander, Quoting Alexander Duyck (2020-12-21 23:33:15) > > One thing I might change is to actually bump this patch up in the > patch set as I think it would probably make things a bit cleaner to > read as you are going to be moving the other functions to this pattern > as well. Right. If it

Re: [PATCH net v2 1/3] net: fix race conditions in xps by locking the maps and dev->tc_num

2020-12-22 Thread Antoine Tenart
Hello Alexander, Jakub, Quoting Alexander Duyck (2020-12-22 00:21:57) > > Looking over this patch it seems kind of obvious that extending the > xps_map_mutex is making things far more complex then they need to be. > > Applying the rtnl_mutex would probably be much simpler. Although as I > think

Re: [PATCH v3 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-22 Thread Marcel Holtmann
Hi Archie, >>> When the controller is powered off, the registered advertising monitor >>> is removed from the controller. This patch handles the re-registration >>> of those monitors when the power is on. >>> >>> Signed-off-by: Archie Pusaka >>> Reviewed-by: Miao-chen Chou >>> Reviewed-by: Yun-

Re: [RFC PATCH v2 1/8] dt-bindings: net: sparx5: Add sparx5-switch bindings

2020-12-22 Thread Steen Hegelund
Hi Rob, On Mon, 2020-12-21 at 14:40 -0700, Rob Herring wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > On Thu, Dec 17, 2020 at 08:51:27AM +0100, Steen Hegelund wrote: > > Document the Sparx5 switch device driver bindings > > > > Signed-of

RE: [PATCH V5 0/5] can: flexcan: add stop mode support for i.MX8QM

2020-12-22 Thread Joakim Zhang
> -Original Message- > From: Marc Kleine-Budde > Sent: 2020年11月6日 19:33 > To: Joakim Zhang ; robh...@kernel.org; > shawn...@kernel.org; s.ha...@pengutronix.de > Cc: ker...@pengutronix.de; dl-linux-imx ; > linux-...@vger.kernel.org; netdev@vger.kernel.org; > linux-ker...@vger.kernel.org >

Re: [PATCH V5 0/5] can: flexcan: add stop mode support for i.MX8QM

2020-12-22 Thread Marc Kleine-Budde
On 12/22/20 12:37 PM, Joakim Zhang wrote: > How about below patches? I even can't see it in your linux-can-next/testing > branch. Are these missed? > dt-bindings: can: flexcan: add fsl,scu-index property to indicate a > resource > can: flexcan: add CAN wakeup function for i.MX8QM The

[PATCH] rtw88: coex: remove useless if and else

2020-12-22 Thread Tian Tao
Fix the following coccinelle report: drivers/net/wireless/realtek/rtw88/coex.c:1619:3-5: WARNING: possible condition with no effect (if == else) Signed-off-by: Tian Tao --- drivers/net/wireless/realtek/rtw88/coex.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers

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

2020-12-22 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 makes pneigh_enqueue() get a del

Re: [PATCH] dt-bindings: net: qcom,ipa: Drop unnecessary type ref on 'memory-region'

2020-12-22 Thread Alex Elder
On 12/21/20 10:01 PM, Rob Herring wrote: 'memory-region' is a common property, so it doesn't need a type ref here. Acked-by: Alex Elder Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Alex Elder Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring --- I'll take this via the DT tree. Doc

[PATCH net-next] net: tipc: Replace expression with offsetof()

2020-12-22 Thread Zheng Yongjun
Use the existing offsetof() macro instead of duplicating code. Signed-off-by: Zheng Yongjun --- net/tipc/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c index 6dce2abf436e..48fac3b17e40 100644 --- a/net/tipc/monitor.c +++ b/ne

[PATCH -next] scsi: megaraid: Remove unnecessary memset

2020-12-22 Thread Zheng Yongjun
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 --- drivers/net/wireless/ath/wcn36xx/smd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ath/w

[PATCH -next] scsi: megaraid: Remove unnecessary memset

2020-12-22 Thread Zheng Yongjun
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 --- drivers/net/wireless/ath/wcn36xx/smd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ath/w

[RFC PATCH v2 net-next 01/15] net: dsa: tag_8021q: add helpers to deduce whether a VLAN ID is RX or TX VLAN

2020-12-22 Thread Vladimir Oltean
The sja1105 implementation can be blind about this, but the felix driver doesn't do exactly what it's being told, so it needs to know whether it is a TX or an RX VLAN, so it can install the appropriate type of TCAM rule. Signed-off-by: Vladimir Oltean --- Changes in v2: None. include/linux/dsa/

[RFC PATCH v2 net-next 00/15] tag_8021q for Ocelot switches

2020-12-22 Thread Vladimir Oltean
The Felix switch inside LS1028A has an issue. It has a 2.5G CPU port, and the external ports, in the majority of use cases, run at 1G. This means that, when the CPU injects traffic into the switch, it is very easy to run into congestion. This is not to say that it is impossible to enter congestion

[RFC PATCH v2 net-next 02/15] net: mscc: ocelot: export VCAP structures to include/soc/mscc

2020-12-22 Thread Vladimir Oltean
The Felix driver will need to preinstall some VCAP filters for its tag_8021q implementation (outside of the tc-flower offload logic), so these need to be exported to the common includes. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/ethernet/mscc/ocelot_net.c |

[RFC PATCH v2 net-next 06/15] net: mscc: ocelot: only drain extraction queue on error

2020-12-22 Thread Vladimir Oltean
It appears that the intention of this snippet of code is to not exit ocelot_xtr_irq_handler() while in the middle of extracting a frame. The problem in extracting it word by word is that future extraction attempts are really easy to get desynchronized, since the IRQ handler assumes that the first 1

[RFC PATCH v2 net-next 05/15] net: mscc: ocelot: stop returning IRQ_NONE in ocelot_xtr_irq_handler

2020-12-22 Thread Vladimir Oltean
Since the xtr (extraction) IRQ of the ocelot switch is not shared, then if it fired, it means that some data must be present in the queues of the CPU port module. So simplify the code. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/ethernet/mscc/ocelot_vsc7514.c | 7

[RFC PATCH v2 net-next 08/15] net: mscc: ocelot: better error handling in ocelot_xtr_irq_handler

2020-12-22 Thread Vladimir Oltean
The ocelot_rx_frame_word() function can return a negative error code, however this isn't being checked for consistently. Also, some constructs can be simplified by using "goto" instead of repeated "break" statements. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/e

[RFC PATCH v2 net-next 07/15] net: mscc: ocelot: just flush the CPU extraction group on error

2020-12-22 Thread Vladimir Oltean
This procedure should yield the same effect as manually reading out the extraction data just to discard it. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/ethernet/mscc/ocelot_vsc7514.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drive

[RFC PATCH v2 net-next 04/15] net: dsa: felix: add new VLAN-based tagger

2020-12-22 Thread Vladimir Oltean
There are use cases for which the existing tagger, based on the NPI (Node Processor Interface) functionality, is insufficient. Namely: - Frames injected through the NPI port bypass the frame analyzer, so no source address learning is performed, no TSN stream classification, etc. - Flow control

[RFC PATCH v2 net-next 09/15] net: mscc: ocelot: use DIV_ROUND_UP helper in ocelot_port_inject_frame

2020-12-22 Thread Vladimir Oltean
This looks a bit nicer than the open-coded "(x + 3) % 4" idiom. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/ethernet/mscc/ocelot_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethern

[RFC PATCH v2 net-next 10/15] net: mscc: ocelot: refactor ocelot_port_inject_frame out of ocelot_port_xmit

2020-12-22 Thread Vladimir Oltean
The felix DSA driver will inject some frames through register MMIO, same as ocelot switchdev currently does. So we need to be able to reuse the common code. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/ethernet/mscc/ocelot.c | 78 + dri

[RFC PATCH v2 net-next 03/15] net: mscc: ocelot: store a namespaced VCAP filter ID

2020-12-22 Thread Vladimir Oltean
We will be adding some private VCAP filters that should not interfere in any way with the filters added using tc-flower. So we need to allocate some IDs which will not be used by tc. Currently ocelot uses an u32 id derived from the flow cookie, which in itself is an unsigned long. This is a proble

[RFC PATCH v2 net-next 11/15] net: mscc: ocelot: export struct ocelot_frame_info

2020-12-22 Thread Vladimir Oltean
Because felix DSA must now be able to extract a frame in 2 stages over MMIO (first the XFH then the frame data), it needs access to this internal ocelot structure that holds the unpacked information from the Extraction Frame Header. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new.

[RFC PATCH v2 net-next 12/15] net: mscc: ocelot: refactor ocelot_xtr_irq_handler into ocelot_xtr_poll

2020-12-22 Thread Vladimir Oltean
Since the felix DSA driver will need to poll the CPU port module for extracted frames as well, let's create some common functions that read an Extraction Frame Header, and then an skb, from a CPU extraction group. This is so complicated, because the procedure to retrieve a struct net_device pointe

[RFC PATCH v2 net-next 13/15] net: dsa: felix: setup MMIO filtering rules for PTP when using tag_8021q

2020-12-22 Thread Vladimir Oltean
Since the tag_8021q tagger is software-defined, it has no means by itself for retrieving hardware timestamps of PTP event messages. Because we do want to support PTP on ocelot even with tag_8021q, we need to use the CPU port module for that. The RX timestamp is present in the Extraction Frame Head

[RFC PATCH net-next 15/15] net: dsa: tag_ocelot_8021q: add support for PTP timestamping

2020-12-22 Thread Vladimir Oltean
On TX, use the result of the ptp_classify_raw() BPF classifier from dsa_skb_tx_timestamp() to divert some frames over to the MMIO-based injection registers. On RX, set up a VCAP IS2 rule that redirects the frames with an EtherType for 1588 to the CPU port module (for MMIO based extraction) and, if

[RFC PATCH v2 net-next 14/15] net: dsa: felix: use promisc on master for PTP with tag_8021q

2020-12-22 Thread Vladimir Oltean
This is for the "no extraction IRQ" workaround, where the DSA master on LS1028A (enetc) serves as a de-facto irqchip. It needs to be promiscuous so that it will never drop a PTP frame (sent to the 01-80-c2-00-00-0e multicast MAC address), otherwise the tagger will get confused about which Ethernet

Re: [RFC PATCH v2 3/8] net: sparx5: add hostmode with phylink support

2020-12-22 Thread Steen Hegelund
Hi Andrew, On Sat, 2020-12-19 at 20:51 +0100, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > > + /* Create a phylink for PHY management.  Also handles SFPs */ > > + spx5_port->phylink_config.dev = &spx5_port->ndev->dev

[PATCH wireless v3 -next] brcmfmac: Delete useless kfree code

2020-12-22 Thread Zheng Yongjun
A null pointer will be passed to a kfree() call after a kzalloc() call failed. This code is useless. Thus delete the extra function call. A goto statement is also no longer needed. Thus adjust an if branch. Signed-off-by: Zheng Yongjun --- .../wireless/broadcom/brcm80211/brcmfmac/firmware.c

RE: [PATCH v3] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer

2020-12-22 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Monday, December 7, 2020 8:53 PM > > From: Andres Beltran > > Pointers to ring-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

Re: Reporting SFP presence status

2020-12-22 Thread Andrew Lunn
On Tue, Dec 22, 2020 at 07:28:10AM +0100, Martin Hundebøll wrote: > Hi Andrew, > > On 21/12/2020 16.22, Andrew Lunn wrote: > > On Mon, Dec 21, 2020 at 11:37:55AM +0100, Martin Hundebøll wrote: > > > Hi Andrew, > > > > > > I've browsed the code in drivers/net/phy, but haven't found a place where >

Re: [PATCH net v2 2/2] vhost_net: fix high cpu load when sendmsg fails

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 11:41 PM Jason Wang wrote: > > > On 2020/12/22 上午7:07, Willem de Bruijn wrote: > > On Wed, Dec 16, 2020 at 3:20 AM wangyunjian wrote: > >> From: Yunjian Wang > >> > >> Currently we break the loop and wake up the vhost_worker when > >> sendmsg fails. When the worker wakes u

Re: [PATCH -next] scsi: megaraid: Remove unnecessary memset

2020-12-22 Thread Kalle Valo
Zheng Yongjun writes: > 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 > --- > drivers/net/wireless/ath/wcn36xx/smd.c | 1 - > 1 file changed, 1 deletion(-)

Re: [RFC PATCH v2 3/8] net: sparx5: add hostmode with phylink support

2020-12-22 Thread Andrew Lunn
On Tue, Dec 22, 2020 at 10:46:12AM +0100, Steen Hegelund wrote: > Hi Andrew, > > On Sat, 2020-12-19 at 20:51 +0100, Andrew Lunn wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you > > know the content is safe > > > > > + /* Create a phylink for PHY management.  Also h

Re: [PATCH 05/12 v2 RFC] skbuff: replace sock_zerocopy_put() with skb_zcopy_put()

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > Replace sock_zerocopy_put with the generic skb_zcopy_put() > function. Pass 'true' as the success argument, as this > is identical to no change. > > Signed-off-by: Jonathan Lemon uarg->zerocopy may be false if s

Re: [PATCH 01/12 v2 RFC] net: group skb_shinfo zerocopy related bits together.

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > In preparation for expanded zerocopy (TX and RX), move > the ZC related bits out of tx_flags into their own flag > word. > > Signed-off-by: Jonathan Lemon I think it's better to expand tx_flags to a u16 and add t

Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > Before this change, the caller of sock_zerocopy_callback would > need to save the zerocopy status, decrement and check the refcount, > and then call the callback function - the callback was only invoked > when the

Re: [PATCH 03/12 v2 RFC] skbuff: simplify sock_zerocopy_put

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > All 'struct ubuf_info' users should have a callback defined. > Remove the dead code path to consume_skb(), which makes > unwarranted assumptions about how the structure was allocated. > > Signed-off-by: Jonathan Le

kernel BUG at lib/string.c:LINE! (6)

2020-12-22 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:d64c6f96 Merge tag 'net-5.11-rc1' of git://git.kernel.org/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10bc561350 kernel config: https://syzkaller.appspot.com/x/.config?x=aca0dc5c721fe9e5 das

[RFC v2 00/13] Introduce VDUSE - vDPA Device in Userspace

2020-12-22 Thread Xie Yongji
This series introduces a framework, which can be used to implement vDPA Devices in a userspace program. The work consist of two parts: control path forwarding and data path offloading. In the control path, the VDUSE driver will make use of message mechnism to forward the config operation from vdpa

[RFC v2 02/13] eventfd: track eventfd_signal() recursion depth separately in different cases

2020-12-22 Thread Xie Yongji
Now we have a global percpu counter to limit the recursion depth of eventfd_signal(). This can avoid deadlock or stack overflow. But in stack overflow case, it should be OK to increase the recursion depth if needed. So we add a percpu counter in eventfd_ctx to limit the recursion depth for deadlock

[RFC v2 03/13] eventfd: Increase the recursion depth of eventfd_signal()

2020-12-22 Thread Xie Yongji
Increase the recursion depth of eventfd_signal() to 1. This will be used in VDUSE case later. Signed-off-by: Xie Yongji --- fs/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 2df24f9bada3..478cdc175949 100644 --- a/fs/eventfd.c +++

[RFC v2 04/13] vdpa: Remove the restriction that only supports virtio-net devices

2020-12-22 Thread Xie Yongji
With VDUSE, we should be able to support all kinds of virtio devices. Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 29 +++-- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 29ed4173f04e..448be7875b6d

[RFC v2 01/13] mm: export zap_page_range() for driver use

2020-12-22 Thread Xie Yongji
Export zap_page_range() for use in VDUSE. Signed-off-by: Xie Yongji --- mm/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory.c b/mm/memory.c index 7d608765932b..edd2d6497bb3 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1542,6 +1542,7 @@ void zap_page_range(struct vm_area_s

[RFC v2 13/13] vduse: Introduce a workqueue for irq injection

2020-12-22 Thread Xie Yongji
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 --- drivers/vdpa/vdpa_user/eventfd.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/eventfd.c b/

[RFC v2 07/13] vduse: support get/set virtqueue state

2020-12-22 Thread Xie Yongji
This patch makes vhost-vdpa bus driver can get/set virtqueue state from userspace VDUSE process. Signed-off-by: Xie Yongji --- Documentation/driver-api/vduse.rst | 4 +++ drivers/vdpa/vdpa_user/vduse_dev.c | 54 ++ include/uapi/linux/vduse.h | 9

[RFC v2 08/13] vdpa: Introduce process_iotlb_msg() in vdpa_config_ops

2020-12-22 Thread Xie Yongji
This patch introduces a new method in the vdpa_config_ops to support processing the raw vhost memory mapping message in the vDPA device driver. Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 5 - include/linux/vdpa.h | 7 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff -

[RFC v2 05/13] vdpa: Pass the netlink attributes to ops.dev_add()

2020-12-22 Thread Xie Yongji
Pass the netlink attributes to ops.dev_add() so that we could get some device specific attributes when creating a vdpa device. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa.c | 2 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- include/linux/vdpa.h | 4 +++- 3 files chang

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

2020-12-22 Thread Xie Yongji
To support vhost-vdpa bus driver, we need a way to share the vhost-vdpa backend process's memory with the userspace VDUSE process. This patch tries to make use of the vhost iotlb message to achieve that. We will get the shm file from the iotlb message and pass it to the userspace VDUSE process. S

[RFC v2 10/13] vduse: grab the module's references until there is no vduse device

2020-12-22 Thread Xie Yongji
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 --- drivers/vdpa/vdpa_user/vduse_dev.c | 2 ++ 1 file changed, 2 insertions(

Re: [PATCH 12/12 v2 RFC] skbuff: rename sock_zerocopy_* to msg_zerocopy_*

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > At Willem's suggestion, rename the sock_zerocopy_* functions > so that they match the MSG_ZEROCOPY flag, which makes it clear > they are specific to this zerocopy implementation. > > Signed-off-by: Jonathan Lemon

[RFC v2 12/13] vduse: Add memory shrinker to reclaim bounce pages

2020-12-22 Thread Xie Yongji
Add a shrinker to reclaim several pages used by bounce buffer in order to avoid memory pressures. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/vduse_dev.c | 51 ++ 1 file changed, 51 insertions(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/dri

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

2020-12-22 Thread Xie Yongji
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 operation from vdpa bus driver to userspace. User

[RFC v2 11/13] vduse/iova_domain: Support reclaiming bounce pages

2020-12-22 Thread Xie Yongji
Introduce vduse_domain_reclaim() to support reclaiming bounce page when necessary. We will do reclaiming chunk by chunk. And only reclaim the iova chunk that no one used. Signed-off-by: Xie Yongji --- drivers/vdpa/vdpa_user/iova_domain.c | 83 ++-- drivers/vdpa/vd

Re: [PATCH 02/12 v2 RFC] skbuff: remove unused skb_zcopy_abort function

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > skb_zcopy_abort() has no in-tree consumers, remove it. > > Signed-off-by: Jonathan Lemon Acked-by: Willem de Bruijn Indeed unused. This was used in the packet and raw zerocopy patches in the original patchset.

Re: [PATCH 09/12 v2 RFC] skbuff: add zc_flags to ubuf_info for ubuf setup

2020-12-22 Thread Willem de Bruijn
On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > Currently, an ubuf is attached to a new skb, the skb zc_flags > is initialized to a fixed value. Instead of doing this, set > the default zc_flags in the ubuf, and have new skb's inherit > from this default. > > T

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Andrew Lunn
> > > +static void sparx5_board_init(struct sparx5 *sparx5) > > > +{ > > > + int idx; > > > + > > > + if (!sparx5->sd_sgpio_remapping) > > > + return; > > > + > > > + /* Enable SGPIO Signal Detect remapping */ > > > + spx5_rmw(GCB_HW_SGPIO_SD_CFG_SD_MAP_SEL, > > > + 

Re: [PATCH v3 03/24] wfx: add Makefile/Kconfig

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Signed-off-by: Jérôme Pouiller [...] > +wfx-$(CONFIG_SPI) += bus_spi.o > +wfx-$(subst m,y,$(CONFIG_MMC)) += bus_sdio.o Why this subst? And why only for MMC? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wi

Re: [PATCH v3 01/24] mmc: sdio: add SDIO IDs for Silabs WF200 chip

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Add Silabs SDIO ID to sdio_ids.h. > > Note that the values used by Silabs are uncommon. A driver cannot fully > rely on the SDIO PnP. It should also check if the device is declared in > the DT. > > Signed-off-by: Jérôme Pouiller > --- > inclu

Re: [PATCH v3 03/24] wfx: add Makefile/Kconfig

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Signed-off-by: Jérôme Pouiller > --- > drivers/net/wireless/silabs/wfx/Kconfig | 8 > drivers/net/wireless/silabs/wfx/Makefile | 25 > 2 files changed, 33 insertions(+) > create mode 100644 drivers/net/wir

Re: [PATCH v3 05/24] wfx: add main.c/main.h

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Signed-off-by: Jérôme Pouiller [...] > +static const struct ieee80211_supported_band wfx_band_2ghz = { > + .channels = wfx_2ghz_chantable, > + .n_channels = ARRAY_SIZE(wfx_2ghz_chantable), > + .bitrates = wfx_rates, > + .n_bi

Re: [RFC PATCH v2 4/8] net: sparx5: add port module support

2020-12-22 Thread Andrew Lunn
> > > +static int sparx5_port_verify_speed(struct sparx5 *sparx5, > > > + struct sparx5_port *port, > > > + struct sparx5_port_config *conf) > > > +{ > > > + case PHY_INTERFACE_MODE_SGMII: > > > + if (conf->speed != SPE

Re: [PATCH v3 09/24] wfx: add hwio.c/hwio.h

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > +/* > + * Internal helpers. > + * > + * About CONFIG_VMAP_STACK: > + * When CONFIG_VMAP_STACK is enabled, it is not possible to run DMA on stack > + * allocated data. Functions below that work with registers (aka functions > + * ending with "32") automatically reallocate

[PATCH net] net: ipa: fix interconnect enable bug

2020-12-22 Thread Alex Elder
When the core clock rate and interconnect bandwidth specifications were moved into configuration data, a copy/paste bug was introduced, causing the memory interconnect bandwidth to be set three times rather than enabling the three different interconnects. Fix this bug. Fixes: 91d02f9551501 ("net:

Re: [PATCH v3 12/24] wfx: add hif_api_*.h

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > --- /dev/null > +++ b/drivers/net/wireless/silabs/wfx/hif_api_general.h > @@ -0,0 +1,267 @@ > +/* SPDX-License-Identifier: Apache-2.0 */ > +/* > + * WFx hardware interface definitions > + * > + * Copyright (c) 2018-2020, Silicon Laboratories Inc. > + */ > + > +#ifndef WF

Re: [PATCH v3 00/24] wfx: get out from the staging area

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > I think the wfx driver is now mature enough to be accepted in the > drivers/net/wireless directory. What's the status with firmware images? Can anyone take the latest kernel and linux-firmware and use this driver normally? -- https://patchwo

Re: [PATCH v3 09/24] wfx: add hwio.c/hwio.h

2020-12-22 Thread Greg Kroah-Hartman
On Tue, Dec 22, 2020 at 05:10:11PM +0200, Kalle Valo wrote: > Jerome Pouiller writes: > > > +/* > > + * Internal helpers. > > + * > > + * About CONFIG_VMAP_STACK: > > + * When CONFIG_VMAP_STACK is enabled, it is not possible to run DMA on > > stack > > + * allocated data. Functions below that wo

Re: [PATCH v3 18/24] wfx: add data_tx.c/data_tx.h

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > +static bool ieee80211_is_action_back(struct ieee80211_hdr *hdr) > +{ > + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)hdr; > + > + if (!ieee80211_is_action(mgmt->frame_control)) > + return false; > + if (mgmt->u.action.category != WLAN_

Re: [RFC PATCH v2 0/8] Adding the Sparx5 Switch Driver

2020-12-22 Thread Lars Povlsen
Florian Fainelli writes: > On 12/16/2020 11:51 PM, Steen Hegelund wrote: >> This series provides the Microchip Sparx5 Switch Driver >> >> The Sparx5 Carrier Ethernet and Industrial switch family delivers 64 >> Ethernet ports and up to 200 Gbps of switching bandwidth. >> >> It provides a rich set

Re: [PATCH bpf-next V9 7/7] bpf/selftests: tests using bpf_check_mtu BPF-helper

2020-12-22 Thread Jesper Dangaard Brouer
On Fri, 18 Dec 2020 12:13:45 -0800 Andrii Nakryiko wrote: > On Thu, Dec 17, 2020 at 9:30 AM Jesper Dangaard Brouer > wrote: > > > > Adding selftest for BPF-helper bpf_check_mtu(). Making sure > > it can be used from both XDP and TC. > > > > Signed-off-by: Jesper Dangaard Brouer > > --- > > too

Re: [PATCH v3 18/24] wfx: add data_tx.c/data_tx.h

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > +void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, > + struct sk_buff *skb) > +{ > + struct wfx_dev *wdev = hw->priv; > + struct wfx_vif *wvif; > + struct ieee80211_sta *sta = control ? control->sta : NULL; > + struct ieee

Re: [PATCH v3 05/24] wfx: add main.c/main.h

2020-12-22 Thread Kalle Valo
Jerome Pouiller writes: > +/* NOTE: wfx_send_pds() destroy buf */ > +int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) > +{ > + int ret; > + int start, brace_level, i; > + > + start = 0; > + brace_level = 0; > + if (buf[0] != '{') { > + dev_err(wdev->dev, "valid PDS

Re: [RFC v2 01/13] mm: export zap_page_range() for driver use

2020-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2020 at 10:52:09PM +0800, Xie Yongji wrote: > Export zap_page_range() for use in VDUSE. Err, no. This has absolutely no business being used by drivers.

[PATCH net-next v1] stmmac: intel: Add PCI IDs for TGL-H platform

2020-12-22 Thread Muhammad Husaini Zulkifli
From: Noor Azura Ahmad Tarmizi Add TGL-H PCI info and PCI IDs for the new TSN Controller to the list of supported devices. Signed-off-by: Noor Azura Ahmad Tarmizi Signed-off-by: Voon Weifeng Signed-off-by: Muhammad Husaini Zulkifli --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 ++

Re: [PATCH net v2 1/3] net: fix race conditions in xps by locking the maps and dev->tc_num

2020-12-22 Thread Alexander Duyck
On Tue, Dec 22, 2020 at 1:21 AM Antoine Tenart wrote: > > Hello Alexander, Jakub, > > Quoting Alexander Duyck (2020-12-22 00:21:57) > > > > Looking over this patch it seems kind of obvious that extending the > > xps_map_mutex is making things far more complex then they need to be. > > > > Applying

Re: [PATCH net] net: ipa: fix interconnect enable bug

2020-12-22 Thread Georgi Djakov
On 12/22/20 17:16, Alex Elder wrote: When the core clock rate and interconnect bandwidth specifications were moved into configuration data, a copy/paste bug was introduced, causing the memory interconnect bandwidth to be set three times rather than enabling the three different interconnects. Fix

[PATCH bpf-next V10 0/7] bpf: New approach for BPF MTU handling

2020-12-22 Thread Jesper Dangaard Brouer
This patchset drops all the MTU checks in TC BPF-helpers that limits growing the packet size. This is done because these BPF-helpers doesn't take redirect into account, which can result in their MTU check being done against the wrong netdev. The new approach is to give BPF-programs knowledge about

[PATCH bpf-next V10 1/7] bpf: Remove MTU check in __bpf_skb_max_len

2020-12-22 Thread Jesper Dangaard Brouer
Multiple BPF-helpers that can manipulate/increase the size of the SKB uses __bpf_skb_max_len() as the max-length. This function limit size against the current net_device MTU (skb->dev->mtu). When a BPF-prog grow the packet size, then it should not be limited to the MTU. The MTU is a transmit limit

[PATCH bpf-next V10 2/7] bpf: fix bpf_fib_lookup helper MTU check for SKB ctx

2020-12-22 Thread Jesper Dangaard Brouer
BPF end-user on Cilium slack-channel (Carlo Carraro) wants to use bpf_fib_lookup for doing MTU-check, but *prior* to extending packet size, by adjusting fib_params 'tot_len' with the packet length plus the expected encap size. (Just like the bpf_check_mtu helper supports). He discovered that for SK

[PATCH bpf-next V10 4/7] bpf: add BPF-helper for MTU checking

2020-12-22 Thread Jesper Dangaard Brouer
This BPF-helper bpf_check_mtu() works for both XDP and TC-BPF programs. The SKB object is complex and the skb->len value (accessible from BPF-prog) also include the length of any extra GRO/GSO segments, but without taking into account that these GRO/GSO segments get added transport (L4) and networ

[PATCH bpf-next V10 3/7] bpf: bpf_fib_lookup return MTU value as output when looked up

2020-12-22 Thread Jesper Dangaard Brouer
The BPF-helpers for FIB lookup (bpf_xdp_fib_lookup and bpf_skb_fib_lookup) can perform MTU check and return BPF_FIB_LKUP_RET_FRAG_NEEDED. The BPF-prog don't know the MTU value that caused this rejection. If the BPF-prog wants to implement PMTU (Path MTU Discovery) (rfc1191) it need to know this MT

[PATCH bpf-next V10 5/7] bpf: drop MTU check when doing TC-BPF redirect to ingress

2020-12-22 Thread Jesper Dangaard Brouer
The use-case for dropping the MTU check when TC-BPF does redirect to ingress, is described by Eyal Birger in email[0]. The summary is the ability to increase packet size (e.g. with IPv6 headers for NAT64) and ingress redirect packet and let normal netstack fragment packet as needed. [0] https://l

[PATCH bpf-next V10 6/7] selftests/bpf: use bpf_check_mtu in selftest test_cls_redirect

2020-12-22 Thread Jesper Dangaard Brouer
This demonstrate how bpf_check_mtu() helper can easily be used together with bpf_skb_adjust_room() helper, prior to doing size adjustment, as delta argument is already setup. Hint: This specific test can be selected like this: ./test_progs -t cls_redirect Signed-off-by: Jesper Dangaard Brouer -

[PATCH bpf-next V10 7/7] bpf/selftests: tests using bpf_check_mtu BPF-helper

2020-12-22 Thread Jesper Dangaard Brouer
Adding selftest for BPF-helper bpf_check_mtu(). Making sure it can be used from both XDP and TC. V10: - Remove errno non-zero test in CHECK_ATTR() - Addresse comments from Andrii Nakryiko Signed-off-by: Jesper Dangaard Brouer --- tools/testing/selftests/bpf/prog_tests/check_mtu.c | 218 +

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

2020-12-22 Thread Eric Dumazet
On 12/22/20 1:38 PM, weichenchen wrote: > 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 c

pull-request: wireless-drivers-2020-12-22

2020-12-22 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 13458ffe0a953e17587f172a8e5059c243e6850a: net: x25: Remove unimplemented X.25-over-LLC code stubs (2020-12-12 17:15:33 -0800) are available in the g

Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread David Ahern
On 12/22/20 7:43 AM, Willem de Bruijn wrote: > >> void sock_zerocopy_put(struct ubuf_info *uarg) >> { >> - if (uarg && refcount_dec_and_test(&uarg->refcnt)) >> + if (uarg) >> uarg->callback(uarg, uarg->zerocopy); >> } >> EXPORT_SYMBOL_GPL(sock_zerocopy_put); > > Th

Re: [PATCH 03/12 v2 RFC] skbuff: simplify sock_zerocopy_put

2020-12-22 Thread David Ahern
On 12/21/20 5:09 PM, Jonathan Lemon wrote: > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 327ee8938f78..ea32b3414ad6 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -1245,12 +1245,8 @@ EXPORT_SYMBOL_GPL(sock_zerocopy_callback); > > void sock_zerocopy_put(struct ubuf

Re: [PATCH 03/12 v2 RFC] skbuff: simplify sock_zerocopy_put

2020-12-22 Thread David Ahern
On 12/22/20 9:52 AM, David Ahern wrote: > On 12/21/20 5:09 PM, Jonathan Lemon wrote: >> diff --git a/net/core/skbuff.c b/net/core/skbuff.c >> index 327ee8938f78..ea32b3414ad6 100644 >> --- a/net/core/skbuff.c >> +++ b/net/core/skbuff.c >> @@ -1245,12 +1245,8 @@ EXPORT_SYMBOL_GPL(sock_zerocopy_callb

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Alexandre Belloni
On 22/12/2020 16:01:22+0100, Andrew Lunn wrote: > > The problem is that the switch core reset also affects (reset) the > > SGPIO controller. > > > > We tried to put this in the reset driver, but it was rejected. If the > > reset is done at probe time, the SGPIO driver may already have > > initiali

Re: [PATCH 01/12 v2 RFC] net: group skb_shinfo zerocopy related bits together.

2020-12-22 Thread Jonathan Lemon
On Tue, Dec 22, 2020 at 09:43:15AM -0500, Willem de Bruijn wrote: > On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon > wrote: > > > > From: Jonathan Lemon > > > > In preparation for expanded zerocopy (TX and RX), move > > the ZC related bits out of tx_flags into their own flag > > word. > > > > Si

Re: [PATCH 05/12 v2 RFC] skbuff: replace sock_zerocopy_put() with skb_zcopy_put()

2020-12-22 Thread Jonathan Lemon
On Tue, Dec 22, 2020 at 09:42:40AM -0500, Willem de Bruijn wrote: > On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon > wrote: > > > > From: Jonathan Lemon > > > > Replace sock_zerocopy_put with the generic skb_zcopy_put() > > function. Pass 'true' as the success argument, as this > > is identical

Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into sock_zerocopy_callback

2020-12-22 Thread Jonathan Lemon
On Tue, Dec 22, 2020 at 09:43:39AM -0500, Willem de Bruijn wrote: > On Mon, Dec 21, 2020 at 7:09 PM Jonathan Lemon > wrote: > > > > From: Jonathan Lemon > > > > Before this change, the caller of sock_zerocopy_callback would > > need to save the zerocopy status, decrement and check the refcount,

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Steen Hegelund
Hi Andrew, On Sat, 2020-12-19 at 20:11 +0100, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > On Thu, Dec 17, 2020 at 08:51:28AM +0100, Steen Hegelund wrote: > > > +static struct sparx5_io_resource sparx5_iomap[] =  { > > Thi

[PATCH net 0/3] net: ipa: GSI interrupt handling fixes

2020-12-22 Thread Alex Elder
This series implements fixes for some issues related to handling interrupts when GSI channel and event ring commands complete. The first issue is that the completion condition for an event ring or channel command could occur while the associated interrupt is disabled. This would cause the interru

[PATCH net 3/3] net: ipa: use state to determine event ring command success

2020-12-22 Thread Alex Elder
This patch implements the same basic fix for event rings as the previous one does for channels. The result of issuing an event ring control command should be that the event ring changes state. If enabled, a completion interrupt signals that the event ring state has changed. This interrupt is ena

  1   2   3   >