Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

Discussion Groups | Rabbit-Semi | Ethernet Acks

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

Ethernet Acks - Steve Trigero - Jun 24 17:36:46 2008

When I send a command to the rabbit via ethernet (TCP/IP) requesting data,
the rabbit responds with the data and with the Acknowledge bit set in the message.
Then the rabbit sends another ACK message with no data. So I'm getting two
packets for each query command. Is this normal, or am I doing something
wrong? Operationally, the unit works fine. If I didn't have a sniffer on the
bus I'd never know any of this was happening. But do I care that it's happening?

Steve


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: Ethernet Acks - Bill_CT - Jun 25 10:49:08 2008

--- In r...@yahoogroups.com, Steve Trigero wrote:
>
> When I send a command to the rabbit via ethernet (TCP/IP) requesting
data,
> the rabbit responds with the data and with the Acknowledge bit set
in the message.
> Then the rabbit sends another ACK message with no data. So I'm
getting two
> packets for each query command. Is this normal, or am I doing something
> wrong? Operationally, the unit works fine. If I didn't have a
sniffer on the
> bus I'd never know any of this was happening. But do I care that
it's happening?

This behavior doesn't sound right to me. Look at a WireShark capture
of your PC to another device. You'll see 2 packets per ACK and rarely
an errors of any kind reported in WireShark. The Rabbit should do the
same except where bandwidth changes window size.

Bill

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Ethernet Acks - Steve Trigero - Jun 25 11:42:46 2008

Bill,

Thanks for the reply. I'm not sure that I understand your comments.
What do you mean by "2 packets per ACK?" Are you saying it's
normal that the Rabbit sends two ACKs for each command query?
One ACK message has the data quested, the second has no data.
I have captured data from Wireshark. I can send you the file and
you can have a look and maybe help me understand what I'm
looking at.

Steve

----- Original Message ----
From: Bill_CT
To: r...@yahoogroups.com
Sent: Wednesday, June 25, 2008 7:48:54 AM
Subject: [rabbit-semi] Re: Ethernet Acks
--- In rabbit-semi@ yahoogroups. com, Steve Trigero wrote:
>
> When I send a command to the rabbit via ethernet (TCP/IP) requesting
data,
> the rabbit responds with the data and with the Acknowledge bit set
in the message.
> Then the rabbit sends another ACK message with no data. So I'm
getting two
> packets for each query command. Is this normal, or am I doing something
> wrong? Operationally, the unit works fine. If I didn't have a
sniffer on the
> bus I'd never know any of this was happening. But do I care that
it's happening?

This behavior doesn't sound right to me. Look at a WireShark capture
of your PC to another device. You'll see 2 packets per ACK and rarely
an errors of any kind reported in WireShark. The Rabbit should do the
same except where bandwidth changes window size.

Bill



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Ethernet Acks - Bill_CT - Jun 25 13:03:25 2008

Steve,

In a typical TCP stream, 2 payload packets are sent with 1 ACK
response. If the stream is slow, there can be more acks. Watch a WEB
page load on your PC and you should see 2 incoming packets and one
outgoing ack packet.

Bill

--- In r...@yahoogroups.com, Steve Trigero wrote:
>
> Bill,
>
> Thanks for the reply. I'm not sure that I understand your comments.
> What do you mean by "2 packets per ACK?" Are you saying it's
> normal that the Rabbit sends two ACKs for each command query?
> One ACK message has the data quested, the second has no data.
> I have captured data from Wireshark. I can send you the file and
> you can have a look and maybe help me understand what I'm
> looking at.
>
> Steve
>
> ----- Original Message ----
> From: Bill_CT
> To: r...@yahoogroups.com
> Sent: Wednesday, June 25, 2008 7:48:54 AM
> Subject: [rabbit-semi] Re: Ethernet Acks
> --- In rabbit-semi@ yahoogroups. com, Steve Trigero ...> wrote:
> >
> > When I send a command to the rabbit via ethernet (TCP/IP) requesting
> data,
> > the rabbit responds with the data and with the Acknowledge bit set
> in the message.
> > Then the rabbit sends another ACK message with no data. So I'm
> getting two
> > packets for each query command. Is this normal, or am I doing
something
> > wrong? Operationally, the unit works fine. If I didn't have a
> sniffer on the
> > bus I'd never know any of this was happening. But do I care that
> it's happening?
>
> This behavior doesn't sound right to me. Look at a WireShark capture
> of your PC to another device. You'll see 2 packets per ACK and rarely
> an errors of any kind reported in WireShark. The Rabbit should do the
> same except where bandwidth changes window size.
>
> Bill
>

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Ethernet Acks - Steve Trigero - Jun 25 13:28:40 2008

I still don't understand what you are trying to tell me. Here is the sequence of events
as recorded in Wireshark:

