iw10-base-case on FreeBSD

32 views
Skip to first unread message

hiren panchasara

unread,
Mar 17, 2016, 7:31:16 PM3/17/16
to packe...@googlegroups.com
I see the script expects
0.200 > P. 1:14601(14600) ack 1

And what I get is individual acks.

# ./packetdrill -v /home/hiren/pscripts/iw10-base-case.pkt
inbound injected packet: 0.100012 S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7>
outbound sniffed packet: 0.100090 S. 1272767920:1272767920(0) ack 1 win 65535 <mss 1460,nop,wscale 6,sackOK,eol,eol>
inbound injected packet: 0.200007 . 1:1(0) ack 1272767921 win 257
outbound sniffed packet: 0.200094 . 1272767921:1272769381(1460) ack 1 win 1026
/home/hiren/pscripts/iw10-base-case.pkt:15: error handling packet: live packet field ipv4_total_length: expected: 14640 (0x3930) vs actual: 1500 (0x5dc)
script packet: 0.200000 P. 1:14601(14600) ack 1
actual packet: 0.200094 . 1:1461(1460) ack 1 win 1026

(Apologies for not staying within 80 columns)

What am I missing here? Does linux aggregate the acks? How can I still
validate that FreeBSD has initcwnd of 10? I can always do following
assert: assert tcpi_snd_cwnd == 14600 but is there a better/more correct
way?

Cheers,
Hiren

Neal Cardwell

unread,
Mar 17, 2016, 8:28:38 PM3/17/16
to hiren panchasara, packetdrill
> I see the script expects
> 0.200 > P. 1:14601(14600) ack 1

> And what I get is individual acks.

This iw10-base-case.pkt packetdrill script is designed for Linux. On Linux the tun device has TSO enabled by default. So the script expects to see an outbound packet containing multiple MSS of data.

On platforms where the tun device does not support TSO the script should expect to see packets of 1 MSS in length.

If you want to validate that FreeBSD has an  initial cwnd of 10 then you can try writing a script that expects to see 10 packets of 1 MSS each, all going out in rapid succession.

There is an example of this kind of BSD test in the packetdrill distribution:


If you change the write of 4000 bytes to 10000 bytes, and then expect 10 packets instead of 4, you will be on your way, I think.

I hope that helps,
neal


hiren panchasara

unread,
Mar 17, 2016, 9:35:05 PM3/17/16
to Neal Cardwell, packetdrill
On 03/17/16 at 05:28P, 'Neal Cardwell' via packetdrill wrote:
> > I see the script expects
> > 0.200 > P. 1:14601(14600) ack 1
> >
> > And what I get is individual acks.
>
> This iw10-base-case.pkt packetdrill script is designed for Linux. On Linux
> the tun device has TSO enabled by default. So the script expects to see an
> outbound packet containing multiple MSS of data.

ah, tso. of course. :-)
>
> On platforms where the tun device does not support TSO the script should
> expect to see packets of 1 MSS in length.
>
> If you want to validate that FreeBSD has an initial cwnd of 10 then you
> can try writing a script that expects to see 10 packets of 1 MSS each, all
> going out in rapid succession.
>
> There is an example of this kind of BSD test in the packetdrill
> distribution:
>
> https://github.com/google/packetdrill/blob/master/gtests/net/packetdrill/tests/bsd/fast_retransmit/fr-4pkt-sack-bsd.pkt
>
> If you change the write of 4000 bytes to 10000 bytes, and then expect 10
> packets instead of 4, you will be on your way, I think.

Yeah, I have it working now.

Thanks,
Hiren
Reply all
Reply to author
Forward
0 new messages