RE: [ixp1200] Transmitting pkts out of Giga ports
Chompi, I think I can answer some of these questions for you. I believe your intuition is correct and the transmit code is not filling the MAC buffers fast enough. The transmit code for this chapter was not tested on the gigabit ports, so it's no surprise that the code is not fast enough. However, the IXF1002 has a 2048 byte buffer per port. So, you should be able to send Ethernet packets of that size or less without underflowing. The trick is to set the "tx send threshold" to something large. This threshold is the number of bytes that must be in the buffer before the MAC starts transmitting. If this threshold is set large enough, you should never underflow. This setting can be adjusted in the simulator, and it can also be adjusted on the hardware using the IXF1002 driver. If you are on Linux, this is done from user space via IOCTLs. If you are on VxWorks, this is done through function calls. There are also two known bugs in the transmit code that we are trying to put up on the errata web page. This may be impacting your ability to run the code on the hardware. I have pasted the errata below. It should be up on the website soon. For your last question, unfortunately, I couldn't find any microC code for transmitting on gigabit ports, but that doesn't mean it doesn't exist. Maybe someone else on the list has something like that. Aaron Errata: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Page: N/A Location: CD-ROM, Chapter09\transmit.c Description: The transmit code supplied in Chapter 9 does not properly handle packets larger than 64 bytes. There are two corrections: First, lines 169 and 170 should read: port_state.current_data_ptr = (void*)((unsigned int)(port_state.current_data_ptr) + (64 / sizeof(long long))); instead of: port_state.current_data_ptr = (void*)((unsigned int)(port_state.current_data_ptr) + 64); This correction accounts for the quad-word addressing of SDRAM on the IXP1200. The second correction is to add the following line after line 167: mpacket->eop = 0; This ensures the the per-mpacket state maintained by the fill threads gets properly initialized for each new packet. ------------------------------ Aaron Kunze Intel Research and Development aaron.kunze@intel.com ----PGP Key ID: 0x81124B7C---- ----NOT SPEAKING FOR INTEL---- ---------GO BOILERS!!---------
-----Original Message----- From: ixp1200-bounces@lists.cs.princeton.edu [mailto:ixp1200-bounces@lists.cs.princeton.edu] On Behalf Of chompi@softhome.net Sent: Tuesday, March 30, 2004 4:04 AM To: ixp1200@lists.cs.princeton.edu Subject: [ixp1200] Transmitting pkts out of Giga ports
Hi all,
I've recently tried sample code from chap9 Johnson and Kunze book and in DWB, the code works fine with Fast Eth ports. However, if I try to use GE ports, it only works when MTU<=192 (<=3 Mpkts per pkt). If there are >3 Mpkts/pkt, the simulation halts with error "Transmit buffer underflow". Does this mean that the code is not filling up TFIFO fast enough? Anyways, even if I set MTU<=192, I still cannot send out any traffic on real hardware (we are using ENP-2506). L3Fwdr reference design works fine on the board so I do not expect any hardware or configuration problems. Did anybody encounter this issue before? Is there any sample code (in micro C) lying around that transmits data over GE ports?
Any help is appreciated.
Chompi. _______________________________________________ ixp1200 mailing list ixp1200@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/ixp1200
Dear Aaron, Thank you very much for your comments and the errata. After setting the threshold to 1024 I do not receive anymore underflow errors. Could you please give me some instructions on how to use IOCTL to set this register in hardware mode? We are using linux 2.3.99 kernel and SDK 2.0, though we do not implement ACE framework. Thanks, Chompi
-----Original Message----- From: Kunze, Aaron [mailto:aaron.kunze@intel.com] Sent: Tuesday, March 30, 2004 7:24 PM To: IXP1200 Developer's List Cc: chompi@softhome.net Subject: RE: [ixp1200] Transmitting pkts out of Giga ports
Chompi,
I think I can answer some of these questions for you. I believe your intuition is correct and the transmit code is not filling the MAC buffers fast enough. The transmit code for this chapter was not tested on the gigabit ports, so it's no surprise that the code is not fast enough.
However, the IXF1002 has a 2048 byte buffer per port. So, you should be able to send Ethernet packets of that size or less without underflowing. The trick is to set the "tx send threshold" to something large. This threshold is the number of bytes that must be in the buffer before the MAC starts transmitting. If this threshold is set large enough, you should never underflow. This setting can be adjusted in the simulator, and it can also be adjusted on the hardware using the IXF1002 driver. If you are on Linux, this is done from user space via IOCTLs. If you are on VxWorks, this is done through function calls.
There are also two known bugs in the transmit code that we are trying to put up on the errata web page. This may be impacting your ability to run the code on the hardware. I have pasted the errata below. It should be up on the website soon.
For your last question, unfortunately, I couldn't find any microC code for transmitting on gigabit ports, but that doesn't mean it doesn't exist. Maybe someone else on the list has something like that.
Aaron
Errata:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Page: N/A Location: CD-ROM, Chapter09\transmit.c Description:
The transmit code supplied in Chapter 9 does not properly handle packets larger than 64 bytes. There are two corrections:
First, lines 169 and 170 should read:
port_state.current_data_ptr = (void*)((unsigned int)(port_state.current_data_ptr) + (64 / sizeof(long long)));
instead of:
port_state.current_data_ptr = (void*)((unsigned int)(port_state.current_data_ptr) + 64);
This correction accounts for the quad-word addressing of SDRAM on the IXP1200.
The second correction is to add the following line after line 167:
mpacket->eop = 0;
This ensures the the per-mpacket state maintained by the fill threads gets properly initialized for each new packet.
------------------------------ Aaron Kunze Intel Research and Development aaron.kunze@intel.com ----PGP Key ID: 0x81124B7C---- ----NOT SPEAKING FOR INTEL---- ---------GO BOILERS!!---------
-----Original Message----- From: ixp1200-bounces@lists.cs.princeton.edu [mailto:ixp1200-bounces@lists.cs.princeton.edu] On Behalf Of chompi@softhome.net Sent: Tuesday, March 30, 2004 4:04 AM To: ixp1200@lists.cs.princeton.edu Subject: [ixp1200] Transmitting pkts out of Giga ports
Hi all,
I've recently tried sample code from chap9 Johnson and Kunze book and in DWB, the code works fine with Fast Eth ports. However, if I try to use GE ports, it only works when MTU<=192 (<=3 Mpkts per pkt). If there are >3 Mpkts/pkt, the simulation halts with error "Transmit buffer underflow". Does this mean that the code is not filling up TFIFO fast enough? Anyways, even if I set MTU<=192, I still cannot send out any traffic on real hardware (we are using ENP-2506). L3Fwdr reference design works fine on the board so I do not expect any hardware or configuration problems. Did anybody encounter this issue before? Is there any sample code (in micro C) lying around that transmits data over GE ports?
Any help is appreciated.
Chompi. _______________________________________________ ixp1200 mailing list ixp1200@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/ixp1200
participants (2)
-
Chompi
-
Kunze, Aaron