On Sun, Dec 23, 2007 at 10:48:46PM -0500, Peter Memishian wrote: > > > As a comment from Eric, that he prefers to make the margin size of the > > DL_ETHER links to be 4, so that we don't have to change all DL_ETHER > > drivers. > > > > If so, I intent to add a mtr_dft_margin field into the > > mactype_register_t, which is used to specify the default margin size > > for this media type. > > > > What do you think? > > I'm not sure I understand the motivation. If it's actually true that most > Ethernet drivers (and not other types of drivers) have a margin of 4, then > I'm fine with such a change. But doing it just to avoid updating the > drivers doesn't make sense to me. >
I think I asked for adding a default because from what I read from a few driver docs (bge, e1000g), it's very hard to determine the margin value. for these two nics, the margin could be set to any size provided that the mss register is programmed correctly to accomodate the margin. I thought that, for hardware that behave this way, it would be easier for driver writers to not have to arbitrarily choose a margin size. the framework could just assume a default of 4 for ethernet. if we document (whenever gldv3 is made public) that 4 means vlan support, 0 means lack of it, the driver writer would need to override the margin value only if he's absolutely sure the nic supports a non-arbitrary margin > 4, or if vlan is not supported. assuming that the majority of gldv3 nics (current and future) support vlan, what's the risk in assuming a default margin of 4? eric
