question on netdev_completed_queue()
Subsystems (2)
Hi,
is this function to be called whenever a driver is done with transmitting data, whether the transmission be successful or not?
Regards
Oliver
Quoted 4 lines · Oliver Neukum
Hi,
is this function to be called whenever a driver is done with transmitting data, whether the transmission be successful or not?
Yes, BQL tracks number of packets and bytes in each queue and you have to tell it about all insertions and removals from the queue. (Except that if you flush the queue, you can use netdev_reset_queue() rather than trying to counting the remaining packets and bytes.)
Ben.
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Quoted 10 lines · On Thursday 08 November 2012 20:44:13 Ben Hutchings wrote:
Quoted 4 lines · Oliver Neukum
Hi,
is this function to be called whenever a driver is done with transmitting data, whether the transmission be successful or not?
Yes, BQL tracks number of packets and bytes in each queue and you have to tell it about all insertions and removals from the queue. (Except that if you flush the queue, you can use
netdev_reset_queue()rather than trying to counting the remaining packets and bytes.)
Thank you. That opens up the next question. How exact does the count have to be? Do you care about the exact amount of data or does it just have to be internally consistent?
Regards
Oliver
Quoted 7 lines · Oliver Neukum
Quoted 6 lines · On Thursday 08 November 2012 20:44:13 Ben Hutchings wrote:
Quoted 4 lines · Oliver Neukum
Hi,
is this function to be called whenever a driver is done with transmitting data, whether the transmission be successful or not?
Quoted 8 lines
Quoted 4 lines
Yes, BQL tracks number of packets and bytes in each queue and you have to tell it about all insertions and removals from the queue. (Except that if you flush the queue, you can use
netdev_reset_queue()rather than trying to counting the remaining packets and bytes.)Thank you. That opens up the next question. How exact does the count have to be? Do you care about the exact amount of data or does it just have to be internally consistent?
The underlying DQL algorithm doesn't care what it's counting. However the administrator can adjust the queue limits through sysfs, and they will expect the numbers to be byte counts.
Ben.
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Quoted 3 lines · Ben Hutchings
The underlying DQL algorithm doesn't care what it's counting. However the administrator can adjust the queue limits through sysfs, and they will expect the numbers to be byte counts.
Yes, skb->len should be a fine approximation, even if slightly wrong for TSO packets.