Re: [PATCH] tun: use netif_receive_skb instead of netif_rx_ni

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 12, 2014 at 09:50:03AM +0800, Qin Chuanyu wrote:
> On 2014/2/11 23:24, Eric Dumazet wrote:
> >>diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> >>index 44c4db8..90b4e58 100644
> >>--- a/drivers/net/tun.c
> >>+++ b/drivers/net/tun.c
> >>@@ -1184,7 +1184,9 @@ static ssize_t tun_get_user(struct tun_struct
> >>*tun, struct tun_file *tfile,
> >>   	skb_probe_transport_header(skb, 0);
> >>
> >>   	rxhash = skb_get_hash(skb);
> >>-	netif_rx_ni(skb);
> >>+	rcu_read_lock_bh();
> >>+	netif_receive_skb(skb);
> >>+	rcu_read_unlock_bh();
> >>
> >>   	tun->dev->stats.rx_packets++;
> >>   	tun->dev->stats.rx_bytes += len;
> >
> >I already said this patch is not good :
> >
> >rcu_read_lock_bh() makes no sense here.
> >
> >What is really needed is local_bh_disable();
> >
> >Herbert patch ( http://patchwork.ozlabs.org/patch/52963/ ) had a much
> >cleaner form.
> >
> >Just use it, CC him, credit him, please ?
> >
> To: Herbert Xu
> I saw that you had delivered a patch to resolve the problem of cgroup.
> patch num is f845172531fb7410c7fb7780b1a6e51ee6df7d52
> 
> so would you deliver your patch for tun again? I had test it and
> found it work well.

Feel free to resubmit my patch either as is or with your
modifications as I no longer need it for my original purposes.

Thanks,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux