All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Does RTNET supports TCP?
@ 2018-10-05  1:02 Pham, Phong
  2018-10-06  6:35 ` Steven Seeger
  0 siblings, 1 reply; 7+ messages in thread
From: Pham, Phong @ 2018-10-05  1:02 UTC (permalink / raw)
  To: xenomai; +Cc: Hillman, Robert


Hi,

I noticed starting Xenomai 3.0.1 until now (3.0.7), there is net/ in .../kernel/drivers/ and in ../kernel/drivers/net/stack/ipv4/Kconfig

# source "drivers/xenomai/net/stack/ipv4/tcp/Kconfig"

If I uncomment out the above line, it leads to compilation error in tcp.c.

Questions:

1)      Is the commented out line intentional? (short run and long run)

2)      When will TCP be supported in RTnet?

3)      Will it ever be supported?

4)      Will this statement still holds true in tcp/Kconfig? "When the RTnet IPv4 is enabled while this feature is disabled, TCP will be forwarded to the Linux network stack."

5)      When I created a socket with rt_dev_socket(AF_INET, SOCK_STREAM, 0); and attempting to rt_dev_connect(fd, server_ip_addr, sizeof(server_ip_addr)), I get errno = 25 (Inappropriate ioctl for device).  Does it mean b/c TCP is not supported in RTnet and I attempt to connect via TCP (w/ socket SOCK_STREAM)?

Phong.

Notice: This e-mail and any files transmitted with it may contain Data Device Corporation's and its subsidiaries privileged and proprietary information. It is intended solely for the use of the individual or entity to whom it is addressed. If you are not the named recipient of this transmission, any disclosure, copying, distribution or reliance on the contents of this message is prohibited. If you received this e-mail in error, please destroy it and any attached files and notify me immediately.

Click Here<http://www.ddc-web.com/Profile/EmailPrivacy.aspx> to view our privacy statement.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] Does RTNET supports TCP?
  2018-10-05  1:02 [Xenomai] Does RTNET supports TCP? Pham, Phong
@ 2018-10-06  6:35 ` Steven Seeger
  2018-10-06  8:07   ` Sebastian Smolorz
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Seeger @ 2018-10-06  6:35 UTC (permalink / raw)
  To: xenomai; +Cc: Pham, Phong, Hillman, Robert

On Thursday, October 4, 2018 9:02:46 PM EDT Pham, Phong wrote:
> Hi,
> 
> I noticed starting Xenomai 3.0.1 until now (3.0.7), there is net/ in
> .../kernel/drivers/ and in ../kernel/drivers/net/stack/ipv4/Kconfig
> 
> # source "drivers/xenomai/net/stack/ipv4/tcp/Kconfig"

I don't know why this is commented out. It looks like Gilles's initial import 
of this file in commit 106ffba7b55d506143966ff16158ee79b0007336 had it 
commented out.

I know that UDP is typically used with RTNET. TCP is complicated and has a lot 
of timers and dynamic state that makes it less than desirable for hard-
realtime systems. Probably Jan should chime in on this. I think he has the 
most experience using RTnet at this point.

> 5)      When I created a socket with rt_dev_socket(AF_INET, SOCK_STREAM, 0);
> and attempting to rt_dev_connect(fd, server_ip_addr,
> sizeof(server_ip_addr)), I get errno = 25 (Inappropriate ioctl for device).
>  Does it mean b/c TCP is not supported in RTnet and I attempt to connect
> via TCP (w/ socket SOCK_STREAM)?

Sorry I can't answer the other questions, as I am not working on rtnet myself. 
However, I would suspect that since TCP doesn't compile that is why 
SOCK_STREAM is not working. Try SOCK_DGRAM and see if it works. If not, then 
are you sure you have rtnet drivers for your network device compiled and ready 
to use? Remember, the driver for your network device must be realtime-safe. I 
recall seeing a guide for some simple changes to make to a Linux ethernet 
driver to use as a starting point for porting it to RTNET, but I can't seem to 
find it. Anyone?

Steven





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] Does RTNET supports TCP?
  2018-10-06  6:35 ` Steven Seeger
