Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 2014 17:45:42 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd <adrian@freebsd.org>
Subject:   Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4
Message-ID:  <597691144.35887030.1410644742707.JavaMail.root@uoguelph.ca>
In-Reply-To: <54149FC4.7020307@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_35887028_143598570.1410644742704
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hans Petter Selasky wrote:
> On 09/13/14 18:54, Adrian Chadd wrote:
> > Hi,
> >
> > Just for the record:
> >
> > * I'm glad you're tackling the TSO config stuff;
> > * I'm not glad you're trying to pack it into a u_int rather than
> > creating a new structure and adding fields for it.
> >
> > I appreciate that you're trying to rush this in before 10.1, but
> > this
> > is exactly why things shouldn't be rushed in before release
> > deadlines.
> > :)
> >
> > I'd really like to see this be broken out as a structure and the
> > bit
> > shifting games for what really shouldn't be packed into a u_int
> > fixed.
> > Otherwise this is going to be deadweight that has to persist past
> > 11.0.
> >
> 
> Hi Adrian,
> 
> I can make that change for -current, making the new structure and
> such.
> This change was intended for 10 where there is only one u_int for
> this
> information. Or do you want me to change that in 10 too?
> 
> --HPS
> 
> 
> 
Btw, your patch calls sbsndptr() in tcp_output(), which advances
sb_sndptroff and sb_sndptr by the length.
Then it loops around and reduces the length for the case where
there are too many mbufs in the chain.

I don't know this algorithm well enough to know if advancing
sb_sndptroff and sb_sndptr by too much for this case will
cause a problem?

I avoided the question by implementing sbsndmbuf() that was cloned
from sbsndptr() to avoid this when I did my draft patch. It is in
the attached patch, in case it is useful. (It avoids updating
sb_sndptroff and sb_sndptr.)

rick



------=_Part_35887028_143598570.1410644742704
Content-Type: text/x-patch; name=tsomaxseg.patch
Content-Disposition: attachment; filename=tsomaxseg.patch
Content-Transfer-Encoding: base64

LS0tIGtlcm4vdWlwY19zb2NrYnVmLmMuc2F2CTIwMTQtMDEtMzAgMjA6Mjc6MTcuMDAwMDAwMDAw
IC0wNTAwCisrKyBrZXJuL3VpcGNfc29ja2J1Zi5jCTIwMTQtMDEtMzAgMjI6MTI6MDguMDAwMDAw
MDAwIC0wNTAwCkBAIC05NjUsNiArOTY1LDM5IEBAIHNic25kcHRyKHN0cnVjdCBzb2NrYnVmICpz
YiwgdV9pbnQgb2ZmLCAKIH0KIAogLyoKKyAqIFJldHVybiB0aGUgZmlyc3QgbWJ1ZiBmb3IgdGhl
IHByb3ZpZGVkIG9mZnNldC4KKyAqLworc3RydWN0IG1idWYgKgorc2JzbmRtYnVmKHN0cnVjdCBz
b2NrYnVmICpzYiwgdV9pbnQgb2ZmLCBsb25nICpmaXJzdF9sZW4pCit7CisJc3RydWN0IG1idWYg
Km07CisKKwlLQVNTRVJUKHNiLT5zYl9tYiAhPSBOVUxMLCAoIiVzOiBzYl9tYiBpcyBOVUxMIiwg
X19mdW5jX18pKTsKKworCSpmaXJzdF9sZW4gPSAwOworCS8qCisJICogSXMgb2ZmIGJlbG93IHN0
b3JlZCBvZmZzZXQ/IEhhcHBlbnMgb24gcmV0cmFuc21pdHMuCisJICogSWYgc28sIGp1c3QgdXNl
IHNiX21iLgorCSAqLworCWlmIChzYi0+c2Jfc25kcHRyID09IE5VTEwgfHwgc2ItPnNiX3NuZHB0
cm9mZiA+IG9mZikKKwkJbSA9IHNiLT5zYl9tYjsKKwllbHNlIHsKKwkJbSA9IHNiLT5zYl9zbmRw
dHI7CisJCW9mZiAtPSBzYi0+c2Jfc25kcHRyb2ZmOworCX0KKwl3aGlsZSAob2ZmID4gMCAmJiBt
ICE9IE5VTEwpIHsKKwkJaWYgKG9mZiA8IG0tPm1fbGVuKQorCQkJYnJlYWs7CisJCW9mZiAtPSBt
LT5tX2xl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aWZkZWYgVENQX1NJR05B
VFVSRQogLyoKICAqIERlZmluZXMgd2hpY2ggYXJlIG5lZWRlZCBieSB0aGUgeGZvcm1fdGNwIG1v
ZHVsZSBhbmQgdGNwX1tpbnxvdXRdcHV0CkBAIC0zMzMsNiArMzM5LDcgQEAgc3RydWN0IGhjX21l
dHJpY3NfbGl0ZSB7CS8qIG11c3Qgc3RheSBpbgogc3RydWN0IHRjcF9pZmNhcCB7CiAJaW50CWlm
Y2FwOwogCXVfaW50CXRzb21heDsKKwl1X2ludAl0c29tYXhzZWdzOwogfTsKIAogI2lmbmRlZiBf
TkVUSU5FVF9JTl9QQ0JfSF8K
------=_Part_35887028_143598570.1410644742704--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?597691144.35887030.1410644742707.JavaMail.root>