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

2020-12-15 Thread Jason Wang
- Original Message - > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Wednesday, December 16, 2020 1:57 PM > > To: wangyunjian > > Cc: netdev@vger.kernel.org; m...@redhat.com; willemdebruijn kernel > > ; > > virtualizat...@lists.linux-foundation

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

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

[PATCH net] net: af_packet: fix procfs header for 64-bit pointers

2020-12-15 Thread Baruch Siach
On 64-bit systems the packet procfs header field names following 'sk' are not aligned correctly: sk RefCnt Type Proto Iface R Rmem User Inode 605d2c64 3 30003 7 1 450880 0 16643 080e9b80 2 2 0 0 0 0 17404 b23b8a00

Re: KASAN: use-after-free Write in __sco_sock_close

2020-12-15 Thread syzbot
syzbot suspects this issue was fixed by commit: commit 6dfccd13db2ff2b709ef60a50163925d477549aa Author: Anmol Karn Date: Wed Sep 30 14:18:13 2020 + Bluetooth: Fix null pointer dereference in hci_event_packet() bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14cb845b50

[PATCH net-next] net: rds: Change PF_INET to AF_INET

2020-12-15 Thread Zheng Yongjun
By bsd codestyle, change PF_INET to AF_INET. Signed-off-by: Zheng Yongjun --- net/rds/rdma_transport.c | 4 ++-- net/rds/tcp_listen.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c index 5f741e51b4ba..04102dbc04d2

[PATCH 19/21] vdpa_sim: factor out buffer completion logic

2020-12-15 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 33 +--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 8d051cf25f0a..e901177c6dfe 100644 --- a/drivers/vdpa/vdpa

[PATCH 21/21] vdpasim: control virtqueue support

2020-12-15 Thread Jason Wang
This patch introduces the control virtqueue support for vDPA simulator. This is a requirement for supporting advanced features like multiqueue. A requirement for control virtqueue is to isolate its memory access from the rx/tx virtqueues. This is because when using vDPA device for VM, the control

[PATCH 20/21] vdpa_sim: filter destination mac address

2020-12-15 Thread Jason Wang
This patch implements a simple unicast filter for vDPA simulator. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 49 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_si

[PATCH 18/21] vdpa_sim: advertise VIRTIO_NET_F_MTU

2020-12-15 Thread Jason Wang
We've already reported maximum mtu via config space, so let's advertise the feature. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index fe48

[PATCH 16/21] vhost-vdpa: support ASID based IOTLB API

2020-12-15 Thread Jason Wang
This patch extends the vhost-vdpa to support ASID based IOTLB API. The vhost-vdpa device will allocated multple IOTLBs for vDPA device that supports multiple address spaces. The IOTLBs and vDPA device memory mappings is determined and maintained through ASID. Note that we still don't support vDPA

[PATCH 17/21] vdpa_sim: split vdpasim_virtqueue's iov field in out_iov and in_iov

2020-12-15 Thread Jason Wang
From: Stefano Garzarella vringh_getdesc_iotlb() manages 2 iovs for writable and readable descriptors. This is very useful for the block device, where for each request we have both types of descriptor. Let's split the vdpasim_virtqueue's iov field in out_iov and in_iov to use them with vringh_get

[PATCH 14/21] vhost-vdpa: uAPI to get virtqueue group id

2020-12-15 Thread Jason Wang
Follows the support for virtqueue group in vDPA. This patches introduces uAPI to get the virtqueue group ID for a specific virtqueue in vhost-vdpa. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 8 include/uapi/linux/vhost.h | 8 2 files changed, 16 insertions(+) d

[PATCH 15/21] vhost-vdpa: introduce uAPI to set group ASID

2020-12-15 Thread Jason Wang
Follows the vDPA support for associating ASID to a specific virtqueue group. This patch adds a uAPI to support setting them from userspace. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 8 include/uapi/linux/vhost.h | 7 +++ 2 files changed, 15 insertions(+) diff --git

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Leon Romanovsky
On Tue, Dec 15, 2020 at 01:28:05PM -0800, Jakub Kicinski wrote: > On Tue, 15 Dec 2020 12:35:20 -0800 Saeed Mahameed wrote: > > > I think the big thing we really should do if we are going to go this > > > route is to look at standardizing what the flavours are that get > > > created by the parent ne

[PATCH 13/21] vhost-vdpa: introduce uAPI to get the number of address spaces

2020-12-15 Thread Jason Wang
This patch introduces the uAPI for getting the number of address spaces supported by this vDPA device. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 3 +++ include/uapi/linux/vhost.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c i

[PATCH 12/21] vhost-vdpa: introduce uAPI to get the number of virtqueue groups