@ 2018-10-06  8:07   ` Sebastian Smolorz
  2018-10-08 13:08     ` Steven Seeger
  2018-10-08 17:55     ` Pham, Phong
  0 siblings, 2 replies; 7+ messages in thread
From: Sebastian Smolorz @ 2018-10-06  8:07 UTC (permalink / raw)
  To: xenomai, steven.seeger; +Cc: Hillman, Robert

Hi all,

Steven Seeger wrote:
> On Thursday, October 4, 2018 9:02:46 PM EDT Pham, Phong wrote:
> > Hi,
> > 
> > I noticed starting Xenomai 3.0.1 until now (3.0.7), there is net/ in
> > .../kernel/drivers/ and in ../kernel/drivers/net/stack/ipv4/Kconfig
> > 
> > # source "drivers/xenomai/net/stack/ipv4/tcp/Kconfig"
> 
> I don't know why this is commented out. It looks like Gilles's initial
> import of this file in commit
> 106ffba7b55d506143966ff16158ee79b0007336 had it commented out.
> 
> I know that UDP is typically used with RTNET. TCP is complicated and
> has a lot of timers and dynamic state that makes it less than
> desirable for hard- realtime systems. Probably Jan should chime in on
> this. I think he has the most experience using RTnet at this point.
> 
> > 5)      When I created a socket with rt_dev_socket(AF_INET,
> > SOCK_STREAM, 0); and attempting to rt_dev_connect(fd,
> > server_ip_addr,
> > sizeof(server_ip_addr)), I get errno = 25 (Inappropriate ioctl for
> > device).> 
> >  Does it mean b/c TCP is not supported in RTnet and I attempt to
> >  connect> 
> > via TCP (w/ socket SOCK_STREAM)?
> 
> Sorry I can't answer the other questions, as I am not working on rtnet
> myself. However, I would suspect that since TCP doesn't compile that
> is why SOCK_STREAM is not working.

In the old days of Xenomai 2.6 rttcp worked so I am confident that we can 
make it work again.

Currently, I am working on fixing two additional bugs in rttcp and I can 
include this compile bug in rt_tcp_accept() Phong found. I will soon 
come up with a patch series, I think.

> Try SOCK_DGRAM and see if it
> works. If not, then are you sure you have rtnet drivers for your
> network device compiled and ready to use? Remember, the driver for
> your network device must be realtime-safe. I recall seeing a guide
> for some simple changes to make to a Linux ethernet driver to use as
> a starting point for porting it to RTNET, but I can't seem to find
> it. Anyone?

Do you mean kernel/drivers/net/doc/README.drvporting?

-- 
Sebastian






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] Does RTNET supports TCP?
  2018-10-06  8:07   ` Sebastian Smolorz
@ 2018-10-08 13:08     ` Steven Seeger
  2018-10-08 17:55     ` Pham, Phong
  1 sibling, 0 replies; 7+ messages in thread
From: Steven Seeger @ 2018-10-08 13:08 UTC (permalink / raw)
  To: Sebastian Smolorz; +Cc: xenomai, Hillman, Robert

On Saturday, October 6, 2018 4:07:49 AM EDT Sebastian Smolorz wrote:
> Do you mean kernel/drivers/net/doc/README.drvporting?

Yes, this was it. Thanks.

Steven





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] Does RTNET supports TCP?
  2018-10-06  8:07   ` Sebastian Smolorz
  2018-10-08 13:08     ` Steven Seeger
@ 2018-10-08 17:55     ` Pham, Phong
  2018-10-08 18:49       ` Sebastian Smolorz
  1 sibling, 1 reply; 7+ messages in thread
From: Pham, Phong @ 2018-10-08 17:55 UTC (permalink / raw)
  To: Sebastian Smolorz, xenomai, steven.seeger; +Cc: Hillman, Robert


Hi Sebastian,

You wrote:
>Currently, I am working on fixing two additional bugs in rttcp and I can
>include this compile bug in rt_tcp_accept() Phong found. I will soon
>come up with a patch series, I think.

Thanks and looking for your fix.  Actually the compilation is probably a trivial fix for you; however, since I have no familiarity of the code at this moment, could you provide the instruction on how to modify the code to make it compilable?  I am still in the early process of establishing a connection so I can work out any further issues while waiting for your official fix (which includes several other bugs)?  Thanks.

Hi Steven,

You wrote:
> Try SOCK_DGRAM and see if it
> works. If not, then are you sure you have rtnet drivers for your
> network device compiled and ready to use? Remember, the driver for
> your network device must be realtime-safe.

My current network device driver is actually working because it is the one provided/ported by Xenomai (even though I did have to modify the buffer size on one of the buffers).  In fact, I am able to ping to successfully (but ping uses ICMP).  I need TCP because our current application (VxWorks based) accesses a FTP server to retrieve files and I would like to maintain that resemblance in Linux.  What I don't need is the real-time functionality.  I choose to use RTNET b/c the network driver is supported by Xenomai and hope for a quick path to completion.

Phong.


-----Original Message-----
From: Xenomai [mailto:xenomai-bounces@xenomai.org] On Behalf Of Sebastian Smolorz
Sent: Saturday, October 06, 2018 1:08 AM
To: xenomai@xenomai.org; steven.seeger@nasa.gov
Cc: Hillman, Robert
Subject: Re: [Xenomai] Does RTNET supports TCP?

Hi all,

