On Saturday 12 September 2009 18:41:12 Oliver Hartkopp wrote: > Michael Buesch wrote: > > >> As there are several users in the kernel do exact this test and call the > >> appropriate netif_rx() function, i would suggest to create a static inline > >> function: > >> > >> static inline int netif_rx_ti(struct sk_buff *skb) > >> { > >> if (in_interrupt()) > >> return netif_rx(skb); > >> return netif_rx_ni(skb); > >> } > >> > >> ('ti' for test in_interrupt()) > >> > >> in include/linux/netdevice.h > >> > >> What do you think about that? > > > > Yeah, I'm fine with that. > > > > Hi Michael, > > i cooked a patch that introduces netif_rx_ti() and fixes up the problems in > mac80211 and the CAN subsystem. > > Currently i'm pondering whether netif_rx_ti() is needed in all cases or if > there are code sections that'll never be executed from irq-context. > > In theses cases netif_rx_ni() should be prefered to netif_rx_ti() to prevent > the obsolete check ... > > Is there any of your changes that should better use netif_rx_ni() ? > > Regards, > Oliver > Well, I'd say this check does not cost much at all. If I were the net maintainer, I'd get rid of netif_rx_ni() _and_ netif_rx_ti() and do the check internally in netif_rx(). But as I don't have to decide that, I just want the mac80211 issue fixed. -- Greetings, Michael. -- 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