[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:
2015-12-13 18:07:51 +00:00
parent 55d383181b
commit 5c62994932
2 changed files with 19 additions and 5 deletions
+3 -3
View File
@@ -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++;