Message ID | 20220516042456.3014395-5-eric.dumazet@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 909876500251b3b48480a840bbf9053588254eee |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: polish skb defer freeing | expand |
On Sun, 15 May 2022 21:24:56 -0700 Eric Dumazet wrote: > -end: > - skb_defer_free_flush(sd); > +end:; Sorry for the nit pick but can I remove this and just return like we did before f3412b3879b4? Is there a reason such "label:;}" is good?
On Mon, May 16, 2022 at 11:21 AM Jakub Kicinski <kuba@kernel.org> wrote: > > On Sun, 15 May 2022 21:24:56 -0700 Eric Dumazet wrote: > > -end: > > - skb_defer_free_flush(sd); > > +end:; > > Sorry for the nit pick but can I remove this and just return like we > did before f3412b3879b4? Is there a reason such "label:;}" is good? I thought that having a return in the middle of this function would hurt us at some point.
On Mon, 16 May 2022 11:26:14 -0700 Eric Dumazet wrote: > On Mon, May 16, 2022 at 11:21 AM Jakub Kicinski <kuba@kernel.org> wrote: > > > > On Sun, 15 May 2022 21:24:56 -0700 Eric Dumazet wrote: > > > -end: > > > - skb_defer_free_flush(sd); > > > +end:; > > > > Sorry for the nit pick but can I remove this and just return like we > > did before f3412b3879b4? Is there a reason such "label:;}" is good? > > I thought that having a return in the middle of this function would > hurt us at some point. I guess personal preference. Let's leave it unless someone else shares my disregard for pointlessly jumping to the closing bracket :)
diff --git a/net/core/dev.c b/net/core/dev.c index ac22fedfeaf72dc0d46f4793bbd9b2d5dd301730..aabb695e25f35402bbc85602e1bb9c86d2fa209e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6654,6 +6654,8 @@ static __latent_entropy void net_rx_action(struct softirq_action *h) for (;;) { struct napi_struct *n; + skb_defer_free_flush(sd); + if (list_empty(&list)) { if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll)) goto end; @@ -6683,8 +6685,7 @@ static __latent_entropy void net_rx_action(struct softirq_action *h) __raise_softirq_irqoff(NET_RX_SOFTIRQ); net_rps_action_and_irq_enable(sd); -end: - skb_defer_free_flush(sd); +end:; } struct netdev_adjacent {