Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #605

Re: how to create a interrupt service function in c for real time linux operating system?

From Tauno Voipio <tauno.voipio@notused.fi.invalid>
Newsgroups comp.os.linux.development.system
Subject Re: how to create a interrupt service function in c for real time linux operating system?
Date 2014-04-01 14:10 +0300
Organization A noiseless patient Spider
Message-ID <lhe6rl$5qv$1@dont-email.me> (permalink)
References <19fd3278-9abf-4759-bb81-179e1e26ffb2@googlegroups.com> <lgukfa$3m2$1@dont-email.me> <6e96548b-5cf7-45c0-b3a5-bf545c677865@googlegroups.com> <lh1g6n$the$1@dont-email.me> <5008043a-34dd-4980-9de3-766b0cd66b86@googlegroups.com>

Show all headers | View raw


On 1.4.14 11:56, Hemanth Venkatappa wrote:
> On Thursday, 27 March 2014 16:30:30 UTC+1, Tauno Voipio  wrote:
>>>> On 26.3.14 10:46, Hemanth Venkatappa wrote:
>>
>>   >
>>
>>   >
>>
>>   > Where to write a interrupt handler and how to register with kernel in
>>
>> linux?
>>
>>   >
>>
>>   > Scenario : Client is sending a data and the server is receving the
>>
>> data from
>>
>>   > client via ethernet layer (udp). When the server receives a data from
>>
>> the client on the ip layer (kernel). It interrupts the kernel and kernel
>>
>> as to execute the data by the client, so I want to create a interrupt
>>
>> service function to catch the interrupt from the network service card.
>>
>>   >
>>
>>   > I can't write kernel modules (the kernel is not open) and you have
>>
>> real-time in
>>
>>   > user-space. However I can write code using RTLinux (real time linux)
>>
>> in kernel
>>
>>   > space and with kernel modules.
>>
>>
>>
>>
>>
>>
>>
>> Please explain what you are trying to achieve by catching the network
>>
>> interface interrupts. It is about the most silly place in the whole
>>
>> networking stack to catch for doing something allowed and useful.
>>
>>
>>
>> There are different hook positions in the network protocol stack, but
>>
>> for most of them, you need to have superuser privileges, for obvious
>>
>> security reasons.
>>
>>
>>
>> Doing anything in hardware I/O, including catching interrupts, is also
>>
>> considered such an activity that it needs superuser privileges.
>>
>>
>>
>> Your description on the 'openness' is contradictory - either you have
>>
>> the necessary privileges, or you don't have them.
>>
>>
>>
>> Try again to describe the ultimate goal of this exercise, so we can
>>
>> lead you to the correct direction.
>>
>>
>>
>> --
>>
>>
>>
>> -TV
>

(-- extra long lines truncated -TV --)

> how to get the interrupt time (timestamp) in kernel mode of real time linux?
>
> client- server communication - client is sender and server is receiver.
when the server receives the data on the ethernet interface(UDP) the kernel
  in the server is triggered. I am using real time LINUX on the server 
side.
server(i.e embedded pc target) is handling interrupts to trigger the 
embedded
pc target (conatining rt linux) to gain the attention to execute the newly
arrived data. I want to calculate the time in kernel as soon as the 
interrupt
occurs and send the response back to the client.


Could someone please help me ??


You still did not tell what for you are wanting the times. The response
gives the necessary boundary conditions for the responses.

Also, I did not understand what computers are in your network
connection. Two RT Linux machines? Is either a PC?

It seems to me that you have already fixed yourself to the idea of
timing the network interface interrupts. Do you have access to the
network drivers and their source code? Do you have the skills needed
to modify and compile a kernel driver?

If you want to measure the server latency from a request packet to
the corresponding response packet, IMHO, the simplest method is
to tap the network connection and grab the interesting traffic
with Wireshark. It will give the timing without any extra programming.

-- 

-TV

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-03-26 01:46 -0700
  Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-03-26 15:24 +0200
    Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-03-27 00:25 -0700
      Re: how to create a interrupt service function in c for real time linux operating system? Joe Beanfish <joebeanfish@nospam.duh> - 2014-03-27 13:14 +0000
      Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-03-27 17:30 +0200
        Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-01 01:56 -0700
          Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-01 14:10 +0300
            Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-01 22:21 -0700
              Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-02 08:44 +0300
                Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-02 05:27 -0700
                Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-02 17:50 +0300
                Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-02 08:46 -0700
                Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-02 21:49 +0300
                Re: how to create a interrupt service function in c for real time linux operating system? Richard Kettlewell <rjk@greenend.org.uk> - 2014-04-02 23:13 +0100
                Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-03 08:59 +0300

csiph-web