2020-12-15 Thread Jason Wang
Follows the vDPA support for multiple address spaces, this patch introduce uAPI for the userspace to know the number of virtqueue groups supported by the vDPA device. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 4 include/uapi/linux/vhost.h | 3 +++ 2 files changed, 7 inserti

[PATCH 11/21] vhost-vdpa: introduce asid based IOTLB

2020-12-15 Thread Jason Wang
This patch converts the vhost-vDPA device to support multiple IOTLBs tagged via ASID via hlist. This will be used for supporting multiple address spaces in the following patches. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 106 --- 1 file changed,

[PATCH 09/21] vhost_iotlb: split out IOTLB initialization

2020-12-15 Thread Jason Wang
This patch splits out IOTLB initialization to make sure it could be reused by external modules. Signed-off-by: Jason Wang --- drivers/vhost/iotlb.c | 23 ++- include/linux/vhost_iotlb.h | 2 ++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/vho

[PATCH 10/21] vhost: support ASID in IOTLB API

2020-12-15 Thread Jason Wang
This patches allows userspace to send ASID based IOTLB message to vhost. This idea is to use the reserved u32 field in the existing V2 IOTLB message. Vhost device should advertise this capability via VHOST_BACKEND_F_IOTLB_ASID backend feature. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c

[PATCH 07/21] vdpa: multiple address spaces support

2020-12-15 Thread Jason Wang
This patches introduces the multiple address spaces support for vDPA device. This idea is to identify a specific address space via an dedicated identifier - ASID. During vDPA device allocation, vDPA device driver needs to report the number of address spaces supported by the device then the DMA map

[PATCH 08/21] vdpa: introduce config operations for associating ASID to a virtqueue group

2020-12-15 Thread Jason Wang
This patch introduces a new bus operation to allow the vDPA bus driver to associate an ASID to a virtqueue group. Signed-off-by: Jason Wang --- include/linux/vdpa.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 0a9a754f8180..2a8

[PATCH 05/21] vdpa: add the missing comment for nvqs in struct vdpa_device

