[Ethernet]
- optimize packet transfer to EMAC [Test_GPIO] - only create packet once too speed up burst TX git-svn-id: http://moon:8086/svn/mips@64 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+3
-3
@@ -200,7 +200,7 @@ int main()
|
||||
volatile uint32_t *pEmac_data = (uint32_t*)SYS_EMAC_DATA_CACHED;
|
||||
volatile uint32_t *pEmac_maddr = (uint32_t*)SYS_EMAC_MADDR;
|
||||
volatile uint8_t *pEmac_maddr8 = (uint8_t*)SYS_EMAC_MADDR;
|
||||
uint8_t buffer[2048], data[1024];
|
||||
uint8_t buffer[2048], data[1460];
|
||||
packet_t packet;
|
||||
ARP *pARP;
|
||||
IPV4 *pIPV4;
|
||||
@@ -385,10 +385,10 @@ int main()
|
||||
*/
|
||||
|
||||
start = clock();
|
||||
Eth_pkt_create(&packet, TYPE_PROTO_IP, eth_myself, eth_bcst);
|
||||
UDP_create(&packet, myIP, 10001, arpIpDst, 10002, data, sizeof(data));
|
||||
for (j=0; j < 10000; j++)
|
||||
{
|
||||
Eth_pkt_create(&packet, TYPE_PROTO_IP, eth_myself, eth_bcst);
|
||||
UDP_create(&packet, myIP, 10001, arpIpDst, 10002, data, sizeof(data));
|
||||
size = Eth_pkt_send(&packet);
|
||||
tx_byte_cnt += size;
|
||||
tx_pkt_cnt++;
|
||||
|
||||
Reference in New Issue
Block a user