On 2019/5/9 下午1:34, Cong Wang wrote:
On Tue, May 7, 2019 at 7:54 PM Jason Wang wrote:
This is only true if you can make sure tfile[tun->numqueues] is not
freed. Either my patch or SOCK_RCU_FREE can solve this, but for
SOCK_RCU_FREE we need do extra careful audit to make sure it doesn't
break
On Tue, May 7, 2019 at 7:54 PM Jason Wang wrote:
> This is only true if you can make sure tfile[tun->numqueues] is not
> freed. Either my patch or SOCK_RCU_FREE can solve this, but for
> SOCK_RCU_FREE we need do extra careful audit to make sure it doesn't
> break someting. So synchronize through p
On 2019/5/9 上午1:36, David Miller wrote:
From: Jason Wang
Date: Tue, 7 May 2019 00:03:36 -0400
@@ -1313,6 +1315,10 @@ static int tun_xdp_xmit(struct net_device *dev, int n,
tfile = rcu_dereference(tun->tfiles[smp_processor_id() %
numqueues])
From: Jason Wang
Date: Tue, 7 May 2019 00:03:36 -0400
> @@ -1313,6 +1315,10 @@ static int tun_xdp_xmit(struct net_device *dev, int n,
>
> tfile = rcu_dereference(tun->tfiles[smp_processor_id() %
> numqueues]);
> + if (!tfile) {
> +
On 2019/5/8 下午12:16, Michael S. Tsirkin wrote:
On Tue, May 07, 2019 at 12:03:36AM -0400, Jason Wang wrote:
When a queue(tfile) is detached through __tun_detach(), we move the
last enabled tfile to the position where detached one sit but don't
NULL out last position. We expect to synchronize th
On Tue, May 07, 2019 at 12:03:36AM -0400, Jason Wang wrote:
> When a queue(tfile) is detached through __tun_detach(), we move the
> last enabled tfile to the position where detached one sit but don't
> NULL out last position. We expect to synchronize the datapath through
> tun->numqueues. Unfortuna
On 2019/5/7 下午10:41, Cong Wang wrote:
On Mon, May 6, 2019 at 11:19 PM Jason Wang wrote:
On 2019/5/7 下午12:54, Cong Wang wrote:
On Mon, May 6, 2019 at 9:03 PM Jason Wang wrote:
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index e9ca1c0..32a0b23 100644
--- a/drivers/net/tun.c
+++ b/dri
On Mon, May 6, 2019 at 11:19 PM Jason Wang wrote:
>
>
> On 2019/5/7 下午12:54, Cong Wang wrote:
> > On Mon, May 6, 2019 at 9:03 PM Jason Wang wrote:
> >> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> >> index e9ca1c0..32a0b23 100644
> >> --- a/drivers/net/tun.c
> >> +++ b/drivers/net/tun.c
>
On 2019/5/7 下午12:54, Cong Wang wrote:
On Mon, May 6, 2019 at 9:03 PM Jason Wang wrote:
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index e9ca1c0..32a0b23 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -700,6 +700,8 @@ static void __tun_detach(struct tun_file *tfile, bool cle
On Mon, May 6, 2019 at 9:03 PM Jason Wang wrote:
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index e9ca1c0..32a0b23 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -700,6 +700,8 @@ static void __tun_detach(struct tun_file *tfile, bool
> clean)
>
When a queue(tfile) is detached through __tun_detach(), we move the
last enabled tfile to the position where detached one sit but don't
NULL out last position. We expect to synchronize the datapath through
tun->numqueues. Unfortunately, this won't work since we're lacking
sufficient mechanism to or
11 matches
Mail list logo