Skip to contentSkip to conversation

virtio_net: bulk free tx skbs

PATCH Superseded Michael S. Tsirkin 2 participants 5 messages Jan 15, 2019 – Jan 17, 2019

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 virtio_net: bulk free tx skbs

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.

---

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(-)
drivers/net/virtio_net.c +1 -1
index 023725086046..d76dcc68cbb6 100644
@@ -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
Signature · 1 line
MST
maintainer
#1 lore raw

From: "Michael S. Tsirkin" <[email protected]>
Date: Mon, 14 Jan 2019 20:34:26 -0500

Quoted 9 lines

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.

---

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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

maintainer
#2 lore raw
In reply to Michael S. Tsirkin

From: "Michael S. Tsirkin" <[email protected]>
Date: Mon, 14 Jan 2019 20:34:26 -0500

Quoted 9 lines

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.

---

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

author maintainer
#3 lore raw
Quoted 13 lines · David Miller

From: "Michael S. Tsirkin" <[email protected]>
Date: Mon, 14 Jan 2019 20:34:26 -0500

Quoted 9 lines

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.

---

My perf testing setup is down but it works fine on my devel box and should be fairly uncontroversial.

Quoted 8 lines

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.

Signature · 5 lines
MST
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
author maintainer
#4 lore raw
In reply to David Miller
Quoted 13 lines · David Miller

From: "Michael S. Tsirkin" <[email protected]>
Date: Mon, 14 Jan 2019 20:34:26 -0500

Quoted 9 lines

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.

---

My perf testing setup is down but it works fine on my devel box and should be fairly uncontroversial.

Quoted 8 lines

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.

Signature · 1 line
MST