Simple High-performance External Communications

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
gamozo
Posts: 2
Joined: Wed Sep 19, 2012 1:02 pm

Simple High-performance External Communications

Post by gamozo »

I'm looking for gigabit speeds with serial port simplicity (throwing some stuff on some BARs is simple enough as well). Does anyone know if interfaces to do this? Infiniband? I could use gigabit ethernet, but it's a lot to implement (or maybe I'm wrong, I don't need TCP, I can roll my own proto) where it's just some simple communication between two local machines.

Edit: Hmmm, maybe raw ethernet RX/TX is simpler than I thought... I'll have to look into some gigabit lan spec sheets.

-Brandon
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: Simple High-performance External Communications

Post by thepowersgang »

Gigabit enthernet is probably the best, most of the complexity in controllers is from checksum/tcp segmentation offloading. However, it does depend on what you need the communication for.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
gamozo
Posts: 2
Joined: Wed Sep 19, 2012 1:02 pm

Re: Simple High-performance External Communications

Post by gamozo »

I just need to get large amounts of data from one machine to another. I'm comfortable writing a custom protocol as I don't need nearly as many features as TCP gives. I'm assuming that most NICs allow for just raw "put these bytes on the line" sort of stuff?
rdos
Member
Member
Posts: 3276
Joined: Wed Oct 01, 2008 1:55 pm

Re: Simple High-performance External Communications

Post by rdos »

gamozo wrote:I just need to get large amounts of data from one machine to another. I'm comfortable writing a custom protocol as I don't need nearly as many features as TCP gives. I'm assuming that most NICs allow for just raw "put these bytes on the line" sort of stuff?
NICs don't need TCP or IP protocols, but you need to use the Ethernet layer which has the 6 byte source and destination MACs + a protocol-type. You also should realize that Ethernet is not stream-oriented, but rather packet oriented, so you cannot put bytes on the line, rather you must provide packets with legal headers (MACs).
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Simple High-performance External Communications

Post by bluemoon »

gamozo wrote:I just need to get large amounts of data from one machine to another. I'm comfortable writing a custom protocol as I don't need nearly as many features as TCP gives. I'm assuming that most NICs allow for just raw "put these bytes on the line" sort of stuff?
As rdos pointed out, NICs only deal with packets. Furthermore, it don't care receive order, the packet may get loss in the route or if receiver don't read quickly enough - NICs can only handle a few packets on a circular buffer or fixed buffer. If there is routers the packet may be duplicated. In rare case on crap transmission like wireless, the packet may be corrupted.

So, to deal with all sort of things you end up re-inventing TCP, at best you may beat it by 2% performance on specific situation but it probably cost you a few years to design, implement and test your invention.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Simple High-performance External Communications

Post by Brendan »

Hi,
bluemoon wrote:As rdos pointed out, NICs only deal with packets. Furthermore, it don't care receive order, the packet may get loss in the route or if receiver don't read quickly enough - NICs can only handle a few packets on a circular buffer or fixed buffer. If there is routers the packet may be duplicated. In rare case on crap transmission like wireless, the packet may be corrupted.

So, to deal with all sort of things you end up re-inventing TCP, at best you may beat it by 2% performance on specific situation but it probably cost you a few years to design, implement and test your invention.
That'd depend on what you're doing. For example, for a "point to point" link between computers with no need for routing or packet splitting (which is closer to the "serial port simplicity" that gamozo was asking about); it'd be easy to design something more efficient than TCP/IP.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply