LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-13-2015, 09:56 AM   #1
devanarr
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
netlink socket recvmsg returns -ENOMEM


Currently I am facing a issue on netlink socket which needs clarification.

I am using libnl-tiny for the support of netlink socket in userspace and a netlink socket is created in my module mod1 with out specific sockbuf set options which creates the socket with default rmem and wmem of 32767 size. This socket is subscribed for listening the neighbor messages(RTNLGRP_NEIGH) from kernel. In some instance burst of arps has been hit and the socket memory seems filled up.

From the userspace mod1, the recvmsg is receiving response of -ENOMEM. What will be the root cause and how this to be avoided ? Moreover recvmsg trigger is based on the socket fd changes of the netlink socket, which is not happening anymore. Why there is no socket fd change happening once the recv memory reached max? How to come out of this situation?

I can observe the following when I am looking for socket state. rmem is reached and struck around 64k. Whether increasing receive memory of netlink socket fix this? My userspace module mod1 seems slow in processing and picking up messages from queue. Your suggestions are welcome in this front.

root:~# cat /proc/net/netlink
sk Eth Pid Groups Rmem Wmem Dump Locks Drops Inode
88bbec00 0 4126 00000004 65856 0 00000000 2 18512 11121

Also the corresponding userspace module proc has shown the following . Is "Max locked memory" has any significance with the netlink socket functioning?

root:~# cat /proc/4126/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max open files 1024 4096 files
Max address space unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 965 965 processes
Max locked memory 65536 65536 bytes
Max pending signals 965 965 signals
Max msgqueue size 819200 819200 bytes

Regards,
Deva
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Netlink socket programming harinathreddy.c Linux - Networking 1 03-20-2015 05:10 AM
netlink socket 91change Linux - Newbie 1 07-09-2009 10:38 AM
Netlink socket issue? nandac Linux - Enterprise 1 01-12-2007 06:03 PM
NETLINK SOCKET Error thegreatest Programming 2 12-14-2005 11:06 PM
unix domain socket: how to know if i use recvmsg or read Thinking Programming 3 09-23-2005 01:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration