Compiler alignment and network problem.

Compiler alignment and network problem.

Post by Martin Proul » Wed, 29 May 2002 23:50:53



Hello,

I've recently noticed that the behavior of the network changes (basically works
correctly or not) depending on the alignment generated by the compiler.

I'm working under the 2.0.39 (uClinux) tree, with the i960 platform.

Under gcc, the default alignment value is 16 bytes, which causes problems.  It
seems that at this alignment, no tcp connection work, but I can root-mount an
nfs drive and ping the board and ping other machines from it.

If I modify the alignment generated by the gcc compiler to be at 4 bytes, things
get better, I can now telnet from the machine, but not to it.  Inetd starts,
accepts the connection, and then I get these error messages in a continuous and
never ending way:

release_dev: pty0: read/write wait queue active!

The telnet prompt never gets seen on the remote machine.

What part of the network in the linux kernel has such a sensitivity to the
alignment used?

Have other people seen such alignment problems?

Does the linux 2.4.x kernel changes anything to this?

Thanks!

Martin

--

_____________________________________________________________________
OKIOK

Enterprise and e-business security solutions
Solutions de scurit d'entreprise et d'affaires lectronique

Tel. : (450) 681.1681
http://www.okiok.com

 
 
 

1. Alignment issues using the Sun C++ compiler SC4.2

You don't want to mess with aligment, if you use it to
exchange data, you're barking up the wrong tree.
Checkout XDR instead and find that tehre's much more than
aligment to data exchange.

And when it comes to C++ classes, forget about exchanging
those between unlike systems, the compilers will wildly disagree
about how classes are laid out.

There's a pragma pack, but after that your code wil run slowly.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

2. Why all the fuss over a simple rm?

3. Alignment issues with Sun C Compiler

4. wordperfect?

5. Matrox Mystique ands X.

6. xcom, PU/LU mainframe connectivity - HELP!!

7. Problem w/struct alignment on Sparc/Solaris

8. 7 slice limitation ufs or solaris??

9. Help ! Alignment Problem !

10. Char alignment problem report

11. Alignment problems on solaris & gcc?

12. dtksh alignment resource problem

13. PROBLEM WITH GCC DATA ALIGNMENT