Subject: Re: redesign of ifqueue in ALTQ
To: None <>
From: Kenjiro Cho <>
List: tech-net
Date: 09/05/2000 02:41:31
Michael Richardson wrote:
 Kenjiro> Another requirement for a driver is to work under rate-limiting.
 Kenjiro>  - IFQ_DEQUEUE() could return NULL even when IFQ_IS_EMPTY() is FALSE
 Kenjiro>    under rate-limiting.  a driver should always check if (m == NULL).
 Kenjiro>  - a driver is supposed to call if_start from the tx complete interrupt
 Kenjiro>    under late-limiting (in order to trigger the next dequeue).

>   I'd like to suggest that the interface model be a bit higher level.
>   My experience with seeing what the Linux queueing code is that it appears
> pretty hard to interface to a NIC card (be it I2O or otherwise) that can do 
> some queueing itself. While I don't see any of these on the market right now,
> I expect that there will be some in the future. 
>   Outbound queueing is likely something that will be offloaded from the main
> CPU pretty soon, as it can be pretty CPU intensive to get the rate correct.

If a driver does packet scheduling, all we need to do is to custimize
the enqueue and purge operations for the device and it is easily
supported in this model.  The driver won't need if_start (and the
dequeue operation) in this case.
Probably, we should define another level of abstraction for this kind of