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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ixethdbportupdate.c

?? 友善mini2440嵌入式
?? C
?? 第 1 頁 / 共 2 頁
字號:
/** * @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)    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久草精品在线观看| 久久久午夜电影| 久久亚洲捆绑美女| 亚洲国产精品ⅴa在线观看| 中文字幕第一区| 亚洲综合精品自拍| 日本大胆欧美人术艺术动态| 国产一区二区免费在线| 成人中文字幕电影| 欧美中文字幕一区二区三区| 日韩精品中午字幕| 亚洲国产电影在线观看| 成人欧美一区二区三区小说 | 日本不卡1234视频| 国模娜娜一区二区三区| 色婷婷av一区二区三区之一色屋| 欧美精品乱人伦久久久久久| 国产色爱av资源综合区| 一区二区欧美视频| 国内精品视频666| 色国产综合视频| 精品久久久久99| 亚洲精品免费在线观看| 精品在线亚洲视频| 欧美色区777第一页| 久久久久高清精品| 日韩va欧美va亚洲va久久| 国产a精品视频| 3atv一区二区三区| 国产精品电影院| 另类调教123区 | 国产精品电影一区二区三区| 午夜欧美电影在线观看| 成人av网站免费观看| 欧美一区二区三区系列电影| 中文字幕亚洲区| 精品夜夜嗨av一区二区三区| 91黄视频在线| 久久久久久久久久久久久女国产乱 | 久久精品一级爱片| 午夜精品久久久久久不卡8050| 国产成人午夜99999| 欧美日韩高清在线| 亚洲精品视频免费看| 国产一区二区三区免费看| 在线播放中文字幕一区| 亚洲日本一区二区| 高潮精品一区videoshd| 精品久久一区二区三区| 午夜在线电影亚洲一区| 99re这里都是精品| 国产亚洲一本大道中文在线| 日本免费在线视频不卡一不卡二| 欧美在线不卡一区| 中文字幕亚洲视频| 成人夜色视频网站在线观看| 精品国产不卡一区二区三区| 亚洲成a天堂v人片| 色94色欧美sute亚洲线路二| 中文幕一区二区三区久久蜜桃| 老司机午夜精品| 56国语精品自产拍在线观看| 亚洲最新视频在线观看| av在线一区二区三区| 国产日韩高清在线| 国产99久久久国产精品潘金网站| 欧美mv日韩mv| 九色|91porny| 欧美成人猛片aaaaaaa| 青青草国产成人99久久| 欧美精品日日鲁夜夜添| 亚洲福利一区二区| 欧美日韩一区不卡| 亚洲3atv精品一区二区三区| 在线观看视频91| 亚洲国产色一区| 欧美三区在线视频| 亚洲一二三区不卡| 精品视频1区2区3区| 亚洲午夜久久久久久久久电影院| 9色porny自拍视频一区二区| 国产精品久久久久桃色tv| 成人av网址在线观看| 亚洲天堂av老司机| 日本韩国一区二区| 亚洲韩国精品一区| 欧美一区在线视频| 精一区二区三区| 国产欧美一区二区三区沐欲 | 国产精品色在线| www.久久精品| 亚洲欧美一区二区三区极速播放 | 亚洲精品国产一区二区精华液| 色综合天天综合色综合av| 一区二区三区自拍| 欧美日韩国产不卡| 久久精品免费看| 久久久久国产精品人| av资源站一区| 亚洲成人综合在线| 日韩一级完整毛片| 国产精品一线二线三线| 国产精品三级在线观看| 91国产成人在线| 日本va欧美va精品发布| 久久精品视频免费| 91一区二区三区在线观看| 艳妇臀荡乳欲伦亚洲一区| 91精品国产综合久久久久久漫画| 韩日欧美一区二区三区| 国产精品三级久久久久三级| 91成人网在线| 久久疯狂做爰流白浆xx| 国产日韩欧美一区二区三区综合| 91免费国产在线| 婷婷综合另类小说色区| 久久综合久久综合九色| av影院午夜一区| 天天影视网天天综合色在线播放| 日韩精品中文字幕在线不卡尤物| 成人美女在线观看| 香蕉加勒比综合久久| 欧美精品一区二区三区很污很色的| 成人午夜激情视频| 日韩精品一级中文字幕精品视频免费观看 | 综合自拍亚洲综合图不卡区| 欧美日韩亚洲不卡| 福利电影一区二区| 亚洲v日本v欧美v久久精品| 精品久久久久久亚洲综合网| www.亚洲色图.com| 久久er精品视频| 亚洲精品日韩专区silk| 日韩精品自拍偷拍| 91精品1区2区| 国产成人av网站| 亚洲6080在线| 亚洲视频资源在线| 精品国产第一区二区三区观看体验| 91视频免费看| 国产精品自拍毛片| 亚洲mv在线观看| 综合av第一页| 久久婷婷成人综合色| 欧美日韩二区三区| 99久久精品费精品国产一区二区| 蜜臀91精品一区二区三区| 亚洲欧美另类小说视频| 久久婷婷久久一区二区三区| 欧美日韩视频在线一区二区| 北条麻妃一区二区三区| 美腿丝袜亚洲综合| 亚洲图片欧美色图| 亚洲日本在线看| 国产清纯白嫩初高生在线观看91| 91精品久久久久久蜜臀| 97se亚洲国产综合在线| 国产精品1区二区.| 久久精品国产免费| 日韩二区三区四区| 亚洲最快最全在线视频| 国产精品国产三级国产三级人妇| 精品入口麻豆88视频| 欧美三区在线观看| 91欧美一区二区| 成人动漫在线一区| 国产精品资源在线观看| 美女诱惑一区二区| 午夜精品久久久久久久久| 一区二区高清免费观看影视大全 | 国产成人激情av| 国产麻豆精品theporn| 日韩电影网1区2区| 午夜精彩视频在线观看不卡| 亚洲精品欧美专区| 亚洲精品网站在线观看| 亚洲视频一二三| 亚洲欧洲99久久| 国产精品久久久久久户外露出| 欧美精品一区二区不卡| 欧美tk—视频vk| 精品国产一区二区三区久久久蜜月 | 3751色影院一区二区三区| 欧美日本免费一区二区三区| 在线看日韩精品电影| 日本精品视频一区二区三区| 99精品偷自拍| 99久久99久久精品免费观看| 成人av先锋影音| 91蜜桃免费观看视频| 99久久精品国产毛片| 91视频国产资源| 中文字幕一区二区视频| 亚洲欧美激情在线| 亚洲综合在线视频| 天堂在线一区二区| 免费一级欧美片在线观看| 久久精品久久综合| 国产一区二区三区免费在线观看| 国产一区二区三区日韩|