Skip to content

Commit

Permalink
[nes]: LAG changes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
nes-repo committed Sep 30, 2015
1 parent e41f00e commit 6dceb86
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
25 changes: 11 additions & 14 deletions lag/lagMIB.c
Original file line number Diff line number Diff line change
Expand Up @@ -2879,52 +2879,49 @@ neAggTable_createEntry (
uint32_t u32Dot3adAggIndex)
{
register neAggEntry_t *poEntry = NULL;
register dot3adAggData_t *poDot3adAggData = NULL;
register dot3adAggEntry_t *poAgg = NULL;

if ((poDot3adAggData = dot3adAggData_createEntry (u32Dot3adAggIndex)) == NULL)
if ((poAgg = dot3adAggTable_createEntry (u32Dot3adAggIndex)) == NULL)
{
return NULL;
}
poEntry = &poDot3adAggData->oNe;
poEntry = &poAgg->oNe;

poEntry->i32GroupType = neAggGroupType_none_c;
poEntry->i32GroupType = neAggGroupType_internal_c;
poEntry->u32GroupIndex = 0;
/*poEntry->au8BandwidthMax = 0*/;
poEntry->u8RowStatus = xRowStatus_notInService_c;
poEntry->u8StorageType = neAggStorageType_nonVolatile_c;

xBitmap_setBit (poDot3adAggData->au8Flags, dot3adAggFlags_neCreated_c, 1);
return poEntry;
}

neAggEntry_t *
neAggTable_getByIndex (
uint32_t u32Dot3adAggIndex)
{
register dot3adAggData_t *poDot3adAggData = NULL;
register dot3adAggEntry_t *poAgg = NULL;

if ((poDot3adAggData = dot3adAggData_getByIndex (u32Dot3adAggIndex)) == NULL ||
!xBitmap_getBit (poDot3adAggData->au8Flags, dot3adAggFlags_neCreated_c))
if ((poAgg = dot3adAggTable_getByIndex (u32Dot3adAggIndex)) == NULL)
{
return NULL;
}

return &poDot3adAggData->oNe;
return &poAgg->oNe;
}

neAggEntry_t *
neAggTable_getNextIndex (
uint32_t u32Dot3adAggIndex)
{
register dot3adAggData_t *poDot3adAggData = NULL;
register dot3adAggEntry_t *poAgg = NULL;

if ((poDot3adAggData = dot3adAggData_getNextIndex (u32Dot3adAggIndex)) == NULL ||
!xBitmap_getBit (poDot3adAggData->au8Flags, dot3adAggFlags_neCreated_c))
if ((poAgg = dot3adAggTable_getNextIndex (u32Dot3adAggIndex)) == NULL)
{
return NULL;
}

return &poDot3adAggData->oNe;
return &poAgg->oNe;
}

/* remove a row from the table */
Expand All @@ -2936,7 +2933,7 @@ neAggTable_removeEntry (neAggEntry_t *poEntry)
return;
}

dot3adAggData_removeEntry (dot3adAggData_getByNeEntry (poEntry));
dot3adAggTable_removeEntry (dot3adAggTable_getByNeEntry (poEntry));
return;
}

Expand Down
1 change: 1 addition & 0 deletions lag/lagMIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ typedef struct dot3adAggEntry_t
int32_t i32PartnerOperKey;
int32_t i32CollectorMaxDelay;

neAggEntry_t oNe;
dot3adAggPortListEntry_t oPortList;

xBTree_Node_t oBTreeNode;
Expand Down

0 comments on commit 6dceb86

Please sign in to comment.