Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I'm writing a network driver for a network interface card. The interface with the HW is still rough and not complete. For now - we still don't have interrupts. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2014
    Posts
    5

    Network driver without interrupts


    Hi,

    I'm writing a network driver for a network interface card. The interface with the HW is still rough and not complete.
    For now - we still don't have interrupts. I still want to check the rx path, so instead of interrupts, I want to poll on a part of a mapped area (synced with the driver, which will notify me by writing to it once a frame enters).
    My question is - how do I trigger such a polling? I mean - it's not Napi, since for Napi interrupts must be enabled (for it to disable it, isn't it right?), and I'm not going through any handler since... well, since there're no interrupts... Only un-logical solution I came up with is calling the rx_poll method at the end of the open() method, and stick there until something arrives. But that's really bad, plus - it will only be good for some basic checking, I wouldn't be able to give such a driver to the upper layers apps developers...
    Any ideas?

    Thanks!
    Roy

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,034
    Funny,someone was asking a similar question just a couple of days ago. There is a kernel patch available that will allow the inotify interface to be used with a memory mapped file. https://gist.github.com/TheCodeArtist/5874669

  3. #3
    Just Joined!
    Join Date
    May 2014
    Posts
    5
    Thanks, that'll help too
    Also - forgot to mention I'm a newbie... timer interrupts was what I was looking for

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •