First of all I just commited the UDP support.
So this is now all in and we can work on this in tree with smaller diffs.
Thanks for the work.

On Tue, Mar 08, 2011 at 07:39:17PM -0300, Christiano F. Haesbaert wrote:
> On Tue, Mar 08, 2011 at 03:26:23PM +0100, Claudio Jeker wrote:
> > 
> > I played a bit with it and cleaned up the diff a bit (KNF fixes plus one
> > error see below). A few comments inline plus my diff at the end.
> > 
> > > Index: tcpbench.1
> > > ===================================================================
> > > RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.1,v
> > > retrieving revision 1.10
> > > diff -d -u -p -w -r1.10 tcpbench.1
> > > --- tcpbench.1    26 Oct 2010 20:26:37 -0000      1.10
> > > +++ tcpbench.1    6 Mar 2011 19:51:00 -0000
> > ...
> > > +.It Fl u
> > > +Use UDP instead of TCP, this must be specified on both client and
> > > +server. Transmitted packets per second (TX PPS) will be accounted on the 
> > > client
> > > +side, while received packets per second (RX PPS) whill be accounted on 
> > > the
> > > +server side. UDP has no Protocol Control Block (PCB) so the
> > > +.Fl k
> > > +flags don't apply.
> > 
> > This is a lie. UDP has a PCB but that one does not include the tcp
> > specific control block (TCB). It would be possible to get the UDP PCB and
> > show at least the socket and inpcb specific values. Not sure how usable
> > those are (but I would be interested in the socketbuffer stats on the
> > reciever).
> > 
> 
> Right, what I wanted to state is that there is no per-proto PCB in UDP 
> (inp_ppcb
> member). I didn't find anything useful of showing in in inpcb, but I can 
> change
> that if someone wants.
> 

Currently tcpbench allows to inspect:
        inpcb.inp_flags
        sockb.so_rcv.sb_cc
        sockb.so_rcv.sb_wat
        sockb.so_rcv.sb_hiwat
        sockb.so_snd.sb_cc
        sockb.so_snd.sb_wat
        sockb.so_snd.sb_hiwat

those values are protocol independent (working for UDP and TCP)
so it would make sense to show them for UDP sockets as well.
Just a hint as an idea what additional things could be done in tcpbench.

-- 
:wq Claudio

Reply via email to