亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ixethdbportupdate.c

?? 友善mini2440嵌入式
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/** * @file IxEthDBDBPortUpdate.c * * @brief Implementation of dependency and port update handling *  * @par * IXP400 SW Release version 2.0 *  * -- Copyright Notice -- *  * @par * Copyright 2001-2005, Intel Corporation. * All rights reserved. *  * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. *  * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * @par * -- End of Copyright Notice -- */#include "IxEthDB_p.h"/* forward prototype declarations */IX_ETH_DB_PRIVATE MacTreeNode* ixEthDBTreeInsert(MacTreeNode *searchTree, MacDescriptor *descriptor);IX_ETH_DB_PRIVATE void ixEthDBCreateTrees(IxEthDBPortMap updatePorts);IX_ETH_DB_PRIVATE MacTreeNode* ixEthDBTreeRebalance(MacTreeNode *searchTree);IX_ETH_DB_PRIVATE void ixEthDBRebalanceTreeToVine(MacTreeNode *root, UINT32 *size);IX_ETH_DB_PRIVATE void ixEthDBRebalanceVineToTree(MacTreeNode *root, UINT32 size);IX_ETH_DB_PRIVATE void ixEthDBRebalanceCompression(MacTreeNode *root, UINT32 count);IX_ETH_DB_PRIVATE UINT32 ixEthDBRebalanceLog2Floor(UINT32 x);extern HashTable dbHashtable;/** * @brief register types requiring automatic updates * * @param typeArray array indexed on record types, each * element indicating whether the record type requires an * automatic update (TRUE) or not (FALSE) *  * Automatic updates are done for registered record types * upon adding, updating (that is, updating the record portID)  * and removing records. Whenever an automatic update is triggered * the appropriate ports will be provided with new database * information. * * It is assumed that the typeArray parameter is allocated large * enough to hold all the user defined types. Also, the type * array should be initialized to FALSE as this function only * caters for types which do require automatic updates. * * Note that this function should be called by the component * initialization function. * * @return number of record types registered for automatic * updates * * @internal */IX_ETH_DB_PUBLICUINT32 ixEthDBUpdateTypeRegister(BOOL *typeArray){    typeArray[IX_ETH_DB_FILTERING_RECORD]      = TRUE;    typeArray[IX_ETH_DB_FILTERING_VLAN_RECORD] = TRUE;    return 2;}/** * @brief computes dependencies and triggers port learning tree updates * * @param triggerPorts port map consisting in the ports which triggered the update * * This function browses through all the ports and determines how to waterfall the update * event from the trigger ports to all other ports depending on them. * * Once the list of ports to be updated is determined this function  * calls @ref ixEthDBCreateTrees. * * @internal */IX_ETH_DB_PUBLICvoid ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts){    IxEthDBPortMap updatePorts;    UINT32 portIndex;        ixEthDBUpdateLock();        SET_EMPTY_DEPENDENCY_MAP(updatePorts);        for (portIndex = 0 ; portIndex < IX_ETH_DB_NUMBER_OF_PORTS ; portIndex++)    {        PortInfo *port   = &ixEthDBPortInfo[portIndex];        BOOL mapsCollide;                MAPS_COLLIDE(mapsCollide, triggerPorts, port->dependencyPortMap);        if (mapsCollide                                   /* do triggers influence this port? */            && !IS_PORT_INCLUDED(portIndex, updatePorts)  /* and it's not already in the update list */            && port->updateMethod.updateEnabled)          /* and we're allowed to update it */        {            IX_ETH_DB_UPDATE_TRACE("DB: (Update) Adding port %d to update set\n", portIndex);            JOIN_PORT_TO_MAP(updatePorts, portIndex);        }        else        {            IX_ETH_DB_UPDATE_TRACE("DB: (Update) Didn't add port %d to update set, reasons follow:\n", portIndex);            if (!mapsCollide)            {                IX_ETH_DB_UPDATE_TRACE("\tMaps don't collide on port %d\n", portIndex);            }            if (IS_PORT_INCLUDED(portIndex, updatePorts))            {                IX_ETH_DB_UPDATE_TRACE("\tPort %d is already in the update set\n", portIndex);            }            if (!port->updateMethod.updateEnabled)            {                IX_ETH_DB_UPDATE_TRACE("\tPort %d doesn't have updateEnabled set\n", portIndex);            }        }    }        IX_ETH_DB_UPDATE_TRACE("DB: (Update) Updating port set\n");    ixEthDBCreateTrees(updatePorts);            ixEthDBUpdateUnlock();}/** * @brief creates learning trees and calls the port update handlers * * @param updatePorts set of ports in need of learning trees * * This function determines the optimal method of creating learning * trees using a minimal number of database queries, keeping in mind * that different ports can either use the same learning trees or they * can partially share them. The actual tree building routine is * @ref ixEthDBQuery. * * @internal */IX_ETH_DB_PRIVATEvoid ixEthDBCreateTrees(IxEthDBPortMap updatePorts){    UINT32 portIndex;    BOOL result;    BOOL portsLeft = TRUE;    while (portsLeft)    {        /* get port with minimal dependency map and NULL search tree */        UINT32 minPortIndex = MAX_PORT_SIZE;        UINT32 minimalSize  = MAX_PORT_SIZE;        for (portIndex = 0 ; portIndex < IX_ETH_DB_NUMBER_OF_PORTS ; portIndex++)        {            UINT32 size;            PortInfo *port = &ixEthDBPortInfo[portIndex];            /* generate trees only for ports that need them */            if (!port->updateMethod.searchTreePendingWrite && IS_PORT_INCLUDED(portIndex, updatePorts))            {                GET_MAP_SIZE(port->dependencyPortMap, size);                                IX_ETH_DB_UPDATE_TRACE("DB: (Update) Dependency map for port %d: size %d\n",                    portIndex, size);                if (size < minimalSize)                {                    minPortIndex = portIndex;                    minimalSize  = size;                }            }            else            {                IX_ETH_DB_UPDATE_TRACE("DB: (Update) Skipped port %d from tree diff (%s)\n", portIndex,                    port->updateMethod.searchTreePendingWrite ? "pending write access" : "ignored by query");            }                    }        /* if a port was found than minimalSize is not MAX_PORT_SIZE */        if (minimalSize != MAX_PORT_SIZE)        {            /* minPortIndex is the port we seek */            PortInfo *port = &ixEthDBPortInfo[minPortIndex];            IxEthDBPortMap query;            MacTreeNode *baseTree;            /* now try to find a port with minimal map difference */            PortInfo *minimalDiffPort = NULL;            UINT32 minimalDiff        = MAX_PORT_SIZE;                        IX_ETH_DB_UPDATE_TRACE("DB: (Update) Minimal size port is %d\n", minPortIndex);            for (portIndex = 0 ; portIndex < IX_ETH_DB_NUMBER_OF_PORTS ; portIndex++)            {                   PortInfo *diffPort = &ixEthDBPortInfo[portIndex];                BOOL mapIsSubset;                                IS_MAP_SUBSET(mapIsSubset, diffPort->dependencyPortMap, port->dependencyPortMap);                                if (portIndex != minPortIndex                    && diffPort->updateMethod.searchTree != NULL                    && mapIsSubset)                {                    /* compute size and pick only minimal size difference */                    UINT32 diffPortSize;                    UINT32 sizeDifference;                    GET_MAP_SIZE(diffPort->dependencyPortMap, diffPortSize);                                         IX_ETH_DB_UPDATE_TRACE("DB: (Update) Checking port %d for differences...\n", portIndex);                    sizeDifference = minimalSize - diffPortSize;                    if (sizeDifference < minimalDiff)                    {                        minimalDiffPort = diffPort;                        minimalDiff     = sizeDifference;                                                IX_ETH_DB_UPDATE_TRACE("DB: (Update) Minimal difference 0x%x was found on port %d\n",                            minimalDiff, portIndex);                    }                }            }            /* check if filtering is enabled on this port */            if ((port->featureStatus & IX_ETH_DB_FILTERING) != 0)            {                /* if minimalDiff is not MAX_PORT_SIZE minimalDiffPort points to the most similar port */                if (minimalDiff != MAX_PORT_SIZE)                {                    baseTree = ixEthDBCloneMacTreeNode(minimalDiffPort->updateMethod.searchTree);                    DIFF_MAPS(query, port->dependencyPortMap , minimalDiffPort->dependencyPortMap);                                        IX_ETH_DB_UPDATE_TRACE("DB: (Update) Found minimal diff, extending tree %d on query\n",                        minimalDiffPort->portID);                }                else /* .. otherwise no similar port was found, build tree from scratch */                {                    baseTree = NULL;                                        COPY_DEPENDENCY_MAP(query, port->dependencyPortMap);                                        IX_ETH_DB_UPDATE_TRACE("DB: (Update) No similar diff, creating tree from query\n");                }                IS_EMPTY_DEPENDENCY_MAP(result, query);                                if (!result) /* otherwise we don't need anything more on top of the cloned tree */                {                    IX_ETH_DB_UPDATE_TRACE("DB: (Update) Adding query tree to port %d\n", minPortIndex);                                            /* build learning tree */                    port->updateMethod.searchTree = ixEthDBQuery(baseTree, query, IX_ETH_DB_ALL_FILTERING_RECORDS, MAX_ELT_SIZE);                }                else                {                    IX_ETH_DB_UPDATE_TRACE("DB: (Update) Query is empty, assuming identical nearest tree\n");                                          port->updateMethod.searchTree = baseTree;                }            }            else            {                /* filtering is not enabled, will download an empty tree */                if (port->updateMethod.searchTree != NULL)                {                    ixEthDBFreeMacTreeNode(port->updateMethod.searchTree);                }                port->updateMethod.searchTree = NULL;            }            /* mark tree as valid */            port->updateMethod.searchTreePendingWrite = TRUE;        }        else        {            portsLeft = FALSE;            IX_ETH_DB_UPDATE_TRACE("DB: (Update) No trees to create this round\n");                    }    }        for (portIndex = 0 ; portIndex < IX_ETH_DB_NUMBER_OF_PORTS ; portIndex++)    {        PortInfo *updatePort = &ixEthDBPortInfo[portIndex];        if (updatePort->updateMethod.searchTreePendingWrite)        {            IX_ETH_DB_UPDATE_TRACE("DB: (PortUpdate) Starting procedure to upload new search tree (%snull) into NPE %d\n",                 updatePort->updateMethod.searchTree != NULL ? "not " : "",                portIndex);            updatePort->updateMethod.updateHandler(portIndex, IX_ETH_DB_FILTERING_RECORD);        }    }}/** * @brief standard NPE update handler * * @param portID id of the port to be updated * @param type record type to be pushed during this update * * The NPE update handler manages updating the NPE databases * given a certain record type. * * @internal */IX_ETH_DB_PUBLICIxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type){    UINT32 epDelta, blockCount;    IxNpeMhMessage message;    UINT32 treeSize = 0;    PortInfo *port = &ixEthDBPortInfo[portID];    /* size selection and type check */    if (type == IX_ETH_DB_FILTERING_RECORD || type == IX_ETH_DB_WIFI_RECORD)    {        treeSize = FULL_ELT_BYTE_SIZE;    }    else if (type == IX_ETH_DB_FIREWALL_RECORD)    {        treeSize = FULL_FW_BYTE_SIZE;    }    else    {        return IX_ETH_DB_INVALID_ARG;    }        /* serialize tree into memory */    ixEthDBNPETreeWrite(type, treeSize, port->updateMethod.npeUpdateZone, port->updateMethod.searchTree, &epDelta, &blockCount);    /* free internal copy */    if (port->updateMethod.searchTree != NULL)    {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu久久综合| 69堂国产成人免费视频| 日韩精品一卡二卡三卡四卡无卡| 69p69国产精品| av一区二区不卡| 美美哒免费高清在线观看视频一区二区 | 成人av综合一区| 午夜日韩在线电影| 国产精品乱人伦一区二区| 欧美一区二区视频在线观看 | 香蕉成人伊视频在线观看| 国产视频一区二区在线| 日韩欧美黄色影院| 欧美三级中文字| 91香蕉视频污在线| 国产成+人+日韩+欧美+亚洲| 热久久一区二区| 亚洲一区二区三区在线看| 中文字幕在线观看不卡视频| 久久久久国产精品麻豆| 欧美精品1区2区| 欧美影院精品一区| 色婷婷av一区二区三区之一色屋| 顶级嫩模精品视频在线看| 精品一二三四在线| 日本三级亚洲精品| 性感美女极品91精品| 亚洲另类春色校园小说| 中文字幕一区二| 国产精品美女久久久久久2018| 精品久久一区二区三区| 精品乱人伦小说| 日韩免费成人网| 日韩欧美在线观看一区二区三区| 91麻豆精品国产91久久久| 欧美日本一区二区三区四区| 欧美在线小视频| 欧美午夜不卡视频| 欧美老人xxxx18| 7777精品伊人久久久大香线蕉经典版下载 | 美女视频黄 久久| 麻豆一区二区在线| 久久99国产精品久久99果冻传媒| 青青草原综合久久大伊人精品优势| 亚欧色一区w666天堂| 日韩和欧美一区二区| 蜜桃视频在线一区| 国产在线麻豆精品观看| 国产美女视频一区| 成人avav影音| 一本一道综合狠狠老| 91传媒视频在线播放| 欧美日韩中文精品| 日韩一级高清毛片| 国产亚洲精品aa午夜观看| 国产精品福利一区二区| 亚洲精品中文在线观看| 亚洲第一久久影院| 久久国产精品99精品国产| 国产伦理精品不卡| 成人动漫一区二区在线| 色婷婷亚洲精品| 91麻豆精品国产91久久久久久久久 | 亚洲国产精品自拍| 奇米四色…亚洲| 国产精品系列在线观看| 成人aa视频在线观看| 色拍拍在线精品视频8848| 欧美另类一区二区三区| 久久这里只有精品6| 亚洲日韩欧美一区二区在线| 五月天国产精品| 国产iv一区二区三区| 91久久精品午夜一区二区| 欧美顶级少妇做爰| 中文字幕av一区二区三区免费看 | 韩国精品一区二区| av不卡免费在线观看| 欧美顶级少妇做爰| 国产精品成人免费| 丝袜美腿高跟呻吟高潮一区| 国产麻豆一精品一av一免费| 91香蕉视频黄| 日韩午夜av电影| 亚洲伦理在线免费看| 麻豆精品在线观看| 91欧美一区二区| 欧美一区二区三区精品| 成人欧美一区二区三区小说| 青椒成人免费视频| 色婷婷精品久久二区二区蜜臂av| 欧美一级二级在线观看| 亚洲天堂av一区| 国产综合色产在线精品| 欧美视频一区二| 国产精品看片你懂得| 日韩成人dvd| 色天天综合久久久久综合片| 国产亚洲欧美一区在线观看| 亚洲国产精品嫩草影院| 99久久精品国产导航| 精品88久久久久88久久久| 亚洲影院在线观看| 成人av网站在线观看免费| 日韩三级精品电影久久久| 亚洲综合一区二区三区| 成人av影视在线观看| 精品成人免费观看| 日韩精品电影在线| 欧美日韩大陆一区二区| 一区二区三区中文字幕| 粉嫩一区二区三区在线看| 欧美成人a视频| 午夜精品福利一区二区三区av | 精品一区二区在线观看| 欧美日韩亚洲综合| 亚洲靠逼com| www.av亚洲| 国产亚洲综合性久久久影院| 男女男精品视频| 欧美久久一二区| 亚洲一区二区不卡免费| 91影院在线观看| 中文字幕一区二区不卡| 波多野结衣在线aⅴ中文字幕不卡 波多野结衣在线一区 | 99久久精品国产毛片| 欧美韩日一区二区三区| 国产mv日韩mv欧美| 国产精品无遮挡| 成人午夜在线播放| 亚洲国产精品二十页| 国产成人午夜片在线观看高清观看| 日韩精品一区二区三区在线播放 | 亚洲精品菠萝久久久久久久| 91色综合久久久久婷婷| 最新国产成人在线观看| www.日韩av| 亚洲精品成人天堂一二三| 在线日韩av片| 亚洲 欧美综合在线网络| 91精品国产福利在线观看| 日韩电影免费一区| 欧美一区日韩一区| 久久精品99国产国产精| 精品国产一区a| 国产在线视频不卡二| 国产精品网曝门| 97久久精品人人做人人爽50路| 亚洲欧美电影一区二区| 欧美性生活一区| 日韩精品一区第一页| 精品国产一区二区三区忘忧草| 国产一区二区三区在线观看免费| 国产亚洲一区字幕| 99久久精品一区| 亚洲国产毛片aaaaa无费看| 91精品蜜臀在线一区尤物| 狠狠v欧美v日韩v亚洲ⅴ| 欧美激情在线免费观看| 一本色道亚洲精品aⅴ| 亚洲午夜电影在线观看| 日韩欧美中文字幕制服| 成人永久aaa| 亚洲午夜久久久久| 精品欧美久久久| 成人开心网精品视频| 亚洲国产视频一区| 26uuu国产电影一区二区| 成人97人人超碰人人99| 亚洲第一成年网| 精品国产成人系列| 91一区一区三区| 三级亚洲高清视频| 国产肉丝袜一区二区| 91精彩视频在线观看| 久久99国产精品久久99果冻传媒| 亚洲欧洲性图库| 69久久99精品久久久久婷婷| 成人免费看视频| 日本视频一区二区三区| 国产精品久久久久婷婷二区次| 欧美日韩日日摸| 成人美女视频在线观看| 日韩国产在线一| 中文av一区二区| 制服丝袜av成人在线看| 99久久久国产精品| 国产自产v一区二区三区c| 亚洲综合激情网| 欧美激情一区在线| 91精品国产黑色紧身裤美女| 色综合网色综合| 精品一区二区三区蜜桃| 亚洲一区在线观看免费观看电影高清| 久久色中文字幕| 欧美高清www午色夜在线视频| www.日韩精品| 国产传媒久久文化传媒| 日韩成人dvd| 亚洲第一成人在线|