Hi Andrew,
Your code looks workable for your case, but it's very strange for me.
The function hcksum_assoc() is used to associate h/w checksum
information to the mp mainly for inbound packet, so your way make the
usage of this function a little confusing.
How about try this way:
------------------
hcksum_retrieve(mp, NULL, NULL, &start, &stuff, NULL, NULL,
&tx_offload_flags);
mss = DB_LSOMSS(mp);
------------------
The LSO interface is still not public with GLDv3, so you can just use it
regardless of the impact by changes to mblk_t. With the further change
of LSO interface, all drivers in Solaris will be updated accordingly and
LSO capability negotiation will take care the compatibility problem.
Thanks,
Roamer
Andrew Gallatin wrote:
YunSong (Roamer) Lu writes:
> Hi Drew,
> For HCK_PARTIALCKSUM LSO device, hcksum_retrive() can not be used for
> getting LSO MSS any more, but you may get the LSO MSS directly by "mss =
> DB_LSOMSS(mp)" in the driver. And hcksum_retrive() is the only place
> where is such assumption.
Won't DB_LSOMSS(mp) break if the size/layout of an mblk changes?
Do you think the following would be safer (I apologize for formatting,
syntax errors, it was written in a mailer, and never compiled..):
/* get tx csum info */
hcksum_retrieve(mp, NULL, NULL, &start, &stuff, NULL, &mss,
&tx_offload_flags);
if ((tx_offload_flags & (HCK_PARTIALCKSUM | HW_LSO) ==
(HCK_PARTIALCKSUM | HW_LSO)) {
/*
* hcksum_retrieve() blocks retrieval of LSO mss if
* HCK_PARTIALCKSUM is set, so clear it temporarily
* in order to fetch the LSO mss
*/
tx_offload_flags = ~HCK_PARTIALCKSUM & tx_offload_flags;
hcksum_assoc(mp, NULL, NULL, start, stuff, NULL,
NULL, tx_offload_flags, 0);
/* grab the MSS */
hcksum_retrieve(mp, NULL, NULL, NULL, NULL, NULL, &mss,
&tx_offload_flags);
/* restore the orginal flags */
tx_offload_flags |= HCK_PARTIALCKSUM;
hcksum_assoc(mp, NULL, NULL, start, stuff, NULL,
NULL, tx_offload_flags, 0);
}
> Build 53 is the first version with LSO support. :-)
Darn. Since I have to reinstall anyway, I was going to try Nexenta,
but it looks like they are only up to build 50.
BTW, how can an outsider like me find out when things changed in the
Open Solaris source tree? The nifty "grok" tree at
http://cvs.opensolaris.org/source/xref seems to not have any revision
history in it. With *BSD, I can look at their CVS trees online,
and with Linux, I can look at the git commits at kernel.org, etc.
Thanks again for your help,
Drew
--
# telnet (650)-786-6759 (x86759)
Connected to Solaris.Sun.COM.
login: Lu, Yun-Song
Last login: January 2, 2007 from beyond.sfbay
[EMAIL PROTECTED] v1.03 Since Mon Dec. 22, 2003
[EMAIL PROTECTED] Networking]# cd ..
_______________________________________________
networking-discuss mailing list
[email protected]