Search Linux Wireless

RE: [RFC/RFT 4/4] mac80211: use multi-queue master netdevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> --- everything.orig/net/mac80211/util.c	2008-04-30 
> 14:02:31.000000000 +0200
> +++ everything/net/mac80211/util.c	2008-04-30 
> 14:20:06.000000000 +0200
> @@ -323,18 +323,28 @@ __le16 ieee80211_ctstoself_duration(stru
>  }
>  EXPORT_SYMBOL(ieee80211_ctstoself_duration);
>  
> +void ieee80211_start_queue(struct ieee80211_hw *hw, int queue)
> +{
> +	struct ieee80211_local *local = hw_to_local(hw);
> +#ifdef CONFIG_MAC80211_QOS
> +	netif_start_subqueue(local->mdev, queue);
> +#else
> +	WARN_ON(queue != 0);
> +	netif_start_queue(local->mdev);
> +#endif
> +}
> +EXPORT_SYMBOL(ieee80211_start_queue);
> +

I would suggest that you enable the netdev feature flag for
NETIF_F_MULTI_QUEUE on devices when you create them.  That way you can
have things like ieee80211_start_queue() key on that instead of a
compile-time option, in case wireless devices come along that won't
support multiple queues, if that's possible.  So something like this:

+void ieee80211_start_queue(struct ieee80211_hw *hw, int queue)
+{
+	struct ieee80211_local *local = hw_to_local(hw);
+	if (netif_is_multiqueue(local->mdev) {
+		netif_start_subqueue(local->mdev, queue);
+	} else {
+		WARN_ON(queue != 0);
+		netif_start_queue(local->mdev);
+	}
+}
+EXPORT_SYMBOL(ieee80211_start_queue);
+

If you think this is a decent idea, I'd suggest that any function that
has a compile-time check for multiqueue being changed to use the runtime
check.  Then in your device setup, where you call netdev_alloc_mq(),
there you set the flag NETIF_F_MULTI_QUEUE based on the device features.

Other than that, this patch looks great.  Exciting to see this starting
to take flight.

Cheers,
-PJ Waskiewicz
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux