diff options
author | Mandy Lavi <mandy.lavi@freescale.com> | 2015-11-26 16:47:39 (GMT) |
---|---|---|
committer | Mandy Lavi <mandy.lavi@freescale.com> | 2015-11-26 16:47:39 (GMT) |
commit | 43cecda943a6c40a833b588801b0929e8bd48813 (patch) | |
tree | 530eb137428e61cb7039908cc021860376509f5c | |
parent | 867551df7414d7eff4967aac691a39b7e0e700ad (diff) | |
download | linux-fsl-qoriq-43cecda943a6c40a833b588801b0929e8bd48813.tar.xz |
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com>
9 files changed, 14 insertions, 414 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/HC/hc.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/HC/hc.c index 774cd3a..363c8f9 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/HC/hc.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/HC/hc.c @@ -1193,97 +1193,6 @@ t_Error FmHcPcdCcDoDynamicChange(t_Handle h_FmHc, uint32_t oldAdAddrOffset, uint return E_OK; } -t_Error FmHcPcdCcDoDynamicChangeWithAging(t_Handle h_FmHc, - uint32_t oldAdAddrOffset, - uint32_t newAdAddrOffset, - e_FmCcModifyState modifyState, - uint16_t keyIndex) -{ - t_FmHc *p_FmHc = (t_FmHc*)h_FmHc; - t_HcFrame *p_HcFrame; - t_DpaaFD fmFd; - t_Error err = E_OK; - uint32_t seqNum; - - SANITY_CHECK_RETURN_ERROR(p_FmHc, E_INVALID_HANDLE); - - p_HcFrame = GetBuf(p_FmHc, &seqNum); - if (!p_HcFrame) - RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object")); - memset(p_HcFrame, 0, sizeof(t_HcFrame)); - - p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_CC_UPDATE_WITH_AGING); - p_HcFrame->actionReg = newAdAddrOffset; - p_HcFrame->actionReg |= 0xc0000000; - p_HcFrame->extraReg = oldAdAddrOffset; - - switch (modifyState) - { - case e_MODIFY_STATE_ADD: - p_HcFrame->extraReg |= HC_HCOR_EXTRA_REG_CC_AGING_ADD; - break; - - case e_MODIFY_STATE_REMOVE: - p_HcFrame->extraReg |= HC_HCOR_EXTRA_REG_CC_AGING_REMOVE; - p_HcFrame->extraReg |= ((keyIndex << HC_HCOR_EXTRA_REG_CC_REMOVE_INDX_SHIFT) & HC_HCOR_EXTRA_REG_CC_REMOVE_INDX_MASK); - break; - - case e_MODIFY_STATE_CHANGE: - p_HcFrame->extraReg &= ~HC_HCOR_EXTRA_REG_CC_AGING_CHANGE_MASK; - break; - } - - p_HcFrame->commandSequence = seqNum; - - BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC); - - err = EnQFrm(p_FmHc, &fmFd, seqNum); - - PutBuf(p_FmHc, p_HcFrame, seqNum); - - if (err != E_OK) - RETURN_ERROR(MAJOR, err, NO_MSG); - - return E_OK; -} - -t_Error FmHcPcdCcResetAgingMask(t_Handle h_FmHc, uint32_t adAddrOffset, uint32_t newAgeMask, uint32_t *p_OldAgeMask) -{ - t_FmHc *p_FmHc = (t_FmHc*)h_FmHc; - t_HcFrame *p_HcFrame; - t_DpaaFD fmFd; - t_Error err = E_OK; - uint32_t seqNum; - - SANITY_CHECK_RETURN_ERROR(p_FmHc, E_INVALID_HANDLE); - - p_HcFrame = GetBuf(p_FmHc, &seqNum); - if (!p_HcFrame) - RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object")); - memset(p_HcFrame, 0, sizeof(t_HcFrame)); - - p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_CC_AGE_MASK); - p_HcFrame->actionReg = adAddrOffset; - p_HcFrame->extraReg = newAgeMask; - p_HcFrame->commandSequence = seqNum; - - BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC); - - err = EnQFrm(p_FmHc, &fmFd, seqNum); - - /* On command completion the FMC writes to HCER the 'aging-mask' field - before it was updated by this command. This way the user may identify - which bits were cleared by FMC before setting them. */ - *p_OldAgeMask = p_HcFrame->extraReg; - - PutBuf(p_FmHc, p_HcFrame, seqNum); - - if (err != E_OK) - RETURN_ERROR(MAJOR, err, NO_MSG); - - return E_OK; -} - t_Error FmHcPcdSync(t_Handle h_FmHc) { t_FmHc *p_FmHc = (t_FmHc*)h_FmHc; diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.c index c7ddc88..51df898 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.c @@ -270,7 +270,7 @@ static void FillAdOfTypeContLookup(t_Handle h_Ad, t_AdOfTypeContLookup *p_AdContLookup = (t_AdOfTypeContLookup *)h_Ad; t_Handle h_TmpAd; t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd; - uint32_t tmpReg32, agingMask; + uint32_t tmpReg32; t_Handle p_AdNewPtr = NULL; UNUSED(h_Manip); @@ -367,15 +367,7 @@ static void FillAdOfTypeContLookup(t_Handle h_Ad, tmpReg32 |= p_Node->parseCode; WRITE_UINT32(p_AdContLookup->pcAndOffsets, tmpReg32); - if (p_Node->agingSupport) - { - /* Building a mask of 1-s for all node's keys */ - agingMask = CC_BUILD_AGING_MASK(p_Node->numOfKeys); - Mem2IOCpy32((void*)&p_AdContLookup->gmask, &agingMask, - CC_AGING_MASK_SIZE); - } - else - Mem2IOCpy32((void*)&p_AdContLookup->gmask, p_Node->p_GlblMask, + Mem2IOCpy32((void*)&p_AdContLookup->gmask, p_Node->p_GlblMask, CC_GLBL_MASK_SIZE); } } @@ -860,7 +852,6 @@ static t_Handle BuildNewAd( p_FmPcdCcNodeTmp->h_AdTable = p_FmPcdModifyCcKeyAdditionalParams->p_AdTableNew; - p_FmPcdCcNodeTmp->agingSupport = p_CcNode->agingSupport; p_FmPcdCcNodeTmp->lclMask = p_CcNode->lclMask; p_FmPcdCcNodeTmp->parseCode = p_CcNode->parseCode; p_FmPcdCcNodeTmp->offset = p_CcNode->offset; @@ -908,8 +899,7 @@ static t_Handle BuildNewAd( static t_Error DynamicChangeHc( t_Handle h_FmPcd, t_List *h_OldPointersLst, t_List *h_NewPointersLst, t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalParams, - bool useShadowStructs, - e_FmCcModifyState modifyState) + bool useShadowStructs) { t_List *p_PosOld, *p_PosNew; uint32_t oldAdAddrOffset, newAdAddrOffset; @@ -954,15 +944,7 @@ static t_Error DynamicChangeHc( } /* Invoke host command to copy from new AD to old AD */ - if ((!p_AdditionalParams->tree) && - (((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->agingSupport)) - err = FmHcPcdCcDoDynamicChangeWithAging(((t_FmPcd *)h_FmPcd)->h_Hc, - oldAdAddrOffset, - newAdAddrOffset, - modifyState, - p_AdditionalParams->savedKeyIndex); - else - err = FmHcPcdCcDoDynamicChange(((t_FmPcd *)h_FmPcd)->h_Hc, + err = FmHcPcdCcDoDynamicChange(((t_FmPcd *)h_FmPcd)->h_Hc, oldAdAddrOffset, newAdAddrOffset); if (err) { @@ -1010,8 +992,7 @@ static t_Error DoDynamicChange( /* Invoke host-command to copy from the new Ad to existing Ads */ err = DynamicChangeHc(h_FmPcd, h_OldPointersLst, h_NewPointersLst, - p_AdditionalParams, useShadowStructs, - p_AdditionalParams->modifyState); + p_AdditionalParams, useShadowStructs); if (err) RETURN_ERROR(MAJOR, err, NO_MSG); @@ -1050,10 +1031,9 @@ static t_Error DoDynamicChange( /* HC to copy from the new Ad (old updated structures) to current Ad (uses shadow structures) */ err = DynamicChangeHc(h_FmPcd, h_OldPointersLst, h_NewPointersLst, - p_AdditionalParams, useShadowStructs, - e_MODIFY_STATE_CHANGE); - if (err) - RETURN_ERROR(MAJOR, err, NO_MSG); + p_AdditionalParams, useShadowStructs); + if (err) + RETURN_ERROR(MAJOR, err, NO_MSG); } } @@ -1715,8 +1695,7 @@ t_Error ValidateNextEngineParams( static uint8_t GetGenParseCode(e_FmPcdExtractFrom src, uint32_t offset, bool glblMask, uint8_t *parseArrayOffset, bool fromIc, - ccPrivateInfo_t icCode, - bool aging) + ccPrivateInfo_t icCode) { if (!fromIc) { @@ -1746,10 +1725,7 @@ static uint8_t GetGenParseCode(e_FmPcdExtractFrom src, { case (CC_PRIVATE_INFO_IC_KEY_EXACT_MATCH): *parseArrayOffset = 0x50; - if (aging) - return CC_PC_GENERIC_IC_AGING_MASK; - else - return CC_PC_GENERIC_IC_GMASK; + return CC_PC_GENERIC_IC_GMASK; case (CC_PRIVATE_INFO_IC_HASH_EXACT_MATCH): *parseArrayOffset = 0x48; @@ -3446,7 +3422,7 @@ static void UpdateAdPtrOfTreesWhichPointsOnCrntMdfNode( static t_FmPcdModifyCcKeyAdditionalParams * ModifyNodeCommonPart( t_Handle h_FmPcdCcNodeOrTree, uint16_t keyIndex, - e_FmCcModifyState modifyState, bool ttlCheck, bool hashCheck, bool tree) + e_ModifyState modifyState, bool ttlCheck, bool hashCheck, bool tree) { t_FmPcdModifyCcKeyAdditionalParams *p_FmPcdModifyCcKeyAdditionalParams; int i = 0, j = 0; @@ -3529,7 +3505,6 @@ static t_FmPcdModifyCcKeyAdditionalParams * ModifyNodeCommonPart( p_FmPcdModifyCcKeyAdditionalParams->h_CurrentNode = h_FmPcdCcNodeOrTree; p_FmPcdModifyCcKeyAdditionalParams->savedKeyIndex = keyIndex; - p_FmPcdModifyCcKeyAdditionalParams->modifyState = modifyState; while (i < numOfKeys) { @@ -4556,7 +4531,7 @@ static t_Error MatchTableSet(t_Handle h_FmPcd, t_FmPcdCcNode *p_CcNode, p_CcNode->parseCode = GetGenParseCode( p_CcNodeParam->extractCcParams.extractNonHdr.src, p_CcNode->offset, glblMask, &p_CcNode->prsArrayOffset, - fromIc, icCode, p_CcNode->agingSupport); + fromIc, icCode); if (p_CcNode->parseCode == CC_PC_GENERIC_IC_HASH_INDEXED) { @@ -4570,7 +4545,6 @@ static t_Error MatchTableSet(t_Handle h_FmPcd, t_FmPcdCcNode *p_CcNode, } } if ((p_CcNode->parseCode == CC_PC_GENERIC_IC_GMASK) - || (p_CcNode->parseCode == CC_PC_GENERIC_IC_AGING_MASK) || (p_CcNode->parseCode == CC_PC_GENERIC_IC_HASH_INDEXED)) { p_CcNode->offset += p_CcNode->prsArrayOffset; @@ -5765,58 +5739,6 @@ t_Error FmPcdCcModifyKeyAndNextEngine(t_Handle h_FmPcd, t_Handle h_FmPcdCcNode, return err; } -static t_Error FmPcdCcGetAgingMask(t_Handle h_FmPcd, - t_Handle h_FmPcdCcNode, - uint16_t keyIndex, - bool reset, - uint32_t *p_Mask) -{ - t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd; - t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode; - t_FmPcdCcNextEngineParams *p_NextEngineParams = NULL; - t_List h_NodesLst; - uint32_t newAgingMask, oldAgingMask, adAddrOffset; - t_AdOfTypeContLookup *p_AdContLookup; - t_Error err; - - INIT_LIST(&h_NodesLst); - - /* Building a list of all action descriptors that point to this node. - No sharing on AD with aging, so there should be only one parent. */ - if (!LIST_IsEmpty(&p_CcNode->ccPrevNodesLst)) - UpdateAdPtrOfNodesWhichPointsOnCrntMdfNode(p_CcNode, &h_NodesLst, - &p_NextEngineParams); - ASSERT_COND(LIST_NumOfObjs(&h_NodesLst) == 1); - - adAddrOffset = FmPcdCcGetNodeAddrOffsetFromNodeInfo(p_FmPcd, LIST_FIRST(&h_NodesLst)); - - if (reset) - { - if (keyIndex == FM_PCD_LAST_KEY_INDEX) - /* If no specific key index provided the entire aging mask will be reset */ - newAgingMask = CC_BUILD_AGING_MASK(p_CcNode->numOfKeys); - else - /* Only the bit that corresponds to the provided index is reset, - other bits in the mask will be preserved */ - newAgingMask = (0x80000000 >> keyIndex); - - err = FmHcPcdCcResetAgingMask(p_FmPcd->h_Hc, adAddrOffset, newAgingMask, &oldAgingMask); - if (err) - RETURN_ERROR(MAJOR, err, NO_MSG); - - *p_Mask = (oldAgingMask & newAgingMask); - } - else - { - p_AdContLookup = (t_AdOfTypeContLookup *)(PTR_MOVE(XX_PhysToVirt(p_FmPcd->physicalMuramBase), adAddrOffset)); - *p_Mask = GET_UINT32(p_AdContLookup->gmask); - } - - ReleaseLst(&h_NodesLst); - - return E_OK; -} - uint32_t FmPcdCcGetNodeAddrOffsetFromNodeInfo(t_Handle h_FmPcd, t_Handle h_Pointer) { @@ -7246,14 +7168,6 @@ t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd, t_FmPcdHashTableParams *p_Param) if (p_Param->maxNumOfKeys % numOfSets) DBG(INFO, ("'maxNumOfKeys' is not a multiple of hash number of ways, so number of ways will be rounded up")); - if ((p_Param->agingSupport) && (numOfWays > 31)) - { - XX_Free(p_ExactMatchCcNodeParam); - REPORT_ERROR(MAJOR, E_INVALID_VALUE, - ("Aging supported enabled and %d keys requested per hash bucket. Aging cannot be supported when more then 31 keys", numOfWays)); - return NULL; - } - if ((p_Param->statisticsMode == e_FM_PCD_CC_STATS_MODE_FRAME) || (p_Param->statisticsMode == e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME)) { @@ -7311,7 +7225,6 @@ t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd, t_FmPcdHashTableParams *p_Param) memset(p_CcNode, 0, sizeof(t_FmPcdCcNode)); p_CcNode->isHashBucket = TRUE; - p_CcNode->agingSupport = p_Param->agingSupport; p_CcNode->h_MissStatsCounters = h_MissStatsCounters; err = MatchTableSet(h_FmPcd, p_CcNode, p_ExactMatchCcNodeParam); @@ -7618,138 +7531,3 @@ t_Error FM_PCD_HashTableGetMissStatistics( return FM_PCD_MatchTableGetMissStatistics(h_HashBucket, p_MissStatistics); } - -t_Error FM_PCD_HashTableGetKeyAging(t_Handle h_HashTbl, - uint8_t *p_Key, - uint8_t keySize, - bool reset, - bool *p_KeyAging) -{ - t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl; - t_FmPcd *p_FmPcd; - t_Handle h_HashBucket; - uint8_t bucketIndex; - uint16_t lastIndex, keyIndex; - uint32_t agingMask, keyAgingBit; - t_Error err; - - SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE); - SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER); - SANITY_CHECK_RETURN_ERROR(p_KeyAging, E_NULL_POINTER); - p_FmPcd = (t_FmPcd *)p_HashTbl->h_FmPcd; - SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE); - SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE); - - err = FM_PCD_MatchTableGetIndexedHashBucket(p_HashTbl, keySize, p_Key, - p_HashTbl->kgHashShift, - &h_HashBucket, &bucketIndex, - &lastIndex); - if (err) - RETURN_ERROR(MAJOR, err, NO_MSG); - - if (!((t_FmPcdCcNode *)h_HashBucket)->agingSupport) - RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Aging support was not enabled for this hash table")); - - if (!FmPcdLockTryLockAll(p_FmPcd)) - { - DBG(TRACE, ("FmPcdLockTryLockAll failed")); - return ERROR_CODE(E_BUSY); - } - - err = FindKeyIndex(h_HashBucket, keySize, p_Key, NULL, &keyIndex); - if (GET_ERROR_TYPE(err) != E_OK) - { - FmPcdLockUnlockAll(p_FmPcd); - RETURN_ERROR( - MAJOR, - err, - ("The received key and mask pair was not found in the match table of the provided node")); - } - - err = FmPcdCcGetAgingMask(p_FmPcd, h_HashBucket, keyIndex, reset, &agingMask); - - keyAgingBit = (0x80000000 >> keyIndex); - *p_KeyAging = ((agingMask & keyAgingBit) ? TRUE : FALSE); - - FmPcdLockUnlockAll(p_FmPcd); - - switch(GET_ERROR_TYPE(err)) - { - case E_OK: - return E_OK; - - case E_BUSY: - DBG(TRACE, ("E_BUSY error")); - return ERROR_CODE(E_BUSY); - - default: - RETURN_ERROR(MAJOR, err, NO_MSG); - } -} - -t_Error FM_PCD_HashTableGetBucketAging(t_Handle h_HashTbl, - uint16_t bucketId, - bool reset, - uint32_t *p_BucketAgingMask, - uint8_t *agedKeysArray[31]) -{ - t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl; - t_FmPcd *p_FmPcd; - t_FmPcdCcNode *p_HashBucket; - uint32_t tmpMask, keyIndex = 0, indx = 0; - t_Error err; - - SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE); - p_FmPcd = (t_FmPcd *)p_HashTbl->h_FmPcd; - SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE); - SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE); - - p_HashBucket = (t_FmPcdCcNode *)(p_HashTbl->keyAndNextEngineParams[bucketId].nextEngineParams.params.ccParams.h_CcNode); - - if (!p_HashBucket->agingSupport) - RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Aging support was not enabled for this hash table")); - - if (!FmPcdLockTryLockAll(p_FmPcd)) - { - DBG(TRACE, ("FmPcdLockTryLockAll failed")); - return ERROR_CODE(E_BUSY); - } - - err = FmPcdCcGetAgingMask(p_FmPcd, p_HashBucket, FM_PCD_LAST_KEY_INDEX, reset, p_BucketAgingMask); - - /* If the user provided a valid pointer, the aged keys will be copied - into the provided array of pointers */ - if ((agedKeysArray) && (*p_BucketAgingMask)) - { - tmpMask = *p_BucketAgingMask; - - while (tmpMask) - { - /* If a bit is set in the aging mask and it doesn't correspond to miss entry, - copy the key into the aged keys array */ - if ((tmpMask & 0x80000000) && (keyIndex != p_HashBucket->numOfKeys)) - { - memcpy(agedKeysArray[indx], p_HashBucket->keyAndNextEngineParams[keyIndex].key, p_HashBucket->userSizeOfExtraction); - indx++; - } - - tmpMask = (tmpMask << 1); - keyIndex++; - } - } - - FmPcdLockUnlockAll(p_FmPcd); - - switch(GET_ERROR_TYPE(err)) - { - case E_OK: - return E_OK; - - case E_BUSY: - DBG(TRACE, ("E_BUSY error")); - return ERROR_CODE(E_BUSY); - - default: - RETURN_ERROR(MAJOR, err, NO_MSG); - } -} diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.h b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.h index d148ff4..3456bb5 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.h +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Pcd/fm_cc.h @@ -284,7 +284,6 @@ typedef struct t_Handle h_FrmReplicForRmv; #endif /* (DPAA_VERSION >= 11) */ bool tree; - e_FmCcModifyState modifyState; t_FmPcdCcKeyAndNextEngineParams keyAndNextEngineParams[CC_MAX_NUM_OF_KEYS]; } t_FmPcdModifyCcKeyAdditionalParams; @@ -308,7 +307,6 @@ typedef struct uint32_t countersArraySize; bool isHashBucket; /**< Valid for match table node that is a bucket of a hash table only */ - bool agingSupport; /**< Valid for match table node that is a bucket of a hash table only */ t_Handle h_MissStatsCounters; /**< Valid for hash table node and match table that is a bucket; Holds the statistics counters allocated by the hash table and are shared by all hash table buckets; */ diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_common.h b/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_common.h index 696298a..eb153d9 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_common.h +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_common.h @@ -248,12 +248,12 @@ typedef struct }t_CcNodeInformation; #define CC_NODE_F_OBJECT(ptr) LIST_OBJECT(ptr, t_CcNodeInformation, node) -typedef enum e_FmCcModifyState +typedef enum e_ModifyState { e_MODIFY_STATE_ADD = 0, e_MODIFY_STATE_REMOVE, e_MODIFY_STATE_CHANGE -} e_FmCcModifyState; +} e_ModifyState; typedef struct { diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_hc.h b/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_hc.h index c4f62d7..492aa8a 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_hc.h +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/inc/fm_hc.h @@ -71,8 +71,6 @@ t_Error FmHcPcdKgSetSchemeCounter(t_Handle h_FmHc, t_Handle h_Scheme, uint32 uint32_t FmHcPcdKgGetSchemeCounter(t_Handle h_FmHc, t_Handle h_Scheme); t_Error FmHcPcdCcDoDynamicChange(t_Handle h_FmHc, uint32_t oldAdAddrOffset, uint32_t newAdAddrOffset); -t_Error FmHcPcdCcDoDynamicChangeWithAging(t_Handle h_FmHc, uint32_t oldAdAddrOffset, uint32_t newAdAddrOffset, e_FmCcModifyState modifyState, uint16_t keyIndex); -t_Error FmHcPcdCcResetAgingMask(t_Handle h_FmHc, uint32_t adAddrOffset, uint32_t newAgeMask, uint32_t *p_OldAgeMask); t_Error FmHcPcdPlcrSetProfile(t_Handle h_FmHc, t_Handle h_Profile, t_FmPcdPlcrProfileRegs *p_PlcrRegs); t_Error FmHcPcdPlcrDeleteProfile(t_Handle h_FmHc, t_Handle h_Profile); diff --git a/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_pcd_ext.h b/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_pcd_ext.h index c489124..a9e4a24 100644 --- a/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_pcd_ext.h +++ b/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_pcd_ext.h @@ -1989,11 +1989,6 @@ typedef struct t_FmPcdHashTableParams { t_FmPcdCcNextEngineParams ccNextEngineParamsForMiss; /**< Parameters for defining the next engine when a key is not matched */ - bool agingSupport; /**< TRUE to enable aging support for all keys of this hash table; - Aging status of a key enables the application to monitor if the - key was accessed for a certain period of time, meaning if a - packet that matches this key was received since this bit was last - set by the application */ } t_FmPcdHashTableParams; /**************************************************************************//** @@ -3768,75 +3763,6 @@ t_Error FM_PCD_HashTableGetMissStatistics(t_Handle h_HashTbl, t_FmPcdCcKeyStatistics *p_MissStatistics); /**************************************************************************//** -@Function FM_PCD_HashTableGetKeyAging - -@Description This routine may be used to retrieve the aging status for the - provided key. - -@Param[in] h_HashTbl A handle to a hash table -@Param[in] p_Key Pointer to a key -@Param[in] keySize Size of provided key -@Param[in] reset TRUE if the user wishes to reset the aging - status of this key to 1 after reading it; - FALSE otherwise (key aging status will be - read and not changed); -@Param[out] p_KeyAging FALSE if the provided key was accessed since - it's status was last set, TRUE otherwise. - -@Return E_OK on success; Error code otherwise. - -@Cautions Allowed only following FM_PCD_HashTableSet() with aging support - enabled. -*//***************************************************************************/ -t_Error FM_PCD_HashTableGetKeyAging(t_Handle h_HashTbl, - uint8_t *p_Key, - uint8_t keySize, - bool reset, - bool *p_KeyAging); - -/**************************************************************************//** -@Function FM_PCD_HashTableGetBucketAging - -@Description This routine may be used to retrieve the aging status for the - hash table bucket. - -@Param[in] h_HashTbl A handle to a hash table -@Param[in] bucketId Id of the requested bucket -@Param[in] reset TRUE if the user wishes to reset the aging - status of this bucket to all 1-s after reading; - FALSE otherwise (aging mask will be read - and not changed) -@Param[out] p_BucketAgingMask Aging mask of the requested bucket; - A zero bit in the mask means that the key - represented by that bit was accessed since the - bit was last set, otherwise the bit remains - set to 1; - The MSB bit represents the first key in the - bucket, the 2nd MSB bit represents the second - key, etc.. -@Param[out] agedKeysArray If the user will provide a handle to a - preallocated array, this routine will copy - into that array all the keys from the requested - bucket for which the aging status is non-zero, - meaning all the keys that were not accessed since - their aging mask was last set; - The user may set this parameters to NULL to - disable this option - -@Return E_OK on success; Error code otherwise - -@Cautions Allowed only following FM_PCD_HashTableSet() with aging support - Enabled; - If agedKeysArray is provided, it must have 31 entries large enough - to hold the entire keys -*//***************************************************************************/ -t_Error FM_PCD_HashTableGetBucketAging(t_Handle h_HashTbl, - uint16_t bucketId, - bool reset, - uint32_t *p_BucketAgingMask, - uint8_t *agedKeysArray[31]); - -/**************************************************************************//** @Function FM_PCD_ManipNodeSet @Description This routine should be called for defining a manipulation diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c index ee98d88..1de4886 100644 --- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c +++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c @@ -518,7 +518,6 @@ void compat_copy_fm_pcd_hash_table( param->hash_res_mask = compat_param->hash_res_mask; param->hash_shift = compat_param->hash_shift; param->match_key_size = compat_param->match_key_size; - param->aging_support = compat_param->aging_support; param->id = compat_pcd_id2ptr(compat_param->id); } else @@ -529,7 +528,6 @@ void compat_copy_fm_pcd_hash_table( compat_param->hash_res_mask = param->hash_res_mask; compat_param->hash_shift = param->hash_shift; compat_param->match_key_size = param->match_key_size; - compat_param->aging_support = param->aging_support; compat_param->id = compat_add_ptr2id(param->id, FM_MAP_TYPE_PCD_NODE); } diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h index d04a08a..187011f 100644 --- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h +++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h @@ -297,7 +297,6 @@ typedef struct ioc_compat_fm_pcd_hash_table_params_t { uint8_t hash_shift; uint8_t match_key_size; ioc_compat_fm_pcd_cc_next_engine_params_t cc_next_engine_params_for_miss; - bool aging_support; compat_uptr_t id; } ioc_compat_fm_pcd_hash_table_params_t; diff --git a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h index 4481f5c..d13e878 100644 --- a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h +++ b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h @@ -1510,12 +1510,6 @@ typedef struct ioc_fm_pcd_hash_table_params_t { ioc_fm_pcd_cc_next_engine_params_t cc_next_engine_params_for_miss; /**< Parameters for defining the next engine when a key is not matched */ - bool aging_support; /**< TRUE to enable aging support for all keys of this hash table; - Aging status of a key enables the application to monitor if the - key was accessed for a certain period of time, meaning if a - packet that matches this key was received since this bit was last - set by the application */ - void *id; } ioc_fm_pcd_hash_table_params_t; |