* question on netdev_completed_queue()
@ 2012-11-08 19:38 Oliver Neukum
2012-11-08 20:44 ` Ben Hutchings
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2012-11-08 19:38 UTC (permalink / raw)
To: netdev
Hi,
is this function to be called whenever a driver is done with transmitting
data, whether the transmission be successful or not?
Regards
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question on netdev_completed_queue()
2012-11-08 19:38 question on netdev_completed_queue() Oliver Neukum
@ 2012-11-08 20:44 ` Ben Hutchings
2012-11-09 16:58 ` Oliver Neukum
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2012-11-08 20:44 UTC (permalink / raw)
To: Oliver Neukum; +Cc: netdev
On Thu, 2012-11-08 at 20:38 +0100, Oliver Neukum wrote:
> 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.
--
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question on netdev_completed_queue()
2012-11-08 20:44 ` Ben Hutchings
@ 2012-11-09 16:58 ` Oliver Neukum
2012-11-09 17:09 ` Ben Hutchings
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2012-11-09 16:58 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev
On Thursday 08 November 2012 20:44:13 Ben Hutchings wrote:
> On Thu, 2012-11-08 at 20:38 +0100, Oliver Neukum wrote:
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question on netdev_completed_queue()
2012-11-09 16:58 ` Oliver Neukum
@ 2012-11-09 17:09 ` Ben Hutchings
2012-11-09 19:38 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2012-11-09 17:09 UTC (permalink / raw)
To: Oliver Neukum; +Cc: netdev
On Fri, 2012-11-09 at 17:58 +0100, Oliver Neukum wrote:
> On Thursday 08 November 2012 20:44:13 Ben Hutchings wrote:
> > On Thu, 2012-11-08 at 20:38 +0100, Oliver Neukum wrote:
> > > 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?
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.
--
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question on netdev_completed_queue()
2012-11-09 17:09 ` Ben Hutchings
@ 2012-11-09 19:38 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2012-11-09 19:38 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Oliver Neukum, netdev
On Fri, 2012-11-09 at 17:09 +0000, Ben Hutchings wrote:
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-09 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 19:38 question on netdev_completed_queue() Oliver Neukum
2012-11-08 20:44 ` Ben Hutchings
2012-11-09 16:58 ` Oliver Neukum
2012-11-09 17:09 ` Ben Hutchings
2012-11-09 19:38 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox