Hi Evgeniy, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote on 07/23/2007 04:14:28 PM: > > +/* > > + * dev_change_tx_batching - Enable or disable batching for a driver that > > + * supports batching.
> > + /* Check if new value is same as the current */ > > + if (!!(dev->features & NETIF_F_BATCH_ON) == !!new_batch_skb) > > + goto out; > > o_O > > Scratched head for too long before understood what it means :) Is there a easy way to do this ? > > + spin_lock(&dev->queue_lock); > > + if (new_batch_skb) { > > + dev->features |= NETIF_F_BATCH_ON; > > + dev->tx_queue_len >>= 1; > > + } else { > > + if (!skb_queue_empty(&dev->skb_blist)) > > + skb_queue_purge(&dev->skb_blist); > > + dev->features &= ~NETIF_F_BATCH_ON; > > + dev->tx_queue_len <<= 1; > > + } > > + spin_unlock(&dev->queue_lock); > > Hmm, should this also stop interrupts? That is a good question, and I am not sure. I thought it is not required, though adding it doesn't affect code either. Can someone tell if disabling bh is required and why (couldn't figure out the intention of bh for dev_queue_xmit either, is this to disable preemption) ? Thanks, - KK - 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