* [PATCH] tun: fix inability to set offloads after disabling them via ethtool
@ 2017-03-16 18:08 Yaroslav Isakov
2017-03-16 19:42 ` Yaroslav Isakov
0 siblings, 1 reply; 4+ messages in thread
From: Yaroslav Isakov @ 2017-03-16 18:08 UTC (permalink / raw)
To: netdev
Added missing logic in tun driver, which prevents apps to set
offloads using tun ioctl, if offloads were previously disabled via ethtool
Signed-of-by: Yaroslav Isakov (yaroslav.isakov@gmail.com)
---
drivers/net/tun.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 34cc3c5..cc88cd7 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1931,6 +1931,8 @@ static int set_offload(struct tun_struct *tun, unsigned long arg)
return -EINVAL;
tun->set_features = features;
+ tun->dev->wanted_features &= ~TUN_USER_FEATURES;
+ tun->dev->wanted_features |= features;
netdev_update_features(tun->dev);
return 0;
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tun: fix inability to set offloads after disabling them via ethtool
2017-03-16 18:08 [PATCH] tun: fix inability to set offloads after disabling them via ethtool Yaroslav Isakov
@ 2017-03-16 19:42 ` Yaroslav Isakov
0 siblings, 0 replies; 4+ messages in thread
From: Yaroslav Isakov @ 2017-03-16 19:42 UTC (permalink / raw)
To: netdev
Sorry for spamming mailing list, forgot to check via checkpatch.pl,
will resend it one more time
2017-03-16 21:08 GMT+03:00 Yaroslav Isakov <yaroslav.isakov@gmail.com>:
> Added missing logic in tun driver, which prevents apps to set
> offloads using tun ioctl, if offloads were previously disabled via ethtool
>
> Signed-of-by: Yaroslav Isakov (yaroslav.isakov@gmail.com)
> ---
> drivers/net/tun.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 34cc3c5..cc88cd7 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -1931,6 +1931,8 @@ static int set_offload(struct tun_struct *tun, unsigned long arg)
> return -EINVAL;
>
> tun->set_features = features;
> + tun->dev->wanted_features &= ~TUN_USER_FEATURES;
> + tun->dev->wanted_features |= features;
> netdev_update_features(tun->dev);
>
> return 0;
> --
> 2.10.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tun: fix inability to set offloads after disabling them via ethtool
@ 2017-03-16 19:44 Yaroslav Isakov
2017-03-21 22:31 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Yaroslav Isakov @ 2017-03-16 19:44 UTC (permalink / raw)
To: netdev
Added missing logic in tun driver, which prevents apps to set
offloads using tun ioctl, if offloads were previously disabled via ethtool
Signed-off-by: Yaroslav Isakov <yaroslav.isakov@gmail.com>
---
drivers/net/tun.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 34cc3c5..cc88cd7 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1931,6 +1931,8 @@ static int set_offload(struct tun_struct *tun, unsigned long arg)
return -EINVAL;
tun->set_features = features;
+ tun->dev->wanted_features &= ~TUN_USER_FEATURES;
+ tun->dev->wanted_features |= features;
netdev_update_features(tun->dev);
return 0;
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tun: fix inability to set offloads after disabling them via ethtool
2017-03-16 19:44 Yaroslav Isakov
@ 2017-03-21 22:31 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-21 22:31 UTC (permalink / raw)
To: yaroslav.isakov; +Cc: netdev
From: Yaroslav Isakov <yaroslav.isakov@gmail.com>
Date: Thu, 16 Mar 2017 22:44:10 +0300
> Added missing logic in tun driver, which prevents apps to set
> offloads using tun ioctl, if offloads were previously disabled via ethtool
>
> Signed-off-by: Yaroslav Isakov <yaroslav.isakov@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-21 22:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 18:08 [PATCH] tun: fix inability to set offloads after disabling them via ethtool Yaroslav Isakov
2017-03-16 19:42 ` Yaroslav Isakov
-- strict thread matches above, loose matches on Subject: below --
2017-03-16 19:44 Yaroslav Isakov
2017-03-21 22:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox