* [PATCH net-next] virtio_net: bulk free tx skbs
@ 2019-01-15 1:34 Michael S. Tsirkin
2019-01-16 23:31 ` David Miller
2019-01-16 23:31 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2019-01-15 1:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jason Wang, David S. Miller, virtualization, netdev
Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is
safe to call in a non-napi context as long as the napi_budget flag is
correct.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
My perf testing setup is down but it works fine on my devel box and
should be fairly uncontroversial.
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 023725086046..d76dcc68cbb6 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1343,7 +1343,7 @@ static void free_old_xmit_skbs(struct send_queue *sq)
bytes += skb->len;
packets++;
- dev_consume_skb_any(skb);
+ napi_consume_skb(skb, use_napi);
}
/* Avoid overhead when no packets have been processed
--
MST
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] virtio_net: bulk free tx skbs
2019-01-15 1:34 [PATCH net-next] virtio_net: bulk free tx skbs Michael S. Tsirkin
2019-01-16 23:31 ` David Miller
@ 2019-01-16 23:31 ` David Miller
2019-01-17 13:34 ` Michael S. Tsirkin
2019-01-17 13:34 ` Michael S. Tsirkin
1 sibling, 2 replies; 6+ messages in thread
From: David Miller @ 2019-01-16 23:31 UTC (permalink / raw)
To: mst; +Cc: linux-kernel, jasowang, virtualization, netdev
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 14 Jan 2019 20:34:26 -0500
> Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is
> safe to call in a non-napi context as long as the napi_budget flag is
> correct.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> My perf testing setup is down but it works fine on my devel box and
> should be fairly uncontroversial.
It would be uncontroversial if it compiled.
drivers/net/virtio_net.c: In function ‘free_old_xmit_skbs’:
drivers/net/virtio_net.c:1346:25: error: ‘use_napi’ undeclared (first use in this function); did you mean ‘used_math’?
napi_consume_skb(skb, use_napi);
^~~~~~~~
used_math
drivers/net/virtio_net.c:1346:25: note: each undeclared identifier is reported only once for each function it appears in
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] virtio_net: bulk free tx skbs
2019-01-15 1:34 [PATCH net-next] virtio_net: bulk free tx skbs Michael S. Tsirkin
@ 2019-01-16 23:31 ` David Miller
2019-01-16 23:31 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2019-01-16 23:31 UTC (permalink / raw)
To: mst; +Cc: netdev, linux-kernel, virtualization
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 14 Jan 2019 20:34:26 -0500
> Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is
> safe to call in a non-napi context as long as the napi_budget flag is
> correct.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> My perf testing setup is down but it works fine on my devel box and
> should be fairly uncontroversial.
It would be uncontroversial if it compiled.
drivers/net/virtio_net.c: In function ‘free_old_xmit_skbs’:
drivers/net/virtio_net.c:1346:25: error: ‘use_napi’ undeclared (first use in this function); did you mean ‘used_math’?
napi_consume_skb(skb, use_napi);
^~~~~~~~
used_math
drivers/net/virtio_net.c:1346:25: note: each undeclared identifier is reported only once for each function it appears in
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] virtio_net: bulk free tx skbs
2019-01-16 23:31 ` David Miller
2019-01-17 13:34 ` Michael S. Tsirkin
@ 2019-01-17 13:34 ` Michael S. Tsirkin
1 sibling, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2019-01-17 13:34 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, jasowang, virtualization, netdev
On Wed, Jan 16, 2019 at 03:31:58PM -0800, David Miller wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
> Date: Mon, 14 Jan 2019 20:34:26 -0500
>
> > Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is
> > safe to call in a non-napi context as long as the napi_budget flag is
> > correct.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >
> > My perf testing setup is down but it works fine on my devel box and
> > should be fairly uncontroversial.
>
> It would be uncontroversial if it compiled.
>
> drivers/net/virtio_net.c: In function ‘free_old_xmit_skbs’:
> drivers/net/virtio_net.c:1346:25: error: ‘use_napi’ undeclared (first use in this function); did you mean ‘used_math’?
> napi_consume_skb(skb, use_napi);
> ^~~~~~~~
> used_math
> drivers/net/virtio_net.c:1346:25: note: each undeclared identifier is reported only once for each function it appears in
Yes my bad it was on top of other patches.
I'm rebasing and will repost.
--
MST
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] virtio_net: bulk free tx skbs
2019-01-16 23:31 ` David Miller
@ 2019-01-17 13:34 ` Michael S. Tsirkin
2019-01-17 13:34 ` Michael S. Tsirkin
1 sibling, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2019-01-17 13:34 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel, virtualization
On Wed, Jan 16, 2019 at 03:31:58PM -0800, David Miller wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
> Date: Mon, 14 Jan 2019 20:34:26 -0500
>
> > Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is
> > safe to call in a non-napi context as long as the napi_budget flag is
> > correct.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >
> > My perf testing setup is down but it works fine on my devel box and
> > should be fairly uncontroversial.
>
> It would be uncontroversial if it compiled.
>
> drivers/net/virtio_net.c: In function ‘free_old_xmit_skbs’:
> drivers/net/virtio_net.c:1346:25: error: ‘use_napi’ undeclared (first use in this function); did you mean ‘used_math’?
> napi_consume_skb(skb, use_napi);
> ^~~~~~~~
> used_math
> drivers/net/virtio_net.c:1346:25: note: each undeclared identifier is reported only once for each function it appears in
Yes my bad it was on top of other patches.
I'm rebasing and will repost.
--
MST
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next] virtio_net: bulk free tx skbs
@ 2019-01-15 1:34 Michael S. Tsirkin
0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2019-01-15 1:34 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev, David S. Miller, virtualization
Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is
safe to call in a non-napi context as long as the napi_budget flag is
correct.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
My perf testing setup is down but it works fine on my devel box and
should be fairly uncontroversial.
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 023725086046..d76dcc68cbb6 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1343,7 +1343,7 @@ static void free_old_xmit_skbs(struct send_queue *sq)
bytes += skb->len;
packets++;
- dev_consume_skb_any(skb);
+ napi_consume_skb(skb, use_napi);
}
/* Avoid overhead when no packets have been processed
--
MST
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-17 13:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 1:34 [PATCH net-next] virtio_net: bulk free tx skbs Michael S. Tsirkin
2019-01-16 23:31 ` David Miller
2019-01-16 23:31 ` David Miller
2019-01-17 13:34 ` Michael S. Tsirkin
2019-01-17 13:34 ` Michael S. Tsirkin
2019-01-15 1:34 Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.