Skip to contentSkip to conversation

net: remove netif_set_real_num_rx_queues()

PATCH In review Cong Wang 3 participants 4 messages Nov 10, 2014 – Nov 11, 2014

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 net: remove netif_set_real_num_rx_queues()

vlan was the only user of netif_set_real_num_rx_queues(),
but it no longer calls it after
commit 4af429d29b341bb1735f04c2fb960178 ("vlan: lockless transmit path"). So we can just remove it.

Cc Eric Dumazet <[email protected]>
Cc David S. Miller <[email protected]>

---

include/linux/netdevice.h +0 -17
index 888d551..4a6f770 100644
@@ -2762,23 +2762,6 @@ static inline int netif_set_real_num_rx_queues(struct net_device *dev,
 }
 #endif
 
-static inline int netif_copy_real_num_queues(struct net_device *to_dev,
-					     const struct net_device *from_dev)
-{
-	int err;
-
-	err = netif_set_real_num_tx_queues(to_dev,
-					   from_dev->real_num_tx_queues);
-	if (err)
-		return err;
-#ifdef CONFIG_SYSFS
-	return netif_set_real_num_rx_queues(to_dev,
-					    from_dev->real_num_rx_queues);
-#else
-	return 0;
-#endif
-}
-
 #ifdef CONFIG_SYSFS
 static inline unsigned int get_netdev_rx_queue_index(
 		struct netdev_rx_queue *queue)
#1 lore raw
Quoted 15 lines · Cong Wang

vlan was the only user of netif_set_real_num_rx_queues(),
but it no longer calls it after
commit 4af429d29b341bb1735f04c2fb960178 ("vlan: lockless transmit path"). So we can just remove it.

Cc Eric Dumazet <[email protected]>
Cc David S. Miller <[email protected]>

---

include/linux/netdevice.h +0 -0
index 888d551..4a6f770 100644

include/linux/netdevice.h static inline int netif_set_real_num_rx_queues(struct net_device *dev, · line 2766

Quoted 5 lines
include/linux/netdevice.h +0 -2
@@ -2762,23 +2762,6 @@ static inline int netif_set_real_num_rx_queues(struct net_device *dev,
 }
 #endif
 
-static inline int netif_copy_real_num_queues(struct net_device *to_dev,
-					     const struct net_device *from_dev)

Patch title says you're removing _set_ but body only removes _copy_. Which one is right?

Quoted 22 lines
include/linux/netdevice.h +0 -16
-{
-	int err;
-
-	err = netif_set_real_num_tx_queues(to_dev,
-					   from_dev->real_num_tx_queues);
-	if (err)
-		return err;
-#ifdef CONFIG_SYSFS
-	return netif_set_real_num_rx_queues(to_dev,
-					    from_dev->real_num_rx_queues);
-#else
-	return 0;
-#endif
-}
-
 #ifdef CONFIG_SYSFS
 static inline unsigned int get_netdev_rx_queue_index(
 		struct netdev_rx_queue *queue)
--

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#2 lore raw
Quoted 4 lines · Edward Cree

include/linux/netdevice.h static inline int netif_set_real_num_rx_queues(struct net_device *dev, · line 2766

Quoted 2 lines
include/linux/netdevice.h +0 -2
-static inline int netif_copy_real_num_queues(struct net_device *to_dev,
-                                          const struct net_device *from_dev)

Patch title says you're removing _set_ but body only removes _copy_. Which one is right?

Oops, my copy-n-paste error...

maintainer
#3 lore raw

From: Cong Wang <[email protected]>
Date: Tue, 11 Nov 2014 09:07:29 -0800

Quoted 7 lines · Edward Cree
Quoted 4 lines

include/linux/netdevice.h static inline int netif_set_real_num_rx_queues(struct net_device *dev, · line 2766

Quoted 2 lines
include/linux/netdevice.h +0 -2
-static inline int netif_copy_real_num_queues(struct net_device *to_dev,
-                                          const struct net_device *from_dev)

Patch title says you're removing _set_ but body only removes _copy_. Which one is right?

Oops, my copy-n-paste error...

Please resubmit with fixed title, thanks.