1. PC sends query command to Rabbit. (1 packet of 7-bytes of data)
2. Rabbit responds in 3.5ms with the data and the ACK bit set. (1 packet with 8-bytes of data)
3. Rabbit sends the exact same packet as in set 2 26.4ms later. (Wireshark labels it a "TCP Retransmission")
4. PC sends a zero data-length packet to Rabbit 26.4ms later with the ACK bit set. I'm assuming this is
an ACK for the rabbit's ACK in step 2.
5. Rabbit sends a zero data-length packet to the PC 50ms later with the ACK bit set. Wireshark labels it as
a duplicate ACK for the message flagged as a "retransmission" in step 3.

Is this normal?

Steve
----- Original Message ----
From: Bill_CT
To: r...@yahoogroups.com
Sent: Wednesday, June 25, 2008 10:03:19 AM
Subject: [rabbit-semi] Re: Ethernet Acks
Steve,

In a typical TCP stream, 2 payload packets are sent with 1 ACK
response. If the stream is slow, there can be more acks. Watch a WEB
page load on your PC and you should see 2 incoming packets and one
outgoing ack packet.

Bill

--- In rabbit-semi@ yahoogroups. com, Steve Trigero wrote:
>
> Bill,
>
> Thanks for the reply. I'm not sure that I understand your comments.
> What do you mean by "2 packets per ACK?" Are you saying it's
> normal that the Rabbit sends two ACKs for each command query?
> One ACK message has the data quested, the second has no data.
> I have captured data from Wireshark. I can send you the file and
> you can have a look and maybe help me understand what I'm
> looking at.
>
> Steve
>
> ----- Original Message ----
> From: Bill_CT
> To: rabbit-semi@ yahoogroups. com
> Sent: Wednesday, June 25, 2008 7:48:54 AM
> Subject: [rabbit-semi] Re: Ethernet Acks
> --- In rabbit-semi@ yahoogroups. com, Steve Trigero ...> wrote:
> >
> > When I send a command to the rabbit via ethernet (TCP/IP) requesting
> data,
> > the rabbit responds with the data and with the Acknowledge bit set
> in the message.
> > Then the rabbit sends another ACK message with no data. So I'm
> getting two
> > packets for each query command. Is this normal, or am I doing
something
> > wrong? Operationally, the unit works fine. If I didn't have a
> sniffer on the
> > bus I'd never know any of this was happening. But do I care that
> it's happening?
>
> This behavior doesn't sound right to me. Look at a WireShark capture
> of your PC to another device. You'll see 2 packets per ACK and rarely
> an errors of any kind reported in WireShark. The Rabbit should do the
> same except where bandwidth changes window size.
>
> Bill
>



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Ethernet Acks - Steve Trigero - Jun 25 14:22:02 2008

As follow-up, I have verified that my code is
not sending multiple copies of the same
message message. I've also tried other socket
write procedures to see if that made a difference,
and it doesn't.

sock_write()
sock_awrite()
sock_fastwrite()
sock_flushnext()

Using any of the above procedures (or not using
them, as in the case of the sock_flushnext)
produces the same results. If the duplicate ACKs
and Retransmissions are not normal traffic, then
it would seem that the DC library must be the culprit.

Steve
----- Original Message ----
From: Steve Trigero
To: r...@yahoogroups.com
Sent: Wednesday, June 25, 2008 10:28:32 AM
Subject: Re: [rabbit-semi] Re: Ethernet Acks
I still don't understand what you are trying to tell me. Here is the sequence of events
as recorded in Wireshark:

1. PC sends query command to Rabbit. (1 packet of 7-bytes of data)
2. Rabbit responds in 3.5ms with the data and the ACK bit set. (1 packet with 8-bytes of data)
3. Rabbit sends the exact same packet as in set 2 26.4ms later. (Wireshark labels it a "TCP Retransmission" )
4. PC sends a zero data-length packet to Rabbit 26.4ms later with the ACK bit set. I'm assuming this is
an ACK for the rabbit's ACK in step 2.
5. Rabbit sends a zero data-length packet to the PC 50ms later with the ACK bit set. Wireshark labels it as
a duplicate ACK for the message flagged as a "retransmission" in step 3.

Is this normal?

Steve
----- Original Message ----
From: Bill_CT
To: rabbit-semi@ yahoogroups. com
Sent: Wednesday, June 25, 2008 10:03:19 AM
Subject: [rabbit-semi] Re: Ethernet Acks
Steve,

In a typical TCP stream, 2 payload packets are sent with 1 ACK
response. If the stream is slow, there can be more acks. Watch a WEB
page load on your PC and you should see 2 incoming packets and one
outgoing ack packet.

Bill

