sunvnet: Question on tx control in original code

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

 



I've recently been studying up on the sparc LDom environment and sunvnet, the virtual network device. In looking through the code I ran across an odd bit of tx control that I don't quite understand.

Near the bottom of sunvnet_common.c:sunvnet_start_xmit_common(), about line 1423, just after the ldc_start_done: label is a curious 'if' block

        if (unlikely(vnet_tx_dring_avail(dr) < 1)) {
                netif_tx_stop_queue(txq);
                if (vnet_tx_dring_avail(dr) > VNET_TX_WAKEUP_THRESH(dr))
                        netif_tx_wake_queue(txq);
        }

In order to get into the if-block there needs to be a 0 or negative return from vnet_tx_dring_avail(), yet then we're checking it again, with no discernible delay, for a positive value. I don't see how we could get to the netif_tx_wake_queue() call - shouldn't there be some delay, or perhaps something that might bump the underlying channel before checking for more available space?

Perhaps I've missed something?

Thanks,
sln

--
==================================================
Shannon Nelson           shannon.nelson@xxxxxxxxxx
Parents can't afford to be squeamish
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux