On 2023-09-27 p.m.5:27, Michael S. Tsirkin wrote:
If an existing device exposes a small
capability matching old size, then you change size then
the check will fail on the existing device and driver won't load.
All this happens way before feature bit checks.
Will do
Thanks
Feng
On 2023-09-26 p.m.3:13, Feng Liu via Virtualization wrote:
External email: Use caution opening links or attachments
On 2023-09-21 a.m.9:46, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Sep 21, 2023 at 03:40:30PM +0300, Yishai Hadas wrote
On 2023-09-26 p.m.3:23, Feng Liu via Virtualization wrote:
External email: Use caution opening links or attachments
On 2023-09-21 a.m.9:57, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Sep 21, 2023 at 03:40:32PM +0300, Yishai Hadas wrote
On 2023-09-21 a.m.9:46, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Sep 21, 2023 at 03:40:30PM +0300, Yishai Hadas wrote:
From: Feng Liu
Currently VQ deletion callback vp_del_vqs() processes generic
virtio_device level VQ list instead of VQ
On 2023-09-21 a.m.9:57, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Sep 21, 2023 at 03:40:32PM +0300, Yishai Hadas wrote:
From: Feng Liu
Introduce support for the admin virtqueue. By negotiating
VIRTIO_F_ADMIN_VQ feature, driver detects
On 2023-07-24 a.m.2:46, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Jul 21, 2023 at 10:18:03PM +0200, Maxime Coquelin wrote:
On 7/21/23 17:10, Michael S. Tsirkin wrote:
On Fri, Jul 21, 2023 at 04:58:04PM +0200, Maxime Coquelin wrote:
On
The virtio_net driver currently deals with different versions and types
of virtio net headers, such as virtio_net_hdr_mrg_rxbuf,
virtio_net_hdr_v1_hash, etc. Due to these variations, the code relies
on multiple type casts to convert memory between different structures,
potentially leading to bugs
On 2023-08-17 p.m.6:11, Willem de Bruijn wrote:
You mean virtio_net_common_hdr?
It is a typo, will correct it.
will do
I'm not sure I follow the reasoning. Because then hdr_len might be
sizeof(virtio_net_hdr_mrg_rxbuf), but sizeof(virtio_net_common_hdr) is
larger. So the same issue
The virtio_net driver currently deals with different versions and types
of virtio net headers, such as virtio_net_hdr_mrg_rxbuf,
virtio_net_hdr_v1_hash, etc. Due to these variations, the code relies
on multiple type casts to convert memory between different structures,
potentially leading to bugs
On 2023-08-15 a.m.6:51, Simon Horman wrote:
External email: Use caution opening links or attachments
On Mon, Aug 14, 2023 at 01:18:45PM -0400, Feng Liu wrote:
+ "David S. Miller"
Eric Dumazet
Jakub Kicinski
Paolo Abeni
Thanks for adding David S. Miller.
The virtio_net
On 2023-08-16 a.m.10:53, Willem de Bruijn wrote:
External email: Use caution opening links or attachments
Thanks for the detailed explanation.
I kept virtio_net_hdr_mrg_rxbuf and virtio_net_hdr_v1_hash structures in
virtio_net.h, which can be forward compatible with existing user
On 2023-08-17 p.m.2:26, Willem de Bruijn wrote:
External email: Use caution opening links or attachments
On Thu, Aug 17, 2023 at 11:20 AM Feng Liu wrote:
The virtio_net driver currently deals with different versions and types
of virtio net headers, such as virtio_net_hdr_mrg_rxbuf,
On 2023-08-15 p.m.2:13, Willem de Bruijn wrote:
External email: Use caution opening links or attachments
On Tue, Aug 15, 2023 at 12:29 PM Simon Horman wrote:
On Tue, Aug 15, 2023 at 11:09:02AM -0400, Feng Liu wrote:
To clarify: In general new Networking features go via the net-next
Hi Jason , MST
Could you help to review this patch ? Any more comments?
Thanks
Feng
On 2023-08-21 a.m.10:27, Feng Liu wrote:
The virtio_net driver currently deals with different versions and types
of virtio net headers, such as virtio_net_hdr_mrg_rxbuf,
virtio_net_hdr_v1_hash, etc. Due to
On 2023-03-08 a.m.9:28, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Wed, Mar 08, 2023 at 09:19:38AM -0500, Feng Liu wrote:
On 2023-03-08 a.m.9:16, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Wed, Mar
On 2023-03-08 a.m.9:47, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Wed, Mar 08, 2023 at 09:40:03AM -0500, Feng Liu wrote:
In fact, I compiled and tested locally. I just looked it up and it might be
that I was missing a “git add” action which caused
On 2023-03-08 a.m.9:16, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Wed, Mar 08, 2023 at 09:07:49AM -0500, Feng Liu wrote:
On 2023-03-08 a.m.12:58, Jason Wang wrote:
External email: Use caution opening links or attachments
On Tue, Mar 7, 2023
On 2023-03-08 a.m.9:07, Feng Liu via Virtualization wrote:
External email: Use caution opening links or attachments
On 2023-03-08 a.m.12:58, Jason Wang wrote:
External email: Use caution opening links or attachments
On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote:
Add const to make
On 2023-03-08 a.m.9:13, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Tue, Mar 07, 2023 at 09:17:55PM +, Feng Liu wrote:
On 2023-03-07 04:14, David Edmondson wrote:
External email: Use caution opening links or attachments
Feng Liu via
:
External email: Use caution opening links or attachments
On Tue, Mar 07, 2023 at 09:17:55PM +, Feng Liu wrote:
On 2023-03-07 04:14, David Edmondson wrote:
External email: Use caution opening links or attachments
Feng Liu via Virtualization
writes:
Add const to make the read-only pointer
On 2023-03-08 a.m.12:58, Jason Wang wrote:
External email: Use caution opening links or attachments
On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote:
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
Signed-off-by: Feng Liu
Reviewed-by: Jiri
On 2023-03-08 a.m.9:23, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Tue, Mar 07, 2023 at 05:57:03AM +0200, Feng Liu wrote:
is_power_of_2() already performs the zero check. Hence avoid duplicate
check. While at it, move the query of size check also
07, 2023 at 09:17:55PM +, Feng Liu wrote:
On 2023-03-07 04:14, David Edmondson wrote:
External email: Use caution opening links or attachments
Feng Liu via Virtualization
writes:
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
In many
According to kernel coding style [1], defining inline functions is not
necessary and beneficial for simple functions. Hence clean up the code
by removing the inline keyword.
It is verified with GCC 12.2.0, the generated code with/without inline
is same. Additionally tested with pktgen and iperf,
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
To implement this change, the commit also introduces the use of
`container_of_const` to implement `to_vvq`, which ensures the const-ness
of read-only parameters and avoids accidental modification of
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Allow non power
According to the Virtio Specification, the Queue Size parameter of a
virtqueue corresponds to the maximum number of descriptors in that
queue, and it does not have to be a power of 2 for packed virtqueues.
However, the virtio_pci_modern driver enforced a power of 2 check for
virtqueue sizes, which
is_power_of_2() already performs the zero check. Hence avoid duplicate
check. While at it, move the query of size check also adjacent to where
its used for the disabled vq.
Signed-off-by: Feng Liu
Reviewed-by: Jiri Pirko
Reviewed-by: Parav Pandit
Reviewed-by: Gavin Li
Reviewed-by: Bodong Wang
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Remove
According to kernel coding style [1], defining inline functions is not
necessary and beneficial for simple functions. Hence clean up the code
by removing the inline keyword.
It is verified with GCC 12.2.0, the generated code with/without inline
is same. Additionally tested with pktgen and iperf,
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
Signed-off-by: Feng Liu
Reviewed-by: Jiri Pirko
Reviewed-by: Parav Pandit
Reviewed-by: Gavin Li
Reviewed-by: Bodong Wang
---
drivers/virtio/virtio_ring.c | 25 -
On 2023-03-10 a.m.3:06, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Mar 10, 2023 at 07:34:25AM +0200, Feng Liu wrote:
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux
On 2023-03-10 a.m.8:36, Parav Pandit wrote:
From: Feng Liu
Sent: Friday, March 10, 2023 12:34 AM
- if (!is_power_of_2(num)) {
- dev_warn(_dev->pci_dev->dev, "bad queue size %u",
num);
- return ERR_PTR(-EINVAL);
- }
-
The check is still valid
On 2023-03-11 p.m.2:06, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Mar 10, 2023 at 08:21:31AM -0500, Feng Liu wrote:
On 2023-03-10 a.m.3:06, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Mar
On 2023-03-11 p.m.2:05, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Mar 10, 2023 at 10:23:16AM -0500, Feng Liu wrote:
On 2023-03-10 a.m.8:36, Parav Pandit wrote:
From: Feng Liu
Sent: Friday, March 10, 2023 12:34 AM
- if
On 2023-03-12 a.m.1:47, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Sat, Mar 11, 2023 at 05:19:43PM -0500, Feng Liu wrote:
On 2023-03-11 p.m.2:06, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Mar
On 2023-03-12 a.m.1:46, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Sat, Mar 11, 2023 at 05:25:04PM -0500, Feng Liu wrote:
On 2023-03-11 p.m.2:05, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Fri, Mar
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Allow non power
According to the Virtio Specification, the Queue Size parameter of a
virtqueue corresponds to the maximum number of descriptors in that
queue, and it does not have to be a power of 2 for packed virtqueues.
However, the virtio_pci_modern driver enforced a power of 2 check for
virtqueue sizes, which
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
Use `container_of_const` to implement `to_vvq`, which ensures the
const-ness of read-only parameters and avoids accidental modification
of their members.
Signed-off-by: Feng Liu
Reviewed-by: Jiri Pirko
Remove the inline keyword, according to kernel coding style [1], defining
inline functions is not necessary for samll functions.
It is verified with GCC 12.2.0, the generated code with/without inline
is the same. Additionally tested with kernel pktgen and iperf, and
verified the result, pps of
On 2023-03-07 04:14, David Edmondson wrote:
> External email: Use caution opening links or attachments
>
>
> Feng Liu via Virtualization
> writes:
>
>> Add const to make the read-only pointer parameters clear, similar to
>> many existing functions.
>
&g
Use newly introduced helper function that exactly does the same of
closing the queue pairs.
Signed-off-by: Feng Liu
Reviewed-by: William Tu
Reviewed-by: Parav Pandit
---
drivers/net/virtio_net.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error
On 2023-05-01 a.m.10:14, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Mon, May 01, 2023 at 09:58:18AM -0400, Feng Liu wrote:
On 2023-05-01 a.m.8:44, Simon Horman wrote:
External email: Use caution opening links or attachments
On Fri, Apr 28,
On 2023-05-01 a.m.8:44, Simon Horman wrote:
External email: Use caution opening links or attachments
On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
Use newly introduced helper function that exactly does the same of
closing the queue pairs.
Signed-off-by: Feng Liu
Reviewed-by:
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error
On 2023-03-30 p.m.4:27, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Mar 30, 2023 at 02:22:44PM -0400, Feng Liu wrote:
On 2023-03-16 p.m.11:17, Jason Wang wrote:
External email: Use caution opening links or attachments
On Thu, Mar 16, 2023
On 2023-03-16 p.m.11:17, Jason Wang wrote:
External email: Use caution opening links or attachments
On Thu, Mar 16, 2023 at 2:55 AM Feng Liu wrote:
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
Use `container_of_const` to implement
On 2023-03-16 p.m.11:16, Jason Wang wrote:
External email: Use caution opening links or attachments
On Thu, Mar 16, 2023 at 2:55 AM Feng Liu wrote:
Remove the inline keyword, according to kernel coding style [1], defining
inline functions is not necessary for samll functions.
It is
On 2023-03-16 p.m.11:16, Jason Wang wrote:
External email: Use caution opening links or attachments
On Thu, Mar 16, 2023 at 2:55 AM Feng Liu wrote:
According to the Virtio Specification, the Queue Size parameter of a
virtqueue corresponds to the maximum number of descriptors in that
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error
On 2023-05-02 p.m.2:32, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Tue, May 02, 2023 at 01:41:34PM -0400, Feng Liu wrote:
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However,
The 'is_legacy' flag is used to differentiate between legacy vs modern
device. Currently, it is based on the value of vp_dev->ldev.ioaddr.
However, due to the shared memory of the union between struct
virtio_pci_legacy_device and struct virtio_pci_modern_device, when
virtio_pci_modern_probe
On 2023-07-19 p.m.10:27, Jason Wang wrote:
External email: Use caution opening links or attachments
On Wed, Jul 19, 2023 at 11:46 PM Feng Liu wrote:
The 'is_legacy' flag is used to differentiate between legacy vs modern
device. Currently, it is based on the value of vp_dev->ldev.ioaddr.
On 2023-07-19 p.m.10:27, Jason Wang wrote:
External email: Use caution opening links or attachments
On Wed, Jul 19, 2023 at 11:46 PM Feng Liu wrote:
The 'is_legacy' flag is used to differentiate between legacy vs modern
device. Currently, it is based on the value of vp_dev->ldev.ioaddr.
Fix code style related to including header file. Include header files
before declaring macro definitions to avoid conflicts.
Signed-off-by: Feng Liu
Reviewed-by: Jiri Pirko
---
drivers/virtio/virtio_pci_modern.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On 2023-05-30 a.m.7:27, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Mon, May 29, 2023 at 02:17:29PM -0400, Feng Liu wrote:
Fix code style related to including header file. Include header files
before declaring macro definitions to avoid conflicts.
On 2023-05-30 a.m.11:18, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Tue, May 30, 2023 at 10:07:23AM -0400, Feng Liu wrote:
On 2023-05-30 a.m.7:27, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Mon, May
On 2023-07-20 p.m.1:14, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Jul 20, 2023 at 10:27:04AM +0800, Jason Wang wrote:
On Wed, Jul 19, 2023 at 11:46 PM Feng Liu wrote:
The 'is_legacy' flag is used to differentiate between legacy vs modern
On 2023-07-24 p.m.11:41, Jason Wang wrote:
External email: Use caution opening links or attachments
On Mon, Jul 24, 2023 at 9:14 PM Feng Liu wrote:
On 2023-07-20 p.m.1:14, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, Jul 20, 2023 at
On 2023-05-07 p.m.9:45, Xuan Zhuo wrote:
External email: Use caution opening links or attachments
On Sat, 6 May 2023 08:08:02 -0400, Feng Liu wrote:
On 2023-05-05 p.m.10:33, Xuan Zhuo wrote:
External email: Use caution opening links or attachments
On Tue, 2 May 2023 20:35:25 -0400,
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error
On 2023-05-10 a.m.1:00, Jason Wang wrote:
External email: Use caution opening links or attachments
在 2023/5/9 09:43, Xuan Zhuo 写道:
On Mon, 8 May 2023 11:00:10 -0400, Feng Liu wrote:
On 2023-05-07 p.m.9:45, Xuan Zhuo wrote:
External email: Use caution opening links or attachments
On
Improve the size of the virtio_pci_device structure, which is commonly
used to represent a virtio PCI device. A given virtio PCI device can
either of legacy type or modern type, with the
struct virtio_pci_legacy_device occupying 32 bytes and the
struct virtio_pci_modern_device occupying 88 bytes.
On 2023-05-05 p.m.10:33, Xuan Zhuo wrote:
External email: Use caution opening links or attachments
On Tue, 2 May 2023 20:35:25 -0400, Feng Liu wrote:
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs
On 2023-05-10 a.m.1:00, Jason Wang wrote:
External email: Use caution opening links or attachments
在 2023/5/9 09:43, Xuan Zhuo 写道:
On Mon, 8 May 2023 11:00:10 -0400, Feng Liu wrote:
On 2023-05-07 p.m.9:45, Xuan Zhuo wrote:
External email: Use caution opening links or attachments
On
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error
On 2023-05-04 a.m.9:50, Dragos Tatulea wrote:
External email: Use caution opening links or attachments
The referenced patch calls set_vq_affinity without checking if the op is
valid. This patch adds the check.
Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading
On 2023-05-04 a.m.9:50, Dragos Tatulea wrote:
External email: Use caution opening links or attachments
The referenced patch calls set_vq_affinity without checking if the op is
valid. This patch adds the check.
Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading
On 2023-05-04 p.m.1:19, Dragos Tatulea wrote:
On Thu, 2023-05-04 at 13:08 -0400, Feng Liu wrote:
On 2023-05-04 a.m.9:50, Dragos Tatulea wrote:
External email: Use caution opening links or attachments
The referenced patch calls set_vq_affinity without checking if the op is
valid. This
On 2023-05-04 p.m.2:51, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Thu, May 04, 2023 at 01:08:54PM -0400, Feng Liu wrote:
On 2023-05-04 a.m.9:50, Dragos Tatulea wrote:
External email: Use caution opening links or attachments
The referenced
On 2023-05-02 p.m.11:14, Parav Pandit wrote:
From: Feng Liu
Sent: Tuesday, May 2, 2023 8:35 PM
Issue: 3383038
Remove this internal garbage.
Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info")
Signed-off-by: Feng Liu
Reviewed-by: William Tu
Reviewed-by: Parav Pandit
Reviewed-by:
On 2023-05-09 a.m.12:42, Michael S. Tsirkin wrote:
External email: Use caution opening links or attachments
On Mon, May 08, 2023 at 06:27:08PM -0400, Feng Liu wrote:
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed.
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error
The virtio_net driver currently deals with different versions and types
of virtio net headers, such as virtio_net_hdr_mrg_rxbuf,
virtio_net_hdr_v1_hash, etc. Due to these variations, the code relies
on multiple type casts to convert memory between different structures,
potentially leading to bugs
76 matches
Mail list logo