lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Delays when sending packets


From: leon . woestenberg
Subject: Re: [lwip-users] Delays when sending packets
Date: Thu, 1 May 2003 09:34:08 +0200


Hello Sergio,

your assumption is wrong.

What happens is this:
- the ethernet driver calls etharp_output(netif, ipaddr, p) to fill in the MAC address.

- if etharp has the MAC in the ARP cache, this function returns a pbuf chain which
has the MAC address filled in.
- if not, etharp queues the packet and sends a ARP request for the IP address.

- when the ARP reply comes in, etharp_arp_input() is called. For replies, this
will call update_arp_entry(). This function stabilizes an ARP entry and if queuing
is enabled, will directly transmit the queued packet on the link:

#if ARP_QUEUEING
        p = arp_table[i].p;
        /* queued packet present? */
        if (p != NULL) {
          ...
          /* send the queued IP packet */
          netif->linkoutput(netif, p);

Regards,

Leon.



Sergio PérezAlcañiz <address@hidden>
Sent by: address@hidden

30-04-2003 11:13
Please respond to Mailing list for lwIP users

       
        To:        address@hidden
        cc:        
        Subject:        [lwip-users] Delays when sending packets



Hello, I realized of one problem in ethernetif.c, an is that when trying to send
a packet to an address that we still don't know the mac, instead of the packet,
we ONLY send an arp request, and the packet is only send when the timeout has
expired.
In ethernetif_output:

......................................................

/* If the arp_lookup() didn't find an address, we send out an ARP
    query for the IP address. */
 if(dest == NULL) {
   q = arp_query(netif, ethernetif->ethaddr, queryaddr);
   if(q != NULL) {
     err = low_level_output(ethernetif, q);
     pbuf_free(q);
     return err;
   }

...................................

Since low_level_output ALWAYS returns ERR_OK, ethernetif_output will return
ERR_OK, but the packet that we wanted to send hasn't been sent.
I think that, only when the timeout attached to that packet expires, then the
packet is really sent, and it is exactly the "timeout" time that I see as "delays".

Any ideas???

Regards.
Sergio


_______________________________________________
lwip-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]