--- In rabbit-semi@ yahoogroups. com, Steve Trigero wrote:
>
> Bill,
>
> Thanks for the reply. I'm not sure that I understand your comments.
> What do you mean by "2 packets per ACK?" Are you saying it's
> normal that the Rabbit sends two ACKs for each command query?
> One ACK message has the data quested, the second has no data.
> I have captured data from Wireshark. I can send you the file and
> you can have a look and maybe help me understand what I'm
> looking at.
>
> Steve
>
> ----- Original Message ----
> From: Bill_CT
> To: rabbit-semi@ yahoogroups. com
> Sent: Wednesday, June 25, 2008 7:48:54 AM
> Subject: [rabbit-semi] Re: Ethernet Acks
> --- In rabbit-semi@ yahoogroups. com, Steve Trigero ...> wrote:
> >
> > When I send a command to the rabbit via ethernet (TCP/IP) requesting
> data,
> > the rabbit responds with the data and with the Acknowledge bit set
> in the message.
> > Then the rabbit sends another ACK message with no data. So I'm
> getting two
> > packets for each query command. Is this normal, or am I doing
something
> > wrong? Operationally, the unit works fine. If I didn't have a
> sniffer on the
> > bus I'd never know any of this was happening. But do I care that
> it's happening?
>
> This behavior doesn't sound right to me. Look at a WireShark capture
> of your PC to another device. You'll see 2 packets per ACK and rarely
> an errors of any kind reported in WireShark. The Rabbit should do the
> same except where bandwidth changes window size.
>
> Bill
>



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Ethernet Acks - Bill_CT - Jun 26 11:41:17 2008

--- In r...@yahoogroups.com, Steve Trigero wrote:
>
> I still don't understand what you are trying to tell me. Here is the
sequence of events
> as recorded in Wireshark:
>
> 1. PC sends query command to Rabbit. (1 packet of 7-bytes of data)
> 2. Rabbit responds in 3.5ms with the data and the ACK bit set. (1
packet with 8-bytes of data)
> 3. Rabbit sends the exact same packet as in set 2 26.4ms later.
(Wireshark labels it a "TCP Retransmission")
> 4. PC sends a zero data-length packet to Rabbit 26.4ms later with
the ACK bit set. I'm assuming this is
> an ACK for the rabbit's ACK in step 2.
> 5. Rabbit sends a zero data-length packet to the PC 50ms later with
the ACK bit set. Wireshark labels it as
> a duplicate ACK for the message flagged as a "retransmission"
in step 3.
>
> Is this normal?

No, this is wrong. I do the same thing with an embedded product and
the PC (not Rabbit based) and I send one small packet to the PC every
second. I see one outbound packet with a PSH,ACK and one inbound
packet (from the PC) with an ACK. Nothing else and this repeats every
second without change.

The sad part is the Rabbit is already bandwidth limited and its made
worse by the extra overhead on the wire.

Bill

> ----- Original Message ----
> From: Bill_CT
> To: r...@yahoogroups.com
> Sent: Wednesday, June 25, 2008 10:03:19 AM
> Subject: [rabbit-semi] Re: Ethernet Acks
> Steve,
>
> In a typical TCP stream, 2 payload packets are sent with 1 ACK
> response. If the stream is slow, there can be more acks. Watch a WEB
> page load on your PC and you should see 2 incoming packets and one
> outgoing ack packet.
>
> Bill
>
> --- In rabbit-semi@ yahoogroups. com, Steve Trigero ...> wrote:
> >
> > Bill,
> >
> > Thanks for the reply. I'm not sure that I understand your comments.
> > What do you mean by "2 packets per ACK?" Are you saying it's
> > normal that the Rabbit sends two ACKs for each command query?
> > One ACK message has the data quested, the second has no data.
> > I have captured data from Wireshark. I can send you the file and
> > you can have a look and maybe help me understand what I'm
> > looking at.
> >
> > Steve
> >
> >
> >
> > ----- Original Message ----
> > From: Bill_CT
> > To: rabbit-semi@ yahoogroups. com
> > Sent: Wednesday, June 25, 2008 7:48:54 AM
> > Subject: [rabbit-semi] Re: Ethernet Acks
> >
> >
> > --- In rabbit-semi@ yahoogroups. com, Steve Trigero > ...> wrote:
> > >
> > > When I send a command to the rabbit via ethernet (TCP/IP) requesting
> > data,
> > > the rabbit responds with the data and with the Acknowledge bit set
> > in the message.
> > > Then the rabbit sends another ACK message with no data. So I'm
> > getting two
> > > packets for each query command. Is this normal, or am I doing
> something
> > > wrong? Operationally, the unit works fine. If I didn't have a
> > sniffer on the
> > > bus I'd never know any of this was happening. But do I care that
> > it's happening?
> >
> > This behavior doesn't sound right to me. Look at a WireShark capture
> > of your PC to another device. You'll see 2 packets per ACK and rarely
> > an errors of any kind reported in WireShark. The Rabbit should do the
> > same except where bandwidth changes window size.
> >
> > Bill
>
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )