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

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to