Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2015 20:41:49 +0000
From:      "Cui, Cheng" <Cheng.Cui@netapp.com>
To:        "hselasky@FreeBSD.org" <hselasky@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
Message-ID:  <FA688C89-5F93-4738-AB32-9EDBD8A9FD11@netapp.com>

next in thread | raw e-mail | index | archive | help
Hello Hans,

This is Cheng Cui. I am reading the CURRENT FreeBSD code in tcp_output.c, a=
nd find this question regarding your change in revision 271946.
https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=3D271946&r=
2=3D271945&pathrev=3D271946

trim data "len" under TSO:

885	                        /*
886	                         * Prevent the last segment from being
887	                         * fractional unless the send sockbuf can be
888	                         * emptied:
889	                         */
890	                        max_len =3D (tp->t_maxopd - optlen);
891	                        if ((off + len) < sbavail(&so->so_snd)) {    <=
=3D=3D
892	                                moff =3D len % max_len;
893	                                if (moff !=3D 0) {
894	                                        len -=3D moff;
895	                                        sendalot =3D 1;
896	                                }
897	                        }

Is there a specific reason that it should skip trimming the data "len" unde=
r the condition of "(off + len) =3D=3D sbavail(&so->so_snd)" in TSO? Becaus=
e I am wondering if we can trim the data "len" directly without checking th=
e "(off + len)" condition.

Thanks,
--Cheng Cui
NetApp Scale Out Networking




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FA688C89-5F93-4738-AB32-9EDBD8A9FD11>