On Thu, 18 Apr 2024 22:19:33 +0200, Jesper Dangaard Brouer
wrote:
>
>
> On 17/04/2024 10.20, Xuan Zhuo wrote:
> > On Wed, 17 Apr 2024 12:08:10 +0800, Jason Wang wrote:
> >> On Wed, Apr 17, 2024 at 9:38 AM Xuan Zhuo
> >> wrote:
> >>>
> &g
On Fri, 19 Apr 2024 15:24:25 +0800, Jason Wang wrote:
> On Fri, Apr 19, 2024 at 3:07 PM Xuan Zhuo wrote:
> >
> > On Fri, 19 Apr 2024 13:46:25 +0800, Jason Wang wrote:
> > > On Fri, Apr 19, 2024 at 12:23 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Fri, 19 Apr 2024 15:24:25 +0800, Jason Wang wrote:
> On Fri, Apr 19, 2024 at 3:07 PM Xuan Zhuo wrote:
> >
> > On Fri, 19 Apr 2024 13:46:25 +0800, Jason Wang wrote:
> > > On Fri, Apr 19, 2024 at 12:23 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Fri, 19 Apr 2024 16:12:15 +0800, Jason Wang wrote:
> On Fri, Apr 19, 2024 at 3:28 PM Xuan Zhuo wrote:
> >
> > On Fri, 19 Apr 2024 15:24:25 +0800, Jason Wang wrote:
> > > On Fri, Apr 19, 2024 at 3:07 PM Xuan Zhuo
> > > wrote:
> > > >
> >
We call the build_skb() actually without copying data.
The comment is misleading. So remove it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index eff8f16a9fe0..a8dac48a1be7 100644
unsigned long _pp_mapping_pad;
unsigned long dma_addr;
atomic_long_t pp_ref_count;
};
On the other side, we should use variables from the same sub-struct.
So this patch replaces the "private" with "pp".
Signed
while using page pool is
unsafe behavior.
More:
https://lore.kernel.org/all/CACGkMEu=Aok9z2imB_c5qVuujSh=vjj1kx12fy9n7hqyi+m...@mail.gmail.com/
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 123 ++-
1 file changed, 108 insertions(+), 15 dele
Now, we have virtio DMA APIs, the driver can be the premapped
mode whatever the virtio core uses dma api or not.
So remove the limit of checking use_dma_api from
virtqueue_set_dma_premapped().
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 7 +--
1 file
,
unsigned long attrs);
void virtqueue_dma_unmap_page_attrs(struct virtqueue *_vq, dma_addr_t addr,
size_t size, enum dma_data_direction dir,
unsigned long attrs);
Signed-off-by: Xuan Zhuo
Acked-by: Jason
: Xuan Zhuo
---
drivers/net/virtio_net.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 75f33bbfd5fa..1bf49956dce8 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -896,13 +896,9 @@ static
lease review.
v1:
1. discussed for using page pool
2. use dma sync to replace the unmap for the first page
Thanks.
Xuan Zhuo (7):
virtio_ring: introduce dma map api for page
virtio_ring: enable premapped mode whatever use_dma_api
virtio_net: replace private by pp struct inside
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 81
1 file changed, 33 insertions(+), 48 deletions(-)
diff --git a/drivers/net
lease review.
v2:
1. make gcc happy in page_chain_get_dma()
http://lore.kernel.org/all/202404221325.sx5chrgp-...@intel.com
v1:
1. discussed for using page pool
2. use dma sync to replace the unmap for the first page
Thanks.
Xuan Zhuo (7):
virtio_ring: introduce dma map ap
,
unsigned long attrs);
void virtqueue_dma_unmap_page_attrs(struct virtqueue *_vq, dma_addr_t addr,
size_t size, enum dma_data_direction dir,
unsigned long attrs);
Signed-off-by: Xuan Zhuo
Acked-by: Jason
Now, we have virtio DMA APIs, the driver can be the premapped
mode whatever the virtio core uses dma api or not.
So remove the limit of checking use_dma_api from
virtqueue_set_dma_premapped().
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 7 +--
1 file
unsigned long _pp_mapping_pad;
unsigned long dma_addr;
atomic_long_t pp_ref_count;
};
On the other side, we should use variables from the same sub-struct.
So this patch replaces the "private" with "pp".
Signed
: Xuan Zhuo
---
drivers/net/virtio_net.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d4f5e65b247e..f04b10426b8f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -896,13 +896,9 @@ static
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 81
1 file changed, 33 insertions(+), 48 deletions(-)
diff --git a/drivers/net
while using page pool is
unsafe behavior.
More:
https://lore.kernel.org/all/CACGkMEu=Aok9z2imB_c5qVuujSh=vjj1kx12fy9n7hqyi+m...@mail.gmail.com/
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 123 ++-
1 file changed, 108 insertions(+), 15 dele
We call the build_skb() actually without copying data.
The comment is misleading. So remove it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 848e93ccf2ef..ae15254a673b 100644
On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo wrote:
> >
> > In big mode, pre-mapping DMA is beneficial because if the pages are not
> > used, we can reuse them without needing to unmap and remap.
> >
> >
On Mon, 22 Apr 2024 16:33:01 -0400, "Michael S. Tsirkin"
wrote:
> On Mon, Mar 18, 2024 at 07:05:53PM +0800, Xuan Zhuo wrote:
> > As the spec:
> >
> > https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> >
> >
irtnet_stats_map
v1:
1. fix some definitions of the marco and the struct
Xuan Zhuo (8):
virtio_net: introduce device stats feature and structures
virtio_net: remove "_queue" from ethtool -S
virtio_net: support device stats
virtio_net: device stats helpers support driv
, ratelimit_packets),
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 476 ++-
1 file changed, 472 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index bd90f9d3d9b7..acae0c310688 100644
--- a/drivers/net
The virtio-net device stats spec:
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
We introduce the relative feature and structures.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/uapi/linux/virtio_net.h | 143
In the last commit, we introduced some helpers for device stats.
And the drivers stats are realized by the open code.
This commit make the helpers to support driver stats.
Then we can have the unify helper for device and driver stats.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 157
ame max is 19. That is too short. We will introduce some keys
such as "gso_packets_coalesced". So we should change the prefix
to "rx0_".
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --
Now, we have this:
tx_queue_0_tx_timeouts
This is used to record the tx schedule timeout.
But this has two "tx". I think the below is enough.
tx_queue_0_timeouts
So I rename this field.
Signed-off-by: Xuan Zhuo
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 8 +
'rx-hw-drop-ratelimits': 0,
'rx-hw-drops': 12964,
'rx-packets': 598929},
{'ifindex': 2,
'queue-id': 0,
'queue-type': 'tx',
'tx-bytes': 1938511,
'tx-csum-none': 0,
'tx-hw-drop-errors': 0
tx0_hw_drops: 0
tx0_hw_drop_malformed: 0
tx0_hw_csum_none: 0
tx0_hw_needs_csum: 32281
tx0_hw_ratelimit_packets: 0
tx0_hw_ratelimit_bytes: 0
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 81 ++--
1 file changed, 69
-hw-drop-ratelimits
name: tx-hw-drops
name: tx-hw-drop-errors
name: tx-csum-none
name: tx-needs-csum
name: tx-hw-gso-packets
name: tx-hw-gso-bytes
name: tx-hw-gso-wire-packets
name: tx-hw-gso-wire-bytes
name: tx-hw-drop-ratelimits
Signed-off-by: Xuan Zhuo
---
Documentation/netlink/specs
On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo wrote:
> >
> > In big mode, pre-mapping DMA is beneficial because if the pages are not
> > used, we can reuse them without needing to unmap and remap.
> >
> >
On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang wrote:
> On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo wrote:
> >
> > On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> > > On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo
> > > wrote:
> > > >
>
On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo wrote:
> >
> > On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang wrote:
> > > On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Wed, 24 Apr 2024 10:45:49 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 10:42 AM Xuan Zhuo wrote:
> >
> > On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang wrote:
> > > On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo
> > > wrote:
> > > >
> >
On Wed, 24 Apr 2024 11:50:44 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 10:58 AM Xuan Zhuo wrote:
> >
> > On Wed, 24 Apr 2024 10:45:49 +0800, Jason Wang wrote:
> > > On Wed, Apr 24, 2024 at 10:42 AM Xuan Zhuo
> > > wrote:
> > > >
> >
s the dma map/unmap
v2:
1. make gcc happy in page_chain_get_dma()
http://lore.kernel.org/all/202404221325.sx5chrgp-...@intel.com
v1:
1. discussed for using page pool
2. use dma sync to replace the unmap for the first page
Thanks.
Xuan Zhuo (4):
virtio_ring: enable prem
The virtio-net big mode did not enable premapped mode,
so we did not need to check the unmap. And the subsequent
commit will remove the failover code for failing enable
premapped for merge and small mode. So we need to remove
the checking do_dma code in the big mode path.
Signed-off-by: Xuan Zhuo
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code for merge and small mode.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 85 +---
1 file changed, 35 insertions(+), 50 deletions
Now, we have virtio DMA APIs, the driver can be the premapped
mode whatever the virtio core uses dma api or not.
So remove the limit of checking use_dma_api from
virtqueue_set_dma_premapped().
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 7 +--
1 file
We call the build_skb() actually without copying data.
The comment is misleading. So remove it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index a4b924ba18d3
On Wed, 24 Apr 2024 11:52:12 +0800, Jason Wang wrote:
> On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote:
> >
> > Now, we just show the stats of every queue.
> >
> > But for the user, the total values of every stat may are valuable.
> >
> > NIC
On Wed, 24 Apr 2024 11:55:24 +0800, Jason Wang wrote:
> On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote:
> >
> > Now, we have this:
> >
> > tx_queue_0_tx_timeouts
> >
> > This is used to record the tx schedule timeout.
> > But t
On Thu, 25 Apr 2024 10:11:55 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 4:17 PM Xuan Zhuo wrote:
> >
> > The virtio-net big mode did not enable premapped mode,
> > so we did not need to check the unmap. And the subsequent
> > commit will remove the failo
On Wed, 24 Apr 2024 20:44:22 -0700, Jakub Kicinski wrote:
> On Tue, 23 Apr 2024 19:31:41 +0800 Xuan Zhuo wrote:
> > +static void virtnet_get_base_stats(struct net_device *dev,
> > + struct netdev_queue_stats_rx *rx,
> > +
The virtio-net device stats spec:
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
We introduce the relative feature and structures.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/uapi/linux/virtio_net.h | 143
).
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 24 +---
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 7176b956460b..3bc9b1e621db 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net
ame max is 19. That is too short. We will introduce some keys
such as "gso_packets_coalesced". So we should change the prefix
to "rx0_".
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --
, ratelimit_packets),
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 476 ++-
1 file changed, 472 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 8aa03625ab6c..08639902f94b 100644
irtnet_stats_map
v1:
1. fix some definitions of the marco and the struct
Xuan Zhuo (8):
virtio_net: introduce ability to get reply info from device
virtio_net: introduce device stats feature and structures
virtio_net: remove "_queue" from ethtool -S
virtio_net: sup
In the last commit, we introduced some helpers for device stats.
And the drivers stats are realized by the open code.
This commit make the helpers to support driver stats.
Then we can have the unify helper for device and driver stats.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers
tx0_hw_drops: 0
tx0_hw_drop_malformed: 0
tx0_hw_csum_none: 0
tx0_hw_needs_csum: 32281
tx0_hw_ratelimit_packets: 0
tx0_hw_ratelimit_bytes: 0
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 81 ++--
1 file changed, 69
'rx-hw-drop-ratelimits': 0,
'rx-hw-drops': 12964,
'rx-packets': 598929},
{'ifindex': 2,
'queue-id': 0,
'queue-type': 'tx',
'tx-bytes': 1938511,
'tx-csum-none': 0,
'tx-hw-drop-errors': 0
-hw-drop-ratelimits
name: tx-hw-drops
name: tx-hw-drop-errors
name: tx-csum-none
name: tx-needs-csum
name: tx-hw-gso-packets
name: tx-hw-gso-bytes
name: tx-hw-gso-wire-packets
name: tx-hw-gso-wire-bytes
name: tx-hw-drop-ratelimits
Signed-off-by: Xuan Zhuo
---
Documentation/netlink/specs
On Fri, 26 Apr 2024 13:00:08 +0200, Paolo Abeni wrote:
> On Wed, 2024-04-24 at 16:16 +0800, Xuan Zhuo wrote:
> > Actually, for the virtio drivers, we can enable premapped mode whatever
> > the value of use_dma_api. Because we provide the virtio dma apis.
> > So the driver
first four patches can be merged
first to reduce the number of patches in the final set.
Thanks.
Xuan Zhuo (5):
virtio_ring: introduce vring_need_unmap_buffer
virtio_ring: introduce dma map api for page
virtio_ring: introduce virtqueue_dma_map_sg_attrs
virtio_ring: virtqueue_set_dma_premapped
To make the code readable, introduce vring_need_unmap_buffer() to
replace do_unmap.
use_dma_api premapped -> vring_need_unmap_buffer()
1. false falsefalse
2. truefalsetrue
3. truetrue false
Signed-off-by: Xuan Zhuo
Acked-by: Jason W
long attrs);
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 52
include/linux/virtio.h | 7 +
2 files changed, 59 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index d7059bacb593..653c7ea24fb7
Introduce a helper to do dma map for scatterlist.
That can be used by other drivers.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 32
include/linux/virtio.h | 3 +++
2 files changed, 35 insertions(+)
diff --git a/drivers/virtio
virtio-net sq will only enable premapped mode when the sq is bound to
the af-xdp.
So we need the helper (virtqueue_set_dma_premapped) to enable the
premapped mode when af-xdp binds to the sq. And to disable the
premapped mode when af-xdp unbinds to the sq.
Signed-off-by: Xuan Zhuo
---
drivers
attempt to use more
descriptors, virtnet_add_outbuf() will return an -ENOMEM error. But
the af-xdp can work continually.
* virtnet_sq_set_premapped(sq, false) is used to disable premapped mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 210
page
Thanks.
Xuan Zhuo (4):
virtio_ring: enable premapped mode whatever use_dma_api
virtio_net: big mode skip the unmap check
virtio_net: rx remove premapped failover code
virtio_net: remove the misleading comment
drivers/net/virtio_net.c
Now, we have virtio DMA APIs, the driver can be the premapped
mode whatever the virtio core uses dma api or not.
So remove the limit of checking use_dma_api from
virtqueue_set_dma_premapped().
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 7 +--
1 file
The virtio-net big mode did not enable premapped mode,
so we did not need to check the unmap. And the subsequent
commit will remove the failover code for failing enable
premapped for merge and small mode. So we need to remove
the checking do_dma code in the big mode path.
Signed-off-by: Xuan Zhuo
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code for merge and small mode.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 85 +---
1 file changed, 35 insertions(+), 50 deletions
We call the build_skb() actually without copying data.
The comment is misleading. So remove it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 070a6ed0d812
Create a separate directory for virtio-net. AF_XDP support will be added
later, then a separate xsk.c file will be added, so we should create a
directory for virtio-net.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
MAINTAINERS | 2 +-
drivers/net
Move some core structures (send_queue, receive_queue, virtnet_info)
definitions and the relative structures definitions into the
virtio_net.h file.
That will be used by the other c code files.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 237
We move some structures to the header file, but these structures do not
prefixed with virtnet. This patch adds virtnet for these.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/virtnet.h | 12 ++--
drivers/net/virtio/virtnet_main.c | 110 +++---
2 files changed
subsequent commits
Thanks.
Xuan Zhuo (7):
virtio_net: independent directory
virtio_net: move core structures to virtio_net.h
virtio_net: add prefix virtnet to all struct inside virtio_net.h
virtio_net: separate virtnet_rx_resize()
virtio_net: separate virtnet_tx_resize()
virtio_net
This patch separates two sub-functions from virtnet_rx_resize():
* virtnet_rx_pause
* virtnet_rx_resume
Then the subsequent reset rx for xsk can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 3 +++
drivers/net/virtio
This commit separates the function receive_buf(), then we wrap the logic
of handling the skb to an independent function virtnet_receive_done().
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/virtnet_main.c | 56 ++-
1 file
This commit separates the function receive_mergeable(),
put the logic of appending frag to the skb as an independent function.
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/virtnet.h | 4 ++
drivers/net/virtio/virtnet_main.c | 77
This patch separates two sub-functions from virtnet_tx_resize():
* virtnet_tx_pause
* virtnet_tx_resume
Then the subsequent virtnet_tx_reset() can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 2 ++
drivers/net/virtio
On Wed, 8 May 2024 08:20:00 -0700, Jakub Kicinski wrote:
> On Wed, 8 May 2024 09:53:08 +0100 Simon Horman wrote:
> > On Wed, May 08, 2024 at 04:05:07PM +0800, Xuan Zhuo wrote:
> > > This patch set prepares for supporting af-xdp zerocopy.
> > > There is no feature change
a1b-020f-4f93-94d0-104964566...@kernel.dk/
> Signed-off-by: Daniel Jurgens
Reviewed-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index df61
On Thu, 9 May 2024 11:32:16 -0500, Daniel Jurgens wrote:
> Add a tx queue stop and wake counters, they are useful for debugging.
>
> $ ./tools/net/ynl/cli.py --spec netlink/specs/netdev.yaml \
> --dump qstats-get --json '{"scope": "queue"}'
> ...
> {'ifindex': 13,
> 'queue-id': 0,
> 'queue-ty
On Fri, 10 May 2024 03:35:51 +, Dan Jurgens wrote:
> > From: Xuan Zhuo
> > Sent: Thursday, May 9, 2024 8:22 PM
> > To: Dan Jurgens
> > Cc: m...@redhat.com; jasow...@redhat.com; xuanz...@linux.alibaba.com;
> > virtualizat...@lists.linux.dev; da...@davemloft.n
g/all/202404221325.sx5chrgp-...@intel.com
v1:
1. discussed for using page pool
2. use dma sync to replace the unmap for the first page
Thanks.
Xuan Zhuo (4):
virtio_ring: enable premapped mode whatever use_dma_api
virtio_net: big mode skip the unmap check
virtio_net: rx remove prem
Now, we have virtio DMA APIs, the driver can be the premapped
mode whatever the virtio core uses dma api or not.
So remove the limit of checking use_dma_api from
virtqueue_set_dma_premapped().
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 7 +--
1 file
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code for merge and small mode.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Reviewed-by: Larysa Zaremba
---
drivers/net/virtio_net.c | 85 +---
1 file changed, 35
The virtio-net big mode did not enable premapped mode,
so we did not need to check the unmap. And the subsequent
commit will remove the failover code for failing enable
premapped for merge and small mode. So we need to remove
the checking do_dma code in the big mode path.
Signed-off-by: Xuan Zhuo
We call the build_skb() actually without copying data.
The comment is misleading. So remove it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3ffcb2e2185f
; DEFAULT group default qlen 1000
> link/ether 00:00:05:00:00:09 brd ff:ff:ff:ff:ff:ff
> ...
> 5: macvlan0@enp0s3: mtu 1500 qdisc
> noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
> link/ether b2:a9:c5:04:da:53 brd ff:ff:ff:ff:ff:ff
>
> Cc: Venkat Venka
Any comments for this.
Thanks.
On Wed, 8 May 2024 16:05:07 +0800, Xuan Zhuo
wrote:
> This patch set prepares for supporting af-xdp zerocopy.
> There is no feature change in this patch set.
> I just want to reduce the patch num of the final patch set,
> so I split the patch set.
&
On Mon, 27 May 2024 11:38:49 +0800, Jason Wang wrote:
> On Thu, May 23, 2024 at 10:27 AM Xuan Zhuo wrote:
> >
> > Any comments for this.
> >
> > Thanks.
>
> Will have a look.
>
> Btw, does Michael happy with moving files into a dedicated directory?
Based
k for the command VQ.")
> Signed-off-by: Heng Qi
> Reviewed-by: Hariprasad Kelam
Reviewed-by: Xuan Zhuo
> ---
> v1->v2:
> - Use the ok instead of ret.
>
> drivers/net/virtio_net.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff -
subsequent commits
Thanks.
v1:
1. resend for the new net-next merge window
Xuan Zhuo (7):
virtio_net: independent directory
virtio_net: move core structures to virtio_net.h
virtio_net: add prefix virtnet to all struct inside virtio_net.h
virtio_net: separate virtnet_rx_resize
Create a separate directory for virtio-net. AF_XDP support will be added
later, then a separate xsk.c file will be added, so we should create a
directory for virtio-net.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
MAINTAINERS | 2 +-
drivers/net
We move some structures to the header file, but these structures do not
prefixed with virtnet. This patch adds virtnet for these.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 12 ++--
drivers/net/virtio/virtnet_main.c | 110
This patch separates two sub-functions from virtnet_tx_resize():
* virtnet_tx_pause
* virtnet_tx_resume
Then the subsequent virtnet_tx_reset() can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 2 ++
drivers/net/virtio
This patch separates two sub-functions from virtnet_rx_resize():
* virtnet_rx_pause
* virtnet_rx_resume
Then the subsequent reset rx for xsk can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 3 +++
drivers/net/virtio
Move some core structures (send_queue, receive_queue, virtnet_info)
definitions and the relative structures definitions into the
virtio_net.h file.
That will be used by the other c code files.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 239
This commit separates the function receive_mergeable(),
put the logic of appending frag to the skb as an independent function.
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 4 ++
drivers/net/virtio/virtnet_main.c
This commit separates the function receive_buf(), then we wrap the logic
of handling the skb to an independent function virtnet_receive_done().
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet_main.c | 56
On Thu, 30 May 2024 03:55:35 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, May 30, 2024 at 03:26:42PM +0800, Xuan Zhuo wrote:
> > This patch set prepares for supporting af-xdp zerocopy.
> > There is no feature change in this patch set.
> > I just want to reduce t
_MEASURE.
>
> Fixes: 6208799553a8 ("virtio-net: support rx netdim")
> Signed-off-by: Heng Qi
> Reviewed-by: Jiri Pirko
Reviewed-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dr
/0x8a0
> ? lock_release+0x72/0x140
> ? do_user_addr_fault+0x3a7/0x8a0
> __x64_sys_sendto+0x29/0x30
> do_syscall_64+0x78/0x180
> entry_SYSCALL_64_after_hwframe+0x76/0x7e
>
> Fixes: 4d4ac2ececd3 ("virtio_net: Add a lock for per queue RX coalesce")
> Sign
the last one refactors distinguishing xmit types.
v1:
1. resend for the new net-next merge window
Xuan Zhuo (12):
virtio_net: independent directory
virtio_net: move core structures to virtio_net.h
virtio_net: add prefix virtnet to all struct inside virtio_net.h
virtio_net: separate
Move some core structures (send_queue, receive_queue, virtnet_info)
definitions and the relative structures definitions into the
virtio_net.h file.
That will be used by the other c code files.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/virtnet.h | 239
301 - 400 of 682 matches
Mail list logo