I am testing netlink filter application on 1Gbit/sec network: i have user space function sending verdict to netlink socket; another user space routine performs async read of marked packets from netlink socket and some custom filter function. For the bitrates >300 Mbps i see netlink socket read errors "no buffer space available". I take it as netlink buffer overflow. Can someone recommend an approach on how to improve netlink throughput for high speed network? My kernel version is 2.6.38.
Asked
Active
Viewed 1,318 times
0
-
Which function is this "no buffer space available" message being reported from? – caf Jun 27 '12 at 07:12
-
I don't think netlink sockets are designed for high-performance packet processing. – ugoren Jun 27 '12 at 11:25
-
Which function is this "no buffer space available" message being reported from?\n – user270398 Jun 27 '12 at 13:39
-
Which function is this "no buffer space available" message being reported from? I have user space thread reading packets from netfilter: Sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_FIREWALL) while(1) { //wait for the data to become available select(Socket+1, &readfds, NULL, NULL, &Timeout); ... //read int res = recvfrom(Socket, (void*)packet_buffer, MAXMSGSIZE, 0, (struct sockaddr *)&sockaddr, (socklen_t *)&count); if (res <= 0) { // ERROR: unable to receive packet message - no buffer space available – user270398 Jun 27 '12 at 13:52
1 Answers
0
There is socket between kernel to user space. via the socket packet upload to user space. the socket buffer is full , so you get an error. in c you can define the socket buffer size and increase it (this is done by netlink)

Avihai Marchiano
- 3,837
- 3
- 38
- 55