[ixp1200] Fast Ports - sop_seq roll over
Yannis Haritakis
haritak at ics.forth.gr
Wed Sep 4 13:46:01 EDT 2002
Hi,
Based on the example of Fast Port usage of the book
programming IXP1200 (intel press), I made the following observation.
(If familiar please respond).
The example uses sop_seq field from rcv_ctl register in order to put
the MPKTs of a PACKET in the correct order.
However, in general, using the sop_seq allows for only 16 different
MPKTS.
That is, the number rolls over after 0xF.
A 1500bytes PACKET results in 24 MPKTS.
If more than one thread handle these MPKTS in parallel, there is
a possibility for two threads to receive the same sop_seq.
Another relative issue is the next one :
In the book it is written that the sop_seq field of rcv_cntl register,
follows the values of the sop_seq register. This is wrong.
The sop_seq register changes only when an SOP-MPKT is received, while
the sop_seq field in rcv_cntl register behaves as described in the book.
(Always increases, and get the sop_seq value when a SOP-MPKT is received).
To support this behavior there are two counters (documented in hardware
reference manual)
Now the question is this :
If a thread, after the ctx_wait(start_receive) executes two back-to-back
csr_reads :
csr_read(sop_seq, sync_none);
csr_read(rcv_cntl, ctx_wait);
will end up having two sop_seq: The value of the register
and the field of rcv_cntl.
Will the value of the register be the sop-seq number that was assigned
to the PACKET that this thread is working for ?
I think the answer is "no necessarily"!
Yannis Charitakis
haritak at ics.forth.gr
More information about the ixp1200
mailing list