public inbox for
 help / color / mirror / Atom feed
* [ECOS] The Alignment and Init of Ethernet Data Structures
       [not found] <>
@ 2014-07-04  1:35 ` Les Miklosy
  0 siblings, 0 replies; only message in thread
From: Les Miklosy @ 2014-07-04  1:35 UTC (permalink / raw)
  To: ecos-discuss

This question regards the Ethernet drivers found in the devs/eth 
directory. I found the data structure for xxx_eth_info in these header 
files: fec.h, fcc.h, quicc_eth.h, ppc405_eth.h. Moab uses the 
ppc405_eth.h while Rattler uses the fcc.h. When the data structure 
xxx_eth_info is initialized, the Moab and Rattler configurations use 
data alignment constructs (the literature calls 'compound literals')  
while fec and quicc_eth do not. An example of the data alignment 
construct for Moab is:

    // Align buffers on a cache boundary
    #define RxBUFSIZE
    #define TxBUFSIZE
    static unsigned char ppc405_eth_rxbufs[RxBUFSIZE]
    static unsigned char ppc405_eth_txbufs[TxBUFSIZE]
    static mal_bd_t
    static mal_bd_t

Why are these used in the cases of fcc and ppc405 but not for fec and 
quicc? Is the alignment necessary or recommended for new ports? What 
might be the consequences if alignment during initialization is not 
used? For other platforms are we relying on the compiler to 
rack-and-stack data structures properly on boundaries optimized by the 

Thanks for any guidance.

Before posting, please read the FAQ:
and search the list archive:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-04  1:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2014-07-04  1:35 ` [ECOS] The Alignment and Init of Ethernet Data Structures Les Miklosy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).