1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45#ifndef IxEthDB_p_H
46#define IxEthDB_p_H
47
48#include <IxTypes.h>
49#include <IxOsal.h>
50#include <IxEthDB.h>
51#include <IxNpeMh.h>
52#include <IxEthDBPortDefs.h>
53
54#include "IxEthDBMessages_p.h"
55#include "IxEthDBLog_p.h"
56
57#if (CPU==SIMSPARCSOLARIS)
58
59
60#define TEST_FIXTURE_LOCK_EVENT_QUEUE { ixOsalMutexLock(&eventQueueLock, IX_OSAL_WAIT_FOREVER); }
61#define TEST_FIXTURE_UNLOCK_EVENT_QUEUE { ixOsalMutexUnlock(&eventQueueLock); }
62
63#else
64
65#define TEST_FIXTURE_LOCK_EVENT_QUEUE
66#define TEST_FIXTURE_UNLOCK_EVENT_QUEUE
67
68#endif
69
70#ifndef IX_UNIT_TEST
71
72#define TEST_FIXTURE_INCREMENT_DB_CORE_ACCESS_COUNTER
73#define TEST_FIXTURE_MARK_OVERFLOW_EVENT
74
75#else
76
77extern int dbAccessCounter;
78extern int overflowEvent;
79
80#define TEST_FIXTURE_INCREMENT_DB_CORE_ACCESS_COUNTER { dbAccessCounter++; }
81#define TEST_FIXTURE_MARK_OVERFLOW_EVENT { overflowEvent = 1; }
82
83#endif
84
85
86#define __mempool__
87#define __lock__
88#define __smartpointer__
89#define __alignment__
90
91
92#define IX_ETH_DB_NPE_TIMEOUT (100)
93
94
95
96
97
98
99#define NUM_BUCKETS (8192)
100
101
102
103
104
105#define IX_ETHDB_CACHE_LINE_AHEAD (2)
106
107#define IX_ETHDB_BUCKETPTR_AHEAD ((IX_ETHDB_CACHE_LINE_AHEAD * IX_OSAL_CACHE_LINE_SIZE)/sizeof(void *))
108
109#define IX_ETHDB_BUCKET_INDEX_MASK (((IX_OSAL_CACHE_LINE_SIZE)/sizeof(void *)) - 1)
110
111
112#define MAX_LOCKS (20)
113
114
115#define INITIAL_ELT_SIZE (8)
116#define MAX_ELT_SIZE (512)
117#define MAX_GW_SIZE (32)
118#define MAX_FW_SIZE (32)
119#define ELT_ENTRY_SIZE (8)
120#define ELT_ROOT_OFFSET (ELT_ENTRY_SIZE)
121#define FULL_ELT_BYTE_SIZE (MAX_ELT_SIZE * ELT_ENTRY_SIZE)
122#define FULL_GW_BYTE_SIZE (MAX_GW_SIZE * ELT_ENTRY_SIZE)
123#define FULL_FW_BYTE_SIZE (MAX_FW_SIZE * ELT_ENTRY_SIZE)
124
125
126
127
128
129#define FULL_VLAN_BYTE_SIZE (4096 / 8 * 2)
130
131
132#define VLAN_SET_OFFSET(vlanID) ((vlanID) >> 3)
133#define VLAN_SET_MASK(vlanID) (0x7 - ((vlanID) & 0x7))
134
135
136#define NPE_TREE_MEM_SIZE (4096)
137
138
139#if NPE_TREE_MEM_SIZE != 4096
140 #error NPE_TREE_MEM_SIZE is not defined to 4096 bytes!
141#endif
142
143
144#define IX_ETHDB_MAX_FRAME_SIZE 65535
145#define IX_ETHDB_MIN_FRAME_SIZE 1
146#define IX_ETHDB_MAX_NPE_FRAME_SIZE 16320
147#define IX_ETHDB_MIN_NPE_FRAME_SIZE 1
148#define IX_ETHDB_DEFAULT_FRAME_SIZE 1522
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167#define NODE_POOL_SIZE (2000)
168#define MAC_POOL_SIZE (4000)
169#define TREE_POOL_SIZE (4000)
170
171
172#define BUSY_RETRY_ENABLED (TRUE)
173#define FOREVER_RETRY (TRUE)
174#define MAX_RETRIES (400)
175#define BUSY_RETRY_YIELD (5)
176
177
178#define EVENT_QUEUE_SIZE (500)
179#define EVENT_PROCESSING_LIMIT (100)
180
181
182#define STATIC_ENTRY (TRUE)
183#define DYNAMIC_ENTRY (FALSE)
184
185
186#define AGE_RESET (0xFFFFFFFF)
187
188
189#define EMPTY_DEPENDENCY_MAP (0)
190
191
192#define RIGHT (1)
193#define LEFT (-1)
194
195
196#define IX_ETH_DB_CHECK_PORT_EXISTS(portID) \
197{ \
198 if ((portID) >= IX_ETH_DB_NUMBER_OF_PORTS) \
199 { \
200 return IX_ETH_DB_INVALID_PORT; \
201 } \
202}
203
204#define IX_ETH_DB_CHECK_PORT_INITIALIZED(portID) \
205{ \
206 if ((portID) >= IX_ETH_DB_NUMBER_OF_PORTS) \
207 { \
208 return IX_ETH_DB_INVALID_PORT; \
209 } \
210 else \
211 { \
212 if (!ixEthDBPortInfo[portID].initialized) \
213 { \
214 return IX_ETH_DB_PORT_UNINITIALIZED; \
215 } \
216 } \
217}
218
219
220#define IX_ETH_DB_CHECK_SINGLE_NPE(portID) \
221 if (ixEthDBSingleEthNpeCheck(portID) != IX_ETH_DB_SUCCESS) \
222 { \
223 WARNING_LOG("EthDB: port ID %d is unavailable\n",(UINT32) portID); \
224 \
225 return IX_ETH_DB_INVALID_PORT; \
226 }
227
228
229#define IX_ETH_DB_CHECK_FEATURE(portID, feature) \
230 if ((ixEthDBPortInfo[portID].featureStatus & feature) == 0) \
231 { \
232 return IX_ETH_DB_FEATURE_UNAVAILABLE; \
233 }
234
235
236#define BUSY_RETRY(functionCall) \
237 { \
238 UINT32 retries = 0; \
239 IxEthDBStatus br_result; \
240 \
241 while ((br_result = functionCall) == IX_ETH_DB_BUSY \
242 && BUSY_RETRY_ENABLED && (FOREVER_RETRY || ++retries < MAX_RETRIES)) { ixOsalSleep(BUSY_RETRY_YIELD); }; \
243 \
244 if ((!FOREVER_RETRY && retries == MAX_RETRIES) || (br_result == IX_ETH_DB_FAIL)) \
245 {\
246 ERROR_LOG("Ethernet Learning Database Error: BUSY_RETRY failed at %s:%d\n", __FILE__, __LINE__); \
247 }\
248 }
249
250#define BUSY_RETRY_WITH_RESULT(functionCall, brwr_result) \
251 { \
252 UINT32 retries = 0; \
253 \
254 while ((brwr_result = functionCall) == IX_ETH_DB_BUSY \
255 && BUSY_RETRY_ENABLED && (FOREVER_RETRY || ++retries < MAX_RETRIES)) { ixOsalSleep(BUSY_RETRY_YIELD); }; \
256 \
257 if ((!FOREVER_RETRY && retries == MAX_RETRIES) || (brwr_result == IX_ETH_DB_FAIL)) \
258 {\
259 ERROR_LOG("Ethernet Learning Database Error: BUSY_RETRY_WITH_RESULT failed at %s:%d\n", __FILE__, __LINE__); \
260 }\
261 }
262
263
264#define IS_ITERATOR_VALID(iteratorPtr) ((iteratorPtr)->node != NULL)
265
266
267
268
269
270
271#define SET_EMPTY_DEPENDENCY_MAP(map) { int i = 0; for (; i < 32 ; i++) map[i] = 0; }
272
273#define IS_EMPTY_DEPENDENCY_MAP(result, map) { int i = 0 ; result = TRUE; for (; i < 32 ; i++) if (map[i] != 0) { result = FALSE; break; }}
274
275
276
277
278#define SET_DEPENDENCY_MAP(map, portID) {SET_EMPTY_DEPENDENCY_MAP(map); map[portID >> 3] = 1 << (portID & 0x7);}
279
280
281
282
283#define JOIN_MAPS(map, map1, map2) { int i = 0; for (; i < 32 ; i++) map[i] = map1[i] | map2[i]; }
284
285
286
287
288#define JOIN_PORT_TO_MAP(map, portID) { map[portID >> 3] |= 1 << (portID & 0x7); }
289
290
291
292
293#define EXCLUDE_PORT_FROM_MAP(map, portID) { map[portID >> 3] &= ~(1 << (portID & 0x7); }
294
295
296
297
298#define IS_MAP_SUBSET(result, map1, map2) { int i = 0; result = TRUE; for (; i < 32 ; i++) if ((map1[i] | map2[i]) != map2[i]) result = FALSE; }
299
300
301
302
303#define IS_PORT_INCLUDED(portID, map) ((map[portID >> 3] & (1 << (portID & 0x7))) != 0)
304
305
306
307
308#define DIFF_MAPS(map, map1, map2) { int i = 0; for (; i < 32 ; i++) map[i] = map1[i] ^ (map1[i] & map2[i]); }
309
310
311
312
313#define MAPS_COLLIDE(result, map1, map2) { int i = 0; result = FALSE; for (; i < 32 ; i++) if ((map1[i] & map2[i]) != 0) result = TRUE; }
314
315
316#define GET_MAP_SIZE(map, size) { int i = 0, b = 0; size = 0; for (; i < 32 ; i++) { char y = map[i]; for (; b < 8 && (y >>= 1); b++) size += (y & 1); }}
317
318
319#define COPY_DEPENDENCY_MAP(map1, map2) { memcpy (map1, map2, sizeof (map1)); }
320
321
322#define MAX_PORT_SIZE (0xFF)
323#define MAX_PORT_NUMBER (0xFF)
324
325#define IX_ETH_DB_CHECK_REFERENCE(ptr) { if ((ptr) == NULL) { return IX_ETH_DB_INVALID_ARG; } }
326#define IX_ETH_DB_CHECK_MAP(portID, map) { if (!IS_PORT_INCLUDED(portID, map)) { return IX_ETH_DB_INVALID_ARG; } }
327
328
329#define EVENT_QUEUE_WRAP(offset) ((offset) >= EVENT_QUEUE_SIZE ? (offset) - EVENT_QUEUE_SIZE : (offset))
330
331#define CAN_ENQUEUE(eventQueuePtr) ((eventQueuePtr)->length < EVENT_QUEUE_SIZE)
332
333#define QUEUE_HEAD(eventQueuePtr) (&(eventQueuePtr)->queue[EVENT_QUEUE_WRAP((eventQueuePtr)->base + (eventQueuePtr)->length)])
334
335#define QUEUE_TAIL(eventQueuePtr) (&(eventQueuePtr)->queue[(eventQueuePtr)->base])
336
337#define PUSH_UPDATE_QUEUE(eventQueuePtr) { (eventQueuePtr)->length++; }
338
339#define SHIFT_UPDATE_QUEUE(eventQueuePtr) \
340 { \
341 (eventQueuePtr)->base = EVENT_QUEUE_WRAP((eventQueuePtr)->base + 1); \
342 (eventQueuePtr)->length--; \
343 }
344
345#define RESET_QUEUE(eventQueuePtr) \
346 { \
347 (eventQueuePtr)->base = 0; \
348 (eventQueuePtr)->length = 0; \
349 }
350
351
352#define NODE_STACK_INIT(stack) { (stack)->nodeCount = 0; }
353#define NODE_STACK_PUSH(stack, node, offset) { (stack)->nodes[(stack)->nodeCount] = (node); (stack)->offsets[(stack)->nodeCount++] = (offset); }
354#define NODE_STACK_POP(stack, node, offset) { (node) = (stack)->nodes[--(stack)->nodeCount]; offset = (stack)->offsets[(stack)->nodeCount]; }
355#define NODE_STACK_NONEMPTY(stack) ((stack)->nodeCount != 0)
356
357#ifndef IX_NDEBUG
358#define IX_ETH_DB_NPE_MSG_HISTORY_DEPTH (100)
359#define LOG_NPE_MSG(msg) \
360 do { \
361 UINT32 npeMsgHistoryIndex = (npeMsgHistoryLen++) % IX_ETH_DB_NPE_MSG_HISTORY_DEPTH; \
362 npeMsgHistory[npeMsgHistoryIndex][0] = msg.data[0]; \
363 npeMsgHistory[npeMsgHistoryIndex][1] = msg.data[1]; \
364 } while (0);
365#else
366#define LOG_NPE_MSG()
367#endif
368
369
370
371
372
373typedef UINT32 (*HashFunction)(void *entity);
374typedef BOOL (*MatchFunction)(void *reference, void *entry);
375typedef void (*FreeFunction)(void *entry);
376
377
378
379
380typedef struct HashNode_t
381{
382 void *data;
383 struct HashNode_t *next;
384
385 __mempool__ struct HashNode_t *nextFree;
386
387 __lock__ IxOsalFastMutex lock;
388} HashNode;
389
390
391
392
393
394
395
396typedef struct
397{
398 UINT32 bucketIndex;
399 HashNode *previousNode;
400 HashNode *node;
401} HashIterator;
402
403
404
405
406
407typedef enum
408{
409 IX_ETH_DB_WIFI_AP_TO_STA = 0x0,
410 IX_ETH_DB_WIFI_AP_TO_AP = 0x1
411} IxEthDBWiFiRecordType;
412
413typedef union
414{
415 struct
416 {
417 UINT32 age;
418 BOOL staticEntry;
419 } filteringData;
420
421 struct
422 {
423 UINT32 age;
424 BOOL staticEntry;
425 UINT32 ieee802_1qTag;
426 } filteringVlanData;
427
428 struct
429 {
430 IxEthDBWiFiRecordType type;
431 UINT32 gwAddressIndex;
432 UINT8 gwMacAddress[IX_IEEE803_MAC_ADDRESS_SIZE];
433
434 __alignment__ UINT8 reserved2[2];
435 } wifiData;
436} IxEthDBRecordData;
437
438typedef struct MacDescriptor_t
439{
440 UINT8 macAddress[IX_IEEE803_MAC_ADDRESS_SIZE];
441
442 __alignment__ UINT8 reserved1[2];
443
444 UINT32 portID;
445 IxEthDBRecordType type;
446 IxEthDBRecordData recordData;
447
448
449 void *internal;
450
451
452 void *user;
453
454 __mempool__ struct MacDescriptor_t *nextFree;
455 __smartpointer__ UINT32 refCount;
456} MacDescriptor;
457
458
459
460
461typedef struct
462{
463 HashNode *hashBuckets[NUM_BUCKETS];
464 UINT32 numBuckets;
465
466 __lock__ IxOsalFastMutex bucketLocks[NUM_BUCKETS];
467
468 HashFunction entryHashFunction;
469 MatchFunction *matchFunctions;
470 FreeFunction freeFunction;
471} HashTable;
472
473typedef enum
474{
475 IX_ETH_DB_MAC_KEY = 1,
476 IX_ETH_DB_MAC_PORT_KEY = 2,
477 IX_ETH_DB_MAC_VLAN_KEY = 3,
478 IX_ETH_DB_MAX_KEY_INDEX = 3
479} IxEthDBSearchKeyType;
480
481typedef struct MacTreeNode_t
482{
483 __smartpointer__ MacDescriptor *descriptor;
484 struct MacTreeNode_t *left, *right;
485
486 __mempool__ struct MacTreeNode_t *nextFree;
487} MacTreeNode;
488
489typedef IxEthDBStatus (*IxEthDBPortUpdateHandler)(IxEthDBPortId portID, IxEthDBRecordType type);
490
491typedef void (*IxEthDBNoteWriteFn)(void *address, MacTreeNode *node);
492
493typedef struct
494{
495 BOOL updateEnabled;
496 BOOL userControlled;
497 BOOL treeInitialized;
498 IxEthDBPortUpdateHandler updateHandler;
499 void *npeUpdateZone;
500 void *npeGwUpdateZone;
501 void *vlanUpdateZone;
502 MacTreeNode *searchTree;
503 BOOL searchTreePendingWrite;
504} PortUpdateMethod;
505
506typedef struct
507{
508 IxEthDBPortId portID;
509 BOOL enabled;
510 BOOL agingEnabled;
511 BOOL initialized;
512 IxEthDBPortMap dependencyPortMap;
513 PortUpdateMethod updateMethod;
514 BOOL macAddressUploaded;
515 UINT32 maxRxFrameSize;
516 UINT32 maxTxFrameSize;
517
518 UINT8 bbsid[6];
519 __alignment__ UINT8 reserved[2];
520 UINT32 frameControlDurationID;
521
522 IxEthDBVlanTag vlanTag;
523 IxEthDBPriorityTable priorityTable;
524 IxEthDBVlanSet vlanMembership;
525 IxEthDBVlanSet transmitTaggingInfo;
526 IxEthDBFrameFilter frameFilter;
527 IxEthDBTaggingAction taggingAction;
528
529 UINT32 npeFrameFilter;
530 UINT32 npeTaggingAction;
531
532 IxEthDBFirewallMode firewallMode;
533 BOOL srcAddressFilterEnabled;
534
535 BOOL stpBlocked;
536
537 IxEthDBFeature featureCapability;
538 IxEthDBFeature featureStatus;
539
540 UINT32 ixEthDBTrafficClassAQMAssignments[IX_IEEE802_1Q_QOS_PRIORITY_COUNT];
541
542 UINT32 ixEthDBTrafficClassCount;
543
544 UINT32 ixEthDBTrafficClassAvailable;
545
546
547
548 __lock__ IxOsalMutex npeAckLock;
549} PortInfo;
550
551
552extern IX_ETH_DB_PUBLIC PortInfo ixEthDBPortInfo[IX_ETH_DB_NUMBER_OF_PORTS];
553
554typedef enum
555{
556 IX_ETH_DB_ADD_FILTERING_RECORD = 0xFF0001,
557 IX_ETH_DB_REMOVE_FILTERING_RECORD = 0xFF0002
558} PortEventType;
559
560typedef struct
561{
562 UINT32 eventType;
563 IxEthDBPortId portID;
564 IxEthDBMacAddr macAddr;
565 BOOL staticEntry;
566} PortEvent;
567
568typedef struct
569{
570 PortEvent queue[EVENT_QUEUE_SIZE];
571 UINT32 base;
572 UINT32 length;
573} PortEventQueue;
574
575typedef struct
576{
577 IxEthDBPortId portID;
578 MacDescriptor *macDescriptors[MAX_ELT_SIZE];
579 UINT32 addressCount;
580} TreeSyncInfo;
581
582typedef struct
583{
584 MacTreeNode *nodes[MAX_ELT_SIZE];
585 UINT32 offsets[MAX_ELT_SIZE];
586 UINT32 nodeCount;
587} MacTreeNodeStack;
588
589
590
591
592
593IX_ETH_DB_PUBLIC void ixEthDBInitMemoryPools(void);
594
595IX_ETH_DB_PUBLIC HashNode* ixEthDBAllocHashNode(void);
596IX_ETH_DB_PUBLIC void ixEthDBFreeHashNode(HashNode *);
597
598IX_ETH_DB_PUBLIC __smartpointer__ MacDescriptor* ixEthDBAllocMacDescriptor(void);
599IX_ETH_DB_PUBLIC __smartpointer__ MacDescriptor* ixEthDBCloneMacDescriptor(MacDescriptor *macDescriptor);
600IX_ETH_DB_PUBLIC __smartpointer__ void ixEthDBFreeMacDescriptor(MacDescriptor *);
601
602IX_ETH_DB_PUBLIC __smartpointer__ MacTreeNode* ixEthDBAllocMacTreeNode(void);
603IX_ETH_DB_PUBLIC __smartpointer__ MacTreeNode* ixEthDBCloneMacTreeNode(MacTreeNode *);
604IX_ETH_DB_PUBLIC __smartpointer__ void ixEthDBFreeMacTreeNode(MacTreeNode *);
605
606IX_ETH_DB_PUBLIC void ixEthDBPoolFreeMacTreeNode(MacTreeNode *);
607IX_ETH_DB_PUBLIC UINT32 ixEthDBSearchTreeUsageGet(MacTreeNode *tree);
608IX_ETH_DB_PUBLIC int ixEthDBShowMemoryStatus(void);
609
610
611IX_ETH_DB_PUBLIC void ixEthDBInitHash(HashTable *hashTable, UINT32 numBuckets, HashFunction entryHashFunction, MatchFunction *matchFunctions, FreeFunction freeFunction);
612
613IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBAddHashEntry(HashTable *hashTable, void *entry);
614IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBRemoveHashEntry(HashTable *hashTable, int keyType, void *reference);
615IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBSearchHashEntry(HashTable *hashTable, int keyType, void *reference, HashNode **searchResult);
616IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPeekHashEntry(HashTable *hashTable, int keyType, void *reference);
617IX_ETH_DB_PUBLIC void ixEthDBReleaseHashNode(HashNode *node);
618
619IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBInitHashIterator(HashTable *hashTable, HashIterator *iterator);
620IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBIncrementHashIterator(HashTable *hashTable, HashIterator *iterator);
621IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBRemoveEntryAtHashIterator(HashTable *hashTable, HashIterator *iterator);
622IX_ETH_DB_PUBLIC void ixEthDBReleaseHashIterator(HashIterator *iterator);
623
624
625IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
626IX_ETH_DB_PUBLIC void ixEthDBMaximumFrameSizeAckCallback(IxNpeMhNpeId npeID, IxNpeMhMessage msg);
627
628
629IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBInit(void);
630IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBAdd(MacDescriptor *newRecordTemplate, IxEthDBPortMap updateTrigger);
631IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBRemove(MacDescriptor *templateRecord, IxEthDBPortMap updateTrigger);
632IX_ETH_DB_PUBLIC HashNode* ixEthDBSearch(IxEthDBMacAddr *macAddress, IxEthDBRecordType typeFilter);
633IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPeek(IxEthDBMacAddr *macAddress, IxEthDBRecordType typeFilter);
634
635
636IX_ETH_DB_PUBLIC UINT32 ixEthDBAddressCompare(UINT8 *mac1, UINT8 *mac2);
637IX_ETH_DB_PUBLIC BOOL ixEthDBAddressMatch(void *reference, void *entry);
638IX_ETH_DB_PUBLIC UINT32 ixEthDBEntryXORHash(void *macDescriptor);
639IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyXORHash(void *macAddress);
640
641
642IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type);
643IX_ETH_DB_PUBLIC void ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts);
644IX_ETH_DB_PUBLIC void ixEthDBNPEAccessRequest(IxEthDBPortId portID);
645IX_ETH_DB_PUBLIC void ixEthDBUpdateLock(void);
646IX_ETH_DB_PUBLIC void ixEthDBUpdateUnlock(void);
647IX_ETH_DB_PUBLIC MacTreeNode* ixEthDBQuery(MacTreeNode *searchTree, IxEthDBPortMap query, IxEthDBRecordType recordFilter, UINT32 maximumEntries);
648IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBFirewallUpdate(IxEthDBPortId portID, void *address, UINT32 epDelta);
649
650
651IX_ETH_DB_PUBLIC void ixEthDBPortSetAckCallback(IxNpeMhNpeId npeID, IxNpeMhMessage msg);
652IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBEventProcessorInit(void);
653IX_ETH_DB_PUBLIC void ixEthDBPortInit(IxEthDBPortId portID);
654IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortEnable(IxEthDBPortId portID);
655IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortDisable(IxEthDBPortId portID);
656IX_ETH_DB_PUBLIC void ixEthDBNPEUpdateAreasInit(void);
657IX_ETH_DB_PUBLIC UINT32 ixEthDBMatchMethodsRegister(MatchFunction *matchFunctions);
658IX_ETH_DB_PUBLIC UINT32 ixEthDBRecordSerializeMethodsRegister(void);
659IX_ETH_DB_PUBLIC UINT32 ixEthDBUpdateTypeRegister(BOOL *typeArray);
660IX_ETH_DB_PUBLIC void ixEthDBNPEUpdateAreasUnload(void);
661IX_ETH_DB_PUBLIC void ixEthDBFeatureCapabilityScan(void);
662IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyTypeRegister(UINT32 *keyType);
663
664
665IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBDefaultEventCallbackEnable(IxEthDBPortId portID, BOOL enable);
666IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBTriggerAddPortUpdate(IxEthDBMacAddr *macAddr, IxEthDBPortId portID, BOOL staticEntry);
667IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBTriggerRemovePortUpdate(IxEthDBMacAddr *macAddr, IxEthDBPortId portID);
668IX_ETH_DB_PUBLIC void ixEthDBNPEEventCallback(IxNpeMhNpeId npeID, IxNpeMhMessage msg);
669
670
671IX_ETH_DB_PUBLIC void ixEthDBGetMacDatabaseCbk(IxNpeMhNpeId npeID, IxNpeMhMessage msg);
672IX_ETH_DB_PUBLIC void ixEthDBNpeMsgAck(IxNpeMhNpeId npeID, IxNpeMhMessage msg);
673IX_ETH_DB_PUBLIC void ixEthDBNPESyncScan(IxEthDBPortId portID, void *eltBaseAddress, UINT32 eltSize);
674IX_ETH_DB_PUBLIC void ixEthDBNPETreeWrite(IxEthDBRecordType type, UINT32 totalSize, void *baseAddress, MacTreeNode *tree, UINT32 *blocks, UINT32 *startIndex);
675IX_ETH_DB_PUBLIC void ixEthDBNPEGatewayNodeWrite(void *address, MacTreeNode *node);
676
677
678IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBStartLearningFunction(void);
679IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBStopLearningFunction(void);
680IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortUpdateEnableSet(IxEthDBPortId portID, BOOL enableUpdate);
681
682
683IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBFilteringPortMaximumRxFrameSizeSet(IxEthDBPortId portID, UINT32 maximumRxFrameSize);
684IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBFilteringPortMaximumTxFrameSizeSet(IxEthDBPortId portID, UINT32 maximumTxFrameSize);
685
686
687IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortVlanTableSet(IxEthDBPortId portID, IxEthDBVlanSet portVlanTable, IxEthDBVlanSet vlanSet);
688
689
690IX_ETH_DB_PUBLIC BOOL ixEthDBAddressRecordMatch(void *untypedReference, void *untypedEntry);
691IX_ETH_DB_PUBLIC BOOL ixEthDBVlanRecordMatch(void *untypedReference, void *untypedEntry);
692IX_ETH_DB_PUBLIC BOOL ixEthDBPortRecordMatch(void *untypedReference, void *untypedEntry);
693IX_ETH_DB_PUBLIC BOOL ixEthDBNullMatch(void *reference, void *entry);
694IX_ETH_DB_PUBLIC HashNode* ixEthDBPortSearch(IxEthDBMacAddr *macAddress, IxEthDBPortId portID, IxEthDBRecordType typeFilter);
695IX_ETH_DB_PUBLIC HashNode* ixEthDBVlanSearch(IxEthDBMacAddr *macAddress, IxEthDBVlanId vlanID, IxEthDBRecordType typeFilter);
696
697
698IX_ETH_DB_PUBLIC const char* mac2string(const unsigned char *mac);
699IX_ETH_DB_PUBLIC void showHashInfo(void);
700IX_ETH_DB_PUBLIC int ixEthDBAnalyzeHash(void);
701IX_ETH_DB_PUBLIC const char* errorString(IxEthDBStatus error);
702IX_ETH_DB_PUBLIC int numHashElements(void);
703IX_ETH_DB_PUBLIC void zapHashtable(void);
704IX_ETH_DB_PUBLIC BOOL ixEthDBCheckSingleBitValue(UINT32 value);
705
706
707IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBSingleEthNpeCheck(IxEthDBPortId portId);
708
709#endif
710
711