Hello,
Let me brief about my Application.
I am implementing PTP. My ARM-boards are connected through Ethernet.
So i want to get the Hardware Timestamp for the Transmitting Packets.
I am trying to get the Hardware Timestamp of Transmitting packets from MSG_ERRQUEUE, i am able to get the Hardware Timestamp for around initial 100 packets after that i am not able to get.
When i debug the things at Kernel level what i found is in function "sock_recv_errqueue " at time of "skb_dequeue" the return value is NULL.
Similarly when i check at the transmitting side in function "sock_queue_err_skb" it is going to "ENOMEM" (Out of Memory Condition).
if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= (unsigned int)sk->sk_rcvbuf)
return -ENOMEM;
When i check the memory allocation "skb->truesize = 704 " ; "sk->sk_rcvbuf = 163840" and "sk->sk_rmem_alloc" is keep on increasing and when the value of "sk->sk_rmem_alloc +skb->truesize >= 163840" I am getting Out of Memory error.
As per my understanding sk->sk_rmem_alloc should get decreased (ie) memory should be freed when data is read user space. But it seems that it is not happening so.
Let me know how to resolve this.
Thanks,
Karikalan.

