IxAtmm.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. /**
  2. * @file IxAtmm.h
  3. *
  4. * @date 3-DEC-2001
  5. *
  6. * @brief Header file for the IXP400 ATM Manager component (IxAtmm)
  7. *
  8. *
  9. * @par
  10. * IXP400 SW Release version 2.0
  11. *
  12. * -- Copyright Notice --
  13. *
  14. * @par
  15. * Copyright 2001-2005, Intel Corporation.
  16. * All rights reserved.
  17. *
  18. * @par
  19. * Redistribution and use in source and binary forms, with or without
  20. * modification, are permitted provided that the following conditions
  21. * are met:
  22. * 1. Redistributions of source code must retain the above copyright
  23. * notice, this list of conditions and the following disclaimer.
  24. * 2. Redistributions in binary form must reproduce the above copyright
  25. * notice, this list of conditions and the following disclaimer in the
  26. * documentation and/or other materials provided with the distribution.
  27. * 3. Neither the name of the Intel Corporation nor the names of its contributors
  28. * may be used to endorse or promote products derived from this software
  29. * without specific prior written permission.
  30. *
  31. * @par
  32. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
  33. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  35. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  36. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  37. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  38. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  39. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  40. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  41. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  42. * SUCH DAMAGE.
  43. *
  44. * @par
  45. * -- End of Copyright Notice --
  46. */
  47. /**
  48. * @defgroup IxAtmm IXP400 ATM Manager (IxAtmm) API
  49. *
  50. * @brief IXP400 ATM Manager component Public API
  51. *
  52. * @{
  53. */
  54. #ifndef IXATMM_H
  55. #define IXATMM_H
  56. /*
  57. * Put the user defined include files required
  58. */
  59. #include "IxAtmSch.h"
  60. #include "IxOsalTypes.h"
  61. /*
  62. * #defines and macros used in this file.
  63. */
  64. /**
  65. * @def IX_ATMM_RET_ALREADY_INITIALIZED
  66. *
  67. * @brief Component has already been initialized
  68. */
  69. #define IX_ATMM_RET_ALREADY_INITIALIZED 2
  70. /**
  71. * @def IX_ATMM_RET_INVALID_PORT
  72. *
  73. * @brief Specified port does not exist or is out of range */
  74. #define IX_ATMM_RET_INVALID_PORT 3
  75. /**
  76. * @def IX_ATMM_RET_INVALID_VC_DESCRIPTOR
  77. *
  78. * @brief The VC description does not adhere to ATM standards */
  79. #define IX_ATMM_RET_INVALID_VC_DESCRIPTOR 4
  80. /**
  81. * @def IX_ATMM_RET_VC_CONFLICT
  82. *
  83. * @brief The VPI/VCI values supplied are either reserved, or they
  84. * conflict with a previously registered VC on this port */
  85. #define IX_ATMM_RET_VC_CONFLICT 5
  86. /**
  87. * @def IX_ATMM_RET_PORT_CAPACITY_IS_FULL
  88. *
  89. * @brief The virtual connection cannot be established on the port
  90. * because the remaining port capacity is not sufficient to
  91. * support it */
  92. #define IX_ATMM_RET_PORT_CAPACITY_IS_FULL 6
  93. /**
  94. * @def IX_ATMM_RET_NO_SUCH_VC
  95. *
  96. * @brief No registered VC, as described by the supplied VCI/VPI or
  97. * VC identifier values, exists on this port */
  98. #define IX_ATMM_RET_NO_SUCH_VC 7
  99. /**
  100. * @def IX_ATMM_RET_INVALID_VC_ID
  101. *
  102. * @brief The specified VC identifier is out of range. */
  103. #define IX_ATMM_RET_INVALID_VC_ID 8
  104. /**
  105. * @def IX_ATMM_RET_INVALID_PARAM_PTR
  106. *
  107. * @brief A pointer parameter was NULL. */
  108. #define IX_ATMM_RET_INVALID_PARAM_PTR 9
  109. /**
  110. * @def IX_ATMM_UTOPIA_SPHY_ADDR
  111. *
  112. * @brief The phy address when in SPHY mode */
  113. #define IX_ATMM_UTOPIA_SPHY_ADDR 31
  114. /**
  115. * @def IX_ATMM_THREAD_PRI_HIGH
  116. *
  117. * @brief The value of high priority thread */
  118. #define IX_ATMM_THREAD_PRI_HIGH 90
  119. /*
  120. * Typedefs whose scope is limited to this file.
  121. */
  122. /** @brief Definition for use in the @ref IxAtmmVc structure.
  123. * Indicates the direction of a VC */
  124. typedef enum
  125. {
  126. IX_ATMM_VC_DIRECTION_TX=0, /**< Atmm Vc direction transmit*/
  127. IX_ATMM_VC_DIRECTION_RX, /**< Atmm Vc direction receive*/
  128. IX_ATMM_VC_DIRECTION_INVALID /**< Atmm Vc direction invalid*/
  129. } IxAtmmVcDirection;
  130. /** @brief Definition for use with @ref IxAtmmVcChangeCallback
  131. * callback. Indicates that the event type represented by the
  132. * callback for this VC. */
  133. typedef enum
  134. {
  135. IX_ATMM_VC_CHANGE_EVENT_REGISTER=0, /**< Atmm Vc event register*/
  136. IX_ATMM_VC_CHANGE_EVENT_DEREGISTER, /**< Atmm Vc event de-register*/
  137. IX_ATMM_VC_CHANGE_EVENT_INVALID /**< Atmm Vc event invalid*/
  138. } IxAtmmVcChangeEvent;
  139. /** @brief Definitions for use with @ref ixAtmmUTOPIAInit interface to
  140. * indicate that UTOPIA loopback should be enabled or disabled
  141. * on initialisation. */
  142. typedef enum
  143. {
  144. IX_ATMM_UTOPIA_LOOPBACK_DISABLED=0, /**< Atmm Utopia loopback mode disabled*/
  145. IX_ATMM_UTOPIA_LOOPBACK_ENABLED, /**< Atmm Utopia loopback mode enabled*/
  146. IX_ATMM_UTOPIA_LOOPBACK_INVALID /**< Atmm Utopia loopback mode invalid*/
  147. } IxAtmmUtopiaLoopbackMode;
  148. /** @brief This structure describes the required attributes of a
  149. * virtual connection.
  150. */
  151. typedef struct {
  152. unsigned vpi; /**< VPI value of this virtual connection */
  153. unsigned vci; /**< VCI value of this virtual connection. */
  154. IxAtmmVcDirection direction; /**< VC direction */
  155. /** Traffic descriptor of this virtual connection. This structure
  156. * is defined by the @ref IxAtmSch component. */
  157. IxAtmTrafficDescriptor trafficDesc;
  158. } IxAtmmVc;
  159. /** @brief Definitions for use with @ref ixAtmmUtopiaInit interface to
  160. * indicate that UTOPIA multi-phy/single-phy mode is used.
  161. */
  162. typedef enum
  163. {
  164. IX_ATMM_MPHY_MODE = 0, /**< Atmm phy mode mphy*/
  165. IX_ATMM_SPHY_MODE, /**< Atmm phy mode sphy*/
  166. IX_ATMM_PHY_MODE_INVALID /**< Atmm phy mode invalid*/
  167. } IxAtmmPhyMode;
  168. /** @brief Structure contains port-specific information required to
  169. * initialize IxAtmm, and specifically, the IXP400 UTOPIA
  170. * Level-2 device. */
  171. typedef struct {
  172. unsigned reserved_1:11; /**< [31:21] Should be zero */
  173. unsigned UtopiaTxPhyAddr:5; /**< [20:16] Address of the
  174. * transmit (Tx) PHY for this
  175. * port on the 5-bit UTOPIA
  176. * Level-2 address bus */
  177. unsigned reserved_2:11; /**< [15:5] Should be zero */
  178. unsigned UtopiaRxPhyAddr:5; /**< [4:0] Address of the receive
  179. * (Rx) PHY for this port on the
  180. * 5-bit UTOPIA Level-2
  181. * address bus */
  182. } IxAtmmPortCfg;
  183. /** @brief Callback type used with @ref ixAtmmVcChangeCallbackRegister interface
  184. * Defines a callback type which will be used to notify registered
  185. * users of registration/deregistration events on a particular port
  186. *
  187. * @param eventType @ref IxAtmmVcChangeEvent [in] - Event indicating
  188. * whether the VC supplied has been added or
  189. * removed
  190. *
  191. * @param port @ref IxAtmLogicalPort [in] - Specifies the port on which the event has
  192. * occurred
  193. *
  194. * @param vcChanged @ref IxAtmmVc* [in] - Pointer to a structure which gives
  195. * details of the VC which has been added
  196. * or removed on the port
  197. */
  198. typedef void (*IxAtmmVcChangeCallback) (IxAtmmVcChangeEvent eventType,
  199. IxAtmLogicalPort port,
  200. const IxAtmmVc* vcChanged);
  201. /*
  202. * Variable declarations global to this file only. Externs are followed by
  203. * static variables.
  204. */
  205. /*
  206. * Extern function prototypes
  207. */
  208. /*
  209. * Function declarations
  210. */
  211. /**
  212. * @ingroup IxAtmm
  213. *
  214. * @fn ixAtmmInit (void)
  215. *
  216. * @brief Interface to initialize the IxAtmm software component. Can
  217. * be called once only.
  218. *
  219. * Must be called before any other IxAtmm API is called.
  220. *
  221. * @param "none"
  222. *
  223. * @return @li IX_SUCCESS : IxAtmm has been successfully initialized.
  224. * Calls to other IxAtmm interfaces may now be performed.
  225. * @return @li IX_FAIL : IxAtmm has already been initialized.
  226. */
  227. PUBLIC IX_STATUS
  228. ixAtmmInit (void);
  229. /**
  230. * @ingroup IxAtmm
  231. *
  232. * @fn ixAtmmUtopiaInit (unsigned numPorts,
  233. IxAtmmPhyMode phyMode,
  234. IxAtmmPortCfg portCfgs[],
  235. IxAtmmUtopiaLoopbackMode loopbackMode)
  236. *
  237. * @brief Interface to initialize the UTOPIA Level-2 ATM coprocessor
  238. * for the specified number of physical ports. The function
  239. * must be called before the ixAtmmPortInitialize interface
  240. * can operate successfully.
  241. *
  242. * @param numPorts unsigned [in] - Indicates the total number of logical
  243. * ports that are active on the device. Up to 12 ports are
  244. * supported.
  245. *
  246. * @param phyMode @ref IxAtmmPhyMode [in] - Put the Utopia coprocessor in SPHY
  247. * or MPHY mode.
  248. *
  249. * @param portCfgs[] @ref IxAtmmPortCfg [in] - Pointer to an array of elements
  250. * detailing the UTOPIA specific port characteristics. The
  251. * length of the array must be equal to the number of ports
  252. * activated. ATM ports are referred to by the relevant
  253. * offset in this array in all subsequent IxAtmm interface
  254. * calls.
  255. *
  256. * @param loopbackMode @ref IxAtmmUtopiaLoopbackMode [in] - Value must be one of
  257. * @ref IX_ATMM_UTOPIA_LOOPBACK_ENABLED or @ref
  258. * IX_ATMM_UTOPIA_LOOPBACK_DISABLED indicating whether
  259. * loopback should be enabled on the device. Loopback can
  260. * only be supported on a single PHY, therefore the numPorts
  261. * parameter must be 1 if loopback is enabled.
  262. *
  263. * @return @li IX_SUCCESS : Indicates that the UTOPIA device has been
  264. * successfully initialized for the supplied ports.
  265. * @return @li IX_ATMM_RET_ALREADY_INITIALIZED : The UTOPIA device has
  266. * already been initialized.
  267. * @return @li IX_FAIL : The supplied parameters are invalid or have been
  268. * rejected by the UTOPIA-NPE device.
  269. *
  270. * @warning
  271. * This interface may only be called once.
  272. * Port identifiers are assumed to range from 0 to (numPorts - 1) in all
  273. * instances.
  274. * In all subsequent calls to interfaces supplied by IxAtmm, the specified
  275. * port value is expected to represent the offset in the portCfgs array
  276. * specified in this interface. i.e. The first port in this array will
  277. * subsequently be represented as port 0, the second port as port 1,
  278. * and so on.*/
  279. PUBLIC IX_STATUS
  280. ixAtmmUtopiaInit (unsigned numPorts,
  281. IxAtmmPhyMode phyMode,
  282. IxAtmmPortCfg portCfgs[],
  283. IxAtmmUtopiaLoopbackMode loopbackMode);
  284. /**
  285. * @ingroup IxAtmm
  286. *
  287. * @fn ixAtmmPortInitialize (IxAtmLogicalPort port,
  288. unsigned txPortRate,
  289. unsigned rxPortRate)
  290. *
  291. * @brief The interface is called following @ref ixAtmmUtopiaInit ()
  292. * and before calls to any other IxAtmm interface. It serves
  293. * to activate the registered ATM port with IxAtmm.
  294. *
  295. * The transmit and receive port rates are specified in bits per
  296. * second. This translates to ATM cells per second according to the
  297. * following formula: CellsPerSecond = portRate / (53*8) The
  298. * IXP400 device supports only 53 byte cells. The client shall make
  299. * sure that the off-chip physical layer device has already been
  300. * initialized.
  301. *
  302. * IxAtmm will configure IxAtmdAcc and IxAtmSch to enable scheduling
  303. * on the port.
  304. *
  305. * This interface must be called once for each active port in the
  306. * system. The first time the interface is invoked, it will configure
  307. * the mechanism by which the handling of transmit, transmit-done and
  308. * receive are driven with the IxAtmdAcc component.
  309. *
  310. * This function is reentrant.
  311. *
  312. * @note The minimum tx rate that will be accepted is 424 bit/s which equates
  313. * to 1 cell (53 bytes) per second.
  314. *
  315. * @param port @ref IxAtmLogicalPort [in] - Identifies the port which is to be
  316. * initialized.
  317. *
  318. * @param txPortRate unsigned [in] - Value specifies the
  319. * transmit port rate for this port in
  320. * bits/second. This value is used by the ATM Scheduler
  321. * component is evaluating VC access requests for the port.
  322. *
  323. * @param rxPortRate unsigned [in] - Value specifies the
  324. * receive port rate for this port in bits/second.
  325. *
  326. * @return @li IX_SUCCESS : The specificed ATM port has been successfully
  327. * initialized. IxAtmm is ready to accept VC registrations on
  328. * this port.
  329. *
  330. * @return @li IX_ATMM_RET_ALREADY_INITIALIZED : ixAtmmPortInitialize has
  331. * already been called successfully on this port. The current
  332. * call is rejected.
  333. *
  334. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  335. * input is not valid. The request is rejected.
  336. *
  337. * @return @li IX_FAIL : IxAtmm could not initialize the port because the
  338. * inputs are not understood.
  339. *
  340. * @sa ixAtmmPortEnable, ixAtmmPortDisable
  341. *
  342. */
  343. PUBLIC IX_STATUS
  344. ixAtmmPortInitialize (IxAtmLogicalPort port,
  345. unsigned txPortRate,
  346. unsigned rxPortRate);
  347. /**
  348. * @ingroup IxAtmm
  349. *
  350. * @fn ixAtmmPortModify (IxAtmLogicalPort port,
  351. unsigned txPortRate,
  352. unsigned rxPortRate)
  353. *
  354. * @brief A client may call this interface to change the existing
  355. * port rate (expressed in bits/second) on an established ATM
  356. * port.
  357. *
  358. * @param port @ref IxAtmLogicalPort [in] - Identifies the port which is to be
  359. * initialized.
  360. *
  361. * @param txPortRate unsigned [in] - Value specifies the``
  362. * transmit port rate for this port in
  363. * bits/second. This value is used by the ATM Scheduler
  364. * component is evaluating VC access requests for the port.
  365. *
  366. * @param rxPortRate unsigned [in] - Value specifies the
  367. * receive port rate for this port in
  368. * bits/second.
  369. *
  370. * @return @li IX_SUCCESS : The indicated ATM port rates have been
  371. * successfully modified.
  372. *
  373. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  374. * input is not valid. The request is rejected.
  375. *
  376. * @return @li IX_FAIL : IxAtmm could not update the port because the
  377. * inputs are not understood, or the interface was called before
  378. * the port was initialized. */
  379. PUBLIC IX_STATUS
  380. ixAtmmPortModify (IxAtmLogicalPort port,
  381. unsigned txPortRate,
  382. unsigned rxPortRate);
  383. /**
  384. * @ingroup IxAtmm
  385. *
  386. * @fn ixAtmmPortQuery (IxAtmLogicalPort port,
  387. unsigned *txPortRate,
  388. unsigned *rxPortRate);
  389. *
  390. * @brief The client may call this interface to request details on
  391. * currently registered transmit and receive rates for an ATM
  392. * port.
  393. *
  394. * @param port @ref IxAtmLogicalPort [in] - Value identifies the port from which the
  395. * rate details are requested.
  396. *
  397. * @param *txPortRate unsigned [out] - Pointer to a value
  398. * which will be filled with the value of the transmit port
  399. * rate specified in bits/second.
  400. *
  401. * @param *rxPortRate unsigned [out] - Pointer to a value
  402. * which will be filled with the value of the receive port
  403. * rate specified in bits/second.
  404. *
  405. * @return @li IX_SUCCESS : The information requested on the specified
  406. * port has been successfully supplied in the output.
  407. *
  408. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  409. * input is not valid. The request is rejected.
  410. *
  411. * @return @li IX_ATMM_RET_INVALID_PARAM_PTR : A pointer parameter was
  412. * NULL.
  413. *
  414. * @return @li IX_FAIL : IxAtmm could not update the port because the
  415. * inputs are not understood, or the interface was called before
  416. * the port was initialized. */
  417. PUBLIC IX_STATUS
  418. ixAtmmPortQuery (IxAtmLogicalPort port,
  419. unsigned *txPortRate,
  420. unsigned *rxPortRate);
  421. /**
  422. * @ingroup IxAtmm
  423. *
  424. * @fn ixAtmmPortEnable(IxAtmLogicalPort port)
  425. *
  426. * @brief The client call this interface to enable transmit for an ATM
  427. * port. At initialisation, all the ports are disabled.
  428. *
  429. * @param port @ref IxAtmLogicalPort [in] - Value identifies the port
  430. *
  431. * @return @li IX_SUCCESS : Transmission over this port is started.
  432. *
  433. * @return @li IX_FAIL : The port parameter is not valid, or the
  434. * port is already enabled
  435. *
  436. * @note - When a port is disabled, Rx and Tx VC Connect requests will fail
  437. *
  438. * @note - This function uses system resources and should not be used
  439. * inside an interrupt context.
  440. *
  441. * @sa ixAtmmPortDisable */
  442. PUBLIC IX_STATUS
  443. ixAtmmPortEnable(IxAtmLogicalPort port);
  444. /**
  445. * @ingroup IxAtmm
  446. *
  447. * @fn ixAtmmPortDisable(IxAtmLogicalPort port)
  448. *
  449. * @brief The client call this interface to disable transmit for an ATM
  450. * port. At initialisation, all the ports are disabled.
  451. *
  452. * @param port @ref IxAtmLogicalPort [in] - Value identifies the port
  453. *
  454. * @return @li IX_SUCCESS : Transmission over this port is stopped.
  455. *
  456. * @return @li IX_FAIL : The port parameter is not valid, or the
  457. * port is already disabled
  458. *
  459. * @note - When a port is disabled, Rx and Tx VC Connect requests will fail
  460. *
  461. * @note - This function call does not stop RX traffic. It is supposed
  462. * that this function is invoked when a serious problem
  463. * is detected (e.g. physical layer broken). Then, the RX traffic
  464. * is not passing.
  465. *
  466. * @note - This function is blocking until the hw acknowledge that the
  467. * transmission is stopped.
  468. *
  469. * @note - This function uses system resources and should not be used
  470. * inside an interrupt context.
  471. *
  472. * @sa ixAtmmPortEnable */
  473. PUBLIC IX_STATUS
  474. ixAtmmPortDisable(IxAtmLogicalPort port);
  475. /**
  476. * @ingroup IxAtmm
  477. *
  478. * @fn ixAtmmVcRegister (IxAtmLogicalPort port,
  479. IxAtmmVc *vcToAdd,
  480. IxAtmSchedulerVcId *vcId)
  481. *
  482. * @brief This interface is used to register an ATM Virtual
  483. * Connection on the specified ATM port.
  484. *
  485. * Each call to this interface registers a unidirectional virtual
  486. * connection with the parameters specified. If a bi-directional VC
  487. * is needed, the function should be called twice (once for each
  488. * direction, Tx & Rx) where the VPI and VCI and port parameters in
  489. * each call are identical.
  490. *
  491. * With the addition of each new VC to a port, a series of
  492. * callback functions are invoked by the IxAtmm component to notify
  493. * possible external components of the change. The callback functions
  494. * are registered using the @ref ixAtmmVcChangeCallbackRegister interface.
  495. *
  496. * The IxAtmSch component is notified of the registration of transmit
  497. * VCs.
  498. *
  499. * @param port @ref IxAtmLogicalPort [in] - Identifies port on which the specified VC is
  500. * to be registered.
  501. *
  502. * @param *vcToAdd @ref IxAtmmVc [in] - Pointer to an @ref IxAtmmVc structure
  503. * containing a description of the VC to be registered. The
  504. * client shall fill the vpi, vci and direction and relevant
  505. * trafficDesc members of this structure before calling this
  506. * function.
  507. *
  508. * @param *vcId @ref IxAtmSchedulerVcId [out] - Pointer to an integer value which is filled
  509. * with the per-port unique identifier value for this VC.
  510. * This identifier will be required when a request is
  511. * made to deregister or change this VC. VC identifiers
  512. * for transmit VCs will have a value between 0-43,
  513. * i.e. 32 data Tx VCs + 12 OAM Tx Port VCs.
  514. * Receive VCs will have a value between 44-66,
  515. * i.e. 32 data Rx VCs + 1 OAM Rx VC.
  516. *
  517. * @return @li IX_SUCCESS : The VC has been successfully registered on
  518. * this port. The VC is ready for a client to configure IxAtmdAcc
  519. * for receive and transmit operations on the VC.
  520. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  521. * input is not valid or has not been initialized. The request
  522. * is rejected.
  523. * @return @li IX_ATMM_RET_INVALID_VC_DESCRIPTOR : The descriptor
  524. * pointed to by vcToAdd is invalid. The registration request
  525. * is rejected.
  526. * @return @li IX_ATMM_RET_VC_CONFLICT : The VC requested conflicts with
  527. * reserved VPI and/or VCI values or with another VC already activated
  528. * on this port.
  529. * @return @li IX_ATMM_RET_PORT_CAPACITY_IS_FULL : The VC cannot be
  530. * registered in the port becuase the port capacity is
  531. * insufficient to support the requested ATM traffic contract.
  532. * The registration request is rejected.
  533. * @return @li IX_ATMM_RET_INVALID_PARAM_PTR : A pointer parameter was
  534. * NULL.
  535. *
  536. * @warning IxAtmm has no capability of signaling or negotiating a virtual
  537. * connection. Negotiation of the admission of the VC to the network
  538. * is beyond the scope of this function. This is assumed to be
  539. * performed by the calling client, if appropriate,
  540. * before or after this function is called.
  541. */
  542. PUBLIC IX_STATUS
  543. ixAtmmVcRegister (IxAtmLogicalPort port,
  544. IxAtmmVc *vcToAdd,
  545. IxAtmSchedulerVcId *vcId);
  546. /**
  547. * @ingroup IxAtmm
  548. *
  549. * @fn ixAtmmVcDeregister (IxAtmLogicalPort port, IxAtmSchedulerVcId vcId)
  550. *
  551. * @brief Function called by a client to deregister a VC from the
  552. * system.
  553. *
  554. * With the removal of each new VC from a port, a series of
  555. * registered callback functions are invoked by the IxAtmm component
  556. * to notify possible external components of the change. The callback
  557. * functions are registered using the @ref ixAtmmVcChangeCallbackRegister.
  558. *
  559. * The IxAtmSch component is notified of the removal of transmit VCs.
  560. *
  561. * @param port @ref IxAtmLogicalPort [in] - Identifies port on which the VC to be
  562. * removed is currently registered.
  563. *
  564. * @param vcId @ref IxAtmSchedulerVcId [in] - VC identifier value of the VC to
  565. * be deregistered. This value was supplied to the client when
  566. the VC was originally registered. This value can also be
  567. queried from the IxAtmm component through the @ref ixAtmmVcQuery
  568. * interface.
  569. *
  570. * @return @li IX_SUCCESS : The specified VC has been successfully
  571. * removed from this port.
  572. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  573. * input is not valid or has not been initialized. The request
  574. * is rejected.
  575. * @return @li IX_FAIL : There is no registered VC associated with the
  576. * supplied identifier registered on this port. */
  577. PUBLIC IX_STATUS
  578. ixAtmmVcDeregister (IxAtmLogicalPort port, IxAtmSchedulerVcId vcId);
  579. /**
  580. * @ingroup IxAtmm
  581. *
  582. * @fn ixAtmmVcQuery (IxAtmLogicalPort port,
  583. unsigned vpi,
  584. unsigned vci,
  585. IxAtmmVcDirection direction,
  586. IxAtmSchedulerVcId *vcId,
  587. IxAtmmVc *vcDesc)
  588. *
  589. * @brief This interface supplies information about an active VC on a
  590. * particular port when supplied with the VPI, VCI and
  591. * direction of that VC.
  592. *
  593. * @param port @ref IxAtmLogicalPort [in] - Identifies port on which the VC to be
  594. * queried is currently registered.
  595. *
  596. * @param vpi unsigned [in] - ATM VPI value of the requested VC.
  597. *
  598. * @param vci unsigned [in] - ATM VCI value of the requested VC.
  599. *
  600. * @param direction @ref IxAtmmVcDirection [in] - One of @ref
  601. * IX_ATMM_VC_DIRECTION_TX or @ref IX_ATMM_VC_DIRECTION_RX
  602. * indicating the direction (Tx or Rx) of the requested VC.
  603. *
  604. * @param *vcId @ref IxAtmSchedulerVcId [out] - Pointer to an integer value which will be
  605. * filled with the VC identifier value for the requested
  606. * VC (as returned by @ref ixAtmmVcRegister), if it
  607. * exists on this port.
  608. *
  609. * @param *vcDesc @ref IxAtmmVc [out] - Pointer to an @ref IxAtmmVc structure
  610. * which will be filled with the specific details of the
  611. * requested VC, if it exists on this port.
  612. *
  613. * @return @li IX_SUCCESS : The specified VC has been found on this port
  614. * and the requested details have been returned.
  615. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  616. * input is not valid or has not been initialized. The request
  617. * is rejected.
  618. * @return @li IX_ATMM_RET_NO_SUCH_VC : No VC exists on the specified
  619. * port which matches the search criteria (VPI, VCI, direction)
  620. * given. No data is returned.
  621. * @return @li IX_ATMM_RET_INVALID_PARAM_PTR : A pointer parameter was
  622. * NULL.
  623. *
  624. */
  625. PUBLIC IX_STATUS
  626. ixAtmmVcQuery (IxAtmLogicalPort port,
  627. unsigned vpi,
  628. unsigned vci,
  629. IxAtmmVcDirection direction,
  630. IxAtmSchedulerVcId *vcId,
  631. IxAtmmVc *vcDesc);
  632. /**
  633. * @ingroup IxAtmm
  634. *
  635. * @fn ixAtmmVcIdQuery (IxAtmLogicalPort port, IxAtmSchedulerVcId vcId, IxAtmmVc *vcDesc)
  636. *
  637. * @brief This interface supplies information about an active VC on a
  638. * particular port when supplied with a vcId for that VC.
  639. *
  640. * @param port @ref IxAtmLogicalPort [in] - Identifies port on which the VC to be
  641. * queried is currently registered.
  642. *
  643. * @param vcId @ref IxAtmSchedulerVcId [in] - Value returned by @ref ixAtmmVcRegister which
  644. * uniquely identifies the requested VC on this port.
  645. *
  646. * @param *vcDesc @ref IxAtmmVc [out] - Pointer to an @ref IxAtmmVc structure
  647. * which will be filled with the specific details of the
  648. * requested VC, if it exists on this port.
  649. *
  650. * @return @li IX_SUCCESS : The specified VC has been found on this port
  651. * and the requested details have been returned.
  652. * @return @li IX_ATMM_RET_INVALID_PORT : The port value indicated in the
  653. * input is not valid or has not been initialized. The request
  654. * is rejected.
  655. * @return @li IX_ATMM_RET_NO_SUCH_VC : No VC exists on the specified
  656. * port which matches the supplied identifier. No data is
  657. * returned.
  658. * @return @li IX_ATMM_RET_INVALID_PARAM_PTR : A pointer parameter was
  659. * NULL.
  660. */
  661. PUBLIC IX_STATUS
  662. ixAtmmVcIdQuery (IxAtmLogicalPort port, IxAtmSchedulerVcId vcId, IxAtmmVc *vcDesc);
  663. /**
  664. * @ingroup IxAtmm
  665. *
  666. * @fn ixAtmmVcChangeCallbackRegister (IxAtmmVcChangeCallback callback)
  667. *
  668. * @brief This interface is invoked to supply a function to IxAtmm
  669. * which will be called to notify the client if a new VC is
  670. * registered with IxAtmm or an existing VC is removed.
  671. *
  672. * The callback, when invoked, will run within the context of the call
  673. * to @ref ixAtmmVcRegister or @ref ixAtmmVcDeregister which caused
  674. * the change of state.
  675. *
  676. * A maximum of 32 calbacks may be registered in with IxAtmm.
  677. *
  678. * @param callback @ref IxAtmmVcChangeCallback [in] - Callback which complies
  679. * with the @ref IxAtmmVcChangeCallback definition. This
  680. * function will be invoked by IxAtmm with the appropiate
  681. * parameters for the relevant VC when any VC has been
  682. * registered or deregistered with IxAtmm.
  683. *
  684. * @return @li IX_SUCCESS : The specified callback has been registered
  685. * successfully with IxAtmm and will be invoked when appropriate.
  686. * @return @li IX_FAIL : Either the supplied callback is invalid, or
  687. * IxAtmm has already registered 32 and connot accommodate
  688. * any further registrations of this type. The request is
  689. * rejected.
  690. *
  691. * @warning The client must not call either the @ref
  692. * ixAtmmVcRegister or @ref ixAtmmVcDeregister interfaces
  693. * from within the supplied callback function. */
  694. PUBLIC IX_STATUS ixAtmmVcChangeCallbackRegister (IxAtmmVcChangeCallback callback);
  695. /**
  696. * @ingroup IxAtmm
  697. *
  698. * @fn ixAtmmVcChangeCallbackDeregister (IxAtmmVcChangeCallback callback)
  699. *
  700. * @brief This interface is invoked to deregister a previously supplied
  701. * callback function.
  702. *
  703. * @param callback @ref IxAtmmVcChangeCallback [in] - Callback which complies
  704. * with the @ref IxAtmmVcChangeCallback definition. This
  705. * function will removed from the table of callbacks.
  706. *
  707. * @return @li IX_SUCCESS : The specified callback has been deregistered
  708. * successfully from IxAtmm.
  709. * @return @li IX_FAIL : Either the supplied callback is invalid, or
  710. * is not currently registered with IxAtmm.
  711. */
  712. PUBLIC IX_STATUS
  713. ixAtmmVcChangeCallbackDeregister (IxAtmmVcChangeCallback callback);
  714. /**
  715. * @ingroup IxAtmm
  716. *
  717. * @fn ixAtmmUtopiaStatusShow (void)
  718. *
  719. * @brief Display utopia status counters
  720. *
  721. * @param "none"
  722. *
  723. * @return @li IX_SUCCESS : Show function was successful
  724. * @return @li IX_FAIL : Internal failure
  725. */
  726. PUBLIC IX_STATUS
  727. ixAtmmUtopiaStatusShow (void);
  728. /**
  729. * @ingroup IxAtmm
  730. *
  731. * @fn ixAtmmUtopiaCfgShow (void)
  732. *
  733. * @brief Display utopia information(config registers and status registers)
  734. *
  735. * @param "none"
  736. *
  737. * @return @li IX_SUCCESS : Show function was successful
  738. * @return @li IX_FAIL : Internal failure
  739. */
  740. PUBLIC IX_STATUS
  741. ixAtmmUtopiaCfgShow (void);
  742. #endif
  743. /* IXATMM_H */
  744. /** @} */