On transmit, the best thing to do is pad with zeros. (This is important to prevent a security leak where "short" packets can unintentionally contain data from another packet, possibly sent to a different host.)
On receive, you should never need to strip. If the packet is less than the minimum size, you should probably just drop it on the floor, if the hardware doesn't already do that for you. On another note, mgmt has asked me about your DNET gldv3 work -- can you provide a status update on it? -- Garrett Steven Stallion wrote: > All, > > I am finishing up the RTL8029AS driver, and I am noticing an issue with > packets smaller than 60 bytes. > > My first thought was to simply pad the end of the packet with junk and > rely on the receiving end to correctly strip the additional bytes. > > I am beginning to wonder if this is the correct approach. Essentially, I > am doing this: > > (buf is 1536 bytes, and msglen is asserted to be < ETHERMAX + VLANTAGSZ) > > mcopymsg(mp, buf); > > len = max(len, ETHERMIN); > > (buffer len bytes via PIO) > > kick_xmit(); > > > Any ideas? > > Steve > > _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss