LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-02-2013, 06:08 AM   #1
adrianf0
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
[Ethernet Flow Control] force kernel to stop packet reception when is overloaded


Hello,
In order to avoid a packet lost (it's a critical requirement for my system), I would like to profit Ethernet Flow Control (IEEE 802.1Qbb) in my application (high rate, continuous UDP flow which is stored on a hard drive). My problem is kernel which receives data from the driver even when its buffers are overloaded. I'll try to describe my issue.
A NIC has its own internal FIFO. When FIFO's usage reach a certain threshold, a NIC sends PAUSE frame and postpone a data transmission for a certain amount of time. That would be an ideal back pressure solution in my application. However, after NIC, kernel has its own FIFOs which stores sk_buf structs in order to process packets though subsequent layers of OSI model implementations. The problem is, that if readout of a socket in user's application is not fast enough, the packet is dropped by the kernel (I think FIFOs are implemented as circular buffers). At the same time, kernel has emptied NIC's FIFOs so PAUSE frame are not send and the whole system loses packets.
My question is whether it's possible to force kernel to stop receiving packets from the driver, when kernel's resources are busy ? It would overload NIC's FIFO and cause PAUSE frame generation as intended. I am also wondering if it's possible to check, at which level exactly kernel drops packets and what are exact conditions of a drop (time interval, memory overload, ect.) ?

Thanks,
Adrian
 
Old 07-02-2013, 02:48 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,190

Rep: Reputation: 105Reputation: 105
First of all, you should use "ethtool -a" command to check pause configuration on the NIC card.
 
Old 07-02-2013, 05:27 PM   #3
adrianf0
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Nini09 thanks for your reply.
However, I did my homework and things like NIC, ect. are set properly. I have been stopped by the quite specific issue, which I believe I described quite clearly and I'm afarid I need some tip from a Linux network stack guru with indication where to look for a solution (probably some sysctl parameter...).
 
Old 07-05-2013, 06:29 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,190

Rep: Reputation: 105Reputation: 105
Following link may help you. Basically, Linux traffic control is on sending side, not receiving side. If you think the NIC can generate pause frame when queue is full in stack and NIC, it should work.
http://www.funtoo.org/Traffic_Control
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Linux packet sockets basic question - bi-directional raw ethernet data flow bayoulinux Programming 12 05-16-2012 03:24 PM
Why is there no function for packet reception in linux loopback network interface ? avee137 Linux - Newbie 3 08-26-2011 11:39 PM
Virtual network driver packet reception j-osh Linux - Kernel 1 02-13-2010 05:08 AM
Bypassing packet reception path dodo76 Linux - Networking 2 10-28-2009 08:40 AM
packet reception by virtual network interface seeker321in Linux - Networking 0 04-19-2002 01:48 PM


All times are GMT -5. The time now is 06:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration