C2000 Team,
A customer is trying to use the UDP/IPv4 Fragment Offload Engine in the 2838x part. He says:
-------------------------
Based upon the TRM, here is what I should do:
In programming guidelines, it says for me to set bits (14:13) of the DMA_CH0_TX_CONTROL register. These bits show up as reserved in the TRM, but I assume I can just set them. TRM probably just needs to be updated.
For the software guidelines:
Based upon the driverlib file ethernet.c, I believe that here is what I need to do:
STEP1:
in the function void Ethernet_addPacketsIntoTxQueue(Ethernet_DescCh *channelDescPtr)
In the section for setting up the context descriptors, add some code here that will properly set the MSS, since it is a TODO in driverlib
//
//TDES2
//Todo :
//This value will actually be used for VLAN tagging and
//MSS for TCP Segmentation
//Programming dummy value for now
//
descPtr->des2 = 0x00000000;
The context descriptor in the code helps to make sure I set the proper des2:
/*
* Transmit Context Descriptor for dummies
*
* |-----------------------------------------------------------|
* TDES0 | Timestamp Low [31:0] |
* |-----------------------------------------------------------|
* TDES1 | Timestamp Low [31:0] |
* |-----------------------------------------------------------|
* | 31:16 | 15:14 | 13:0 |
* TDES2 | Inner VLAN Tag | Rsvd | Max Seg Size |
* |-----------------------------------------------------------|
* TDES3 | 31 | 30 |29:28| 27 | 26 |25:24|23 |22:18|17 |16 |15:0|
* | OWN|CTXT|Rsvd |OSTC|TCMSSV| Rsvd|CDE|Rsvd |IVLTV|VLTV| VT |
* |-----------------------------------------------------------|
STEP2:
And then in the normal descriptor part of the code, I see the definition of the per packet descriptor in ethernet.h ( I do not know why only the top 16 bits are defined though)
//
//Layout of Flags Field in Tx Packet Descriptor
//|31|30|29 |28 |27 |26 |25 |24 |23 |22 |21|20|19|18 |17 |16 |
//|x |x |SOP|EOP|CPC|CPC|SAIC|SAIC|VLIC|VLIC|x |x |x |TSE|CIC|CIC|
//
This helps, as I can use this to set the TSE bit:
#define ETHERNET_TX_DESC_TSE_ENABLE 0x00040000U //18th Bit
***My questions are how do I do steps 3 and 4
STEP3:
Since TSE shows in the proper spot, how come I do not see a bit called THL in here?
//
//Layout of Flags Field in Tx Packet Descriptor
//|31|30|29 |28 |27 |26 |25 |24 |23 |22 |21|20|19|18 |17 |16 |
//|x |x |SOP|EOP|CPC|CPC|SAIC|SAIC|VLIC|VLIC|x |x |x |TSE|CIC|CIC|
//
STEP4:
Also, where is the TPL field for step 4?
---------------------------------
Regards,
David