"pack dropped, no space" after 7 hrs and 35 min

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

"pack dropped, no space" after 7 hrs and 35 min

lwip-users mailing list
Hello,

I am trying to send UDP packets using xilinx z7020.
I am getting error "pack dropped, no space" with error code  "Out of memory
error. ERR_MEM        = -1" exactly after 7 hrs and 35 min.
I ran multiple iteration but every time i get error at same time.
Can someone help me out what i am missing ?
Thank you all in advance



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

Patrick Klos-2
On 7/30/2019 6:50 AM, santosh_ts via lwip-users wrote:
> Hello,
>
> I am trying to send UDP packets using xilinx z7020.
> I am getting error "pack dropped, no space" with error code  "Out of memory
> error. ERR_MEM        = -1" exactly after 7 hrs and 35 min.
> I ran multiple iteration but every time i get error at same time.
> Can someone help me out what i am missing ?
> Thank you all in advance

How many packets have you sent in that time?  How many packet buffers
have you allocated?  At what rate are you attempting to send these UDP
packets?  Is there anything else that happens at 7 hours and 35
minutes?  What other network activity or protocols are active at the
same time?  Can you provide a packet trace file?

Patrick Klos
Klos Technologies, Inc.


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

lwip-users mailing list
How many packets have you sent in that time?
> It sent almost 21910101 packets.
 
How many packet buffers have you allocated?  
>I have allocated 30 bytes.
> st_psnd_UDP1 = pbuf_alloc(PBUF_TRANSPORT, 30, PBUF_RAM);// Tried with
> 30,8,9
<http://lwip.100.n7.nabble.com/file/t2266/Capture.png>
#define MEM_ALIGNMENT 64
#define MEM_SIZE 524288
#define MEMP_NUM_PBUF 1024 //16 // 32 // 64 // 512
#define MEMP_NUM_UDP_PCB 20 //4 // 10
#define MEMP_NUM_TCP_PCB 32
#define MEMP_NUM_TCP_PCB_LISTEN 8
#define MEMP_NUM_TCP_SEG 256
#define MEMP_NUM_SYS_TIMEOUT 8
#define MEMP_NUM_NETBUF 8
#define MEMP_NUM_NETCONN 16
#define MEMP_NUM_TCPIP_MSG_API 16
#define MEMP_NUM_TCPIP_MSG_INPKT 64

#define MEMP_NUM_SYS_TIMEOUT 8
#define PBUF_POOL_SIZE 16384
#define PBUF_POOL_BUFSIZE 1700
#define PBUF_LINK_HLEN 16
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1

At what rate are you attempting to send these UDP packets?  
>I tried to send packets with 10 ms duration and 100ms duration, in both
cases it stopped transmitting after 7 hrs 35 min.

Is there anything else that happens at 7 hours and 35 minutes?
>I have configured 8 ports(AXI Ethernet) and PS Ethernet in Zynq evaluation
board.I am sending packets on all 8 AXI Ethernet ports periodically .

> I am getting error in below function as i am AXI Ethernet.
static err_t low_level_output_axi(struct netif *netif, struct pbuf *p)
{
        SYS_ARCH_DECL_PROTECT(lev);
        err_t err;
        struct xemac_s *xemac = (struct xemac_s *)(netif->state);
        xaxiemacif_s *xaxiemacif = (xaxiemacif_s *)(xemac->state);

#ifdef XLWIP_CONFIG_INCLUDE_AXI_ETHERNET_DMA
        /*
         * With AXI Ethernet on Zynq, we observed unexplained delays for
         * BD Status update. As a result, we are hitting a condition where
         * there are no BDs free to transmit packets. So, we have added
         * this logic where we look for the status update in a definite
         * loop.
         */
        XAxiDma_BdRing *txring = XAxiDma_GetTxRing(&xaxiemacif->axidma);
#endif
        int count = 100;

        SYS_ARCH_PROTECT(lev);

        while (count)
        {

                /* check if space is available to send */
                if (is_tx_space_available_axi(xaxiemacif))
                {
                        _unbuffered_low_level_output_axi(xaxiemacif, p);
                        //pbuf_free(p); // added
                        err = ERR_OK;
                        break;
                }
                else
                {
#if LINK_STATS
                        lwip_stats.link.drop++;
#endif
#ifdef XLWIP_CONFIG_INCLUDE_AXI_ETHERNET_DMA
                        process_sent_bds_axi(txring);
#endif
                        count--;
                }
        }

        if (count == 0)
        {
                b_Reset = TRUE;

                print("pack dropped, no space low_level_output_axi\r\n");
                err = ERR_MEM;
        }

        SYS_ARCH_UNPROTECT(lev);
        return err;
}

i tried to reset the FIFO after i get  pack dropped, no space
low_level_output error, but still i am not able to see transmission.

What other network activity or protocols are active at the same time?
> Once packets are stopped transmitting from board , i can see
> ICMPv6,IGMPv3,MDNS, SSDP in the trace.
 
Can you provide a packet trace file?
>I have attached the snapshot

I took the reference from git hub to build this project belowo is the link
https://github.com/fpgadeveloper/ethernet-fmc-axi-eth



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

lwip-users mailing list
Hello all,

Can anyone help me on this topic ?



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
mav
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

mav
hi!

Looks like a memory leak somewhere. I suggest turning on Memory stats for
lwip and check.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

lwip-users mailing list
In reply to this post by lwip-users mailing list
Check whether the packets are getting freed or not after they are submitted
to firmware. Check memory available on board before you allocate some memory
for each packet.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

Patrick Klos-2
In reply to this post by lwip-users mailing list
On 8/7/2019 3:04 AM, santosh_ts via lwip-users wrote:
Hello all,

Can anyone help me on this topic ?

Here's a guess based on what you've shared:

You previously said:
At what rate are you attempting to send these UDP packets?  
>I tried to send packets with 10 ms duration and 100ms duration, in both
cases it stopped transmitting after 7 hrs 35 min.
That implies that you sent about 2,730,000 (at 10ms) or 273,000 (at 100ms) packets.  That suggests it's not a buffering issue.

You said your platform is a Zynq eval board?  That suggests you have an FPGA component in your solution, which also suggests you're using some IP libraries.  What are the chances you're using a "demo" version of some IP library that has a "time limit" built into it that shuts the IP off at 7 hours and 35 minutes??  Just a thought... it happens...  Does it stop if you send only 1 packet per second?  Or 1 packet every few seconds??  If it always stops at 7 hours and 35 minutes, that's a pretty significant clue.

Patrick Klos
Klos Technologies, Inc.


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

lwip-users mailing list
Hello Patrick Klos,

Thanks for your reply.
I am using evaluation License. I think you are right.
Irrespective of periodicity of UDP packets my packets are getting dropped
after same time i.e. 7 hrs 35 min.
I will try to get license and ill try it.

Thank you.
Your information is very helpful.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: "pack dropped, no space" after 7 hrs and 35 min

lwip-users mailing list
In reply to this post by lwip-users mailing list
Hello,

I have checked that packets are getting by collecting the return type of
Pbuf_free.

Thank you.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users