Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

IxEthAccCodelet_p.h File Reference

This file contains some private data structures and defines for the Ethernet Access Codelet. More...

Go to the source code of this file.

Data Structures

struct  IxEthAccCodeletPhyConf

Defines

#define IX_ETHACC_CODELET_QMR_PRIORITY
 Recommended priority of Ethernet DB Maintenance task.

#define IX_ETHACC_CODELET_DB_PRIORITY
#define IX_ETHACC_CODELET_USER_INSTRUCTION
#define IX_ETHACC_CODELET_USER_INSTRUCTION
#define IX_ETHACC_CODELET_IS_Q_EMPTY(mbuf_list)
 Macro to add an MBUF to the queue.

#define IX_ETHACC_CODELET_ADD_MBUF_TO_Q_TAIL(mbuf_list, mbuf_to_add)
 Macro to remove and MBUF from the queue.

#define IX_ETHACC_CODELET_REMOVE_MBUF_FROM_Q_HEAD(mbuf_list, mbuf_to_rem)
 Macro to check if the codelet has been initialised.

#define IX_ETHACC_IS_CODELET_INITIALISED()
 Macro to generate random payload data.

#define IX_ETHACC_CODELET_DATAGEN(compPtr)
 Macro to verify payload.

#define IX_ETHACC_CODELET_DATA_VERIFY(m_data, compPtr)
 Type of operations of the Ethernet Access Codelet.


Enumerations

enum  IxEthAccCodeletOperation {
  IX_ETHACC_CODELET_RX_SINK,
  IX_ETHACC_CODELET_SW_LOOPBACK,
  IX_ETHACC_CODELET_TXGEN_RXSINK,
  IX_ETHACC_CODELET_PHY_LOOPBACK,
  IX_ETHACC_CODELET_BRIDGE,
  IX_ETHACC_CODELET_ETH_LEARNING
}

Functions

IX_STATUS ixEthAccCodeletInit (BOOL phyLoopback)
 This function is the entry point to the Ethernet Access codelet.

IX_STATUS ixEthAccCodeletUninit (void)
 This function unintialize the Ethernet Access codelet.

IX_STATUS ixEthAccCodeletRxSink (void)
 Receive Sink operation.

IX_STATUS ixEthAccCodeletSwLoopback (void)
 Software loopback operation.

IX_STATUS ixEthAccCodeletTxGenRxSinkLoopback (void)
 Port-to-Port (Tx to Rx Sink) loopback operation.

IX_STATUS ixEthAccCodeletPhyLoopback (void)
 PHY loopback operation.

IX_STATUS ixEthAccCodeletBridge (void)
 Bridge Operation.

IX_STATUS ixEthAccCodeletDBLearning (void)
 Ethernet MAC address learning Operation.

void ixEthAccCodeletShow (void)
 This function is called at the end of each ethernet operation.


Detailed Description

This file contains some private data structures and defines for the Ethernet Access Codelet.

Date:
22 April 2002

Version:
Revision
1.16
-- Intel Copyright Notice --
Copyright 2002-2003 Intel Corporation All Rights Reserved.
The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors.
The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way except in accordance with the applicable license agreement .
No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel, except in accordance with the applicable license agreement.
Unless otherwise agreed by Intel in writing, you may not remove or alter this notice or any other notice embedded in Materials by Intel or Intel's suppliers or licensors in any way.
For further details, please see the file README.TXT distributed with this software.
-- End Intel Copyright Notice --

Definition in file IxEthAccCodelet_p.h.


Define Documentation

#define IX_ETHACC_CODELET_ADD_MBUF_TO_Q_TAIL mbuf_list,
mbuf_to_add   ) 
 

Macro to remove and MBUF from the queue.

Definition at line 82 of file IxEthAccCodelet_p.h.

#define IX_ETHACC_CODELET_DATA_VERIFY m_data,
compPtr   ) 
 

Type of operations of the Ethernet Access Codelet.

Definition at line 206 of file IxEthAccCodelet_p.h.

#define IX_ETHACC_CODELET_DATAGEN compPtr   ) 
 

Macro to verify payload.

Definition at line 183 of file IxEthAccCodelet_p.h.

#define IX_ETHACC_CODELET_IS_Q_EMPTY mbuf_list   ) 
 

Macro to add an MBUF to the queue.

The queue uses the m_nextpkt pointer which is not used by the Ethernet Access component

Definition at line 74 of file IxEthAccCodelet_p.h.

#define IX_ETHACC_CODELET_QMR_PRIORITY
 

Recommended priority of Ethernet DB Maintenance task.

Definition at line 58 of file IxEthAccCodelet_p.h.

#define IX_ETHACC_CODELET_REMOVE_MBUF_FROM_Q_HEAD mbuf_list,
mbuf_to_rem   ) 
 

Macro to check if the codelet has been initialised.

Definition at line 129 of file IxEthAccCodelet_p.h.

 
#define IX_ETHACC_IS_CODELET_INITIALISED  ) 
 

