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: unable to handle page fault for address: ff
In the case of merge, the page passed into page_to_skb() may be a head
page, not the page where the current data is located. So when trying to
get the buf where the data is located, we should get buf based on
headroom instead of offset.
This patch solves this problem. But if you don't use this pat
#1 Fixed a serious error.
#2 Fixed a logical error, but this error did not cause any serious consequences.
The logic of this piece is really messy. Fortunately, my refactored patch can be
completed with a small amount of testing.
Thanks.
Xuan Zhuo (2):
virtio-net: fix for unable to handle page
On Tue, 1 Jun 2021 14:17:27 +0800, Jason Wang wrote:
>
> 在 2021/6/1 下午1:59, Xuan Zhuo 写道:
> > On Tue, 1 Jun 2021 11:27:12 +0800, Jason Wang wrote:
> >> 在 2021/6/1 上午11:08, Xuan Zhuo 写道:
> >>> On Tue, 1 Jun 2021 11:03:37 +0800, Jason Wang wrote:
> 在 2021/5/31 下午6:58, Xuan Zhuo 写道:
> > On
在 2021/6/1 下午1:59, Xuan Zhuo 写道:
On Tue, 1 Jun 2021 11:27:12 +0800, Jason Wang wrote:
在 2021/6/1 上午11:08, Xuan Zhuo 写道:
On Tue, 1 Jun 2021 11:03:37 +0800, Jason Wang wrote:
在 2021/5/31 下午6:58, Xuan Zhuo 写道:
On Mon, 31 May 2021 14:10:55 +0800, Jason Wang wrote:
在 2021/5/14 下午11:16, Xuan Z
On Tue, 1 Jun 2021 11:27:12 +0800, Jason Wang wrote:
>
> 在 2021/6/1 上午11:08, Xuan Zhuo 写道:
> > On Tue, 1 Jun 2021 11:03:37 +0800, Jason Wang wrote:
> >> 在 2021/5/31 下午6:58, Xuan Zhuo 写道:
> >>> On Mon, 31 May 2021 14:10:55 +0800, Jason Wang
> >>> wrote:
> 在 2021/5/14 下午11:16, Xuan Zhuo 写道:
在 2021/6/1 上午10:20, Jason Wang 写道:
在 2021/6/1 上午12:05, Eli Cohen 写道:
Clear the available index as part of the initialization process to
clear and values that might be left from previous usage of the device.
For example, if the device was previously used by vhost_vdpa and now
probed by vhost_vd
在 2021/6/1 下午12:13, Eli Cohen 写道:
On Tue, Jun 01, 2021 at 10:18:04AM +0800, Jason Wang wrote:
在 2021/6/1 上午12:04, Eli Cohen 写道:
Only return the value of the ready field if the VQ is initialized in
which case the value of the field is valid.
Failing to do so can result in virtio_vdpa failing t
在 2021/6/1 上午11:40, Eli Cohen 写道:
On Tue, Jun 01, 2021 at 10:09:45AM +0800, Jason Wang wrote:
在 2021/6/1 上午12:04, 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 virtq
在 2021/6/1 上午11:27, Zhu, Lingshan 写道:
On 5/31/2021 3:56 PM, Jason Wang wrote:
在 2021/5/31 下午3:33, Zhu Lingshan 写道:
This commit implements doorbell mapping feature for ifcvf.
This feature maps the notify page to userspace, to eliminate
vmexit when kick a vq.
Signed-off-by: Zhu Lingshan
---
在 2021/6/1 上午11:08, Xuan Zhuo 写道:
On Tue, 1 Jun 2021 11:03:37 +0800, Jason Wang wrote:
在 2021/5/31 下午6:58, Xuan Zhuo 写道:
On Mon, 31 May 2021 14:10:55 +0800, Jason Wang wrote:
在 2021/5/14 下午11:16, Xuan Zhuo 写道:
In the case of merge, the page passed into page_to_skb() may be a head
page, not
On Tue, 1 Jun 2021 11:03:37 +0800, Jason Wang wrote:
>
> 在 2021/5/31 下午6:58, Xuan Zhuo 写道:
> > On Mon, 31 May 2021 14:10:55 +0800, Jason Wang wrote:
> >> 在 2021/5/14 下午11:16, Xuan Zhuo 写道:
> >>> In the case of merge, the page passed into page_to_skb() may be a head
> >>> page, not the page where
在 2021/5/31 下午6:58, Xuan Zhuo 写道:
On Mon, 31 May 2021 14:10:55 +0800, Jason Wang wrote:
在 2021/5/14 下午11:16, Xuan Zhuo 写道:
In the case of merge, the page passed into page_to_skb() may be a head
page, not the page where the current data is located.
I don't get how this can happen?
Maybe you
On Wed, May 26, 2021 at 11:34 AM Willem de Bruijn
wrote:
>
> On Wed, May 26, 2021 at 4:24 AM Michael S. Tsirkin wrote:
> >
> >
> > With the implementation of napi-tx in virtio driver, we clean tx
> > descriptors from rx napi handler, for the purpose of reducing tx
> > complete interrupts. But thi
在 2021/6/1 上午12:05, Eli Cohen 写道:
Clear the available index as part of the initialization process to
clear and values that might be left from previous usage of the device.
For example, if the device was previously used by vhost_vdpa and now
probed by vhost_vdpa, you want to start with indices.
在 2021/6/1 上午12:04, Eli Cohen 写道:
Only return the value of the ready field if the VQ is initialized in
which case the value of the field is valid.
Failing to do so can result in virtio_vdpa failing to load if the device
was previously used by vhost_vdpa and the old values are ready.
virtio_vdpa
在 2021/6/1 上午12:04, 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
supp
在 2021/6/1 上午12:04, Eli Cohen 写道:
Currently all resources must be created with uid != 0 which is essential
when userspace processes are allocating virtquueue resources. Since this
is a kernel implementation, it is perfectly legal to open resources with
uid == 0.
In case firmware supports, avoid
在 2021/5/31 下午9:58, Xie Yongji 写道:
This adds validation for used length (might come
from an untrusted device) to avoid data corruption
or loss.
Signed-off-by: Xie Yongji
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 20 +---
1 file changed, 13 insertions(+), 7 d
On Mon, May 31, 2021 at 07:04:04PM +0300, Eli Cohen wrote:
> Currently all resources must be created with uid != 0 which is essential
> when userspace processes are allocating virtquueue resources. Since this
> is a kernel implementation, it is perfectly legal to open resources with
> uid == 0.
>
Hi Eli,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.13-rc3]
[cannot apply to linus/master v5.13-rc4 next-20210528]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
htt
From: Eli Cohen
commit 7c9f131f366ab414691907fa0407124ea2b2f3bc upstream.
net/mlx5: Expose MPFS configuration API
MPFS is the multi physical function switch that bridges traffic between
the physical port and any physical functions associated with it. The
driver is required to add or remove MAC
From: Eli Cohen
commit 7c9f131f366ab414691907fa0407124ea2b2f3bc upstream.
net/mlx5: Expose MPFS configuration API
MPFS is the multi physical function switch that bridges traffic between
the physical port and any physical functions associated with it. The
driver is required to add or remove MAC
On Mon, 31 May 2021 14:10:55 +0800, Jason Wang wrote:
>
> 在 2021/5/14 下午11:16, Xuan Zhuo 写道:
> > In the case of merge, the page passed into page_to_skb() may be a head
> > page, not the page where the current data is located.
>
>
> I don't get how this can happen?
>
> Maybe you can explain a littl
On Mon, 31 May 2021 11:50:00 +0800, Jason Wang wrote:
>
> 在 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
On Mon, May 31, 2021 at 05:57:47PM +0800, Zhu, Lingshan wrote:
>
>
> On 5/31/2021 3:58 PM, Cornelia Huck wrote:
> > On Mon, 31 May 2021 15:27:42 +0800
> > Zhu Lingshan wrote:
> >
> > > This commit updates virtio id table by adding transitional device
> > > ids
> > > virtio_pci_common.h
> > > Si
在 2021/5/20 上午12:28, Eugenio Pérez 写道:
This tree is able to look for a translated address from a IOVA address.
At first glance is similar to util/iova-tree. However, SVQ working on
devices with limited IOVA space need more capabilities, like allocating
IOVA chunks or perform reverse translation
在 2021/5/20 上午12:28, Eugenio Pérez 写道:
This operation enable the backend-specific IOTLB entries.
If a backend support this, it start managing its own entries, and vhost
can disable it through this operation and recover control.
Every enable/disable operation must also clear all IOTLB device en
在 2021/5/30 下午5:03, Eli Cohen 写道:
umem size is a 32 bit unsigned value so assigning it to an int could
cause false failures. Set the calculated value inside the function and
modify function name to reflect the fact it updates the size.
This bug was found during code review but never had real im
在 2021/5/30 下午5:03, Eli Cohen 写道:
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. 1:1 MRs are required to support virtio_vdpa.
On Mon, 31 May 2021 15:27:42 +0800
Zhu Lingshan wrote:
> This commit updates virtio id table by adding transitional device
> ids
>
> Signed-off-by: Zhu Lingshan
> ---
> include/uapi/linux/virtio_ids.h | 12
> 1 file changed, 12 insertions(+)
>
> diff --git a/include/uapi/linux/vi
在 2021/5/31 下午3:33, Zhu Lingshan 写道:
This commit implements doorbell mapping feature for ifcvf.
This feature maps the notify page to userspace, to eliminate
vmexit when kick a vq.
Signed-off-by: Zhu Lingshan
---
drivers/vdpa/ifcvf/ifcvf_main.c | 17 +
1 file changed, 17 inse
在 2021/5/31 下午3:19, Yongji Xie 写道:
On Mon, May 31, 2021 at 2:49 PM Jason Wang wrote:
在 2021/5/28 下午8:11, Xie Yongji 写道:
This adds validation for used length (might come
from an untrusted device) to avoid data corruption
or loss.
Signed-off-by: Xie Yongji
---
drivers/net/virtio_net.c | 2
33 matches
Mail list logo