Detecting congestion in ethernet device before transmission
I've written my own protocol in Linux. I send the packets using dev_queue_xmit. Although it gives me a return value of 0 on every send but I find that all the packets are not being transmitted successfully. Its like 200 packets sent then 10-50 dropped which goes on repeatedly. I would like to know whether there is any way of knowing the length of the backlog queue before calling dev_queue_xmit so that the packets I give for transmission will be transmitted.
Thanks in advance.