[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210929155334.12454-41-shenjian15@huawei.com>
Date: Wed, 29 Sep 2021 23:51:27 +0800
From: Jian Shen <shenjian15@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <andrew@...n.ch>,
<hkallweit1@...il.com>
CC: <netdev@...r.kernel.org>, <linuxarm@...neuler.org>
Subject: [RFCv2 net-next 040/167] macvtap: use netdev feature helpers
Use netdev_feature_xxx helpers to replace the logical operation
for netdev features.
Signed-off-by: Jian Shen <shenjian15@...wei.com>
---
drivers/net/macvtap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 694e2f5dbbe5..2162080133bb 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -74,7 +74,7 @@ static void macvtap_update_features(struct tap_dev *tap,
struct macvtap_dev *vlantap = container_of(tap, struct macvtap_dev, tap);
struct macvlan_dev *vlan = &vlantap->vlan;
- vlan->set_features = features;
+ netdev_feature_copy(&vlan->set_features, features);
netdev_update_features(vlan->dev);
}
@@ -90,7 +90,8 @@ static int macvtap_newlink(struct net *src_net, struct net_device *dev,
/* Since macvlan supports all offloads by default, make
* tap support all offloads also.
*/
- vlantap->tap.tap_features = TUN_OFFLOADS;
+ netdev_feature_zero(&vlantap->tap.tap_features);
+ netdev_feature_set_bits(TUN_OFFLOADS, &vlantap->tap.tap_features);
/* Register callbacks for rx/tx drops accounting and updating
* net_device features
--
2.33.0
Powered by blists - more mailing lists