Re: [PATCH 2/2] vdpa/mlx5: Fix possible failure in umem size calculation

2021-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2021 at 11:17:21AM +0300, Eli Cohen wrote: > On Sun, May 30, 2021 at 04:05:57AM -0400, Michael S. Tsirkin wrote: > > On Sun, May 30, 2021 at 09:32:14AM +0300, Eli Cohen wrote: > > > umem size is a 32 bit unsigned value so assigning it to an int could > > > cause false failures. Set

Re: [PATCH 2/2] vdpa/mlx5: Fix possible failure in umem size calculation

2021-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2021 at 11:27:48AM +0300, Eli Cohen wrote: > On Sun, May 30, 2021 at 04:21:07AM -0400, Michael S. Tsirkin wrote: > > On Sun, May 30, 2021 at 11:17:21AM +0300, Eli Cohen wrote: > > > On Sun, May 30, 2021 at 04:05:57AM -0400, Michael S. Tsirkin wrote: > > > > On Sun, May 30, 2021 at

Re: [PATCH 1/2] vdpa/mlx5: Fix umem sizes assignments on VQ create

2021-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2021 at 11:15:36AM +0300, Eli Cohen wrote: > On Sun, May 30, 2021 at 04:05:16AM -0400, Michael S. Tsirkin wrote: > > On Sun, May 30, 2021 at 09:31:28AM +0300, Eli Cohen wrote: > > > Fix copy paste bug assigning umem1 size to umem2 and umem3. > > > > > > Fixes: 1a86b377aa21

Patch "{net, vdpa}/mlx5: Configure interface MAC into mpfs L2 table" has been added to the 5.12-stable tree

2021-05-30 Thread gregkh
This is a note to let you know that I've just added the patch titled {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch

Re: [PATCH v1] vdpa/mlx5: Fix umem sizes assignments on VQ create

2021-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2021 at 11:35:48AM +0300, Eli Cohen wrote: > Fix copy paste bug assigning umem1 size to umem2 and umem3. The issue > was discovered when trying to use a 1:1 MR that covers the entire > address space where firmware complained that provided sizes are not > large enough. .. creating

Re: [PATCH 1/2] vdpa/mlx5: Fix umem sizes assignments on VQ create

2021-05-30 Thread Michael S. Tsirkin
On Sun, May 30, 2021 at 09:31:28AM +0300, Eli Cohen wrote: > Fix copy paste bug assigning umem1 size to umem2 and umem3. > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > Signed-off-by: Eli Cohen could you clarify the impact of the bug please? > --- >

Re: [PATCH 1/2] vdpa/mlx5: Support creating resources with uid == 0

2021-05-30 Thread Jason Wang
在 2021/5/30 下午3:54, Eli Cohen 写道: Currently all resources must be created with uid != 0 which is essential userspace processes allocating virtquueue resources. Since this is a kernel implementation, it is perfectly legal to open resources with uid == 0. In case frimware supports, avoid

Re: [PATCH net 1/2] virtio-net: fix for unable to handle page fault for address

2021-05-30 Thread Jason Wang
在 2021/5/14 下午11:16, Xuan Zhuo 写道: In merge mode, when xdp is enabled, if the headroom of buf is smaller than virtnet_get_headroom(), xdp_linearize_page() will be called but the variable of "headroom" is still 0, which leads to wrong logic after entering page_to_skb(). [ 16.600944] BUG:

Re: [PATCH 1/2] vdpa/mlx5: Support creating resources with uid == 0

2021-05-30 Thread Jason Wang
在 2021/5/31 上午11:02, Jason Wang 写道: 在 2021/5/30 下午3:54, Eli Cohen 写道: Currently all resources must be created with uid != 0 which is essential userspace processes allocating virtquueue resources. Since this is a kernel implementation, it is perfectly legal to open resources with uid == 0. In

Re: [PATCH 2/2] vdpa/mlx5: Add support for running with virtio_vdpa

2021-05-30 Thread Jason Wang
在 2021/5/30 下午3:54, Eli Cohen 写道: In order to support running vdpa using vritio_vdpa driver, we need to create a different kind of MR, one that has 1:1 mapping, since the addresses referring to virtqueues are dma addresses. We create the 1:1 MR in mlx5_vdpa_dev_add() only in case firmware

Re: [PATCH net-next] virtio_net: set link state down when virtqueue is broken

2021-05-30 Thread Jason Wang
在 2021/5/28 下午6:58, wangyunjian 写道: -Original Message- From: Yunjian Wang The NIC can't receive/send packets if a rx/tx virtqueue is broken. However, the link state of the NIC is still normal. As a result, the user cannot detect the NIC exception. Doesn't we have:    /* This

Re: [PATCH v7 11/12] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-05-30 Thread Jason Wang
在 2021/5/31 下午12:27, Yongji Xie 写道: On Fri, May 28, 2021 at 10:31 AM Jason Wang wrote: 在 2021/5/27 下午9:17, Yongji Xie 写道: On Thu, May 27, 2021 at 4:41 PM Jason Wang wrote: 在 2021/5/27 下午3:34, Yongji Xie 写道: On Thu, May 27, 2021 at 1:40 PM Jason Wang wrote: 在 2021/5/27 下午1:08, Yongji

Re: [PATCH v7 11/12] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-05-30 Thread Greg KH
On Mon, May 17, 2021 at 05:55:12PM +0800, Xie Yongji wrote: > +struct vduse_dev { > + struct vduse_vdpa *vdev; > + struct device dev; > + struct cdev cdev; You now have 2 reference counted devices controling the lifespace of a single structure. A mess that is guaranteed to go wrong.