mbufs

Eric Norum eric at cls.usask.ca
Wed Jul 19 18:28:01 UTC 2000


Antti P Miettinen wrote:
> 
> Is there an upper limit for the number of mbufs a packet (coming down
> to ethernet driver) can consist of?

No.
This was discovered a while back when people tried the ttcp test with
small buffers.
I believe that most, if not all, network drivers have been modified to
take this possiblity into account.  For example, the gen68360 driver now
has a section that looks like:

                /*
                 * There are more mbufs in the packet than there
                 * are transmit buffer descriptors.
                 * Coalesce into a single buffer.
                 */
                if (nAdded == sc->txBdCount) {
			allocate a single mbuf cluster
			copy all packet fragments into the mbuf cluster.
			free packet fragment mbufs
			redo transmission with the single mbuf cluster.
		}

The only drivers which are at risk are those which perform
scatter/gather DMA to transmit a packet.  Network drivers which copy a
packet into a single transmit buffer are not at risk.  

-- 
Eric Norum                                 eric at cls.usask.ca
Canadian Light Source                      Phone: (306) 966-6308
University of Saskatchewan                 FAX:   (306) 966-6058
Saskatoon, Canada.



More information about the users mailing list