Andrew Gallatin writes:
> My NIC doesn't do most of the critical path counters in
> mac_driver_stat, so I need to maintain them in the driver.
> 
> When doing LSO, is it acceptable for MAC_STAT_OPACKETS to be
> incremented by 1 for an LSO send, or must it be incremented by the
> number of frames sent on the wire?
> 
> Similarly, may MAC_STAT_OBYTES just reflect what was sent to the NIC,
> or must it reflect what was sent on the wire?

I don't know that there's a "must" here, but as an administrator, I'd
be highly confused if my network statistics were orders of magnitude
away from what I expect -- which is what would happen if you counted
just 1 for each to-be-fragmented packet.

I'd think that if you know the real link MTU (somewhere?), it wouldn't
be too hard to compute the actual number of packets with something
like (size+MTU-1)/MTU, and then figure size + 14*npackets for the
amount sent.

(I'm also pretty sure I'd be more forgiving about obytes being a
little off than opackets.)

(I might also be disappointed that I had LSO going on behind my back.
But that's probably a different thread.  ;-})

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to