Steven Seeger wrote:
> On Thursday, October 4, 2018 9:02:46 PM EDT Pham, Phong wrote:
> > Hi,
> >
> > I noticed starting Xenomai 3.0.1 until now (3.0.7), there is net/ in
> > .../kernel/drivers/ and in ../kernel/drivers/net/stack/ipv4/Kconfig
> >
> > # source "drivers/xenomai/net/stack/ipv4/tcp/Kconfig"
>
> I don't know why this is commented out. It looks like Gilles's initial
> import of this file in commit
> 106ffba7b55d506143966ff16158ee79b0007336 had it commented out.
>
> I know that UDP is typically used with RTNET. TCP is complicated and
> has a lot of timers and dynamic state that makes it less than
> desirable for hard- realtime systems. Probably Jan should chime in on
> this. I think he has the most experience using RTnet at this point.
>
> > 5)      When I created a socket with rt_dev_socket(AF_INET,
> > SOCK_STREAM, 0); and attempting to rt_dev_connect(fd,
> > server_ip_addr,
> > sizeof(server_ip_addr)), I get errno = 25 (Inappropriate ioctl for
> > device).>
> >  Does it mean b/c TCP is not supported in RTnet and I attempt to
> >  connect>
> > via TCP (w/ socket SOCK_STREAM)?
>
> Sorry I can't answer the other questions, as I am not working on rtnet
> myself. However, I would suspect that since TCP doesn't compile that
> is why SOCK_STREAM is not working.

In the old days of Xenomai 2.6 rttcp worked so I am confident that we can
make it work again.

Currently, I am working on fixing two additional bugs in rttcp and I can
include this compile bug in rt_tcp_accept() Phong found. I will soon
come up with a patch series, I think.

> Try SOCK_DGRAM and see if it
> works. If not, then are you sure you have rtnet drivers for your
> network device compiled and ready to use? Remember, the driver for
> your network device must be realtime-safe. I recall seeing a guide
> for some simple changes to make to a Linux ethernet driver to use as
> a starting point for porting it to RTNET, but I can't seem to find
> it. Anyone?

Do you mean kernel/drivers/net/doc/README.drvporting?

--
Sebastian





_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai
Notice: This e-mail and any files transmitted with it may contain Data Device Corporation's and its subsidiaries privileged and proprietary information. It is intended solely for the use of the individual or entity to whom it is addressed. If you are not the named recipient of this transmission, any disclosure, copying, distribution or reliance on the contents of this message is prohibited. If you received this e-mail in error, please destroy it and any attached files and notify me immediately.

Click Here<http://www.ddc-web.com/Profile/EmailPrivacy.aspx> to view our privacy statement.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] Does RTNET supports TCP?
  2018-10-08 17:55     ` Pham, Phong
@ 2018-10-08 18:49       ` Sebastian Smolorz
  2018-10-08 19:46         ` Steven Seeger
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Smolorz @ 2018-10-08 18:49 UTC (permalink / raw)
  To: Pham, Phong; +Cc: xenomai, steven.seeger, Hillman, Robert

Hi,

Pham, Phong wrote:
> Thanks and looking for your fix.  Actually the compilation is probably
> a trivial fix for you; however, since I have no familiarity of the
> code at this moment, could you provide the instruction on how to
> modify the code to make it compilable?

That will not help you much. Listening to a socket also fails. And if I 
would provide you also with a quick fix for that bug a null pointer 
exception will hit you when your application calls connect(). So please 
have a little more patience. Fixing all of those bugs together in a 
patch set  makes a lot of sense.

> I am still in the early
> process of establishing a connection so I can work out any further
> issues while waiting for your official fix (which includes several
> other bugs)?  Thanks.

 
> Hi Steven,
> 
> You wrote:
> 
> > Try SOCK_DGRAM and see if it
> > works. If not, then are you sure you have rtnet drivers for your
> > network device compiled and ready to use? Remember, the driver for
> > your network device must be realtime-safe.
> 
> 
> My current network device driver is actually working because it is the
> one provided/ported by Xenomai (even though I did have to modify the
> buffer size on one of the buffers).  In fact, I am able to ping to
> successfully (but ping uses ICMP).  I need TCP because our current
> application (VxWorks based) accesses a FTP server to retrieve files
> and I would like to maintain that resemblance in Linux.  What I don't
> need is the real-time functionality.

Hm ... then why don't you fetch your files in non-realtime context? This 
would be much easier I suppose.

-- 
Sebastian





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai] Does RTNET supports TCP?
  2018-10-08 18:49       ` Sebastian Smolorz
@ 2018-10-08 19:46         ` Steven Seeger
  0 siblings, 0 replies; 7+ messages in thread
From: Steven Seeger @ 2018-10-08 19:46 UTC (permalink / raw)
  To: Sebastian Smolorz; +Cc: Pham, Phong, xenomai, Hillman, Robert

On Monday, October 8, 2018 2:49:55 PM EDT Sebastian Smolorz wrote:
> 
> Hm ... then why don't you fetch your files in non-realtime context? This
> would be much easier I suppose.

Yes I agree. Based on what Phong has said, it would make more sense to fetch 
the files in a non-realtime context and then use some realtime primitive (e.g., 
pipe) to send any data from those files to a necessary realtime context.

Steven





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-08 19:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05  1:02 [Xenomai] Does RTNET supports TCP? Pham, Phong
2018-10-06  6:35 ` Steven Seeger
2018-10-06  8:07   ` Sebastian Smolorz
2018-10-08 13:08     ` Steven Seeger
2018-10-08 17:55     ` Pham, Phong
2018-10-08 18:49       ` Sebastian Smolorz
2018-10-08 19:46         ` Steven Seeger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.