Macro to generate random payload data.

Definition at line 162 of file IxEthAccCodelet_p.h.


Enumeration Type Documentation

enum IxEthAccCodeletOperation
 

Enumeration values:
IX_ETHACC_CODELET_RX_SINK  All frames received (from external device) will be sinked for available ports.
IX_ETHACC_CODELET_SW_LOOPBACK  All frames received are software loopbacked to the same port for available ports.
IX_ETHACC_CODELET_TXGEN_RXSINK  Frames generated and transmitted from port 1, remote loopbacked to port 2 by using cross cable and received on port 2.
IX_ETHACC_CODELET_PHY_LOOPBACK  Frames generated and PHY loopbacked on the same port for available ports.
IX_ETHACC_CODELET_BRIDGE  Frames received on one port will be transmitted through the other port.
IX_ETHACC_CODELET_ETH_LEARNING  Ethernet Learning Facility where it adds some static and dynamic entries.

Dynamic entries are then aged and verified that they no longer appear in the database.

Definition at line 227 of file IxEthAccCodelet_p.h.


Function Documentation

IX_STATUS ixEthAccCodeletBridge void   ) 
 

Bridge Operation.

This Operation transmits any frames received on one port through the other one, as a bridge would do. An external Ethernet source must be connected to both ports transmitting frames.

return IX_SUCCESS - Bridge Operation successfully started. return IX_FAIL - Error starting bridge operation.

IX_STATUS ixEthAccCodeletDBLearning void   ) 
 

Ethernet MAC address learning Operation.

This function demonstrates the use of the Ethernet MAC learning facility. It adds some static and dynamic entries. Dynamic entries are then aged and verified that they no longer appear in the database.

return IX_SUCCESS - DB Learning operation successfully started return IX_FAIL - Error starting DB Learning operation.

IX_STATUS ixEthAccCodeletInit BOOL  phyLoopback  ) 
 

This function is the entry point to the Ethernet Access codelet.

It must be called before any of the operations as it initialises the neccessary components.

The initialisation sequence is as follows:

  • Initialise Queue manager
  • Start Queue manager dispatcher loop
  • Download NPE microcode
  • Start NPE message handler
  • Start NPEs
  • Initialise Ethernet Access component
  • Initialise Ethernet ports
  • Initialise Ethernet PHYs
  • Program MAC addresses
  • Set ports to promiscuous mode
  • Initialise MBUF pool
  • Set the Tx scheduling priority to FIFO_NO_PRIORITY

At the end of the initialisation sequence ports are not enabled. They are enabled as appropriate for each operation that's run.

return IX_SUCCESS - Codelet successfully initialised return IX_FAIL - Error initialising codelet

IX_STATUS ixEthAccCodeletPhyLoopback void   ) 
 

PHY loopback operation.

This function performs a MII-PHY level loopback on each ethernet port. Frames are generated on the XScale and sent from each port.At PHY level, frames will be loopbacked to the same port and then received on port.

Returns:
IX_SUCCESS - PHY Loopback successfully started

IX_FAIL - Error starting PHY loopback Operation

IX_STATUS ixEthAccCodeletRxSink void   ) 
 

Receive Sink operation.

This function sinks received packets as fast as possible on both ports. An external source must be connected to both ports transmitting Ethernet packets.

return IX_SUCCESS - Rx Sink Operation successfully started return IX_FAIL - Error starting Rx Sink Operation

void ixEthAccCodeletShow void   ) 
 

This function is called at the end of each ethernet operation.

It displays the MIB statistics for each port.

return void

IX_STATUS ixEthAccCodeletSwLoopback void   ) 
 

Software loopback operation.

This function sets up some callbacks so that any frames received are looped back and retransmitted unmodified on the same port. An external Ethernet source must be connected to both ports transmitting packets.

return IX_SUCCESS - Software Loopback Operation successfully started return IX_FAIL - Software started external Loopback Operation

IX_STATUS ixEthAccCodeletTxGenRxSinkLoopback void   ) 
 

Port-to-Port (Tx to Rx Sink) loopback operation.

This function performs a software loopback on the two ethernet ports. Frames are generated on the XScale and sent from port 1 and received on port 2 via a cross-over cable only. Received frames on port 2 are put back on the free queue which is shared between the two ports. A verify function ensures that the frames transmitted are the same as those received. A cross-over cable connecting port 1 and port 2 is needed to perform this operation.

return IX_SUCCESS - SW Loopback successfully started return IX_FAIL - Error starting SW loopback Operation

IX_STATUS ixEthAccCodeletUninit void   ) 
 

This function unintialize the Ethernet Access codelet.

It must be called after any Operation is complete to uninitialise the codelet.

return IX_SUCCESS - Codelet successfully uninitialised return IX_FAIL - Error uninitialising codelet

Automatically generated from sources. © Intel Corp. 2003