lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 18 Sep 2022 09:43:18 +0000
From:   Jian Shen <shenjian15@...wei.com>
To:     <davem@...emloft.net>, <kuba@...nel.org>, <ecree.xilinx@...il.com>,
        <andrew@...n.ch>, <hkallweit1@...il.com>,
        <alexandr.lobakin@...el.com>, <saeed@...nel.org>, <leon@...nel.org>
CC:     <netdev@...r.kernel.org>, <linuxarm@...wei.com>
Subject: [RFCv8 PATCH net-next 37/55] net: adjust the prototype of netdev_add_tso_features()

The function netdev_add_tos_features() using netdev_features_t
as parameters, and returns netdev_features_t directly. For the
prototype of netdev_features_t will be extended to be larger
than 8 bytes, so change the prototype of the function, change
the prototype of input features to ‘netdev_features_t *',
and return the features pointer as output parameters.

Signed-off-by: Jian Shen <shenjian15@...wei.com>
---
 drivers/net/bonding/bond_main.c | 2 +-
 drivers/net/team/team.c         | 2 +-
 include/linux/netdevice.h       | 7 +++----
 net/bridge/br_if.c              | 2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 5c76a55392aa..a50f8935658a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1420,7 +1420,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
 		netdev_increment_features(&features, &features,
 					  &slave->dev->features, &mask);
 	}
-	features = netdev_add_tso_features(features, mask);
+	netdev_add_tso_features(&features, &mask);
 
 	return features;
 }
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 8d3a97d2d1dc..508424471c28 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2018,7 +2018,7 @@ static netdev_features_t team_fix_features(struct net_device *dev,
 	}
 	rcu_read_unlock();
 
-	features = netdev_add_tso_features(features, mask);
+	netdev_add_tso_features(&features, &mask);
 
 	return features;
 }
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3f451906d62c..ec9e7cf7efbc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4899,11 +4899,10 @@ void netdev_increment_features(netdev_features_t *ret,
  * Performing the GSO segmentation before last device
  * is a performance improvement.
  */
-static inline netdev_features_t netdev_add_tso_features(netdev_features_t features,
-							netdev_features_t mask)
+static inline void netdev_add_tso_features(netdev_features_t *features,
+					   const netdev_features_t *mask)
 {
-	netdev_increment_features(&features, &features, &NETIF_F_ALL_TSO, &mask);
-	return features;
+	netdev_increment_features(features, features, &NETIF_F_ALL_TSO, mask);
 }
 
 int __netdev_update_features(struct net_device *dev);
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index fa348a984aa9..2a9b564ff234 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -548,7 +548,7 @@ netdev_features_t br_features_recompute(struct net_bridge *br,
 		netdev_increment_features(&features, &features,
 					  &p->dev->features, &mask);
 	}
-	features = netdev_add_tso_features(features, mask);
+	netdev_add_tso_features(&features, &mask);
 
 	return features;
 }
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