2020-12-15 Thread Jason Wang
Signed-off-by: Jason Wang --- include/linux/vdpa.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 30bc7a7223bb..8ab8dcde705d 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -42,6 +42,7 @@ struct vdpa_vq_state { * @config: th

[PATCH 06/21] vdpa: introduce virtqueue groups

2020-12-15 Thread Jason Wang
This patch introduces virtqueue groups to vDPA device. The virtqueue group is the minimal set of virtqueues that must share an address space. And the adddress space identifier could only be attached to a specific virtqueue group. A new mandated bus operation is introduced to get the virtqueue grou

[PATCH 03/21] vhost-vdpa: passing iotlb to IOMMU mapping helpers

2020-12-15 Thread Jason Wang
To prepare for the ASID support for vhost-vdpa, try to pass IOTLB object to dma helpers. No functional changes, it's just a preparation for support multiple IOTLBs. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 41 +++-- 1 file changed, 23 insertions(+)

[PATCH 04/21] vhost-vdpa: switch to use vhost-vdpa specific IOTLB

2020-12-15 Thread Jason Wang
To ease the implementation of per group ASID support for vDPA device. This patch switches to use a vhost-vdpa specific IOTLB to avoid the unnecessary refactoring of the vhost core. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 18 ++ 1 file changed, 10 insertions(+), 8 del

[PATCH 00/21] Control VQ support in vDPA

2020-12-15 Thread Jason Wang
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue

[PATCH 02/21] virtio-vdpa: don't set callback if virtio doesn't need it

2020-12-15 Thread Jason Wang
There's no need for setting callbacks for the driver that doesn't care about that. Signed-off-by: Jason Wang --- drivers/virtio/virtio_vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 4a9ddb44b2a7..af6ee6

[PATCH 01/21] vhost: move the backend feature bits to vhost_types.h

2020-12-15 Thread Jason Wang
We should store feature bits in vhost_types.h as what has been done for e.g VHOST_F_LOG_ALL. Signed-off-by: Jason Wang --- include/uapi/linux/vhost.h | 5 - include/uapi/linux/vhost_types.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/vho

Re: [PATCH 04/25] dt-bindings: net: dwmac: Refactor snps,*-config properties

2020-12-15 Thread Serge Semin
On Tue, Dec 15, 2020 at 08:08:35AM -0600, Rob Herring wrote: > On Tue, Dec 15, 2020 at 2:54 AM Serge Semin > wrote: > > > > Hello Rob, > > > > On Mon, Dec 14, 2020 at 08:30:06AM -0600, Rob Herring wrote: > > > On Mon, Dec 14, 2020 at 12:15:54PM +0300, Serge Semin wrote: > > > > Currently the "snps

Re: [PATCH 06/25] dt-bindings: net: dwmac: Add Tx/Rx clock sources

2020-12-15 Thread Serge Semin
On Tue, Dec 15, 2020 at 11:32:04AM -0600, Rob Herring wrote: > On Mon, Dec 14, 2020 at 12:15:56PM +0300, Serge Semin wrote: > > Generic DW *MAC can be connected to an external Tramit and Receive clock > > s/Tramit/Transmit/ Thanks. I'll fix it in v2. -Sergey > > > generators. Add the correspo

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

2020-12-15 Thread Jason Wang
- Original Message - > > > > -Original Message- > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Tuesday, December 15, 2020 12:10 PM > > To: wangyunjian ; netdev@vger.kernel.org; > > m...@redhat.com; willemdebruijn.ker...@gmail.com > > Cc: virtualizat...@lists.linux-

RE: [net-next v5 13/15] devlink: Add devlink port documentation

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 6:28 AM > > On Tue, 15 Dec 2020 01:03:56 -0800 Saeed Mahameed wrote: > > +PCI controllers > > +--- > > +In most cases a PCI device has only one controller. A controller > > +consists of potentially multiple physical and vir

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Serge Semin
On Wed, Dec 16, 2020 at 03:03:55AM +0100, Andrew Lunn wrote: > > > From what you are saying, it sounds like from software you cannot > > > independently control the GPIO controller reset? > > > > No. The hardware implements the default MAC reset behavior. So the > > GPIO controller gets reset sync

RE: [net-next v5 11/15] net/mlx5: SF, Add port add delete functionality

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 6:21 AM > > On Tue, 15 Dec 2020 01:03:54 -0800 Saeed Mahameed wrote: > > To handle SF port management outside of the eswitch as independent > > software layer, introduce eswitch notifier APIs so that upper layer > > who wish to suppor

RE: [net-next v5 09/15] net/mlx5: E-switch, Prepare eswitch to handle SF vport

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 6:18 AM > > On Tue, 15 Dec 2020 01:03:52 -0800 Saeed Mahameed wrote: > > From: Vu Pham > > > > Prepare eswitch to handle SF vport during > > (a) querying eswitch functions > > (b) egress ACL creation > > (c) account for SF vports in

RE: [net-next v5 07/15] net/mlx5: SF, Add auxiliary device support

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 6:14 AM > > On Tue, 15 Dec 2020 01:03:50 -0800 Saeed Mahameed wrote: > > +static ssize_t sfnum_show(struct device *dev, struct device_attribute > > +*attr, char *buf) { > > + struct auxiliary_device *adev = container_of(dev, struct

RE: [net-next v5 05/15] devlink: Support get and set state of port function

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 6:08 AM > > On Tue, 15 Dec 2020 01:03:48 -0800 Saeed Mahameed wrote: > > From: Parav Pandit > > > > devlink port function can be in active or inactive state. > > Allow users to get and set port function's state. > > > > When the port

RE: [net-next v5 04/15] devlink: Support add and delete devlink port

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 5:59 AM > > > +struct devlink_port_new_attrs { > > + enum devlink_port_flavour flavour; > > + unsigned int port_index; > > + u32 controller; > > + u32 sfnum; > > + u16 pfnum; > > Oh. So you had the structure which actually g

RE: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Parav Pandit
> From: Alexander Duyck > Sent: Wednesday, December 16, 2020 9:43 AM > > > > > That is goal here. This is not about creating just a netdev, this is > > about the whole kit: rdma, netdev, vdpa virtio-net, virtio-mdev. > > One issue is right now we are only seeing the rdma and netdev. It is kind

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Alexander Duyck
On Tue, Dec 15, 2020 at 7:04 PM Jason Gunthorpe wrote: > > On Tue, Dec 15, 2020 at 06:19:18PM -0800, Alexander Duyck wrote: > > > > > I would really like to see is a solid standardization of what this is. > > > > Otherwise the comparison is going to be made. Especially since a year > > > > ago Mel

Re: [PATCH iproute2-next v2] iplink:macvlan: Added bcqueuelen parameter

2020-12-15 Thread David Ahern
On 12/14/20 3:42 AM, Thomas Karlsson wrote: > This patch allows the user to set and retrieve the > IFLA_MACVLAN_BC_QUEUE_LEN parameter via the bcqueuelen > command line argument > > This parameter controls the requested size of the queue for > broadcast and multicast packages in the macvlan driver

RE: [net-next v5 14/15] devlink: Extend devlink port documentation for subfunctions

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 6:31 AM > > On Tue, 15 Dec 2020 01:03:57 -0800 Saeed Mahameed wrote: > > +Subfunctions are lightweight functions that has parent PCI function > > +on which it is deployed. Subfunctions are created and deployed in > > +unit of 1. Unlik

RE: [net-next v5 03/15] devlink: Introduce PCI SF port flavour and port attribute

2020-12-15 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 16, 2020 4:58 AM > > On Tue, 15 Dec 2020 01:03:46 -0800 Saeed Mahameed wrote: > > + * devlink_port_attrs_pci_sf_set - Set PCI SF port attributes > > + * > > + * @devlink_port: devlink port > > + * @controller: associated controller number for

Re: [PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-15 Thread Chen-Yu Tsai
On Wed, Dec 16, 2020 at 4:16 AM Christophe JAILLET wrote: > > Le 15/12/2020 à 20:35, Dan Carpenter a écrit : > > On Tue, Dec 15, 2020 at 08:08:15PM +0100, Maxime Ripard wrote: > >> On Tue, Dec 15, 2020 at 07:18:48PM +0100, Christophe JAILLET wrote: > >>> Le 15/12/2020 à 12:37, Maxime Ripard a écri

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Alexander Duyck
On Tue, Dec 15, 2020 at 5:13 PM Edwin Peer wrote: > > On Tue, Dec 15, 2020 at 10:49 AM Alexander Duyck > wrote: > > > It isn't "SR-IOV done right" it seems more like "VMDq done better". > > I don't think I agree with that assertion. The fact that VMDq can talk > to a common driver still makes VMD

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Jason Gunthorpe
On Tue, Dec 15, 2020 at 06:19:18PM -0800, Alexander Duyck wrote: > > > I would really like to see is a solid standardization of what this is. > > > Otherwise the comparison is going to be made. Especially since a year > > > ago Mellanox was pushing this as an mdev type interface. > > > > mdev was

Re: [PATCH net-next 4/4] enetc: reorder macros and functions

2020-12-15 Thread Andrew Lunn
On Tue, Dec 15, 2020 at 10:22:00PM +0100, Michael Walle wrote: > Now that there aren't any more macros with parameters, move the macros > above any functions. > > Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Andrew

[PATCH] bpf: remove unused including

2020-12-15 Thread Tian Tao
Remove including that don't need it. Signed-off-by: Tian Tao --- kernel/bpf/syscall.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 4caf06f..c3bb03c8 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -17,7 +17,6 @@ #include

Re: INFO: task can't die in corrupted (2)

2020-12-15 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:9317f948 Add linux-next specific files for 20201215 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=151add9750 kernel config: https://syzkaller.appspot.com/x/.config?x

Re: [PATCH net-next 3/4] enetc: drop MDIO_DATA() macro

2020-12-15 Thread Andrew Lunn
On Tue, Dec 15, 2020 at 10:21:59PM +0100, Michael Walle wrote: > value is u16, masking with 0x is a nop. Drop it. > > Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Andrew

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Jason Gunthorpe
On Tue, Dec 15, 2020 at 05:12:33PM -0800, Edwin Peer wrote: > 1) More than 256 SFs are possible: Maybe it's about time PCI-SIG > addresses this limit for VFs? They can't, the Bus/Device/Function is limited by protocol and changing that would upend the entire PCI world. Instead PCI-SIG said PASI

Re: [PATCH net-next v3] GTP: add support for flow based tunneling API

2020-12-15 Thread Jakub Kicinski
On Sun, 13 Dec 2020 11:29:43 -0800 Pravin B Shelar wrote: > Following patch add support for flow based tunneling API > to send and recv GTP tunnel packet over tunnel metadata API. > This would allow this device integration with OVS or eBPF using > flow based tunneling APIs. > > Signed-off-by: Prav

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Alexei Starovoitov
On Tue, Dec 15, 2020 at 6:10 PM Cong Wang wrote: > > On Tue, Dec 15, 2020 at 5:14 PM Alexei Starovoitov > wrote: > > > > On Tue, Dec 15, 2020 at 04:22:21PM -0800, Cong Wang wrote: > > > On Tue, Dec 15, 2020 at 3:23 PM Daniel Borkmann > > > wrote: > > > > > > > > On 12/15/20 11:03 PM, Andrii Nak

Re: [PATCH net-next 2/4] enetc: don't use macro magic for the readx_poll_timeout() callback

2020-12-15 Thread Andrew Lunn
On Tue, Dec 15, 2020 at 10:21:58PM +0100, Michael Walle wrote: > The macro enetc_mdio_rd_reg() is just used in that particular case and > has a hardcoded parameter name "mdio_priv". Define a specific function > to use for readx_poll_timeout() instead. Also drop the TIMEOUT macro > since it is used

Re: [PATCH net-next 1/4] enetc: drop unneeded indirection

2020-12-15 Thread Andrew Lunn
On Tue, Dec 15, 2020 at 10:21:57PM +0100, Michael Walle wrote: > Before commit 6517798dd343 ("enetc: Make MDIO accessors more generic and > export to include/linux/fsl") these macros actually had some benefits. > But after the commit it just makes the code hard to read. Drop the macro > indirection

Re: [PATCH net-next v5 2/3] net: implement threaded-able napi poll loop support

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 18:15:06 -0800 Wei Wang wrote: > On Tue, Dec 15, 2020 at 5:53 PM Jakub Kicinski wrote: > > On Tue, 15 Dec 2020 17:25:14 -0800 Wei Wang wrote: > > > +void napi_enable(struct napi_struct *n) > > > +{ > > > + bool locked = rtnl_is_locked(); > > > > Maybe you'll prove me wr

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Alexander Duyck
On Tue, Dec 15, 2020 at 4:20 PM Jason Gunthorpe wrote: > > On Tue, Dec 15, 2020 at 01:41:04PM -0800, Alexander Duyck wrote: > > > > not just devlink and switchdev, auxbus was also introduced to > > > standardize some of the interfaces. > > > > The auxbus is just there to make up for the fact that

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Cong Wang
On Tue, Dec 15, 2020 at 5:14 PM Alexei Starovoitov wrote: > > On Tue, Dec 15, 2020 at 04:22:21PM -0800, Cong Wang wrote: > > On Tue, Dec 15, 2020 at 3:23 PM Daniel Borkmann > > wrote: > > > > > > On 12/15/20 11:03 PM, Andrii Nakryiko wrote: > > > > On Tue, Dec 15, 2020 at 12:06 PM Cong Wang >

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-15 Thread Andrew Lunn
> > From what you are saying, it sounds like from software you cannot > > independently control the GPIO controller reset? > > No. The hardware implements the default MAC reset behavior. So the > GPIO controller gets reset synchronously with the MAC reset and that > can't be changed. Is there pin

Re: [kbuild-all] Re: [PATCH 1/3] Add TX sending hardware timestamp.

2020-12-15 Thread Rong Chen
On 12/12/20 4:47 PM, Philip Li wrote: On Thu, Dec 10, 2020 at 12:41:32PM +, Geva, Erez wrote: On 10/12/2020 04:11, kernel test robot wrote: Hi Erez, Thank you for the patch! Yet something to improve: Thanks for the robot, as we rarely use clang for kernel. It is very helpful. [auto

Re: [PATCH net-next v5 2/3] net: implement threaded-able napi poll loop support

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 17:25:14 -0800 Wei Wang wrote: > +void napi_enable(struct napi_struct *n) > +{ > + bool locked = rtnl_is_locked(); Maybe you'll prove me wrong but I think this is never a correct construct. > + BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); > + smp_mb__before_atom

Re: [PATCH net-next] seg6: fix the max number of supported SRv6 behavior attributes

2020-12-15 Thread Jakub Kicinski
On Wed, 16 Dec 2020 02:08:34 +0100 Andrea Mayer wrote: > I agree with this approach. Only for the sake of clarity I would prefer to > define the macro SEG6_LOCAL_MAX_SUPP as follows: > > in seg6_local.c: > [...] > > /* max total number of supported SRv6 behavior attributes */ > #define SEG6_LO

Re: [PATCH v8 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

2020-12-15 Thread Jakub Kicinski
On Wed, 16 Dec 2020 01:42:03 +0100 Lukasz Stelmach wrote: > >> + ax_local->stats.rx_packets++; > >> + ax_local->stats.rx_bytes += skb->len; > >> + skb->dev = ndev; > >> + > >> + skb->truesize = skb->len + sizeof(struct sk_buff); > > > > Why do you modify truesize? > > > > I don't know. Alt

Re: [PATCH v4] lan743x: fix for potential NULL pointer dereference with bare card

2020-12-15 Thread Sergej Bauer
On Wednesday, December 16, 2020 4:12:42 AM MSK Jakub Kicinski wrote: > On Tue, 15 Dec 2020 23:39:14 + patchwork-bot+netdev...@kernel.org > > wrote: > > Hello: > > > > This patch was applied to bpf/bpf.git (refs/heads/master): > > > > On Tue, 15 Dec 2020 19:12:45 +0300 you wrote: > > > This i

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Alexei Starovoitov
On Tue, Dec 15, 2020 at 04:22:21PM -0800, Cong Wang wrote: > On Tue, Dec 15, 2020 at 3:23 PM Daniel Borkmann wrote: > > > > On 12/15/20 11:03 PM, Andrii Nakryiko wrote: > > > On Tue, Dec 15, 2020 at 12:06 PM Cong Wang > > > wrote: > > >> > > >> On Tue, Dec 15, 2020 at 11:27 AM Andrii Nakryiko >

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Edwin Peer
On Tue, Dec 15, 2020 at 10:49 AM Alexander Duyck wrote: > It isn't "SR-IOV done right" it seems more like "VMDq done better". I don't think I agree with that assertion. The fact that VMDq can talk to a common driver still makes VMDq preferable in some respects. Thus, subfunctions do appear to be

Re: [PATCH v4] lan743x: fix for potential NULL pointer dereference with bare card

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 23:39:14 + patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This patch was applied to bpf/bpf.git (refs/heads/master): > > On Tue, 15 Dec 2020 19:12:45 +0300 you wrote: > > This is the 4th revision of the patch fix for potential null pointer > > dereference > > with

Re: [PATCH net-next] seg6: fix the max number of supported SRv6 behavior attributes

2020-12-15 Thread Andrea Mayer
Hi Jakub, thanks for your review. On Mon, 14 Dec 2020 20:57:40 -0800 Jakub Kicinski wrote: > > > > - At compile time we verify that the total number of attributes does not > >exceed the fixed value of 64. Otherwise, kernel build fails forcing > >developers to reconsider adding a new at

Re: linux-next: build failure after merge of the net-next tree

2020-12-15 Thread Stephen Rothwell
Hi all, On Mon, 14 Dec 2020 13:14:38 +1100 Stephen Rothwell wrote: > > After merging the net-next tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > fs/cifs/cifs_swn.c: In function 'cifs_swn_notify': > fs/cifs/cifs_swn.c:450:4: error: implicit declaration of function

Re: [net-next v5 14/15] devlink: Extend devlink port documentation for subfunctions

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:57 -0800 Saeed Mahameed wrote: > +Subfunctions are lightweight functions that has parent PCI function on which > +it is deployed. Subfunctions are created and deployed in unit of 1. Unlike > +SRIOV VFs, they don't require their own PCI virtual function. They > communicate

Re: [net-next v5 13/15] devlink: Add devlink port documentation

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:56 -0800 Saeed Mahameed wrote: > +PCI controllers > +--- > +In most cases a PCI device has only one controller. A controller consists of > +potentially multiple physical and virtual functions. Such PCI function > consists > +of one or more ports. s/Such// yo

Re: [net-next v5 11/15] net/mlx5: SF, Add port add delete functionality

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:54 -0800 Saeed Mahameed wrote: > To handle SF port management outside of the eswitch as independent > software layer, introduce eswitch notifier APIs so that upper layer who > wish to support sf port management in switchdev mode can perform its Could you unpack this? What

Re: [net-next v5 09/15] net/mlx5: E-switch, Prepare eswitch to handle SF vport

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:52 -0800 Saeed Mahameed wrote: > From: Vu Pham > > Prepare eswitch to handle SF vport during > (a) querying eswitch functions > (b) egress ACL creation > (c) account for SF vports in total vports calculation > > Assign a dedicated placeholder for SFs vports and their re

Re: [net-next v5 07/15] net/mlx5: SF, Add auxiliary device support

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:50 -0800 Saeed Mahameed wrote: > +static ssize_t sfnum_show(struct device *dev, struct device_attribute *attr, > char *buf) > +{ > + struct auxiliary_device *adev = container_of(dev, struct > auxiliary_device, dev); > + struct mlx5_sf_dev *sf_dev = container_of(a

Re: [PATCH v8 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

2020-12-15 Thread Lukasz Stelmach
It was <2020-12-04 pią 19:37>, when Jakub Kicinski wrote: > On Wed, 2 Dec 2020 22:47:09 +0100 Łukasz Stelmach wrote: >> ASIX AX88796[1] is a versatile ethernet adapter chip, that can be >> connected to a CPU with a 8/16-bit bus or with an SPI. This driver >> supports SPI connection. >> Before we

Re: [net-next v5 05/15] devlink: Support get and set state of port function

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:48 -0800 Saeed Mahameed wrote: > From: Parav Pandit > > devlink port function can be in active or inactive state. > Allow users to get and set port function's state. > > When the port function it activated, its operational state may change > after a while when the devic

Re: [net-next v5 04/15] devlink: Support add and delete devlink port

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:47 -0800 Saeed Mahameed wrote: > From: Parav Pandit > > Extended devlink interface for the user to add and delete port. > Extend devlink to connect user requests to driver to add/delete > such port in the device. > > When driver routines are invoked, devlink instance lo

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Cong Wang
On Tue, Dec 15, 2020 at 3:23 PM Daniel Borkmann wrote: > > On 12/15/20 11:03 PM, Andrii Nakryiko wrote: > > On Tue, Dec 15, 2020 at 12:06 PM Cong Wang wrote: > >> > >> On Tue, Dec 15, 2020 at 11:27 AM Andrii Nakryiko > >> wrote: > >>> > >>> On Mon, Dec 14, 2020 at 12:17 PM Cong Wang > >>> wrot

Re: [net-next v4 00/15] Add mlx5 subfunction support

2020-12-15 Thread Jason Gunthorpe
On Tue, Dec 15, 2020 at 01:41:04PM -0800, Alexander Duyck wrote: > > not just devlink and switchdev, auxbus was also introduced to > > standardize some of the interfaces. > > The auxbus is just there to make up for the fact that there isn't > another bus type for this though. I would imagine othe

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Cong Wang
On Tue, Dec 15, 2020 at 2:08 PM Andrii Nakryiko wrote: > > On Tue, Dec 15, 2020 at 12:06 PM Cong Wang wrote: > > > > On Tue, Dec 15, 2020 at 11:27 AM Andrii Nakryiko > > wrote: > > > > > > On Mon, Dec 14, 2020 at 12:17 PM Cong Wang > > > wrote: > > > > > > > > From: Cong Wang > > > > > > > >

Re: [MPTCP][PATCH net-next] mptcp: clear use_ack and use_map when dropping other suboptions

2020-12-15 Thread Mat Martineau
On Tue, 15 Dec 2020, Geliang Tang wrote: This patch cleared use_ack and use_map when dropping other suboptions to fix the following syzkaller BUG: [ 15.223006] BUG: unable to handle page fault for address: 00223b10 [ 15.223700] #PF: supervisor read access in kernel mode [ 15.224

Re: [PATCH 1/3] PCI/ASPM: Use the path max in L1 ASPM latency check

2020-12-15 Thread Bjorn Helgaas
On Tue, Dec 15, 2020 at 02:09:12PM +0100, Ian Kumlien wrote: > On Tue, Dec 15, 2020 at 1:40 AM Bjorn Helgaas wrote: > > > > On Mon, Dec 14, 2020 at 11:56:31PM +0100, Ian Kumlien wrote: > > > On Mon, Dec 14, 2020 at 8:19 PM Bjorn Helgaas wrote: > > > > > > If you're interested, you could probably

Re: [PATCH v4] lan743x: fix for potential NULL pointer dereference with bare card

2020-12-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Tue, 15 Dec 2020 19:12:45 +0300 you wrote: > This is the 4th revision of the patch fix for potential null pointer > dereference > with lan743x card. > > The simpliest way to reproduce: boot with bare lan743x and issue "ethtool

[PATCH v2 bpf-next 4/4] selftests/bpf: add test for bpf_iter_task_vma

2020-12-15 Thread Song Liu
The test dumps information similar to /proc/pid/maps. The first line of the output is compared against the /proc file to make sure they match. Signed-off-by: Song Liu --- .../selftests/bpf/prog_tests/bpf_iter.c | 106 -- tools/testing/selftests/bpf/progs/bpf_iter.h | 9 +

[PATCH v2 bpf-next 2/4] bpf: allow bpf_d_path in sleepable bpf_iter program

2020-12-15 Thread Song Liu
task_file and task_vma iter programs have access to file->f_path. Enable bpf_d_path to print paths of these file. bpf_iter programs are generally called in sleepable context. However, it is still necessary to diffientiate sleepable and non-sleepable bpf_iter programs: sleepable programs have acces

[PATCH v2 bpf-next 3/4] libbpf: introduce section "iter.s/" for sleepable bpf_iter program

2020-12-15 Thread Song Liu
Sleepable iterator program have access to helper functions like bpf_d_path. Signed-off-by: Song Liu --- tools/lib/bpf/libbpf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 6ae748f6ea118..12ad4593a91cb 100644 --- a/tools/lib/bpf/li

[PATCH v2 bpf-next 1/4] bpf: introduce task_vma bpf_iter

2020-12-15 Thread Song Liu
Introduce task_vma bpf_iter to print memory information of a process. It can be used to print customized information similar to /proc//maps. task_vma iterator releases mmap_lock before calling the BPF program. Therefore, we cannot pass vm_area_struct directly to the BPF program. A new __vm_area_st

Re: [net-next v5 03/15] devlink: Introduce PCI SF port flavour and port attribute

2020-12-15 Thread Jakub Kicinski
On Tue, 15 Dec 2020 01:03:46 -0800 Saeed Mahameed wrote: > + * devlink_port_attrs_pci_sf_set - Set PCI SF port attributes > + * > + * @devlink_port: devlink port > + * @controller: associated controller number for the devlink port instance > + * @pf: associated PF for the devlink port insta

[PATCH v2 bpf-next 0/4] introduce bpf_iter for task_vma

2020-12-15 Thread Song Liu
This set introduces bpf_iter for task_vma, which can be used to generate information similar to /proc/pid/maps or /proc/pid/smaps. Patch 4/4 adds an example that mimics /proc/pid/maps. Changes v1 => v2: 1. Small fixes in task_iter.c and the selftests. (Yonghong) Song Liu (4): bpf: introduce t

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Daniel Borkmann
On 12/15/20 11:03 PM, Andrii Nakryiko wrote: On Tue, Dec 15, 2020 at 12:06 PM Cong Wang wrote: On Tue, Dec 15, 2020 at 11:27 AM Andrii Nakryiko wrote: On Mon, Dec 14, 2020 at 12:17 PM Cong Wang wrote: From: Cong Wang This borrows the idea from conntrack and will be used for conntrack i

Re: [PATCH net-next V8] net: Variable SLAAC: SLAAC with prefixes of arbitrary length in PIO

2020-12-15 Thread David Miller
From: Dmytro Shytyi Date: Wed, 09 Dec 2020 04:27:54 +0100 > Variable SLAAC [Can be activated via sysctl]: > SLAAC with prefixes of arbitrary length in PIO (randomly > generated hostID or stable privacy + privacy extensions). > The main problem is that SLAAC RA or PD allocates a /64 by the Wirele

one prog multi fentry. Was: [PATCH bpf-next] libbpf: support module BTF for BPF_TYPE_ID_TARGET CO-RE relocation

2020-12-15 Thread Alexei Starovoitov
On Wed, Dec 09, 2020 at 11:21:43PM +, Alan Maguire wrote: Right, that's exactly it. A pair of generic tracing BPF programs are used, and they attach to kprobe/kretprobes, and when they run they use the arguments plus the map details about BTF ids of those arguments to run bpf_snprintf_btf()

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

2020-12-15 Thread Stephen Hemminger
On Tue, 15 Dec 2020 09:42:08 +0200 Maxim Mikityanskiy wrote: > + print_uint(PRINT_ANY, "offload", " offload %d", !!tb[TCA_HTB_OFFLOAD]); This is not the best way to represent a boolean flag in JSON. Also it breaks the "output should be the same as command line" mantra. My preference is jso

Re: [PATCH] samples/bpf/Makefile: Create tools/testing/selftests/bpf dir

2020-12-15 Thread Andrii Nakryiko
On Mon, Dec 14, 2020 at 2:57 AM Hui Zhu wrote: > > From: Hui Zhu > > Got an error when I built samples/bpf in a separate directory: > make O=../bk/ defconfig > make -j64 bzImage > make headers_install > make V=1 M=samples/bpf > ... > ... > make -C /home/teawater/kernel/linux/samples/bpf/../..//to

Re: [Patch bpf-next v2 2/5] bpf: introduce timeout map

2020-12-15 Thread Andrii Nakryiko
On Tue, Dec 15, 2020 at 12:06 PM Cong Wang wrote: > > On Tue, Dec 15, 2020 at 11:27 AM Andrii Nakryiko > wrote: > > > > On Mon, Dec 14, 2020 at 12:17 PM Cong Wang wrote: > > > > > > From: Cong Wang > > > > > > This borrows the idea from conntrack and will be used for conntrack in > > > bpf too.

Re: [PATCH iproute2] ss: mptcp: fix add_addr_accepted stat print

2020-12-15 Thread Stephen Hemminger
On Wed, 18 Nov 2020 15:24:18 +0100 Andrea Claudi wrote: > add_addr_accepted value is not printed if add_addr_signal value is 0. > Fix this properly looking for add_addr_accepted value, instead. > > Fixes: 9c3be2c0eee01 ("ss: mptcp: add msk diag interface support") > Signed-off-by: Andrea Claudi

[PATCH net-next 1/4] enetc: drop unneeded indirection

2020-12-15 Thread Michael Walle
Before commit 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") these macros actually had some benefits. But after the commit it just makes the code hard to read. Drop the macro indirections. Signed-off-by: Michael Walle --- .../net/ethernet/freescale/enetc

Re: [PATCH net-next] bonding: correct rr balancing during link failure

2020-12-15 Thread Lars Everbrand
On Tue, Dec 08, 2020 at 01:46:09PM -0800, Jay Vosburgh wrote: > > Jakub Kicinski wrote: > > >On Wed, 02 Dec 2020 20:55:57 + Lars Everbrand wrote: > Are these bandwidth numbers from observation of the actual > behavior? I'm not sure the real system would behave this way; my > suspicion

[PATCH net-next 0/4] enetc: code cleanups

2020-12-15 Thread Michael Walle
This are some code cleanups in the MDIO part of the enetc. They are intended to make the code more readable. Michael Walle (4): enetc: drop unneeded indirection enetc: don't use macro magic for the readx_poll_timeout() callback enetc: drop MDIO_DATA() macro enetc: reorder macros and functi

[PATCH net-next 4/4] enetc: reorder macros and functions

2020-12-15 Thread Michael Walle
Now that there aren't any more macros with parameters, move the macros above any functions. Signed-off-by: Michael Walle --- .../net/ethernet/freescale/enetc/enetc_mdio.c | 22 +-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/freescale/enet

  1   2   3   >